]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/c-family/ChangeLog
rs6000, vector integer multiply/divide/modulo instructions
[thirdparty/gcc.git] / gcc / c-family / ChangeLog
CommitLineData
6851dda2
GA
12021-01-12 Martin Sebor <msebor@redhat.com>
2
3 PR c/98597
4 PR c/98592
5 * c-pretty-print.c (print_mem_ref): Avoid assuming MEM_REF operand
6 has pointer type. Remove redundant code. Avoid calling
7 gimple_canonical_types_compatible_p.
8
7d187e4f
GA
92021-01-07 Martin Sebor <msebor@redhat.com>
10
11 PR middle-end/98578
12 * c-pretty-print.c (print_mem_ref): Strip array from access type.
13 Avoid assuming acces type's size is constant. Correct condition
14 guarding the printing of a parenthesis.
15
942ae5be
GA
162021-01-06 Martin Sebor <msebor@redhat.com>
17
18 PR c++/95768
19 * c-pretty-print.c (c_pretty_printer::primary_expression): For
20 SSA_NAMEs print VLA names and GIMPLE defining statements.
21 (print_mem_ref): New function.
22 (c_pretty_printer::unary_expression): Call it.
23
242021-01-06 Richard Biener <rguenther@suse.de>
25
26 PR tree-optimization/95582
27 * c-attribs.c (c_common_attribute_table): Add entry for
28 signed_bool_precision.
29 (handle_signed_bool_precision_attribute): New.
30
8daa719b
GA
312020-12-24 Iain Sandoe <iain@sandoe.co.uk>
32
33 * c.opt: Add -stdlib= option and enumerations for
34 libstdc++ and libc++.
35
eefe499f
GA
362020-12-16 Martin Liska <mliska@suse.cz>
37
38 * c.opt: Remove usage of Report.
39
d52945ce
GA
402020-12-14 Martin Sebor <msebor@redhat.com>
41
42 PR middle-end/98166
43 PR c++/57111
44 PR middle-end/98160
45 * c-attribs.c (maybe_add_noinline): New function.
46 (handle_malloc_attribute): Call it. Use ATTR_FLAG_INTERNAL.
47 Implicitly add attribute noinline to functions not declared inline
48 and warn on those.
49
ca2bd949
GA
502020-12-09 Tobias Burnus <tobias@codesourcery.com>
51
52 * c-pragma.c (omp_pragmas): Add 'allocate'.
53 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_ALLOCATE.
54
f6e8e279
GA
552020-12-08 Jakub Jelinek <jakub@redhat.com>
56
57 PR c++/98187
58 * c-pragma.c (omp_pragmas): Remove "master".
59 (omp_pragmas_simd): Add "master".
60
bc8a7013
GA
612020-12-07 Marek Polacek <polacek@redhat.com>
62
63 PR c++/98126
64 * c-common.c (verify_tree_lim_r): New function.
65 (verify_sequence_points): Use it. Use nullptr instead of 0.
66
b8dd0ef7
GA
672020-12-03 Martin Sebor <msebor@redhat.com>
68
69 PR c++/90629
70 PR middle-end/94527
71 * c-attribs.c (handle_dealloc_attribute): New function.
72 (handle_malloc_attribute): Handle argument forms of attribute.
73 * c.opt (-Wmismatched-dealloc): New option.
74 (-Wmismatched-new-delete): New option.
75
762020-12-03 Jakub Jelinek <jakub@redhat.com>
77
78 PR libstdc++/93121
79 * c-common.h (enum rid): Add RID_BUILTIN_BIT_CAST.
80 * c-common.c (c_common_reswords): Add __builtin_bit_cast.
81
e0f5e792
GA
822020-12-01 JeanHeyd Meneide <phdofthehouse@gmail.com>
83
84 * c-cppbuiltin.c (c_cpp_builtins): Add predefined
85 {__GNUC_EXECUTION_CHARSET_NAME} and
86 _WIDE_EXECUTION_CHARSET_NAME} macros.
87
882020-12-01 Nathan Sidwell <nathan@acm.org>
89
90 * c-common.c (module, import, export): New internal tokens (with
91 trailing space).
92 * c-common.h (RID__MODULE, RID__IMPORT & RID__EXPORT): Enumerate
93 them.
94 (D_CXX_MODULES, D_CXX_MODULES_FLAGS): Enable them.
95 * c-cppbuiltin.c (c_cpp_builtins): Feature macro.
96
972020-12-01 Nathan Sidwell <nathan@acm.org>
98
99 * c-opts.c (c_common_init_options): Ask for module dependencies.
100 (c_common_handle_option): Handle -Mmodules -Mno-modules.
101 * c-pch.c (c_common_valid_pch): ... does not play with C++
102 modules.
103 * c.opt (Mmodules, Mno-modules): New preprocessor dependency
104 options.
105 (fmodules-ts, fmodule-header, fmodule-implicit-inline)
106 (fmodule-only, fmodule-mapper, fmodule-lazy)
107 (fmodule-version-ignore, Winvalid-imported-macros)
108 (flang-info-include-translate, flang-info-include-translate-not):
109 New options
110
5fbf0ecb
GA
1112020-11-28 Eric Botcazou <ebotcazou@adacore.com>
112
113 * c-ada-spec.c (dump_nested_type) <RECORD_TYPE>: Remove obsolete code.
114 (dump_ada_structure): Also deal with convention, unchecked union and
115 bit-field for nested types. In the latter case, print an Alignment
116 aspect along with the Pack aspect.
117
360258da
GA
1182020-11-25 Martin Sebor <msebor@redhat.com>
119
120 PR bootstrap/94982
121 * c-attribs.c (handle_patchable_function_entry_attribute): Avoid
122 -Wformat-diag.
123
1e2c9a27
GA
1242020-11-24 Martin Sebor <msebor@redhat.com>
125
126 * c-warn.c (warn_parm_array_mismatch): Avoid invalid redeclarations.
127
8e6198d0
GA
1282020-11-23 Jozef Lawrynowicz <jozef.l@mittosystems.com>
129
130 * c-attribs.c (handle_special_var_sec_attribute): New.
131 (handle_noinit_attribute): Remove.
132 (attr_noinit_exclusions): Rename to...
133 (attr_section_exclusions): ...this, and add "persistent" attribute
134 exclusion.
135 (c_common_attribute_table): Add "persistent" attribute.
136
7a97e2fc
GA
1372020-11-21 Aaron Sawdey <acsawdey@linux.ibm.com>
138
139 * c-pretty-print.c (c_pretty_printer::simple_type_specifier):
140 Treat opaque types like other types.
141 (c_pretty_printer::direct_abstract_declarator): Opaque types are
142 supported types.
143
82e5048e
GA
1442020-11-20 Martin Sebor <msebor@redhat.com>
145
146 * c-warn.c (warn_parm_array_mismatch): Bail on invalid redeclarations
147 with fewer arguments.
148
1492020-11-20 Martin Sebor <msebor@redhat.com>
150
151 PR middle-end/97879
152 * c-attribs.c (handle_access_attribute): Handle ATTR_FLAG_INTERNAL.
153 Error out on invalid modes.
154
1552020-11-20 Jakub Jelinek <jakub@redhat.com>
156
157 PR libstdc++/88101
158 * c-common.c (check_builtin_function_arguments): Handle
159 BUILT_IN_CLEAR_PADDING.
160
25bb75f8
GA
1612020-11-18 Nathan Sidwell <nathan@acm.org>
162
163 * c-lex.c (c_lex_with_flags): CPP_HEADER_NAMEs can now be seen.
164
4dabb037
GA
1652020-11-17 Nathan Sidwell <nathan@acm.org>
166
167 * c-common.h (enum c_tree_index): Reorder to place lazy fields
168 after newly-added CTI_MODULE_HWM.
169
1702020-11-17 Joseph Myers <joseph@codesourcery.com>
171
172 * c-cppbuiltin.c (builtin_define_float_constants): Define
173 "*_IS_IEC_60559__" macros.
174
1752020-11-17 Nathan Sidwell <nathan@acm.org>
176
177 * c-lex.c: #include "langhooks.h".
178 (cb_undef): Maybe call preprocess_undef lang hook.
179 * c-opts.c (c_common_post_options): Maybe call preprocess_options
180 lang hook.
181 (push_command_line_include): Maybe call preprocess_main_file lang
182 hook.
183 (cb_file_change): Likewise.
184 * c-ppoutput.c: #include "langhooks.h.
185 (scan_translation_unit): Maybe call preprocess_token lang hook.
186 (class do_streamer): New, derive from token_streamer.
187 (directives_only_cb): Data pointer is do_streamer, call
188 preprocess_token lang hook.
189 (scan_translation_unit_directives_only): Use do_streamer.
190 (print_line_1): Move src_line recording to after string output.
191 (cb_undef): Maybe call preprocess_undef lang hook.
192
1932020-11-17 Nathan Sidwell <nathan@acm.org>
194
195 * c-ppoutput.c (scan_translation_unit): Use token_streamer, remove
196 code duplicating that functionality.
197
1982020-11-17 Jakub Jelinek <jakub@redhat.com>
199
200 PR c/90628
201 * c-common.c (check_builtin_function_arguments)
202 <case BUILT_IN_ADD_OVERFLOW>: Diagnose when last argument is pointer
203 to _Atomic. For the TYPE_READONLY case, adjust message to be usable
204 for more builtins and argument positions.
205
29c5d9ce
GA
2062020-11-16 Iain Sandoe <iain@sandoe.co.uk>
207
208 PR objc/97854
209 * stub-objc.c: Include c-common.h to declare enum rid.
210
77f67db2
GA
2112020-11-13 Jakub Jelinek <jakub@redhat.com>
212
213 PR c++/63287
214 * c-cppbuiltin.c: Include configargs.h.
215 (c_cpp_builtins): For C++11 and later if THREAD_MODEL_SPEC is not
216 defined, predefine __STDCPP_THREADS__ to 1 unless thread_model is
217 "single".
218
2192020-11-13 Gergö Barany <gergo@codesourcery.com>
220 Thomas Schwinge <thomas@codesourcery.com>
221
222 * c.opt (fopenacc-kernels): Add.
223
2242020-11-13 Jason Merrill <jason@redhat.com>
225
226 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_using_enum.
227
2282020-11-13 Piotr H. Dabrowski <phd@phd.re>
229
230 PR c++/91318
231 * c-cppbuiltin.c: c_cpp_builtins_optimize_pragma(): use cpp_define_unused()
232
2332020-11-13 Martin Liska <mliska@suse.cz>
234
235 * c-attribs.c (build_attr_access_from_parms): Format properly.
236
2372020-11-13 Iain Sandoe <iain@sandoe.co.uk>
238
239 PR objc/90707
240 * c-common.c (c_common_reswords): null_unspecified, nullable,
241 nonnull, null_resettable: New keywords.
242 * c-common.h (enum rid): RID_NULL_UNSPECIFIED, RID_NULLABLE,
243 RID_NONNULL, RID_NULL_RESETTABLE: New.
244 (OBJC_IS_PATTR_KEYWORD): Include nullability keywords in the
245 ranges accepted for property attributes.
246 * c-attribs.c (handle_objc_nullability_attribute): New.
247 * c-objc.h (enum objc_property_attribute_group): Add
248 OBJC_PROPATTR_GROUP_NULLABLE.
249 (enum objc_property_attribute_kind):Add
250 OBJC_PROPERTY_ATTR_NULL_UNSPECIFIED, OBJC_PROPERTY_ATTR_NULLABLE,
251 OBJC_PROPERTY_ATTR_NONNULL, OBJC_PROPERTY_ATTR_NULL_RESETTABLE.
252
2532020-11-13 Iain Sandoe <iain@sandoe.co.uk>
254
255 PR objc/77404
256 * c-attribs.c (handle_objc_root_class_attribute): New
257 * c-objc.h (objc_start_class_interface): Add a location
258 value for the position of the class name.
259 * c.opt: Add Wobjc-root-class.
260 * stub-objc.c (objc_start_class_interface): Add a location
261 value for the position of the class name.
262
a5a11525
GA
2632020-11-12 Joseph Myers <joseph@codesourcery.com>
264
265 * c-lex.c (c_common_has_attribute): Take argument std_syntax.
266 Allow scope for C. Handle standard attributes for C. Do not
267 accept unscoped attributes if std_syntax and not handled as
268 standard attributes.
269 * c-common.h (c_common_has_attribute): Update prototype.
270
2712020-11-12 Nicholas Guriev <guriev-ns@ya.ru>
272
273 PR pch/86674
274 * c-pch.c (c_common_valid_pch): Use cpp_warning with CPP_W_INVALID_PCH
275 reason to fix -Werror=invalid-pch and -Wno-error=invalid-pch switches.
276
0f5f9ed5
GA
2772020-11-11 Patrick Palka <ppalka@redhat.com>
278
279 PR c++/88115
280 * c-opts.c (c_common_post_options): Update latest_abi_version.
281
bb622641
GA
2822020-11-10 Jakub Jelinek <jakub@redhat.com>
283
284 PR c/97748
285 * c-common.h (warn_if_unused_value): Add quiet argument defaulted
286 to false.
287 * c-warn.c (warn_if_unused_value): Likewise. Pass it down
288 recursively and just return true instead of warning if it is true.
289 Handle COMPLEX_EXPR.
290
2912020-11-10 Chung-Lin Tang <cltang@codesourcery.com>
292
293 * c-common.h (c_omp_adjust_map_clauses): New declaration.
294 * c-omp.c (struct map_clause): Helper type for c_omp_adjust_map_clauses.
295 (c_omp_adjust_map_clauses): New function.
296
2bee28dd
GA
2972020-11-09 Marek Polacek <polacek@redhat.com>
298
299 DR 1914
300 * c-common.c (attribute_fallthrough_p): Tweak the warning
301 message.
302
3032020-11-09 Patrick Palka <ppalka@redhat.com>
304
305 * c-pragma.c (handle_pragma_diagnostic): Split the
306 unknown-option -Wpragmas diagnostic into a warning and a
307 subsequent note containing a spelling suggestion. Avoid
308 computing the suggestion if -Wpragmas warnings are being
309 suppressed.
310
3112020-11-09 Patrick Palka <ppalka@redhat.com>
312
313 PR testsuite/97117
314 * c-indentation.c (get_visual_column): Remove location_t
315 parameter. Move the column-tracking diagnostic code from here
316 to ...
317 (should_warn_for_misleading_indentation): ... here, before the
318 early exit for when the loci are not all distinct. Don't pass a
319 location_t argument to get_visual_column.
320 (assert_get_visual_column_succeeds): Don't pass a location_t
321 argument to get_visual_column.
322 (assert_get_visual_column_fails): Likewise.
323
fb95de7a
GA
3242020-11-08 Iain Sandoe <iain@sandoe.co.uk>
325
326 * c-common.h (OBJC_IS_PATTR_KEYWORD): Add class to the list
327 of keywords accepted in @property attribute contexts.
328 * c-objc.h (enum objc_property_attribute_group): Add
329 OBJC_PROPATTR_GROUP_CLASS.
330 (enum objc_property_attribute_kind): Add
331 OBJC_PROPERTY_ATTR_CLASS.
332
2da7ee05
GA
3332020-11-07 Iain Sandoe <iain@sandoe.co.uk>
334
335 * c-common.c (c_common_reswords): Add 'atomic' property
336 attribute.
337 * c-common.h (enum rid): Add RID_PROPATOMIC for atomic
338 property attributes.
339
3402020-11-07 Iain Sandoe <iain@sandoe.co.uk>
341
342 * c-attribs.c (handle_nsobject_attribute): New.
343 * c.opt: Add WNSObject-attribute.
344
44cab2d8
GA
3452020-11-06 Iain Sandoe <iain@sandoe.co.uk>
346
347 * c-objc.h (enum objc_property_attribute_group): New
348 (enum objc_property_attribute_kind): New.
349 (OBJC_PROPATTR_GROUP_MASK): New.
350 (struct property_attribute_info): Small class encapsulating
351 parser output from property attributes.
352 (objc_prop_attr_kind_for_rid): New
353 (objc_add_property_declaration): Simplify interface.
354 * stub-objc.c (enum rid): Dummy type.
355 (objc_add_property_declaration): Simplify interface.
356 (objc_prop_attr_kind_for_rid): New.
357
3582020-11-06 Nathan Sidwell <nathan@acm.org>
359
360 * c-ada-spec.c (collect_ada_nodes): Rename
361 DECL_IS_BUILTIN->DECL_IS_UNDECLARED_BUILTIN.
362 (collect_ada_node): Likewise.
363 (dump_forward_type): Likewise.
364 * c-common.c (set_underlying_type): Rename
365 DECL_IS_BUILTIN->DECL_IS_UNDECLARED_BUILTIN.
366 (user_facing_original_type, c_common_finalize_early_debug): Likewise.
367
3682020-11-06 Jakub Jelinek <jakub@redhat.com>
369
370 * c-common.c (verify_sequence_points): Remove DEBUG_FUNCTION.
371
0cfd9109
GA
3722020-11-05 Marek Polacek <polacek@redhat.com>
373
374 PR c++/97675
375 * c.opt (Wexceptions): New option.
376
3772020-11-05 Marek Polacek <polacek@redhat.com>
378
379 PR c++/25814
380 * c.opt (Wvexing-parse): New option.
381
35c125cb
GA
3822020-11-04 Jakub Jelinek <jakub@redhat.com>
383
384 PR c++/97670
385 * c-omp.c (c_omp_split_clauses): Look through array reductions to find
386 underlying decl to clear in the allocate_head bitmap.
387
3882020-11-04 Iain Sandoe <iain@sandoe.co.uk>
389
390 * c-objc.h (objc_non_constant_expr_p): New.
391 * stub-objc.c (objc_non_constant_expr_p): New.
392
fd2325ea
GA
3932020-11-03 Nathan Sidwell <nathan@acm.org>
394
395 * c.opt (MQ,MT): Reword description to be make-agnostic.
396
88ce3d5f
GA
3972020-11-02 Nathan Sidwell <nathan@acm.org>
398
399 * c-opts.c (c_common_post_options): Move var decl to its
400 initialization point.
401
4022020-11-01 Iain Sandoe <iain@sandoe.co.uk>
403
404 * c-lex.c (c_lex_with_flags): When combining '@' with a
405 keyword for Objective-C, combine the location ranges too.
406
4072020-10-30 Qing Zhao <qing.zhao@oracle.com>
408 H.J.Lu <hjl.tools@gmail.com>
409
410 * c-attribs.c (c_common_attribute_table): Add new attribute
411 zero_call_used_regs.
412 (handle_zero_call_used_regs_attribute): New function.
413
e93aae4a
GA
4142020-10-28 Marek Polacek <polacek@redhat.com>
415
416 PR c++/97573
417 * c-opts.c (c_common_post_options): In C++20, turn on
418 -Wdeprecated-enum-enum-conversion and
419 -Wdeprecated-enum-float-conversion.
420 * c.opt (Wdeprecated-enum-enum-conversion,
421 Wdeprecated-enum-float-conversion): New options.
422 (Wenum-conversion): Allow for C++ too.
423
4242020-10-28 Jakub Jelinek <jakub@redhat.com>
425
426 * c-pragma.h (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_ALLOCATE.
427 * c-omp.c: Include bitmap.h.
428 (c_omp_split_clauses): Handle OMP_CLAUSE_ALLOCATE.
429
f19e7c8d
GA
4302020-10-26 Ville Voutilainen <ville.voutilainen@gmail.com>
431
432 * c-common.c (__is_nothrow_assignable): New.
433 (__is_nothrow_constructible): Likewise.
434 * c-common.h (RID_IS_NOTHROW_ASSIGNABLE): New.
435 (RID_IS_NOTHROW_CONSTRUCTIBLE): Likewise.
436
efe71fcc
GA
4372020-10-23 Jan Hubicka <hubicka@ucw.cz>
438
439 * c-common.c (c_common_finalize_early_debug): Update for new thunk api.
440
4412020-10-23 Marek Polacek <polacek@redhat.com>
442
443 PR c++/91741
444 * c-common.c (verify_tree): Handle PAREN_SIZEOF_EXPR.
445 (c_common_init_ts): Likewise.
446 * c-common.def (PAREN_SIZEOF_EXPR): New tree code.
447 * c-common.h (maybe_warn_sizeof_array_div): Declare.
448 * c-warn.c (sizeof_pointer_memaccess_warning): Unwrap NOP_EXPRs.
449 (maybe_warn_sizeof_array_div): New function.
450 * c.opt (Wsizeof-array-div): New option.
451
4522020-10-23 Martin Sebor <msebor@redhat.com>
453
454 PR c/97463
455 * c-warn.c (warn_parm_ptrarray_mismatch): Move null test earlier.
456
56ddd5e2
GA
4572020-10-22 Martin Liska <mliska@suse.cz>
458
459 PR c/94722
460 * c-attribs.c (handle_no_stack_protect_function_attribute): New.
461 (handle_stack_protect_attribute): Add error message for a
462 no_stack_protector function.
463
4642020-10-22 Martin Liska <mliska@suse.cz>
465
466 * c-cppbuiltin.c (c_cpp_builtins): Use the stack_protector enum.
467
4682020-10-22 Jan Hubicka <hubicka@ucw.cz>
469
470 * c-gimplify.c: Include tree-nested.h
471 (c_genericize): Update for new nested function info.
472
b2698c21
GA
4732020-10-14 Martin Sebor <msebor@redhat.com>
474
475 PR c/97413
476 * c-attribs.c (build_attr_access_from_parms): Wrap chain of VLA
477 bounds in an extra list.
478
7e9282ae
GA
4792020-10-05 Richard Biener <rguenther@suse.de>
480 Jakub Jelinek <jakub@redhat.com>
481
482 PR c++/97197
483 * c-pretty-print.c: Include langhooks.h.
484 (c_pretty_printer::postfix_expression): Handle TARGET_MEM_REF as
485 expression.
486 (c_pretty_printer::expression): Handle TARGET_MEM_REF as
487 unary_expression.
488 (c_pretty_printer::unary_expression): Handle TARGET_MEM_REF.
489
660bfe61
GA
4902020-09-30 Martin Sebor <msebor@redhat.com>
491
492 PR middle-end/97189
493 * c-attribs.c (append_access_attr): Use the function declaration
494 location for a warning about an attribute access argument.
495
93bca37c
GA
4962020-09-29 Marek Polacek <polacek@redhat.com>
497
498 PR c++/94695
499 * c.opt (Wrange-loop-construct): New option.
500
82b77dee
GA
5012020-09-23 Martin Sebor <msebor@redhat.com>
502
503 PR c/97131
504 * c-warn.c (warn_parm_ptrarray_mismatch): Handle more invalid input.
505
5062020-09-23 Marek Polacek <polacek@redhat.com>
507
508 PR c/97125
509 * c-gimplify.c (c_genericize): Only call do_warn_duplicated_branches_r
510 after loops and other structured control constructs have been lowered.
511
521d2711
GA
5122020-09-22 Jakub Jelinek <jakub@redhat.com>
513
514 * c.opt (Wbuiltin-declaration-mismatch): Fix typo in variable name:
515 warn_builtin_declaraion_mismatch -> warn_builtin_declaration_mismatch.
516
44135373
GA
5172020-09-21 Marek Polacek <polacek@redhat.com>
518
519 * c.opt (Wctad-maybe-unsupported): New option.
520
2fe5b7d1
GA
5212020-09-19 Martin Sebor <msebor@redhat.com>
522
523 PR c/50584
524 * c-common.h (warn_parm_array_mismatch): Declare new function.
525 (has_attribute): Move declaration of an existing function.
526 (build_attr_access_from_parms): Declare new function.
527 * c-warn.c (parm_array_as_string): Define new function.
528 (plus_one): Define new function.
529 (warn_parm_ptrarray_mismatch): Define new function.
530 (warn_parm_array_mismatch): Define new function.
531 (vla_bound_parm_decl): New function.
532 * c.opt (-Warray-parameter, -Wvla-parameter): New options.
533 * c-pretty-print.c (pp_c_type_qualifier_list): Don't print array type
534 qualifiers here...
535 (c_pretty_printer::direct_abstract_declarator): ...but instead print
536 them in brackets here. Also print [static]. Strip extraneous
537 expressions from VLA bounds.
538
5392020-09-19 Martin Sebor <msebor@redhat.com>
540
541 PR c/50584
542 * c-attribs.c (c_common_attribute_table): Add "arg spec" attribute.
543 (handle_argspec_attribute): New function.
544 (get_argument, get_argument_type): New functions.
545 (append_access_attrs): Add overload. Handle internal attribute
546 representation in addition to external.
547 (handle_access_attribute): Handle internal attribute representation
548 in addition to external.
549 (build_attr_access_from_parms): New function.
550
5512020-09-19 Sandra Loosemore <sandra@codesourcery.com>
552
553 * c-gimplify.c (genericize_c_loop): Rewrite to match
554 c_finish_loop in c-typeck.c.
555
5562020-09-19 Sandra Loosemore <sandra@codesourcery.com>
557
558 * c-common.c (c_block_may_fallthrough): New, split from
559 cxx_block_may_fallthrough in the cp front end.
560 (c_common_init_ts): Move handling of loop and switch-related
561 statements here from the cp front end.
562 * c-common.def (FOR_STMT, WHILE_STMT, DO_STMT): Move here from
563 cp front end.
564 (BREAK_STMT, CONTINUE_STMT, SWITCH_STMT): Likewise.
565 * c-common.h (c_block_may_fallthru): Declare.
566 (bc_state_t): Move here from cp front end.
567 (save_bc_state, restore_bc_state): Declare.
568 (c_genericize_control_stmt): Declare.
569 (WHILE_COND, WHILE_BODY): Likewise.
570 (DO_COND, DO_BODY): Likewise.
571 (FOR_INIT_STMT, FOR_COND, FOR_EXPR, FOR_BODY, FOR_SCOPE): Likewise.
572 (SWITCH_STMT_COND, SWITCH_STMT_BODY): Likewise.
573 (SWITCH_STMT_TYPE, SWITCH_STMT_SCOPE): Likewise.
574 (SWITCH_STMT_ALL_CASES_P, SWITCH_STMT_NO_BREAK_P): Likewise.
575 (LABEL_DECL_BREAK, LABEL_DECL_CONTINUE): Likewise.
576 * c-dump.c (dump_stmt): Copy from cp front end.
577 (c_dump_tree): Move code to handle structured loop and switch
578 tree nodes here from cp front end.
579 * c-gimplify.c: Adjust includes.
580 (enum bc_t, bc_label, begin_bc_block, finish_bc_block): Move from
581 cp front end.
582 (save_bc_state, restore_bc_state): New functions using old code
583 from cp front end.
584 (get_bc_label, expr_loc_or_loc): Move from cp front end.
585 (genericize_c_loop): Move from cp front end.
586 (genericize_for_stmt, genericize_while_stmt): Likewise.
587 (genericize_do_stmt, genericize_switch_stmt): Likewise.
588 (genericize_continue_stmt, genericize_break_stmt): Likewise.
589 (genericize_omp_for_stmt): Likewise.
590 (c_genericize_control_stmt): New function using code split from
591 cp front end.
592 (c_genericize_control_r): New.
593 (c_genericize): Call walk_tree with c_genericize_control_r.
594 * c-pretty-print.c (c_pretty_printer::statement): Move code to handle
595 structured loop and switch tree nodes here from cp front end.
596
2aad20c0
GA
5972020-09-17 Patrick Palka <ppalka@redhat.com>
598
599 PR c/80076
600 * c-indentation.c (should_warn_for_misleading_indentation): Move
601 declarations of local variables closer to their first use.
602 Handle virtual token locations by resolving them to their
603 respective macro expansion points. If all three tokens are
604 produced from the same macro expansion, then instead use their
605 loci within the macro definition.
606
ecde1b0a
GA
6072020-09-16 Martin Sebor <msebor@redhat.com>
608
609 PR c/78666
610 PR c/96126
611 * c-attribs.c (validate_attr_args): New function.
612 (validate_attr_arg): Same.
613 (handle_section_attribute): Call it. Introduce a local variable.
614 (handle_alloc_size_attribute): Same.
615 (handle_alloc_align_attribute): Same.
616
50a71cd0
GA
6172020-09-14 Jakub Jelinek <jakub@redhat.com>
618
619 * c-attribs.c (handle_optimize_attribute): Adjust
620 cl_optimization_save, cl_optimization_restore and
621 build_optimization_node callers.
622 * c-pragma.c (handle_pragma_optimize): Adjust
623 build_optimization_node caller.
624 (handle_pragma_push_options): Adjust
625 build_optimization_node and build_target_option_node callers.
626 (handle_pragma_pop_options, handle_pragma_reset_options):
627 Adjust cl_optimization_restore callers.
628
8f7ea26a
GA
6292020-08-28 Martin Sebor <msebor@redhat.com>
630
631 * c.opt (Wstringop-overread): New option.
632
a6493809
GA
6332020-08-11 Jakub Jelinek <jakub@redhat.com>
634
635 PR c/96545
636 * c-common.c (get_atomic_generic_size): Require that first argument's
637 type points to a complete type and use tree_fits_uhwi_p instead of
638 just INTEGER_CST TREE_CODE check for the TYPE_SIZE_UNIT.
639
48cc2e46
GA
6402020-07-31 Martin Sebor <msebor@redhat.com>
641
642 PR c++/96003
643 * c-common.c (check_function_arguments_recurse): Return early when
644 no-warning bit is set.
645
6462020-07-31 Richard Biener <rguenther@suse.de>
647
648 PR debug/96383
649 * c-common.h (c_common_finalize_early_debug): Declare.
650 * c-common.c: Include debug.h.
651 (c_common_finalize_early_debug): finalize_early_debug langhook
652 implementation generating debug for extern declarations.
653
e71dab87
GA
6542020-07-27 Nathan Sidwell <nathan@acm.org>
655
656 * c-common.c (try_to_locate_new_include_insertion_point): Use
657 strcmp, not pointer equality.
658
ae2e0bc1
GA
6592020-07-25 Martin Sebor <msebor@redhat.com>
660
661 PR c++/96310
662 * c-common.c (check_nonnull_arg): Print note only when warning was
663 issued.
664
3ea9abca
GA
6652020-07-22 Tobias Burnus <tobias@codesourcery.com>
666
667 * c-omp.c (c_finish_omp_critical): Check for no name but
668 nonzero hint provided.
669
0933f508
GA
6702020-07-20 Jason Merrill <jason@redhat.com>
671
672 * c-cppbuiltin.c (c_cpp_builtins): Update
673 __cpp_nontype_template_args for C++20.
674
6752020-07-20 Martin Sebor <msebor@redhat.com>
676
677 PR c/96249
678 * c.opt: Remove stray text.
679
8ca07a30
GA
6802020-07-14 Lewis Hyatt <lhyatt@gmail.com>
681
682 PR other/86904
683 * c-indentation.c (should_warn_for_misleading_indentation): Get
684 global tabstop from the new source.
685 * c-opts.c (c_common_handle_option): Remove handling of -ftabstop, which
686 is now a common option.
687 * c.opt: Likewise.
688
a82c4c4c 6892020-07-08 Eric Botcazou <ebotcazou@adacore.com>
50873cc5
GA
690
691 * c.opt (Wscalar-storage-order): Add explicit variable.
692
f60ee68d
GA
6932020-07-07 Nathan Sidwell <nathan@acm.org>
694
695 * c-opts.c (c_common_post_options): Add 'injecting' arg to
696 cpp_read_main_file.
697 (c_finish_options): Add linemap_line_start calls for builtin and cmd
698 maps. Force token position to line_table's highest line.
699 * c-ppoutput.c (print_line_1): Refactor, print line zero.
700 (cb_define): Always increment source line.
701
4077d74c
GA
7022020-07-06 Martin Sebor <msebor@redhat.com>
703
704 PR c++/95984
705 * c-common.c (check_function_nonnull): Avoid checking syntesized calls
706 to stub lambda objects with null this pointer.
707 (check_nonnull_arg): Handle C++ nullptr.
708
b5f24739
GA
7092020-07-02 Jason Merrill <jason@redhat.com>
710 Jakub Jelinek <jakub@redhat.com>
711
712 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_consteval.
713
46fbb6c6
GA
7142020-06-30 Jakub Jelinek <jakub@redhat.com>
715
716 PR c++/95963
717 * c-common.c (check_function_arguments_recurse): Don't crash on
718 calls to internal functions.
719
69273534
GA
7202020-06-28 Martin Sebor <msebor@redhat.com>
721
722 PR c++/86568
723 * c-common.c (struct nonnull_arg_ctx): Add members.
724 (check_function_nonnull): Use nonnull_arg_ctx as argument. Handle
725 C++ member functions specially. Consider the this pointer implicitly
726 nonnull.
727 (check_nonnull_arg): Use location of argument when available.
728 (check_function_arguments): Use nonnull_arg_ctx as argument.
729
9a33c41f
GA
7302020-06-27 Jakub Jelinek <jakub@redhat.com>
731
732 PR middle-end/95903
733 * c-common.c (pointer_int_sum): Use TYPE_OVERFLOW_UNDEFINED instead of
734 !TYPE_UNSIGNED check to see if we can apply distributive law and handle
735 smaller precision intop operands separately.
736
c9c05f73
GA
7372020-06-26 Marek Polacek <polacek@redhat.com>
738
739 * c-opts.c (c_common_init_options): Default to gnu++17.
740
aff95ee7
GA
7412020-06-17 Jonathan Wakely <jwakely@redhat.com>
742
bd0a89dc 743 PR c/95378
aff95ee7
GA
744 * c-common.c (get_atomic_generic_size): Check cv-qualifiers in
745 pointer arguments.
746
56638b9b
GA
7472020-06-16 Jakub Jelinek <jakub@redhat.com>
748
749 * c-common.h (c_omp_check_loop_iv_exprs): Add an int argument.
750 * c-omp.c (struct c_omp_check_loop_iv_data): Add maybe_nonrect and
751 idx members.
752 (c_omp_is_loop_iterator): New function.
753 (c_omp_check_loop_iv_r): Use it. Add support for silent scanning
754 if outer loop iterator is present. Perform duplicate checking through
755 hash_set in the function rather than expecting caller to do that.
756 Pass NULL instead of d->ppset to walk_tree_1.
757 (c_omp_check_nonrect_loop_iv): New function.
758 (c_omp_check_loop_iv): Use it. Fill in new members, allow
759 non-rectangular loop forms, diagnose multiple associated loops with
760 the same iterator. Pass NULL instead of &pset to walk_tree_1.
761 (c_omp_check_loop_iv_exprs): Likewise.
762
ec6ffbb9
GA
7632020-06-10 Martin Liska <mliska@suse.cz>
764
765 PR tree-optimization/92860
766 * c-attribs.c (handle_optimize_attribute):
767 Save global options and compare it after parsing of function
768 attribute.
769 * c-pragma.c (opt_stack::saved_global_options): New field.
770 (handle_pragma_push_options): Save global_options.
771 (handle_pragma_pop_options): Compare them after pop.
772
b952c2cf
GA
7732020-06-09 Jakub Jelinek <jakub@redhat.com>
774
775 PR c/95580
776 * c-pretty-print.c (c_pretty_printer::unary_expression): Handle the
777 case when MEM_REF's first argument has type pointer to incomplete type.
778
1a59f3db
GA
7792020-06-05 Jason Merrill <jason@redhat.com>
780
781 * c-pretty-print.c (pp_c_additive_expression): Handle negative
782 operand to POINTER_PLUS_EXPR.
783
3add3425
GA
7842020-06-04 Martin Sebor <msebor@redhat.com>
785
786 PR middle-end/10138
787 PR middle-end/95136
788 * c-attribs.c (append_access_attrs): Handle attr_access::none.
789 (handle_access_attribute): Same.
790
9a5b7438
GA
7912020-06-03 Mark Wielaard <mark@klomp.org>
792
793 * known-headers.cc (get_cp_stdlib_header_for_string_macro_name):
794 New function.
795 * known-headers.h (get_cp_stdlib_header_for_string_macro_name):
796 New function declaration.
797
7982020-06-03 Mark Wielaard <mark@klomp.org>
799
800 * known-headers.cc (get_string_macro_hint): New function.
801 (get_stdlib_header_for_name): Use get_string_macro_hint.
802 (get_c_stdlib_header_for_string_macro_name): New function.
803 * known-headers.h (get_c_stdlib_header_for_string_macro_name):
804 New function declaration.
805
8062020-06-03 Tobias Burnus <tobias@codesourcery.com>
807
808 * c-common.h (c_omp_predetermined_mapping): Declare.
809 * c-omp.c (c_omp_predetermined_mapping): New.
810
af114c38
MW
8112020-05-22 Mark Wielaard <mark@klomp.org>
812
813 * known-headers.cc (get_stdlib_header_for_name): Add a new
814 stdlib_hint array for stdbool and stdint.
815
45c50b6a
MW
8162020-05-22 Mark Wielaard <mark@klomp.org>
817
818 * known-headers.cc (get_stdlib_header_for_name): Return
819 "<stdbool.h>" for "bool", "true" or "false" when STDLIB_C and
820 flag_isoc99.
821
c22027a0
NS
8222020-05-20 Nathan Sidwell <nathan@acm.org>
823
38a4db21
NS
824 * c-common.c (try_to_locate_new_include_insertion_point): Revert change.
825
c22027a0
NS
826 * c-common.c (try_to_locate_new_include_insertion_point): Use
827 strcmp to compare filenames.
828 * c-lex.c (init_c_lex): Move declaration to initialization.
829 * c-opts.c (handle_deferred_opts): Move cpp_get_deps call into
830 deferred count loop.
831
29f0e90d
JM
8322020-05-15 Jason Merrill <jason@redhat.com>
833
834 * c-opts.c (set_std_cxx20): Set flag_coroutines.
835
b04445d4
JM
8362020-05-13 Jason Merrill <jason@redhat.com>
837
838 * c.opt (std=c++20): Make c++2a the alias.
839 (std=gnu++20): Likewise.
840 * c-common.h (cxx_dialect): Change cxx2a to cxx20.
841 * c-opts.c: Adjust.
842 * c-cppbuiltin.c: Adjust.
843 * c-ubsan.c: Adjust.
844 * c-warn.c: Adjust.
845
11dd3be5
EB
8462020-05-12 Eric Botcazou <ebotcazou@adacore.com>
847
848 * c-ada-spec.c (dump_ads): Output pragma Warnings ("U"); on entry.
849
b224c376
NS
8502020-05-08 Nathan Sidwell <nathan@acm.org>
851
852 Reimplement directives only processing.
853 * c-ppoutput.c (token_streamer): Ne.
854 (directives_only_cb): New. Swallow ...
855 (print_lines_directives_only): ... this.
856 (scan_translation_unit_directives_only): Reimplment using the
857 published interface.
858
f1d94677
MP
8592020-05-07 Marek Polacek <polacek@redhat.com>
860
861 * c-format.c (badwords): Add "nonstatic".
862
9b95bb52
JJ
863202-05-07 Jakub Jelinek <jakub@redhat.com>
864
865 PR c/94968
866 * c-common.c (speculation_safe_value_resolve_params): Return false if
867 error_operand_p (val2).
868 (resolve_overloaded_builtin) <case BUILT_IN_SPECULATION_SAFE_VALUE_N>:
869 Remove extraneous semicolon.
870
530b4409 8712020-05-06 qing zhao <qing.zhao@oracle.com>
872
873 PR c/94230
874 * c-indentation.c (get_visual_column): Add a hint to use the new
875 -flarge-source-files option.
876
b776bdca
SSF
8772020-05-05 Stefan Schulze Frielinghaus <stefansf@linux.ibm.com>
878
879 * c-attribs.c (handle_vector_size_attribute): Add attribute
880 nonnull for argument args in order to silence warning of
881 uninitialized variable usage. Since this is local to the
882 compilation unit and thus cannot be checked at call sides by the
883 compiler, added an assert statement in order to verify this.
884
6607bdd9
L
8852020-05-01 H.J. Lu <hongjiu.lu@intel.com>
886
887 PR target/93492
888 * c-attribs.c (handle_patchable_function_entry_attribute): Limit
889 value to USHRT_MAX (65535).
890
691eeb65
JJ
8912020-04-29 Jakub Jelinek <jakub@redhat.com>
892
893 * c-format.c (PP_FORMAT_CHAR_TABLE): Add %{ and %}.
894
26d76be7
JJ
8952020-04-27 Jakub Jelinek <jakub@redhat.com>
896
897 PR c/94755
898 * c-common.c (resolve_overloaded_builtin): Return error_mark_node for
899 fncode == BUILT_IN_NONE before initialization of first_param.
900
7291b2ed
MP
9012020-04-23 Marek Polacek <polacek@redhat.com>
902
903 PR c++/94733
904 * c-attribs.c (find_tm_attribute): Use get_attribute_name instead of
905 TREE_PURPOSE.
906
58a29af8
PP
9072020-04-14 Patrick Palka <ppalka@redhat.com>
908
909 PR c++/85278
910 * c-pretty-print.c (pp_c_pointer) <case REFERENCE_TYPE>: Print a double
911 ampersand if it's an rvalue reference type.
912
09f04139
MS
9132020-04-13 Martin Sebor <msebor@redhat.com>
914
915 PR c/92326
916 * c-pretty-print.c (c_pretty_printer::direct_abstract_declarator): Avoid
917 printing array bound for flexible array members.
918
ee26baf4
IS
9192020-04-13 Iain Sandoe <iain@sandoe.co.uk>
920
921 * c-cppbuiltin.c (c_cpp_builtins): Update coroutines builtin
922 define, per n4861.
923
75efe9cb
RB
9242020-04-02 Richard Biener <rguenther@suse.de>
925
926 PR c/94392
927 * c-opts.c (c_common_post_options): Enable -ffinite-loops
928 for -O2 and C++11 or newer.
929
75defde9
PP
9302020-03-28 Patrick Palka <ppalka@redhat.com>
931
932 * c.opt: Add -fconcepts-diagnostics-depth.
933
52f24a9e
MS
9342020-03-27 Martin Sebor <msebor@redhat.com>
935
936 PR c++/94346
937 * c-attribs.c (handle_copy_attribute): Avoid passing expressions
938 to decl_attributes. Make handling of different kinds of entities
939 more robust.
940
ccacf77b
MS
9412020-03-27 Martin Sebor <msebor@redhat.com>
942
943 PR c++/94098
944 * c-attribs.c (handle_access_attribute): Avoid setting TYPE_ATTRIBUTES
945 here.
946
ca6c7225
JJ
9472020-03-23 Jakub Jelinek <jakub@redhat.com>
948
949 PR c++/91993
950 * c-warn.c (warnings_for_convert_and_check): For expr and/or
951 result being COMPOUND_EXPRs, skip to ultimate rhs.
952
1aa22b19
RS
9532020-03-20 Richard Sandiford <richard.sandiford@arm.com>
954
955 PR middle-end/94072
956 * c-common.c (c_common_type_for_mode): Before using a registered
957 built-in type, check that the vectorness of the type matches
958 the vectorness of the mode.
959
700d4cb0
JJ
9602020-03-17 Jakub Jelinek <jakub@redhat.com>
961
962 * c-common.c (resolve_overloaded_builtin): Fix up duplicated word
963 issue in a diagnostic message.
964
b408e010
LH
9652020-03-15 Lewis Hyatt <lhyatt@gmail.com>
966
967 * c.opt: Avoid redundancy in the help text.
968
e78e50d5
MP
9692020-03-02 Marek Polacek <polacek@redhat.com>
970
971 PR c++/93958 - add missing -std=gnu++20.
972 * c.opt: Add -std=gnu++20.
973
649e1741
MS
9742020-03-01 Martin Sebor <msebor@redhat.com>
975
976 PR c++/92721
977 * c-attribs.c (append_access_attrs): Correctly handle attribute.
978 (handle_access_attribute): Same.
979
7b60f3ba
JJ
9802020-02-25 Jakub Jelinek <jakub@redhat.com>
981
982 PR c/93858
983 * c-pragma.c (handle_pragma_diagnostic): Add missing ? after
984 "did you mean" hint in diagnostics.
985
fb260504
JM
9862020-02-15 Jason Merrill <jason@redhat.com>
987
988 * c.opt: Add -std=c++20.
989
1d757b09
EB
9902020-02-14 Eric Botcazou <ebotcazou@adacore.com>
991
992 * c-ada-spec.c: Include bitmap.h.
993 (dump_ada_double_name): Rename into...
994 (dump_anonymous_type_name): ...this. Always use the TYPE_UID.
995 (dump_ada_array_type): Adjust to above renaming. Robustify.
996 (dump_nested_types_1): New function copied from... Add dumped_types
997 parameter and pass it down to dump_nested_type.
998 (dump_nested_types): ...this. Remove parent parameter. Just call
999 dump_nested_types_1 on an automatic bitmap.
1000 (dump_nested_type): Add dumped_types parameter.
1001 <ARRAY_TYPE>: Do not dump it if already present in dumped_types.
1002 Adjust recursive calls and adjust to above renaming.
1003 (dump_ada_declaration): Adjust call to dump_nested_types.
1004 Tidy up and adjust to above renaming.
1005 (dump_ada_specs): Initialize and release bitmap obstack.
1006
0cc575e4
MS
10072020-02-10 Martin Sebor <msebor@redhat.com>
1008
1009 PR c/93640
1010 * c-attribs.c (handle_access_attribute): Correct off-by-one mistakes.
1011
a59aa302
JJ
10122020-02-10 Jakub Jelinek <jakub@redhat.com>
1013
1014 PR other/93641
1015 * c-format.c (check_plain): Fix up last argument of strncasecmp.
1016 Remove useless extra test.
1017
e464fc90
TB
10182020-02-03 Julian Brown <julian@codesourcery.com>
1019 Tobias Burnus <tobias@codesourcery.com>
1020
1021 * c-cppbuiltin.c (c_cpp_builtins): Update _OPENACC define to 201711.
1022
e3b6c052
JM
10232020-01-29 Jason Merrill <jason@redhat.com>
1024
1025 PR c++/89357
1026 * c-attribs.c (check_cxx_fundamental_alignment_constraints): Remove.
1027
6d00f052
JM
10282020-01-23 Jason Merrill <jason@redhat.com>
1029
1030 * c-warn.c (conversion_warning): Change -Wsign-conversion handling.
1031
8a990ffa
MS
10322020-01-23 Martin Sebor <msebor@redhat.com>
1033
1034 PR c/84919
1035 * c-common.c (check_function_arguments): Avoid overlap checking
1036 of sprintf functions.
1037
55b7df8b
JM
10382020-01-22 Jason Merrill <jason@redhat.com>
1039
1040 PR testsuite/93391 - PR 40752 test fails with unsigned plain char.
1041 PR c++/40752
1042 * c-warn.c (conversion_warning): Check operands only after checking
1043 the whole expression. Don't check second operand of + for sign.
1044
c77074d0
JM
10452020-01-21 Jason Merrill <jason@redhat.com>
1046 Manuel López-Ibáñez <manu@gcc.gnu.org>
1047
1048 PR c++/40752 - useless -Wconversion with short +=.
1049 * c.opt (-Warith-conversion): New.
1050 * c-warn.c (conversion_warning): Recurse for operands of
1051 operators. Only warn about the whole expression with
1052 -Warith-conversion.
1053
731dbfc3
JM
10542020-01-21 Jason Merrill <jason@redhat.com>
1055
1056 * c-common.c (unsafe_conversion_p): Don't warn, return UNSAFE_SIGN.
1057 * c-warn.c (conversion_warning): Warn about UNSAFE_SIGN.
1058
ad1a3914
NS
10592020-01-20 Nathan Sidwell <nathan@acm.org>
1060
1061 PR preprocessor/80005
1062 * c-cppbuiltins.c (c_cpp_builtins): Don't define __has_include{,_next}.
1063
49789fd0
IS
10642020-01-18 Iain Sandoe <iain@sandoe.co.uk>
1065
1066 * c-common.c (co_await, co_yield, co_return): New.
1067 * c-common.h (RID_CO_AWAIT, RID_CO_YIELD,
1068 RID_CO_RETURN): New enumeration values.
1069 (D_CXX_COROUTINES): Bit to identify coroutines are active.
1070 (D_CXX_COROUTINES_FLAGS): Guard for coroutine keywords.
1071 * c-cppbuiltin.c (__cpp_coroutines): New cpp define.
1072 * c.opt (fcoroutines): New command-line switch.
1073
4bc1899b
DM
10742020-01-10 David Malcolm <dmalcolm@redhat.com>
1075
1076 * c-format.c (local_event_ptr_node): New.
1077 (PP_FORMAT_CHAR_TABLE): Add entry for "%@".
1078 (init_dynamic_diag_info): Initialize local_event_ptr_node.
1079 * c-format.h (T_EVENT_PTR): New define.
1080
f25e33fa
MS
10812020-01-10 Martin Sebor <msebor@redhat.com>
1082
1083 PR c/93132
1084 * c-attribs.c (append_access_attrs): Validate against the translated
1085 access string rather than the human-readable representation.
1086
8d9254fc
JJ
10872020-01-01 Jakub Jelinek <jakub@redhat.com>
1088
1089 Update copyright years.
1090
39292e25
EB
10912019-12-20 Eric Botcazou <ebotcazou@adacore.com>
1092
1093 * c-ada-spec.h (decl_sloc): Delete.
1094 * c-ada-spec.c (decl_sloc): Make static.
1095
519d7496
JB
10962019-12-19 Julian Brown <julian@codesourcery.com>
1097
1098 * c-common.h (c_omp_map_clause_name): Add prototype.
1099 * c-omp.c (c_omp_map_clause_name): New function.
1100 * c-pragma.h (pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_ATTACH and
1101 PRAGMA_OACC_CLAUSE_DETACH.
1102
a6163563
JB
11032019-12-19 Julian Brown <julian@codesourcery.com>
1104 Maciej W. Rozycki <macro@codesourcery.com>
1105 Tobias Burnus <tobias@codesourcery.com>
1106 Thomas Schwinge <thomas@codesourcery.com>
1107
1108 * c-pragma.h (pragma_omp_clause): Add
1109 PRAGMA_OACC_CLAUSE_NO_CREATE.
1110
e8f1ade2
MS
11112019-12-17 Martin Sebor <msebor@redhat.com>
1112
1113 PR c++/61339
1114 * c.opt (-Wmismatched-tags, -Wredundant-tags): New options.
1115
368877a1
DM
11162019-12-11 David Malcolm <dmalcolm@redhat.com>
1117
1118 * c-pretty-print.c (c_pretty_printer::clone): New vfunc
1119 implementation.
1120 * c-pretty-print.h (c_pretty_printer::clone): New vfunc decl.
1121
d68f5d45
DM
11222019-12-09 David Malcolm <dmalcolm@redhat.com>
1123
1124 * c-format.c (range_label_for_format_type_mismatch::get_text):
1125 Replace label_text ctor called with true with label_text::take.
1126
d3e28653
DM
11272019-12-09 David Malcolm <dmalcolm@redhat.com>
1128
1129 * c-format.c (selftest::test_type_mismatch_range_labels): Remove
1130 initial newline from expected outputs.
1131 * c-opts.c (c_diagnostic_finalizer): Add pp_newline call before
1132 call to diagnostic_show_locus.
1133
abd6d8cc
JJ
11342019-12-06 Jakub Jelinek <jakub@redhat.com>
1135
1136 * c-cppbuiltin.c (c_cpp_builtins): Don't define __cpp_consteval for
1137 now.
1138
7906797e
MP
11392019-12-05 Marek Polacek <polacek@redhat.com>
1140 Jakub Jelinek <jakub@redhat.com>
1141
1142 PR c++/91353 - P1331R2: Allow trivial default init in constexpr contexts.
1143 * c-cppbuiltin.c (c_cpp_builtins): Adjust the value of __cpp_constexpr.
1144
5c04da88
MP
11452019-12-05 Marek Polacek <polacek@redhat.com>
1146
1147 PR c++/92271 - make __is_same alias for __is_same_as.
1148 * c-common.c: Add __is_same, an alias for __is_same_as.
1149
43aae289
MP
11502019-12-03 Marek Polacek <polacek@redhat.com>
1151
1152 PR c++/91363 - P0960R3: Parenthesized initialization of aggregates.
1153 * c-cppbuiltin.c (c_cpp_builtins): Predefine
1154 __cpp_aggregate_paren_init=201902 for -std=c++2a.
1155
d7ddfbcb
JH
11562019-11-30 Jan Hubicka <hubicka@ucw.cz>
1157
1158 * c-attribs.c (handle_symver_attribute): New function
1159 (c_common_attributes): Add symver.
1160
65ef05d0
RS
11612019-11-30 Richard Sandiford <richard.sandiford@arm.com>
1162
1163 * c-common.c (pointer_int_sum): Use verify_type_context to check
1164 whether the target allows pointer arithmetic for the types involved.
1165 (c_sizeof_or_alignof_type, c_alignof_expr): Use verify_type_context
1166 to check whether the target allows sizeof and alignof operations
1167 for the types involved.
1168
1a291106
JM
11692019-11-27 Jason Merrill <jason@redhat.com>
1170
1171 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_deduction_guides.
1172
05d6cb1a
JJ
11732019-11-26 Jakub Jelinek <jakub@redhat.com>
1174
1175 PR c++/61414
1176 * c-attribs.c (handle_mode_attribute): Add mode attribute to
1177 ENUMERAL_TYPEs.
1178
5b8d9367
JM
11792019-11-25 Joseph Myers <joseph@codesourcery.com>
1180
1181 PR c/91985
1182 * c-common.c (c_common_type_for_mode): Handle decimal
1183 floating-point types being NULL_TREE.
1184 * c-format.c (get_format_for_type_1): Handle specified types being
1185 NULL_TREE.
1186 * c-lex.c (interpret_float): Give an error for decimal
1187 floating-point constants when decimal floating-point not
1188 supported.
1189
1fbf51cb
JJ
11902019-11-23 Jakub Jelinek <jakub@redhat.com>
1191
1192 PR middle-end/83859
1193 * c-attribs.c (append_access_attrs): Avoid buffer overflow. Avoid
1194 memory leak. Use XNEWVEC macro. Use auto_diagnostic_group to
1195 group warning with inform together.
1196 (handle_access_attribute): Formatting fix.
1197
761df906
JJ
11982019-11-22 Jakub Jelinek <jakub@redhat.com>
1199
bdaf8be1
JJ
1200 PR c/90677
1201 * c-common.h (identifier_global_tag): Declare.
1202 * c-format.c (get_pointer_to_named_type): Renamed to ...
1203 (get_named_type): ... this. Use identifier_global_tag instead of
1204 identifier_global_value, handle the return value being a TYPE_P.
1205 (init_dynamic_diag_info): Adjust get_pointer_to_named_type callers
1206 to call get_named_type instead. Formatting fixes.
1207
c2ecce6d 1208 Implement P1902R1, Missing feature-test macros 2017-2019.
761df906
JJ
1209 * c-cppbuiltin.c (c_cpp_builtins): Bump __cpp_init_captures
1210 and __cpp_generic_lambdas for -std=c++2a. Define
1211 __cpp_designated_initializers, __cpp_constexpr_in_decltype and
1212 __cpp_consteval for -std=c++2a. Remove a FIXME comment about
1213 __cpp_concepts for -std=c++2a.
1214
54aa6b58
MS
12152019-11-22 Martin Sebor <msebor@redhat.com>
1216
1217 PR middle-end/83859
1218 * c-attribs.c (handle_access_attribute): New function.
1219 (c_common_attribute_table): Add new attribute.
1220 (get_argument_type): New function.
1221 (append_access_attrs): New function.
1222 (get_nonnull_operand): Rename...
1223 (get_attribute_operand): ...to this.
1224 * c-common.c (get_nonnull_operand): Rename...
1225 (get_attribute_operand): ...to this.
1226
6c80b1b5
JM
12272019-11-21 Joseph Myers <joseph@codesourcery.com>
1228
1229 * c-attribs.c (handle_fallthrough_attribute): Use pedwarn instead
1230 of warning.
1231
192961ff
JM
12322019-11-19 Joseph Myers <joseph@codesourcery.com>
1233
1234 * c-common.c (attribute_fallthrough_p): In C, use pedwarn not
1235 warning for standard attributes mixed with fallthrough attributes.
1236
f8aea5e3
JM
12372019-11-15 Joseph Myers <joseph@codesourcery.com>
1238
1239 * c-attribs.c (handle_fallthrough_attribute): Remove static.
1240 * c-common.h (handle_fallthrough_attribute): Declare.
1241
2cc94aa8
JM
12422019-11-15 Joseph Myers <joseph@codesourcery.com>
1243
1244 * c-attribs.c (handle_deprecated_attribute): Remove static.
1245 * c-common.h (handle_deprecated_attribute): Declare.
1246
7c5890cc
JM
12472019-11-14 Joseph Myers <joseph@codesourcery.com>
1248
1249 * c-lex.c (lex_charconst): Make CPP_UTF8CHAR constants unsigned
1250 char for C.
1251
b2417b59
JJ
12522019-11-14 Jakub Jelinek <jakub@redhat.com>
1253
d0ec7c93
JJ
1254 * c-omp.c (c_omp_check_context_selector): Add nvidia to the list of
1255 valid vendors.
1256
b2417b59
JJ
1257 * c-omp.c (c_omp_check_context_selector): Handle name lists
1258 containing string literals. Don't diagnose atomic_default_mem_order
1259 with multiple props.
1260
00be2a5f
JM
12612019-11-13 Joseph Myers <joseph@codesourcery.com>
1262
1263 * c-cppbuiltin.c (builtin_define_float_constants): Also define
1264 NORM_MAX constants. Update call to get_max_float.
1265 (LAZY_HEX_FP_VALUES_CNT): Update value to include NORM_MAX
1266 constants.
1267
2dbad62d
EB
12682019-11-13 Eric Botcazou <ebotcazou@adacore.com>
1269
1270 * c-ada-spec.c (get_underlying_decl): Do not look through typedefs.
1271 (dump_forward_type): Do not generate a declaration for function types.
1272 (dump_nested_type) <ARRAY_TYPE>: Do not generate a nested declaration
1273 of the component type if it is declared in another file.
1274
6ed76044
ML
12752019-11-12 Martin Liska <mliska@suse.cz>
1276
1277 * c-opts.c (c_common_post_options):
1278 Use SET_OPTION_IF_UNSET.
1279
62aee289
MR
12802019-11-12 Maciej W. Rozycki <macro@codesourcery.com>
1281 Frederik Harwath <frederik@codesourcery.com>
1282
1283 gcc/c-family/
1284 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_SERIAL enumeration
1285 constant.
1286 * c-pragma.c (oacc_pragmas): Add "serial" entry.
1287
f486280c
RS
12882019-11-08 Richard Sandiford <richard.sandiford@arm.com>
1289
1290 * c-common.h (gnu_vector_type_p): New function.
1291 * c-common.c (c_build_vec_perm_expr): Require __builtin_shuffle
1292 vectors to satisfy gnu_vector_type_p.
1293 (c_build_vec_convert): Likewise __builtin_convertvector.
1294 (convert_vector_to_array_for_subscript): Likewise when applying
1295 implicit vector to array conversion.
1296 (scalar_to_vector): Likewise when converting vector-scalar
1297 operations to vector-vector operations.
1298
017c6491
JM
12992019-11-08 Joseph Myers <joseph@codesourcery.com>
1300
1301 * c.opt (Wold-style-definition): Initialize to -1.
1302 * c-opts.c (c_common_post_options): Set warn_old_style_definition
1303 to flag_isoc2x if not set explicitly.
1304
c01bd174
JM
13052019-11-07 Joseph Myers <joseph@codesourcery.com>
1306
1307 * c-attribs.c (parse_tm_stmt_attr): Handle scoped attributes.
1308
0df65305
JM
13092019-11-05 Jason Merrill <jason@redhat.com>
1310
1311 * c-opts.c (c_common_post_options): -fconcepts-ts implies
1312 -fconcepts.
1313
e0c866dd
KK
13142019-11-04 Kamlesh Kumar <kamleshbhalui@gmail.com>
1315
1316 * c-opts.c (c_common_post_options): Update
1317 latest_abi_version.
1318
f968ef9b
JJ
13192019-11-02 Jakub Jelinek <jakub@redhat.com>
1320
d0c464d2
JJ
1321 * c-common.h (c_omp_get_context_selector): Remove.
1322 * c-omp.c (c_omp_get_context_selector): Moved to omp-general.c
1323 and renamed to omp_get_context_selector.
1324
917dd789
JJ
1325 * c-omp.c (c_omp_mark_declare_variant): Use
1326 omp_context_selector_set_compare.
1327
f968ef9b
JJ
1328 PR c++/88335 - Implement P1073R3: Immediate functions
1329 * c-common.h (enum rid): Add RID_CONSTEVAL.
1330 * c-common.c (c_common_reswords): Add consteval.
1331
5f6705b7
JJ
13322019-11-01 Martin Sebor <msebor@redhat.com>
1333
1334 PR middle-end/91679
1335 PR middle-end/91647
1336 PR middle-end/91463
1337 PR middle-end/92312
1338 * c-pretty-print.c (direct_abstract_declarator): Print
1339 bound in zero-length arrays.
1340 * c.opt (-Wzero-length-bounds): New option.
1341
43f1814c
NS
13422019-10-30 Nathan Sidwell <nathan@acm.org>
1343
1344 * c-cppbuiltin.c (c_cpp_builtins): Add 'L' suffix to feature
1345 macros.
1346
ad1539d5
MS
13472019-10-28 Martin Sebor <msebor@redhat.com>
1348
1349 PR c/66970
1350 * c-common.c (c_common_nodes_and_builtins): Call c_define_builtins
1351 even when only preprocessing.
1352 * c-common.h (names_builtin_p): Declare new function.
1353 * c-lex.c (init_c_lex): Set has_builtin.
1354 (c_common_has_builtin): Define a new function.
1355 * c-ppoutput.c (init_pp_output): Set has_builtin.
1356
135df52c
JJ
13572019-10-24 Jakub Jelinek <jakub@redhat.com>
1358
1359 * c-common.h (c_omp_context_selector_matches): Remove.
1360 * c-omp.c (c_omp_context_selector_matches): Remove.
1361 * c-attribs.c (c_common_attribute_table): Add
1362 "omp declare target {host,nohost,block}" attributes.
1363
8ad0c477
JM
13642019-10-17 JeanHeyd Meneide <phdofthehouse@gmail.com>
1365
1366 * c-lex.c (c_common_has_attribute): Update nodiscard value.
1367
56898e43
RS
13682019-10-14 Richard Sandiford <richard.sandiford@arm.com>
1369
1370 * c-common.h (user_facing_original_type_p): Declare.
1371 * c-common.c: Include c-spellcheck.h.
1372 (user_facing_original_type_p): New function.
1373
20de9568
JJ
13742019-10-12 Jakub Jelinek <jakub@redhat.com>
1375
1376 * c-common.h (c_omp_mark_declare_variant,
1377 c_omp_context_selector_matches): Declare.
1378 * c-omp.c: Include attribs.h, gimplify.h, cgraph.h, symbol-summary.h
1379 and hsa-common.h.
1380 (c_omp_get_context_selector): Support second argument NULL.
1381 (c_omp_mark_declare_variant, c_omp_context_selector_matches): New
1382 functions.
1383 * c-attribs.c (c_common_attribute_table): Remove "omp declare variant"
1384 attribute, add "omp declare variant base" and
1385 "omp declare variant variant" attributes.
1386
175a85b2
JM
13872019-10-11 Joseph Myers <joseph@codesourcery.com>
1388
1389 * c.opt (Wc11-c2x-compat): Add CPP(cpp_warn_c11_c2x_compat)
1390 CppReason(CPP_W_C11_C2X_COMPAT).
1391
fe2bc27c
JM
13922019-10-11 Joseph Myers <joseph@codesourcery.com>
1393
1394 * c-common.c (c_common_reswords): Do not use D_EXT for _Decimal32,
1395 _Decimal64 and _Decimal128.
1396
27dfdc0f
JM
13972019-10-10 Joseph Myers <joseph@codesourcery.com>
1398
1399 * c-cppbuiltin.c (c_cpp_builtins): Do not define macros for DFP
1400 types if DFP not supported.
1401
94e7f906
JJ
14022019-10-10 Jakub Jelinek <jakub@redhat.com>
1403
1404 * c-common.h (c_omp_check_context_selector,
1405 c_omp_get_context_selector): Declare.
1406 * c-omp.c (c_omp_declare_simd_clauses_to_numbers): Fix spelling
1407 in diagnostic message.
1408 (c_omp_check_context_selector, c_omp_get_context_selector): New
1409 functions.
1410 * c-attribs.c (c_common_attribute_table): Add "omp declare variant"
1411 attribute.
1412 (handle_omp_declare_variant_attribute): New function.
1413
a7160771
MS
14142019-10-09 Martin Sebor <msebor@redhat.com>
1415
1416 PR tree-optimization/90879
1417 * c.opt (-Wstring-compare): New option.
1418
cb57504a
JM
14192019-10-08 Andrew Sutton <asutton@lock3software.com>
1420 Jason Merrill <jason@redhat.com>
1421
1422 Update the concepts implementation to conform to the C++20
1423 specification, improve compile times, and generally clean up
1424 the implementation.
1425
1426 * c-cppbuiltin.c (c_cpp_builtins): Use new feature test values for
1427 concepts when -std=c++2a. Bump __cpp_concepts to 201907.
1428 * c.opt: Add -Wconcepts-ts.
1429 * c-opts.c (c_common_post_options): Warn when -fconcepts is used
1430 with -std=c++2a. Disable warning for -fconcepts in C++20 mode.
1431 (set_std_cxx2a): Enable concepts by default.
1432
fbb2a6dc
JM
14332019-10-08 Joseph Myers <joseph@codesourcery.com>
1434
1435 * c-opts.c (c_common_post_options): Set
1436 -fno-fp-int-builtin-inexact for C2X.
1437
8e007055
JJ
14382019-10-05 Jakub Jelinek <jakub@redhat.com>
1439
1440 PR c++/91369 - Implement P0784R7: constexpr new
1441 * c-cppbuiltin.c (c_cpp_builtins): Predefine
1442 __cpp_constexpr_dynamic_alloc=201907 for -std=c++2a.
1443
843f104d
JM
14442019-10-04 Joseph Myers <joseph@codesourcery.com>
1445
1446 PR c/82752
1447 * c-format.c (C_STD_VER): Handle C2x.
1448 (C_STD_NAME): Likewise.
1449 (strftime_flag_specs): Add 'O' modifier with 'p' flag.
1450 (time_char_table): Use separate entry for 'B' and 'b', with 'O'
1451 modifier allowed and 'p' flag.
1452 * c-format.h (enum format_std_version): Add STD_C2X.
1453 (struct format_char_info): Mention 'p' in comment on flags2.
1454
e9c9a142
DM
14552019-10-01 David Malcolm <dmalcolm@redhat.com>
1456
1457 * c-opts.c (c_diagnostic_finalizer): Temporarily clear prefix when
1458 calling diagnostic_show_locus, rather than destroying it afterwards.
1459
7552c36a
JJ
14602019-10-01 Jakub Jelinek <jakub@redhat.com>
1461
1462 PR c++/91925
1463 * c-warn.c (check_alignment_of_packed_member): Ignore FIELD_DECLs
1464 with NULL DECL_FIELD_OFFSET.
1465
8209db25
RS
14662019-10-01 Richard Sandiford <richard.sandiford@arm.com>
1467
1468 * c-pretty-print.c (pp_c_specifier_qualifier_list): If a vector type
1469 has a type name, use it in preference to the __vector syntax.
1470
9343bf99
RS
14712019-09-30 Richard Sandiford <richard.sandiford@arm.com>
1472
1473 * c-pretty-print.c (pp_c_parameter_type_list): Avoid printing
1474 two spaces between a comma and "...".
1475
59bc434a
JJ
14762019-09-27 Jakub Jelinek <jakub@redhat.com>
1477
1478 PR c++/88203
1479 * c-common.h (c_omp_predefined_variable): Declare.
1480 * c-omp.c (c_omp_predefined_variable): New function.
1481 (c_omp_predetermined_sharing): Return OMP_CLAUSE_DEFAULT_SHARED
1482 for predefined variables.
1483
c6447c20
RS
14842019-09-27 Richard Sandiford <richard.sandiford@arm.com>
1485
1486 * c-common.h (build_function_call_vec): Take the original
1487 function decl as an optional final parameter.
1488 (check_builtin_function_arguments): Take the original function decl.
1489 * c-common.c (check_builtin_function_arguments): Likewise.
1490 Handle all built-in functions, not just BUILT_IN_NORMAL ones.
1491 Use targetm.check_builtin_call to check BUILT_IN_MD functions.
1492
c4438114
JM
14932019-09-15 Jason Merrill <jason@redhat.com>
1494
1495 * c-warn.c (warn_logical_operator): Strip location wrappers. Don't
1496 fold_for_warn in "|| mask" warning.
1497
68a57628
ML
14982019-09-10 Martin Liska <mliska@suse.cz>
1499
1500 * c.opt: Use newly added WarnRemoved.
1501
f48ef52e
ML
15022019-09-09 Martin Liska <mliska@suse.cz>
1503
1504 * c.opt: Update comment of removed
1505 options that are preserved only for backward
1506 compatibility.
1507
67f6e649
ML
15082019-09-06 Martin Liska <mliska@suse.cz>
1509
1510 PR c++/91125
1511 * c-common.c: Remove definition of flag_use_repository.
1512 * c-common.h: Likewise.
1513 * c-opts.c (c_common_handle_option):
1514 Do not handle OPT_frepo option.
1515 * c.opt: Mark the option with Deprecated.
1516
db9d2274
MP
15172019-09-04 Marek Polacek <polacek@redhat.com>
1518
1519 * c.opt (fdeduce-init-list): Ignored.
1520
68e2c199
PK
15212019-09-04 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1522
1523 PR c/78736
1524 * c.opt (Wenum-conversion): New option.
1525
7a4418a5
JL
15262019-09-03 Jozef Lawrynowicz <jozef.l@mittosystems.com>
1527
1528 * c-attribs.c (handle_section_attribute): Call the
1529 handle_generic_attribute target hook after performing target
1530 independent processing.
1531 (handle_noinit_attribute): Likewise.
1532
5f76ab15
ILT
15332019-09-03 Ian Lance Taylor <iant@golang.org>
1534
1535 * c-cppbuiltin.c (builtin_define_with_hex_fp_value): Always expand
1536 when using -fgo-dump-spec.
1537
ae0d3f6a
ML
15382019-09-02 Martin Liska <mliska@suse.cz>
1539
1540 PR c++/91155
1541 * c-common.c (fname_as_string): Use cxx_printable_name for
1542 __PRETTY_FUNCTION__ same as was used before r265711.
1543
8a902edb
MP
15442019-08-28 Marek Polacek <polacek@redhat.com>
1545
1546 Implement P1152R4: Deprecating some uses of volatile.
1547 PR c++/91361
1548 * c-opts.c (c_common_post_options): Enable -Wvolatile by
1549 default for C++2a, unless -Wno-deprecated.
1550 * c.opt (Wvolatile): New warning.
1551
4742dbe7
MP
15522019-08-28 Marek Polacek <polacek@redhat.com>
1553
1554 PR c++/91360 - Implement C++20 P1143R2: constinit.
1555 * c-common.c (c_common_reswords): Add constinit and __constinit.
1556 (keyword_is_decl_specifier): Handle RID_CONSTINIT.
1557 * c-common.h (enum rid): Add RID_CONSTINIT, RID_FIRST_CXX20, and
1558 RID_LAST_CXX20.
1559 (D_CXX20): Define.
1560 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_constinit.
1561 * c-format.c (cxx_keywords): Add "constinit".
1562 * c.opt (Wc++2a-compat, Wc++20-compat): New options.
1563
6a074892
JJ
15642019-08-27 Jakub Jelinek <jakub@redhat.com>
1565
1566 PR c++/91415
1567 * c-common.c (verify_tree): For LSHIFT_EXPR, RSHIFT_EXPR,
1568 COMPONENT_REF and ARRAY_REF in cxx_dialect >= cxx17 mode handle it
1569 like COMPOUND_EXPR rather than normal expression.
1570
22f8849d
IS
15712019-08-23 Iain Sandoe <iain@sandoe.co.uk>
1572
1573 PR pch/61250
1574 * c-lex.c (c_lex_with_flags): Don't call
1575 c_common_no_more_pch () from here.
1576
df375b03
JJ
15772019-08-23 Jakub Jelinek <jakub@redhat.com>
1578
1579 PR middle-end/91283
1580 * c-common.c (c_ts18661_flt_eval_method): Use flag_excess_precision
1581 instead of flag_excess_precision_cmdline.
1582 * c-cppbuiltin.c (c_cpp_flt_eval_method_iec_559): Likewise.
1583 * c-opts.c (c_common_post_options): Likewise.
1584
14b7950f
MS
15852019-08-22 Martin Sebor <msebor@redhat.com>
1586
1587 PR middle-end/91490
1588 * c-common.c (braced_list_to_string): Add argument and overload.
1589 Handle flexible length arrays and unions.
1590
8bb2ee59
EB
15912019-08-21 Eric Botcazou <ebotcazou@adacore.com>
1592
1593 * c-ada-spec.c (dump_ada_function_declaration): Be prepared for broken
1594 function declarations where arguments are missing. Rename variables.
1595
21c1e205
RB
15962019-08-15 Richard Biener <rguenther@suse.de>
1597
1598 * c-common.c (c_stddef_cpp_builtins): When the GIMPLE FE is
1599 enabled, define __SIZETYPE__.
1600
f0033821
CL
16012019-08-14 Christophe Lyon <christophe.lyon@linaro.org>
1602
1603 * c-attribs.c (c_common_attribute_table): Add "noinit" entry. Add
1604 exclusion with "section" attribute.
1605 (attr_noinit_exclusions): New table.
1606 (handle_noinit_attribute): New function.
1607
4d732405
RS
16082019-08-13 Richard Sandiford <richard.sandiford@arm.com>
1609
1610 PR middle-end/91421
1611 * c-common.c (resolve_overloaded_builtin): Use
1612 copy_decl_built_in_function.
1613
51ad8481
MS
16142019-08-13 Martin Sebor <msebor@redhat.com>
1615
1616 PR c/80619
1617 * c-format.c (printf_length_specs): Set FMT_LEN_w for "w".
1618 (asm_fprintf_length_spec): Same.
1619 * c-format.h (format_lengths): Add FMT_LEN_w.
1620
77eb117f
JJ
16212019-08-10 Jakub Jelinek <jakub@redhat.com>
1622
1623 * c-pragma.h (enum pragma_omp_clause): Add
1624 PRAGMA_OMP_CLAUSE_DEVICE_TYPE.
1625
398e3feb
JJ
16262019-08-07 Jakub Jelinek <jakub@redhat.com>
1627
1628 * c-pragma.h (enum pragma_omp_clause): Add
1629 PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR. Set PRAGMA_OACC_CLAUSE_USE_DEVICE
1630 equal to PRAGMA_OMP_CLAUSE_USE_DEVICE_PTR instead of being a separate
1631 enumeration value.
1632
ab574db6
MP
16332019-08-05 Marek Polacek <polacek@redhat.com>
1634
1635 PR c++/91338 - Implement P1161R3: Deprecate a[b,c].
1636 * c-opts.c (c_common_post_options): Enable -Wcomma-subscript by
1637 default for C++2a, unless -Wno-deprecated.
1638 * c.opt (Wcomma-subscript): New warning.
1639
554a530f
JJ
16402019-07-20 Jakub Jelinek <jakub@redhat.com>
1641
1642 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_LOOP.
1643 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_BIND.
1644 * c-pragma.c (omp_pragmas_simd): Add PRAGMA_OMP_LOOP entry.
1645 * c-common.h (enum c_omp_clause_split): Add C_OMP_CLAUSE_SPLIT_LOOP.
1646 * c-omp.c (c_omp_split_clauses): Add support for 4 new combined
1647 constructs with the loop construct.
1648
1a888209
JJ
16492019-07-13 Jakub Jelinek <jakub@redhat.com>
1650
1651 PR c/91149
1652 * c-omp.c (c_omp_split_clauses): Fix a pasto in
1653 OMP_CLAUSE_REDUCTION_TASK handling.
1654
1fdd6f04
JJ
16552019-07-12 Jakub Jelinek <jakub@redhat.com>
1656
1657 * c-pragma.h (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_ORDER.
1658 * c-omp.c (c_omp_split_clauses): Handle splitting of OMP_CLAUSE_ORDER.
1659
99b1c316
MS
16602019-07-09 Martin Sebor <msebor@redhat.com>
1661
1662 PR c++/61339
1fdd6f04 1663 * c-opts.c (handle_deferred_opts): Change class-key of PODs to struct
99b1c316
MS
1664 and others to class.
1665 * c-pretty-print.h: Same.
1666
6c1dae73
MS
16672019-07-09 Martin Sebor <msebor@redhat.com>
1668
1669 PR c++/61339
1670 * c-format.c (check_argument_type): Change class-key from class to
1671 struct and vice versa to match convention and avoid -Wclass-is-pod
1672 and -Wstruct-no-pod.
1673 * c-pretty-print.h: Same.
1674
8ba6ea87
ML
16752019-07-03 Martin Liska <mliska@suse.cz>
1676
1677 * c-common.c (try_to_locate_new_include_insertion_point): Remove
1678 dead assignemts.
1679
83eb9522
JJ
16802019-07-03 Jakub Jelinek <jakub@redhat.com>
1681
1682 * c-omp.c (c_omp_split_clauses): Put OMP_CLAUSE_REDUCTION_INSCAN
1683 clauses on OMP_FOR rather than OMP_PARALLEL when OMP_FOR is combined
1684 with OMP_PARALLEL.
1685
1c6ffbab
QZ
16862019-07-02 qing zhao <qing.zhao@oracle.com>
1687
1688 PR preprocessor/90581
1689 * c-opts.c (c_common_handle_option): Handle -fmax-include-depth.
1690 * c.opt: Add new option -fmax-include-depth.
1691
7ffc7de5
JM
16922019-06-26 Jason Merrill <jason@redhat.com>
1693
1694 PR c++/55442 - memory-hog with highly recursive constexpr.
1695 * c.opt (fconstexpr-loop-limit): New.
1696
361af3e4
JJ
16972019-06-25 Jakub Jelinek <jakub@redhat.com>
1698
1699 PR sanitizer/90954
1700 * c-omp.c (c_finish_omp_atomic): Allow tree_invariant_p in addition
1701 to SAVE_EXPR in first operand of a COMPOUND_EXPR.
1702
ab20d992
JJ
17032019-06-25 Jozef Lawrynowicz <jozef.l@mittosystems.com>
1704
1705 * c-common.c (c_common_nodes_and_builtins): Define
1706 alternate "__intN__" name for "__intN" types.
1707
f4af4019
JH
17082019-06-24 Jan Hubicka <jh@suse.cz>
1709
1710 * c-common.c (braced_lists_to_strings): Check that
1711 type is array or integer prior checking string flag.
1712
da9e9b57
MB
17132019-06-21 Matthew Beliveau <mbelivea@redhat.com>
1714
1715 PR c++/90875 - added -Wswitch-outside-range option
1716 * c.opt (Wswitch-outside-range): Added new option.
1717 * c-warn.c (c_do_switch_warnings): Use OPT_Wswitch-outside-range.
1718
3f3d6a6f
MP
17192019-06-21 Marek Polacek <polacek@redhat.com>
1720
1721 PR c++/90953 - ICE with -Wmissing-format-attribute.
1722 * c-common.c (check_function_arguments_recurse): Use
1723 get_attribute_name.
1724 (check_missing_format_attribute): Likewise.
1725
1bf32c11
MP
17262019-06-19 Marek Polacek <polacek@redhat.com>
1727
1728 PR c++/60364 - noreturn after first decl not diagnosed.
1729 * c-attribs.c (handle_noreturn_attribute): No longer static.
1730 * c-common.h (handle_noreturn_attribute, attr_noreturn_exclusions):
1731 Declare.
1732 * c-format.c (check_function_format): Use get_attribute_name.
1733
a04c0734
MS
17342019-06-19 Martin Sebor <msebor@redhat.com>
1735
1736 PR translation/90156
1737 * c-format.c (function_format_info::format_type): Adjust type.
1738 (function_format_info::is_raw): New member.
1739 (decode_format_type): Adjust signature. Handle "raw" diag attributes.
1740 (decode_format_attr): Adjust call to decode_format_type.
1741 Avoid a redundant call to convert_format_name_to_system_name.
1742 Avoid abbreviating the word "arguments" in a diagnostic.
1743 (format_warning_substr): New function.
1744 (avoid_dollar_number): Quote dollar sign in a diagnostic.
1745 (finish_dollar_format_checking): Same.
1746 (check_format_info): Same.
1747 (struct baltoks_t): New.
1748 (c_opers, c_keywords, cxx_keywords, badwords, contrs): New arrays.
1749 (maybe_diag_unbalanced_tokens, check_tokens, check_plain): New
1750 functions.
1751 (check_format_info_main): Call check_plain. Use baltoks_t. Call
1752 maybe_diag_unbalanced_tokens.
1753 (handle_format_attribute): Spell out the word "arguments" in
1754 a diagnostic.
1755
d3786ebb
MB
17562019-06-11 Matthew Beliveau <mbelivea@redhat.com>
1757
1758 PR c++/90449 - add -Winaccessible-base option.
1759 * c.opt (Winaccessible-base): New option.
1760
bf38f7e9
JJ
17612019-06-10 Jakub Jelinek <jakub@redhat.com>
1762
1763 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_SCAN.
1764 * c-pragma.c (omp_pragmas_simd): Add #pragma omp scan.
1765 * c-omp.c (c_omp_split_clauses): Diagnose inscan reductions on
1766 combined/composite constructs where it is not allowed. Copy over
1767 OMP_CLAUSE_REDUCTION_INSCAN.
1768
0ecf545c
MS
17692019-06-05 Martin Sebor <msebor@redhat.com>
1770
1771 * c-attribs.c (handle_mode_attribute): Adjust quoting and hyphenation.
1772 (handle_alias_ifunc_attribute): Same.
1773 (handle_copy_attribute): Same.
1774 (handle_weakref_attribute): Same.
1775 (handle_nonnull_attribute): Same.
1776 * c-warn.c (warn_for_sign_compare): Same.
1777 (warn_for_restrict): Same.
1778 * c.opt: Same.
1779
36b34127
MS
17802019-06-05 Martin Sebor <msebor@redhat.com>
1781
1782 * c-pragma.c (handle_pragma_weak): Adjust quoting in a diagnostic.
1783 * c.opt (-Wformat-diag): Remove a spurious period.
1784
357a352f
JJ
17852019-05-29 Jakub Jelinek <jakub@redhat.com>
1786
1787 PR c/90628
1788 * c-common.c (check_builtin_function_arguments)
1789 <case BUILTIN_*_OVERFLOW>: Diagnose pointer to const qualified integer
1790 as last argument.
1791
2b8235ea
EB
17922019-05-23 Eric Botcazou <ebotcazou@adacore.com>
1793
1794 * c-ada-spec.c (compare_node): Compare the DECL_UIDs as a last resort.
1795
6d86ddc4
ML
17962019-05-22 Martin Liska <mliska@suse.cz>
1797
1798 PR lto/90500
1799 * c-attribs.c (handle_copy_attribute): Do not copy
1800 target_clones attribute.
1801
419ba5b9
EB
18022019-05-21 Eric Botcazou <ebotcazou@adacore.com>
1803
1804 * c-ada-spec.h (enum cpp_operation): Add IS_ASSIGNMENT_OPERATOR.
1805 * c-ada-spec.c (print_assignment_operator): New function.
1806 (dump_ada_declaration) <FUNCTION_DECL>: Call it do dump explicit copy
1807 assignment operators declared as methods and filter out the others.
1808
e03436e7
TS
18092019-05-17 Thomas Schwinge <thomas@codesourcery.com>
1810
1811 PR c/89433
1812 * c-attribs.c (c_common_attribute_table): Set min_len to -1 for
1813 "omp declare target".
1814
a9c697b8
MS
18152019-05-16 Martin Sebor <msebor@redhat.com>
1816
ab20d992
JJ
1817 * c-attribs.c (handle_no_sanitize_attribute): Quote identifiers,
1818 keywords, operators, and types in diagnostics.
1819 (handle_scalar_storage_order_attribute): Same.
1820 (handle_mode_attribute): Same.
1821 (handle_visibility_attribute): Same.
1822 (handle_assume_aligned_attribute): Same.
1823 (handle_no_split_stack_attribute): Same.
1824 * c-common.c (shorten_compare): Same.
1825 (c_common_truthvalue_conversion): Same.
1826 (cb_get_source_date_epoch): Same.
1827 * c-lex.c (cb_def_pragma): Quote keywords, operators, and types
1828 in diagnostics.
1829 (interpret_float): Same.
1830 * c-omp.c (c_finish_omp_for): Same.
1831 * c-opts.c (c_common_post_options): Same.
1832 * c-pch.c (c_common_pch_pragma): Same.
1833 * c-pragma.c (pop_alignment): Same.
1834 (handle_pragma_pack): Same.
1835 (apply_pragma_weak): Same.
1836 (handle_pragma_weak): Same.
1837 (handle_pragma_scalar_storage_order): Same.
1838 (handle_pragma_redefine_extname): Same.
1839 (add_to_renaming_pragma_list): Same.
1840 (maybe_apply_renaming_pragma): Same.
1841 (push_visibility): Same.
1842 (handle_pragma_visibility): Same.
1843 (handle_pragma_optimize): Same.
1844 (handle_pragma_message): Same.
1845 * c-warn.c (warn_for_omitted_condop): Same.
1846 (lvalue_error): Same.
a9c697b8 1847
6b943512
RB
18482019-05-15 Richard Biener <rguenther@suse.de>
1849
1850 PR c/90474
1851 * c-common.c (c_common_mark_addressable_vec): Also mark
1852 a COMPOUND_LITERAL_EXPR_DECL addressable similar to
1853 c_mark_addressable.
ab20d992 1854
b744fc85
NS
18552019-05-06 Nathan Sidwell <nathan@acm.org>
1856
1857 * c-opts.c (handle_defered_opts): Rename struct deps to struc mkdeps.
1858
598f50d7
NS
18592019-04-30 Nathan Sidwell <nathan@acm.org>
1860
1861 * c-common.c (c_common_init_ts): Use MARK_TS_EXP. Mark SIZEOF_EXPR.
1862
5bcc5a3b
ML
18632019-04-30 Martin Liska <mliska@suse.cz>
1864
1865 * c-pragma.c (handle_pragma_diagnostic): Provide hints
1866 for unknown options.
1867
e78a87f7
RS
18682019-04-26 Richard Sandiford <richard.sandiford@arm.com>
1869
1870 * c-warn.c (strict_aliasing_warning): Apply COMPLETE_TYPE_P to
1871 the pointer target rather than the pointer itself.
1872
c280b7ee
JJ
18732019-04-19 Jakub Jelinek <jakub@redhat.com>
1874
1875 PR c/89888
1876 * c-common.h (c_add_case_label): Remove orig_type and outside_range_p
1877 arguments.
1878 (c_do_switch_warnings): Remove outside_range_p argument.
1879 * c-common.c (check_case_bounds): Removed.
1880 (c_add_case_label): Remove orig_type and outside_range_p arguments.
1881 Don't call check_case_bounds. Fold low_value as well as high_value.
1882 * c-warn.c (c_do_switch_warnings): Remove outside_range_p argument.
1883 Check for case labels outside of range of original type here and
1884 adjust them.
1885
8e8225e6
JJ
18862019-04-12 Jakub Jelinek <jakub@redhat.com>
1887
63b8a166
JJ
1888 PR translation/90041
1889 * c.opt (-fhandle-exceptions): Use %< and %> around option names
1890 in the Warn diagnostics.
1891
8e8225e6
JJ
1892 PR c/89946
1893 * c-attribs.c (handle_patchable_function_entry_attribute): Add
1894 function comment. Warn if arguments of the attribute are not positive
1895 integer constants.
1896
53a3f614
EB
18972019-04-09 Eric Botcazou <ebotcazou@adacore.com>
1898
1899 * c-ada-spec.c (print_destructor): Deal with deleting destructors.
1900 (dump_ada_declaration) <FUNCTION_DECL>: Likewise.
1901
22be5873
EB
19022019-04-07 Eric Botcazou <ebotcazou@adacore.com>
1903
1904 * c-ada-spec.c (is_float128): New predicate extracted from...
1905 (dump_ada_node) <COMPLEX_TYPE>: Use it to recognize __cfloat128.
1906 <REAL_TYPE>: ...here. Call it.
1907
34facf20
DM
19082019-04-05 David Malcolm <dmalcolm@redhat.com>
1909
1910 PR c/89985
1911 * c-warn.c (check_address_or_pointer_of_packed_member): Add
1912 auto_diagnostic_group. Guard inform calls by result of
1913 warning_at call.
1914
05564120
MP
19152019-04-05 Marek Polacek <polacek@redhat.com>
1916
ab20d992 1917 PR c++/89973 - -Waddress-of-packed-member ICE with invalid conversion.
05564120
MP
1918 * c-warn.c (check_address_or_pointer_of_packed_member): Check the type
1919 of RHS.
1920
7a506c3c
JM
19212019-04-03 Jason Merrill <jason@redhat.com>
1922
1923 PR c++/86586 - -fcompare-debug=-Wsign-compare.
1924 * c-warn.c (warn_for_sign_compare): Call fold_for_warn.
1925
ddeae8c8
MS
19262019-04-01 Martin Sebor <msebor@redhat.com>
1927
1928 PR c/89685
1929 * c-attribs.c (handle_copy_attribute): Handle references and
1930 non-constant expressions.
1931
a15ffa22
JJ
19322019-03-22 Jakub Jelinek <jakub@redhat.com>
1933
1934 PR c++/87481
1935 * c.opt (-fconstexpr-ops-limit=): New option.
1936
36a3a7a3
JJ
19372019-03-21 Jakub Jelinek <jakub@redhat.com>
1938
1939 * c-common.c (per_file_includes_t): Use false as Lazy in hash_set
1940 template param.
1941
bec1da64
MS
19422019-03-19 Martin Sebor <msebor@redhat.com>
1943
1944 PR tree-optimization/89688
1945 * c-common.c (braced_list_to_string): Make static.
1946 (braced_lists_to_strings): Define new function.
1947 * c-common.h (braced_list_to_string): Remove.
1948 (braced_lists_to_strings): Declare.
1949
1fe61adf
ML
19502019-03-12 Martin Liska <mliska@suse.cz>
1951
1952 * c-opts.c (c_common_handle_option): Wrap option with %< and %>.
1953
93964ebd
ML
19542019-03-11 Martin Liska <mliska@suse.cz>
1955
1956 * c-opts.c (c_common_post_options): Wrap apostrophes
1957 in gcc internal format with %'.
1958
a3f9f006
ML
19592019-03-11 Martin Liska <mliska@suse.cz>
1960
1961 * c-attribs.c (handle_nocf_check_attribute): Wrap an option name
1962 in a string format message and fix GNU coding style.
1963 * c-common.c (vector_types_convertible_p): Likewise.
1964 (c_build_vec_perm_expr): Likewise.
1965 * c-indentation.c (get_visual_column): Likewise.
1966 * c-opts.c (c_common_handle_option): Likewise.
1967 (c_common_post_options): Likewise.
1968 (sanitize_cpp_opts): Likewise.
1969 * c-pch.c (c_common_pch_pragma): Likewise.
1970 * c-pragma.c (handle_pragma_pack): Likewise.
1971
1db01ff9
JJ
19722019-03-08 Jakub Jelinek <jakub@redhat.com>
1973
1974 PR tree-optimization/89550
1975 * c-common.c (c_common_truthvalue_conversion): Only set
1976 TREE_NO_WARNING if warning_at returned true.
1977 * c-warn.c (overflow_warning, warn_logical_operator): Likewise.
1978
ba790e6f
JJ
19792019-02-25 Sandra Loosemore <sandra@codesourcery.com>
1980 Martin Sebor <msebor@gmail.com>
1981
1982 * c.opt (Wmissing-attributes): Clean up doc string.
1983
7da73ba7
JJ
19842019-02-25 Jakub Jelinek <jakub@redhat.com>
1985
1986 PR c/89495
1987 * c-format.c (maybe_read_dollar_number): Compute nargnum in
1988 HOST_WIDE_INT type to avoid overflows and change overflow_flag
1989 checking.
1990
921bb9d1
RB
19912019-02-22 Richard Biener <rguenther@suse.de>
1992
1993 * c-pch.c (no_checksum): Remove.
1994 (pch_init): Remove assertion that executable_checksum is not
1995 all zero.
1996 (c_common_valid_pch): Likewise.
1997
e2ebb05c
MS
19982019-02-18 Martin Sebor <msebor@redhat.com>
1999
2000 PR middle-end/89294
2001 * c-common.c (invalid_array_size_error): Handle cst_size_not_constant.
2002
3fe53000
DM
20032019-02-16 David Malcolm <dmalcolm@redhat.com>
2004
2005 PR c++/88680
2006 * c-common.c (shorten_compare): Call fold_for_warn on op0 when
2007 implementing -Wtype-limits.
2008
28a8cef1
MS
20092019-02-11 Martin Sebor <msebor@redhat.com>
2010
2011 PR c++/87996
2012 * c-common.c (invalid_array_size_error): New function.
2013 (valid_array_size_p): Call it. Handle size as well as type.
2014 * c-common.h (valid_constant_size_p): New function.
2015 (enum cst_size_error): New type.
2016
ec2be203
DM
20172019-01-31 David Malcolm <dmalcolm@redhat.com>
2018
2019 PR c/89122
2020 * known-headers.cc (get_stdlib_header_for_name): Add
2021 {FLT|DBL|LDBL}_{MAX|MIN} to "hints" array.
2022
8936f047
JJ
20232019-01-31 Jakub Jelinek <jakub@redhat.com>
2024
2025 PR libstdc++/88170
2026 * c-pretty-print.c (pp_c_enumeration_constant): Print always as
2027 a C cast in pp_c_flag_gnu_v3 mode.
2028
6a335b96
JJ
20292019-01-29 Jakub Jelinek <jakub@redhat.com>
2030
2031 PR c/86125
2032 * c-common.c (c_common_nodes_and_builtins): Build type variants for
2033 builtin_structptr_types types even for C.
2034
2a06eba5
BE
20352019-01-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
2036
2037 * c-warn.c (check_address_or_pointer_of_packed_member): Handle the case
2038 when rhs is of array type correctly. Fix handling of nested structures.
2039 Fix handling of indirect_ref together with nop_expr and/or addr_expr.
2040 (check_and_warn_address_or_pointer_of_packed_member): Fix handling of
2041 type casts within nested compound expressions.
2042
18a23298
JJ
20432019-01-22 Jakub Jelinek <jakub@redhat.com>
2044
2045 PR middle-end/88968
2046 * c-omp.c (c_finish_omp_atomic): For bitfield atomics, update type
2047 variable after using BIT_FIELD_REF.
2048
420183d9
L
20492019-01-18 H.J. Lu <hongjiu.lu@intel.com>
2050
2051 PR c/51628
2052 PR c/88664
2053 * c-common.h (warn_for_address_or_pointer_of_packed_member):
2054 Remove the boolean argument.
2055 * c-warn.c (check_address_of_packed_member): Renamed to ...
2056 (check_address_or_pointer_of_packed_member): This. Also
2057 warn pointer conversion.
2058 (check_and_warn_address_of_packed_member): Renamed to ...
2059 (check_and_warn_address_or_pointer_of_packed_member): This.
2060 Also warn pointer conversion.
2061 (warn_for_address_or_pointer_of_packed_member): Remove the
2062 boolean argument. Don't check pointer conversion here.
2063
99063eee
RS
20642019-01-15 Richard Sandiford <richard.sandiford@arm.com>
2065
2066 PR inline-asm/52813
2067 * c.opt (Wdeprecated): Move documentation and variable to common.opt.
2068
a30d0196
JJ
20692019-01-14 Jakub Jelinek <jakub@redhat.com>
2070
2071 * c-cppbuiltin.c (c_cpp_builtin): Define __cpp_guaranteed_copy_elision
2072 and __cpp_nontype_template_parameter_auto. Add a comment that
2073 __cpp_template_auto is deprecated.
2074
2d91f79d
TH
20752019-01-14 Tom Honermann <tom@honermann.net>
2076
2077 Implement P0482R5, char8_t: A type for UTF-8 characters and strings
2078 * c-common.c (c_common_reswords): Add char8_t.
2079 (fix_string_type): Use char8_t for the type of u8 string literals.
2080 (c_common_get_alias_set): char8_t doesn't alias.
2081 (c_common_nodes_and_builtins): Define char8_t as a builtin type in
2082 C++.
2083 (c_stddef_cpp_builtins): Add __CHAR8_TYPE__.
2084 (keyword_begins_type_specifier): Add RID_CHAR8.
2085 * c-common.h (rid): Add RID_CHAR8.
2086 (c_tree_index): Add CTI_CHAR8_TYPE and CTI_CHAR8_ARRAY_TYPE.
2087 Define D_CXX_CHAR8_T and D_CXX_CHAR8_T_FLAGS.
2088 Define char8_type_node and char8_array_type_node.
2089 * c-cppbuiltin.c (cpp_atomic_builtins): Predefine
2090 __GCC_ATOMIC_CHAR8_T_LOCK_FREE.
2091 (c_cpp_builtins): Predefine __cpp_char8_t.
2092 * c-lex.c (lex_string): Use char8_array_type_node as the type of
2093 CPP_UTF8STRING.
2094 (lex_charconst): Use char8_type_node as the type of CPP_UTF8CHAR.
2095 * c-opts.c: If not otherwise specified, enable -fchar8_t when
2096 targeting C++2a.
2097 * c.opt: Add the -fchar8_t command line option.
2098
23db6ced
MS
20992019-01-14 Martin Sebor <msebor@redhat.com>
2100
2101 PR target/88638
2102 * c-attribs.c (positional_argument): Call valid_format_string_type_p
2103 and issue errors if it fails.
2104 * c-common.h (valid_format_string_type_p): Declare.
2105 * c-format.c (valid_stringptr_type_p): Rename...
2106 (valid_format_string_type_p): ...to this and make extern.
2107 (handle_format_arg_attribute): Adjust to new name.
2108 (check_format_string): Same.
2109
234c3818
L
21102019-01-13 H.J. Lu <hongjiu.lu@intel.com>
2111
2112 * c-warn.c (warn_for_address_or_pointer_of_packed_member):
2113 Replace "may may" with "may" in warning message.
2114
d8fcab68
JJ
21152019-01-07 Jakub Jelinek <jakub@redhat.com>
2116
2117 PR c++/85052
2118 * c-common.h (enum rid): Add RID_BUILTIN_CONVERTVECTOR.
2119 (c_build_vec_convert): Declare.
2120 * c-common.c (c_build_vec_convert): New function.
2121
29d24852
MS
21222019-01-04 Martin Sebor <msebor@redhat.com>
2123
2124 PR c/88546
2125 * c-attribs.c (handle_copy_attribute): Avoid copying attribute leaf.
2126 Handle C++ empty throw specification and C11 _Noreturn.
2127 (has_attribute): Also handle C11 _Noreturn.
2128
9069a4c9
MS
21292019-01-04 Martin Sebor <msebor@redhat.com>
2130
2131 PR c/88363
2132 * c-attribs.c (positional_argument): Also accept enumerated types.
2133
a5544970
JJ
21342019-01-01 Jakub Jelinek <jakub@redhat.com>
2135
2136 Update copyright years.
2137
da77eace
L
21382018-12-20 H.J. Lu <hongjiu.lu@intel.com>
2139
2140 PR c/51628
2141 * c-common.h (warn_for_address_or_pointer_of_packed_member): New.
2142 * c-warn.c (check_alignment_of_packed_member): New function.
2143 (check_address_of_packed_member): Likewise.
2144 (check_and_warn_address_of_packed_member): Likewise.
2145 (warn_for_address_or_pointer_of_packed_member): Likewise.
2146 * c.opt: Add -Wno-address-of-packed-member.
2147
573767d4
DM
21482018-12-20 David Malcolm <dmalcolm@redhat.com>
2149
2150 PR c++/87504
2151 * c-warn.c (get_outermost_macro_expansion): New function.
2152 (spelled_the_same_p): Use it to unwind the macro expansions, and
2153 compare the outermost macro in each nested expansion, rather than
2154 the innermost.
2155
a14feb3c
DM
21562018-12-19 David Malcolm <dmalcolm@redhat.com>
2157
2158 PR c++/87504
2159 * c-common.h (warn_tautological_cmp): Convert 1st param from
2160 location_t to const op_location_t &.
2161 * c-warn.c (find_array_ref_with_const_idx_r): Call fold_for_warn
2162 when testing for INTEGER_CST.
2163 (warn_tautological_bitwise_comparison): Convert 1st param from
2164 location_t to const op_location_t &; use it to build a
2165 binary_op_rich_location, and use this.
2166 (spelled_the_same_p): New function.
2167 (warn_tautological_cmp): Convert 1st param from location_t to
2168 const op_location_t &. Warn for macro expansions if
2169 spelled_the_same_p. Use binary_op_rich_location.
2170
dfd7fdca
DM
21712018-12-19 David Malcolm <dmalcolm@redhat.com>
2172
2173 PR c++/43064
2174 PR c++/43486
2175 * c-common.c (unsafe_conversion_p): Fold any location wrapper.
2176 (verify_tree): Handle location wrappers.
2177 (c_common_truthvalue_conversion): Strip any location wrapper.
2178 Handle CONST_DECL.
2179 (fold_offsetof): Strip any location wrapper.
2180 (complete_array_type): Likewise for initial_value.
2181 (convert_vector_to_array_for_subscript): Call fold_for_warn on the
2182 index before checking for INTEGER_CST.
2183 * c-pretty-print.c (c_pretty_printer::primary_expression): Don't
2184 print parentheses around location wrappers.
2185 * c-warn.c (warn_logical_operator): Call fold_for_warn on op_right
2186 before checking for INTEGER_CST.
2187 (warn_tautological_bitwise_comparison): Call
2188 tree_strip_any_location_wrapper on lhs, rhs, and bitop's operand
2189 before checking for INTEGER_CST.
2190 (readonly_error): Strip any location wrapper.
2191 (warn_array_subscript_with_type_char): Strip location wrappers
2192 before checking for INTEGER_CST. Use the location of the index if
2193 available.
2194
5c8b3702
JM
21952018-12-06 Jason Merrill <jason@redhat.com>
2196
2197 PR c++/88136 - -Wdeprecated-copy false positives
2198 * c.opt (Wdeprecated-copy-dtor): New.
2199 (Wdeprecated-copy): Move to -Wextra.
2200
673670da
MS
22012018-11-29 Martin Sebor <msebor@redhat.com>
2202
2203 PR c/88172
2204 PR testsuite/88208
2205 * c-attribs.c (common_handle_aligned_attribute): Silently avoid setting
2206 alignments to values less than the target requires.
2207 (has_attribute): For attribute aligned consider both the attribute
2208 and the alignment bits.
2209 * c-common.c (c_init_attributes): Optionally issue a warning for
2210 zero alignment.
2211
04864ec8
MS
22122018-11-28 Martin Sebor <msebor@redhat.com>
2213
2214 PR c/88065
2215 PR c/87297
2216 * c-warn.c (sizeof_pointer_memaccess_warning): Bail if source
2217 or destination is an error.
2218
ace83db0
JJ
22192018-11-28 Jakub Jelinek <jakub@redhat.com>
2220
2221 PR c++/88215
2222 * c-ubsan.c: Include langhooks.h.
2223 (ubsan_instrument_division): Change gcc_assert that main variants
2224 of op0 and op1 types are equal to gcc_checking_assert that the
2225 main variants are compatible types.
2226
da193a27
EB
22272018-11-27 Eric Botcazou <ebotcazou@adacore.com>
2228
2229 * c-ada-spec.c: Include stringpool.h.
2230 (has_static_fields): Return false for incomplete types.
2231 (is_tagged_type): Likewise.
2232 (has_nontrivial_methods): Likewise.
2233 (dump_ada_node) <INTEGER_TYPE>: Deal specifically with __int128.
2234 (struct overloaded_name_hash): New structure.
2235 (struct overloaded_name_hasher): Likewise.
2236 (overloaded_names): New global variable.
2237 (init_overloaded_names): New static function.
2238 (overloaded_name_p): New predicate.
2239 (dump_ada_declaration) <TYPE_DECL>: Tidy up and set TREE_VISITED
2240 on the TYPE_STUB_DECL of the original type of a typedef, if any.
2241 <FUNCTION_DECL>: Bail out for an unsupported overloaded name.
2242 Remove always-true condition and dump forward types.
2243 (dump_ada_specs): Delete overloaded_names.
2244
98f08eb8
MS
22452018-11-20 Martin Sebor <msebor@redhat.com>
2246
2247 * c-attribs.c (type_for_vector_size): New function.
2248 (type_valid_for_vector_size): Same.
2249 (handle_vector_size_attribute): Move code to the functions above
2250 and call them.
2251 (validate_attribute, has_attribute): New functions.
2252 * c-common.h (has_attribute): Declare.
2253 (rid): Add RID_HAS_ATTRIBUTE_EXPRESSION.
2254 * c-common.c (c_common_resword): Same.
2255
2674fa47
JM
22562018-11-16 Jason Merrill <jason@redhat.com>
2257
2258 * c-lex.c (c_common_has_attribute): Handle likely/unlikely.
2259 * c-attribs.c (attr_cold_hot_exclusions): Make public.
2260
258b3854
JJ
22612018-11-16 Jakub Jelinek <jakub@redhat.com>
2262
2263 PR middle-end/87854
2264 * c-common.c (fix_string_type): Reject string literals larger than
2265 TYPE_MAX_VALUE (ssizetype) bytes.
2266
1d249509
MS
22672018-11-15 Martin Sebor <msebor@redhat.com>
2268
2269 PR c++/87541
2270 PR c++/87542
2271 * c-attribs.c (positional_argument): New function.
2272 (handle_alloc_size_attribute): Use it and simplify.
2273 (handle_alloc_align_attribute): Same.
2274 (handle_assume_aligned_attribute): Same.
2275 (handle_nonnull_attribute): Same.
2276 * c-common.c (check_function_arguments): Pass fntype to
2277 check_function_format.
2278 * c-common.h (check_function_format): Add an argument.
2279 (PosArgFlags, positional_argument): Declare new type and function.
2280 * c-format.c (decode_format_attr): Add arguments.
2281 (check_format_string, get_constant): Same.
2282 (convert_format_name_to_system_name): Adjust.
2283
478dd60d
DM
22842018-11-15 David Malcolm <dmalcolm@redhat.com>
2285
2286 PR other/19165
2287 * c-opts.c (c_diagnostic_finalizer): Add diagnostic_t param.
2288
8cca0163
JJ
22892018-11-14 Jakub Jelinek <jakub@redhat.com>
2290
8ee09943
JJ
2291 P1236R1 - Signed integers are two's complement
2292 * c-warn.c (maybe_warn_shift_overflow): Don't warn for c++2a.
2293 * c-ubsan.c (ubsan_instrument_shift): Make signed shifts
2294 with in-range second operand well defined for -std=c++2a.
2295
8cca0163
JJ
2296 PR other/88007
2297 * c-common.c (parse_optimize_options): Allocate option string from
2298 opts_obstack rather than as GC memory. Move the allocation after
2299 warning for invalid option.
2300
620e594b
DM
23012018-11-13 David Malcolm <dmalcolm@redhat.com>
2302
2303 * c-common.c (c_get_substring_location): Update for renaming of
2304 get_source_location_for_substring to get_location_within_string.
2305 * c-lex.c: Replace "source_location" with "location_t".
2306 * c-opts.c: Likewise.
2307 * c-ppoutput.c: Likewise.
2308
f9731de3
MS
23092018-11-13 Martin Sebor <msebor@redhat.com>
2310
2311 PR middle-end/81824
2312 * c-attribs.c (handle_copy_attribute): Exclude inlining attributes.
2313 (handle_tls_model_attribute): Improve diagnostics.
2314
e4bd6d5e
JM
23152018-11-12 Jason Merrill <jason@redhat.com>
2316
a6bb6b07
JM
2317 * c-cppbuiltin.c (c_cpp_builtins): Define
2318 __cpp_impl_destroying_delete.
2319
e4bd6d5e
JM
2320 * c-cppbuiltin.c (c_cpp_builtins): Change __cpp_explicit_bool to
2321 __cpp_conditional_explicit.
2322
79a2c428
MS
23232018-11-09 Martin Sebor <msebor@redhat.com>
2324
2325 PR middle-end/81824
2326 * c-attribs.c (handle_copy_attribute): New function.
2327
4c7bd361
MS
23282018-11-09 Martin Sebor <msebor@redhat.com>
2329
2330 PR c/87795
2331 * c-common.c (check_user_alignment): Use MAX_OFILE_ALIGNMENT.
2332
28567c40
JJ
23332018-11-08 Jakub Jelinek <jakub@redhat.com>
2334
2335 * c-common.h (c_finish_omp_taskgroup): Add CLAUSES argument.
2336 (c_finish_omp_atomic): Replace bool SEQ_CST argument with
2337 enum omp_memory_order MEMORY_ORDER.
2338 (c_finish_omp_flush): Add MO argument.
2339 (c_omp_depend_t_p, c_finish_omp_depobj): Declare.
2340 (c_finish_omp_for): Add FINAL_P argument.
2341 * c-omp.c: Include memmodel.h.
2342 (c_finish_omp_taskgroup): Add CLAUSES argument. Set
2343 OMP_TASKGROUP_CLAUSES to it.
2344 (c_finish_omp_atomic): Replace bool SEQ_CST argument with
2345 enum omp_memory_order MEMORY_ORDER. Set OMP_ATOMIC_MEMORY_ORDER
2346 instead of OMP_ATOMIC_SEQ_CST.
2347 (c_omp_depend_t_p, c_finish_omp_depobj): New functions.
2348 (c_finish_omp_flush): Add MO argument, if not MEMMODEL_LAST, emit
2349 __atomic_thread_fence call with the given value.
2350 (check_omp_for_incr_expr): Formatting fixes.
2351 (c_finish_omp_for): Add FINAL_P argument. Allow NE_EXPR
2352 even in OpenMP loops, diagnose if NE_EXPR and incr expression
2353 is not constant expression 1 or -1. Transform NE_EXPR loops
2354 with iterators pointers to VLA into LT_EXPR or GT_EXPR loops.
2355 (c_omp_check_loop_iv_r): Look for orig decl of C++ range for
2356 loops too.
2357 (c_omp_split_clauses): Add support for combined
2358 #pragma omp parallel master and
2359 #pragma omp {,parallel }master taskloop{, simd} constructs.
2360 Handle OMP_CLAUSE_IN_REDUCTION. Handle OMP_CLAUSE_REDUCTION_TASK.
2361 Handle OMP_CLAUSE_NONTEMPORAL. Handle splitting OMP_CLAUSE_IF
2362 also to OMP_SIMD. Copy OMP_CLAUSE_LASTPRIVATE_CONDITIONAL.
2363 (c_omp_predetermined_sharing): Don't return
2364 OMP_CLAUSE_DEFAULT_SHARED for const qualified decls.
2365 * c-pragma.c (omp_pragmas): Add PRAGMA_OMP_DEPOBJ and
2366 PRAGMA_OMP_REQUIRES.
2367 * c-pragma.h (enum pragma_kind): Likewise.
2368 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_NONTEMPORAL
2369 and PRAGMA_OMP_CLAUSE_{IN,TASK}_REDUCTION.
2370
204839e7
DM
23712018-11-08 David Malcolm <dmalcolm@redhat.com>
2372
2373 * c-format.c (gcc_dump_printf_char_table): Add entry for %f.
2374
d8010ee4
DM
23752018-11-08 David Malcolm <dmalcolm@redhat.com>
2376
2377 * c-format.c (local_cgraph_node_ptr_node): New variable.
2378 (gcc_dump_printf_char_table): Add entry for %C.
2379 (get_pointer_to_named_type): New function, taken from the handling
2380 code for "gimple *" from...
2381 (init_dynamic_diag_info): ...here. Add handling for
2382 "cgraph_node *".
2383 * c-format.h (T_CGRAPH_NODE): New.
2384
4be5c72c
JM
23852018-10-19 Jason Merrill <jason@redhat.com>
2386
2387 * c-cppbuiltin.c (c_cpp_builtins): Add
2388 __cpp_nontype_template_parameter_class.
2389
f3f6029d
NS
23902018-10-31 Nathan Sidwell <nathan@acm.org>
2391
ab5324fb
NS
2392 * c-opts.c (c_finish_options): Force command line macro
2393 location. Refactor to avoid repeating main debug hook.
2394 (push_command_line_include): Clarify comment.
2395
f3f6029d
NS
2396 * c-opts.c (c_finish_options): Adjust cpp_force_token_locations call.
2397
91e3ec29
MS
23982018-10-30 Martin Sebor <msebor@redhat.com>
2399
2400 PR middle-end/87041
2401 * c-format.c (check_format_types): Avoid diagnosing null pointer
2402 arguments to printf-family of functions.
2403
b5ff4f5c
MP
24042018-10-30 Marek Polacek <polacek@redhat.com>
2405
2406 Implement P0892R2, explicit(bool).
2407 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_explicit_bool.
2408
7e2de6df
DM
24092018-10-29 David Malcolm <dmalcolm@redhat.com>
2410
2411 * name-hint.h (name_hint::take_deferred): New member function.
2412
b2bf438c
DM
24132018-10-29 David Malcolm <dmalcolm@redhat.com>
2414
2415 PR c++/56856
2416 * c-common.c (check_function_sentinel): Call fold_for_warn on the
2417 argument.
2418 (check_function_restrict): Rename param "argarray" to
2419 "unfolded_argarray", and make a copy named "argarray", calling
2420 fold_for_warn on each argument.
2421 (check_function_arguments): Add note about responsibility for
2422 folding the arguments.
2423
9f936c86
JM
24242018-10-17 Joseph Myers <joseph@codesourcery.com>
2425
2426 * c-common.c (flag_isoc2x): New variable.
2427 * c-common.h (clk_c): Update comment to reference C2X.
2428 (flag_isoc99, flag_isoc11): Update comments to reference future
2429 standard versions in general.
2430 (flag_isoc2x): Declare.
2431 * c-opts.c (set_std_c2x): New function.
2432 (c_common_handle_option): Handle -std=c2x and -std=gnu2x.
2433 (set_std_c89, set_std_c99, set_std_c11, set_std_c17): Set
2434 flag_isoc2x to 0.
2435 * c.opt (Wc11-c2x-compat, std=c2x, std=gnu2x): New options.
2436
7a8a92c4
JM
24372018-10-17 Joseph Myers <joseph@codesourcery.com>
2438
2439 * c.opt (std=c17, std=c18, std=gnu17, std=gnu18, std=iso9899:2017)
2440 (std=iso9899:2018): Document C17 as published in 2018.
2441
4dc003ff
CL
24422018-10-12 Christophe Lyon <christophe.lyon@linaro.org>
2443
2444 PR c++/87364
2445 * c-pretty-print.c (c_pretty_printer::constant): Fix typo.
2446
79371671
WW
24472018-10-11 Will Wray <wjwray@gmail.com>
2448
2449 PR c++/87364
2450 * c-pretty-print.h (pp_c_type_cast): Prototype.
2451 (pp_c_integer_constant): Likewise.
2452 * c-pretty-print.c (pp_c_type_cast): No longer static.
2453 (pp_c_integer_constant): Likewise.
2454 (pp_c_enumeration_constant): Fix loop termination when finding
2455 name of constant. No longer returns a value. Call
2456 pp_c_integer_constant.
2457 (c_pretty_printer::constant): Update for changes to
2458 pp_c_enumeration_constant.
2459
46c62690
JJ
24602018-10-11 Jakub Jelinek <jakub@redhat.com>
2461
2462 * c-lex.c (c_common_has_attribute): Return 201803 instead of 20180312
2463 for no_unique_address.
2464
c24300ba
DM
24652018-10-09 David Malcolm <dmalcolm@redhat.com>
2466
2467 * c-common.c (c_option_controlling_cpp_error): Rename to...
2468 (c_option_controlling_cpp_diagnostic): ...this, and convert
2469 "reason" from int to enum.
2470 (c_cpp_error): Rename to...
2471 (c_cpp_diagnostic): ...this, converting level and reason to enums.
2472 * c-common.h (c_cpp_error): Rename to...
2473 (c_cpp_diagnostic): ...this, converting level and reason to enums.
2474 * c-opts.c (c_common_init_options): Update for renaming.
2475
8656dafa
RS
24762018-10-08 Richard Sandiford <richard.sandiford@arm.com>
2477
2478 PR c/87286
2479 * c-common.c (vector_types_compatible_elements_p): Use
2480 INTEGRAL_TYPE_P instead of checking only for INTEGER_TYPE.
2481
8cff0652
VK
24822018-10-04 Vinay Kumar <vinay.kumar@blackfigtech.com>
2483
2484 * c-attribs.c (get_priority): Add a warning flag warn_prio_ctor_dtor
2485 to generate constructor destructor priority warning.
2486 * c.opt (-Wprio-ctor-dtor): New option.
2487
bedf03a2
JM
24882018-10-01 Jason Merrill <jason@redhat.com>
2489
2490 * c-lex.c (c_common_has_attribute): Add no_unique_address.
2491
6cc430c1
EB
24922018-10-01 Eric Botcazou <ebotcazou@adacore.com>
2493
2494 * c-ada-spec.c (get_underlying_decl): Get to the main type variant.
2495 (dump_ada_node): Add const keyword.
2496
87677ac7
ML
24972018-09-25 Martin Liska <mliska@suse.cz>
2498
2499 * c-common.c (c_common_truthvalue_conversion):
2500 Remove Pascal from documentation.
2501
518196cb
EB
25022018-09-21 Eric Botcazou <ebotcazou@adacore.com>
2503
2504 * c-ada-spec.c: Include diagnostic.h.
2505 (dump_ada_declaration) <RECORD_TYPE>: Issue a warning on packed layout.
2506
a599af84
MP
25072018-09-19 Marek Polacek <polacek@redhat.com>
2508
2509 * c.opt (Wclass-conversion): New.
2510
9c4a4b3c
DM
25112018-09-17 David Malcolm <dmalcolm@redhat.com>
2512
2513 * c-format.c (range_label_for_format_type_mismatch::get_text):
2514 Update for new param.
2515
c896ecfe
DM
25162018-09-17 David Malcolm <dmalcolm@redhat.com>
2517
2518 * c-format.c (format_warning_at_char): Update for introduction of
2519 format_string_diagnostic_t.
2520 (format_type_warning): Likewise.
2521
80c6d1f4
MJ
25222018-09-17 Martin Jambor <mjambor@suse.cz>
2523
2524 PR c/63886
2525 * c.opt (Wabsolute-value): New.
2526
6d900107
BE
25272018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
2528
2529 * c-common.c (complete_flexible_array_elts): New helper function.
2530 * c-common.h (complete_flexible_array_elts): Declare.
2531
b5764229
BE
25322018-09-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
2533
2534 * c-common.c (braced_list_to_string): Remove eval parameter.
2535 Add some more checks. Always create zero-terminated STRING_CST.
2536 * c-common.h (braced_list_to_string): Adjust prototype.
2537
85204e23
DM
25382018-08-27 David Malcolm <dmalcolm@redhat.com>
2539
2540 PR 87091
2541 * c-common.c (c_cpp_error): Update for conversion of show_caret_p
2542 to a tri-state.
2543 (maybe_suggest_missing_token_insertion): Likewise.
2544 (maybe_add_include_fixit): Add param "override_location". If set,
2545 and source-printing is enabled, then override the rich_location's
2546 primary location with that of the insertion point for the fix-it
2547 hint, marking it with SHOW_LINES_WITHOUT_RANGE.
2548 * c-common.h (extern void maybe_add_include_fixit): Add bool
2549 param.
2550 * c-format.c (selftest::test_type_mismatch_range_labels): Update
2551 for conversion of show_caret_p to a tri-state.
2552 * c-warn.c (warn_for_restrict): Likewise.
2553 * known-headers.cc
2554 (suggest_missing_header::~suggest_missing_header): Update call to
2555 maybe_add_include_fixit to suggest overriding the location, as it
2556 is for a note.
2557
3d78e008
ML
25582018-08-27 Martin Liska <mliska@suse.cz>
2559
2560 * c-common.c (check_function_restrict): Use new function
92a285c1
ML
2561 fndecl_built_in_p and remove check for FUNCTION_DECL if
2562 possible.
3d78e008
ML
2563 (check_builtin_function_arguments): Likewise.
2564 (reject_gcc_builtin): Likewise.
2565 * c-warn.c (sizeof_pointer_memaccess_warning): Likewise.
2566
b5be6d0c
MP
25672018-08-26 Marek Polacek <polacek@redhat.com>
2568
2569 PR c++/87029, Implement -Wredundant-move.
2570 * c.opt (Wredundant-move): New option.
2571
79ca9c35
MP
25722018-08-21 Marek Polacek <polacek@redhat.com>
2573
2574 PR c++/86981, Implement -Wpessimizing-move.
2575 * c.opt (Wpessimizing-move): New option.
2576
097f82ec
DM
25772018-08-20 David Malcolm <dmalcolm@redhat.com>
2578
2579 PR other/84889
2580 * c-attribs.c (common_handle_aligned_attribute): Add
2581 auto_diagnostic_group instance.
2582 * c-indentation.c (warn_for_misleading_indentation): Likewise.
2583 * c-opts.c (c_common_post_options): Likewise.
2584 * c-warn.c (warn_logical_not_parentheses): Likewise.
2585 (warn_duplicated_cond_add_or_warn): Likewise.
2586 (warn_for_multistatement_macros): Likewise.
2587
3fb558b1
NS
25882018-08-20 Nathan Sidwell <nathan@acm.org>
2589
2590 * c-ada-spec.c (macro_length, dump_ada_macros): Adjust macro parm
2591 access.
2592
800c0e98
NS
25932018-08-17 Nathan Sidwell <nathan@acm.org>
2594
2595 * c-cppbuiltin.c (struct lazy_hex_fp_value_struct): Remove macro
2596 field.
2597 (laxy_hex_fp_value_count): Make unsigned.
2598 (lazy_hex_fp_value): Provided with macro & lazy number. Directly
2599 manipulate the macro.
2600 (builtin_defin_with_hex_fp_value): Adjust callback name, use
2601 cpp_define_lazily.
2602
6f795a92
DM
26032018-08-17 David Malcolm <dmalcolm@redhat.com>
2604
2605 * c-format.c (enum format_type): Add gcc_dump_printf_format_type.
2606 (gcc_dump_printf_length_specs): New.
2607 (gcc_dump_printf_flag_pairs): New.
2608 (gcc_dump_printf_flag_specs): New.
2609 (gcc_dump_printf_char_table): New.
2610 (format_types_orig): Add entry for "gcc_dump_printf".
2611 (init_dynamic_diag_info): Set up length_char_specs and
2612 conversion_specs for gcc_dump_printf_format_type.
2613 (handle_format_attribute): Handle gcc_dump_printf_format_type.
2614
c5d725c0
NS
26152018-08-17 Nathan Sidwell <nathan@acm.org>
2616
10f04917
NS
2617 * c-ada-spec.c (macro_length, dump_ada_macros): Constify.
2618
c5d725c0
NS
2619 * c-ada-spec.c: Don't #include "cpp-id-data.h"
2620 * c-cppbuiltin.c: Likewise.
2621
c0c12356
ML
26222018-08-17 Martin Liska <mliska@suse.cz>
2623
2624 * c.opt: Remove Warn, Init and Report for options with
92a285c1
ML
2625 Ignore/Deprecated flag. Warning is done automatically for
2626 Deprecated flags.
c0c12356 2627
10fcc142
DM
26282018-08-16 David Malcolm <dmalcolm@redhat.com>
2629
2630 PR c++/70693
2631 * c-common.c (selftest::c_family_tests): Call
2632 selftest::c_indentation_c_tests.
2633 * c-common.h (selftest::c_indentation_c_tests): New decl.
2634 * c-indentation.c: Include "selftest.h".
2635 (next_tab_stop): Add "tab_width" param, rather than accessing
2636 cpp_opts.
2637 (get_visual_column): Likewise. Clarify comment. Bulletproof
2638 against reading past the end of the line.
2639 (get_first_nws_vis_column): Add "tab_width" param.
2640 (detect_intervening_unindent): Likewise.
2641 (should_warn_for_misleading_indentation): Read tab width from
2642 cpp_opts and pass around.
2643 (selftest::test_next_tab_stop): New test.
2644 (selftest::assert_get_visual_column_succeeds): New function.
2645 (ASSERT_GET_VISUAL_COLUMN_SUCCEEDS): New macro.
2646 (selftest::assert_get_visual_column_fails): New function.
2647 (ASSERT_GET_VISUAL_COLUMN_FAILS): New macro.
2648 (selftest::test_get_visual_column): New test.
2649 (selftest::c_indentation_c_tests): New function.
2650
3f6677f4
NS
26512018-08-16 Nathan Sidwell <nathan@acm.org>
2652
2653 * c-ada-spec.c (count_ada_macro): Use cpp_user_macro_p.
2654 (store_ada_macro): Likewise.
2655 * c-ppoutput.c (cb_used_define, dump_macro): Likewise.
2656 * c-spellcheck.cc (should-suggest_as_macro_p): Likewise,
2657
96e6ae57
DM
26582018-08-15 David Malcolm <dmalcolm@redhat.com>
2659
2660 * c-format.c: Include "selftest-diagnostic.h" and
2661 "gcc-rich-location.h".
2662 (format_warning_at_char): Pass NULL for new label params of
2663 format_warning_va.
2664 (class indirection_suffix): New class.
2665 (class range_label_for_format_type_mismatch): New class.
2666 (format_type_warning): Move logic for generating "*" suffix to
2667 class indirection_suffix. Create "fmt_label" and "param_label"
2668 to show their types, and pass them to the
2669 format_warning_at_substring calls.
2670 (selftest::test_type_mismatch_range_labels): New test.
2671 (selftest::c_format_c_tests): Call it.
2672
23aa9f7c
MS
26732018-08-13 Martin Sebor <msebor@redhat.com>
2674
2675 PR tree-optimization/71625
2676 * c-common.c (braced_list_to_string): New function.
2677 * c-common.h (braced_list_to_string): Declare it.
2678
f10a9135
NS
26792018-08-08 Nathan Sidwell <nathan@acm.org>
2680
2681 * c-common.c (try_to_locate_new_include_inertion_point): Use
2682 linemap_included_from_linemap.
2683 * c-lex.c (fe_file_change): Use linemap_included_from.
2684 * c-ppoutput.c (pp_file_change): Likewise.
2685
8a45b051
MS
26862018-08-01 Martin Sebor <msebor@redhat.com>
2687
2688 PR tree-optimization/86650
ab20d992 2689 * c-format.c (gcc_tdiag_char_table): Update comment for "%G".
8a45b051
MS
2690 (gcc_cdiag_char_table, gcc_cxxdiag_char_table): Same.
2691 (init_dynamic_diag_info): Update from "gcall *" to "gimple *".
2692 * c-format.h (T89_G): Update to be "gimple *" rather than
2693 "gcall *".
2694 (local_gcall_ptr_node): Rename...
2695 (local_gimple_ptr_node): ...to this.
2696
e540ccc0
DM
26972018-07-31 David Malcolm <dmalcolm@redhat.com>
2698
2699 * c-format.c (PP_FORMAT_CHAR_TABLE): New macro, based on existing
2700 table entries for gcc_diag_char_table, and the 'Z' entry from
2701 gcc_tdiag_char_table, changing the "chain" entry for 'Z' from
2702 &gcc_tdiag_char_table[0] to &gcc_diag_char_table[0].
2703 (gcc_diag_char_table): Use PP_FORMAT_CHAR_TABLE, implicitly
2704 adding missing "Z" for this table. Remove erroneous "G" and "K"
2705 entries.
2706 (gcc_tdiag_char_table): Use PP_FORMAT_CHAR_TABLE. Remove "v".
2707 (gcc_cdiag_char_table): Use PP_FORMAT_CHAR_TABLE.
2708 (gcc_cxxdiag_char_table): Use PP_FORMAT_CHAR_TABLE. Remove "v".
2709
425fc685
RE
27102018-07-31 Richard Earnshaw <rearnsha@arm.com>
2711
2712 * c-common.c (speculation_safe_resolve_call): New function.
2713 (speculation_safe_resolve_params): New function.
2714 (speculation_safe_resolve_return): New function.
2715 (resolve_overloaded_builtin): Handle __builtin_speculation_safe_value.
2716 * c-cppbuiltin.c (c_cpp_builtins): Add pre-define for
2717 __HAVE_SPECULATION_SAFE_VALUE.
2718
181463c2
DM
27192018-07-20 David Malcolm <dmalcolm@redhat.com>
2720
2721 * c-common.c (c_cpp_error): Remove redundant "line_table"
2722 parameter from call to rich_location::set_range.
2723 (maybe_suggest_missing_token_insertion): Likewise.
2724
0d7f9065
MS
27252018-07-20 Martin Sebor <msebor@redhat.com>
2726
2727 PR middle-end/82063
ab20d992 2728 * c.opt (-Warray-bounds): Remove redundant -Wall.
0d7f9065 2729
00abf86c
MS
27302018-07-20 Martin Sebor <msebor@redhat.com>
2731
2732 PR middle-end/82063
2733 * c-common.h (c_common_handle_option): Change function argument
2734 to HOST_WIDE_INT.
2735 * c-opts.c (c_common_init_options): Same.
2736 (c_common_handle_option): Same. Remove special handling of
2737 OPT_Walloca_larger_than_ and OPT_Wvla_larger_than_.
2738 * c.opt (-Walloc-size-larger-than, -Walloca-larger-than): Change
2739 options to take a HOST_WIDE_INT argument and accept a byte-size
2740 suffix. Initialize.
2741 (-Wvla-larger-than): Same.
2742 (-Wno-alloc-size-larger-than, -Wno-alloca-larger-than): New.
2743 (-Wno-vla-larger-than): Same.
2744
9b452033
JJ
27452018-07-12 Jakub Jelinek <jakub@redhat.com>
2746
2747 * c-attribs.c (c_common_attribute_table): Add
2748 "omp declare target implicit" attribute.
2749
cd0762f3
RB
27502018-07-12 Richard Biener <rguenther@suse.de>
2751
2752 PR c/86453
2753 * c-attribs.c (handle_packed_attribute): Do not build a variant
2754 type with TYPE_PACKED, instead ignore the attribute if we may
2755 not apply to the original type.
2756
0b27c3ed
JJ
27572018-07-10 Jakub Jelinek <jakub@redhat.com>
2758
2759 PR c++/86443
2760 * c-omp.c (c_omp_check_loop_iv_r, c_omp_check_loop_iv): Allow declv
2761 to contain TREE_LIST for both the original class iterator and the
2762 "last" helper var.
2763
e730a0ef
EB
27642018-07-07 Eric Botcazou <ebotcazou@adacore.com>
2765
2766 * c-ada-spec.c (to_ada_name): Remove index parameter.
2767 (pp_ada_tree_identifier): Likewise.
2768 (dump_ada_macros): Adjust call to to_ada_name.
2769 (struct overloaded_name_hash): Delete.
2770 (struct overloaded_name_hasher): Likewise.
2771 (overloaded_names): Likewise.
2772 (compute_overloading_index): Likewise.
2773 (dump_ada_decl_name): Do not call compute_overloading_index and
2774 adjust calls to pp_ada_tree_identifier.
2775 (dump_ada_double_name): Adjust calls to pp_ada_tree_identifier.
2776 (dump_ada_import): Add spc parameter and switch to aspect syntax.
2777 (dump_ada_function_declaration): Adjust call to pp_ada_tree_identifier.
2778 (dump_ada_enum_type): Remove type and display_convention parameters.
2779 Adjust calls to pp_ada_tree_identifier.
2780 (dump_ada_node): Likewise and for dump_ada_structure.
2781 (dump_nested_type) <ENUMERAL_TYPE>: Adjust call to dump_ada_enum_type
2782 and tidy up.
2783 <RECORD_TYPE>: Adjust call to dump_ada_structure and switch to aspect
2784 syntax.
2785 (print_constructor): Adjust call to pp_ada_tree_identifier.
2786 (print_destructor): Likewise.
2787 (dump_ada_declaration): Switch to aspect syntax.
2788 (dump_ada_structure): Likewise and tidy up. Replace display_convention
2789 parameter with nested parameter.
2790 (dump_ads): Emit pragma Ada_2012 in lieu of pragma Ada_2005.
2791 (dump_ada_specs): Do not delete overloaded_names table.
2792
8de583fc
PB
27932018-07-06 Peter Bergner <bergner@linux.ibm.com>
2794
2795 PR target/86324
e730a0ef 2796 * c-attribs.c (handle_mode_attribute): Call translate_mode_attribute
8de583fc
PB
2797 target hook.
2798
09cff37b
NS
27992018-07-05 Nathan Sidwell <nathan@acm.org>
2800
2801 * c-lex.c (fe_file_change): Check SYSTEM_IMPLICIT_EXTERN_C not
2802 NO_IMPLICIT_EXTERN_C.
2803
98086b2b
ML
28042018-06-28 Martin Liska <mliska@suse.cz>
2805
2806 * cppspec.c: Include opt-suggestions.h.
2807
ab20d992
JJ
28082018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
2809 Thomas Schwinge <thomas@codesourcery.com>
829c6349
CLT
2810 Cesar Philippidis <cesar@codesourcery.com>
2811
2812 * c-pragma.h (enum pragma_omp_clause): Add
2813 PRAGMA_OACC_CLAUSE_{FINALIZE,IF_PRESENT}. Remove
2814 PRAGMA_OACC_CLAUSE_PRESENT_OR_{COPY,COPYIN,COPYOUT,CREATE}.
2815
f41b7612
JJ
28162018-06-20 Jakub Jelinek <jakub@redhat.com>
2817
2818 PR c++/86210
2819 * c-common.c (check_nonnull_arg): Use fold_for_warn. Adjust obsolete
2820 comment.
2821
4252ccd7
MS
28222018-06-18 Martin Sebor <msebor@redhat.com>
2823
2824 PR middle-end/85602
2825 * c-warn.c (sizeof_pointer_memaccess_warning): Check for attribute
2826 nonstring.
2827
e197e64e
KV
28282018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
2829
2830 * c-common.c (c_common_truthvalue_conversion): Handle ABSU_EXPR.
2831
34a7a230
JM
28322018-06-13 Jason Merrill <jason@redhat.com>
2833
5cef3733
JM
2834 * c-opts.c (c_common_post_options): Warn about useless -Wabi.
2835 (c_common_handle_option) [OPT_Wabi_]: Remove flag_abi_compat_version
2836 handling.
2837
34a7a230
JM
2838 PR c++/86094 - wrong code with defaulted move ctor.
2839 * c-opts.c (c_common_post_options): Bump the current ABI version to
2840 13. Set warn_abi_version and flag_abi_compat_version to the current
2841 version rather than 0. Fix defaulting flag_abi_compat_version from
2842 warn_abi_version.
2843
bb0f14ae
MS
28442018-06-12 Martin Sebor <msebor@redhat.com>
2845
2846 PR c/85931
2847 * c-warn.c (sizeof_pointer_memaccess_warning): Avoid warning when
2848 sizeof source and destination yields the same value.
2849
3713f2e2
ML
28502018-06-12 Martin Liska <mliska@suse.cz>
2851
2852 * c.opt: Make MPX-related options as Deprecated.
2853
4af78ef8
DM
28542018-06-08 David Malcolm <dmalcolm@redhat.com>
2855
2856 * c-pretty-print.c (c_pretty_printer::statement): Use TDF_NONE
2857 rather than 0.
2858
31db0fe0
ML
28592018-06-08 Martin Liska <mliska@suse.cz>
2860
2861 * c-attribs.c (handle_bnd_variable_size_attribute): Remove support
2862 for MPX (macros, related functions, fields in cgraph_node, ...).
2863 (handle_bnd_legacy): Likewise.
2864 (handle_bnd_instrument): Likewise.
2865 * c.opt: Likewise.
2866
fe16acf2
JJ
28672018-06-06 Jakub Jelinek <jakub@redhat.com>
2868
2869 PR c++/86068
2870 * c-cppbuiltin.c (c_cpp_builtins): Fix a typo, set
2871 __cpp_transactional_memory to 201500 instead of 210500.
2872
4dbdb49b
JM
28732018-06-06 Jason Merrill <jason@redhat.com>
2874
2875 PR c++/85710 - ICE with -Wmemset-elt-size.
2876 * c-warn.c (warn_for_memset): Don't crash on incomplete element type.
2877
f8ad043f
JM
28782018-06-01 Jason Merrill <jason@redhat.com>
2879
2880 * c-cppbuiltin.c (c_cpp_builtins): Bump __cpp_deduction_guides to
2881 201703.
2882
abc24d93
EB
28832018-06-01 Eric Botcazou <ebotcazou@adacore.com>
2884
2885 * c-ada-spec.c (dump_ada_declaration) <TYPE_DECL>: Generate a forward
2886 declaration for a typedef independently of whether the declaration of
2887 the subtype is generated.
2888
d258f4aa
MS
28892018-05-31 Martin Sebor <msebor@redhat.com>
2890
2891 PR c/82063
2892 * c.opt (-Wno-alloc-size-larger-than): New option.
2893
b67b9225
DP
28942018-04-22 David Pagan <dave.pagan@oracle.com>
2895
2896 PR c/55976
2897 * c-opts.c (c_common_post_options): Set default for warn_return_type
ab20d992 2898 for C++/C++ with ObjC extensions only. For C, makes it possible to
b67b9225
DP
2899 differentiate between default (no option), -Wreturn-type, and
2900 -Wno-return-type.
2901
04eb9c55
JM
29022018-05-29 Jason Merrill <jason@redhat.com>
2903
2904 * c.opt (Winit-list-lifetime): New flag.
2905
b0c31bc6
BE
29062018-05-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
2907
2908 * c-lex.c (get_fileinfo): Use splay_tree_compare_strings and
2909 splay_tree_delete_pointers.
2910
44284983
JJ
29112018-05-26 Jakub Jelinek <jakub@redhat.com>
2912
2913 PR bootstrap/85921
2914 * c-warn.c (diagnose_mismatched_attributes): Remove unnecessary
2915 noinline variable to workaround broken kernel headers.
2916
b46b715d
JM
29172018-05-18 Jason Merrill <jason@redhat.com>
2918
2919 * c.opt (Wdeprecated-copy): New flag.
2920
40659769
ML
29212018-05-17 Martin Liska <mliska@suse.cz>
2922
2923 * c-warn.c (overflow_warning): Do not use
2924 space in between 'G_' and '('.
2925
403962ea
JM
29262018-05-09 Jason Merrill <jason@redhat.com>
2927
2928 * c-common.c (valid_array_size_p): Add complain parameter.
2929 * c-common.h: ...which defaults to true.
2930
1c9ee609
JJ
29312018-05-11 Jakub Jelinek <jakub@redhat.com>
2932
2933 PR c/85696
2934 * c-omp.c (c_omp_predetermined_sharing): Return
2935 OMP_CLAUSE_DEFAULT_SHARED for artificial vars with integral type.
2936
19916065
ML
29372018-05-11 Martin Liska <mliska@suse.cz>
2938
92a285c1 2939 PR sanitizer/85556
19916065
ML
2940 * c-attribs.c (handle_no_sanitize_attribute): Iterate all
2941 TREE_LIST values.
2942
79e7b1fe
JJ
29432018-05-10 Jakub Jelinek <jakub@redhat.com>
2944
2945 PR c++/85662
2946 * c-common.h (fold_offsetof_1): Removed.
2947 (fold_offsetof): Add TYPE argument defaulted to size_type_node and
2948 CTX argument defaulted to ERROR_MARK.
2949 * c-common.c (fold_offsetof_1): Renamed to ...
2950 (fold_offsetof): ... this. Remove wrapper function. Add TYPE
2951 argument, convert the pointer constant to TYPE and use size_binop
2952 with PLUS_EXPR instead of fold_build_pointer_plus if type is not
2953 a pointer type. Adjust recursive calls.
2954
86c12f76
EB
29552018-05-10 Eric Botcazou <ebotcazou@adacore.com>
2956
2957 PR c++/85400
2958 * c-attribs.c (handle_visibility_attribute): Do not set no_add_attrs.
2959
ee336e84
NS
29602018-05-07 Nathan Sidwell <nathan@acm.org>
2961
2962 * c.opt (ffor-scope): Remove functionality, issue warning.
2963
6c072e21
NS
29642018-05-03 Nathan Sidwell <nathan@acm.org>
2965
2966 * c.opt (ffriend-injection): Remove functionality, issue warning.
2967
2cc7d3a7
DM
29682018-05-01 David Malcolm <dmalcolm@redhat.com>
2969
2970 PR c/84258
2971 * c-format.c (struct format_check_results): Add field
2972 "number_non_char".
2973 (check_format_info): Initialize it, and warn if encountered.
2974 (check_format_arg): Distinguish between wide char and
2975 everything else when detecting arrays of non-char.
2976
7761dfbe
DM
29772018-04-30 David Malcolm <dmalcolm@redhat.com>
2978
2979 * c-format.c (get_corrected_substring): Update for
2980 location_get_source_line returning a char_span. Use a char_span
2981 when handling the prefix of the correction.
2982 * c-indentation.c (get_visual_column): Update for
2983 location_get_source_line returning a char_span.
2984 (get_first_nws_vis_column): Likewise.
2985
62e98ef1
DM
29862018-03-29 David Malcolm <dmalcolm@redhat.com>
2987
2988 PR c++/84269
2989 * known-headers.cc (get_stdlib_header_for_name): Add various names
2990 from <assert.h>, <string.h>, and <memory.h>; add more names from
2991 <stdio.h>.
2992
a7dea617
JJ
29932018-03-27 Jakub Jelinek <jakub@redhat.com>
2994
2995 PR c++/85061
2996 * c-common.c (fold_offsetof_1) <case COMPOUND_EXPR>: Assert that
2997 get_base_address of the second operand is a VAR_P, rather than the
2998 operand itself, and use gcc_checking_assert instead of gcc_assert.
2999
889a3a30
MP
30002018-03-23 Marek Polacek <polacek@redhat.com>
3001
3002 PR c++/85045
3003 * c-pretty-print.c (c_pretty_printer::multiplicative_expression)
3004 <case RDIV_EXPR>: Tweak condition.
3005
452154b9
EB
30062018-03-20 Eric Botcazou <ebotcazou@adacore.com>
3007
3008 * c-ada-spec.c (pp_ada_tree_identifier): Deal specifically with _Bool.
3009
63ecb626
JJ
30102018-03-16 Jakub Jelinek <jakub@redhat.com>
3011
ce811fc4
JJ
3012 PR c/84909
3013 * c-warn.c (conversion_warning): Replace "to to" with "to" in
3014 diagnostics.
3015
63ecb626
JJ
3016 PR c/84910
3017 * c-warn.c (diagnose_mismatched_attributes): Remove trailing space from
3018 diagnostics.
3019
a1295eec
RB
30202018-03-16 Richard Biener <rguenther@suse.de>
3021
3022 PR c/84873
3023 * c-gimplify.c (c_gimplify_expr): Revert previous change. Instead
3024 unshare the possibly folded expression.
3025
919674fb
RB
30262018-03-15 Richard Biener <rguenther@suse.de>
3027
3028 PR c/84873
3029 * c-gimplify.c (c_gimplify_expr): Do not fold expressions.
3030
f99309b2
MS
30312018-03-13 Martin Sebor <msebor@redhat.com>
3032
3033 PR tree-optimization/84725
3034 * c-attribs.c (handle_nonstring_attribute): Allow attribute nonstring
3035 with all three narrow character types, including their qualified forms.
3036
e9b9fa4c
MS
30372018-03-12 Martin Sebor <msebor@redhat.com>
3038
3039 PR tree-optimization/83456
ab20d992 3040 * c-common.c (check_function_restrict): Return bool.
e9b9fa4c
MS
3041 Restore checking of bounded built-in functions.
3042 (check_function_arguments): Also return the result
3043 of warn_for_restrict.
ab20d992
JJ
3044 * c-common.c (check_function_restrict): Return bool.
3045 * c-warn.c (warn_for_restrict): Return bool.
e9b9fa4c 3046
0805d020
MP
30472018-03-02 Marek Polacek <polacek@redhat.com>
3048
3049 PR c++/84171
3050 * c-warn.c (warn_for_sign_compare): Bail out if any of the operands
3051 is erroneous.
3052
ed2a2f08
TS
30532018-03-02 Thomas Schwinge <thomas@codesourcery.com>
3054
3055 * c-attribs.c (c_common_attribute_table): Remove "cilk simd
3056 function".
3057
90abdde0
MP
30582018-03-01 Marek Polacek <polacek@redhat.com>
3059
3060 PR c++/84639
3061 * c-attribs.c (common_handle_aligned_attribute): Don't use invalid
3062 alignment in computation.
3063
c6db43fa
EB
30642018-02-28 Eric Botcazou <ebotcazou@adacore.com>
3065
3066 * c-ada-spec.c (dump_ada_node) <NULLPTR_TYPE>: New case.
3067 <REAL_TYPE>: Deal specifically with _Float128/__float128.
3068
9e25c7ed
EB
30692018-02-28 Eric Botcazou <ebotcazou@adacore.com>
3070
3071 * c-ada-spec.c (dump_ada_double_name) <ENUMERAL_TYPE>: New case.
3072 (is_char_array): Take a type instead of a declaration.
3073 (dump_ada_array_type): Likewise.
3074 (is_simple_enum): Minor tweak.
3075 (dump_ada_enum_type): New function extracted from...
3076 (dump_ada_node) <ENUMERAL_TYPE>: ...here. Invoke it.
3077 <INTEGER_TYPE>: Remove unreachable code.
3078 <RECORD_TYPE>: Likewise. Minor tweaks.
3079 (dump_nested_type) <ARRAY_TYPE>: Adjust to above changes.
3080 <ENUMERAL_TYPE>: New case.
3081 <RECORD_TYPE>: Factor out common code.
3082 (dump_ada_declaration) <ARRAY_TYPE>: Adjust to above changes.
3083 Minor tweaks. Deal with enumeral types.
3084 (dump_ada_structure): Minor tweaks.
3085
09de3550
EB
30862018-02-28 Eric Botcazou <ebotcazou@adacore.com>
3087
3088 * c-ada-spec.c (dump_ada_node) <POINTER_TYPE>: Do not use generic
3089 address for incomplete structures.
3090 (dump_forward_type): Do not bail out for incomplete structures.
3091 (dump_ada_declaration): Do not special-case incomplete structures
3092 for subtypes. Dump them as null records for types.
3093
095d8d4b
EB
30942018-02-28 Eric Botcazou <ebotcazou@adacore.com>
3095
3096 * c-ada-spec.c (dump_ada_import): Use boolean and fix formatting.
3097 (is_char_array): Fix formatting.
3098 (dump_template_types): Likewise.
3099 (dump_generic_ada_node): Rename into...
3100 (dump_ada_node): ...this.
3101 <POINTER_TYPE>: Remove superfluous space. Use generic address for
3102 incomplete structures and not for empty structures. Do not use it
3103 when forward declarations are needed.
3104 (dump_forward_type): New function.
3105 (dump_nested_types): Remove FORWARD parameter. Do not consider
3106 TREE_VISITED and do not generate a forward declaration. Only dump
3107 original nested types for nested declaration.
3108 (dump_nested_type) <POINTER_TYPE>: Call dump_forward_type.
3109 <ARRAY_TYPE>: Likewise if the component type is an anonymous pointer.
3110 <RECORD_TYPE>: Do not consider TREE_VISITED.
3111 (dump_ada_declaration): Use booleans and fix formatting throughout.
3112 <TYPE_DECL>: Skip incomplete structures and not empty structures.
3113 Call dump_forward_type instead of dump_nested_types for a typedef.
3114 Remove superfluous check and adjust call to dump_nested_types.
3115 <POINTER_TYPE>: Call dump_forward_type and fall through.
3116 (dump_ada_struct_decl): Rename into...
3117 (dump_ada_structure): ...this. Do not special-case empty structures.
3118
d4cfd486
MS
31192018-02-27 Martin Sebor <msebor@redhat.com>
3120
3121 PR c++/83871
3122 * c.opt (-Wmissing-attributes): New option.
3123
b22dbd03
ML
31242018-02-21 Martin Liska <mliska@suse.cz>
3125
3126 * c.opt (Wcatch-value=): Add IntegerRange.
3127
883dfe2a
JM
31282018-02-15 Jason Merrill <jason@redhat.com>
3129
3130 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_deduction_guides.
3131
0444aa9c
NS
31322018-02-09 Nathan Sidwell <nathan@acm.org>
3133
3134 PR c/84293
3135 * c-common.h (strict_aliasing_warning): Drop OTYPE arg, insert LOC
3136 arg.
3137 * c-warn.c (strict_aliasing_warning): Drop OTYPE arg, require LOC
3138 arg. Adjust.
3139
cea71f0a
MS
31402018-02-09 Martin Sebor <msebor@redhat.com>
3141
3142 PR lto/84212
3143 * c.opt (-Wstringop-overflow, -Warray-bounds): Add LTO.
3144 (-Walloc-size-larger-than, -Wformat-truncation=): Same.
3145 (-Wmaybe-uninitialized, -Wnonnull, -Wrestrict): Same.
3146 (-Wstrict-overflow, -Wsuggest-attribute): Same.
3147 (-Wuninitialized): Same.
3148
8c8b7be5
EB
31492018-02-09 Eric Botcazou <ebotcazou@adacore.com>
3150
3151 * c-ada-spec.c (dump_ada_declaration): Do not generate the 'constant'
3152 keyword for components.
3153
7c30b12a
PC
31542018-02-02 Paolo Carlini <paolo.carlini@oracle.com>
3155
3156 * c-common.h (DECL_UNNAMED_BIT_FIELD): New.
3157
eece7fe5
JK
31582018-02-02 Julia Koval <julia.koval@intel.com>
3159
3160 * c-common.h (omp_clause_mask): Move to wide_int_bitmask.h.
3161
7d07a93a
MP
31622018-01-29 Marek Polacek <polacek@redhat.com>
3163
3164 PR c/83966
3165 * c-format.c (check_function_format): Check current_function_decl.
3166
53723269
JJ
31672018-01-27 Jakub Jelinek <jakub@redhat.com>
3168
3169 * c-cppbuiltin.c (c_cpp_builtins): Use ggc_strdup for the fp_suffix
3170 argument.
3171 (LAZY_HEX_FP_VALUES_CNT): Define.
3172 (lazy_hex_fp_values): Allow up to LAZY_HEX_FP_VALUES_CNT lazy hex fp
3173 values rather than just 12.
3174 (builtin_define_with_hex_fp_value): Likewise.
3175
7365279f
BK
31762018-01-18 Boris Kolpackov <boris@codesynthesis.com>
3177
92a285c1
ML
3178 PR other/70268
3179 * c.opt (-fmacro-prefix-map): New option.
3180 * c-opts.c (c_common_handle_option): Handle it.
3181 * c-lex.c (init_c_lex): Set remap_filename cpp callback.
3182 * c-ppoutput.c (init_pp_output): Likewise.
7365279f 3183
bb9869d5
DM
31842018-01-17 David Malcolm <dmalcolm@redhat.com>
3185
3186 PR c++/83814
3187 * c-common.c (fold_for_warn): Move to c/c-fold.c and cp/expr.c.
3188
68dc87c3
EB
31892018-01-10 Eric Botcazou <ebotcazou@adacore.com>
3190
3191 * c-ada-spec.c (dump_number): Add FLOAT_P parameter.
3192 Skip 'f' and 'F' characters if it is true.
3193 (store_ada_macro): Minor tweak.
3194 (dump_ada_macros) <CPP_COMMENT>: Likewise.
3195 <CPP_WSTRING>: Likewise.
3196 <CPP_STRING>: Output '&' in the buffer if not the first string.
3197 <CPP_NUMBER>: Adjust calls to dump_number.
3198
9a004410
DM
31992018-01-10 David Malcolm <dmalcolm@redhat.com>
3200
3201 PR c++/43486
3202 * c-common.c: Include "selftest.h".
3203 (get_atomic_generic_size): Perform the test for integral type
3204 before the range test for any integer constant, fixing indentation
3205 of braces. Call fold_for_warn before testing for an INTEGER_CST.
3206 (reject_gcc_builtin): Strip any location wrapper from EXPR.
3207 (selftest::test_fold_for_warn): New function.
3208 (selftest::c_common_c_tests): New function.
3209 (selftest::c_family_tests): Call it, and
3210 selftest::c_pretty_print_c_tests.
3211 * c-common.h (selftest::c_pretty_print_c_tests): New decl.
3212 * c-format.c (check_format_arg): Convert VAR_P check to a
3213 fold_for_warn.
3214 * c-pretty-print.c: Include "selftest.h".
3215 (pp_c_cast_expression): Don't print casts for location wrappers.
3216 (selftest::assert_c_pretty_printer_output): New function.
3217 (ASSERT_C_PRETTY_PRINTER_OUTPUT): New macro.
3218 (selftest::test_location_wrappers): New function.
3219 (selftest::c_pretty_print_c_tests): New function.
3220 * c-warn.c (warn_for_memset): Call fold_for_warn on the arguments.
3221
5c0caeb3
RS
32222018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
3223 Alan Hayward <alan.hayward@arm.com>
3224 David Sherwood <david.sherwood@arm.com>
3225
3226 * c-common.c (c_common_type_for_mode): Handle MODE_VECTOR_BOOL.
3227
73a699ae
RS
32282018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
3229 Alan Hayward <alan.hayward@arm.com>
3230 David Sherwood <david.sherwood@arm.com>
3231
3232 * c-ubsan.c (ubsan_instrument_shift): Treat GET_MODE_BITSIZE
3233 as polynomial.
3234
928686b1
RS
32352018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
3236 Alan Hayward <alan.hayward@arm.com>
3237 David Sherwood <david.sherwood@arm.com>
3238
3239 * c-common.c (vector_types_convertible_p, c_build_vec_perm_expr)
3240 (convert_vector_to_array_for_subscript): Handle polynomial
3241 TYPE_VECTOR_SUBPARTS.
3242 (c_common_type_for_mode): Check valid_vector_subparts_p.
3243 * c-pretty-print.c (pp_c_initializer_list): Handle polynomial
3244 VECTOR_CST_NELTS.
3245
85ec4feb
JJ
32462018-01-03 Jakub Jelinek <jakub@redhat.com>
3247
3248 Update copyright years.
3249
170a8bd6 32502017-12-22 Mike Stump <mikestump@comcast.net>
92a285c1 3251 Eric Botcazou <ebotcazou@adacore.com>
170a8bd6
EB
3252
3253 * c-pragma.c (init_pragma): Register pragma GCC unroll.
3254 * c-pragma.h (enum pragma_kind): Add PRAGMA_UNROLL.
3255
ab20d992 32562017-12-22 Alexandre Oliva <aoliva@redhat.com>
18408e96
AO
3257
3258 PR debug/83527
3259 PR debug/83419
3260 * c-semantics.c (only_debug_stmts_after_p): New.
3261 (pop_stmt_list): Clear side effects in debug-only stmt list.
3262 Check for single nondebug stmt followed by debug stmts only.
3263
c12d20d4
AO
32642017-12-21 Alexandre Oliva <aoliva@redhat.com>
3265
3266 PR debug/83419
3267 * c-semantics.c (pop_stmt_list): Propagate side effects from
3268 single nondebug stmt to container list.
3269
01512446
JJ
32702017-12-19 Jakub Jelinek <jakub@redhat.com>
3271
3272 * known-headers.cc (get_stdlib_header_for_name): Replace Yoda
3273 conditions with typical order conditions.
3274
82cfbd01
MP
32752017-12-18 Marek Polacek <polacek@redhat.com>
3276
3277 * c-warn.c (warn_logical_operator): Return early if -Wlogical-op is
3278 not in effect.
3279
99da11ec
MS
32802017-12-17 Martin Sebor <msebor@redhat.com>
3281
3282 * c-attribs.c (common_handle_aligned_attribute): Avoid issuing
3283 an error for attribute warn_if_not_aligned.
3284
cc8bea0a
MS
32852017-12-16 Martin Sebor <msebor@redhat.com>
3286
3287 PR tree-optimization/78918
3288 * c-common.c (check_function_restrict): Avoid checking built-ins.
3289 * c.opt (-Wrestrict): Include in -Wall.
3290
4849deb1
JJ
32912017-12-15 Jakub Jelinek <jakub@redhat.com>
3292
3293 * c-attribs.c (c_common_attribute_table,
3294 c_common_format_attribute_table): Swap affects_type_identity
3295 and handler fields, adjust comments.
3296
c65e18d3
BE
32972017-12-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
3298
3299 * c.opt (Wcast-function-type): New warning option.
3300 * c-lex.c (get_fileinfo): Avoid warning.
3301 * c-ppoutput.c (scan_translation_unit_directives_only): Remove cast.
3302
2004617a
QZ
33032017-12-14 Qing Zhao <qing.zhao@oracle.com>
3304
7365279f 3305 PR middle_end/79538
2004617a
QZ
3306 * c-cppbuiltin.c (builtin_define_with_hex_fp_value):
3307 Adjust the size of buf1 and buf2, add a new buf to avoid
3308 format-overflow warning.
3309
ab20d992 33102017-12-12 Alexandre Oliva <aoliva@redhat.com>
96a95ac1
AO
3311
3312 * c-semantics.c (pop_stmt_list): Move begin stmt marker into
3313 subsequent statement list.
3314
5d9ae53d
MS
33152017-12-07 Martin Sebor <msebor@redhat.com>
3316
3317 PR c/81544
3318 PR c/81566
3319 * c-attribs.c (attr_aligned_exclusions): New array.
3320 (attr_alloc_exclusions, attr_cold_hot_exclusions): Same.
3321 (attr_common_exclusions, attr_const_pure_exclusions): Same.
3322 (attr_gnu_inline_exclusions, attr_inline_exclusions): Same.
3323 (attr_noreturn_exclusions, attr_returns_twice_exclusions): Same.
3324 (attr_warn_unused_result_exclusions): Same.
3325 (handle_hot_attribute, handle_cold_attribute): Simplify.
3326 (handle_const_attribute): Warn on function returning void.
3327 (handle_pure_attribute): Same.
3328 (handle_aligned_attribute): Diagnose conflicting attribute
3329 specifications.
3330 * c-warn.c (diagnose_mismatched_attributes): Simplify.
3331
c79144f8
DM
33322017-12-06 David Malcolm <dmalcolm@redhat.com>
3333
3334 PR c/83236
3335 * c-common.c (selftest::c_family_tests): Call
3336 selftest::c_spellcheck_cc_tests.
3337 * c-common.h (selftest::c_spellcheck_cc_tests): New decl.
3338 * c-spellcheck.cc: Include "selftest.h".
3339 (name_reserved_for_implementation_p): New function.
3340 (should_suggest_as_macro_p): New function.
3341 (find_closest_macro_cpp_cb): Move the check for NT_MACRO to
3342 should_suggest_as_macro_p and call it.
3343 (selftest::test_name_reserved_for_implementation_p): New function.
3344 (selftest::c_spellcheck_cc_tests): New function.
3345 * c-spellcheck.h (name_reserved_for_implementation_p): New decl.
3346
613bc14f
DM
33472017-12-06 David Malcolm <dmalcolm@redhat.com>
3348
3349 * c-spellcheck.cc: New file, taken from macro-handling code in
3350 spellcheck-tree.c.
3351 * c-spellcheck.h: New file, taken from macro-handling code in
3352 spellcheck-tree.h.
3353
e76c7157
JJ
33542017-12-01 Jakub Jelinek <jakub@redhat.com>
3355
3356 * c-attribs.c (c_common_attribute_table): Remove "cilk simd function"
3357 attribute.
3358 (handle_simd_attribute): Don't check for "cilk simd function"
3359 attribute. Reindent, formatting changes.
3360
b0da4034
JK
33612017-11-30 Julia Koval <julia.koval@intel.com>
3362
3363 * c-common.h (inv_list): Remove.
3364
058f0b9e
JJ
33652017-11-28 Jakub Jelinek <jakub@redhat.com>
3366
3367 PR sanitizer/81275
3368 * c-common.c (c_switch_covers_all_cases_p_1,
3369 c_switch_covers_all_cases_p): New functions.
3370 * c-common.h (c_switch_covers_all_cases_p): Declare.
3371
5e9d6aa4 33722017-11-28 Julia Koval <julia.koval@intel.com>
92a285c1 3373 Sebastian Peryt <sebastian.peryt@intel.com>
5e9d6aa4
JK
3374
3375 * array-notation-common.c: Delete.
3376 * c-cilkplus.c: Ditto.
3377 * c-common.c (_Cilk_spawn, _Cilk_sync, _Cilk_for): Remove.
3378 * c-common.def (ARRAY_NOTATION_REF): Remove.
3379 * c-common.h (RID_CILK_SPAWN, build_array_notation_expr,
3380 build_array_notation_ref, C_ORT_CILK, c_check_cilk_loop,
3381 c_validate_cilk_plus_loop, cilkplus_an_parts,
3382 cilk_ignorable_spawn_rhs_op,
3383 cilk_recognize_spawn): Remove.
3384 * c-gimplify.c (CILK_SPAWN_STMT): Remove.
3385 * c-omp.c: Remove CILK_SIMD check.
3386 * c-pragma.c: Ditto.
3387 * c-pragma.h: Remove CILK related pragmas.
3388 * c-pretty-print.c (c_pretty_printer::postfix_expression): Remove
3389 ARRAY_NOTATION_REF condition.
3390 (c_pretty_printer::expression): Ditto.
3391 * c.opt (fcilkplus): Remove.
3392 * cilk.c: Delete.
3393
1af4ebf5
MG
33942017-11-21 Marc Glisse <marc.glisse@inria.fr>
3395
3396 * c-pretty-print.c (pp_c_additive_expression,
3397 c_pretty_printer::expression): Handle POINTER_DIFF_EXPR.
3398
d44ed508
JJ
33992017-11-21 Jakub Jelinek <jakub@redhat.com>
3400
7d2f0f9b
JJ
3401 * c-common.c (get_nonnull_operand): Use tree_to_uhwi.
3402
d44ed508
JJ
3403 PR c++/83059
3404 * c-common.c (get_atomic_generic_size): Use TREE_INT_CST_LOW
3405 instead of tree_to_uhwi, formatting fix.
3406
26edace6
DM
34072017-11-20 David Malcolm <dmalcolm@redhat.com>
3408
3409 PR c/81404
3410 * known-headers.cc: New file, based on material from c/c-decl.c.
3411 (suggest_missing_header): Copied as-is.
3412 (get_stdlib_header_for_name): New, based on get_c_name_hint but
3413 heavily edited to add C++ support. Add some knowledge about
3414 <limits.h>, <stdint.h>, and <wchar.h>.
3415 * known-headers.h: Likewise.
3416
6c7a259b
DM
34172017-11-20 David Malcolm <dmalcolm@redhat.com>
3418
3419 * c-common.h (enum lookup_name_fuzzy_kind): Move to name-hint.h.
3420 (lookup_name_fuzzy): Likewise. Convert return type from
3421 const char * to name_hint. Add location_t param.
3422 * name-hint.h: New header.
3423
f9c59f7e
JJ
34242017-11-19 Jakub Jelinek <jakub@redhat.com>
3425
3426 PR c/66618
3427 PR c/69960
3428 * c-common.h (c_fully_fold): Add LVAL argument defaulted to false.
3429
1e39313a
JM
34302017-11-16 Joseph Myers <joseph@codesourcery.com>
3431
3432 * c.opt (-std=c17, std=gnu17, -std=iso9899:2017): Refer to 2018
3433 expected publication date of C17.
3434 (-std=c18, -std=gnu18, -std=iso9899:2018): New option aliases.
3435
3ca0dc60
JM
34362017-11-15 Joseph Myers <joseph@codesourcery.com>
3437
3438 PR c/81156
3439 * c-common.c (c_common_reswords): Add __builtin_tgmath.
3440 * c-common.h (enum rid): Add RID_BUILTIN_TGMATH.
3441
025d57f0
MS
34422017-11-10 Martin Sebor <msebor@redhat.com>
3443
3444 PR c/81117
3445 * c-common.c (catenate_strings): Use memcpy instead of strncpy.
3446 * c-warn.c (sizeof_pointer_memaccess_warning): Handle arrays.
3447 * c.opt (-Wstringop-truncation): New option.
3448
1b6fa695
ML
34492017-11-06 Martin Liska <mliska@suse.cz>
3450
3451 PR middle-end/82404
3452 * c-opts.c (c_common_post_options): Set -Wreturn-type for C++
3453 FE.
3454 * c.opt: Set default value of warn_return_type.
3455
64a5912c
DM
34562017-10-31 David Malcolm <dmalcolm@redhat.com>
3457
3458 * c-common.c (binary_op_error): Update for renaming of
3459 error_at_rich_loc.
3460 (c_parse_error): Likewise.
3461 * c-warn.c (warn_logical_not_parentheses): Likewise for
3462 renaming of inform_at_rich_loc.
3463 (warn_for_restrict): Likewise for renaming of
3464 warning_at_rich_loc_n.
3465
c76dc9c3
JM
34662017-10-30 Joseph Myers <joseph@codesourcery.com>
3467
3468 * c.opt (std=c17, std=gnu17, std=iso9899:2017): New options.
3469 * c-opts.c (set_std_c17): New function.
3470 (c_common_init_options): Use gnu17 as default C version.
3471 (c_common_handle_option): Handle -std=c17 and -std=gnu17.
3472
ee5fd23a
MM
34732017-10-27 Michael Meissner <meissner@linux.vnet.ibm.com>
3474
3475 * c-cppbuiltin.c (mode_has_fma): Add support for PowerPC KFmode.
3476 (c_cpp_builtins): If a machine has a fast fma _Float<N> and
3477 _Float<N>X variant, define __FP_FAST_FMA<N> and/or
3478 __FP_FAST_FMA<N>X.
3479
d1047465
MP
34802017-10-23 Marek Polacek <polacek@redhat.com>
3481
3482 PR c/82681
3483 * c-warn.c (warnings_for_convert_and_check): Fix typos.
3484
9e878cf1
EB
34852017-10-19 Eric Botcazou <ebotcazou@adacore.com>
3486
3487 * c-common.c (check_builtin_function_arguments): Also check arguments
3488 of __builtin_alloca_with_align_and_max.
3489
89b6abbb
DM
34902017-10-17 David Malcolm <dmalcolm@redhat.com>
3491
3492 * c-format.c (format_warning_at_char): Pass UNKNOWN_LOCATION
3493 rather than NULL to format_warning_va.
3494 (check_format_types): Likewise when calling format_type_warning.
3495 Remove code to extract source_ranges and source_range * in favor
3496 of just a location_t.
3497 (format_type_warning): Convert source_range * param to a
3498 location_t.
3499
39382c09
JJ
35002017-10-13 Jakub Jelinek <jakub@redhat.com>
3501
3502 * c-gimplify.c (c_gimplify_expr): Handle [LR]ROTATE_EXPR like
3503 [LR]SHIFT_EXPR.
3504
62e1c678
DM
35052017-10-12 David Malcolm <dmalcolm@redhat.com>
3506
3507 * c-common.c (enum missing_token_insertion_kind): New enum.
3508 (get_missing_token_insertion_kind): New function.
3509 (maybe_suggest_missing_token_insertion): New function.
3510 * c-common.h (maybe_suggest_missing_token_insertion): New decl.
3511
b90c9338
NS
35122017-10-11 Nathan Sidwell <nathan@acm.org>
3513
3514 * c-opts.c (add_prefixed_path): Change chain to incpath_kind.
3515 (c_common_handle_option): Update incpath_kind names.
3516
3a266bcd
ML
35172017-10-11 Martin Liska <mliska@suse.cz>
3518
3519 PR sanitizer/82490
3520 * c-attribs.c (handle_no_sanitize_attribute): Report directly
3521 Wattributes warning.
3522
8e6cdc90
RS
35232017-10-10 Richard Sandiford <richard.sandiford@linaro.org>
3524
3525 * c-ada-spec.c (dump_generic_ada_node): Use wi::to_wide when
3526 operating on trees as wide_ints.
3527 * c-common.c (pointer_int_sum): Likewise.
3528 * c-pretty-print.c (pp_c_integer_constant): Likewise.
3529 * c-warn.c (match_case_to_enum_1): Likewise.
3530 (c_do_switch_warnings): Likewise.
3531 (maybe_warn_shift_overflow): Likewise.
3532
802b38c9
JJ
35332017-10-10 Jakub Jelinek <jakub@redhat.com>
3534
3535 PR c/82437
3536 * c-warn.c (warn_tautological_bitwise_comparison): Use wi::to_wide
3537 instead of wide_int::from.
3538
4e34b338
JJ
35392017-10-06 Jakub Jelinek <jakub@redhat.com>
3540
3541 PR c/82437
3542 * c-warn.c (warn_tautological_bitwise_comparison): Instead of
3543 using to_widest use wide_int with the larger of the two precisions.
3544
4bc4b2b4
BE
35452017-10-05 Bernd Edlinger <bernd.edlinger@hotmail.de>
3546
3547 * c-pretty-print.c (pp_c_parameter_type_list): Print ... for variadic
3548 functions.
3549
a1488398
RS
35502017-10-02 Richard Sandiford <richard.sandiford@linaro.org>
3551
3552 * c-warn.c (warn_tautological_bitwise_comparison): Use wi::to_widest
3553 when combining the original unconverted comparison operands.
3554
01c9fb68
JJ
35552017-09-29 Jakub Jelinek <jakub@redhat.com>
3556
3557 * c-attribs.c (handle_noipa_attribute): Don't add "stack_protect"
3558 attribute.
3559
6e3e8419
EB
35602017-09-29 Eric Botcazou <ebotcazou@adacore.com>
3561
3562 * c-ada-spec.c (to_ada_name): Add index parameter.
3563 (pp_ada_tree_identifier): Likewise.
3564 (dump_ada_macros): Adjust call to to_ada_name.
3565 (struct overloaded_name_hash): New type.
3566 (struct overloaded_name_hasher): Likewise.
3567 (overloaded_names): New hash table.
3568 (compute_overloading_index): New function.
3569 (dump_ada_decl_name): Call it and pass the result to
3570 pp_ada_tree_identifier.
3571 (dump_ada_double_name): Adjust calls to pp_ada_tree_identifier.
3572 (dump_ada_function_declaration): Likewise.
3573 (dump_generic_ada_node): Likewise.
3574 (print_constructor): Likewise.
3575 (print_destructor): Likewise.
3576 (dump_ada_specs): Delete overloaded_names table.
3577
79310774
EB
35782017-09-29 Eric Botcazou <ebotcazou@adacore.com>
3579
3580 * c-ada-spec.c (max_ada_macros): Move around.
3581 (store_ada_macro_index): Likewise.
3582 (source_file): Rename into...
3583 (macro_source_file): ...this.
3584 (count_ada_macro): Move around.
3585 (store_ada_macro): Likewise.
3586 (compare_macro): Likewise.
3587 (print_ada_macros): Merge in...
3588 (dump_ada_macros): ...this.
3589 (source_file_base): Rename into...
3590 (current_source_file): ...this.
3591 (print_comment): Move around.
3592 (dump_ada_nodes): Call dump_ada_declaration directly.
3593 (struct with): Change type of limited field to bool.
3594 (append_withs): Change type of limited_access parameter to bool.
3595 (pp_ada_tree_identifie): Likewise.
3596 (dump_ada_decl_nam): Likewise.
3597 (dump_generic_ada_node): Likewise. Do not print the return type.
3598 (to_ada_name): Change type of space_found parameter to bool.
3599 (dump_ada_function_declaration): Return void and change type of
3600 parameters to bool. Also print the return type for a function.
3601 (print_ada_methods): Rename into...
3602 (dump_ada_methods): ...this.
3603 (print_ada_declaration): Rename into ...
3604 (dump_ada_declaration): ...this. Do not print the return type.
3605 (print_ada_struct_decl): Rename into...
3606 (dump_ada_struct_decl): ...this.
3607
7d386d45
JJ
36082017-09-29 Jakub Jelinek <jakub@redhat.com>
3609
3610 * c-attribs.c (handle_packed_attribute): Test DECL_C_BIT_FIELD
3611 rather than DECL_INITIAL.
3612 (common_handle_aligned_attribute): Likewise.
3613
ab20d992 36142017-09-20 Alexandre Oliva <aoliva@redhat.com>
9ed32e27
AO
3615
3616 * c.opt (gen-decls): Add RejectNegative.
3617
026a79f7
AS
36182017-09-15 Andrew Sutton <andrew.n.sutton@gmail.com>
3619 Jakub Jelinek <jakub@redhat.com>
3620
3621 Add support for -std=c++2a.
3622 * c-common.h (cxx_dialect): Add cxx2a as a dialect.
3623 * opt.c: Add options for -std=c++2a and -std=gnu++2a.
3624 * c-opts.c (set_std_cxx2a): New.
3625 (c_common_handle_option): Set options when -std=c++2a is enabled.
3626 (c_common_post_options): Adjust comments.
3627 (set_std_cxx14, set_std_cxx17): Likewise.
3628
4a8ca690
EB
36292017-09-15 Eric Botcazou <ebotcazou@adacore.com>
3630
3631 * c-pragma.c (handle_pragma_scalar_storage_order): Expand on error
3632 message for non-uniform endianness and issue a warning in C++.
3633
7b936140
JJ
36342017-09-15 Jakub Jelinek <jakub@redhat.com>
3635
3636 * c.opt (Wc++1z-compat): Change from option to undocumented alias.
3637 (Wc++17-compat): Change from undocumented alias to option.
3638 (Wnoexcept-type): Enable by Wc++17-compat instead of Wc++1z-compat,
3639 change C++1z to C++17 in description.
3640 (std=c++1z, std=gnu++1z): Change from option to undocumented
3641 deprecated alias.
3642 (std=c++17, std=gnu++17): Change from undocumented alias to option.
3643 Adjust description.
3644 * c-common.h (enum cxx_dialect): Rename cxx1z to cxx17.
3645 * c-opts.c (set_std_cxx1z): Rename to ...
3646 (set_std_cxx17): ... this.
3647 (c_common_handle_option): Rename OPT_std_c__1z to OPT_std_c__17
3648 and OPT_std_gnu__1z to OPT_std_gnu__17. Adjust set_std_cxx1z
7365279f 3649 caller.
7b936140
JJ
3650 (c_common_post_options): Use cxx17 instead of cxx1z. Adjust
3651 comments.
3652
12263f13
L
36532017-09-12 H.J. Lu <hongjiu.lu@intel.com>
3654
3655 * c-attribs.c (common_handle_aligned_attribute): Don't warn
3656 function alignment if warn_if_not_aligned_p is true.
3657
6836632e
NS
36582017-09-12 Nathan Sidwell <nathan@acm.org>
3659
3660 * c-common.c (field_decl_cmp, resort_data, resort_field_decl_cmp,
3661 resort_sorted_fields): Move to c/c-decl.c.
3662 * c-common.h (field_decl_cmp, resort_sorted_fields): Delete.
3663 (struct sorted_fields_type): Move to c/c-lang.h.
3664
019bf9ad
JW
36652017-09-09 Jonathan Wakely <jwakely@redhat.com>
3666
3667 PR c++/81852
3668 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_threadsafe_static_init.
3669
bc7fe952
MP
36702017-09-04 Marek Polacek <polacek@redhat.com>
3671
3672 PR c/81783
3673 * c-warn.c (warn_tautological_bitwise_comparison): New function.
3674 (warn_tautological_cmp): Call it.
3675
ab20d992 36762017-09-01 Boris Kolpackov <boris@codesynthesis.com>
de7c2c6a
BK
3677
3678 * c-opts.c (c_common_finish): Write dependency information even if
3679 there are errors.
3680
d2e05fcb
JJ
36812017-09-01 Jakub Jelinek <jakub@redhat.com>
3682
3683 PR c/81887
3684 * c-pragma.c (omp_pragmas): Move "ordered" entry from here to ...
3685 (omp_pragmas_simd): ... here.
3686 * c-omp.c (c_finish_omp_ordered): If clauses isn't simd clause alone,
3687 create new clauses list containing just simd clause.
3688
18e2a8b8
RS
36892017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
3690 Alan Hayward <alan.hayward@arm.com>
3691 David Sherwood <david.sherwood@arm.com>
3692
3693 * c-attribs.c (vector_mode_valid_p) Fold GET_MODE_INNER call
3694 into scalar_mode_supported_p call.
3695 (handle_mode_attribute): Update call to scalar_mode_supported_p.
3696
16d22000
RS
36972017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
3698 Alan Hayward <alan.hayward@arm.com>
3699 David Sherwood <david.sherwood@arm.com>
3700
3701 * c-common.c (c_common_fixed_point_type_for_size): Use opt_scalar_mode
3702 for the mode iterator.
3703
b397965c
RS
37042017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
3705 Alan Hayward <alan.hayward@arm.com>
3706 David Sherwood <david.sherwood@arm.com>
3707
3708 * c-lex.c (interpret_fixed): Use SCALAR_TYPE_MODE.
3709 * c-common.c (c_build_vec_perm_expr): Likewise.
3710
357b7604
RS
37112017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
3712 Alan Hayward <alan.hayward@arm.com>
3713 David Sherwood <david.sherwood@arm.com>
3714
3715 * c-common.c (c_common_type_for_mode): Use as_a <scalar_int_mode>.
3716
e05c94ba
RS
37172017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
3718 Alan Hayward <alan.hayward@arm.com>
3719 David Sherwood <david.sherwood@arm.com>
3720
3721 * c-attribs.c (handle_mode_attribute): Check for a scalar_int_mode
3722 before calling targetm.addr_space.valid_pointer_mode.
3723
5c20c4af
RS
37242017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
3725 Alan Hayward <alan.hayward@arm.com>
3726 David Sherwood <david.sherwood@arm.com>
3727
3728 * c-cppbuiltin.c (c_cpp_builtins): Use opt_scalar_float_mode.
3729
c94843d2 37302017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
92a285c1
ML
3731 Alan Hayward <alan.hayward@arm.com>
3732 David Sherwood <david.sherwood@arm.com>
c94843d2
RS
3733
3734 * c-common.c (c_common_fixed_point_type_for_size): Use new mode
3735 iterators.
3736 * c-cppbuiltin.c (c_cpp_builtins): Likewise.
3737
4e10a5a7
RS
37382017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
3739 Alan Hayward <alan.hayward@arm.com>
3740 David Sherwood <david.sherwood@arm.com>
3741
3742 * c-cppbuiltin.c (mode_has_fma): Prefix mode names with E_ in
3743 case statements.
3744
130fcab0
ML
37452017-08-29 Martin Liska <mliska@suse.cz>
3746
3747 PR other/39851
3748 * c-common.c (parse_optimize_options): Add argument to function
3749 call.
3750 * c-pragma.c (handle_pragma_diagnostic): Likewise.
3751
14e18d71
DM
37522017-08-24 David Malcolm <dmalcolm@redhat.com>
3753
3754 * c-lex.c (interpret_float): Use token location
3755 when building an EXCESS_PRECISION_EXPR.
3756
2f687306
DM
37572017-08-21 David Malcolm <dmalcolm@redhat.com>
3758
3759 * c-common.c (check_function_arguments): Add "arglogs" param; pass
3760 it to check_function_format.
3761 * c-common.h (check_function_arguments): Add vec<location_t> *
3762 param.
3763 (check_function_format): Likewise.
3764 * c-format.c (struct format_check_context): Add field "arglocs".
3765 (check_function_format): Add param "arglocs"; pass it to
3766 check_format_info.
ab20d992 3767 (check_format_info): Add param "arglocs"; use it to initialize
2f687306
DM
3768 new field of format_ctx.
3769 (check_format_arg): Pass format_ctx->arglocs to new param of
3770 check_format_info_main.
3771 (class argument_parser): New field "arglocs".
3772 (argument_parser::argument_parser): Add "arglocs_" param and use
3773 it to initialize new field.
3774 (argument_parser::check_argument_type): Pass new arglocs field to
3775 check_format_types.
3776 (check_format_info_main): Add param "arglocs", and use it when
3777 constructing arg_parser.
3778 (check_format_types): Add param "arglocs"; use it if non-NULL when
3779 !EXPR_HAS_LOCATION (cur_param) to get at location information.
3780
00aa1fa2
L
37812017-08-18 H.J. Lu <hongjiu.lu@intel.com>
3782
3783 PR c/53037
3784 * c-attribs.c (handle_warn_if_not_aligned_attribute): New.
3785 (c_common_attribute_table): Add warn_if_not_aligned.
3786 (handle_aligned_attribute): Renamed to ...
3787 (common_handle_aligned_attribute): Remove argument, name, and add
3788 argument, warn_if_not_aligned. Handle warn_if_not_aligned.
3789 (handle_aligned_attribute): New.
3790 * c.opt: Add -Wif-not-aligned and -Wpacked-not-aligned.
3791
27be025d
MS
37922017-08-14 Martin Sebor <msebor@redhat.com>
3793
3794 PR c/81117
3795 * c-attribs.c (c_common_attribute_table): Add nonstring entry.
3796 (handle_nonstring_attribute): New function.
3797
da67acb9
MS
37982017-08-14 Martin Sebor <msebor@redhat.com>
3799
3800 PR c/81117
3801 * c-format.h (T89_G): New macro.
3802 * c-format.c (local_gcall_ptr_node): New variable.
3803 (init_dynamic_diag_info): Initialize it.
3804
a8b522b4
ML
38052017-08-11 Martin Liska <mliska@suse.cz>
3806
3807 * c-opts.c (c_common_post_options): Replace ASM_OUTPUT_DEF with
3808 TARGET_SUPPORTS_ALIASES.
3809
32129a17
DM
38102017-08-10 David Malcolm <dmalcolm@redhat.com>
3811
3812 * c-common.c (c_parse_error): Add rich_location * param, using it
3813 rather implicitly using input_location.
3814 * c-common.h (c_parse_error): Add rich_location * param.
3815
30af3a2b
MP
38162017-08-09 Marek Polacek <polacek@redhat.com>
3817
3818 * c-common.c (pointer_int_sum): Use true/false instead of 1/0.
3819 (c_common_truthvalue_conversion): Likewise.
3820 * c-omp.c (c_finish_omp_atomic): Likewise.
3821 * c-common.h (build_binary_op): Update declaration.
3822
314e6352
ML
38232017-08-08 Martin Liska <mliska@suse.cz>
3824
3825 * c-ada-spec.c: Include header files.
3826 * c-ubsan.c: Likewise.
3827 * c-warn.c: Likewise.
3828
56b5041c
JJ
38292017-08-07 Jakub Jelinek <jakub@redhat.com>
3830
3831 PR c/69389
3832 * c-omp.c (c_finish_omp_atomic): Handle atomics on bitfields.
3833
db440138
EB
38342017-08-07 Eric Botcazou <ebotcazou@adacore.com>
3835
3836 * c-ada-spec.c (has_nontrivial_methods): Test for FUNCTION_DECL.
3837 (print_ada_methods): Likewise.
3838 (print_ada_declaration): Likewise.
3839
577eec56
ML
38402017-08-07 Martin Liska <mliska@suse.cz>
3841
3842 * array-notation-common.c: Add new includes.
3843 * c-format.c( handle_format_attribute): Canonicalize a format
3844 function name.
3845 * c-lex.c (c_common_has_attribute): Canonicalize name of an
3846 attribute.
3847 * c-pretty-print.c: Add new include.
3848
b854df3c
EB
38492017-08-05 Eric Botcazou <ebotcazou@adacore.com>
3850
3851 * c-ada-spec.c (has_static_fields): Look only into variables.
3852 (print_constructor): Add TYPE parameter and use it for the name.
3853 (print_destructor): Likewise.
3854 (print_ada_declaration): Adjust to new constructor/destructor names.
3855 Adjust calls to print_constructor and print_destructor.
3856 (print_ada_struct_decl): Do not test TREE_STATIC on FIELD_DECL.
3857 Look only into variables in the final loop.
3858
9f2cb25e
EB
38592017-08-01 Eric Botcazou <ebotcazou@adacore.com>
3860
3861 * c-ada-spec.c (has_static_fields): Look only into fields.
3862 (dump_generic_ada_node): Small tweak.
3863 (dump_nested_types): Look only into fields.
3864 (print_ada_declaration): Look only into methods. Small tweak.
3865 (print_ada_struct_decl): Look only into fields. Use DECL_VIRTUAL_P.
3866
f4bcd9eb
EB
38672017-08-01 Eric Botcazou <ebotcazou@adacore.com>
3868
3869 * c-ada-spec.c (print_generic_ada_decl): Pass correctly-typed constant.
3870 (dump_ada_function_declaration): Likewise.
3871 (dump_generic_ada_node): Likewise.
3872 (print_ada_declaration): Add support for const-qualified variables.
3873
f34ebeb2
ML
38742017-07-31 Martin Liska <mliska@suse.cz>
3875
3876 PR sanitize/81530
3877 * c-ubsan.c (ubsan_maybe_instrument_array_ref):
3878 Guard condition with flag_sanitize_p also with current_function_decl
3879 non-null equality.
3880 (ubsan_maybe_instrument_reference_or_call): Likewise.
3881
218e5d04
UB
38822017-07-30 Uros Bizjak <ubizjak@gmail.com>
3883
3884 * c-format.c (asm_fprintf_char_table): Add 'z' to format_chars.
3885
942047f2
EB
38862017-07-29 Eric Botcazou <ebotcazou@adacore.com>
3887
3888 * c-ada-spec.c (dump_generic_ada_node): Take into account signedness
3889 for enumeral types.
3890 (print_ada_declaration): Add missing guard for record types.
3891
a40ff0ae
JJ
38922017-07-27 Jakub Jelinek <jakub@redhat.com>
3893
3894 PR c/45784
3895 * c-omp.c (c_finish_omp_for): If the condition is wrapped in
3896 rhs of COMPOUND_EXPR(s), skip them and readd their lhs into
3897 new COMPOUND_EXPRs around the rhs of the comparison.
3898
06bd22f6
MP
38992017-07-27 Marek Polacek <polacek@redhat.com>
3900
3901 PR c/81417
3902 * c-warn.c (warn_for_sign_compare): Tweak the warning message. Print
3903 the types.
3904
036ea399
JJ
39052017-07-27 Jakub Jelinek <jakub@redhat.com>
3906
3907 * c-attribs.c (c_common_attribute_table): Add noipa attribute.
3908 (handle_noipa_attribute): New function.
3909
417ca011
TD
39102017-07-07 Torsten Duwe <duwe@suse.de>
3911
3912 * c-attribs.c (c_common_attribute_table): Add entry for
3913 "patchable_function_entry".
3914
5aaa8fb4
NS
39152017-07-20 Nathan Sidwell <nathan@acm.org>
3916
3917 Remove TYPE_METHODS.
3918 * c-ada-spec.c (is_tagged_type, has_nontrivial_methods,
3919 dump_ada_template, print_ada_methods,
3920 print_ada_declaration): Member fns are on TYPE_FIELDS.
3921
ff22eb12
NS
39222017-07-18 Nathan Sidwell <nathan@acm.org>
3923
3924 * c-warn.c (warn_for_memset): Use TYPE_{MIN,MAX}_VALUE.
3925
eea77d1f
DM
39262017-07-14 David Malcolm <dmalcolm@redhat.com>
3927
3928 * c-common.c (try_to_locate_new_include_insertion_point): New
3929 function.
3930 (per_file_includes_t): New typedef.
3931 (added_includes_t): New typedef.
3932 (added_includes): New variable.
3933 (maybe_add_include_fixit): New function.
3934 * c-common.h (maybe_add_include_fixit): New decl.
3935
281ac396
MS
39362017-07-10 Martin Sebor <msebor@redhat.com>
3937
3938 PR other/81345
3939 * c.opt (-Wstringop-overflow): Set defaults in LangEnabledBy.
3940
b6f43128
DM
39412017-07-06 David Malcolm <dmalcolm@redhat.com>
3942
3943 * c-common.c (selftest::c_family_tests): New.
3944 * c-common.h (selftest::run_c_tests): Move decl to c/c-lang.h.
3945 (selftest::c_family_tests): New decl.
3946
efbf55b0
MP
39472017-07-04 Marek Polacek <polacek@redhat.com>
3948
3949 PR c/81231
3950 * c-common.c (sync_resolve_size): Give error for pointers to incomplete
3951 types.
3952
6c86bd88
MP
39532017-07-04 Marek Polacek <polacek@redhat.com>
3954
3955 * c-warn.c (warn_if_unused_value): Remove WITH_CLEANUP_EXPR handling.
3956
17a7218b
ML
39572017-06-28 Martin Liska <mliska@suse.cz>
3958
3959 PR ipa/81128
3960 * c-attribs.c (handle_alias_ifunc_attribute): Append ifunc alias
3961 to a function declaration.
3962
63010089
ML
39632017-06-28 Martin Liska <mliska@suse.cz>
3964
3965 PR driver/79659
3966 * c.opt: Add IntegerRange to various options.
3967
3e2becc4
MP
39682017-06-26 Marek Polacek <polacek@redhat.com>
3969
3970 PR c/80116
3971 * c-common.h (warn_for_multistatement_macros): Declare.
3972 * c-warn.c: Include "c-family/c-indentation.h".
3973 (warn_for_multistatement_macros): New function.
3974 * c.opt (Wmultistatement-macros): New option.
3975 * c-indentation.c (guard_tinfo_to_string): No longer static.
3976 Change the parameter type to "enum rid". Handle RID_SWITCH.
3977 * c-indentation.h (guard_tinfo_to_string): Declare.
3978
2db9b7cd
MG
39792017-06-23 Marc Glisse <marc.glisse@inria.fr>
3980
3981 * c-common.c (c_common_nodes_and_builtins): Use builtin_structptr_types.
3982
c3684b7b
MS
39832017-06-15 Martin Sebor <msebor@redhat.com>
3984
3985 PR c++/80560
3986 * c.opt (-Wclass-memaccess): New option.
3987
e72c4afd
BK
39882017-06-14 Boris Kolpackov <boris@codesynthesis.com>
3989
3990 * c-opts.c (c_common_finish): Handle '-' special value to -MF.
3991
8a516588
MP
39922017-06-13 Marek Polacek <polacek@redhat.com>
3993
3994 PR objc/80949
3995 * c-warn.c (do_warn_duplicated_branches): Return if any of the
3996 branches is null.
3997
45b2222a
ML
39982017-06-13 Martin Liska <mliska@suse.cz>
3999
4000 PR sanitize/78204
4001 * c-attribs.c (add_no_sanitize_value): New function.
4002 (handle_no_sanitize_attribute): Likewise.
4003 (handle_no_sanitize_address_attribute): Use the function.
4004 (handle_no_sanitize_thread_attribute): New function.
4005 (handle_no_address_safety_analysis_attribute): Use
4006 add_no_sanitize_value.
4007 (handle_no_sanitize_undefined_attribute): Likewise.
4008 * c-common.h: Declare new functions.
4009 * c-ubsan.c (ubsan_instrument_division): Use sanitize_flags_p.
4010 (ubsan_instrument_shift): Likewise.
4011 (ubsan_instrument_bounds): Likewise.
4012 (ubsan_maybe_instrument_array_ref): Likewise.
4013 (ubsan_maybe_instrument_reference_or_call): Likewise.
4014
a01f151f
JM
40152017-06-11 Jason Merrill <jason@redhat.com>
4016
4017 * c-ada-spec.c, c-pragma.c: Use id_equal.
4018
3de4ac6d
MP
40192017-06-04 Marek Polacek <polacek@redhat.com>
4020
4021 PR c/80919
4022 * c-format.c (matching_type_p): Return false if any of the types
4023 requires structural equality.
4024
2474f48f
MS
40252017-06-02 Martin Sebor <msebor@redhat.com>
4026
4027 PR c/80892
4028 * c-warn.c (conversion_warning): Use -Wconversion for integer
4029 conversion and -Wfloat-conversion for floating one.
4030
40ffd95f
BE
40312017-06-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
4032
4033 * c.opt (Wsizeof-pointer-div): New warning option.
4034
3fa4634c
VR
40352017-06-01 Volker Reichelt <v.reichelt@netcologne.de>
4036
4037 * c.opt (Wcatch-value): New shortcut for Wcatch-value=1.
4038 (Wcatch-value=1): Enable by -Wall.
4039
f012c8ef
DM
40402017-05-30 David Malcolm <dmalcolm@redhat.com>
4041
4042 * c-format.c (gcc_cxxdiag_char_table): Add 'H' and 'I' to
4043 format_chars.
4044 * c.opt (fdiagnostics-show-template-tree): New option.
4045 (felide-type): New option.
4046
63dbcd13
VR
40472017-05-25 Volker Reichelt <v.reichelt@netcologne.de>
4048
4049 * c.opt (Wcatch-value=): New C++ warning flag.
4050
be136b5c
NS
40512017-05-24 Nathan Sidwell <nathan@acm.org>
4052
4053 * c=common.c (field_decl_cmp, resort_field_decl_cmp): Adjust T
4054 const casts to avoid warning.
4055
3cd211af
MS
40562017-05-24 Martin Sebor <msebor@redhat.com>
4057
4058 PR c/80731
4059 * c-common.h (unsafe_conversion_p): Add a function argument.
4060 * c-common.c (unsafe_conversion_p): Same.
4061 Add type names and values to diagnostics.
4062 (scalar_to_vector): Adjust.
4063 * c-warn.c (constant_expression_error): Add a function argument.
4064 Add type names and values to diagnostics.
4065 (conversion_warning): Add a function argument.
4066 Add type names and values to diagnostics.
4067 (warnings_for_convert_and_check): Same.
4068
1ff7be5a
JM
40692017-05-19 Jason Merrill <jason@redhat.com>
4070
4071 * c-warn.c (match_case_to_enum_1): Don't warn about enums with no
4072 enumerators.
4073
ff502317
BE
40742017-05-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
4075
4076 * c-format.c (locus): Move out of function scope,
4077 add GTY attribute.
4078
2a8a8d7b
NS
40792017-05-19 Nathan Sidwell <nathan@acm.org>
4080
4081 * c-opts.c (class_dump_file, class_dump_flags): Delete.
4082 (c_common_parse_file): Remove class dump handling.
4083 (get_dump_info): Likewise.
4084
39aac208
RB
40852017-05-19 Richard Biener <rguenther@suse.de>
4086
4087 PR c++/80593
4088 * c-warn.c (strict_aliasing_warning): Do not warn for accesses
4089 to alias-set zero memory.
4090
6ecd2339
BE
40912017-05-18 Bernd Edlinger <bernd.edlinger@hotmail.de>
4092
4093 * c-format.c (local_tree_type_node): Add GTY attribute.
4094
6574d78e
MP
40952017-05-18 Marek Polacek <polacek@redhat.com>
4096
4097 * c-common.c (c_common_type_for_size): Use NULL_TREE instead of 0.
4098 (c_common_fixed_point_type_for_size): Likewise.
4099 (c_common_type_for_mode): Likewise.
4100 (shorten_compare): Likewise.
4101 (c_promoting_integer_type_p): Use false/true instead of 0/1.
4102 * c-pragma.c (maybe_apply_renaming_pragma): Use NULL_TREE instead of 0.
4103
e3455240
MP
41042017-05-18 Marek Polacek <polacek@redhat.com>
4105
4106 * c-common.c (self_promoting_args_p): Change the return type to bool.
4107 Use false/true instead of 0/1.
4108 * c-common.h (self_promoting_args_p): Update.
4109
3fa8871b
MP
41102017-05-17 Marek Polacek <polacek@redhat.com>
4111
4112 * c-common.c: Use NULL_TREE instead of 0 where appropriate.
4113 * c-warn.c: Likewise.
4114
b42cc3ca
VV
41152017-05-17 Ville Voutilainen <ville.voutilainen@gmail.com>
4116
4117 Implement new C++ intrinsics __is_assignable and __is_constructible.
4118 * c-common.c (__is_assignable, __is_constructible): New.
4119 * c-common.h (RID_IS_ASSIGNABLE, RID_IS_CONSTRUCTIBLE): Likewise.
4120
1a817418
ML
41212017-05-17 Martin Liska <mliska@suse.cz>
4122
4123 * c-common.h: Introduce dump_flags_t type and
4124 use it instead of int type.
4125 * c-gimplify.c (c_genericize): Likewise.
4126 * c-opts.c: Likewise.
4127
b2fa0a8b
MP
41282017-05-17 Marek Polacek <polacek@redhat.com>
4129
4130 * c-common.c (c_save_expr): Remove.
4131 (c_common_truthvalue_conversion): Remove a call to c_save_expr.
4132 * c-common.h (c_save_expr): Remove declaration.
4133
31c2d57d
VR
41342017-05-09 Volker Reichelt <v.reichelt@netcologne.de>
4135
4136 PR c/35441
4137 * c-pretty-print.c (c_pretty_printer::expression): Handle MAX_EXPR,
4138 MIN_EXPR, EXACT_DIV_EXPR, RDIV_EXPR, LROTATE_EXPR, RROTATE_EXPR.
4139 (c_pretty_printer::postfix_expression): Handle MAX_EXPR, MIN_EXPR.
4140 (c_pretty_printer::multiplicative_expression): Handle EXACT_DIV_EXPR,
4141 RDIV_EXPR.
4142 (pp_c_shift_expression): Handle LROTATE_EXPR, RROTATE_EXPR.
4143
684f84de
MP
41442017-05-09 Marek Polacek <polacek@redhat.com>
4145
4146 PR c/80525
4147 * c-warn.c (unwrap_c_maybe_const): New.
4148 (warn_logical_operator): Call it.
4149
641da50a
NS
41502017-05-09 Nathan Sidwell <nathan@acm.org>
4151
4152 * c-common.c (c_register_builtin_type): Use pushdecl lang_hook.
4153 * c-common.h (pushdecl_top_level, pushdecl): Don't declare here.
4154
631238ac
MS
41552017-05-08 Martin Sebor <msebor@redhat.com>
4156
4157 PR translation/80280
4158 * c-format.h (struct format_flag_spec): Add new member.
4159 (T89_T): New macro.
4160 * c-format.c (local_tree_type_node): New global.
4161 (printf_flag_specs, asm_fprintf_flag_spec): Initialize new data.
4162 (gcc_diag_flag_specs, scanf_flag_specs, strftime_flag_specs): Ditto.
4163 (strfmon_flag_specs): Likewise.
4164 (gcc_diag_char_table, gcc_cdiag_char_table): Split up specifiers
4165 with distinct quoting properties.
4166 (gcc_tdiag_char_table, gcc_cxxdiag_char_table): Same.
4167 (flag_chars_t::validate): Add argument and handle bad quoting.
4168 (check_format_info_main): Handle quoting problems.
4169 (init_dynamic_diag_info): Simplify.
4170
49f0c04c
JM
41712017-05-08 Jason Merrill <jason@redhat.com>
4172
4173 * c-opts.c (c_common_post_options): Update defaults for
4174 flag_abi_version and flag_abi_compat_version.
4175
56d35585
DM
41762017-05-05 David Malcolm <dmalcolm@redhat.com>
4177
4178 * c-common.c (c_cpp_error): Replace report_diagnostic
4179 with diagnostic_report_diagnostic.
4180
0f2c4a8f
MS
41812017-05-04 Martin Sebor <msebor@redhat.com>
4182
4183 PR translation/80280
4184 * c-attribs.c (handle_alias_ifunc_attribute): Quote a %D directive.
4185 (handle_weakref_attribute): Same.
4186
6fe63fb4
NS
41872017-05-03 Nathan Sidwell <nathan@acm.org>
4188
4189 Canonicalize canonical type hashing
4190 * c-common.c (complete_array_type): Use type_hash_canon.
4191
815d9cc6
XR
41922017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn>
4193
92a285c1 4194 PR c++/80038
815d9cc6
XR
4195 * c-common.h (cilk_gimplify_call_params_in_spawned_fn): Remove
4196 prototype.
4197 (cilk_install_body_pedigree_operations): Likewise.
4198 * cilk.c (cilk_set_spawn_marker): Mark functions that should be
4199 detatched.
4200 (cilk_gimplify_call_params_in_spawned_fn): Remove.
4201 (cilk_install_body_pedigree_operations): Likewise.
4202 (gimplify_cilk_spawn): Add EXPR_STMT and CLEANUP_POINT_EXPR
4203 unwrapping.
4204
f8a36447
JJ
42052017-04-27 Jakub Jelinek <jakub@redhat.com>
4206
4207 PR c++/80534
4208 * c-common.c (complete_array_type): Only hash TYPE_TYPELESS_STORAGE
4209 flag on non-aggregate element types.
4210
7c145456
BE
42112017-04-25 Bernd Edlinger <bernd.edlinger@hotmail.de>
4212
4213 * c-common.c (c_type_hasher, type_hash_table): Remove.
4214 (c_common_get_alias_set): Remove unreachable code.
4215 * c-opts.c (c_common_post_options): Make sure cc1 takes only one file.
4216
c3cbcd45
VR
42172017-04-20 Volker Reichelt <v.reichelt@netcologne.de>
4218
4219 * c.opt (Wextra-semi): New C++ warning flag.
4220
8a59d466
JJ
42212017-04-20 Jakub Jelinek <jakub@redhat.com>
4222
4223 PR middle-end/80423
4224 * c-common.c (complete_array_type): Preserve TYPE_TYPELESS_STORAGE.
4225
8487c9a5
JJ
42262017-04-18 Jakub Jelinek <jakub@redhat.com>
4227
4228 PR middle-end/79788
4229 PR middle-end/80375
4230 * c-common.c (c_common_type_for_mode): Don't handle
4231 widest_*_literal_type_node here.
4232 c_common_signed_or_unsigned_type): Likewise.
4233 (c_common_nodes_and_builtins): Set widest_*_literal_type_node
4234 to *intTI_type_node or *intDI_type_node depending on whether
4235 TImode is supported by the target or not.
4236
3ee0fb02
ML
42372017-04-10 Martin Liska <mliska@suse.cz>
4238
4239 PR sanitizer/80350
4240 * c-ubsan.c (ubsan_instrument_shift): Evaluate RHS before
4241 doing an UBSAN check.
4242
5764ee3c
JW
42432017-04-03 Jonathan Wakely <jwakely@redhat.com>
4244
4245 * c-warn.c (do_warn_double_promotion): Fix typo in comment.
4246
6f3af356
JJ
42472017-03-31 Jakub Jelinek <jakub@redhat.com>
4248
4249 PR c++/79572
4250 * c-ubsan.h (ubsan_maybe_instrument_reference): Change argument to
4251 tree *.
4252 * c-ubsan.c (ubsan_maybe_instrument_reference): Likewise. Handle
4253 not just NOP_EXPR to REFERENCE_TYPE, but also INTEGER_CST with
4254 REFERENCE_TYPE.
4255
f6a7a9d5
DM
42562017-03-31 David Malcolm <dmalcolm@redhat.com>
4257
4258 PR documentation/78732
4259 * c.opt (Wendif-labels): Fix description to refer to
4260 #else rather than #elif.
4261
af88f557
JJ
42622017-03-31 Jakub Jelinek <jakub@redhat.com>
4263
4264 PR libstdc++/80251
4265 * c-common.h (enum rid): Add RID_IS_AGGREGATE.
4266 * c-common.c (c_common_reswords): Add __is_aggregate trait.
4267
a9e4a1a5
JJ
42682017-03-27 Jakub Jelinek <jakub@redhat.com>
4269
4270 PR middle-end/80162
4271 * c-common.c (c_common_mark_addressable_vec): Don't set
4272 TREE_ADDRESSABLE on DECL_HARD_REGISTER.
4273
3f01b620
MS
42742017-03-21 Martin Sebor <msebor@redhat.com>
4275
4276 PR c++/79548
4277 * c-common.c (set_underlying_type): Mark type used only when
4278 original del is declared unused.
4279
2f6f187a
DM
42802017-03-10 David Malcolm <dmalcolm@redhat.com>
4281
4282 PR translation/79848
4283 * c-format.c (check_format_string): Simplify uses of "%<%s%>" to
4284 "%qs".
4285
a02fa805
DM
42862017-03-10 David Malcolm <dmalcolm@redhat.com>
4287
4288 PR c/79921
4289 * c-indentation.c (warn_for_misleading_indentation): Remove parens
4290 from inform's message, so that xgettext can locate it.
4291
822a132c
MP
42922017-03-09 Marek Polacek <polacek@redhat.com>
4293
4294 PR c++/79962
4295 PR c++/79984
4296 * c-attribs.c (handle_nonnull_attribute): Save the result of default
4297 conversion to the attribute list.
4298
bba81f1c
ML
42992017-03-09 Martin Liska <mliska@suse.cz>
4300
4301 * c-ada-spec.c (macro_length): Increment value instead of a pointer.
4302
108154ff
JM
43032017-03-03 Jason Merrill <jason@redhat.com>
4304
4305 * c.opt (Wnoexcept-type): New.
4306
eb0e7c34
RB
43072017-03-02 Richard Biener <rguenther@suse.de>
4308
4309 PR c/79756
4310 * c-common.c (c_common_mark_addressable_vec): Look through
4311 C_MAYBE_CONST_EXPR.
4312
9453ba0a
ML
43132017-02-28 Martin Liska <mliska@suse.cz>
4314
4315 * c.opt: Replace space with tabular for options of <number>
4316 type.
4317
6a825afe
ML
43182017-02-28 Martin Liska <mliska@suse.cz>
4319
4320 * c.opt: Fix --help=option -Q for options which are of
4321 an enum type.
4322
4227c9ad
JJ
43232017-02-24 Jakub Jelinek <jakub@redhat.com>
4324
4325 PR c++/79588
4326 * c-common.c (check_function_restrict): New function.
4327 (check_function_arguments): Add FNDECL argument. Call
4328 check_function_restrict if -Wrestrict.
4329 * c-warn.c (warn_for_restrict): Remove ARGS argument, add ARGARRAY
4330 and NARGS. Use auto_vec for ARG_POSITIONS, simplify.
4331 * c-common.h (check_function_arguments): Add FNDECL argument.
4332 (warn_for_restrict): Remove ARGS argument, add ARGARRAY and NARGS.
4333
59909673
EB
43342017-02-24 Eric Botcazou <ebotcazou@adacore.com>
4335
4336 * c-ada-spec.c (dump_ada_function_declaration): Add comment about the
4337 treatment of parameters with pointer-to-tagged type and tidy up.
4338 (print_ada_methods): Remove the special treatment of C++ static member
4339 functions.
4340
54dcd526
ML
43412017-02-22 Martin Liska <mliska@suse.cz>
4342
4343 * c.opt: Replace inequality signs with square brackets
4344 for -Wnornalized.
4345
00bc9de3
JJ
43462017-02-21 Jakub Jelinek <jakub@redhat.com>
4347
4348 PR c++/79641
4349 * c-attribs.c (handle_mode_attribute): Use build_qualified_type to
4350 preserve quals.
4351
97fcf744
JM
43522017-02-17 Joseph Myers <joseph@codesourcery.com>
4353
4354 * c-cppbuiltin.c (builtin_define_float_constants): Define
4355 __DECIMAL_DIG__ to the value for long double.
4356
c7545f1c
MP
43572017-02-15 Marek Polacek <polacek@redhat.com>
4358
4359 PR c/79515
4360 * c-warn.c (do_warn_double_promotion): Don't warn if an invalid
4361 conversion has occured.
4362
c2e84327
DM
43632017-01-24 David Malcolm <dmalcolm@redhat.com>
4364
4365 * c-common.c (c_common_reswords): Add "__RTL".
4366 * c-common.h (enum rid): Add RID_RTL.
4367
2ebd93e1
MP
43682017-01-20 Marek Polacek <polacek@redhat.com>
4369
4370 PR c/64279
4371 * c-common.h (do_warn_duplicated_branches_r): Declare.
4372 * c-gimplify.c (c_genericize): Walk the function tree calling
4373 do_warn_duplicated_branches_r.
4374 * c-warn.c (expr_from_macro_expansion_r): New.
4375 (do_warn_duplicated_branches): New.
4376 (do_warn_duplicated_branches_r): New.
4377 * c.opt (Wduplicated-branches): New option.
4378
0d80ab91
DM
43792017-01-17 David Malcolm <dmalcolm@redhat.com>
4380
4381 PR c++/71497
4382 * c-indentation.c (warn_for_misleading_indentation): Use the past
4383 subjunctive in the note.
4384
7f991c36
AH
43852017-01-17 Aldy Hernandez <aldyh@redhat.com>
4386
4387 PR c/79116
4388 * array-notation-common.c (cilkplus_extract_an_triplets): Convert
4389 start type to integer_type.
4390
1c70261c
JJ
43912017-01-16 Jakub Jelinek <jakub@redhat.com>
4392
4393 PR driver/49726
4394 * c.opt (gen-decls): Add Driver flag.
4395
1ddca3f3
PC
43962017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
4397
4398 Revert:
4399 2017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
4400
4401 PR c++/71737
4402 * c-common.c (set_underlying_type): Always set DECL_ORIGINAL_TYPE.
4403
7d2f3f1d
PC
44042017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
4405
4406 PR c++/71737
4407 * c-common.c (set_underlying_type): Always set DECL_ORIGINAL_TYPE.
4408
bce6f760
MS
44092017-01-12 Martin Sebor <msebor@redhat.com>
4410
4411 (-Wformat-overflow): ...to this.
4412
bf5fbf46
MS
44132017-01-11 Martin Sebor <msebor@redhat.com>
4414
4415 PR c/78768
4416 * c.opt (-Walloca-larger-than, -Wformat-length, -Wformat-truncation):
4417 Also enable for LTO.
4418
e363df3f
JM
44192017-01-10 Jason Merrill <jason@redhat.com>
4420
4421 Implement P0195R2, C++17 variadic using.
4422 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_variadic_using.
4423
bd2c6270
JJ
44242017-01-09 Jakub Jelinek <jakub@redhat.com>
4425
4426 PR translation/79019
4427 PR translation/79020
4428 * c.opt (Wnormalized=): Fix typo in description.
4429
efcc8d38
MS
44302017-01-08 Martin Sebor <msebor@redhat.com>
4431
4432 PR middle-end/77708
4433 * c.opt (-Wformat-truncation): New option.
4434
ab20d992 44352017-01-06 Alexandre Oliva <aoliva@redhat.com>
435f3f7a
AO
4436
4437 * c-pretty-print.c (pp_c_tree_decl_identifier): Convert 16-bit
4438 value to unsigned short to fit in 4 hex digits without
4439 warnings.
4440
4e89adf9
EB
44412017-01-05 Eric Botcazou <ebotcazou@adacore.com>
4442
4443 * c.opt (fsso-struct): Add 'native' value.
4444
cd445b54
ML
44452017-01-05 Martin Liska <mliska@suse.cz>
4446
4447 PR pch/78970
4448 * c-opts.c (c_common_post_options): Reject '-' filename for a precompiled
4449 header.
4450
a9342885
MP
44512017-01-04 Marek Polacek <polacek@redhat.com>
4452
4453 PR c++/64767
4454 * c.opt (Wpointer-compare): New option.
4455
fc73e60c
JJ
44562017-01-04 Jakub Jelinek <jakub@redhat.com>
4457
4458 PR driver/78957
4459 * c.opt (fsso-struct=): Add RejectNegative.
4460
cbe34bb5
JJ
44612017-01-01 Jakub Jelinek <jakub@redhat.com>
4462
4463 Update copyright years.
4464
d4a6c0ea
ML
44652016-12-29 Martin Liska <mliska@suse.cz>
4466
4467 PR c/78933
4468 * c.opt (strong-eval-order): Add RejectNegative keyword.
4469
67a5ad7c
JM
44702016-12-22 Jason Merrill <jason@redhat.com>
4471
4472 Implement P0522R0, matching of template template arguments.
4473 * c-cppbuiltin.c (c_cpp_builtins): Define
4474 __cpp_template_template_args.
4475
0dba7960
JJ
44762016-12-21 Jakub Jelinek <jakub@redhat.com>
4477
4478 PR bootstrap/78817
4479 * c-common.c (struct nonnull_arg_ctx): New type.
4480 (check_function_nonnull): Return bool instead of void. Use
4481 nonnull_arg_ctx as context rather than just location_t.
4482 (check_nonnull_arg): Adjust for the new context type, set
4483 warned_p to true if a warning has been diagnosed.
4484 (check_function_arguments): Return bool instead of void.
4485 * c-common.h (check_function_arguments): Adjust prototype.
4486
31bfc9b9
JM
44872016-12-21 Jason Merrill <jason@redhat.com>
4488
4489 * c.opt (-fnew-ttp-matching): New flag.
4490 * c-opts.c (c_common_post_options): Default on if -std=c++1z.
4491
629b3d75
MJ
44922016-12-14 Martin Jambor <mjambor@suse.cz>
4493
4494 * c-omp.c: Include omp-general.h instead of omp-low.h.
4495 (c_finish_oacc_wait): Adjusted call to find_omp_clause to use its new
4496 name.
4497
474da67e
MS
44982016-12-14 Martin Sebor <msebor@redhat.com>
4499
4500 PR c/17308
4501 * c-common.c (check_nonnull_arg): Disable when optimization
4502 is enabled.
4503
fe366b87
MP
45042016-12-12 Marek Polacek <polacek@redhat.com>
4505
4506 PR c++/78647
4507 * c-common.c (attribute_fallthrough_p): Return false for
4508 error_mark_node.
4509
8bd9f164
MS
45102016-12-08 Martin Sebor <msebor@redhat.com>
4511
4512 PR c/78284
4513 * c.opt (-Walloc-zero, -Walloc-size-larger-than): New options.
4514
060162e0
MS
45152016-12-08 Martin Sebor <msebor@redhat.com>
4516
4517 PR c/78165
92a285c1
ML
4518 * c-pretty-print (pp_c_integer_constant): Avoid formatting type
4519 suffix.
060162e0 4520
ee92e7ba
MS
45212016-12-07 Martin Sebor <msebor@redhat.com>
4522
4523 PR c/53562
4524 PR middle-end/77784
4525 PR middle-end/78149
4526 PR middle-end/78138
4527 * c.opt (-Wstringop-overflow): New option.
4528
84b0769e
MO
45292016-12-02 Maxim Ostapenko <m.ostapenko@samsung.com>
4530
4531 * c-attribs.c (asan odr indicator): New attribute.
4532 (handle_asan_odr_indicator_attribute): New function.
4533
7fa6a965
PK
45342016-11-26 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
4535
4536 * c-common.c (c_common_nodes_and_builtins): Remove initialization of
4537 ptrdiff_type_node;
4538
56d8ffc1
JG
45392016-11-23 James Greenhalgh <james.greenhalgh@arm.com>
4540
4541 * c-common.c (excess_precision_mode_join): New.
4542 (c_ts18661_flt_eval_method): New.
4543 (c_c11_flt_eval_method): Likewise.
4544 (c_flt_eval_method): Likewise.
4545 * c-common.h (excess_precision_mode_join): New.
4546 (c_flt_eval_method): Likewise.
4547 * c-cppbuiltin.c (c_cpp_flt_eval_method_iec_559): New.
4548 (cpp_iec_559_value): Call it.
4549 (c_cpp_builtins): Modify logic for __LIBGCC_*_EXCESS_PRECISION__,
4550 call c_flt_eval_method to set __FLT_EVAL_METHOD__ and
4551 __FLT_EVAL_METHOD_TS_18661_3__.
4552
04f0fcf7
JG
45532016-11-23 James Greenhalgh <james.greenhalgh@arm.com>
4554
4555 * c-opts.c (c_common_post_options): Add logic to handle the default
4556 case for -fpermitted-flt-eval-methods.
4557
fb2675cb
PB
45582016-11-23 Paolo Bonzini <bonzini@gnu.org>
4559
4560 * c.opt (Wexpansion-to-defined): New.
4561
ec1c5694
JJ
45622016-11-23 Jakub Jelinek <jakub@redhat.com>
4563
4564 PR target/78451
4565 * c-pragma.c (handle_pragma_target): Don't replace
4566 current_target_pragma, but chainon the new args to the current one.
4567
730c9e75
NS
45682016-11-22 Nathan Sidwell <nathan@acm.org>
4569
4570 * array-notation-common.c (cilkplus_extract_an_trplets): Fix
cacd29be 4571 indentation and formatting.
730c9e75 4572
89990732
MS
45732016-11-21 Martin Sebor <msebor@redhat.com>
4574
4575 * c.opt (-fprintf-return-value): Enable by default.
4576
48330c93
BE
45772016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
4578
4579 PR c++/71973
4580 * c.opt (-Wbuiltin-declaration-mismatch): New warning.
4581 * c-common.c (c_common_nodes_and_builtins): Initialize
4582 const_tm_ptr_type_node.
4583
0d939c95
MP
45842016-11-16 Marek Polacek <polacek@redhat.com>
4585
4586 PR c/78285
4587 * c-common.c (c_add_case_label): Turn error_at calls into inform.
4588
8e745a17
JJ
45892016-11-14 Jakub Jelinek <jakub@redhat.com>
4590
4591 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_structured_bindings.
4592
1ee62b92 45932016-11-14 Prasad Ghangal <prasad.ghangal@gmail.com>
8e745a17
JJ
4594 Richard Biener <rguenther@suse.de>
4595
4596 * c-common.h (c_common_resword): Add RID_GIMPLE, RID_PHI types.
4597 * c-common.h (enum rid): Add RID_GIMPLE, RID_PHI.
4598 * c.opt (fgimple): New option.
1ee62b92 4599
22b15758
UB
46002016-11-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
4601
4602 PR c/35503
4603 * c-common.h (warn_for_restrict): Declare.
4604 * c-warn.c: Include gcc-rich-location.h.
4605 (warn_for_restrict): New function.
4606 * c-format.c (gcc_tdiag_char_table): Add entry for "Z" specifier.
4607 (gcc_cdiag_char_table): Likewise.
4608 (gcc_cxxdiag_char_table): Likewise.
4609 * c.opt (Wrestrict): New option.
4610
4be719cd
EB
46112016-11-13 Eric Botcazou <ebotcazou@adacore.com>
4612
4613 * c-ada-spec.c (print_ada_declaration): For typedef declarations, look
4614 for nested types only if the type is a record or union and dump SLOC.
4615
4a826ca6
JM
46162016-11-09 Jason Merrill <jason@redhat.com>
4617
4618 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_template_auto.
4619
2e955d50
JJ
46202016-11-09 Jakub Jelinek <jakub@redhat.com>
4621
4622 * c-ubsan.c (ubsan_instrument_shift): Handle split
4623 -fsanitize=shift-base and -fsanitize=shift-exponent.
4624
51dc6603
JM
46252016-11-07 Jason Merrill <jason@redhat.com>
4626
4627 * c.opt (Wc++1z-compat): New.
4628 * c-cppbuiltin.c (c_cpp_builtins): Add __cpp_noexcept_function_type.
4629
6dc4a604
ML
46302016-11-07 Martin Liska <mliska@suse.cz>
4631
4632 * c-warn.c (warn_for_unused_label): Save all labels used
4633 in goto or in &label.
4634
b302001e
JM
46352016-11-03 Jason Merrill <jason@redhat.com>
4636
4637 * c-cppbuiltin.c (c_cpp_builtins): Correct
4638 __cpp_inheriting_constructors.
4639
31f7f784
JM
46402016-11-01 Jason Merrill <jason@redhat.com>
4641
2bc78e3c
JM
4642 * c-cppbuiltin.c (c_cpp_builtins): Update
4643 __cpp_inheriting_constructors.
4644
31f7f784
JM
4645 * c.opt (-fnew-inheriting-ctors): New.
4646 * c-opts.c: Default to on for ABI 11+.
4647
dcb466ec
JJ
46482016-10-31 Jakub Jelinek <jakub@redhat.com>
4649
4650 PR c++/77948
4651 * c.opt (fext-numeric-literals): Add Var and Init.
4652 * c-opts.c (c_common_handle_option): Don't clear
4653 cpp_opts->ext_numeric_literals for -std=c++{11,14,1z}.
4654 (c_common_post_options): Clear it here if not set
4655 explicitly.
4656
52e1b91e
AH
46572016-10-28 Aldy Hernandez <aldyh@redhat.com>
4658
4659 PR debug/77773
4660 * c-pretty-print.c (simple_type_specifier): Do not dereference `t'
4661 if NULL.
4662
e16f1cc7
JJ
46632016-10-25 Jakub Jelinek <jakub@redhat.com>
4664
4665 * c-common.h (enum rid): Add RID_BUILTIN_LAUNDER.
4666 * c-common.c (c_common_reswords): Add __builtin_launder.
4667
f8348061
BE
46682016-10-24 Bernd Edlinger <bernd.edlinger@hotmail.de>
4669
4670 * c-common.c (c_common_truthvalue_conversion): Warn for
4671 multiplications in boolean context. Fix the quoting of '<<' and '<'
4672 in the shift warning.
4673
eff89e01
BE
46742016-10-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
4675
4676 * c-common.c (c_common_truthvalue_conversion): Fix the comment.
4677
24bc7bf4
JM
46782016-10-20 Jason Merrill <jason@redhat.com>
4679
4680 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_concepts value.
4681
4c712374
BE
46822016-10-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
4683
4684 * c-common.c (c_common_truthvalue_conversion): Warn only for signed
4685 integer shift ops in boolean context.
4686
46872016-10-18 Aldy Hernandez <aldyh@redhat.com>
adc577c5
AH
4688
4689 * c.opt (Walloca): New.
4690 (Walloca-larger-than=): New.
4691 (Wvla-larger-than=): New.
4692
8fa18c06
MP
46932016-10-17 Marek Polacek <polacek@redhat.com>
4694
4695 * c-warn.c (find_array_ref_with_const_idx_r): Remove parameter names.
4696 Return immediately when finding a match.
4697 (warn_tautological_cmp): Remove a boolean variable that is no longer
4698 needed.
4699
b12b1915
MP
47002016-10-17 Marek Polacek <polacek@redhat.com>
4701
4702 * c-attribs.c: New file.
4703 * c-common.c: Move attributes handling to c-attribs.c.
4704 (get_nonnull_operand): No longer static.
4705 * c-common.h: Move the declarations from c-attribs.c to its own section.
4706
2045acd9
JM
47072016-10-14 Jason Merrill <jason@redhat.com>
4708
4709 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_aggregate_bases
4710 and __cpp_deduction_guides.
4711
14a2c9aa
JM
47122016-10-13 Jason Merrill <jason@redhat.com>
4713
4714 * c-cppbuiltin.c (c_cpp_builtins): Add __cpp_inline_variables.
4715
4d0cdd0c
TP
47162016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
4717
4718 * c-cppbuiltin.c: Include memmodel.h.
4719 * c-opts.c: Likewise.
4720 * c-pragma.c: Likewise.
4721 * c-warn.c: Likewise.
4722
70f6d5e1
JJ
47232016-10-12 Jakub Jelinek <jakub@redhat.com>
4724
4725 * c.opt (Wextra): Add as C/C++/ObjC/ObjC++ option.
4726 (Wimplicit-fallthrough=): Enable for these languages by -Wextra.
4727 * c-opts.c (sanitize_cpp_opts): Initialize
4728 cpp_opts->cpp_warn_implicit_fallthrough.
4729
78f61294
MP
47302016-10-11 Marek Polacek <polacek@redhat.com>
4731
4732 * c-common.c (warning_candidate_p): Change the return type to bool
4733 and return true/false instead of 1/0.
4734 (vector_mode_valid_p): Likewise.
4735
038b5cc0
MP
47362016-10-11 Marek Polacek <polacek@redhat.com>
4737
4738 * c-common.c (fold_for_warn): No longer static.
4739 (bool_promoted_to_int_p): Likewise.
4740 (c_common_get_narrower): Likewise.
4741 (constant_expression_warning): Move to c-warn.c.
4742 (constant_expression_error): Likewise.
4743 (overflow_warning): Likewise.
4744 (warn_logical_operator): Likewise.
4745 (find_array_ref_with_const_idx_r): Likewise.
4746 (warn_tautological_cmp): Likewise.
4747 (expr_has_boolean_operands_p): Likewise.
4748 (warn_logical_not_parentheses): Likewise.
4749 (warn_if_unused_value): Likewise.
4750 (strict_aliasing_warning): Likewise.
4751 (sizeof_pointer_memaccess_warning): Likewise.
4752 (check_main_parameter_types): Likewise.
4753 (conversion_warning): Likewise.
4754 (warnings_for_convert_and_check): Likewise.
4755 (match_case_to_enum_1): Likewise.
4756 (match_case_to_enum): Likewise.
4757 (c_do_switch_warnings): Likewise.
4758 (warn_for_omitted_condop): Likewise.
4759 (readonly_error): Likewise.
4760 (lvalue_error): Likewise.
4761 (invalid_indirection_error): Likewise.
4762 (warn_array_subscript_with_type_char): Likewise.
4763 (warn_about_parentheses): Likewise.
4764 (warn_for_unused_label): Likewise.
4765 (warn_for_div_by_zero): Likewise.
4766 (warn_for_memset): Likewise.
4767 (warn_for_sign_compare): Likewise.
4768 (do_warn_double_promotion): Likewise.
4769 (do_warn_unused_parameter): Likewise.
4770 (record_locally_defined_typedef): Likewise.
4771 (maybe_record_typedef_use): Likewise.
4772 (maybe_warn_unused_local_typedefs): Likewise.
4773 (maybe_warn_bool_compare): Likewise.
4774 (maybe_warn_shift_overflow): Likewise.
4775 (warn_duplicated_cond_add_or_warn): Likewise.
4776 (diagnose_mismatched_attributes): Likewise.
4777 * c-common.h: Move the declarations from c-warn.c to its own section.
4778 * c-warn.c: New file.
4779
627be19f
JM
47802016-10-08 Jason Merrill <jason@redhat.com>
4781
4782 * c-common.c (c_common_truthvalue_conversion): Don't distribute
4783 into COND_EXPR in C++.
4784
7bad794a
JJ
47852016-10-08 Jakub Jelinek <jakub@redhat.com>
4786
4787 * c-lex.c (c_lex_with_flags) <case CPP_COMMENT>: For CPP_COMMENT
4788 token with PREV_FALLTHROUGH, skip all following CPP_PADDING and
4789 CPP_COMMENT tokens and set add_flags to PREV_FALLTHROUGH afterwards.
4790
be845b04
JJ
47912016-10-07 Jakub Jelinek <jakub@redhat.com>
4792
4793 Implement LWG2296 helper intrinsic
4794 * c-common.h (enum rid): Add RID_ADDRESSOF.
4795 * c-common.c (c_common_reswords): Add __builtin_addressof.
4796
c09c4992
BE
47972016-10-07 Bernd Edlinger <bernd.edlinger@hotmail.de>
4798
4799 PR c++/77700
4800 * c-common.c (c_common_truthvalue_conversion): Warn also for
4801 suspicious enum values in boolean context.
4802
342cfb3e
JJ
48032016-10-06 Jakub Jelinek <jakub@redhat.com>
4804
4805 Implement P0258R2 - helper for C++17
4806 std::has_unique_object_representations trait
4807 * c-common.h (enum rid): Add RID_HAS_UNIQUE_OBJ_REPRESENTATIONS.
4808 * c-common.c (c_common_reswords): Add
4809 __has_unique_object_representations.
4810
2e69f143
JJ
48112016-10-05 Jakub Jelinek <jakub@redhat.com>
4812
4813 PR sanitizer/66343
4814 * c-ubsan.c (ubsan_instrument_return): Don't call
4815 initialize_sanitizer_builtins here.
4816
700fff34
BE
48172016-10-05 Bernd Edlinger <bernd.edlinger@hotmail.de>
4818
4819 * c-common.c (c_common_truthvalue_conversion): Warn also for suspicious
4820 conditional expression in boolean context when only one arm is
4821 non-boolean.
4822
9563bfcd
JJ
48232016-10-05 Jakub Jelinek <jakub@redhat.com>
4824
04a32443
JJ
4825 PR sanitizer/77823
4826 * c-ubsan.c (ubsan_instrument_shift): Return NULL_TREE if type0
4827 is not integral.
4828
9563bfcd
JJ
4829 * c-common.c (c_common_reswords): Update comment for C++11.
4830
f1644724
JM
48312016-10-04 Jason Merrill <jason@redhat.com>
4832
4833 * c-common.c (make_tree_vector_from_ctor): New.
4834 * c-common.h: Declare it.
4835
5a79befb
JJ
48362016-10-04 Jakub Jelinek <jakub@redhat.com>
4837
4838 * c-cppbuiltin.c (c_cpp_builtins): Don't define
4839 __LIBGCC_JCR_SECTION_NAME__.
4840
1633d3b9
BE
48412016-10-03 Bernd Edlinger <bernd.edlinger@hotmail.de>
4842
4843 * c-common.c (c_common_truthvalue_conversion): Warn for suspicious
4844 left shift in boolean context.
4845
a2c6e7f2
JJ
48462016-09-29 Jakub Jelinek <jakub@redhat.com>
4847
4848 Implement P0001R1 - C++17 removal of register storage class specifier
4849 * c.opt (Wregister): New warning.
4850 * c-opts.c (c_common_post_options): Enable -Wregister by
4851 default for C++17.
4852
75304c87
JG
48532016-09-29 James Greenhalgh <james.greenhalgh@arm.com>
4854
4855 * c-opts.c (c_common_post_options): Remove special case for
4856 TARGET_FLT_EVAL_METHOD_NON_DEFAULT with -fexcess-precision=standard
4857 in C++.
4858
bbfac6da
JJ
48592016-09-27 Jakub Jelinek <jakub@redhat.com>
4860
6e39060a
JJ
4861 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_capture_star_this for
4862 -std=c++1z.
4863
bbfac6da
JJ
4864 * c-ada-spec.c (print_ada_declaration): Remove break after return.
4865
e73cf9a2
TP
48662016-09-26 Thomas Preud'homme <thomas.preudhomme@arm.com>
4867
4868 * c-common.c: Include memmodel.h.
4869
c6147dc4
MP
48702016-09-26 Marek Polacek <polacek@redhat.com>
4871
4872 * c-lex.c (c_common_has_attribute): Handle attribute fallthrough.
4873
81fea426
MP
48742016-09-26 Marek Polacek <polacek@redhat.com>
4875
4876 PR c/7652
4877 * c-common.c (c_common_attribute_table): Add fallthrough attribute.
4878 (handle_fallthrough_attribute): New function.
4879 (attribute_fallthrough_p): New function.
4880 * c-common.h (attribute_fallthrough_p): Declare.
4881
9a2300e9
MP
48822016-09-24 Marek Polacek <polacek@redhat.com>
4883
4884 PR c/77490
4885 * c.opt (Wbool-operation): New.
4886
a09e9e35
BE
48872016-09-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
4888
4889 * c-common.c (c_common_truthvalue_conversion): Inhibit
4890 Wint-in-bool-context warning with from_macro_definition_at.
4891 Mention the expression will always evaluate to true.
4892
d43b4ccc
MS
48932016-09-21 Martin Sebor <msebor@redhat.com>
4894
4895 PR bootstrap/77676
4896 * c.opt (fprintf-return-value): Temporarily initialize to zero
4897 to unblock bootstrap failures.
4898
2e1c20b1
JJ
48992016-09-21 Jakub Jelinek <jakub@redhat.com>
4900
4901 PR c++/77651
4902 * c.opt (Waligned-new=): Add RejectNegative.
4903 (faligned-new=): Likewise. Spelling fix - change
4904 aligned_new_threshhold to aligned_new_threshold.
4905 * c-cppbuiltin.c (c_cpp_builtins): Change aligned_new_threshhold
4906 to aligned_new_threshold.
4907
88d0c3f0
MS
49082016-09-20 Martin Sebor <msebor@redhat.com>
4909
4910 PR middle-end/49905
4911 * c.opt: Add -Wformat-length and -fprintf-return-value.
4912
144a96e4
BE
49132016-09-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
4914
4915 PR c++/77434
4916 * c.opt (Wint-in-bool-context): New warning.
4917 * c-common.c (c_common_truthvalue_conversion): Warn on integer
4918 constants in boolean context.
4919
63012d9a
JM
49202016-09-19 Joseph Myers <joseph@codesourcery.com>
4921
4922 * c-common.c (max_align_t_align): Also consider alignment of
4923 float128_type_node.
4924
931388ce
JM
49252016-09-15 Jason Merrill <jason@redhat.com>
4926
4927 * c-common.c (check_cxx_fundamental_alignment_constraints): Check
4928 DECL_EXTERNAL.
4929
38711381
JM
49302016-09-14 Jason Merrill <jason@redhat.com>
4931
4932 * c-common.c (check_cxx_fundamental_alignment_constraints): Don't
4933 limit FIELD_DECL, either.
4934
e51fbec3
MP
49352016-09-14 Marek Polacek <polacek@redhat.com>
4936
4937 * c-common.c (c_common_truthvalue_conversion): Use false instead of 0.
4938 * c-common.h (build_unary_op): Change nonconvert parameter type to bool.
4939 * c-omp.c (c_finish_omp_atomic): Use false instead of 0.
4940
254830ba
DM
49412016-09-13 David Malcolm <dmalcolm@redhat.com>
4942
4943 * c-common.c (warn_logical_not_parentheses): Replace
4944 rich_location::add_fixit_insert calls with add_fixit_insert_before
4945 and add_fixit_insert_after, eliminating the "next_loc" calculation.
4946
42763690
JM
49472016-09-13 Jason Merrill <jason@redhat.com>
4948 Tom de Vries <tom@codesourcery.com>
4949
4950 PR c++/77427
4951 * c-common.c (set_underlying_type): Don't treat array as builtin type.
4952
9453eee9
JM
49532016-09-13 Jason Merrill <jason@redhat.com>
4954
4955 * c-common.c (check_cxx_fundamental_alignment_constraints): Don't
4956 limit types at all.
4957
e96809e3
JM
49582016-09-12 Jason Merrill <jason@redhat.com>
4959
4960 * c-common.c (check_cxx_fundamental_alignment_constraints): Fix
4961 bit/byte confusion, allow large alignment for types.
4962
54dcdb88
BE
49632016-09-12 Bernd Edlinger <bernd.edlinger@hotmail.de>
4964
4965 PR c++/77496
4966 * c-common.c (warn_for_omitted_condop): Also warn for boolean data.
4967
d1463eb9
DM
49682016-09-12 David Malcolm <dmalcolm@redhat.com>
4969
4970 PR c/72858
4971 * c-format.c (argument_parser::check_argument_type): Add params
4972 "type_start" and "conversion_char". Use the former to generate
4973 offset_to_type_start and pass it and conversion_char to
4974 check_format_types.
4975 (check_format_info_main): Capture the start of the type
4976 information as "type_start", and pass it an format_char
4977 to arg_parser.check_argument_type.
4978 (check_format_types): Provide an example in the leading comment.
4979 Add params "offset_to_type_start" and "conversion_char"; pass
4980 them to format_type_warning calls.
4981 (test_get_modifier_for_format_len): Likewise.
4982 (matching_type_p): New function.
4983 (get_format_for_type): Add param "conversion_char" and move
4984 implementation into...
4985 (get_format_for_type_1): ...new function, called twice.
4986 Use new function matching_type_p rather than checking for
4987 TYPE_CANONICAL equality.
4988 (get_corrected_substring): New function.
4989 (format_type_warning): Provide an example in the leading comment.
4990 Add params "offset_to_type_start" and "conversion_char". Replace
4991 call to get_format_for_type with call to get_corrected_substring
4992 and move rejection of hints for widths/precisions there.
4993 (assert_format_for_type_streq): Add param "conversion_char".
4994 (ASSERT_FORMAT_FOR_TYPE_STREQ): Add param CONVERSION_CHAR.
4995 (test_get_format_for_type_printf): Add conversion chars to the
4996 tests, adding coverage for various combinations of integer
4997 vs double conversions, and for preserving octal and hexadecimal
4998 conversions.
4999 (test_get_format_for_type_scanf): Add conversion chars to the
5000 tests.
5001
5b28efbb
TV
50022016-09-10 Tom de Vries <tom@codesourcery.com>
5003
5004 PR C/71602
5005 * c-common.c (build_va_arg): Handle more strict
5006 targetm.canonical_va_list_type. Replace first argument type error with
5007 assert.
5008
3f0177e7
MS
50092016-09-09 Martin Sebor <msebor@redhat.com>
5010
5011 PR c/77520
5012 PR c/77521
5013 * c-format.c (argument_parser::find_format_char_info): Use %qc
5014 format directive unconditionally.
5015
af63ba4b
JM
50162016-09-09 Jason Merrill <jason@redhat.com>
5017
5018 Implement C++17 new of over-aligned types.
5019 * c.opt: Add -faligned-new and -Waligned-new.
5020 * c-common.c (max_align_t_align): Split out from...
5021 (cxx_fundamental_alignment_p): ...here.
5022 * c-common.h: Declare it.
5023 * c-cppbuiltin.c (c_cpp_builtins): Handle aligned new.
5024
c65248cb
JM
50252016-09-09 Joseph Myers <joseph@codesourcery.com>
5026
5027 * c-cppbuiltin.c (builtin_define_type_width): New function.
5028 (builtin_define_stdint_macros, c_cpp_builtins): Define type width
5029 macros.
5030
e5106e27
DM
50312016-09-07 David Malcolm <dmalcolm@redhat.com>
5032
5033 * c-common.c (get_cpp_ttype_from_string_type): Handle being passed
5034 a POINTER_TYPE.
5035 (substring_loc::get_location): Move to substring-locations.c,
5036 keeping implementation as...
5037 (c_get_substring_location): New function, from the above, reworked
5038 to use accessors rather than member lookup.
5039 * c-common.h (class substring_loc): Move to substring-locations.h,
5040 replacing with a forward decl.
5041 (c_get_substring_location): New decl.
5042 * c-format.c: Include "substring-locations.h".
5043 (format_warning_va): Move to substring-locations.c.
5044 (format_warning_at_substring): Likewise.
5045
ab20d992 50462016-09-06 Martin Sebor <msebor@redhat.com>
a42e7952
MS
5047
5048 PR c/77336
5049 * c-format.c (check_function_format): Avoid issuing warnings for
5050 functions unless they call format functions with non-constant
5051 format strings.
5052
b772a565
RB
50532016-09-06 Richard Biener <rguenther@suse.de>
5054
5055 PR c/77450
5056 * c-common.c (c_common_mark_addressable_vec): Handle
5057 COMPOUND_LITERAL_EXPR.
5058
25ff5dd3
MP
50592016-09-05 Marek Polacek <polacek@redhat.com>
5060
5061 PR c/77423
5062 * c-common.c (bool_promoted_to_int_p): New function.
5063 (expr_has_boolean_operands_p): New function.
5064 (warn_logical_not_parentheses): Return if expr_has_boolean_operands_p.
5065 (maybe_warn_bool_compare): Use bool_promoted_to_int_p.
5066
21234eb5
TV
50672016-09-04 Tom de Vries <tom@codesourcery.com>
5068
5069 revert:
5070 2016-08-29 Tom de Vries <tom@codesourcery.com>
5071
5072 * c-common.c (build_va_arg): Replace first argument type error
5073 with assert.
5074
9dc5773f
JJ
50752016-09-02 Jakub Jelinek <jakub@redhat.com>
5076
5077 PR c/65467
5078 * c-omp.c (c_finish_omp_atomic): Reject _Atomic qualified expressions.
5079 (c_finish_omp_for): Reject _Atomic qualified iterators.
5080
50812016-09-01 Martin Sebor <msebor@redhat.com>
3d7b83b6
MS
5082
5083 * c-ada-spec.c (dump_ada_function_declaration): Increase buffer
5084 size to guarantee it fits the output of the formatted function
5085 regardless of its arguments.
5086
295844f6
MP
50872016-09-01 Marek Polacek <polacek@redhat.com>
5088
5089 PR c/7652
5090 * c-common.c (resolve_overloaded_builtin): Fix formatting. Add
5091 FALLTHRU comments.
5092
3d06b6f2
MP
50932016-08-29 Marek Polacek <polacek@redhat.com>
5094
5095 PR c/77292
5096 * c-common.c (warn_logical_not_parentheses): Don't warn for
5097 a comparison or a logical operator.
5098
34cedad5
TV
50992016-08-29 Tom de Vries <tom@codesourcery.com>
5100
5101 * c-common.c (build_va_arg): Fix type comparison assert.
5102
f162d717
TV
51032016-08-29 Tom de Vries <tom@codesourcery.com>
5104
5105 * c-common.c (build_va_arg): Replace first argument type error
5106 with assert.
5107
ba9bbd6f
TV
51082016-08-29 Tom de Vries <tom@codesourcery.com>
5109
5110 PR c/77398
5111 * c-common.c (build_va_arg): Add first argument error. Build va_arg
5112 with error_mark_node as va_list instead of with illegal va_list.
5113
ebef225f
MP
51142016-08-25 Marek Polacek <polacek@redhat.com>
5115 David Malcolm <dmalcolm@redhat.com>
5116
5117 * c-common.c (warn_logical_not_parentheses): Print fixit hints.
5118 * c-common.h (warn_logical_not_parentheses): Update declaration.
5119
b00e6e75
MP
51202016-08-22 Marek Polacek <polacek@redhat.com>
5121
5122 PR c++/77321
5123 * c-common.c (warn_for_memset): Check type for null.
5124
6dc198e3
JM
51252016-08-22 Joseph Myers <joseph@codesourcery.com>
5126
14ec014e 5127 * c-cppbuiltin.c (c_cpp_builtins): Check _FloatN and
6dc198e3
JM
5128 _FloatNx types for suffixes for built-in functions.
5129
c65699ef
JM
51302016-08-19 Joseph Myers <joseph@codesourcery.com>
5131
5132 PR c/32187
5133 * c-common.h (RID_FLOAT16, RID_FLOATN_NX_FIRST, RID_FLOAT32)
5134 (RID_FLOAT64, RID_FLOAT128, RID_FLOAT32X, RID_FLOAT64X)
5135 (RID_FLOAT128X): New enum rid values.
5136 (CASE_RID_FLOATN_NX): New macro.
5137 * c-common.c (c_common_reswords): Add _FloatN and _FloatNx
5138 keywords.
5139 (c_common_type_for_mode): Check for _FloatN and _FloatNx and
5140 corresponding complex types.
5141 (c_common_nodes_and_builtins): For non-C++, register _FloatN and
5142 _FloatNx and corresponding complex types.
5143 (keyword_begins_type_specifier): Use CASE_RID_FLOATN_NX.
5144 * c-cppbuiltin.c (builtin_define_float_constants): Check _FloatN
5145 and _FloatNx types for the widest type for determining
5146 DECIMAL_DIG. Define __LDBL_DECIMAL_DIG__ as well as
5147 __DECIMAL_DIG__ for long double. Handle FMA_SUFFIX being NULL.
5148 (c_cpp_builtins): Call builtin_define_float_constants for _FloatN
5149 and _FloatNx types.
5150 * c-lex.c (interpret_float): Handle _FloatN and _FloatNx
5151 constants.
5152 * c-pretty-print.c (pp_c_floating_constant): Handle _FloatN and
5153 _FloatNx types.
5154
cc015f3a
DM
51552016-08-18 David Malcolm <dmalcolm@redhat.com>
5156
5157 * c-opts.c (c_diagnostic_finalizer): Update for change to
5158 diagnostic_show_locus.
5159
cb18fd07
DM
51602016-08-18 David Malcolm <dmalcolm@redhat.com>
5161
5162 * c-common.c: Include "spellcheck.h".
5163 (cb_get_suggestion): New function.
5164 * c-common.h (cb_get_suggestion): New decl.
5165 * c-lex.c (init_c_lex): Initialize cb->get_suggestion to
5166 cb_get_suggestion.
5167
a76989dc
MP
51682016-08-18 Marek Polacek <polacek@redhat.com>
5169
5170 PR c/71514
5171 * c-common.c (get_atomic_generic_size): Disallow pointer-to-function
5172 and pointer-to-VLA.
5173
65e736c0
DM
51742016-08-16 David Malcolm <dmalcolm@redhat.com>
5175
5176 PR c/72857
5177 * c-common.c (substring_loc::get_range): Rename to...
5178 (substring_loc::get_location): ...this, converting param from a
5179 source_range * to a location_t *. Call
5180 get_source_location_for_substring rather than
5181 get_source_range_for_substring, and pass in m_caret_idx.
5182 * c-common.h (substring_loc::substring_loc): Add param "caret_idx".
5183 (substring_loc::get_range): Replace with...
5184 (substring_loc::get_location): ...this.
5185 (substring_loc::set_caret_index): New method.
5186 (substring_loc): Add field m_caret_idx.
5187 * c-format.c (format_warning_va): Update for above changes.
5188 Rename local "substring_loc" to "fmt_substring_loc" to avoid
5189 clashing with type name.
5190 (format_warning_at_char): Add caret_idx param to substring_loc ctor.
5191 (check_argument_type): Likewise.
5192 (format_type_warning): Rename param "fmt_loc" to "whole_fmt_loc"
5193 Use a copy when emitting warnings, setting the caret index from TYPE.
5194
7e1dde14 51952016-08-16 Eric Botcazou <ebotcazou@adacore.com>
8e745a17 5196 Arnaud Charlet <charlet@adacore.com>
7e1dde14
EB
5197
5198 * c-ada-spec.c (dump_number): New function.
5199 (handle_escape_character): Likewise.
5200 (print_ada_macros): Add handling of constant integers and strings.
5201
191816a3
MP
52022016-08-12 Marek Polacek <polacek@redhat.com>
5203
5204 PR c/7652
5205 * c-common.c (scalar_to_vector): Adjust fall through comment.
5206 * c-opts.c (c_common_handle_option): Likewise.
5207 * c-pragma.c (handle_pragma_pack): Add FALLTHRU.
5208 * c-pretty-print.c (c_pretty_printer::postfix_expression): Adjust
5209 fall through comment.
5210 * cilk.c (extract_free_variables): Add FALLTHRU.
5211
452df4a4
JM
52122016-08-10 Jason Merrill <jason@redhat.com>
5213
5214 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_if_constexpr.
5215
f3365c12
JM
52162016-08-09 Jason Merrill <jason@redhat.com>
5217
5218 * c-common.c (c_common_attribute_table): vector_size affects type
5219 identity.
5220
f0bc3323
MP
52212016-08-09 Marek Polacek <polacek@redhat.com>
5222
5223 PR c/7652
5224 * c-ada-spec.c (dump_generic_ada_node): Add return.
5225
98e5a19a
JM
52262016-08-09 Jason Merrill <jason@redhat.com>
5227
5228 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_constexpr for
5229 C++17 constexpr lambdas.
5230
895aa8e1
DM
52312016-08-08 David Malcolm <dmalcolm@redhat.com>
5232
5233 PR c/64955
5234 * c-common.h (selftest::c_format_c_tests): New declaration.
5235 (selftest::run_c_tests): New declaration.
5236 * c-format.c: Include "selftest.h.
5237 (format_warning_va): Add param "corrected_substring" and use
5238 it to add a replacement fix-it hint.
5239 (format_warning_at_substring): Likewise.
5240 (format_warning_at_char): Update for new param of
5241 format_warning_va.
5242 (argument_parser::check_argument_type): Pass "fki" to
5243 check_format_types.
5244 (check_format_types): Add param "fki" and pass it to
5245 format_type_warning.
5246 (deref_n_times): New function.
5247 (get_modifier_for_format_len): New function.
5248 (selftest::test_get_modifier_for_format_len): New function.
5249 (get_format_for_type): New function.
5250 (format_type_warning): Add param "fki" and use it to attempt
5251 to provide hints for argument types when calling
5252 format_warning_at_substring.
5253 (selftest::get_info): New function.
5254 (selftest::assert_format_for_type_streq): New function.
5255 (ASSERT_FORMAT_FOR_TYPE_STREQ): New macro.
5256 (selftest::test_get_format_for_type_printf): New function.
5257 (selftest::test_get_format_for_type_scanf): New function.
5258 (selftest::c_format_c_tests): New function.
5259
e52ed3fe
DM
52602016-08-08 David Malcolm <dmalcolm@redhat.com>
5261
5262 PR c/52952
5263 * c-format.c: Include "diagnostic.h".
5264 (location_column_from_byte_offset): Delete.
5265 (location_from_offset): Delete.
5266 (format_warning_va): New function.
5267 (format_warning_at_substring): New function.
5268 (format_warning_at_char): New function.
5269 (check_format_arg): Capture location of format_tree and pass to
5270 check_format_info_main.
5271 (argument_parser): Add fields "start_of_this_format" and
5272 "format_string_cst".
5273 (flag_chars_t::validate): Add param "format_string_cst". Convert
5274 warning_at call using location_from_offset to call to
5275 format_warning_at_char.
5276 (argument_parser::argument_parser): Add param "format_string_cst_"
5277 and use use it to initialize field "format_string_cst".
5278 Initialize new field "start_of_this_format".
5279 (argument_parser::read_format_flags): Convert warning_at call
5280 using location_from_offset to a call to format_warning_at_char.
5281 (argument_parser::read_any_format_left_precision): Likewise.
5282 (argument_parser::read_any_format_precision): Likewise.
5283 (argument_parser::read_any_other_modifier): Likewise.
5284 (argument_parser::find_format_char_info): Likewise, in three places.
5285 (argument_parser::parse_any_scan_set): Likewise, in one place.
5286 (argument_parser::handle_conversions): Likewise, in two places.
5287 (argument_parser::check_argument_type): Add param "fmt_param_loc"
5288 and use it to make a substring_loc. Pass the latter to
5289 check_format_types.
5290 (check_format_info_main): Add params "fmt_param_loc" and
5291 "format_string_cst". Convert warning_at calls using
5292 location_from_offset to calls to format_warning_at_char. Pass the
5293 new params to the arg_parser ctor. Pass "format_string_cst" to
5294 flag_chars.validate. Pass "fmt_param_loc" to
5295 arg_parser.check_argument_type.
5296 (check_format_types): Convert first param from a location_t
5297 to a const substring_loc & and rename to "fmt_loc". Attempt
5298 to extract the range of the relevant parameter and pass it
5299 to format_type_warning.
5300 (format_type_warning): Convert first param from a location_t
5301 to a const substring_loc & and rename to "fmt_loc". Add
5302 params "param_range" and "type". Replace calls to warning_at
5303 with calls to format_warning_at_substring.
5304
1c4d457e
DM
53052016-08-08 David Malcolm <dmalcolm@redhat.com>
5306
5307 * c-format.c (class flag_chars_t): New class.
5308 (struct length_modifier): New struct.
5309 (class argument_parser): New class.
5310 (flag_chars_t::flag_chars_t): New ctor.
5311 (flag_chars_t::has_char_p): New method.
5312 (flag_chars_t::add_char): New method.
5313 (flag_chars_t::validate): New method.
5314 (flag_chars_t::get_alloc_flag): New method.
5315 (flag_chars_t::assignment_suppression_p): New method.
5316 (argument_parser::argument_parser): New ctor.
5317 (argument_parser::read_any_dollar): New method.
5318 (argument_parser::read_format_flags): New method.
5319 (argument_parser::read_any_format_width): New method.
5320 (argument_parser::read_any_format_left_precision): New method.
5321 (argument_parser::read_any_format_precision): New method.
5322 (argument_parser::handle_alloc_chars): New method.
5323 (argument_parser::read_any_length_modifier): New method.
5324 (argument_parser::read_any_other_modifier): New method.
5325 (argument_parser::find_format_char_info): New method.
5326 (argument_parser::validate_flag_pairs): New method.
5327 (argument_parser::give_y2k_warnings): New method.
5328 (argument_parser::parse_any_scan_set): New method.
5329 (argument_parser::handle_conversions): New method.
5330 (argument_parser::check_argument_type): New method.
5331 (check_format_info_main): Introduce classes argument_parser
5332 and flag_chars_t, moving the code within the loop into methods
5333 of these classes. Make various locals "const".
5334
88fa5555
DM
53352016-08-05 David Malcolm <dmalcolm@redhat.com>
5336
5337 * c-common.c: Include "substring-locations.h".
5338 (get_cpp_ttype_from_string_type): New function.
5339 (g_string_concat_db): New global.
5340 (substring_loc::get_range): New method.
5341 * c-common.h (g_string_concat_db): New declaration.
5342 (class substring_loc): New class.
5343 * c-lex.c (lex_string): When concatenating strings, capture the
5344 locations of all tokens using a new obstack, and record the
5345 concatenation locations within g_string_concat_db.
5346 * c-opts.c (c_common_init_options): Construct g_string_concat_db
5347 on the ggc-heap.
5348
78169471
MP
53492016-07-29 Marek Polacek <polacek@redhat.com>
5350
638fc14f
MP
5351 PR c/71926
5352 * c-common.c (c_common_truthvalue_conversion): Use LOCATION for the
5353 parentheses warning.
5354
78169471
MP
5355 PR c/71574
5356 * c-common.c (handle_alloc_align_attribute): Also check FUNCTION_DECL.
5357
1225d6b1
ML
53582016-07-28 Martin Liska <mliska@suse.cz>
5359
5360 PR gcov-profile/68025
5361 * c-common.c (handle_no_profile_instrument_function_attribute):
5362
ec1e2a40
BE
53632016-07-27 Bernd Edlinger <bernd.edlinger@hotmail.de>
5364
5365 * c-common.c (check_user_alignment): Use LOG2_BITS_PER_UNIT instead of
5366 BITS_PER_UNIT_LOG.
5367
5ec2cd9f
JM
53682016-07-25 Jason Merrill <jason@redhat.com>
5369
5370 PR c++/65970
5371 * c.opt (fconstexpr-loop-limit): New.
5372
9dc5773f 53732016-07-22 Martin Sebor <msebor@redhat.com>
2e6b45af
MS
5374
5375 PR c++/71675
5376 * c-common.c (resolve_overloaded_builtin): Avoid converting
5377 __atomic_compare_exchange_n return type to that of what its
5378 first argument points to.
5379
e3fe09c1
UB
53802016-07-22 Uros Bizjak <ubizjak@gmail.com>
5381
5382 * c-common.c: Use HOST_WIDE_INT_M1U instead of
5383 ~(unsigned HOST_WIDE_INT) 0.
5384
bc91c436
ML
53852016-07-22 Martin Liska <mliska@suse.cz>
5386
5387 PR gcov-profile/69028
5388 PR gcov-profile/62047
5389 * cilk.c (create_cilk_helper_decl): Set location of a new decl
5390 to the current_function_decl.
5391
451dcc66
JM
53922016-07-21 Jason Merrill <jason@redhat.com>
5393
5394 PR c++/65168
5395 * c-common.c (c_common_truthvalue_conversion): Check
5396 c_inhibit_evaluation_warnings for warning about address of
5397 reference.
5398
de6a69ee
DM
53992016-07-20 David Malcolm <dmalcolm@redhat.com>
5400
5401 * c-common.h (lookup_name_fuzzy): Convert return type from tree to
5402 const char *.
5403
d022c55a
JM
54042016-07-15 Jason Merrill <jason@redhat.com>
5405
5406 * c-opts.c (c_common_post_options): Update -fabi-version default to 11.
5407
ddbbcb19
JJ
54082016-07-15 Jakub Jelinek <jakub@redhat.com>
5409
5410 PR c/71858
5411 * c-common.h (enum lookup_name_fuzzy_kind): Add
5412 FUZZY_LOOKUP_FUNCTION_NAME.
5413
d0cf395a
JM
54142016-07-08 Jason Merrill <jason@redhat.com>
5415
5416 P0145: Refining Expression Order for C++.
5417 * c.opts (-fargs-in-order): Rename to -fstrong-eval-order.
5418 * c-opts.c: Adjust.
5419
98d44e93
MT
54202016-07-05 Markus Trippelsdorf <markus@trippelsdorf.de>
5421
5422 PR c++/71214
5423 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_rvalue_references.
5424
f9d8d994
TS
54252016-06-29 Thomas Schwinge <thomas@codesourcery.com>
5426
5427 * c-pragma.h (enum pragma_kind): Rename
5428 PRAGMA_OMP_DECLARE_REDUCTION to PRAGMA_OMP_DECLARE. Adjust all
5429 users.
5430
4aa83879
RB
54312016-06-29 Richard Biener <rguenther@suse.de>
5432
5433 PR middle-end/71002
5434 * c-common.c (c_common_get_alias_set): Remove union type punning case.
5435
a25bd9e6
JM
54362016-06-24 Jason Merrill <jason@redhat.com>
5437
5438 P0145R2: Refining Expression Order for C++.
5439 * c-common.c (verify_tree) [COMPOUND_EXPR]: Fix handling on LHS of
5440 MODIFY_EXPR.
5441
a86451b9
JJ
54422016-06-24 Jakub Jelinek <jakub@redhat.com>
5443
5444 * c-common.c (check_builtin_function_arguments): Require last
5445 argument of BUILT_IN_*_OVERFLOW_P to have INTEGER_TYPE type.
5446 Adjust wording of diagnostics for BUILT_IN_*_OVERLFLOW
5447 if the last argument is pointer to enumerated or boolean type.
5448
1a4f11c8
DM
54492016-06-22 David Malcolm <dmalcolm@redhat.com>
5450
5451 PR c/70339
5452 * c-common.h (enum lookup_name_fuzzy_kind): New enum.
5453 (lookup_name_fuzzy): New prototype.
5454
fe55692c
JDA
54552016-06-21 John David Anglin <danglin@gcc.gnu.org>
5456
5457 * c-common.c (get_source_date_epoch): Use int64_t instead of long long.
5458
4eb24e01
JM
54592016-06-14 Jason Merrill <jason@redhat.com>
5460
5461 P0145R2: Refining Expression Order for C++.
5462 * c.opt (fargs-in-order): New.
5463 * c-opts.c (c_common_post_options): Adjust flag_args_in_order.
5464
ef7cf206
JJ
54652016-06-13 Jakub Jelinek <jakub@redhat.com>
5466
0dda258b
JJ
5467 PR sanitizer/71498
5468 * c-gimplify.c (ubsan_walk_array_refs_r): Set *walk_subtrees = 0 on
5469 all BIND_EXPRs, and on all BIND_EXPRs recurse also on BIND_EXPR_BODY.
5470
ef7cf206
JJ
5471 PR preprocessor/71183
5472 * c-ppoutput.c (init_pp_output): Set cb->get_source_date_epoch
5473 to cb_get_source_date_epoch.
5474
50b15873
JJ
54752016-06-10 Jakub Jelinek <jakub@redhat.com>
5476
5477 PR c/68657
5478 * c.opt (Wpsabi): Add Warning flag.
5479
4d926e34
MS
54802016-06-10 Martin Sebor <msebor@redhat.com>
5481
5482 PR c/71392
14ec014e 5483 * c-common.c (handle_nonnull_attribute): Accept
4d926e34
MS
5484 the nonnull attribute in type-generic builtins.
5485
e01b4e16
MS
54862016-06-09 Martin Sebor <msebor@redhat.com>
5487
5488 PR c/70883
5489 * c-common.c (builtin_function_validate_nargs): Make text of error
5490 message consistent with others like it.
5491
44a845ca
MS
54922016-06-08 Martin Sebor <msebor@redhat.com>
5493 Jakub Jelinek <jakub@redhat.com>
5494
5495 PR c++/70507
5496 PR c/68120
5497 * c-common.c (check_builtin_function_arguments): Handle
5498 BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
5499
a80a7051
RB
55002016-06-08 Richard Biener <rguenther@suse.de>
5501
5502 * c-common.c (parse_optimize_options): Improve diagnostic messages.
5503
bfd67b47
RB
55042016-06-07 Richard Biener <rguenther@suse.de>
5505
5506 PR c/61564
5507 * c-common.c (parse_optimize_options): Only apply CL_OPTIMIZATION
5508 options and warn about others.
5509
15c98b2e
ES
55102016-06-01 Eduard Sanou <dhole@openmailbox.org>
5511
5512 * c-common.c (get_source_date_epoch): Rename to
5513 cb_get_source_date_epoch.
5514 * c-common.c (cb_get_source_date_epoch): Use a single generic erorr
5515 message when the parsing fails. Use error_at instead of fatal_error.
5516 * c-common.h (get_source_date_epoch): Rename to
5517 cb_get_source_date_epoch.
5518 * c-common.h (cb_get_source_date_epoch): Prototype.
5519 * c-common.h (MAX_SOURCE_DATE_EPOCH): Define.
5520 * c-common.h (c_omp_region_type): Remove trailing comma.
5521 * c-lex.c (init_c_lex): Set cb->get_source_date_epoch callback.
5522 * c-lex.c (c_lex_with_flags): Remove initialization of
5523 pfile->source_date_epoch.
5524
00631022
JJ
55252016-05-30 Jakub Jelinek <jakub@redhat.com>
5526
5527 PR c++/71349
5528 * c-omp.c (c_omp_split_clauses): Put OMP_CLAUSE_DEPEND to
5529 C_OMP_CLAUSE_SPLIT_TARGET. Put OMP_CLAUSE_NOWAIT to
5530 C_OMP_CLAUSE_SPLIT_TARGET if combined with target construct,
5531 instead of C_OMP_CLAUSE_SPLIT_FOR.
5532
f17a223d
RB
55332016-05-24 Richard Biener <rguenther@suse.de>
5534
5535 PR middle-end/70434
5536 PR c/69504
5537 * c-common.h (convert_vector_to_pointer_for_subscript): Rename to ...
5538 (convert_vector_to_array_for_subscript): ... this.
5539 * c-common.c (convert_vector_to_pointer_for_subscript): Use a
5540 VIEW_CONVERT_EXPR to an array type. Rename to ...
5541 (convert_vector_to_array_for_subscript): ... this.
5542
4f2e1536
MP
55432016-05-12 Marek Polacek <polacek@redhat.com>
5544
5545 PR c/70756
5546 * c-common.c (pointer_int_sum): Call size_in_bytes_loc instead of
5547 size_in_bytes and pass LOC to it.
5548
d6e83a8d
MM
55492016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
5550
5551 PR c/43651
5552 * c.opt (Wduplicate-decl-specifier): New option.
5553
5c3a10fb
MP
55542016-05-11 Marek Polacek <polacek@redhat.com>
5555
5556 PR c++/71024
5557 * c-common.c (diagnose_mismatched_attributes): New function.
5558 * c-common.h (diagnose_mismatched_attributes): Declare.
5559
deef7113
MP
55602016-05-04 Marek Polacek <polacek@redhat.com>
5561
5562 * c.opt (Wdangling-else): New option.
5563
79ce98bc
MP
55642016-05-03 Marek Polacek <polacek@redhat.com>
5565
5566 PR c/70859
5567 * c-common.c (builtin_function_validate_nargs): Add location
5568 parameter. Use it.
5569 (check_builtin_function_arguments): Add location and arguments
5570 parameters. Use them.
5571 * c-common.h (check_builtin_function_arguments): Update declaration.
5572
381cdae4
RB
55732016-05-03 Richard Biener <rguenther@suse.de>
5574
5575 * cilk.c (cilk_gimplify_call_params_in_spawned_fn): Do not
5576 allow call args to gimplify to SSA names.
5577
1d793c34
MP
55782016-05-03 Marek Polacek <polacek@redhat.com>
5579
5580 * c-common.h (enum c_omp_region_type): Remove stray comma.
5581
77886428
CP
55822016-05-02 Cesar Philippidis <cesar@codesourcery.com>
5583
5584 * c-common.h (enum c_omp_region_type): Define.
5585
697e0b28
RS
55862016-05-02 Richard Sandiford <richard.sandiford@arm.com>
5587
5588 * c-common.c (shorten_compare): Use wi::to_wide.
5589
e7ff0319
CP
55902016-04-29 Cesar Philippidis <cesar@codesourcery.com>
5591
5592 PR middle-end/70626
5593 * c-common.h (c_oacc_split_loop_clauses): Add boolean argument.
5594 * c-omp.c (c_oacc_split_loop_clauses): Use it to duplicate
5595 reduction clauses in acc parallel loops.
5596
2fff3db8
MP
55972016-04-29 Marek Polacek <polacek@redhat.com>
5598
5599 PR c/70852
5600 * c-common.c (warn_for_memset): Check domain before accessing it.
5601
509063eb
DV
56022016-04-29 Dominik Vogt <vogt@linux.vnet.ibm.com>
5603
5604 PR/69089
5605 * c-common.c (handle_aligned_attribute): Allow 0 as an argument to the
5606 "aligned" attribute.
5607
b632761d
JM
56082016-04-28 Jason Merrill <jason@redhat.com>
5609
5610 * c-lex.c (c_common_has_attribute): Handle nodiscard.
5611
174f6622
ES
56122016-04-28 Eduard Sanou <dhole@openmailbox.org>
5613 Matthias Klose <doko@debian.org>
5614
5615 * c-common.c (get_source_date_epoch): New function, gets the environment
7365279f 5616 variable SOURCE_DATE_EPOCH and parses it as long long with error
174f6622
ES
5617 handling.
5618 * c-common.h (get_source_date_epoch): Prototype.
5619 * c-lex.c (c_lex_with_flags): set parse_in->source_date_epoch.
5620
6bc2bb18
RB
56212015-04-27 Ryan Burn <contact@rnburn.com>
5622
5623 PR c++/69024
5624 PR c++/68997
5625 * cilk.c (cilk_ignorable_spawn_rhs_op): Change to external linkage.
5626 (cilk_recognize_spawn): Renamed from recognize_spawn and change to
5627 external linkage.
5628 (cilk_detect_and_unwrap): Corresponding changes.
5629 (extract_free_variables): Don't extract free variables from
5630 AGGR_INIT_EXPR slot.
5631 * c-common.h (cilk_ignorable_spawn_rhs_op): Prototype.
5632 (cilk_recognize_spawn): Likewise.
5633
c1e1f433
BS
56342016-04-27 Bernd Schmidt <bschmidt@redhat.com>
5635
5636 * c.opt (Wmemset-elt-size): New option.
5637 * c-common.c (warn_for_memset): New function.
5638 * c-common.h (warn_for_memset): Declare.
5639
d067e05f
JM
56402016-04-25 Jason Merrill <jason@redhat.com>
5641
5642 * c-common.c (handle_unused_attribute): Accept CONST_DECL.
5643 No longer static.
5644 * c-common.h: Declare it.
5645 * c-lex.c (c_common_has_attribute): Add maybe_unused.
5646
9aa36ae5
JM
56472016-04-22 Jason Merrill <jason@redhat.com>
5648
5649 * c-cppbuiltin.c (c_cpp_builtins): Fix __cpp_range_based_for.
5650
477d4906
IV
56512016-04-20 Ilya Verbin <ilya.verbin@intel.com>
5652
5653 PR c++/69363
5654 * c-cilkplus.c (c_finish_cilk_clauses): Remove function.
5655 * c-common.h (c_finish_cilk_clauses): Remove declaration.
5656
fe37c7af
MM
56572016-04-18 Michael Matz <matz@suse.de>
5658
5659 * c-common.c (handle_aligned_attribute): Use SET_TYPE_ALIGN
5660 and SET_DECL_ALIGN.
5661
23f2660f
EB
56622016-04-17 Eric Botcazou <ebotcazou@adacore.com>
5663
5664 * c-ada-spec.c (get_underlying_decl): Return the typedef, if any.
5665 (dump_generic_ada_node) <POINTER_TYPE>: Clean up handling of access
5666 to incomplete types.
5667 (dump_nested_type): Remove redundant tests and tidy up.
5668 (print_ada_declaration): Also set TREE_VISITED on the declaration of
5669 a type which is the typedef of an original type.
5670
1e77281b
MP
56712016-04-15 Marek Polacek <polacek@redhat.com>
5672
5673 PR c/70651
5674 * c-common.c (build_va_arg): Change two asserts into errors and return
5675 error_mark_node.
5676
b3a77f21
MP
56772016-04-13 Marek Polacek <polacek@redhat.com>
5678
5679 PR c++/70639
5680 * c-indentation.c (should_warn_for_misleading_indentation): Bail out
5681 for switch statements, too.
5682
322b8466
JM
56832016-03-28 Jason Merrill <jason@redhat.com>
5684
5685 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_range_based_for.
5686
fbdb6baf
MP
56872016-03-23 Marek Polacek <polacek@redhat.com>
5688
5689 PR c++/69884
5690 * c.opt (Wignored-attributes): New option.
5691
5c240f4d
DM
56922016-03-22 David Malcolm <dmalcolm@redhat.com>
5693
5694 PR c/69993
5695 * c-indentation.c (warn_for_misleading_indentation): Rewrite the
5696 diagnostic text, reversing the order of the warning and note so
5697 that they appear in source order.
5698
14ba7b28
MP
56992016-03-17 Marek Polacek <polacek@redhat.com>
5700
5701 PR c/69407
5702 * c-common.c (resolve_overloaded_builtin): Set TREE_USED for the fetch
5703 operations.
5704
08a1cadc
JM
57052016-03-14 Jason Merrill <jason@redhat.com>
5706
2aaeea19
JM
5707 * c-cppbuiltin.c (c_cpp_builtins): Set __cpp_hex_float.
5708
08a1cadc
JM
5709 * c-cppbuiltin.c (c_cpp_builtins): Bump __cpp_range_based_for.
5710
c06d25bb
RB
57112016-03-09 Richard Biener <rguenther@suse.de>
5712
5713 PR c/70143
5714 * c-common.c (strict_aliasing_warning): Add back
5715 alias_sets_conflict_p check.
5716
80aac5c8
JM
57172016-03-08 Jason Merrill <jason@redhat.com>
5718
5719 * c-opts.c (set_std_cxx1z): Don't enable concepts.
5720
64b23c13
DM
57212016-03-04 David Malcolm <dmalcolm@redhat.com>
5722
5723 PR c/68187
5724 * c-indentation.c (get_visual_column): Move code to determine next
5725 tab stop to...
5726 (next_tab_stop): ...this new function.
5727 (line_contains_hash_if): Delete function.
5728 (detect_preprocessor_logic): Delete function.
5729 (get_first_nws_vis_column): New function.
5730 (detect_intervening_unindent): New function.
5731 (should_warn_for_misleading_indentation): Replace call to
5732 detect_preprocessor_logic with a call to
5733 detect_intervening_unindent.
5734
729526f5
DM
57352016-03-04 David Malcolm <dmalcolm@redhat.com>
5736
5737 PR c/68187
5738 * c-indentation.c (should_warn_for_misleading_indentation): When
5739 suppressing warnings about cases where the guard and body are on
5740 the same column, only use the first non-whitespace column in place
5741 of the guard token column when dealing with "else" clauses.
5742 When rejecting aligned BODY and NEXT, loosen the requirement
5743 from equality with the first non-whitespace of guard to simply
5744 that they not be indented relative to it.
5745
e9a35493
RB
57462016-03-04 Richard Biener <rguenther@suse.de>
5747
5748 PR c++/70054
5749 * c-common.c (strict_aliasing_warning): Use alias_set_subset_of
5750 instead of alias_sets_conflict_p.
5751
1be56bc5
MP
57522016-03-01 Marek Polacek <polacek@redhat.com>
5753
5754 PR c++/69795
5755 * c-common.c (reject_gcc_builtin): Check for FUNCTION_DECL rather than
5756 any DECL.
5757
35886f0b
MS
57582016-02-22 Martin Sebor <msebor@redhat.com>
5759
5760 PR middle-end/69780
5761 * c-common.c (check_builtin_function_arguments): Validate and
5762 reject invalid arguments to __builtin_alloca_with_align.
5763
4246c8da
MW
57642016-02-20 Mark Wielaard <mjw@redhat.com>
5765
5766 PR c/28901
5767 * c.opt (Wunused-const-variable): Turn into Alias for...
5768 (Wunused-const-variable=): New option.
5769
268be88c
BE
57702016-02-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
5771
5772 PR c++/69865
5773 * c-opts.c (c_common_post_options): Move call to set_std_cxx14 from
5774 here...
5775 (c_common_init_options): ...to here.
5776 (set_std_cxx98): Initialize flag_isoc94 and flag_isoc99.
5777
871b3f47
JJ
57782016-02-19 Jakub Jelinek <jakub@redhat.com>
5779
5780 PR c++/69826
5781 * c-pragma.c (c_pp_lookup_pragma): Handle PRAGMA_CILK_GRAINSIZE.
5782 (init_pragma): Register PRAGMA_CILK_GRAINSIZE even for
5783 flag_preprocess_only.
5784
bf14eba2
JJ
57852016-02-16 Jakub Jelinek <jakub@redhat.com>
5786
5787 PR c/69835
5788 * c.opt (Wnonnull-compare): Enable for -Wall.
5789
ba6b3795
JJ
57902016-02-15 Jakub Jelinek <jakub@redhat.com>
5791
5792 PR c++/69797
5793 * c-common.c (sync_resolve_size): Diagnose too few arguments
5794 even when params is non-NULL empty vector.
5795
a011cd92
BS
57962016-02-08 Bernd Schmidt <bschmidt@redhat.com>
5797
5798 PR target/60410
5799 * c.opt (fshort-double): Remove.
5800
46cb9332
MS
58012016-02-05 Martin Sebor <msebor@redhat.com>
5802
5803 PR c++/69662
5804 * c.opt (Warning options): Update -Wplacement-new to take
5805 an optional argument.
5806
e1b81f2b
JJ
58072016-02-01 Jakub Jelinek <jakub@redhat.com>
5808
5809 PR preprocessor/69543
5810 PR c/69558
5811 * c-pragma.c (handle_pragma_diagnostic): Pass input_location
5812 instead of loc to control_warning_option.
5813
b6adbb9f
NS
58142016-02-01 Nathan Sidwell <nathan@codesourcery.com>
5815
5816 * c.opt (fopenacc-dim=): New option.
5817
5d70666e
RB
58182016-01-27 Ryan Burn <contact@rnburn.com>
5819
5820 PR cilkplus/69267
5821 * cilk.c (cilk_gimplify_call_params_in_spawned_fn): Change to use
5822 gimplify_arg. Removed superfluous post_p argument.
5823 * c-family.h (cilk_gimplify_call_params_in_spawned_fn): Removed
5824 superfluous post_p argument.
5825 * c-gimplify.c (c_gimplify_expr): Likewise.
5826
01e1dea3
DM
58272016-01-26 David Malcolm <dmalcolm@redhat.com>
5828
5829 PR other/69006
5830 * c-opts.c (c_diagnostic_finalizer): Replace invocation of
5831 pp_newline_and_flush with pp_flush.
5832
9f04a53e
MS
58332016-01-20 Martin Sebor <msebor@redhat.com>
5834
5835 PR c/69405
5836 * c-common.c (sync_resolve_size): Avoid printing diagnostic about
5837 an incompatible argument when the argument isn't a valid tree node.
5838
7f26f7df
JM
58392016-01-18 Jason Merrill <jason@redhat.com>
5840
5841 PR c++/68767
5842 * c-common.c (check_function_arguments_recurse): Fold the whole
5843 COND_EXPR, not just the condition.
5844
f62bf092
TV
58452016-01-18 Tom de Vries <tom@codesourcery.com>
5846
5847 * c-omp.c (c_oacc_split_loop_clauses): Don't copy OMP_CLAUSE_REDUCTION,
5848 classify as loop clause.
5849
e0a575ff
JJ
58502016-01-15 Jakub Jelinek <jakub@redhat.com>
5851
5852 PR bootstrap/68271
5853 * c-pragma.c (c_register_pragma_1): Adjust comment to note that
5854 C++ FE no longer has limit on number of pragmas.
5855
58562015-01-14 Ryan Burn <contact@rnburn.com>
b6e3db06
RB
5857
5858 PR c++/69048
5859 * cilk.c (create_cilk_wrapper_body): Call fold_build_cleanup_point_expr
c47eaca6 5860 to add missing cleanup point.
b6e3db06 5861
c7df95d8
DM
58622016-01-14 David Malcolm <dmalcolm@redhat.com>
5863
5864 PR c++/68819
5865 * c-indentation.c (get_visual_column): Add location_t param.
5866 Handle the column number being zero by effectively disabling the
5867 warning, with an "inform".
5868 (should_warn_for_misleading_indentation): Add location_t argument
5869 for all uses of get_visual_column.
5870
21efdd80
PP
58712016-01-10 Patrick Palka <ppalka@gcc.gnu.org>
5872
5873 PR c++/69029
5874 * c-indentation.c (should_warn_for_misleading_indentation):
5875 Don't warn about do-while statements.
5876
7a127fa7
MS
58772016-01-07 Martin Sebor <msebor@redhat.com>
5878
5879 PR c/68966
5880 * c-common.c (sync_resolve_size): Reject first argument when it's
5881 a pointer to _Bool.
5882
c589e975
DM
58832016-01-05 David Malcolm <dmalcolm@redhat.com>
5884
5885 PR c/69122
5886 * c-indentation.c (get_visual_column): Remove default argument.
5887 (should_warn_for_misleading_indentation): For the multiline case,
5888 update call to get_visual_column for next_stmt_exploc so that it
5889 captures the location of the first non-whitespace character in the
5890 relevant line. Don't issue warnings if there is non-whitespace
5891 before the next statement.
5892
818ab71a
JJ
58932016-01-04 Jakub Jelinek <jakub@redhat.com>
5894
5895 Update copyright years.
5896
745e411d
DM
58972015-12-21 David Malcolm <dmalcolm@redhat.com>
5898
5899 * c-common.c (binary_op_error): Convert first param from
5900 location_t to rich_location * and use it when emitting an error.
5901 * c-common.h (binary_op_error): Convert first param from
5902 location_t to rich_location *.
5903
de67c4c3
DM
59042015-12-16 David Malcolm <dmalcolm@redhat.com>
5905
5906 * c-common.h (conflict_marker_get_final_tok_kind): New prototype.
5907 * c-lex.c (conflict_marker_get_final_tok_kind): New function.
5908
4a38b02b
IV
59092015-12-15 Ilya Verbin <ilya.verbin@intel.com>
5910
5911 * c-common.c (c_common_attribute_table): Handle "omp declare target
5912 link" attribute.
5913
54d62f51
JJ
59142015-12-14 Jakub Jelinek <jakub@redhat.com>
5915
5916 PR c/68833
5917 * c.opt (Wmissing-format-attribute, Wnormalized): Add Warning option.
5918
8d4227c8
TB
59192014-12-12 Tobias Burnus <burnus@net-b.de>
5920
5921 PR fortran/68815
5922 * c-format.c (gcc_gfc_char_table): Add 'q' flag to remaining
5923 specifiers (%d, %i,%u and %c).
5924
f6069ccc
DM
59252015-12-10 David Malcolm <dmalcolm@redhat.com>
5926
5927 * c.opt (Wmisleading-indentation): Add to -Wall for C and C++.
5928
63bbf46d
JJ
59292015-12-08 Jakub Jelinek <jakub@redhat.com>
5930
5931 PR c/48088
5932 PR c/68657
5933 * c.opt (Wfloat-conversion, Wsign-conversion): Add Warning.
5934 * c-pragma.c (handle_pragma_diagnostic): Adjust
5935 control_warning_option caller.
5936
f79520bb
DM
59372015-12-07 David Malcolm <dmalcolm@redhat.com>
5938
5939 * c-common.c (c_cpp_error): Update for change to
5940 rich_location::set_range.
5941
b3d5bc62
JJ
59422015-12-04 Paolo Bonzini <bonzini@gnu.org>
5943
5944 * c-common.c (maybe_warn_shift_overflow): Warn on all overflows if
5945 shifting 1 out of the sign bit.
5946
59472015-12-04 Kirill Yukhin <kirill.yukhin@intel.com>
5948
5949 * c-common.c (c_common_attribute_table[]): Update max arguments
5950 count for "simd" attribute.
5951 (handle_simd_attribute): Parse "notinbranch" and "inbranch" arguments.
5952
6eb4a537
JJ
59532015-12-03 Jakub Jelinek <jakub@redhat.com>
5954
5955 PR preprocessor/57580
5956 * c-ppoutput.c (print): Change printed field to bool.
5957 Move src_file last for smaller padding.
5958 (init_pp_output): Set print.printed to false instead of 0.
5959 (scan_translation_unit): Fix up formatting. Set print.printed
5960 to true after printing something other than newline.
5961 (scan_translation_unit_trad): Set print.printed to true instead of 1.
5962 (maybe_print_line_1): Set print.printed to false instead of 0.
5963 (print_line_1): Likewise.
5964 (do_line_change): Set print.printed to true instead of 1.
5965 (cb_define, dump_queued_macros, cb_include, cb_def_pragma,
5966 dump_macro): Set print.printed to false after printing newline.
5967
4250754e
JM
59682015-12-02 Jason Merrill <jason@redhat.com>
5969
f479b43d
JM
5970 * c-common.c (fold_for_warn): New.
5971 (warn_logical_operator, warn_tautological_cmp)
5972 (check_function_arguments_recurse, maybe_warn_bool_compare): Use it.
5973
4250754e
JM
5974 * c-common.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
5975 (c_fully_fold_internal, decl_constant_value_for_optimization):
5976 Move to c/c-fold.c.
5977 * c-common.h: Don't declare decl_constant_value_for_optimization.
5978
e9e32ee6
JM
59792015-12-02 Joseph Myers <joseph@codesourcery.com>
5980
5981 PR c/68162
5982 * c-common.h (c_build_qualified_type): Add extra default
5983 arguments.
5984
37d5ad46
JB
59852015-12-01 Julian Brown <julian@codesourcery.com>
5986 Cesar Philippidis <cesar@codesourcery.com>
5987 James Norris <James_Norris@mentor.com>
5988
5989 * c-pragma.c (oacc_pragmas): Add PRAGMA_OACC_HOST_DATA.
5990 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_HOST_DATA.
5991 (pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_USE_DEVICE.
5992
f07862c7
EB
59932015-11-30 Eric Botcazou <ebotcazou@adacore.com>
5994
5995 * c-ada-spec.c (print_ada_macros): Remove redundant blank line.
5996 (decl_sloc_common): Delete and move bulk of processing to...
5997 (decl_sloc): ...here.
5998 (pp_ada_tree_identifier): Remove reference to QUAL_UNION_TYPE.
5999 (dump_ada_double_name): Remove S parameter and compute the suffix.
6000 (dump_ada_array_type): Add PARENT parameter. Simplify computation of
6001 element type and deal with an anonymous one.
6002 (dump_ada_template): Use RECORD_OR_UNION_TYPE_P macro.
6003 (dump_generic_ada_node): Tweak. Adjust call to dump_ada_array_type
6004 and remove reference to QUAL_UNION_TYPE.
6005 (dump_nested_types): Make 2 passes on the fields and move bulk to...
6006 (dump_nested_type): ...here. New function extracted from above.
6007 Generate a full declaration for anonymous element type of arrays.
6008 (print_ada_declaration): Really skip anonymous declarations. Remove
6009 references to QUAL_UNION_TYPE. Adjust call to dump_ada_array_type.
6010 Clean up processing of declarations of array types and objects.
6011 (print_ada_struct_decl): Remove reference to QUAL_UNION_TYPE.
6012 Remove obsolete code and tidy up.
6013
75c8aac3
JH
60142015-11-29 Jan Hubicka <hubicka@ucw.cz>
6015
6016 PR c/67581
6017 * c-common.c (handle_transparent_union_attribute): Update
6018 also type variants.
6019
b58d3df2
ML
60202015-11-27 Martin Liska <mliska@suse.cz>
6021
6022 PR c++/68312
6023 * array-notation-common.c (cilkplus_extract_an_triplets):
6024 Release vector of vectors.
6025 * cilk.c (gimplify_cilk_spawn): Free allocated memory.
6026
89a01fcf
EB
60272015-11-26 Eric Botcazou <ebotcazou@adacore.com>
6028
6029 PR c++/68527
6030 * c-ada-spec.c (dump_nested_types): Add guard for error_mark_node.
6031 (print_ada_struct_decl): Likewise.
6032
cc5c5226
IZ
60332015-11-23 Igor Zamyatin <igor.zamyatin@intel.com>
6034
6035 PR c++/68001
6036 * c-gimplify.c (c_gimplify_expr): Stop the process if see an error.
6037 * cilk.c (recognize_spawn): Determine location in a more precise
6038 way.
6039
269adb9d
JM
60402015-11-19 Jason Merrill <jason@redhat.com>
6041
6042 * c-common.c (shorten_compare): But look through macros from
6043 system headers.
6044
d0eccfcd
JM
60452015-11-18 Jason Merrill <jason@redhat.com>
6046
6047 * c-common.c (shorten_compare): Don't -Wtype-limits if the
6048 non-constant operand comes from a macro.
6049
3e44547c
JM
60502015-11-17 Jason Merrill <jason@redhat.com>
6051
6052 PR bootstrap/68346
6053 * c-common.c (warn_tautological_cmp): Fold before checking for
6054 constants.
6055
0f62c7a0
MP
60562015-11-16 Marek Polacek <polacek@redhat.com>
6057
6058 PR c++/68362
6059 * c-common.c (check_case_bounds): Fold low and high cases.
6060
a868811e
MP
60612015-11-16 Marek Polacek <polacek@redhat.com>
6062
6063 * c-ada-spec.c (dump_ada_template): Use RECORD_OR_UNION_TYPE_P.
6064 * c-common.c (c_common_get_alias_set): Likewise.
6065 (handle_visibility_attribute): Likewise.
6066
fff77217
KY
60672015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
6068
6069 * c-common.c (handle_simd_attribute): New.
6070 (struct attribute_spec): Add entry for "simd".
6071 (handle_simd_attribute): New.
6072
269e63b7
KT
60732015-11-13 Kai Tietz <ktietz70@googlemail.com>
6074
6075 * c-lex.c (interpret_float): Use fold_convert.
6076
ebedc9a3
DM
60772015-11-13 David Malcolm <dmalcolm@redhat.com>
6078
6079 * c-common.c (c_fully_fold_internal): Capture existing souce_range,
6080 and store it on the result.
6081 * c-opts.c (c_common_init_options): Set
6082 global_dc->colorize_source_p.
6083
6e232ba4
JN
60842015-11-12 James Norris <jnorris@codesourcery.com>
6085 Joseph Myers <joseph@codesourcery.com>
6086
7365279f 6087 * c-pragma.c (oacc_pragmas): Add entry for declare directive.
6e232ba4
JN
6088 * c-pragma.h (enum pragma_kind): Add PRAGMA_OACC_DECLARE.
6089 (enum pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT and
6090 PRAGMA_OACC_CLAUSE_LINK.
6091
e78bede6
MP
60922015-11-11 Marek Polacek <polacek@redhat.com>
6093
6094 PR c/68107
6095 PR c++/68266
6096 * c-common.c (valid_array_size_p): New function.
6097 * c-common.h (valid_array_size_p): Declare.
6098
3f8257db 60992015-11-11 Dominique d'Humieres <dominiq@lps.ens.fr>
4ac93c7c
DH
6100
6101 PR bootstrap/68271
6102 * c-pragma.c (c_register_pragma_1): Update the gcc_assert to 256.
6103
69f293c9
AM
61042015-11-11 Andrew MacLeod <amacleod@redhat.com>
6105
6106 * array-notation-common.c: Remove unused header files.
6107 * c-ada-spec.c: Likewise.
6108 * c-cilkplus.c: Likewise.
6109 * c-common.c: Likewise.
6110 * c-cppbuiltin.c: Likewise.
6111 * c-dump.c: Likewise.
6112 * c-format.c: Likewise.
6113 * c-gimplify.c: Likewise.
6114 * c-indentation.c: Likewise.
6115 * c-lex.c: Likewise.
6116 * c-omp.c: Likewise.
6117 * c-opts.c: Likewise.
6118 * c-pch.c: Likewise.
6119 * c-ppoutput.c: Likewise.
6120 * c-pragma.c: Likewise.
6121 * c-pretty-print.c: Likewise.
6122 * c-semantics.c: Likewise.
6123 * c-ubsan.c: Likewise.
6124 * cilk.c: Likewise.
6125 * stub-objc.c: Likewise.
6126
3a40d81d
NS
61272015-11-09 Thomas Schwinge <thomas@codesourcery.com>
6128 Cesar Philippidis <cesar@codesourcery.com>
6129 James Norris <jnorris@codesourcery.com>
6130 Julian Brown <julian@codesourcery.com>
6131 Nathan Sidwell <nathan@codesourcery.com>
6132
6133 * c-pragma.c (oacc_pragmas): Add "routine".
6134 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_ROUTINE.
6135
ee45a32d
EB
61362015-11-08 Eric Botcazou <ebotcazou@adacore.com>
6137
6138 * c-common.c (c_common_attributes): Add scalar_storage_order.
6139 (handle_scalar_storage_order_attribute): New function.
6140 * c-pragma.c (global_sso): New variable.
6141 (maybe_apply_pragma_scalar_storage_order): New function.
6142 (handle_pragma_scalar_storage_order): Likewise.
6143 (init_pragma): Register scalar_storage_order.
6144 * c-pragma.h (maybe_apply_pragma_scalar_storage_order): Declare.
6145 * c.opt (Wscalar-storage-order): New warning.
6146 (fsso-struct=): New option.
6147
eb11eb15
MS
61482015-11-08 Martin Sebor <msebor@redhat.com>
6149
6150 * c.opt (Wplacement-new): Add a period to the end of a sentence.
6151
0aad0198
RS
61522015-11-07 Richard Sandiford <richard.sandiford@arm.com>
6153
6154 * c-common.c: Don't undef DEF_BUILTIN.
6155
8a645150
DM
61562015-11-06 David Malcolm <dmalcolm@redhat.com>
6157
6158 * c-common.c (c_cpp_error): Convert parameter from location_t to
6159 rich_location *. Eliminate the "column_override" parameter and
6160 the call to diagnostic_override_column.
6161 Update the "done_lexing" clause to set range 0
6162 on the rich_location, rather than overwriting a location_t.
6163 * c-common.h (c_cpp_error): Convert parameter from location_t to
6164 rich_location *. Eliminate the "column_override" parameter.
6165
7a5e4956
CP
61662015-11-05 Cesar Philippidis <cesar@codesourcery.com>
6167 Thomas Schwinge <thomas@codesourcery.com>
6168 James Norris <jnorris@codesourcery.com>
6169
6170 * c-omp.c (c_oacc_split_loop_clauses): Make TILE, GANG, WORKER, VECTOR,
6171 AUTO, SEQ, INDEPENDENT and PRIVATE loop clauses. Associate REDUCTION
6172 clauses with parallel and kernels and loops.
6173 * c-pragma.h (enum pragma_omp_clause): Add entries for
6174 PRAGMA_OACC_CLAUSE_{INDEPENDENT,TILE,DEFAULT}.
6175 * pt.c (tsubst_omp_clauses): Add support for OMP_CLAUSE_{NUM_GANGS,
6176 NUM_WORKERS,VECTOR_LENGTH,GANG,WORKER,VECTOR,ASYNC,WAIT,TILE,AUTO,
6177 INDEPENDENT,SEQ}.
6178 (tsubst_expr): Add support for OMP_CLAUSE_{KERNELS,PARALLEL,LOOP}.
6179
e2f5cc96
MS
61802015-11-05 Martin Sebor <msebor@redhat.com>
6181
6182 PR c++/67942
6183 * c.opt (-Wplacement-new): New option.
6184
e01d41e5
JJ
61852015-11-05 Jakub Jelinek <jakub@redhat.com>
6186
6187 * c-common.h (c_finish_omp_atomic): Add TEST argument.
6188 (c_omp_check_loop_iv, c_omp_check_loop_iv_exprs): New prototypes.
6189 * c-omp.c (c_finish_omp_atomic): Add TEST argument. Don't call
6190 save_expr or create_tmp_var* if TEST is true.
6191 (c_finish_omp_for): Store OMP_FOR_ORIG_DECLS always.
6192 Don't call add_stmt here.
6193 (struct c_omp_check_loop_iv_data): New type.
6194 (c_omp_check_loop_iv_r, c_omp_check_loop_iv,
6195 c_omp_check_loop_iv_exprs): New functions.
6196 (c_omp_split_clauses): Adjust for lastprivate being allowed on
6197 distribute.
6198 (c_omp_declare_simd_clauses_to_numbers): Change
6199 OMP_CLAUSE_LINEAR_VARIABLE_STRIDE OMP_CLAUSE_LINEAR_STEP into numbers.
6200 (c_omp_declare_simd_clauses_to_decls): Similarly change those
6201 from numbers to PARM_DECLs.
6202
595278be
MM
62032015-11-04 Mikhail Maltsev <maltsevm@gmail.com>
6204
6205 * c-omp.c (c_omp_split_clauses): Remove conditional compilation. Use
6206 flag_checking.
6207
3f8257db 62082015-11-03 Bernd Schmidt <bschmidt@redhat.com>
c85158de
MS
6209
6210 PR c++-common/67882
b3d5bc62
JJ
6211 * c-common.h (fold_offsetof_1): Add argument.
6212 * c-common.c (fold_offsetof_1): Diagnose more invalid
c85158de
MS
6213 offsetof expressions that reference elements past the end of
6214 an array.
6215
4bf9e5a8
TS
62162015-11-03 Thomas Schwinge <thomas@codesourcery.com>
6217 Chung-Lin Tang <cltang@codesourcery.com>
6218
6219 * c-pragma.c (oacc_pragmas): Add "atomic".
6220 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_ATOMIC.
6221
3b1661a9
ES
62222015-10-30 Evgeny Stupachenko <evstupac@gmail.com>
6223
6224 * c-common.c (handle_target_clones_attribute): New.
6225 (c_common_attribute_table): Add handle_target_clones_attribute.
6226 (handle_always_inline_attribute): Add check on target_clones attribute.
6227 (handle_target_attribute): Ditto.
6228
2adfab87
AM
62292015-10-29 Andrew MacLeod <amacleod@redhat.com>
6230
6231 * array-notation-common.c: Reorder #include's and remove duplicates.
6232 * c-ada-spec.c: Likewise.
6233 * c-cilkplus.c: Likewise.
6234 * c-common.c: Likewise.
6235 * c-cppbuiltin.c: Likewise.
6236 * c-dump.c: Likewise.
6237 * c-format.c: Likewise.
6238 * c-gimplify.c: Likewise.
6239 * c-indentation.c: Likewise.
6240 * c-lex.c: Likewise.
6241 * c-omp.c: Likewise.
6242 * c-opts.c: Likewise.
6243 * c-pch.c: Likewise.
6244 * c-ppoutput.c: Likewise.
6245 * c-pragma.c: Likewise.
6246 * c-pretty-print.c: Likewise.
6247 * c-semantics.c: Likewise.
6248 * c-ubsan.c: Likewise.
6249 * cilk.c: Likewise.
6250 * stub-objc.c: Likewise.
6251
d90ec4f2
JM
62522015-10-28 Jason Merrill <jason@redhat.com>
6253
6254 * c-common.c (pointer_int_sum): Fold the MULT_EXPR.
6255
88bae6f4
TS
62562015-10-27 Thomas Schwinge <thomas@codesourcery.com>
6257 James Norris <jnorris@codesourcery.com>
6258 Cesar Philippidis <cesar@codesourcery.com>
6259
6260 PR c/64765
6261 PR c/64880
6262 * c-common.h (c_oacc_split_loop_clauses): Declare function.
6263 * c-omp.c (c_oacc_split_loop_clauses): New function.
6264
b1726d6c
MS
62652015-10-21 Martin Sebor <msebor@redhat.com>
6266
6267 PR driver/68043
6268 * c.opt: End each sentence that describes an option with a period.
6269
fa60eeb9
MP
62702015-10-20 Marek Polacek <polacek@redhat.com>
6271
6272 * array-notation-common.c (is_cilkplus_vector_p): Define.
6273 * c-common.h (is_cilkplus_vector_p): Declare.
6274
95979049
MP
62752015-10-20 Marek Polacek <polacek@redhat.com>
6276
6277 * c.opt (std=gnu++11): Do not describe as experimental.
6278 (std=gnu++14): Likewise.
6279
2a9fb712
JM
62802015-10-19 Jason Merrill <jason@redhat.com>
6281
6282 * c-cppbuiltin.c (c_cpp_builtins): Define
6283 __cpp_nontype_template_args.
6284
13b380a3
JM
62852015-10-19 Jason Merrill <jason@redhat.com>
6286
6287 * c-cppbuiltin.c (c_cpp_builtins): Define
6288 __cpp_enumerator_attributes, __cpp_fold_expressions,
6289 __cpp_unicode_characters.
6290
d9a6bd32
JJ
62912015-10-13 Jakub Jelinek <jakub@redhat.com>
6292 Aldy Hernandez <aldyh@redhat.com>
6293
6294 * c-common.c (enum c_builtin_type): Define DEF_FUNCTION_TYPE_9,
6295 DEF_FUNCTION_TYPE_10 and DEF_FUNCTION_TYPE_11.
6296 (c_define_builtins): Likewise.
6297 * c-common.h (enum c_omp_clause_split): Add
6298 C_OMP_CLAUSE_SPLIT_TASKLOOP.
6299 (c_finish_omp_critical, c_finish_omp_ordered): Add CLAUSES argument.
6300 (c_finish_omp_for): Add ORIG_DECLV argument.
6301 * c-cppbuiltin.c (c_cpp_builtins): Predefine _OPENMP as
6302 201511 instead of 201307.
6303 * c-omp.c (c_finish_omp_critical): Add CLAUSES argument, set
6304 OMP_CRITICAL_CLAUSES to it.
6305 (c_finish_omp_ordered): Add CLAUSES argument, set
6306 OMP_ORDERED_CLAUSES to it.
6307 (c_finish_omp_for): Add ORIG_DECLV argument, set OMP_FOR_ORIG_DECLS
6308 to it if OMP_FOR. Clear DECL_INITIAL on the IVs.
6309 (c_omp_split_clauses): Handle OpenMP 4.5 combined/composite
6310 constructs and new OpenMP 4.5 clauses. Clear
6311 OMP_CLAUSE_SCHEDULE_SIMD if not combined with OMP_SIMD. Add
6312 verification code.
6313 * c-pragma.c (omp_pragmas_simd): Add taskloop.
6314 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_TASKLOOP.
6315 (enum pragma_omp_clause): Add
6316 PRAGMA_OMP_CLAUSE_{DEFAULTMAP,GRAINSIZE,HINT,{IS,USE}_DEVICE_PTR}
6317 and PRAGMA_OMP_CLAUSE_{LINK,NOGROUP,NUM_TASKS,PRIORITY,SIMD,THREADS}.
6318
624d31fe
RS
63192015-10-05 Richard Sandiford <richard.sandiford@arm.com>
6320
6321 * c-lex.c (interpret_float): Use real_equal instead of
6322 REAL_VALUES_EQUAL.
6323
b8fd7909
JM
63242015-10-04 Jason Merrill <jason@redhat.com>
6325
6326 Implement N4514, C++ Extensions for Transactional Memory.
6327 * c-common.c (c_common_reswords): Add C++ TM TS keywords.
6328 (c_common_attribute_table): Add transaction_safe_dynamic.
6329 transaction_safe now affects type identity.
6330 (handle_tm_attribute): Handle transaction_safe_dynamic.
6331 * c-common.h (enum rid): Add RID_ATOMIC_NOEXCEPT,
6332 RID_ATOMIC_CANCEL, RID_SYNCHRONIZED.
6333 (OBJC_IS_CXX_KEYWORD): Add RID_SYNCHRONIZED.
6334 (D_TRANSMEM): New.
6335 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_transactional_memory.
6336 * c-pretty-print.c (pp_c_attributes_display): Don't print
6337 transaction_safe in C++.
6338
12651878
MP
63392015-10-02 Marek Polacek <polacek@redhat.com>
6340
6341 * c.opt (Wduplicated-cond): Don't enable by -Wall anymore.
6342
3e3b8d63
MP
63432015-10-02 Marek Polacek <polacek@redhat.com>
6344
6345 PR c/64249
6346 * c-common.c (warn_duplicated_cond_add_or_warn): New function.
6347 * c-common.h (warn_duplicated_cond_add_or_warn): Declare.
6348 * c.opt (Wduplicated-cond): New option.
6349
0d1a8f75
JM
63502015-10-01 Joseph Myers <joseph@codesourcery.com>
6351
6352 * c.opt (std=c11): Do not describe as experimental.
6353 (std=gnu11): Likewise.
6354 (std=iso9899:2011): Likewise.
6355
3e32ee19
NS
63562015-09-28 Nathan Sidwell <nathan@codesourcery.com>
6357
6358 * c-common.c (DEF_FUNCTION_TYPE_VAR_6): New.
6359 (DEF_FUNCTION_TYPE_VAR_11): Delete.
6360
974348ee
MP
63612015-09-25 Marek Polacek <polacek@redhat.com>
6362
6363 * c-ubsan.c (ubsan_instrument_division): Remove unnecessary code.
6364 (ubsan_instrument_shift): Likewise.
6365
15dbc1a6
MP
63662015-09-25 Marek Polacek <polacek@redhat.com>
6367
6368 PR sanitizer/64906
6369 * c-ubsan.c (ubsan_instrument_division): Also pre-evaluate OP1.
6370
6b95d7cc
PP
63712015-09-24 Patrick Palka <ppalka@gcc.gnu.org>
6372
6373 * c-indentation.c (should_warn_for_misleading_indentation):
6374 Compare next_stmt_vis_column with guard_line_first_nws instead
6375 of with guard_line_vis_column.
6376
c1822f9c
MLI
63772015-09-23 Manuel López-Ibáñez <manu@gcc.gnu.org>
6378
6379 PR c/49654
6380 PR c/49655
6381 * c-pragma.c (handle_pragma_diagnostic): Detect non-warning
6382 options and options not valid for the current language.
6383
d5398058
PP
63842015-09-22 Patrick Palka <ppalka@gcc.gnu.org>
6385
6386 * c-indentation.c (should_warn_for_misleading_indentation):
6387 Float out and consolidate the calls to get_visual_column that
6388 are passed guard_exploc as an argument. Compare
6389 next_stmt_vis_column with guard_line_first_nws instead of with
6390 body_line_first_nws.
6391
6b333269
NS
63922015-09-22 Nathan Sidwell <nathan@codesourcery.com>
6393
6394 * c.opt (Wmultiple-inheritance, Wvirtual-inheritance, Wtemplates,
6395 Wnamespaces): New C++ warnings.
6396
a75f1574
JM
63972015-09-22 Jason Merrill <jason@redhat.com>
6398
6399 * c-common.h (abi_compat_version_crosses): New.
6400 (warn_abi_version): Declare.
6401 * c-common.c: Define it.
6402 * c-opts.c (c_common_post_options): Handle it.
6403 flag_abi_compat_version defaults to 8.
6404
bdaaa8b7
VV
64052015-09-21 Ville Voutilainen <ville.voutilainen@gmail.com>
6406
6407 Complete the implementation of N4230, Nested namespace definition.
6408 * c-cppbuiltin.c: Add __cpp_namespace_attributes and
6409 __cpp_nested_namespace_definitions.
6410
eaa797e8
MLI
64112015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
6412
6413 * c-pragma.c (handle_pragma_diagnostic): Fix wrong return.
6414
c4914de6
MLI
64152015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
6416
6417 * c-pragma.c (handle_pragma_diagnostic): Use explicit location
6418 when warning.
6419 * c-pragma.h (pragma_lex): Add optional loc argument.
6420
fcb87c50
MM
64212015-09-16 Mikhail Maltsev <maltsevm@gmail.com>
6422
6423 * c-format.c (check_format_arg): Adjust to use common block size in all
6424 object pools.
6425
31bdd08a
DM
64262015-09-15 David Malcolm <dmalcolm@redhat.com>
6427
6428 * c-format.c (location_from_offset): Update for change in
6429 signature of location_get_source_line.
6430 * c-indentation.c (get_visual_column): Likewise.
6431 (line_contains_hash_if): Likewise.
6432
aa9f4b4c
MP
64332015-09-14 Marek Polacek <polacek@redhat.com>
6434
6435 * c-opts.c (c_common_post_options): Set C++ standard earlier, before
6436 setting various warnings.
6437
aa256c4a
MP
64382015-09-14 Marek Polacek <polacek@redhat.com>
6439
6440 * c-common.c (warn_for_sign_compare): Cast to unsigned when shifting
6441 a negative value.
6442
0f876f22
MW
64432015-09-11 Mark Wielaard <mjw@redhat.com>
6444
6445 PR c/28901
6446 * c.opt (Wunused-variable): Option from common.opt.
6447 (Wunused-const-variable): New option.
6448
273aa49e
PC
64492015-09-09 Paolo Carlini <paolo.carlini@oracle.com>
6450
6451 PR c++/53184
6452 * c.opt ([Wsubobject-linkage]): Add.
6453
1807ffc1
MS
64542015-09-03 Martin Sebor <msebor@redhat.com>
6455
6456 PR c/66516
6457 * c-common.h (c_decl_implicit, reject_gcc_builtin): Declare new
6458 functions.
6459 * c-common.c (reject_gcc_builtin): Define.
6460
38942840
BI
64612015-09-02 Balaji V. Iyer <balaji.v.iyer@intel.com>
6462
6463 PR middle-end/60586
6464 * c-common.h (cilk_gimplify_call_params_in_spawned_fn): New
6465 prototype.
6466 * c-gimplify.c (c_gimplify_expr): Added a call to the function
6467 cilk_gimplify_call_params_in_spawned_fn.
6468 * cilk.c (cilk_gimplify_call_params_in_spawned_fn): New function.
6469 (gimplify_cilk_spawn): Removed EXPR_STMT and CLEANUP_POINT_EXPR
6470 unwrapping.
6471
c316b5e4
MP
64722015-08-25 Marek Polacek <polacek@redhat.com>
6473
6474 PR middle-end/67330
6475 * c-common.c (handle_weak_attribute): Don't check whether the
6476 visibility can be changed here.
6477
584a7c46
MLI
64782015-08-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
6479
6480 * c-lex.c (c_lex_with_flags): Use explicit locations.
6481
a79683d5
TS
64822015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
6483
6484 * c-ada-spec.h, c-common.c, c-common.h, c-format.c, c-format.h,
6485 c-objc.h, c-ppoutput.c, c-pragma.c, c-pragma.h: Remove useless
6486
61717a45
FXC
64872015-08-18 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
6488
6489 PR middle-end/36757
6490 * c-common.c (check_builtin_function_arguments): Add check
6491 for BUILT_IN_SIGNBIT argument.
6492
329524f5
PC
64932015-08-18 Paolo Carlini <paolo.carlini@oracle.com>
6494
6495 PR c++/67160
6496 * c-cppbuiltin.c (c_cpp_builtins): Fix __cpp_static_assert value
6497 in c++1z mode.
6498
4ee55665
MP
64992015-08-17 Marek Polacek <polacek@redhat.com>
6500
6501 * c-pretty-print.c (pp_c_cv_qualifiers): Remove code dealing
6502 with whitespaces before qualifier names.
6503
b893e375
MP
65042015-08-12 Marek Polacek <polacek@redhat.com>
6505
6506 PR c++/55095
6507 * c-common.c (maybe_warn_shift_overflow): Properly handle
6508 left-shifting 1 into the sign bit.
6509
c2d89095
MLI
65102015-08-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
6511
6512 * c.opt (Wchkp): Use LangEnabledBy instead of EnabledBy.
6513
971e17ff
AS
65142015-08-06 Andrew Sutton <andrew.n.sutton@gmail.com>
6515 Braden Obrzut <admin@maniacsvault.net>
6516 Jason Merrill <jason@redhat.com>
6517
6518 Add C++ Concepts TS support.
6519 * c-common.c (c_common_reswords): Add __is_same_as, concept, requires.
6520 * c-common.h (enum rid): Add RID_IS_SAME_AS, RID_CONCEPT, RID_REQUIRES.
6521 (D_CXX_CONCEPTS, D_CXX_CONCEPTS_FLAGS): New.
6522 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_concepts.
6523 * c-opts.c (set_std_cxx1z): Set flag_concepts.
6524 * c.opt (fconcepts): New.
6525
b3d5bc62
JJ
65262015-08-02 Martin Sebor <msebor@redhat.com>
6527
6528 * c.opt (-Wframe-address): New warning option.
6529
8ebca419
PP
65302015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
6531
6532 * c-indentation.c (should_warn_for_misleading_indentation):
6533 Improve heuristics.
6534
1a1e101f
PP
65352015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
6536
6537 * c-indentation.c (get_visual_column): Add parameter first_nws,
6538 use it. Update comment documenting the function.
6539 (is_first_nonwhitespace_on_line): Remove.
6540 (should_warn_for_misleading_indentation): Replace usage of
6541 of is_first_nonwhitespace_on_line with get_visual_column.
6542
992118a1
PP
65432015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
6544
6545 * c-indentation.h (struct token_indent_info): Define.
6546 (get_token_indent_info): Define.
6547 (warn_for_misleading_information): Declare.
6548 * c-common.h (warn_for_misleading_information): Remove.
6549 * c-identation.c (warn_for_misleading_indentation):
6550 Change declaration to take three token_indent_infos. Adjust
6551 accordingly.
6552 * c-identation.c (should_warn_for_misleading_indentation):
6553 Likewise. Bail out early if the body is a compound statement.
6554 (guard_tinfo_to_string): Define.
6555
e8fa3817
JM
65562015-07-30 Jason Merrill <jason@redhat.com>
6557
6558 * c-pretty-print.c (unary_expression) [INDIRECT_REF]: Don't print
6559 '*' for reference decay.
6560
173864e8
MP
65612015-07-30 Marek Polacek <polacek@redhat.com>
6562
6563 * c-common.c (warn_tautological_cmp): Bail for float types.
6564
f2afe6dd
MP
65652015-07-27 Marek Polacek <polacek@redhat.com>
6566
6567 PR bootstrap/67030
6568 * c-common.c (warn_tautological_cmp): Don't warn for macro expansion.
6569
05b28fd6
MP
65702015-07-27 Marek Polacek <polacek@redhat.com>
6571
6572 PR c++/66555
6573 PR c/54979
6574 * c-common.c (find_array_ref_with_const_idx_r): New function.
6575 (warn_tautological_cmp): New function.
6576 * c-common.h (warn_tautological_cmp): Declare.
6577 * c.opt (Wtautological-compare): New option.
6578
5a5062b8
MP
65792015-07-23 Marek Polacek <polacek@redhat.com>
6580
6581 * c-ubsan.c (ubsan_instrument_division): Use unshare_expr throughout.
6582 (ubsan_instrument_shift): Likewise.
6583
dc891fe7
MP
65842015-07-23 Marek Polacek <polacek@redhat.com>
6585
6586 PR sanitizer/66908
6587 * c-ubsan.c: Include gimplify.h.
6588 (ubsan_instrument_division): Unshare OP0 and OP1.
6589 (ubsan_instrument_shift): Likewise.
6590
451b5e48
MP
65912015-07-20 Marek Polacek <polacek@redhat.com>
6592 Richard Sandiford <richard.sandiford@arm.com>
6593
6594 PR c++/55095
6595 * c-common.c (c_fully_fold_internal): Warn about left shift overflows.
6596 Use EXPR_LOC_OR_LOC.
6597 (maybe_warn_shift_overflow): New function.
6598 * c-common.h (maybe_warn_shift_overflow): Declare.
6599 * c-opts.c (c_common_post_options): Set warn_shift_overflow.
6600 * c.opt (Wshift-overflow): New option.
6601
fb0b2914
ML
66022015-07-16 Martin Liska <mliska@suse.cz>
6603
6604 * c-format.c (static void check_format_info_main): Use
6605 object_allocator instead of pool_allocator.
6606 (check_format_arg): Likewise.
6607 (check_format_info_main): Likewise.
6608
903f5c23
AM
66092015-07-15 Andrew MacLeod <amacleod@redhat.com>
6610
6611 * c-opts.c: Remove multiline #include comment.
6612
026c3cfd
AH
66132015-07-12 Aldy Hernandez <aldyh@redhat.com>
6614
6615 * c-common.c: Fix double word typos.
6616
bb49ee66
EB
66172015-07-10 Eric Botcazou <ebotcazou@adacore.com>
6618
6619 * c-ada-spec.h (cpp_operation): Revert latest change.
6620 * c-ada-spec.c (print_ada_declaration): Likewise. Skip implicit
6621 constructors and destructors.
6622
1916bcb5
AM
66232015-07-09 Andrew MacLeod <amacleod@redhat.com>
6624
6625 * c-common.h: Adjust includes for flags.h changes.
6626 * stub-objc.c: Likewise.
026c3cfd 6627
a9dcd529
EB
66282015-07-08 Eric Botcazou <ebotcazou@adacore.com>
6629
6630 * c-ada-spec.h (cpp_operation): Add IS_CONSTEXPR.
6631 * c-ada-spec.c (print_ada_declaration): Skip constexpr constructors.
6632
b03b462f
JJ
66332015-07-08 Jakub Jelinek <jakub@redhat.com>
6634
6635 * c-omp.c (c_omp_declare_simd_clauses_to_numbers): If all clauses
6636 are to be removed, return NULL rather than original clauses list.
6637
c7131fb2
AM
66382015-07-07 Andrew MacLeod <amacleod@redhat.com>
6639
6640 * array-notation-common.c: Adjust includes.
6641 * c-ada-spec.c: Likewise.
6642 * c-cilkplus.c: Likewise.
6643 * c-common.h: Likewise.
6644 * c-cppbuiltin.c: Likewise.
6645 * c-dump.c: Likewise.
6646 * c-format.c: Likewise.
6647 * c-gimplify.c: Likewise.
6648 * c-indentation.c: Likewise.
6649 * c-lex.c: Likewise.
6650 * c-omp.c: Likewise.
6651 * c-opts.c: Likewise.
6652 * c-pch.c: Likewise.
6653 * c-ppoutput.c: Likewise.
6654 * c-pragma.c: Likewise.
6655 * c-pretty-print.c: Likewise.
6656 * c-semantics.c: Likewise.
6657 * c-ubsan.c: Likewise.
6658 * cilk.c: Likewise.
6659 * stub-objc.c: Likewise.
6660
2a7fb83f
EB
66612015-07-07 Eric Botcazou <ebotcazou@adacore.com>
6662
6663 * c-ada-spec.h (cpp_operation): Add IS_MOVE_CONSTRUCTOR.
6664 * c-ada-spec.c (print_ada_declaration): Skip move constructors.
6665
a03c9bf1
JM
66662015-07-01 Jason Merrill <jason@redhat.com>
6667
36a85135
JM
6668 * c-common.h (D_CXX11): Rename from D_CXX0X.
6669 (RID_FIRST_CXX11, RID_LAST_CXX11): Rename from *_CXX0X.
6670 * c-common.c: Adjust.
6671
e7fa68d5
JM
6672 * c-opts.c (c_common_post_options): Default to C++14.
6673
a03c9bf1
JM
6674 * c-opts.c (c_common_post_options): Highest ABI level is now 10.
6675
fe95b036
ESR
66762015-06-30 Edward Smith-Rowland <3dw4rd@verizon.net>
6677
6678 Implement N4197 - Adding u8 character literals
b3d5bc62 6679 * c-ada-spec.c (print_ada_macros): Treat CPP_UTF8CHAR like
a64be36b 6680 CPP_CHAR.
b3d5bc62 6681 * c-common.c (c_parse_error): Print CPP_UTF8CHAR and
a64be36b 6682 CPP_UTF8CHAR_USERDEF tokens.
b3d5bc62 6683 * c-lex.c (c_lex_with_flags): Treat CPP_UTF8CHAR_USERDEF
a64be36b
EB
6684 and CPP_UTF8CHAR tokens.
6685 (lex_charconst): Treat CPP_UTF8CHAR token.
fe95b036 6686
da2e71c9
MLI
66872015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
6688
6689 PR fortran/66605
6690 * c-common.c (do_warn_unused_parameter): Move here.
6691 * c-common.h (do_warn_unused_parameter): Declare.
6692
b155cfd9
MP
66932015-06-29 Marek Polacek <polacek@redhat.com>
6694
6695 PR c/66322
6696 * c-common.c (check_case_bounds): Add bool * parameter. Set
6697 OUTSIDE_RANGE_P.
6698 (c_add_case_label): Add bool * parameter. Pass it down to
6699 check_case_bounds.
6700 (c_do_switch_warnings): Add bool parameters. Implement -Wswitch-bool
6701 warning here.
6702 * c-common.h (c_add_case_label, c_do_switch_warnings): Update
6703 declarations.
6704
31521951
MP
67052015-06-27 Marek Polacek <polacek@redhat.com>
6706
6707 * c-common.c (check_main_parameter_types): Use VECTOR_TYPE_P
6708 or VECTOR_INTEGER_TYPE_P throughout.
6709 * c-gimplify.c: Likewise.
6710
22d03525
MP
67112015-06-26 Marek Polacek <polacek@redhat.com>
6712
6713 * array-notation-common.c (find_rank): Use INDIRECT_REF_P.
6714 * c-common.c (c_fully_fold_internal): Likewise.
6715 (c_alignof_expr): Likewise.
6716 * c-pretty-print.c (c_pretty_printer::postfix_expression): Likewise.
6717 * c-ubsan.c (ubsan_instrument_bounds): Likewise.
b1726d6c 6718 * cilk.c (create_parm_list): Likewise.
22d03525 6719
af05e6e5
MP
67202015-06-26 Marek Polacek <polacek@redhat.com>
6721
6722 * c-common.c (handle_unused_attribute): Use VAR_OR_FUNCTION_DECL_P.
6723
f0889939
AM
67242015-06-25 Andrew MacLeod <amacleod@redhat.com>
6725
6726 * c-common.c: Remove ipa-ref.h and plugin-api.h from include list.
6727 * c-gimplify.c: Likewise.
6728 * c-pragma.c: Likewise.
6729 * c-ubsan.c: Likewise.
6730 * cilk.c: Likewise.
6731
ca752f39
RS
67322015-06-25 Richard Sandiford <richard.sandiford@arm.com>
6733
6734 * c-common.c (c_type_hasher): Inherit from ggc_ptr_hash rather than
6735 ggc_hasher.
6736
16a16ec7
AM
67372015-06-25 Andrew MacLeod <amacleod@redhat.com>
6738
6739 * cilk.c: Move calls.h after tm.h in the include chain.
6740
0ae9bd27
MP
67412015-06-25 Marek Polacek <polacek@redhat.com>
6742
6743 * array-notation-common.c: Use VAR_P throughout.
6744 * c-ada-spec.c: Likewise.
6745 * c-common.c: Likewise.
6746 * c-format.c: Likewise.
6747 * c-gimplify.c: Likewise.
6748 * c-omp.c: Likewise.
6749 * c-pragma.c: Likewise.
6750 * c-pretty-print.c: Likewise.
6751 * cilk.c: Likewise.
6752
62f9079a
MP
67532015-06-25 Marek Polacek <polacek@redhat.com>
6754
6755 * cilk.c (extract_free_variables): Use is_global_var.
6756
0fa16060
RS
67572015-06-23 Richard Sandiford <richard.sandiford@arm.com>
6758
6759 * c-common.c: Don't include target-def.h.
6760
a68ae2e1
MP
67612015-06-23 Marek Polacek <polacek@redhat.com>
6762
6763 * c-common.c (warn_logical_operator): Use tree_int_cst_equal
6764 when comparing INTEGER_CSTs.
6765
c6a2f2d9
PMR
67662015-06-22 Pierre-Marie de Rodat <derodat@adacore.com>
6767
6768 * c-ada-spec.h (cpp_operation): Add HAS_DEPENDENT_TEMPLATE_ARGS.
6769 * c-ada-spec.c (collect_ada_nodes): Skip NAMESPACE_DECL
6770 (dump_ada_template): Skip partially specialized types.
6771
6b4db501
MM
67722015-06-22 Mikhail Maltsev <maltsevm@gmail.com>
6773
6774 * c-common.c (scalar_to_vector): Use std::swap instead of manually
6775 swapping.
6776
abb226c9
AM
67772015-06-17 Andrew MacLeod <amacleod@redhat.com>
6778
6779 * array-notation-common.c: Do not include input.h, line-map.h or is-a.h.
6780 * c-ada-spec.c: Likewise.
6781 * c-cilkplus.c: Likewise.
6782 * c-common.c: Likewise.
6783 * c-common.h: Likewise.
6784 * c-cppbuiltin.c: Likewise.
6785 * c-dump.c: Likewise.
6786 * c-format.c: Likewise.
6787 * c-gimplify.c: Likewise.
6788 * c-indentation.c: Likewise.
6789 * c-lex.c: Likewise.
6790 * c-omp.c: Likewise.
6791 * c-opts.c: Likewise.
6792 * c-pch.c: Likewise.
6793 * c-ppoutput.c: Likewise.
6794 * c-pragma.c: Likewise.
6795 * c-pretty-print.c: Likewise.
6796 * c-semantics.c: Likewise.
6797 * c-ubsan.c: Likewise.
6798 * cilk.c: Likewise.
6799 * stub-objc.c: Likewise.
6800
076fecad
PP
68012015-06-13 Patrick Palka <ppalka@gcc.gnu.org>
6802
6803 PR c++/65168
6804 * c-common.c (c_common_truthvalue_conversion): Warn when
6805 converting an address of a reference to a truth value.
6806
13fdf2e2
AM
68072015-06-08 Andrew MacLeod <amacleod@redhat.com>
6808
6809 * array-notation-common.c : Adjust include files.
6810 * c-ada-spec.c : Likewise.
6811 * c-cilkplus.c : Likewise.
6812 * c-common.c : Likewise.
6813 * c-common.h : Likewise.
6814 * c-cppbuiltin.c : Likewise.
6815 * c-dump.c : Likewise.
6816 * c-format.c : Likewise.
6817 * c-gimplify.c : Likewise.
6818 * c-indentation.c : Likewise.
6819 * c-lex.c : Likewise.
6820 * c-omp.c : Likewise.
6821 * c-opts.c : Likewise.
6822 * c-pch.c : Likewise.
6823 * c-ppoutput.c : Likewise.
6824 * c-pragma.c : Likewise.
6825 * c-pretty-print.c : Likewise.
6826 * c-semantics.c : Likewise.
6827 * c-ubsan.c : Likewise.
6828 * cilk.c : Likewise.
6829 * stub-objc.c : Likewise.
6830
a1661b90
MP
68312015-06-08 Marek Polacek <polacek@redhat.com>
6832
6833 PR c/66415
6834 * c-format.c (location_from_offset): Return LOC if LINE is null.
6835
d7438551
AH
68362015-06-05 Aldy Hernandez <aldyh@redhat.com>
6837
6838 * c-common.h (c_parse_final_cleanups): New prototype.
6839 * c-opts.c (c_common_parse_file): Call c_parse_final_cleanups.
6840
b3d5bc62
JJ
68412015-06-04 Sriraman Tallam <tmsriram@google.com>
6842
6843 * c-common.c (noplt): New attribute.
6844 (handle_noplt_attribute): New handler.
6845
ecb9f223
AM
68462015-06-04 Andrew MacLeod <amacleod@redhat.com>
6847
6848 * array-notation-common.c: Adjust includes for restructured coretypes.h.
6849 * c-ada-spec.c: Likewise.
6850 * c-cilkplus.c: Likewise.
6851 * c-common.c: Likewise.
6852 * c-common.h: Likewise.
6853 * c-cppbuiltin.c: Likewise.
6854 * c-dump.c: Likewise.
6855 * c-format.c: Likewise.
6856 * c-gimplify.c: Likewise.
6857 * c-indentation.c: Likewise.
6858 * c-lex.c: Likewise.
6859 * c-omp.c: Likewise.
6860 * c-opts.c: Likewise.
6861 * c-pch.c: Likewise.
6862 * c-ppoutput.c: Likewise.
6863 * c-pragma.c: Likewise.
6864 * c-pretty-print.c: Likewise.
6865 * c-semantics.c: Likewise.
6866 * c-ubsan.c: Likewise.
6867 * cilk.c: Likewise.
6868 * stub-objc.c: Likewise.
6869
6ac48155
DM
68702015-06-02 David Malcolm <dmalcolm@redhat.com>
6871
6872 PR c/66220:
6873 * c-indentation.c (should_warn_for_misleading_indentation): Use
6874 expand_location rather than expand_location_to_spelling_point.
6875 Don't warn if the guarding statement is more indented than the
6876 next/body stmts.
6877
773ce42e
DM
68782015-06-02 David Malcolm <dmalcolm@redhat.com>
6879
6880 * c-indentation.c (warn_for_misleading_indentation): Bail out
6881 immediately if -Wmisleading-indentation isn't enabled.
6882
4fef8379
ML
68832015-06-01 Martin Liska <mliska@suse.cz>
6884
6885 * c-format.c (check_format_arg):Use new type-based pool allocator.
6886 (check_format_info_main) Likewise.
6887
1edfb384
EB
68882015-05-31 Eric Botcazou <ebotcazou@adacore.com>
6889
6890 * c-ada-spec.c (is_tagged_type): Test for TYPE_METHODS on main variant.
6891 (has_nontrivial_methods): Likewise.
6892
9677ef52
MP
68932015-05-25 Marek Polacek <polacek@redhat.com>
6894
6895 * c-ubsan.c (ubsan_instrument_shift): Use type0.
6896
fd5c817a
MP
68972015-05-22 Marek Polacek <polacek@redhat.com>
6898
6899 PR c/47043
6900 * c-common.c (handle_deprecated_attribute): Allow CONST_DECL.
6901
a2f45fe6 69022015-05-21 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
581edfa3
TS
6903
6904 * c-cppbuiltin.c (c_cpp_builtins): Use if instead of #if with
6905 STACK_GROWS_DOWNWARD.
6906
a2f45fe6 69072015-05-21 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
62f9f30b
TS
6908
6909 * c-cppbuiltin.c (c_cpp_builtins): Check the value of
6910 STACK_GROWS_DOWNWARD rather than if it is defined.
6911
0fee2ac2 69122015-05-21 Manuel López-Ibáñez <manu@gcc.gnu.org>
b1726d6c 6913
0fee2ac2
MLI
6914 PR c/52952
6915 * c-format.c (location_column_from_byte_offset): New.
6916 (location_from_offset): New.
6917 (struct format_wanted_type): Add offset_loc field.
6918 (check_format_info): Move handling of location for extra arguments
6919 closer to the point of warning.
6920 (check_format_info_main): Pass the result of location_from_offset
6921 to warning_at.
6922 (format_type_warning): Pass the result of location_from_offset
6923 to warning_at.
6924
cf4ef6f7
MP
69252015-05-20 Marek Polacek <polacek@redhat.com>
6926
6927 * c-omp.c (check_omp_for_incr_expr): Use BINARY_CLASS_P.
6928
3a65ee74
MP
69292015-05-20 Marek Polacek <polacek@redhat.com>
6930
6931 * c-ada-spec.c (dump_sloc): Use DECL_P.
6932
21b634ae
MP
69332015-05-20 Marek Polacek <polacek@redhat.com>
6934
6935 * c-pragma.c: Use VAR_OR_FUNCTION_DECL_P throughout.
6936 * c-common.c: Likewise.
6937
0e50b624
DM
69382015-05-19 David Malcolm <dmalcolm@redhat.com>
6939
6940 * c-common.h (fe_file_change): Strengthen param from
6941 const line_map * to const line_map_ordinary *.
6942 (pp_file_change): Likewise.
6943 * c-lex.c (fe_file_change): Likewise.
6944 (cb_define): Use linemap_check_ordinary when invoking
6945 SOURCE_LINE.
6946 (cb_undef): Likewise.
6947 * c-opts.c (c_finish_options): Use linemap_check_ordinary when
6948 invoking cb_file_change.
6949 (c_finish_options): Likewise.
6950 (push_command_line_include): Likewise.
6951 (cb_file_change): Strengthen param "new_map" from
6952 const line_map * to const line_map_ordinary *.
6953 * c-ppoutput.c (cb_define): Likewise for local "map".
6954 (pp_file_change): Likewise for param "map" and local "from".
6955
fab27f52
MM
69562015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
6957
6958 * c-common.c (shorten_compare): Use std::swap instead of explicit swaps.
6959
2fe1d762
TV
69602015-05-18 Tom de Vries <tom@codesourcery.com>
6961
6962 * c-common.c (build_va_arg_1): New function.
6963 (build_va_arg): Add address operator to va_list operand if necessary.
6964
7a37fa90
MM
69652015-05-15 Mikhail Maltsev <maltsevm@gmail.com>
6966
6967 PR c/48956
6968 * c-common.c (int_safely_convertible_to_real_p): Define.
6969 (unsafe_conversion_p): Check conversions involving complex types.
6970 (conversion_warning): Add new warning message for conversions which
6971 discard imaginary component.
6972 * c-common.h: (enum conversion_safety): Add new enumerator for such
6973 conversions.
6974
3aa3c9fc
MP
69752015-05-14 Marek Polacek <polacek@redhat.com>
6976
6977 PR c/66066
6978 PR c/66127
6979 * c-common.c (c_fully_fold): Pass false down to c_fully_fold_internal.
6980 (c_fully_fold_internal): Fold C_MAYBE_CONST_EXPRs with
6981 C_MAYBE_CONST_EXPR_INT_OPERANDS set. Add FOR_INT_CONST argument and
6982 use it. If FOR_INT_CONST, require that all evaluated operands be
6983 INTEGER_CSTs.
6984
c3388e62
DM
69852015-05-12 David Malcolm <dmalcolm@redhat.com>
6986
6987 * c-common.h (warn_for_misleading_indentation): New prototype.
6988 * c-indentation.c: New file.
6989 * c.opt (Wmisleading-indentation): New option.
6990
c7b38fd5
TV
69912015-05-12 Tom de Vries <tom@codesourcery.com>
6992
6993 PR tree-optimization/66010
6994 * c-common.c (build_va_arg): Don't mark ap addressable unless necessary.
6995
381bf11e
JM
69962015-05-09 Jason Merrill <jason@redhat.com>
6997
edff0c06
JM
6998 * c-opts.c (c_common_post_options): Also clear
6999 cpp_opts->cpp_warn_cxx11_compat.
7000
129211bc
JM
7001 * c-common.h (enum cxx_dialect): Add cxx_unset.
7002 * c-common.c (cxx_dialect): Initialize to cxx_unset.
7003 * c-opts.c (c_common_post_options): Set C++ dialect to C++98 if unset.
7004
381bf11e
JM
7005 * c.opt (std=c++14): Remove Undocumented flag and experimental warning.
7006 (std=gnu++0x): Mark as Undocumented.
7007 (std=gnu++1y): Add deprecated message.
7008
fe191308
JM
70092015-05-08 Jason Merrill <jason@redhat.com>
7010
765189ff
JM
7011 * c.opt (Wc++11-compat): Make primary. Rename var warn_cxx11_compat.
7012 * c-opts.c: Adjust.
7013
fe191308
JM
7014 * c.opt (Wc++0x-compat): Also set cpp_warn_cxx11_compat.
7015
755e528f
MP
70162015-05-08 Marek Polacek <polacek@redhat.com>
7017
7018 PR c/64918
7019 * c.opt (Woverride-init-side-effects): New option.
7020
0173bd2a
MP
70212015-05-07 Marek Polacek <polacek@redhat.com>
7022
7023 PR c/65179
7024 * c-common.c (c_fully_fold_internal): Warn when left shifting a
7025 negative value.
7026 * c.opt (Wshift-negative-value): New option.
7027 * c-opts.c (c_common_post_options): Set warn_shift_negative_value
7028 when -Wextra and C99/C++11 mode.
7029
e0f0d3b9
MP
70302015-05-07 Marek Polacek <polacek@redhat.com>
7031 Martin Uecker <uecker@eecs.berkeley.edu>
7032
7033 * c-ubsan.c (ubsan_instrument_bounds): Don't skip instrumenting
7034 flexible member array-like members if SANITIZE_BOUNDS_STRICT.
7035
8243e2a9
JM
70362015-05-05 Jason Merrill <jason@redhat.com>
7037
7038 * c.opt (Wterminate): New.
7039
577cd070
MP
70402015-04-30 Marek Polacek <polacek@redhat.com>
7041
7042 * c-common.c (maybe_warn_bool_compare): When comparing with 0/1,
7043 require that the non-constant be of a boolean type.
7044
0373796b
JT
70452015-04-29 Josh Triplett <josh@joshtriplett.org>
7046
e0f0d3b9
MP
7047 * c-common.c (handle_section_attribute): Refactor to reduce
7048 nesting and distinguish between error cases.
0373796b 7049
716c0ba6
MP
70502015-04-29 Marek Polacek <polacek@redhat.com>
7051
7052 PR c/64610
7053 * c-common.c (maybe_warn_bool_compare): Warn when comparing a boolean
7054 with 0/1.
7055
8848828b
JJ
70562015-04-29 Jakub Jelinek <jakub@redhat.com>
7057
7058 * c-common.h (omp_clause_mask): Unconditionally define as a class.
7059 Use uint64_t instead of unsigned HOST_WIDE_INT and 64 instead of
7060 HOST_BITS_PER_WIDE_INT.
7061
ecd0e562
TV
70622015-04-28 Tom de Vries <tom@codesourcery.com>
7063
7064 PR tree-optimization/65887
7065 * c-common.c (build_va_arg): Mark va_arg ap argument as addressable.
7066
2a877204 70672015-04-28 Eric Botcazou <ebotcazou@adacore.com>
e0f0d3b9 7068 Pierre-Marie de Rodat <derodat@adacore.com>
2a877204
EB
7069
7070 * c-ada-spec.c (in_function): Delete.
7071 (dump_generic_ada_node): Do not change in_function and remove the
7072 redundant code dealing with it.
7073 (print_ada_declaration): Do not change in_function. Use INDENT_INCR.
7074 (print_ada_methods): Output the static member functions in a nested
7075 package after the regular methods as well as associated renamings.
7076
4853031e
MP
70772015-04-24 Marek Polacek <polacek@redhat.com>
7078
7079 PR c/65830
7080 * c-common.c (c_fully_fold_internal): Use OPT_Wshift_count_negative
7081 and OPT_Wshift_count_overflow.
7082
8c2b7f79
MP
7083 PR c/63357
7084 * c-common.c (warn_logical_operator): Warn if the operands have the
7085 same expressions.
7086
b8787813
MP
70872015-04-24 Marek Polacek <polacek@redhat.com>
7088
7089 PR c/61534
7090 * c-common.c (warn_logical_operator): Bail if either operand comes
7091 from a macro expansion.
7092
8fba1830
BRF
70932015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
7094
7095 PR target/55143
7096 * c-common.c (c_default_pointer_mode): Add definition.
7097 * c-common.h (c_default_pointer_mode): Add declaration.
7098
17958621
JJ
70992015-03-11 Jakub Jelinek <jakub@redhat.com>
7100
7101 * c-common.c (c_common_nodes_and_builtins): Don't call xstrdup
7102 on record_builtin_type argument.
7103
7ccb1a11
JJ
71042015-03-10 Jakub Jelinek <jakub@redhat.com>
7105
7106 PR c/65120
7107 * c-common.c (warn_logical_not_parentheses): Don't warn for
7108 !x == 0 or !x != 0.
7109
04fd785e
MP
71102015-03-07 Marek Polacek <polacek@redhat.com>
7111
7112 PR sanitizer/65280
7113 * c-ubsan.c (ubsan_instrument_bounds): Check for COMPONENT_REF
7114 before trying to figure out whether we have a flexible array member.
7115
a4e26206 71162015-03-06 Eric Botcazou <ebotcazou@adacore.com>
8e745a17 7117 Jonathan Wakely <jwakely.gcc@gmail.com>
a4e26206
EB
7118
7119 * c-ada-spec.c (dump_ada_double_name): Fix pasto.
7120
0d2489f4
EB
71212015-03-05 Eric Botcazou <ebotcazou@adacore.com>
7122
7123 PR ada/65319
7124 * c-ada-spec.c (print_destructor): Remove obsolete code.
7125
83ed54d7
EB
71262015-03-01 Eric Botcazou <ebotcazou@adacore.com>
7127
7128 * c-ada-spec.c (is_tagged_type): Add guard for DECL_VINDEX.
7129 (dump_template_types): Adjust DECL_TEMPLATE_INSTANTIATIONS and
7130 DECL_TEMPLATE_RESULT emulations.
7131 (dump_ada_template)): Add guard for TYPE_METHODS.
7132
7631f0e2
MP
71332015-02-27 Marek Polacek <polacek@redhat.com>
7134
7135 PR c/65040
7136 * c.opt (Wformat-signedness): Don't enable by -Wformat=2.
7137
d1783ae5
KT
71382015-02-27 Kai Tietz <ktietz@redhat.com>
7139
7140 PR c/35330
7141 * c-pragma.c (handle_pragma_weak): Do not try to create
7142 weak/alias of declarations not being function, or variable
7143 declarations.
7144
56a9f6bc
TS
71452015-02-24 Thomas Schwinge <thomas@codesourcery.com>
7146
7147 PR libgomp/64625
7148 * c-common.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
7149 Remove macros.
7150 (DEF_FUNCTION_TYPE_VAR_7, DEF_FUNCTION_TYPE_VAR_11): New macros.
7151
3d5cb23d
MP
71522015-02-16 Marek Polacek <polacek@redhat.com>
7153
7154 PR c/65066
7155 * c-format.c (check_format_types): Handle null param.
7156
fa008882
MP
71572015-02-13 Marek Polacek <polacek@redhat.com>
7158
7159 PR c/65040
7160 * c-format.c (check_format_types): Don't warn about different
7161 signedness if the original value is in the range of WANTED_TYPE.
7162
785f21af
JM
71632015-02-12 Jason Merrill <jason@redhat.com>
7164
7165 PR c++/64956
7166 * c-opts.c (c_common_post_options): Change flag_abi_version from 0
7167 to the current highest version.
7168 * c-cppbuiltin.c (c_cpp_builtins): Assert that it isn't 0.
7169
4886ec8e
JJ
71702015-02-04 Jakub Jelinek <jakub@redhat.com>
7171
7172 PR c/64824
7173 PR c/64868
7174 * c-omp.c (c_finish_omp_atomic): Use TRUNC_DIV_EXPR
7175 instead of RDIV_EXPR. Use build_binary_op instead of
7176 build2_loc.
7177
40fecdd6
JM
71782015-01-30 Joseph Myers <joseph@codesourcery.com>
7179
7180 * c-opts.c, c-pch.c, cppspec.c: All callers of fatal_error changed
7181 to pass input_location as first argument.
7182
a0c88d06
TV
71832015-01-23 Tom de Vries <tom@codesourcery.com>
7184
7185 PR libgomp/64672
7186 * c.opt (fopenacc): Mark as LTO option.
7187
1506ae0e
TV
71882015-01-23 Tom de Vries <tom@codesourcery.com>
7189
7190 PR libgomp/64707
7191 * c.opt (fopenmp): Mark as LTO option.
7192
31be63ab
JJ
71932015-01-21 Jakub Jelinek <jakub@redhat.com>
7194
7195 PR c/63307
b1726d6c 7196 * cilk.c (fill_decls_vec): Only put decls into vector v.
31be63ab
JJ
7197 (compare_decls): Fix up formatting.
7198
71992015-01-21 Igor Zamyatin <igor.zamyatin@intel.com>
7200
7201 PR c/63307
7202 * cilk.c: Include vec.h.
7203 (struct cilk_decls): New structure.
7204 (wrapper_parm_cb): Split this function to...
7205 (fill_decls_vec): ...this...
7206 (create_parm_list): ...and this.
7207 (compare_decls): New function.
7208 (for_local_cb): Remove.
7209 (wrapper_local_cb): Ditto.
7210 (build_wrapper_type): For now first traverse and fill vector of
7211 declarations then sort it and then deal with sorted vector.
7212 (cilk_outline): Ditto.
7213 (declare_one_free_variable): Ditto.
7214
6875457f
JM
72152015-01-21 Jason Merrill <jason@redhat.com>
7216
7217 PR c++/64629
7218 * c-format.c (check_format_arg): Call decl_constant_value.
7219
185c9e56
ML
72202015-01-19 Martin Liska <mliska@suse.cz>
7221
7222 * c-common.c (handle_noicf_attribute): New function.
7223
41dbbb37
TS
72242015-01-15 Thomas Schwinge <thomas@codesourcery.com>
7225 Bernd Schmidt <bernds@codesourcery.com>
7226 James Norris <jnorris@codesourcery.com>
7227 Cesar Philippidis <cesar@codesourcery.com>
7228 Ilmir Usmanov <i.usmanov@samsung.com>
7229 Jakub Jelinek <jakub@redhat.com>
7230
7231 * c.opt (fopenacc): New option.
7232 * c-cppbuiltin.c (c_cpp_builtins): Conditionally define _OPENACC.
7233 * c-common.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
7234 New macros.
7235 * c-common.h (c_finish_oacc_wait): New prototype.
7236 * c-omp.c: Include "omp-low.h" and "gomp-constants.h".
7237 (c_finish_oacc_wait): New function.
7238 * c-pragma.c (oacc_pragmas): New variable.
7239 (c_pp_lookup_pragma, init_pragma): Handle it.
7240 * c-pragma.h (enum pragma_kind): Add PRAGMA_OACC_CACHE,
7241 PRAGMA_OACC_DATA, PRAGMA_OACC_ENTER_DATA, PRAGMA_OACC_EXIT_DATA,
7242 PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP, PRAGMA_OACC_PARALLEL,
7243 PRAGMA_OACC_UPDATE, PRAGMA_OACC_WAIT.
7244 (enum pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_ASYNC,
7245 PRAGMA_OACC_CLAUSE_AUTO, PRAGMA_OACC_CLAUSE_COLLAPSE,
7246 PRAGMA_OACC_CLAUSE_COPY, PRAGMA_OACC_CLAUSE_COPYIN,
7247 PRAGMA_OACC_CLAUSE_COPYOUT, PRAGMA_OACC_CLAUSE_CREATE,
7248 PRAGMA_OACC_CLAUSE_DELETE, PRAGMA_OACC_CLAUSE_DEVICE,
7249 PRAGMA_OACC_CLAUSE_DEVICEPTR, PRAGMA_OACC_CLAUSE_FIRSTPRIVATE,
7250 PRAGMA_OACC_CLAUSE_GANG, PRAGMA_OACC_CLAUSE_HOST,
7251 PRAGMA_OACC_CLAUSE_IF, PRAGMA_OACC_CLAUSE_NUM_GANGS,
7252 PRAGMA_OACC_CLAUSE_NUM_WORKERS, PRAGMA_OACC_CLAUSE_PRESENT,
7253 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPY,
7254 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPYIN,
7255 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPYOUT,
7256 PRAGMA_OACC_CLAUSE_PRESENT_OR_CREATE, PRAGMA_OACC_CLAUSE_PRIVATE,
7257 PRAGMA_OACC_CLAUSE_REDUCTION, PRAGMA_OACC_CLAUSE_SELF,
7258 PRAGMA_OACC_CLAUSE_SEQ, PRAGMA_OACC_CLAUSE_VECTOR,
7259 PRAGMA_OACC_CLAUSE_VECTOR_LENGTH, PRAGMA_OACC_CLAUSE_WAIT,
7260 PRAGMA_OACC_CLAUSE_WORKER.
7261
3f8257db 72622015-01-14 Marcos Diaz <marcos.diaz@tallertechnologies.com>
5434dc07
MD
7263
7264 * c-cppbuiltin.c (c_cpp_builtins): New cpp define __SSP_EXPLICIT__
7265 for the new option fstack-protector_explicit.
7266 * c-common.c (c_common_attribute_table): Add stack_protect attribute.
7267 (handle_stack_protect_attribute): New function.
7268
3f8257db 72692015-01-13 Martin Uecker <uecker@eecs.berkeley.edu>
de1b5c17
MU
7270
7271 * c.opt: New option -Warray-bounds=.
7272
adfac8df
JJ
72732015-01-09 Michael Collison <michael.collison@linaro.org>
7274
7275 * array-notation-common.c: Include hash-set.h, machmode.h,
7276 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
7277 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
7278 * c-ada-spec.c: Ditto.
7279 * c-cilkplus.c: Ditto.
7280 * c-common.c: Include input.h due to flattening of tree.h.
7281 Define macro GCC_C_COMMON_C.
7282 * c-common.h: Flatten tree.h header files into c-common.h.
7283 Remove include of tree-core.h.
7284 * c-cppbuiltin.c: Include hash-set.h, machmode.h,
7285 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
7286 fold-const.h, wide-int.h, and inchash.h due to
7287 flattening of tree.h.
7288 * c-dump.c: Ditto.
7289 * c-format.c: Flatten tree.h header files into c-common.h.
7290 * c-cppbuiltin.c: Include hash-set.h, machmode.h,
7291 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
7292 fold-const.h, wide-int.h, and inchash.h due to
7293 flattening of tree.h.
7294 * c-dump.c: Include hash-set.h, machmode.h,
7295 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
7296 fold-const.h, wide-int.h, and inchash.h due to
7297 flattening of tree.h.
7298 * c-format.c: Include hash-set.h, machmode.h,
7299 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
7300 fold-const.h, wide-int.h, inchash.h and real.h due to
7301 flattening of tree.h.
7302 * c-gimplify.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 * cilk.c: Ditto.
7307 * c-lex.c: Ditto.
7308 * c-omp.c: Ditto.
7309 * c-opts.c: Ditto.
7310 * c-pch.c: Ditto.
7311 * c-ppoutput.c: Ditto.
7312 * c-pragma.c: Ditto.
7313 * c-pretty-print.c: Ditto.
7314 * c-semantics.c: Ditto.
7315 * c-ubsan.c: Ditto.
7316 * stub-objc.c: Ditto.
7317
f5481fc4
JM
73182015-01-08 Jason Merrill <jason@redhat.com>
7319
7320 * c-ubsan.c (ubsan_maybe_instrument_array_ref): Use
7321 do_ubsan_in_current_function.
7322 (ubsan_maybe_instrument_reference_or_call): Likewise.
7323 * c-ubsan.h: Declare it.
7324
de35aa66
MS
73252015-01-08 Mike Stump <mikestump@comcast.net>
7326
7327 * c-common.c (c_common_attribute_table): Add no_sanitize_thread.
7328
4a9a42ab
MP
73292015-01-07 Marek Polacek <polacek@redhat.com>
7330
7331 PR c/64440
7332 * c-common.c (c_fully_fold_internal): Warn for division and modulo
7333 if orig_op1 isn't INTEGER_CST, op1 is INTEGER_CST and is zero.
7334
2f42e5de
TS
73352015-01-05 Trevor Saunders <tsaunders@mozilla.com>
7336
7337 PR c++/31397
7338 * c.opt (Wsuggest-override): New option.
7339
5624e564
JJ
73402015-01-05 Jakub Jelinek <jakub@redhat.com>
7341
7342 Update copyright years.
7343
5bd012f8
MP
73442015-01-05 Marek Polacek <polacek@redhat.com>
7345
7346 PR c/64423
7347 * c-common.c (warn_array_subscript_with_type_char): Add location_t
7348 parameter. Use it.
7349 * c-common.h (warn_array_subscript_with_type_char): Update
7350 declaration.
7351
a7fa8d18
ESR
73522014-12-20 Edward Smith-Rowland <3dw4rd@verizon.net>
7353
7354 * c-cppbuiltin.c (__cpp_sized_deallocation): Uncomment and move macro.
7355 Control macro with flag_sized_deallocation.
7356
3f8257db 73572014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
768952be
MU
7358
7359 * c.opt (Wdiscarded-array-qualifiers): New option.
7360
1f8d3e84
JJ
73612014-12-19 Jakub Jelinek <jakub@redhat.com>
7362
7363 PR preprocessor/63831
7364 * c-cppbuiltin.c (c_cpp_builtins): Don't define __has_attribute
7365 and __has_cpp_attribute here.
7366 * c-ppoutput.c (init_pp_output): Set cb->has_attribute to
7367 c_common_has_attribute.
7368 * c-common.h (c_common_has_attribute): New prototype.
7369 * c-lex.c (init_c_lex): Set cb->has_attribute to
7370 c_common_has_attribute instead of cb_has_attribute.
7371 (get_token_no_padding): New function.
7372 (cb_has_attribute): Renamed to ...
7373 (c_common_has_attribute): ... this. No longer static. Use
7374 get_token_no_padding, require ()s, don't build TREE_LIST
7375 unnecessarily, fix up formatting, adjust diagnostics, call
7376 init_attributes.
7377
20b06add
JM
73782014-12-15 Jason Merrill <jason@redhat.com>
7379
7380 * c.opt (-fsized-deallocation, -Wc++14-compat): New.
7381 (-Wsized-deallocation): New.
7382 * c-opts.c (c_common_post_options): -fsized-deallocation defaults
7383 to on in C++14 and up.
7384
94a073b2
JM
73852014-12-11 Jason Merrill <jason@redhat.com>
7386
acaa5911
JM
7387 * c-cppbuiltin.c (c_cpp_builtins): Enable C++14 __cpp_constexpr.
7388
94a073b2
JM
7389 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_runtime_arrays if
7390 we aren't complaining about VLAs.
7391
7fb66c15
MP
73922014-12-06 Marek Polacek <polacek@redhat.com>
7393
7394 PR tree-optimization/64183
7395 * c-gimplify.c (c_gimplify_expr): Don't convert the RHS of a
7396 shift-expression if it is integer_type_node. Use types_compatible_p.
7397
b731b390
JJ
73982014-11-29 Jakub Jelinek <jakub@redhat.com>
7399
7400 * c-common.c (convert_vector_to_pointer_for_subscript): Remove NULL
7401 last argument from create_tmp_var_raw and create_tmp_var calls.
7402 * cilk.c (gimplify_cilk_spawn): Likewise.
7403 * c-omp.c (c_finish_omp_atomic): Likewise.
7404
6a4da643
MP
74052014-11-28 Marek Polacek <polacek@redhat.com>
7406
7407 * c-ubsan.c (ubsan_instrument_shift): Use op1_utype for MINUS_EXPR
7408 instead of unsigned_type_node.
7409
541e35a6
MP
74102014-11-28 Marek Polacek <polacek@redhat.com>
7411
7412 PR c/63862
7413 * c-ubsan.c (ubsan_instrument_shift): Change the type of a MINUS_EXPR
7414 to op1_utype.
7415 * c-gimplify.c (c_gimplify_expr): Convert right operand of a shift
7416 expression to unsigned_type_node.
7417
dcc97066
MW
74182014-11-20 Mark Wielaard <mjw@redhat.com>
7419
7420 PR debug/38757
7421 * c-opts.c (set_std_c89): Set lang_hooks.name.
7422 (set_std_c99): Likewise.
7423 (set_std_c11): Likewise.
7424 (set_std_cxx98): Likewise.
7425 (set_std_cxx11): Likewise.
7426 (set_std_cxx14): Likewise.
7427 (set_std_cxx1z): Likewise.
7428
aa7da51a
JJ
74292014-11-21 Jakub Jelinek <jakub@redhat.com>
7430
7431 PR target/63764
7432 * c-common.h (convert_vector_to_pointer_for_subscript): Change
7433 return type to bool.
009a3480 7434 * c-common.c: Include gimple-expr.h.
aa7da51a
JJ
7435 (convert_vector_to_pointer_for_subscript): Change return type to
7436 bool. If *vecp is not lvalue_p and has VECTOR_TYPE, return true
7437 and copy it into a TARGET_EXPR and use that instead of *vecp
7438 directly.
7439
538dd0b7
DM
74402014-11-19 David Malcolm <dmalcolm@redhat.com>
7441
7442 Merger of git branch "gimple-classes-v2-option-3".
7443 * ChangeLog.gimple-classes: New.
7444 * c-gimplify.c (add_block_to_enclosing): Strengthen local "stack"
7445 from being just a vec<gimple> to a vec<gbind *>.
7446
c39a5e99
JJ
74472014-11-18 Jakub Jelinek <jakub@redhat.com>
7448
7449 PR sanitizer/63813
7450 * c-ubsan.c (ubsan_maybe_instrument_reference_or_call): Change type
7451 argument to ptype, set type to TREE_TYPE (ptype). Don't call
7452 get_pointer_alignment for non-pointers. Use ptype, or if it is
7453 reference type, corresponding pointer type, as type of kind
7454 argument.
7455 (ubsan_maybe_instrument_reference,
7456 ubsan_maybe_instrument_member_call): Adjust callers.
7457
8537a4a9
MP
74582014-11-15 Marek Polacek <polacek@redhat.com>
7459
7460 PR middle-end/63884
7461 * array-notation-common.c (is_sec_implicit_index_fn): Return false
7462 for NULL fndecl.
7463 (extract_array_notation_exprs): Return for NULL node.
7464
2079956a
JM
74652014-11-12 Joseph Myers <joseph@codesourcery.com>
7466
7467 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Define and
7468 undefine __NO_MATH_ERRNO__ based on changes to -fmath-errno state.
7469
1304953e
JJ
74702014-11-12 Jakub Jelinek <jakub@redhat.com>
7471
7472 PR c/59708
7473 * c-common.c (check_builtin_function_arguments): Handle
7474 BUILT_IN_{ADD,SUB,MUL}_OVERFLOW.
7475
e5e44252
AK
74762014-11-10 Andi Kleen <ak@linux.intel.com>
7477
7478 PR c/60804
7479 * c-common.h (check_no_cilk): Declare.
7480 * cilk.c (get_error_location): New function.
7481 (check_no_cilk): Dito.
7482
e64b984d
AK
74832014-11-10 Andi Kleen <ak@linux.intel.com>
7484
7485 * cilk.c (recognize_spawn): Use expression location
7486 for error message.
7487
13c21655
PC
74882014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
7489
7490 * c.opt ([Wshift-count-negative, Wshift-count-overflow]): Add.
7491
42fd12b1
ESR
74922014-11-10 Edward Smith-Rowland <3dw4rd@verizon.net>
7493
7494 * c-cppbuiltin.c (__has_attribute, __has_cpp_attribute): New macros;
7495 (__cpp_rtti, __cpp_exceptions): New macros for C++98;
7496 (__cpp_range_based_for, __cpp_initializer_lists,
7497 __cpp_delegating_constructors, __cpp_nsdmi,
7498 __cpp_inheriting_constructors, __cpp_ref_qualifiers): New macros
7499 for C++11; (__cpp_attribute_deprecated): Remove in favor of
7500 __has_cpp_attribute.
7501 * c-lex.c (cb_has_attribute): New callback CPP function;
7502 (init_c_lex): Set has_attribute callback.
7503
6f450181
RB
75042014-11-04 Richard Biener <rguenther@suse.de>
7505
7506 * c-common.c (shorten_compare): Do not shorten mixed
7507 DFP and non-DFP compares.
7508
26f0e1d6
ESR
75092014-11-01 Edward Smith-Rowland <3dw4rd@verizon.net>
7510
7511 * g++.dg/cpp1y/feat-cxx11.C: Commentary and rearrangement of tests.
7512 * g++.dg/cpp1y/feat-cxx11-neg.C: Add aggregate NSDMI test.
7513 Commentary and rearrangement of tests.
7514 * g++.dg/cpp1y/feat-cxx14.C: Enable aggregate NSDMI test.
7515 Commentary and rearrangement of tests.
ab20d992 7516 * g++.dg/cpp1y/feat-cxx98-neg.C: Ditto.
26f0e1d6
ESR
7517 * g++.dg/cpp1y/feat-cxx98.C: Commentary.
7518
ef4bddc2
RS
75192014-10-29 Richard Sandiford <richard.sandiford@arm.com>
7520
7521 * c-common.c, c-common.h, c-cppbuiltin.c, c-lex.c: Remove redundant
7522 enum from machine_mode.
7523
c582198b
AM
75242014-10-28 Andrew MacLeod <amacleod@redhat.com>
7525
adfac8df
JJ
7526 * c-common.c: Adjust include files.
7527 * c-gimplify.c: Ditto.
7528 * cilk.c: Ditto.
7529 * c-pragma.c: Ditto.
7530 * c-ubsan.c: Ditto.
c582198b 7531
60393bbc
AM
75322014-10-27 Andrew MacLeod <amacleod@redhat.com>
7533
7534 * c-gimplify.c: Adjust include files.
7535
d723bb7c
MLI
75362014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
7537
7538 PR c++/53061
7539 * c-opts.c (c_common_diagnostics_set_defaults): Renamed from
7540 c_common_initialize_diagnostics.
7541 * c-common.h: Likewise.
7542
90f3520e
MP
75432014-10-24 Marek Polacek <polacek@redhat.com>
7544
7545 PR c/56980
7546 * c-pretty-print.c (c_pretty_printer::simple_type_specifier): Don't
7547 print "struct"/"union"/"enum" for typedefed names.
7548
59d7607a
MP
75492014-10-23 Marek Polacek <polacek@redhat.com>
7550
7551 * c-ubsan.c (ubsan_instrument_shift): Perform the MINUS_EXPR
7552 in unsigned type.
7553
d95a2703
JJ
75542014-10-22 Jakub Jelinek <jakub@redhat.com>
7555 Yury Gribov <y.gribov@samsung.com>
7556
7557 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
7558 ubsan_instrument_vla): Check bits in flag_sanitize_recover bitmask
7559 instead of flag_sanitize_recover as bool flag.
7560
8e6ef852
KY
75612014-10-21 Kirill Yukhin <kirill.yukhin@intel.com>
7562
7563 * cilk.c: Revert previous change.
7564
948cf550
IZ
75652014-10-20 Igor Zamyatin <igor.zamyatin@intel.com>
7566
7567 PR c/63307
7568 * cilk.c: Include vec.h.
7569 (struct cilk_decls): New structure.
7570 (wrapper_parm_cb): Split this function to...
7571 (fill_decls_vec): ...this...
7572 (create_parm_list): ...and this.
7573 (compare_decls): New function.
7574 (for_local_cb): Remove.
7575 (wrapper_local_cb): Ditto.
7576 (build_wrapper_type): For now first traverse and fill vector of
7577 declarations then sort it and then deal with sorted vector.
7578 (cilk_outline): Ditto.
7579 (declare_one_free_variable): Ditto.
7580
92574c7c
MP
75812014-10-17 Marek Polacek <polacek@redhat.com>
7582
7583 * c-opts.c (c_common_post_options): Set warn_implicit_int.
7584 * c.opt (Wimplicit-int): Initialize to -1.
7585
83685514
AM
75862014-10-16 Andrew MacLeod <amacleod@redhat.com>
7587
7588 * c-pragma.c: Adjust include files.
7589 * c-semantics.c: Likewise.
7590
5b8300ea
DD
75912014-10-16 DJ Delorie <dj@redhat.com>
7592
7593 * c-cppbuiltin.c (cpp_atomic_builtins): Don't assume pointers are
7594 multiples of bytes.
7595
5f83e90b
JM
75962014-10-14 Jason Merrill <jason@redhat.com>
7597
7598 PR c++/63455
7599 * c-common.h (CPP_PREPARSED_EXPR): New.
7600 (N_CP_TTYPES): Adjust.
7601
d73326ca
MP
76022014-10-15 Marek Polacek <polacek@redhat.com>
7603
7604 * c-opts.c (c_common_init_options): Make -std=gnu11 the default for C.
7605
78a7c317
DD
76062014-10-14 DJ Delorie <dj@redhat.com>
7607
7608 * c-pretty-print.c (pp_c_integer_constant): Check for all __intN
7609 types, not just __int128.
7610 * c-cppbuiltin.c (c_cpp_builtins): Add builtins for all __intN
7611 types, not just __int128.
7612 (cpp_atomic_builtins): Round pointer sizes up.
7613 (type_suffix): Use type precision, not specific types.
7614 * c-common.c (c_common_reswords): Remove __int128 special case.
7615 (c_common_type_for_size): Check for all __intN types, not just
7616 __int128.
7617 (c_common_type_for_mode): Likewise.
7618 (c_common_signed_or_unsigned_type): Likewise.
7619 (c_build_bitfield_integer_type): Likewise.
7620 (c_common_nodes_and_builtins): Likewise.
7621 (keyword_begins_type_specifier): Likewise.
7622 * c-common.h (rid): Remove RID_INT128 and add RID_INT_N_* for all
7623 __intN variants.
7624
2a22f99c
TS
76252014-10-12 Trevor Saunders <tsaunders@mozilla.com>
7626
7627 * c-common.c: Use hash_table instead of hashtab.
7628
2a8ef767
ESR
76292014-10-06 Edward Smith-Rowland <3dw4rd@verizon.net>
7630
adfac8df 7631 * c-cppbuiltin.c: Move __cpp_attribute_deprecated to the
2a8ef767
ESR
7632 C++11 section.
7633
3c9aabbd
MG
76342014-10-03 Marc Glisse <marc.glisse@inria.fr>
7635
7636 PR c++/54427
7637 PR c++/57198
7638 PR c++/58845
7639 * c-common.c (warn_logical_operator): Punt for vectors.
7640
a15f7cb8
ESR
76412014-10-01 Edward Smith-Rowland <3dw4rd@verizon.net>
7642
7643 Implement SD-6: SG10 Feature Test Recommendations
7644 * c-cppbuiltin.c (c_cpp_builtins()): Define language feature
7645 macros and the __has_header macro.
7646
8d0cf15e
JM
76472014-09-30 Jason Merrill <jason@redhat.com>
7648
dd5d5481
JM
7649 * c-common.h (enum rid): Add RID_IS_TRIVIALLY_ASSIGNABLE and
7650 RID_IS_TRIVIALLY_CONSTRUCTIBLE.
7651 * c-common.c (c_common_reswords): Add __is_trivially_copyable.
7652
b752325e
JM
7653 * c-common.h (enum rid): Add RID_IS_TRIVIALLY_COPYABLE.
7654 * c-common.c (c_common_reswords): Add __is_trivially_copyable.
7655
8d0cf15e
JM
7656 * c-common.h (enum rid): Remove RID_IS_CONVERTIBLE_TO.
7657 * c-common.c (c_common_reswords): Remove __is_convertible_to.
7658
083e891e
MP
76592014-09-24 Marek Polacek <polacek@redhat.com>
7660
7661 PR c/61405
7662 PR c/53874
7663 * c-common.h (struct c_common_resword): Don't define CPP_KEYWORD.
7664
7861b648
AK
76652014-09-23 Andi Kleen <ak@linux.intel.com>
7666
7667 * c-common.c (handle_no_reorder_attribute): New function.
7668 (c_common_attribute_table): Add no_reorder attribute.
7669
9a79452d
JM
76702014-09-22 Joseph Myers <joseph@codesourcery.com>
7671
7672 * c-cppbuiltin.c (c_cpp_builtins): Define
7673 __LIBGCC_*_EXCESS_PRECISION__ macros for supported floating-point
7674 modes.
7675
dd69f047
JM
76762014-09-18 Joseph Myers <joseph@codesourcery.com>
7677
7678 * c-cppbuiltin.c (c_cpp_builtins): Define __LIBGCC_*_FUNC_EXT__
7679 for supported floating-point modes.
7680
737a4826
MLI
76812014-09-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
7682
7683 * c.opt (Wpsabi): Use LangEnabledBy.
7684 * c-opts.c (c_common_handle_option): Do not handle here.
7685
8cc4b7a2
JM
76862014-09-12 Joseph Myers <joseph@codesourcery.com>
7687
7688 * c-cppbuiltin.c (c_cpp_builtins): Define __LIBGCC_HAS_%s_MODE__
7689 macros for floating-point modes.
7690
179b5a55
MG
76912014-09-11 Marc Glisse <marc.glisse@inria.fr>
7692
7693 PR target/58757
7694 * c-cppbuiltin.c (builtin_define_float_constants): Correct
7695 __*_DENORM_MIN__ without denormals.
7696
570a11fe
JJ
76972014-09-10 Jakub Jelinek <jakub@redhat.com>
7698
7699 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
7700 ubsan_instrument_vla, ubsan_instrument_return): Adjust
7701 ubsan_create_data callers.
7702 (ubsan_instrument_bounds): Don't emit UBSAN_BOUNDS at all if
7703 index is constant or BIT_AND_EXPR with constant mask and is
7704 small enough for the bound.
7705 * c-gimplify.c (ubsan_walk_array_refs_r): For ADDR_EXPR of
7706 ARRAY_REF, make sure the inner ARRAY_REF is not walked again.
7707
b559c810
MLI
77082014-09-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
7709
7710 * c.opt: Add CppReason to various flags.
7711 (Wdate-time): Re-sort.
7712 * c-common.c: Include c-common.h earlier.
7713 (struct reason_option_codes_t): Delete.
7714 (c_option_controlling_cpp_error): Prefix global type and struct
7715 with cpp_.
7716
1ef33fd4
MLI
77172014-09-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
7718
7719 * c.opt (Wnormalized): New.
7720 (Wnormalized=): Use Enum and Reject Negative.
7721 * c-opts.c (c_common_handle_option): Do not handle Wnormalized here.
7722
66bb34c0
JM
77232014-09-08 Joseph Myers <joseph@codesourcery.com>
7724
7725 * c-cppbuiltin.c (c_cpp_builtins): Define macros for mantissa
7726 digits of floating-point modes if -fbuilding-libgcc.
7727
53d68b9f
JM
77282014-09-05 Joseph Myers <joseph@codesourcery.com>
7729
7730 * c-cppbuiltin.c (c_cpp_builtins): Also define
7731 __LIBGCC_EH_TABLES_CAN_BE_READ_ONLY__,
7732 __LIBGCC_EH_FRAME_SECTION_NAME__, __LIBGCC_JCR_SECTION_NAME__,
7733 __LIBGCC_CTORS_SECTION_ASM_OP__, __LIBGCC_DTORS_SECTION_ASM_OP__,
7734 __LIBGCC_TEXT_SECTION_ASM_OP__, __LIBGCC_INIT_SECTION_ASM_OP__,
7735 __LIBGCC_INIT_ARRAY_SECTION_ASM_OP__,
7736 __LIBGCC_STACK_GROWS_DOWNWARD__,
7737 __LIBGCC_DONT_USE_BUILTIN_SETJMP__,
7738 __LIBGCC_DWARF_ALT_FRAME_RETURN_COLUMN__,
7739 __LIBGCC_DWARF_FRAME_REGISTERS__,
7740 __LIBGCC_EH_RETURN_STACKADJ_RTX__, __LIBGCC_JMP_BUF_SIZE__,
7741 __LIBGCC_STACK_POINTER_REGNUM__ and
7742 __LIBGCC_VTABLE_USES_DESCRIPTORS__ for -fbuilding-libgcc.
7743 (builtin_define_with_value): Handle backslash-escaping in string
7744 macro values.
7745
f65586dc
RB
77462014-09-05 Richard Biener <rguenther@suse.de>
7747
7748 PR middle-end/63148
7749 * c-format.c (check_format_arg): Properly handle
7750 effectively signed POINTER_PLUS_EXPR offset.
7751
2b71f4a4
MLI
77522014-09-04 Manuel López-Ibáñez <manu@gcc.gnu.org>
7753
7754 * c.opt (Wc90-c99-compat,Wc++-compat,Wcomment,Wendif-labels,
7755 Winvalid-pch,Wlong-long,Wmissing-include-dirs,Wmultichar,Wpedantic,
7756 (Wdate-time,Wtraditional,Wundef,Wvariadic-macros): Add CPP, Var
7757 and Init.
7758 * c-opts.c (c_common_handle_option): Do not handle here.
7759 (sanitize_cpp_opts): Likewise.
7760 * c-common.c (struct reason_option_codes_t): Handle
7761 CPP_W_C90_C99_COMPAT and CPP_W_PEDANTIC.
7762
d2e4feca
MP
77632014-09-03 Marek Polacek <polacek@redhat.com>
7764
7765 * c.opt (Wlogical-not-parentheses): Enable by -Wall.
7766
9a771876
JJ
77672014-09-02 Jakub Jelinek <jakub@redhat.com>
7768 Balaji V. Iyer <balaji.v.iyer@intel.com>
7769 Igor Zamyatin <igor.zamyatin@intel.com>
7770
7771 * c-cilkplus.c (cilk_for_number_of_iterations): New function.
7772 * c-common.c (c_common_reswords): Added _Cilk_for.
7773 * c-common.h (enum rid): Added RID_CILK_FOR.
7774 (cilk_for_number_of_iterations): Add declaration.
7775 * c-omp.c (c_finish_omp_for): Added checks for CILK_SIMD and
7776 CILK_FOR.
7777 * c-pragma.c (init_pragma): Register "grainsize" pragma.
7778 * c-pragma.h (enum pragma_kind): Add PRAGMA_CILK_GRAINSIZE.
7779
81b5d104
MLI
77802014-08-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
7781
7782 * c.opt (Wbuiltin-macro-redefined,Wdeprecated,Wendif-labels,
7783 Winvalid-pch,Wliteral-suffix,Wmissing-include-dirs,Wtrigraphs,
7784 Wundef): Use CPP, Var and Init.
7785 * c-opts.c (c_common_handle_option): Do not handle the above flags here.
7786
b753b37b
MLI
77872014-08-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
7788
7789 * c.opt (Wbuiltin-macro-redefined): Use CPP, Var and Init.
7790 * c-opts.c (c_common_handle_option): Do not handle here.
7791
028aee17
JM
77922014-08-25 Jason Merrill <jason@redhat.com>
7793
7794 * c.opt: Change -std=c++1y and -std=gnu++1y to be aliases for
7795 -std=c++14 and -std=gnu++14, rather than the reverse.
7796 * c-opts.c (c_common_handle_option): Change OPT_std_c__1y and
7797 OPT_std_gnu__1y to OPT_std_c__14 and OPT_std_gnu__14.
7798 * c-common.h (cxx_dialect): Remove cxx1y.
7799
e4276ba5
ESR
78002014-08-23 Edward Smith-Rowland <3dw4rd@verizon.net>
7801
7802 * c-common.h (enum cxx_dialect): Add cxx14.
7803 * c-opts.c (set_std_cxx1y): Rename to set_std_cxx14; Use cxx14.
7804 * c-ubsan.c (ubsan_instrument_shift): Change comment and logic from
7805 cxx_dialect == cxx11 || cxx_dialect == cxx1y to cxx_dialect >= cxx11.
7806
a545cacd
JM
78072014-08-22 Jason Merrill <jason@redhat.com>
7808
7809 * c.opt (std=gnu++17): Fix alias.
7810
59ea0364
MP
78112014-08-22 Marek Polacek <polacek@redhat.com>
7812
7813 PR c++/62199
7814 * c-common.c (warn_logical_not_parentheses): Don't check LHS. Don't
7815 check for vector types. Drop LHS argument.
7816 * c-common.h (warn_logical_not_parentheses): Adjust.
7817
596e808c
MLI
78182014-08-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
7819
7820 * c.opt (Wcomment): Use CPP, Var and LangEnabledBy.
7821 (Wmultichar): Likewise.
7822 (Wdate-time): Use C-family languages instead of Common. Use CPP
7823 and Var.
7824 * c-opts.c (c_common_handle_option): Do not handle the above
7825 options here.
7826 (sanitize_cpp_opts): Likewise.
7827
18767f65
MLI
78282014-08-21 Manuel López-Ibáñez <manu@gcc.gnu.org>
7829
7830 PR fortran/44054
7831 * c-opts.c: Include tree-diagnostics.h.
7832 (c_diagnostic_finalizer): New.
7833 (c_common_initialize_diagnostics): Use it.
7834
b4413594
MLI
78352014-08-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
7836
7837 PR preprocessor/51303
7838 * c-common.c (struct reason_option_codes_t option_codes):
7839 Add CPP_W_MISSING_INCLUDE_DIRS. Sort alphabetically.
7840
43f9a13c
MLI
78412014-08-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
7842
7843 PR c/60975
7844 PR c/53063
7845 * c.opt (Wvariadic-macros): Use CPP and LangEnabledBy.
7846 * c-opts.c (c_common_handle_option): Call cpp_handle_option_auto.
7847 (c_common_post_options): Call init_global_opts_from_cpp.
7848 (sanitize_cpp_opts): Do not handle Wvariadic-macros here.
7849
04159acf
MP
78502014-08-19 Marek Polacek <polacek@redhat.com>
7851
7852 PR c++/62153
7853 * c-common.c (maybe_warn_bool_compare): New function.
7854 * c-common.h (maybe_warn_bool_compare): Declare.
7855 * c.opt (Wbool-compare): New option.
7856
35aff4fb
MP
78572014-08-19 Marek Polacek <polacek@redhat.com>
7858
7859 * c.opt (Wc99-c11-compat): New option.
7860
177cce46
MP
78612014-08-19 Marek Polacek <polacek@redhat.com>
7862
7863 * c-opts.c (sanitize_cpp_opts): Make warn_long_long be set according
7864 to warn_c90_c99_compat.
7865 * c.opt (Wc90-c99-compat, Wdeclaration-after-statement): Initialize
7866 to -1.
7867
6ae9194f
MLI
78682014-08-19 Manuel López-Ibáñez <manu@gcc.gnu.org>
7869 Steven Bosscher <steven@gcc.gnu.org>
7870
7871 PR c/52952
7872 * c-format.c: Add extra_arg_loc and format_string_loc to struct
7873 format_check_results.
7874 (check_function_format): Use true and add comment for boolean
7875 argument.
7876 (finish_dollar_format_checking): Use explicit location when warning.
7877 (check_format_info): Likewise.
7878 (check_format_arg): Set extra_arg_loc and format_string_loc.
7879 (check_format_info_main): Use explicit location when warning.
7880 (check_format_types): Pass explicit location.
7881 (format_type_warning): Likewise.
7882
8e54f6d3
MLI
78832014-08-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
7884
7885 PR fortran/44054
7886 * c-format.c: Handle Fortran flags.
7887
cd4e76fc
IZ
78882014-08-12 Igor Zamyatin <igor.zamyatin@intel.com>
7889
7890 PR other/61962
7891 * array-notation-common.c (find_rank): Added handling for other
7892 types of references.
7893
f3bede71
MP
78942014-08-10 Marek Polacek <polacek@redhat.com>
7895
7896 PR c/51849
7897 * c-opts.c (sanitize_cpp_opts): Pass warn_c90_c99_compat to libcpp.
7898 * c.opt (Wc90-c99-compat): Add option.
7899
9f25a338
TS
79002014-08-07 Trevor Saunders <tsaunders@mozilla.com>
7901
7902 * c-gimplify.c, cilk.c: Remove includes of pointer-set.h.
7903
62e4eb35
MP
79042014-08-03 Marek Polacek <polacek@redhat.com>
7905
ab20d992 7906 * c-common.c (check_case_value): Add location_t parameter. Use it.
62e4eb35
MP
7907 (c_add_case_label): Pass loc to check_case_value.
7908
b787e7a2
TS
79092014-08-02 Trevor Saunders <tsaunders@mozilla.com>
7910
7911 * cilk.c: Use hash_map instead of pointer_map.
7912
6e2830c3
TS
79132014-08-02 Trevor Saunders <tsaunders@mozilla.com>
7914
7915 * c-gimplify.c: Use hash_set instead of pointer_set.
7916
a7ee52fb
IZ
79172014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
7918
7919 PR middle-end/61455
7920 * array-notation-common.c (extract_array_notation_exprs): Handling
7921 of DECL_EXPR added.
7922
944fa280
JJ
79232014-08-01 Jakub Jelinek <jakub@redhat.com>
7924
7925 * c-common.h (min_align_of_type): Removed prototype.
7926 * c-common.c (min_align_of_type): Removed.
7927 * c-ubsan.h (ubsan_maybe_instrument_reference,
7928 ubsan_maybe_instrument_member_call): New prototypes.
7929 * c-ubsan.c: Include stor-layout.h and builtins.h.
7930 (ubsan_maybe_instrument_reference_or_call,
7931 ubsan_maybe_instrument_reference, ubsan_maybe_instrument_call): New
7932 functions.
7933
b4dfdc11
MG
79342014-07-31 Marc Glisse <marc.glisse@inria.fr>
7935
7936 PR c++/60517
7937 * c.opt (-Wreturn-local-addr): Move to common.opt.
7938
a41844e5
JM
79392014-07-30 Jason Merrill <jason@redhat.com>
7940
7941 PR c++/61659
7942 PR c++/61687
7943 Revert:
7944 * c.opt (-fuse-all-virtuals): New.
7945
976d5a22
TT
79462014-07-30 Tom Tromey <tromey@redhat.com>
7947
7948 PR c/59855
7949 * c.opt (Wdesignated-init): New option.
7950 * c-common.c (c_common_attribute_table): Add "designated_init".
7951 (handle_designated_init): New function.
7952
cdc94aca
MP
79532014-07-24 Marek Polacek <polacek@redhat.com>
7954
7955 PR c/57653
7956 * c-opts.c (c_finish_options): If -imacros is in effect, return.
7957
f41373b6
DS
79582014-07-16 Dodji Seketeli <dodji@redhat.com>
7959
7960 PR preprocessor/60723 - missing system-ness marks for macro tokens
7961 * c-ppoutput.c (struct print::prev_was_system_token): New data
7962 member.
7963 (init_pp_output): Initialize it.
7964 (maybe_print_line_1, maybe_print_line, print_line_1, print_line)
7965 (do_line_change): Return a flag saying if a line marker was
7966 emitted or not.
7967 (scan_translation_unit): Detect if the system-ness of the token we
7968 are about to emit is different from the one of the previously
7969 emitted token. If so, emit a line marker. Avoid emitting useless
7970 adjacent line markers. Avoid emitting line markers for tokens
7971 originating from the expansion of built-in macros.
7972 (scan_translation_unit_directives_only): Adjust.
7973
4d661eaa
MP
79742014-07-15 Marek Polacek <polacek@redhat.com>
7975
7976 * c-ubsan.c (ubsan_instrument_bounds): Don't instrument if
7977 TYPE_MAX_VALUE is NULL.
7978
b108f48f
JJ
79792014-07-14 Jakub Jelinek <jakub@redhat.com>
7980
7981 PR middle-end/61294
7982 * c.opt (Wmemset-transposed-args): New warning.
7983
c0221884
JM
79842014-07-10 Jason Merrill <jason@redhat.com>
7985
7986 PR c++/61659
7987 PR c++/61687
7988 * c.opt (-fuse-all-virtuals): New.
7989
63dfbb95
RB
79902014-07-09 Richard Biener <rguenther@suse.de>
7991
7992 PR c-family/61741
7993 * c-gimplify.c (c_gimplify_expr): Gimplify self-modify expressions
7994 using unsigned arithmetic if overflow does not wrap instead of
7995 if overflow is undefined.
7996
773ec47f
MP
79972014-07-06 Marek Polacek <polacek@redhat.com>
7998
7999 PR c/6940
8000 * c.opt (Wsizeof-array-argument): New option.
8001
00a7ba58
JJ
80022014-07-03 Jakub Jelinek <jakub@redhat.com>
8003
b1726d6c 8004 * c-ada-spec.c (dump_ada_nodes): Don't call qsort if
00a7ba58
JJ
8005 comments->count <= 1, as comments->entries might be NULL.
8006
52ec0ea3
MP
80072014-07-01 Marek Polacek <polacek@redhat.com>
8008
8009 * c.opt (Wint-conversion): New option.
8010
d5c3d343
MP
80112014-07-01 Marek Polacek <polacek@redhat.com>
8012
8013 PR c/58286
8014 * c.opt (Wincompatible-pointer-types): New option.
8015
6e7ceb17
PC
80162014-06-30 Paolo Carlini <paolo.carlini@oracle.com>
8017
8018 PR c++/51400
8019 * c-common.c (handle_noreturn_attribute, handle_const_attribute):
8020 Do not discard TYPE_QUALS of type.
8021
da73100b
JM
80222014-06-26 Jason Merrill <jason@redhat.com>
8023
8024 * c-common.h (enum cxx_dialect): Add cxx1z.
8025 * c.opt (std=c++1z, std=c++17, std=gnu++1z, std=gnu++17): New.
8026 * c-opts.c (c_common_handle_option, set_std_cxx1z): Handle it.
8027
08eedf75
TJ
80282014-06-26 Teresa Johnson <tejohnson@google.com>
8029
8030 * c-common.h (get_dump_info): Declare.
8031 * c-gimplify.c (c_genericize): Use saved dump files.
8032 * c-opts.c (c_common_parse_file): Begin and end dumps
8033 once around parsing invocation.
8034 (get_dump_info): New function.
8035
7b56b2f8
MP
80362014-06-23 Marek Polacek <polacek@redhat.com>
8037 Andrew MacLeod <amacleod@redhat.com>
8038
8039 PR c/61553
8040 * c-common.c (get_atomic_generic_size): Don't segfault if the
8041 type doesn't have a size.
8042
0e37a2f3
MP
80432014-06-20 Marek Polacek <polacek@redhat.com>
8044
8045 * c-gimplify.c: Include "c-ubsan.h" and "pointer-set.h".
8046 (ubsan_walk_array_refs_r): New function.
8047 (c_genericize): Instrument array bounds.
8048 * c-ubsan.c: Include "internal-fn.h".
8049 (ubsan_instrument_division): Mark instrumented arrays as having
8050 side effects. Adjust ubsan_type_descriptor call.
8051 (ubsan_instrument_shift): Likewise.
8052 (ubsan_instrument_vla): Adjust ubsan_type_descriptor call.
8053 (ubsan_instrument_bounds): New function.
8054 (ubsan_array_ref_instrumented_p): New function.
8055 (ubsan_maybe_instrument_array_ref): New function.
8056 * c-ubsan.h (ubsan_instrument_bounds): Declare.
8057 (ubsan_array_ref_instrumented_p): Declare.
8058 (ubsan_maybe_instrument_array_ref): Declare.
8059
80602014-06-20 Hale Wang <hale.wang@arm.com>
dd6fe7d4
HW
8061
8062 PR lto/61123
8063 * c.opt (fshort-enums): Add to LTO.
8064 * c.opt (fshort-wchar): Likewise.
8065
5c3d09f7
MP
80662014-06-16 Marek Polacek <polacek@redhat.com>
8067
8068 PR c/60439
8069 * c.opt (Wswitch-bool): Add Var.
8070
9cf32741
JJ
80712014-06-12 Jakub Jelinek <jakub@redhat.com>
8072
8073 PR middle-end/61486
8074 * c-omp.c (c_omp_split_clauses): Don't crash on firstprivate in
8075 #pragma omp target teams or
8076 #pragma omp {,target }teams distribute simd.
8077
62984918
JM
80782014-06-12 Jason Merrill <jason@redhat.com>
8079
8080 * c.opt (Wabi=, fabi-compat-version): New.
8081 * c-opts.c (c_common_handle_option): Handle -Wabi=.
8082 (c_common_post_options): Handle flag_abi_compat_version default.
8083 Disallow -fabi-compat-version=1.
8084 * c-common.h (abi_version_crosses): New.
8085
f961457f
JH
80862014-06-11 Jan Hubicka <hubicka@ucw.cz>
8087
adfac8df 8088 * c-common.c (handle_section_attribute): Update handling for
f961457f
JH
8089 section names that are no longer trees.
8090
92d28cbb
JJ
80912014-06-10 Jakub Jelinek <jakub@redhat.com>
8092
8093 PR fortran/60928
8094 * c-pragma.c (omp_pragmas_simd): Move PRAGMA_OMP_TASK...
8095 (omp_pragmas): ... back here.
8096
742938c9
MP
80972014-06-05 Marek Polacek <polacek@redhat.com>
8098
8099 PR c/49706
8100 * c-common.c (warn_logical_not_parentheses): New function.
8101 * c-common.h (warn_logical_not_parentheses): Declare.
8102 * c.opt (Wlogical-not-parentheses): New option.
8103
9d548dfb
MP
81042014-06-04 Marek Polacek <polacek@redhat.com>
8105
8106 PR c/30020
8107 * c-common.c (check_case_bounds): Add location parameter.
8108 Use it.
8109 (c_add_case_label): Pass loc to check_case_bounds.
8110
fedfecef
MP
81112014-06-03 Marek Polacek <polacek@redhat.com>
8112
8113 PR c/60439
8114 * c.opt (Wswitch-bool): New option.
8115
f6a7cffc
TS
81162014-05-22 Thomas Schwinge <thomas@codesourcery.com>
8117
040d18b6
TS
8118 * c-common.h (c_omp_sharing_predetermined, c_omp_remap_decl):
8119 Remove prototypes.
8120 (record_types_used_by_current_var_decl): Move prototype to where
8121 it belongs.
8122
f6a7cffc
TS
8123 * c-common.c (DEF_FUNCTION_TYPE_0, DEF_FUNCTION_TYPE_6)
8124 (DEF_FUNCTION_TYPE_7, DEF_FUNCTION_TYPE_8)
8125 (DEF_FUNCTION_TYPE_VAR_5): Cosmetic fixes.
8126
632f2871
RS
81272014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
8128
8129 * c-common.h (CTI_VOID_ZERO, void_zero_node): Delete.
8130 * c-common.c (c_common_nodes_and_builtins): Don't initialize
8131 void_zero_node.
8132 * c-pretty-print.c (pp_c_void_constant): New function.
8133 (c_pretty_printer::constant, c_pretty_printer::primary_expression)
8134 (c_pretty_printer::expression): Handle VOID_CST.
8135 * cilk.c (extract_free_variables): Likewise.
8136 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift)
8137 (ubsan_instrument_vla): Use void_node instead of void_zero_node.
8138
766090c2
TS
81392014-05-17 Trevor Saunders <tsaunders@mozilla.com>
8140
8141 * c-common.h (sorted_fields_type): Remove variable_size GTY attribute.
8142 * c-pragma.c (push_alignment): Adjust.
8143 (handle_pragma_push_options): Likewise.
8144
661a0813
MP
81452014-05-09 Marek Polacek <polacek@redhat.com>
8146
8147 PR c/50459
8148 * c-common.c (check_user_alignment): Return -1 if alignment is error
8149 node.
8150 (handle_aligned_attribute): Don't call default_conversion on
8151 FUNCTION_DECLs.
8152 (handle_vector_size_attribute): Likewise.
8153 (handle_tm_wrap_attribute): Handle case when wrap_decl is error node.
8154 (handle_sentinel_attribute): Call default_conversion and allow even
8155 integral types as an argument.
8156
2793eeab
MP
81572014-05-08 Marek Polacek <polacek@redhat.com>
8158
8159 PR c/61053
8160 * c-common.c (min_align_of_type): New function factored out from...
8161 (c_sizeof_or_alignof_type): ...here.
8162 * c-common.h (min_align_of_type): Declare.
8163
f827930a
MP
81642014-05-08 Marek Polacek <polacek@redhat.com>
8165
8166 PR c/61077
8167 * c-common.c (check_main_parameter_types): Warn for _Atomic-qualified
8168 parameter type of main.
8169
ca49b74e
DD
81702014-05-07 DJ Delorie <dj@redhat.com>
8171
8172 * c-cppbuiltin.c (print_bits_of_hex): New.
8173 (builtin_define_type_minmax): Print values using hex so as not to
8174 require a pre-computed list of string values.
8175
1d60af08
KZ
81762014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
8177 Mike Stump <mikestump@comcast.net>
8178 Richard Sandiford <rdsandiford@googlemail.com>
8179
8180 * c-ada-spec.c: Include wide-int.h.
8181 (ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX): Remove.
8182 (dump_generic_ada_node): Use wide-int interfaces.
8183 * c-common.c: Include wide-int-print.h.
8184 (shorten_compare): Use wide-int interfaces and tree_int_cst_lt.
8185 (pointer_int_sum): Use wide-int interfaces.
8186 (c_common_nodes_and_builtins): Use make_int_cst.
8187 (match_case_to_enum_1): Use tree_fits_uhwi_p and tree_fits_shwi_p.
8188 (handle_alloc_size_attribute): Use wide-int interfaces.
8189 (get_nonnull_operand): Likewise.
8190 * c-format.c (get_constant): Use tree_fits_uhwi_p.
8191 * c-lex.c: Include wide-int.h.
8192 (narrowest_unsigned_type): Take a widest_int rather than two
8193 HOST_WIDE_INTs.
8194 (narrowest_signed_type): Likewise.
8195 (interpret_integer): Update accordingly. Use wide-int interfaces.
8196 (lex_charconst): Use wide-int interfaces.
8197 * c-pretty-print.c: Include wide-int.h.
8198 (pp_c_integer_constant): Use wide-int interfaces.
8199 * cilk.c (declare_one_free_variable): Use tree_int_cst_lt instead of
8200 INT_CST_LT_UNSIGNED.
8201
b15458be
RB
82022014-05-06 Richard Biener <rguenther@suse.de>
8203
8204 * c-opts.c (c_common_post_options): For -freestanding,
8205 -fno-hosted and -fno-builtin disable pattern recognition
8206 if not enabled explicitely.
8207
6577374e
MP
82082014-05-02 Marek Polacek <polacek@redhat.com>
8209
8210 * c.opt (Wsizeof-pointer-memaccess): Describe option.
8211
d00887e8
MP
82122014-05-01 Marek Polacek <polacek@redhat.com>
8213
8214 PR c/43245
8215 * c.opt (Wdiscarded-qualifiers): Add.
8216
f8ed5150
MP
82172014-04-30 Marek Polacek <polacek@redhat.com>
8218
8219 * c-ubsan.c (ubsan_instrument_division): Handle REAL_TYPEs. Perform
8220 INT_MIN / -1 sanitization only for integer types.
8221
45484dcf
MP
82222014-04-25 Marek Polacek <polacek@redhat.com>
8223
8224 PR c/18079
8225 * c-common.c (handle_noinline_attribute): Warn if the attribute
8226 conflicts with always_inline attribute.
8227 (handle_always_inline_attribute): Warn if the attribute conflicts
8228 with noinline attribute.
8229
38e514c0
MP
82302014-04-25 Marek Polacek <polacek@redhat.com>
8231
8232 PR c/60156
8233 * c-common.c (check_main_parameter_types): Warn about variadic main.
8234
44875f92
MS
82352014-04-24 Mike Stump <mikestump@comcast.net>
8236
8237 * c.opt (Wshadow-ivar): Default to on.
8238
dcaaa5a0
DP
82392014-04-24 Dimitris Papavasiliou <dpapavas@gmail.com>
8240
8241 * c.opt (Wshadow-ivar, flocal-ivars, fivar-visibility): Add.
8242
c07d7c02
MP
82432014-04-23 Marek Polacek <polacek@redhat.com>
8244
8245 * c-common.c (handle_tm_wrap_attribute): Tweak error message.
8246
1c33c9b7
JJ
82472014-04-22 Jakub Jelinek <jakub@redhat.com>
8248
8249 PR sanitizer/60275
8250 * c-ubsan.c (ubsan_instrument_return): Return __builtin_trap ()
8251 if flag_sanitize_undefined_trap_on_error.
8252 (ubsan_instrument_division, ubsan_instrument_shift,
8253 ubsan_instrument_vla): Likewise. Use __ubsan_handle_*_abort ()
8254 if !flag_sanitize_recover.
8255
793c625f
MG
82562014-04-22 Marc Glisse <marc.glisse@inria.fr>
8257
8258 PR libstdc++/43622
8259 * c-common.c (registered_builtin_types): Make non-static.
8260 * c-common.h (registered_builtin_types): Declare.
8261
b0f1bf36 82622014-04-14 Richard Biener <rguenther@suse.de>
ab20d992 8263 Marc Glisse <marc.glisse@inria.fr>
b0f1bf36
RB
8264
8265 PR c/60819
8266 * c-common.c (convert_vector_to_pointer_for_subscript): Properly
8267 apply may-alias the scalar pointer type when applicable.
8268
3b07fa4a
IZ
82692014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
8270
8271 PR middle-end/60467
8272 * cilk.c (cilk_set_spawn_marker): Remove FUNCTION_DECL
8273 as possible argument for Cilk_spawn.
8274
cbbd2b1c
TB
82752014-04-11 Tobias Burnus <burnus@net-b.de>
8276
8277 PR c/60194
8278 * c.opt (Wformat-signedness): Add
8279 * c-format.c(check_format_types): Use it.
8280
6415bd5d
JM
82812014-04-11 Jason Merrill <jason@redhat.com>
8282
8283 PR c++/57926
8284 * c-common.c (sync_resolve_size, get_atomic_generic_size): Call
8285 default_conversion for an array argument.
8286
6525783a
MP
82872014-04-08 Marek Polacek <polacek@redhat.com>
8288
8289 PR sanitizer/60745
8290 * c-ubsan.c: Include asan.h.
8291 (ubsan_instrument_return): Call initialize_sanitizer_builtins.
8292
880a467b
NS
82932014-04-03 Nathan Sidwell <nathan@codesourcery.com>
8294
8295 * c.opt (Wnon-virtual-dtor): Auto set when Weffc++.
8296
7b59ff2d
MP
82972014-04-02 Marek Polacek <polacek@redhat.com>
8298
8299 * c-common.h (c_expand_expr): Remove declaration.
8300
8edbfaa6
JJ
83012014-03-28 Jakub Jelinek <jakub@redhat.com>
8302
8303 PR c++/60689
8304 * c-common.c (add_atomic_size_parameter): When creating new
8305 params vector, push the size argument first.
8306
07d72e1d
JJ
83072014-03-26 Jakub Jelinek <jakub@redhat.com>
8308
8309 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
8310 ubsan_instrument_vla, ubsan_instrument_return): Adjust
8311 ubsan_create_data callers.
8312
b35e0fa0
JJ
83132014-03-22 Jakub Jelinek <jakub@redhat.com>
8314
8315 PR debug/60603
8316 * c-opts.c (c_finish_options): Restore cb_file_change call to
8317 <built-in>.
8318
39a1ebb3
JJ
83192014-03-13 Jakub Jelinek <jakub@redhat.com>
8320
8321 PR middle-end/36282
8322 * c-pragma.c (apply_pragma_weak): Only look at
8323 TREE_SYMBOL_REFERENCED (DECL_ASSEMBLER_NAME (decl)) if
8324 DECL_ASSEMBLER_NAME_SET_P (decl).
8325 (maybe_apply_pending_pragma_weaks): Exit early if
8326 vec_safe_is_empty (pending_weaks) rather than only when
8327 !pending_weaks.
8328 (maybe_apply_pragma_weak): Likewise. If !DECL_ASSEMBLER_NAME_SET_P,
8329 set assembler name back to NULL afterwards.
8330
a07f6ed2
JM
83312014-03-11 Jason Merrill <jason@redhat.com>
8332
8333 * c.opt: Add -std=gnu++14.
8334
75b107f5
IB
83352014-03-11 Ian Bolton <ian.bolton@arm.com>
8336
8337 * c-opts.c (c_common_post_options): Don't override
8338 -ffp-contract=fast if unsafe-math-optimizations is on.
8339
f42c637e
PM
83402014-03-08 Paulo Matos <paulo@matos-sorge.com>
8341
22b15758 8342 * c.opt: Enable LTO FE for fshort-double.
f42c637e 8343
70e24808
JM
83442014-03-07 Jason Merrill <jason@redhat.com>
8345
8346 * c.opt: Add -std=c++14.
8347
3af9c5e9
MP
83482014-03-06 Marek Polacek <polacek@redhat.com>
8349
8350 PR c/60197
8351 * cilk.c (contains_cilk_spawn_stmt): New function.
8352 (contains_cilk_spawn_stmt_walker): Likewise.
8353 (recognize_spawn): Give error on invalid use of _Cilk_spawn.
8354 * c-common.h (contains_cilk_spawn_stmt): Add declaration.
8355
b3bdf019
JJ
83562014-03-03 Jakub Jelinek <jakub@redhat.com>
8357
8358 * c-pragma.c (c_pp_lookup_pragma): Handle PRAGMA_CILK_SIMD.
8359 (init_pragma): Call cpp_register_deferred_pragma for PRAGMA_CILK_SIMD
8360 even when flag_preprocess_only.
8361
ca7e759d
JM
83622014-02-26 Jason Merrill <jason@redhat.com>
8363
8364 PR c++/59231
8365 PR c++/11586
8366 * c-common.c (shorten_compare): Don't check
8367 c_inhibit_evaluation_warnings.
8368
28e41874
JJ
83692014-02-19 Jakub Jelinek <jakub@redhat.com>
8370
cca615af
JJ
8371 PR c/37743
8372 * c-common.c (c_common_nodes_and_builtins): When initializing
8373 c_uint{16,32,64}_type_node, also set corresponding
8374 uint{16,32,64}_type_node to the same value.
8375
28e41874
JJ
8376 PR c++/60267
8377 * c-pragma.c (init_pragma): Don't call cpp_register_deferred_pragma
8378 for PRAGMA_IVDEP if flag_preprocess_only.
8379
c2bf53a1
JJ
83802014-02-12 Jakub Jelinek <jakub@redhat.com>
8381
8382 PR c/60101
8383 * c-common.c (merge_tlist): If copy is true, call new_tlist,
8384 if false, add ADD itself, rather than vice versa.
8385 (verify_tree): For COND_EXPR, don't call merge_tlist with non-zero
8386 copy. For SAVE_EXPR, only call merge_tlist once.
8387
8fcbce72
JJ
83882014-02-08 Jakub Jelinek <jakub@redhat.com>
8389
8390 PR middle-end/60092
8391 * c-common.c (handle_alloc_size_attribute): Use tree_fits_uhwi_p
8392 and tree_to_uhwi.
8393 (handle_alloc_align_attribute, handle_assume_aligned_attribute): New
8394 functions.
8395 (c_common_attribute_table): Add alloc_align and assume_aligned
8396 attributes.
8397
0a756a3f
MP
83982014-02-06 Marek Polacek <polacek@redhat.com>
8399
8400 PR c/60087
8401 * c-common.c (warn_for_sign_compare): Call warning_at with location
8402 instead of warning.
8403
7ec4847a
MP
84042014-02-05 Marek Polacek <polacek@redhat.com>
8405
8406 PR c/53123
8407 * c-omp.c (c_finish_omp_atomic): Remove unreachable return
8408 statement.
8409
66f20604
MP
84102014-02-04 Marek Polacek <polacek@redhat.com>
8411
8412 PR c/60036
8413 * c-common.c (conversion_warning): Unwrap C_MAYBE_CONST_EXPR and/or
8414 SAVE_EXPR.
8415
5d77fb19
MG
84162014-02-03 Marc Glisse <marc.glisse@inria.fr>
8417
8418 PR c++/53017
8419 PR c++/59211
8420 * c-common.c (handle_aligned_attribute, handle_alloc_size_attribute,
8421 handle_vector_size_attribute, handle_nonnull_attribute): Call
8422 default_conversion on the attribute argument.
8423 (handle_nonnull_attribute): Increment the argument number.
8424
81e5eca8
MP
84252014-01-31 Marek Polacek <polacek@redhat.com>
8426
8427 PR c/59963
8428 * c-common.c (add_atomic_size_parameter): Pass vNULL to
8429 build_function_call_vec.
8430 (resolve_overloaded_builtin): Likewise.
8431 * c-common.h (build_function_call_vec): Adjust declaration.
8432
68fca595
MP
84332014-01-30 Marek Polacek <polacek@redhat.com>
8434
8435 PR c/59940
8436 * c-common.h (unsafe_conversion_p): Adjust declaration.
8437 (warnings_for_convert_and_check): Likewise.
8438 (convert_and_check): Likewise.
8439 * c-common.c (unsafe_conversion_p): Add location parameter. Call
8440 expansion_point_location_if_in_system_header on it.
8441 (warnings_for_convert_and_check): Add location parameter. Call
8442 expansion_point_location_if_in_system_header on it. Use it.
8443 (convert_and_check): Add location parameter. Use it.
8444 (conversion_warning): Likewise.
8445 (c_add_case_label): Adjust convert_and_check calls.
8446 (scalar_to_vector): Adjust unsafe_conversion_p calls.
8447
b72271b9
BI
84482014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
8449
8450 * c-common.c (c_define_builtins): Replaced flag_enable_cilkplus with
8451 flag_cilkplus.
8452 * c-pragma.c (init_pragma): Likewise.
8453 * c.opt: Likewise.
8454
393e8e8b
MP
84552014-01-23 Marek Polacek <polacek@redhat.com>
8456
8457 PR c/59846
8458 * c-common.c (shorten_compare): Add location_t parameter.
8459 * c-common.h (shorten_binary_op): Adjust declaration.
8460
f04dda30
MP
84612014-01-23 Marek Polacek <polacek@redhat.com>
8462
8463 PR c/58346
8464 * c-common.c (pointer_to_zero_sized_aggr_p): New function.
8465 * c-common.h: Declare it.
8466
621955cb
EB
84672014-01-20 Eric Botcazou <ebotcazou@adacore.com>
8468
8469 * c-ada-spec.h (dump_ada_specs): Revert prototype change.
8470 * c-ada-spec.c (dump_ads): Likewise.
8471 (cpp_check): Likewise.
8472 (dump_ada_specs): Likewise.
8473
84742014-01-15 Laurent Alfonsi <laurent.alfonsi@st.com>
67bf2939
LA
8475
8476 PR c++/49718
8477 * c-common.c (handle_no_instrument_function_attribute): Allow
8478 no_instrument_function attribute in class member
8479 definition/declaration.
8480
241f845a
JJ
84812014-01-15 Jakub Jelinek <jakub@redhat.com>
8482
8483 PR c/58943
8484 * c-omp.c (c_finish_omp_atomic): Set in_late_binary_op around
8485 build_modify_expr with non-NOP_EXPR opcode. Handle return from it
8486 being COMPOUND_EXPR.
8487 (c_finish_omp_for): Handle incr being COMPOUND_EXPR with first
8488 operand a SAVE_EXPR and second MODIFY_EXPR.
8489
e83b8e2e
JJ
84902014-01-09 Jakub Jelinek <jakub@redhat.com>
8491
8492 PR target/58115
8493 * c-pch.c (c_common_write_pch): Call
8494 prepare_target_option_nodes_for_pch.
8495
23a5b65a
RS
84962014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
8497
8498 Update copyright years
8499
f9030485
RS
85002014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
8501
8502 * array-notation-common.c, c-cilkplus.c: Use the standard form for
8503 the copyright notice.
8504
f2aa696b
EB
85052013-12-28 Eric Botcazou <ebotcazou@adacore.com>
8506
8507 * c-ada-spec.c (print_constructor): New function.
8508 (print_destructor): Retrieve the origin of the destructor.
8509 (print_ada_declaration): Revamp handling of constructors/destructors.
8510
3f8257db 85112013-12-23 Stuart Hastings <stuart@apple.com>
1f26ac87
JM
8512 Bill Maddox <maddox@google.com>
8513 Jason Merrill <jason@redhat.com>
8514
8515 * c.opt: Add -fdeclone-ctor-dtor.
8516 * c-opts.c (c_common_post_options): Default to on iff -Os.
8517
41958c28
BI
85182013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
8519
8520 * c-common.c (c_common_attribute_table): Added "cilk simd function"
8521 attribute.
8522 * c-pragma.h (enum pragma_cilk_clause): Remove.
ab20d992 8523 (enum pragma_omp_clause): Added the following fields:
41958c28
BI
8524 PRAGMA_CILK_CLAUSE_NOMASK, PRAGMA_CILK_CLAUSE_MASK,
8525 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_NONE,
8526 PRAGMA_CILK_CLAUSE_LINEAR, PRAGMA_CILK_CLAUSE_PRIVATE,
8527 PRAGMA_CILK_CLAUSE_FIRSTPRIVATE, PRAGMA_CILK_CLAUSE_LASTPRIVATE,
8528 PRAGMA_CILK_CLAUSE_UNIFORM.
8529
b1726d6c 8530
12893402
BI
85312013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
8532
8533 * cilk.c (cilk_outline): Made this function non-static.
8534 (gimplify_cilk_spawn): Removed pre_p and post_p arguments.
8535 (create_cilk_wrapper): Added a new parameter: a function pointer.
8536 (c_install_body_w_frame_cleanup): Remove
8537 (extract_free_variables): Added VEC_INIT_EXPR and CONSTRUCTOR case.
8538 * c-common.h (cilk_outline): New prototype.
8539 (gimplify_cilk_spawn): Removed two parameters.
8540 (cilk_install_body_with_frame_cleanup): New prototype.
8541 * c-gimplify.c (c_gimplify_expr): Added MODIFY_EXPR, CALL_EXPR and
8542 CILK_SPAWN_STMT case.
8543
085b42ed
BS
85442013-12-11 Bernd Schmidt <bernds@codesourcery.com>
8545
2ce064c3
BS
8546 * c-common.c (c_fully_fold_internal): Handle ADDR_SPACE_CONVERT_EXPR.
8547
085b42ed
BS
8548 * c-common.h (enum c_tree_index): Remove CTI_INT_ARRAY_TYPE.
8549 (int_array_type_node): Remove.
8550 * c-common.c (c_common_nodes_and_builtins): Don't build it.
8551
9e36c9ed
MP
85522013-12-05 Marek Polacek <polacek@redhat.com>
8553
8554 PR c/52023
8555 * c-common.c (c_sizeof_or_alignof_type): Move a declaration into
8556 [ADJUST_FIELD_ALIGN].
8557
296674db
JM
85582013-12-04 Joseph Myers <joseph@codesourcery.com>
8559
8560 PR c/52023
8561 * c-common.c (c_sizeof_or_alignof_type): Add parameter min_alignof
8562 and check field alignment if set.
8563 * c-common.h (c_sizeof_or_alignof_type): Update prototype.
8564 (c_sizeof, c_alignof): Update calls to c_sizeof_or_alignof_type.
8565
b1726d6c 85662013-12-04 Jakub Jelinek <jakub@redhat.com>
31e071ae
MP
8567 Marek Polacek <polacek@redhat.com>
8568
8569 * c-gimplify.c (c_gimplify_expr): If doing the integer-overflow
8570 sanitization, call unsigned_type_for only when !TYPE_OVERFLOW_WRAPS.
8571
d7947e19
L
85722013-11-29 H.J. Lu <hongjiu.lu@intel.com>
8573
8574 PR c/59309
8575 * cilk.c (gimplify_cilk_spawn): Properly handle function without
8576 arguments.
8577
fad7652e
JJ
85782013-11-29 Jakub Jelinek <jakub@redhat.com>
8579
8580 PR c/59280
8581 * c-common.c (get_priority): If TREE_VALUE (args) is IDENTIFIER_NODE,
8582 goto invalid. If it is error_mark_node, don't issue further
8583 diagnostics.
8584
8b5e1202
SO
85852013-11-28 Sergey Ostanevich <sergos.gnu@gmail.com>
8586
8587 * c.opt (Wopenmp-simd): New.
8588
0a508bb6
JJ
85892013-11-22 Jakub Jelinek <jakub@redhat.com>
8590
8591 * c-ubsan.h (ubsan_instrument_return): New prototype.
8592 * c-ubsan.c (ubsan_instrument_return): New function.
8593
2fb9a547
AM
85942013-11-22 Andrew MacLeod <amacleod@redhat.com>
8595
8596 * c-common.c: Add required include files from gimple.h.
ab20d992
JJ
8597 * c-gimplify.c: Likewise.
8598 * cilk.c: Likewise.
2fb9a547 8599
8400e75e
DM
86002013-11-22 David Malcolm <dmalcolm@redhat.com>
8601
8602 * c-common.c (unsafe_conversion_p): Remove use of
8603 EXPR_LOC_OR_HERE macro.
8604 (conversion_warning): Likewise.
8605 (warnings_for_convert_and_check): Likewise.
8606 (warn_for_collisions_1): Likewise.
8607 (shorten_compare): Likewise, and remove use of in_system_header
8608 macro, using the location from the former.
8609 * c-lex.c (dump_one_header): Remove use of input_filename macro.
8610 (cb_def_pragma): Remove use of in_system_header macro.
8611 (lex_string): Likewise.
8612 * c-pragma.c (handle_pragma_float_const_decimal64): Likewise.
8613
eb1ce453
KZ
86142013-11-20 Kenneth Zadeck <zadeck@naturalbridge.com>
8615 Mike Stump <mikestump@comcast.net>
8616 Richard Sandiford <rdsandiford@googlemail.com>
8617
8618 * c-ada-spec.c (is_simple_enum): Use tree_to_shwi and tree_to_uhwi
8619 instead of TREE_INT_CST_LOW, in cases where there is a protecting
8620 tree_fits_shwi_p or tree_fits_uhwi_p.
8621 (dump_generic_ada_node): Likewise.
8622 * c-format.c (check_format_arg): Likewise.
8623 * c-pretty-print.c (pp_c_integer_constant): Likewise.
8624
6b3b8c27
KZ
86252013-11-20 Kenneth Zadeck <zadeck@naturalbridge.com>
8626
8627 * c-common.c (check_function_arguments_recurse): Use tree_to_uhwi.
8628
49b0aa18
JC
86292013-11-19 Joshua J Cogliati <jrincayc@yahoo.com>
8630
8631 PR c/53001
8632 * c-common.c (unsafe_conversion_p): Make this function
8633 return an enumeration with more detail.
8634 (conversion_warning): Use the new return type of
8635 unsafe_conversion_p to separately warn either about conversions
8636 that lower floating point number precision or about the other
8637 kinds of conversions.
8638 * c-common.h (enum conversion_safety): New enumeration.
8e745a17
JJ
8639 (unsafe_conversion_p): switching return type to
8640 conversion_safety enumeration.
49b0aa18
JC
8641 * c.opt: Adding new warning -Wfloat-conversion and
8642 enabling it with -Wconversion.
8643
b826515a
BS
86442013-11-19 Basile Starynkevitch <basile@starynkevitch.net>
8645
8e745a17
JJ
8646 * c-opts.c: Include plugin.h.
8647 (cb_file_change): Invoke plugin event PLUGIN_INCLUDE_FILE.
b826515a 8648
b9a55b13
MP
86492013-11-19 Marek Polacek <polacek@redhat.com>
8650
8651 * c-ubsan.c (ubsan_instrument_division): Adjust ubsan_create_data
8652 call.
8653 (ubsan_instrument_shift): Likewise.
8654 (ubsan_instrument_vla): Likewise.
8655
7d362f6c
RS
86562013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
8657
8658 * c-common.c (convert_vector_to_pointer_for_subscript): Remove
8659 cast to unsigned type.
8660
386b1f1f
RS
86612013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
8662
8663 * c-common.c (fold_offsetof_1): Use tree_to_uhwi rather than
8664 tree_low_cst.
8665 (complete_array_type): Update comment to refer to tree_to_[su]hwi
8666 rather than tree_low_cst.
8667
ae7e9ddd
RS
86682013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
8669
8670 * c-common.c, c-cppbuiltin.c: Replace tree_low_cst (..., 1) with
8671 tree_to_uhwi throughout.
8672
9439e9a1
RS
86732013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
8674
8675 * c-common.c, c-format.c, c-omp.c, c-pretty-print.c: Replace
8676 tree_low_cst (..., 0) with tree_to_shwi throughout.
8677
cc269bb6
RS
86782013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
8679
8680 * c-ada-spec.c, c-common.c, c-pretty-print.c: Replace
8681 host_integerp (..., 1) with tree_fits_uhwi_p throughout.
8682
9541ffee
RS
86832013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
8684
8685 * c-ada-spec.c, c-common.c, c-format.c, c-pretty-print.c: Replace
8686 host_integerp (..., 0) with tree_fits_shwi_p throughout.
8687
c02065fc
AH
86882013-11-15 Aldy Hernandez <aldyh@redhat.com>
8689
8690 * c-cilkplus.c: New file.
8691 * c-common.c (readonly_error): Add location argument.
8692 * c-common.h (readonly_error): Same.
8693 (c_finish_cilk_clauses): Protoize.
8694 (c_check_cilk_loop): Same.
8695 c-omp.c (c_finish_omp_for): Handle CILK_SIMD nodes.
8696 Do not fail on error_mark_node.
8697 Abstract increment canonicalization to here...
8698 (c_omp_for_incr_canonicalize_ptr): New.
8699 c-pragma.c (init_pragma): Register "simd" pragma.
8700 c-pragma.h (enum pragma_kind): Add PRAGMA_CILK_SIMD.
8701 (enum pragma_cilk_clause): New.
8702
9cc65f15
RS
87032013-11-15 Richard Sandiford <rdsandiford@googlemail.com>
8704
8705 * c-pretty-print.c (pp_c_character_constant): Remove unnecessary
8706 wchar_type and host_integerp checks.
8707
18f429e2
AM
87082013-11-14 Andrew MacLeod <amacleod@redhat.com>
8709
8710 * c-common.c: Likewise.
8711 * c-gimplify.c: Likewise.
8712 * cilk.c: Likewise.
8713
d8a2d370
DN
87142013-11-14 Diego Novillo <dnovillo@google.com>
8715
8716 * c-common.c: Include fold-const.h.
8717 Include stor-layout.h.
8718 Include calls.h.
8719 Include stringpool.h.
8720 Include attribs.h.
8721 Include varasm.h.
8722 Include trans-mem.h.
8723 * c-cppbuiltin.c: Include stor-layout.h.
8724 Include stringpool.h.
8725 * c-format.c: Include stringpool.h.
8726 * c-lex.c: Include stringpool.h.
8727 Include stor-layout.h.
8728 * c-pragma.c: Include stringpool.h.
8729 Include attribs.h.
8730 Include varasm.h.
8731 Include gcc-symtab.h.
8732 * c-pretty-print.c: Include stor-layout.h.
8733 Include attribs.h.
8734 * cilk.c: Include stringpool.h.
8735 Include calls.h.
8736
38b7bc7f
JM
87372013-11-13 Joseph Myers <joseph@codesourcery.com>
8738
8739 * c-common.h (enum rid): Add RID_AUTO_TYPE.
8740 * c-common.c (c_common_reswords): Add __auto_type.
8741 (keyword_begins_type_specifier): Handle RID_AUTO_TYPE.
8742
45b0be94
AM
87432013-11-12 Andrew MacLeod <amacleod@redhat.com>
8744
18f429e2
AM
8745 * c-common.c: Include gimplify.h.
8746 * c-gimplify.c: Likewise.
8747 * cilk.c: Likewise.
8748 * c-omp.c: Include gimple-expr.h instead of gimple.h.
8749 * c-ubsan.c: Don't include gimple.h.
45b0be94 8750
582d9b50
JM
87512013-11-12 Joseph Myers <joseph@codesourcery.com>
8752
8753 * c-common.c (c_common_reswords): Add _Thread_local.
8754
6b28e197
JM
87552013-11-09 Joseph Myers <joseph@codesourcery.com>
8756
8757 * c-common.c (atomic_size_supported_p): New function.
8758 (resolve_overloaded_atomic_exchange)
8759 (resolve_overloaded_atomic_compare_exchange)
8760 (resolve_overloaded_atomic_load, resolve_overloaded_atomic_store):
8761 Use it instead of comparing size with a local list of sizes.
8762
267bac10
JM
87632013-11-07 Andrew MacLeod <amacleod@redhat.com>
8764 Joseph Myers <joseph@codesourcery.com>
8765
8766 * c-common.h (enum rid): Add RID_ATOMIC.
8767 * c-common.c (c_common_reswords): Add _Atomic.
8768 (sync_resolve_params): Use TYPE_MAIN_VARIANT on pointer argument.
8769 (keyword_is_type_qualifier): Accept RID_ATOMIC.
8770 * c-format.c (check_format_types): Check for extra _Atomic
8771 qualifiers in format argument.
8772 * c-pretty-print.c (pp_c_cv_qualifiers): Handle atomic qualifier.
8773 (pp_c_type_qualifier_list): Mention _Atomic in comment.
8774
5157b91e
TB
87752013-11-06 Tobias Burnus <burnus@net-b.de>
8776
8777 * c-common.c (reason_option_codes_t): Add CPP_W_DATE_TIME.
8778
6dbe0958
JM
87792013-11-06 Joseph Myers <joseph@codesourcery.com>
8780
8781 * c-opts.c (c_common_post_options): Set -ffp-contract=off in C
8782 standards modes.
8783 * c-cppbuiltin.c (cpp_iec_559_value): Consider -ffp-contract=fast
8784 to mean lack of IEEE 754 support.
8785
e8ff5196
TB
87862013-11-05 Tobias Burnus <burnus@net-b.de>
8787
8788 * c.opt (-Wdate-time): New option
8789 * c-opts.c (sanitize_cpp_opts): Pass on to libcpp.
8790
254a0760
JM
87912013-11-05 Joseph Myers <joseph@codesourcery.com>
8792
8793 * c-cppbuiltin.c (cpp_iec_559_value): Test
8794 flag_excess_precision_cmdline not flag_excess_precision.
8795
6d7f7e0a
TB
87962013-11-05 Tobias Burnus <burnus@net-b.de>
8797
8798 * c.opt (fopenmp-simd): New option.
8799 * c-pragma.c (omp_pragmas): Move pragmas which can contain simd to ...
8800 (omp_pragmas): ... this new struct.
8801 (c_pp_lookup_pragma): Also walk omp_pragmas.
8802 (init_pragma): Init pragmas for -fopenmp-simd.
8803
55a7f02f
MP
88042013-11-04 Marek Polacek <polacek@redhat.com>
8805
8806 PR c++/58979
8807 * c-common.c (invalid_indirection_error): Handle RO_ARROW_STAR case.
8808
9193fb05
JM
88092013-11-04 Joseph Myers <joseph@codesourcery.com>
8810
8811 * c-cppbuiltin.c (cpp_iec_559_value, cpp_iec_559_complex_value):
8812 New functions.
8813 (c_cpp_builtins): Define __GCC_IEC_559 and __GCC_IEC_559_COMPLEX.
8814
94159ecf
EB
88152013-11-04 Eric Botcazou <ebotcazou@adacore.com>
8816
8817 * c-ada-spec.h (cpp_operation): Add IS_TRIVIAL.
8818 (dump_ada_specs): Adjust prototype of second callback.
8819 * c-ada-spec.c (cpp_check): New global variable.
8820 (dump_ada_nodes): Remove cpp_check parameter and do not pass it down.
8821 (print_generic_ada_decl): Likewise.
8822 (has_static_fields): Change return type to bool and add guard.
8823 (has_nontrivial_methods): New predicate.
8824 (is_tagged_type): Change return type to bool.
8825 (separate_class_package): Call has_nontrivial_methods.
8826 (pp_ada_tree_identifier): Minor tweaks.
8827 (dump_ada_function_declaration): Adjust calls to dump_generic_ada_node.
8828 (dump_ada_array_domains): Likewise.
8829 (dump_ada_array_type): Likewise.
8830 (dump_template_types): Remove cpp_check parameter and do not pass it to
8831 dump_generic_ada_node.
8832 (dump_ada_template): Likewise.
8833 (dump_generic_ada_node): Remove cpp_check parameter and do not pass it
8834 recursively.
8835 (print_ada_methods): Change return type to integer. Remove cpp_check
8836 parameter and do not pass it down.
8837 (dump_nested_types): Remove cpp_check parameter and do not pass it to
8838 dump_generic_ada_node.
8839 (print_ada_declaration): Likewise. Test RECORD_OR_UNION_TYPE_P before
8840 accessing methods.
8841 (print_ada_struct_decl): Remove cpp_check parameter and do not pass it
8842 down. Use has_nontrivial_methods to recognize C++ classes. Use return
8843 value of print_ada_methods.
8844 (dump_ads): Rename cpp_check parameter to check and adjust prototype.
8845 Set cpp_check to it before invoking dump_ada_nodes.
8846 (dump_ada_specs): Likewise.
8847
b906f4ca
MP
88482013-11-03 Marek Polacek <polacek@redhat.com>
8849
8850 * c-ubsan.c: Don't include hash-table.h.
8851 (ubsan_instrument_vla): New function.
8852 * c-ubsan.h: Declare it.
8853
5e20cdc9
DM
88542013-10-31 David Malcolm <dmalcolm@redhat.com>
8855
8856 Automated part of renaming of symtab_node_base to symtab_node.
8857
8858 Patch autogenerated by rename_symtab.py from
8859 https://github.com/davidmalcolm/gcc-refactoring-scripts
8860 revision 58bb219cc090b2f4516a9297d868c245495ee622
8861
8862 * c-pragma.c (maybe_apply_pending_pragma_weaks): Rename
8863 symtab_node_base to symtab_node.
8864
7057e645
ESR
88652013-10-31 Edward Smith-Rowland <3dw4rd@verizon.net>
8866
8e745a17 8867 Implement C++14 digit separators.
7057e645
ESR
8868 * c-lex.c (interpret_float): Remove digit separators from scratch string
8869 before building real literal.
8870
193ea7bc
JJ
88712013-10-30 Jakub Jelinek <jakub@redhat.com>
8872
8873 * cilk.c (create_cilk_helper_decl): Use HOST_WIDE_INT_PRINT_DEC.
8874
939b37da
BI
88752013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
8876
8877 * c-common.c (c_common_reswords[]): Added _Cilk_spawn and _Cilk_sync
8878 fields.
8879 (c_define_builtins): Called cilk_init_builtins if Cilk Plus is
8880 enabled.
8881 * c-common.h (enum rid): Added RID_CILK_SPAWN and RID_CILK_SYNC.
8882 (insert_cilk_frame): New prototype.
8883 (cilk_init_builtins): Likewise.
8884 (gimplify_cilk_spawn): Likewise.
8885 (c_cilk_install_body_w_frame_cleanup): Likewise.
8886 (cilk_detect_spawn_and_unwrap): Likewise.
8887 (cilk_set_spawn_marker): Likewise.
8888 (build_cilk_sync): Likewise.
8889 (build_cilk_spawn): Likewise.
8890 * cilk.c: New file.
8891
67348ccc
DM
88922013-10-29 David Malcolm <dmalcolm@redhat.com>
8893
8894 Patch autogenerated by refactor_symtab.py from
8895 https://github.com/davidmalcolm/gcc-refactoring-scripts
8896 revision 58bb219cc090b2f4516a9297d868c245495ee622
8897
8898 * c-gimplify.c (c_genericize): Update for conversion of symtab types
8899 to a true class hierarchy.
8900 * c-pragma.c (maybe_apply_pending_pragma_weaks): Likewise.
8901
d570872d
RS
89022013-10-27 Richard Sandiford <rdsandiford@googlemail.com>
8903
8904 * c-lex.c (interpret_integer): Remove call to cpp_num_sign_extend.
8905
98906124
JL
89062013-10-26 Jeff Law <law@redhat.com>
8907
adfac8df
JJ
8908 * c-common.c (c_define_builtins): Remove mudflap support.
8909 * c.opt: Ignore and warn for mudflap options.
98906124 8910
d73749df 89112013-10-24 Tobias Burnus <burnus@net-b.de>
8170608b
TB
8912
8913 PR other/33426
8914 * c-pragma.c (init_pragma) Add #pragma ivdep handling.
8915 * c-pragma.h (pragma_kind): Add PRAGMA_IVDEP.
8916
3f04b1bb
JM
89172013-10-23 Jason Merrill <jason@redhat.com>
8918
8919 * c-format.c (gcc_cxxdiag_char_table): Add %X.
8920
acf0174b
JJ
89212013-10-11 Jakub Jelinek <jakub@redhat.com>
8922
acd15a28
JJ
8923 * c-common.h (omp_clause_mask::operator !=): New method.
8924 * c-omp.c (c_omp_split_clauses): Use if ((mask & something) != 0)
8925 instead of if (mask & something) tests everywhere.
8926
acf0174b
JJ
8927 * c-cppbuiltin.c (c_cpp_builtins): Predefine _OPENMP to
8928 201307 instead of 201107.
8929 * c-common.c (DEF_FUNCTION_TYPE_8): Define.
8930 (c_common_attribute_table): Add "omp declare target" and
8931 "omp declare simd" attributes.
8932 (handle_omp_declare_target_attribute,
8933 handle_omp_declare_simd_attribute): New functions.
8934 * c-omp.c: Include c-pragma.h.
8935 (c_finish_omp_taskgroup): New function.
8936 (c_finish_omp_atomic): Add swapped argument, if true,
8937 build the operation first with rhs, lhs arguments and use NOP_EXPR
8938 build_modify_expr.
8939 (c_finish_omp_for): Add code argument, pass it down to make_code.
8940 (c_omp_split_clauses): New function.
8941 (c_split_parallel_clauses): Removed.
8942 (c_omp_declare_simd_clause_cmp, c_omp_declare_simd_clauses_to_numbers,
8943 c_omp_declare_simd_clauses_to_decls): New functions.
8944 * c-common.h (omp_clause_mask): New type.
8945 (OMP_CLAUSE_MASK_1): Define.
8946 (omp_clause_mask::omp_clause_mask, omp_clause_mask::operator &=,
8947 omp_clause_mask::operator |=, omp_clause_mask::operator ~,
8948 omp_clause_mask::operator |, omp_clause_mask::operator &,
8949 omp_clause_mask::operator <<, omp_clause_mask::operator >>,
8950 omp_clause_mask::operator ==): New methods.
8951 (enum c_omp_clause_split): New.
8952 (c_finish_omp_taskgroup): New prototype.
8953 (c_finish_omp_atomic): Add swapped argument.
8954 (c_finish_omp_for): Add code argument.
8955 (c_omp_split_clauses): New prototype.
8956 (c_split_parallel_clauses): Removed.
8957 (c_omp_declare_simd_clauses_to_numbers,
8958 c_omp_declare_simd_clauses_to_decls): New prototypes.
8959 * c-pragma.c (omp_pragmas): Add new OpenMP 4.0 constructs.
8960 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_CANCEL,
8961 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_DECLARE_REDUCTION,
8962 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_SIMD,
8963 PRAGMA_OMP_TARGET, PRAGMA_OMP_TASKGROUP and PRAGMA_OMP_TEAMS.
8964 Remove PRAGMA_OMP_PARALLEL_FOR and PRAGMA_OMP_PARALLEL_SECTIONS.
8965 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_ALIGNED,
8966 PRAGMA_OMP_CLAUSE_DEPEND, PRAGMA_OMP_CLAUSE_DEVICE,
8967 PRAGMA_OMP_CLAUSE_DIST_SCHEDULE, PRAGMA_OMP_CLAUSE_FOR,
8968 PRAGMA_OMP_CLAUSE_FROM, PRAGMA_OMP_CLAUSE_INBRANCH,
8969 PRAGMA_OMP_CLAUSE_LINEAR, PRAGMA_OMP_CLAUSE_MAP,
8970 PRAGMA_OMP_CLAUSE_NOTINBRANCH, PRAGMA_OMP_CLAUSE_NUM_TEAMS,
8971 PRAGMA_OMP_CLAUSE_PARALLEL, PRAGMA_OMP_CLAUSE_PROC_BIND,
8972 PRAGMA_OMP_CLAUSE_SAFELEN, PRAGMA_OMP_CLAUSE_SECTIONS,
8973 PRAGMA_OMP_CLAUSE_SIMDLEN, PRAGMA_OMP_CLAUSE_TASKGROUP,
8974 PRAGMA_OMP_CLAUSE_THREAD_LIMIT, PRAGMA_OMP_CLAUSE_TO and
8975 PRAGMA_OMP_CLAUSE_UNIFORM.
8976
826cacfe
MG
89772013-10-09 Marc Glisse <marc.glisse@inria.fr>
8978
8979 PR tree-optimization/20318
8980 * c-common.c (handle_returns_nonnull_attribute): New function.
8981 (c_common_attribute_table): Add returns_nonnull.
8982
2284b034
MG
89832013-10-03 Marc Glisse <marc.glisse@inria.fr>
8984
8985 PR c++/19476
8986 * c.opt (fcheck-new): Move to common.opt.
8987
b56e9788
MP
89882013-09-25 Marek Polacek <polacek@redhat.com>
8989 Jakub Jelinek <jakub@redhat.com>
8990
8991 PR sanitizer/58413
8992 * c-ubsan.c (ubsan_instrument_shift): Don't instrument
8993 an expression if we can prove it is correct.
8994 (ubsan_instrument_division): Likewise. Remove unnecessary
8995 check.
8996
ce6923c5
MP
89972013-09-18 Marek Polacek <polacek@redhat.com>
8998
8999 PR sanitizer/58411
9000 * c-common.c (handle_no_sanitize_undefined_attribute): New function.
9001 Declare it.
9002 (struct attribute_spec c_common_att): Add no_sanitize_undefined.
9003
fb5610fb
IS
90042013-09-14 Iain Sandoe <iain@codesourcery.com>
9005
9006 PR target/48094
9007 * c.opt (fgnu-runtime, fnext-runtime, fobjc-abi-version,
9008 fobjc-gc, freplace-objc-classes): Accept for LTO.
9009
88b0e79e
JC
90102013-09-13 Jacek Caban <jacek@codeweavers.com>
9011
9012 * c-target.def: New hook
9013
c9b0866a
PC
90142013-09-09 Paolo Carlini <paolo.carlini@oracle.com>
9015
9016 PR c++/43452
9017 * c.opt (Wdelete-incomplete): Add.
9018
0af94e6f
JR
90192013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
9020
9021 * c-common.c (same_scalar_type_ignoring_signedness): Delete.
9022 (vector_types_compatible_elements_p): New function.
9023 * c-common.h: (same_scalar_type_ignoring_signedness): Delete
9024 declaration.
9025 (vector_types_compatible_elements_p): Declare.
9026
7c26172c
GDR
90272013-09-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
9028
9029 * c-pretty-print.h (c_pretty_printer::simple_type_specifier): Now
9030 a virtual member function.
9031 (pp_simple_type_specifier): Remove.
9032 (pp_c_type_specifier): Likewise.
9033 * c-pretty-print.c (c_pretty_printer::simple_type_specifier):
9034 Rename from pp_c_type_specifier. Adjust.
9035 (c_pretty_printer::c_pretty_printer): Do not assign to
9036 simple_type_specifier.
9037
20059c8b
GDR
90382013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
9039
9040 * c-pretty-print.h (c_pretty_printer::type_id): Now a virtual
9041 member function.
9042 (c_pretty_printer::storage_class_specifier): Likewise.
9043 (c_pretty_printer::initializer): Likewise.
9044 (pp_declaration): Remove.
9045 (pp_declaration_specifiers): Likewise.
9046 (pp_abstract_declarator): Likewise.
9047 (pp_declarator): Likewise.
9048 (pp_type_id): Likewise.
9049 (pp_statement): Likewise.
9050 (pp_constant): Likewise.
9051 (pp_id_expression): Likewise.
9052 (pp_primary_expression): Likewise.
9053 (pp_unary_expression): Likewise.
9054 (pp_multiplicative_expression): Likewise.
9055 (pp_conditional_expression): Likewise.
9056 (pp_assignment_expression): Likewise.
9057 (pp_expression): Likewise.
9058 (pp_c_type_id): Likewise.
9059 (pp_c_storage_class_specifier): Likewise.
9060 * c-pretty-print.c (pp_c_type_cast): Tidy.
9061 (pp_c_pointer): Likewise.
9062 (pp_c_type_specifier): Likewise.
9063 (pp_c_parameter_type_list): Likewise.
9064 (pp_c_function_definition): Likewise.
9065 (pp_c_init_declarator): Likewise.
9066 (pp_c_initializer_list): Likewise.
9067 (pp_c_constructor_elts): Likewise.
9068 (c_pretty_printer::direct_abstract_declarator): Likewise.
9069 (c_pretty_printer::declaration_specifiers): Likewise.
9070 (c_pretty_printer::primary_expression): Likewise.
9071 (c_pretty_printer::postfix_expression): Likewise.
9072 (c_pretty_printer::type_id): Rename from pp_c_type_id.
9073 (c_pretty_printer::storage_class_specifier): Rename from
9074 pp_c_storage_class_specifier.
9075 (c_pretty_printer::initializer): Rename from pp_c_initializer.
9076 (c_pretty_printer::c_pretty_printer): Do not assign to type_id,
9077 storage_class_specifier, initializer, offset_list, flags.
9078
de5a5fa1
MP
90792013-08-30 Marek Polacek <polacek@redhat.com>
9080
9081 * c-ubsan.c: New file.
9082 * c-ubsan.h: New file.
9083
8f0e4d72
GDR
90842013-08-30 Gabriel Dos Reis <gdr@integrable-solutions.net>
9085
9086 * c-pretty-print.h (c_pretty_printer::declaration): Now a virtual
9087 member function.
9088 (c_pretty_printer::declaration_specifiers): Likewise.
9089 (c_pretty_printer::declarator): Likewise.
9090 (c_pretty_printer::abstract_declarator): Likewise.
9091 (c_pretty_printer::direct_abstract_declarator): Likewise.
9092 (c_pretty_printer::direct_declarator): Likewise.
9093 (c_pretty_printer::function_specifier): Likewise.
9094 (pp_declaration): Adjust.
9095 (pp_declaration_specifiers): Likewise.
9096 (pp_abstract_declarator): Likewise.
9097 (pp_direct_declarator): Likewise.
9098 (pp_function_specifier): Likewise.
9099 (pp_direct_abstract_declarator): Remove as unused.
9100 (pp_c_declaration): Remove.
9101 (pp_c_declaration_specifiers): Likewise.
9102 (pp_c_declarator): Likewise.
9103 (pp_c_direct_declarator): Likewise.
9104 (pp_c_function_specifier): Likewise.
9105 (pp_c_direct_abstract_declarator): Likewise.
9106 * c-pretty-print.c (c_pretty_printer::abstract_declarator): Rename
9107 from pp_c_abstract_declarator. Adjust.
ab20d992 9108 (c_pretty_printer::direct_abstract_declarator): Rename from
8f0e4d72
GDR
9109 pp_c_direct_abstract_declarator. Adjust.
9110 (c_pretty_printer::function_specifier): Rename from
9111 pp_c_function_specifier. Adjust.
9112 (c_pretty_printer::declaration_specifiers): Rename from
9113 pp_c_declaration_specifiers. Adjust.
9114 (c_pretty_printer::direct_declarator): Rename from
9115 pp_c_direct_declarator. Adjust.
9116 (c_pretty_printer::declarator): Rename from pp_c_declarator. Adjust.
9117 (c_pretty_printer::declaration): Rename from pp_c_declaration. Adjust.
9118 (c_pretty_printer::c_pretty_printer): Do not assign to
9119 declaration, declaration_specifiers, declarator,
9120 direct_declarator, direct_abstract_declarator, function_specifier.
9121
00d34d3a
GDR
91222013-08-26 Gabriel Dos Reis <gdre@integrable-solutions.net>
9123
9124 * c-pretty-print.h (c_pretty_printer::unary_expression): Now a
9125 virtual member function.
9126 (c_pretty_printer::multiplicative_expression): Likewise.
9127 (c_pretty_printer::conditional_expression): Likewise.
9128 (c_pretty_printer::assignment_expression): Likewise.
9129 (c_pretty_printer::expression): Likewise.
9130 (pp_unary_expression): Adjust.
9131 (pp_multiplicative_expression): Likewise.
9132 (pp_assignment_expression): Likewise.
9133 (pp_conditional_expression): Likewise.
9134 (pp_expression): Likewise.
9135 * c-pretty-print.c (c_pretty_printer::unary_expression): Rename
9136 from pp_c_unary_expression. Adjust.
9137 (c_pretty_printer::multiplicative_expression): Rename from
9138 pp_c_multiplicative_expression. Adjust.
9139 (c_pretty_printer::conditional_expression): Rename from
9140 pp_c_conditional_expression. Adjust.
9141 (c_pretty_printer::assignment_expression): Rename from
9142 pp_c_assignment_expression. Adjust.
9143 (c_pretty_printer::expression): Rename from pp_c_expression. Adjust.
9144 (c_pretty_printer::c_pretty_printer): Do not assign to
9145 unary_expression, multiplicative_expression,
9146 conditional_expression, expression.
9147
fb22178f
GDR
91482013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
9149
9150 * c-pretty-print.h (c_pretty_printer::postfix_expression): Now a
9151 virtual member function.
9152 (pp_postfix_expression): Adjust.
9153 (pp_c_postfix_expression): Remove.
9154 * c-pretty-print.c (c_pretty_printer::postfix_expression): Rename
9155 from pp_c_postfix_expression. Adjust.
9156 (c_pretty_printer::c_pretty_printer): Do not assign to
9157 postfix_expression.
9158
7ecc2600
GDR
91592013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
9160
9161 * c-pretty-print.h (c_pretty_printer::primary_expression): Now a
9162 virtua member function.
9163 (pp_primary_expression): Adjust.
9164 (pp_c_primary_expression): Remove.
9165 * c-pretty-print.c (c_pretty_printer::primary_expression): Rename
9166 from pp_c_primary_expression. Adjust.
9167 (pp_c_initializer_list): Use pp_primary_expression.
9168 (c_pretty_printer::c_pretty_printer): Do not assign to
9169 primary_expression.
9170
0691175f
GDR
91712013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
9172
9173 * c-pretty-print.h (c_pretty_printer::translate_string): Declare.
9174 * c-pretty-print.c (M_): Remove.
9175 (c_pretty_printer::translate_string): Define.
9176 (pp_c_type_specifier): Use it.
9177 (pp_c_primary_expression): Likewise.
9178 (pp_c_expression): Likewise.
9179
66dfe4c4
GDR
91802013-08-24 Gabriel Dos Reis <gdr@integrable-solutions.net>
9181
9182 * c-pretty-print.h (c_pretty_printer::id_expression): Now a
9183 virtual function.
9184 (pp_c_id_expression): Remove.
9185 (pp_id_expression): Adjust.
9186 * c-pretty-print.c (c_pretty_printer::id_expression): Rename from
9187 pp_c_id_expression. Adjust.
9188 (pp_c_postfix_expression): Use pp_id_expression.
9189 (c_pretty_printer::c_pretty_printer): Do not assign to id_expression.
9190
ca43e9d5
GDR
91912013-08-24 Gabriel Dos Reis <gdr@integrable-solutions.net>
9192
9193 * c-pretty-print.h (c_pretty_printer::constant): Now a virtual
9194 member function.
9195 (pp_constant): Adjust.
9196 (pp_c_constant): Remove.
9197 * c-pretty-print.c (c_pretty_printer::constant): Rename from
9198 pp_c_constant. Adjust.
9199 (pp_c_constant)
9200 (pp_c_primary_expression): Call pp_constant in lieu of pp_c_constant.
9201 (c_pretty_printer::c_pretty_printer): Remove assignment to constant.
9202
da6ca2b5
GDR
92032013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
9204
9205 * c-pretty-print.h (pp_c_pretty_printer_init): Remove.
9206 (c_pretty_printer::c_pretty_printer): Declare.
9207 * c-pretty-print.c (pretty_printer::c_pretty_printer): Rename from
9208 c_pretty_printer_init. Adjust.
9209 (print_c_tree): Do not call c_pretty_printer_init.
9210 * c-ada-spec.c (dump_ads): Remove call to pp_construct.
9211
65a372f4
AC
92122013-08-09 Arnaud Charlet <charlet@adacore.com>
9213
9214 * c-ada-spec.c (print_ada_declaration): Prevent accessing null asm name
9215
fd9b0f32
PC
92162013-08-05 Paolo Carlini <paolo.carlini@oracle.com>
9217
9218 PR c++/58080
9219 * c-common.c (pointer_int_sum): Add bool parameter.
9220 * c-common.h (pointer_int_sum): Adjust declaration.
9221
e0aec1e9
GDR
92222013-08-05 Gabriel Dos Reis <gdr@integrable-solutions.net>
9223
9224 * c-pretty-print.c (print_c_tree): Simplify. Use non-static local
9225 c_pretty_printer variable.
9226
b066401f
GDR
92272013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
9228
9229 * c-pretty-print.h (c_pretty_printer): Derive from pretty_printer.
9230 (pp_base): Remove.
9231 (pp_c_base): Likewise. Adjust users.
9232 * c-pretty-print.c (pp_c_maybe_whitespace): Adjust.
9233 (pp_c_whitespace): Do not call pp_base.
9234 (pp_c_left_paren): Likewise.
9235 (pp_c_right_paren): Likewise.
9236 (pp_c_left_brace): Likewise.
9237 (pp_c_right_brace): Likewise.
9238 (pp_c_left_bracket): Likewise.
9239 (pp_c_right_bracket): Likewise.
9240 (pp_c_dot): Likewise.
9241 (pp_c_ampersand): Likewise.
9242 (pp_c_star): Likewise.
9243 (pp_c_arrow): Likewise.
9244 (pp_c_semicolon): Likewise.
9245 (pp_c_complement): Likewise.
9246 (pp_c_exclamation): Likewise.
9247 (pp_c_direct_declarator): Likewise.
9248 (pp_c_ws_string): Likewise.
9249 (pp_c_identifier): Likewise.
9250 (pp_c_statement): Likewise.
9251 (print_c_tree): Likewise.
9252
65e5a578
ESR
92532013-08-04 Ed Smith-Rowland <3dw4rd@verizon.net>
9254
9255 PR c++/58072
9256 * c-common.c (c_parse_error): Catch user-defined literal tokens and
9257 provide useful error strings.
9258
137a1a27
GDR
92592013-08-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
9260
9261 * c-ada-spec.c (pp_ada_tree_identifier): Use specialized pretty
9262 printer functions instead of pp_string or operators and punctuators.
9263 (dump_generic_ada_node): Likewise.
9264 * c-pretty-print.c (pp_c_type_specifier): Likewise.
9265 (pp_c_relational_expression): Likewise.
9266 (pp_c_logical_or_expression): Likewise.
9267
07838b13
GDR
92682013-08-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
9269
9270 * c-ada-spec.c (print_ada_macros): Use specialized pretty printer
9271 functions instead of pp_character.
9272 (pp_ada_tree_identifier): Likewise.
9273 (dump_ada_double_name): Likewise.
9274 (dump_ada_function_declaration): Likewise.
9275 (dump_ada_array_domains): Likewise.
9276 (dump_template_types): Likewise.
9277 (dump_generic_ada_node): Likewise.
9278 (print_ada_declaration): Likewise.
9279 (print_ada_struct_decl): Likewise.
9280 * c-pretty-print.c (pp_c_integer_constant): Likewise.
9281
433cc7b0
TT
92822013-07-23 Tom Tromey <tromey@redhat.com>
9283
9284 * c-common.h (enum rid) <RID_GENERIC>: New constant.
9285 * c-common.c (c_common_reswords): Add _Generic.
9286
688010ba
OB
92872013-07-21 OndÅ\99ej Bílka <neleai@seznam.cz>
9288
9289 * c-common.c: Fix typos.
9290 * c-common.h: Likewise.
9291
2a99e5e6
LL
92922013-07-13 Lubos Lunak <l.lunak@suse.cz>
9293
9294 PR c++/55203
9295 * c-common.c (c_common_attribute_table): Add warn_unused.
9296 (handle_warn_unused_attribute): New.
9297
c26302d5
JJ
92982013-07-10 Jakub Jelinek <jakub@redhat.com>
9299
9300 * c-ppoutput.c (scan_translation_unit): Call account_for_newlines
9301 for all CPP_TOKEN_FLD_STR tokens, not just CPP_COMMENT.
9302
dfeadaa0
PC
93032013-07-10 Paolo Carlini <paolo.carlini@oracle.com>
9304
9305 PR c++/57869
9306 * c.opt: Add Wconditionally-supported.
9307
6a2fa4b2
GS
93082013-07-08 Graham Stott <graham.stott@btinternet.com>
9309
adfac8df 9310 * array-notation-common.c (length_mismatch_in_expr_p): Delete
6a2fa4b2
GS
9311 unused variables l_length and l_node.
9312
ecdbd01a 93132013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
40d3d530
JR
9314
9315 PR c/57821
9316 * c-common.c (complete_array_type): Delay folding first index
9317 like other indices. When folding, check for index overflow.
9318
bedc293e
MG
93192013-06-27 Marc Glisse <marc.glisse@inria.fr>
9320
9321 PR c++/57509
9322 * c-common.h (c_build_vec_perm_expr): New complain argument.
9323 * c-common.c (c_build_vec_perm_expr): Likewise.
9324 Use save_expr also in C++.
9325
604b2bfc
GDR
93262013-06-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
9327
9328 * c-common.c (c_common_nodes_and_builtins): Use cxx11 in lieu of cxx0x.
9329 * c-cppbuiltin.c (c_cpp_builtins): Likewise.
9330 * c-opts.c (c_common_post_options): Likewise.
9331
dfeadaa0 93322013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
713b46fa
BI
9333
9334 * array-notation-common.c (length_mismatch_in_expr): Changed the
9335 parameter type's from a dynamic array to a vec_tree. Also removed
9336 the size parameters.
9337 * c-common.h (length_mismatch_in_expr_p): Fixed prototype's as per
9338 the change above.
9339
2ce86d2e
BI
93402013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
9341
9342 * c-common.h (struct cilkplus_an_parts): New structure.
9343 (struct cilkplus_an_loop_parts): Likewise.
9344 (cilkplus_extract_an_triplets): New prototype.
9345 (fix_sec_implicit_args): Likewise.
9346 * array-notation-common.c (cilkplus_extract_an_triplets): New function.
9347 (fix_sec_implicit_args): Likewise.
604b2bfc 9348
07a6825b
BI
93492013-06-20 Balaji V. Iyer <balaji.v.iyer@intel.com>
9350
9351 * array-notation-common.c (find_inv_trees): Removed an unwanted
9352 typecasting.
9353 * c-common.h (struct inv_list::additional_tcodes): Changed type from
9354 enum rid to enum tree_code.
9355
08346abd
JH
93562013-06-11 Jan Hubicka <jh@suse.cz>
9357
9358 * c-common.c (handle_alias_ifunc_attribute): Do not set
9359 DECL_EXTERNAL for weakref variables.
9360 * c-pragma.c (handle_pragma_weak): Make sure aliases
9361 are not declared as external.
9362
d60f1706
BI
93632013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
9364
9365 * array-notation-common.c (length_mismatch_in_expr_p): Moved this
9366 function from c/c-array-notation.c.
9367 (is_cilkplus_reduce_builtin): Likewise.
9368 (find_rank): Likewise.
9369 (extract_array_notation_exprs): Likewise.
9370 (replace_array_notations): Likewise.
9371 (find_inv_trees): Likewise.
9372 (replace_inv_trees): Likewise.
9373 (contains_array_notation_expr): Likewise.
9374 (find_correct_array_notation_type): Likewise.
9375 * c-common.h (struct inv_list): Moved this struct from the file
9376 c/c-array-notation.c and added a new field called additional tcodes.
9377 (length_mismatch_in_expr_p): New prototype.
9378 (is_cilkplus_reduce_builtin): Likewise.
9379 (find_rank): Likewise.
9380 (extract_array_notation_exprs): Likewise.
9381 (replace_array_notation): Likewise.
9382 (find_inv_trees): Likewise.
9383 (replace_inv_trees): Likewise.
9384 (find_correct_array_notation_type): Likewise.
dfeadaa0 9385
36536d79
BI
93862013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
9387
9388 * c-common.c (c_define_builtins): When cilkplus is enabled, the
9389 function array_notation_init_builtins is called.
9390 (c_common_init_ts): Added ARRAY_NOTATION_REF as typed.
9391 * c-common.def (ARRAY_NOTATION_REF): New tree.
9392 * c-common.h (build_array_notation_expr): New function declaration.
9393 (build_array_notation_ref): Likewise.
9394 (extract_sec_implicit_index_arg): New extern declaration.
9395 (is_sec_implicit_index_fn): Likewise.
9396 (ARRAY_NOTATION_CHECK): New define.
9397 (ARRAY_NOTATION_ARRAY): Likewise.
9398 (ARRAY_NOTATION_START): Likewise.
9399 (ARRAY_NOTATION_LENGTH): Likewise.
9400 (ARRAY_NOTATION_STRIDE): Likewise.
9401 * c-pretty-print.c (pp_c_postifix_expression): Added a new case for
9402 ARRAY_NOTATION_REF.
9403 (pp_c_expression): Likewise.
9404 * c.opt (flag_enable_cilkplus): New flag.
9405 * array-notation-common.c: New file.
9406
f7716d57
JJ
94072013-05-14 Jakub Jelinek <jakub@redhat.com>
9408
9409 PR c++/57274
9410 * c-common.c (verify_tree): Don't recurse into SIZEOF_EXPR.
9411
a5e0cd1d
MG
94122013-05-10 Marc Glisse <marc.glisse@inria.fr>
9413
9414 * c-common.c (vector_types_convertible_p): No TYPE_PRECISION for
9415 vectors.
9416
f6bc1c4a
HS
94172013-05-07 Han Shen <shenhan@google.com>
9418
9419 * c-cppbuiltin.c (c_cpp_builtins): Added "__SSP_STRONG__=3".
9420
3f12f6e9
SKS
94212013-04-29 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
9422
9423 * c-common.c (check_user_alignment): Emit error for negative values.
9424
61949153
PC
94252013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
9426
9427 * c-opts.c (set_std_cxx11): Use CLK_CXX1Y and CLK_GNUCXX1Y.
9428
e93e18e9
PC
94292013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
9430
9431 * c-cppbuiltin.c (c_cpp_builtins): Do not define
9432 __GXX_EXPERIMENTAL_CXX1Y__.
9433
44d90fe1 94342013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
8e745a17 9435 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
44d90fe1
PC
9436
9437 * c.opt ([Wpointer-arith]): Enabled by -Wpedantic, as documented.
9438 * c-common.c (pointer_int_sum): Change -Wpointer-arith pedwarns
9439 to simply use OPT_Wpointer_arith.
9440 (c_sizeof_or_alignof_type): Likewise.
9441
13f39b2e
PC
94422013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
9443
9444 * c-cppbuiltin.c (c_cpp_builtins): Define __GXX_EXPERIMENTAL_CXX1Y__.
9445
4b84d650
JJ
94462013-04-12 Jakub Jelinek <jakub@redhat.com>
9447
9448 * c-format.c (gcc_diag_char_table, gcc_tdiag_char_table,
9449 gcc_cdiag_char_table, gcc_cxxdiag_char_table): Add %r and %R format
9450 specifiers.
9451
fb037b5d
SB
94522013-04-07 Steven Bosscher <steven@gcc.gnu.org>
9453
9454 * c-pragma.c (add_to_renaming_pragma_list): Fix leading comment.
9455
4e856798
PC
94562013-04-03 Paolo Carlini <paolo.carlini@oracle.com>
9457
9458 * c-common.c (pointer_int_sum): Remove dead code.
9459
4b1baac8
RS
94602013-03-09 Richard Sandiford <rdsandiford@googlemail.com>
9461
9462 PR middle-end/56524
9463 * c-common.c (handle_optimize_attribute): Don't call
9464 save_optabs_if_changed.
9465
0b50e654
JJ
94662013-03-05 Jakub Jelinek <jakub@redhat.com>
9467
9468 PR middle-end/56461
9469 * c-pch.c (pch_init): Free target_validity at the end.
9470
48c41403
JJ
94712013-03-04 Jakub Jelinek <jakub@redhat.com>
9472
9473 * c-pretty-print.c (pp_c_pretty_printer_init): Clear pp->flags.
9474
e664c61c
KS
94752013-02-28 Konstantin Serebryany <konstantin.s.serebryany@gmail.com>
9476 Jakub Jelinek <jakub@redhat.com>
9477
9478 PR sanitizer/56454
9479 * c-common.c (handle_no_sanitize_address_attribute): New function.
9480 (c_common_attribute_table): Add no_sanitize_address attribute.
9481 (handle_no_address_safety_analysis_attribute): Add
9482 no_sanitize_address attribute, not no_address_safety_analysis
9483 attribute.
9484
a475fd3d 94852013-02-18 Aldy Hernandez <aldyh@redhat.com>
135204dd
AH
9486
9487 PR target/52555
9488 * c-common.c (handle_optimize_attribute): Call
9489 save_optabs_if_changed.
9490
f6007d99
JJ
94912013-02-18 Jakub Jelinek <jakub@redhat.com>
9492 Steven Bosscher <steven@gcc.gnu.org>
9493
9494 PR pch/54117
9495 * c-opts.c (c_common_post_options): If debug info is enabled
9496 and non-dwarf*, refuse to load PCH files and when writing PCH
9497 file warn.
9498
cf35e2b1
JJ
94992013-02-05 Jakub Jelinek <jakub@redhat.com>
9500
9501 PR middle-end/56167
9502 * c-common.c (handle_error_attribute): Fix condition.
9503
32887460
JJ
95042013-01-30 Jakub Jelinek <jakub@redhat.com>
9505
9506 PR c++/55742
9507 * c-common.c (handle_target_attribute): Revert 2012-12-26 change.
9508
5af057d8
JM
95092013-01-18 Jason Merrill <jason@redhat.com>
9510
9511 PR target/54908
9512 * c.opt (-fextern-tls-init): New.
9513 * c-opts.c (c_common_post_options): Handle it.
9514
cc83c823
JJ
95152013-01-09 Jakub Jelinek <jakub@redhat.com>
9516
9517 PR c/48418
9518 * c-common.c (c_fully_fold_internal): Warn for LSHIFT_EXPR and
9519 RSHIFT_EXPR, if orig_op1 isn't INTEGER_CST, op1 is INTEGER_CST
9520 and is either negative or bigger or equal to type precision
9521 of the first operand.
9522
a859517f
MP
95232012-12-03 Marek Polacek <polacek@redhat.com>
9524
9525 PR c/55570
9526 * c-common.c (check_user_alignment): Swap order of tests,
9527 check TREE_CODE first.
9528
2d7aa578
ESR
95292012-11-29 Ed Smith-Rowland <3dw4rd@verizon.net>
9530
9531 PR c++/52654
9532 * c-common.h (overflow_type): New enum.
9533 (build_userdef_literal): Add overflow_type argument.
9534 (tree_userdef_literal): Add overflow_type.
9535 (USERDEF_LITERAL_OVERFLOW): New access macro.
9536 * c-common.c (build_userdef_literal): Add overflow_type
9537 argument.
9538 * c-lex.c (c_lex_with_flags): Add overflow_type to
9539 build_userdef_literal calls.
9540 (interpret_integer, interpret_float): Add overflow_type argument.
9541
cc3c4f62
RB
95422012-11-28 Richard Biener <rguenther@suse.de>
9543
9544 PR c/35634
9545 * c-gimplify.c (c_gimplify_expr): Gimplify self-modify expressions
9546 here and use a type with proper overflow behavior for types that would
9547 need to be promoted for the arithmetic.
9548
77bc5132
JJ
95492012-11-23 Jakub Jelinek <jakub@redhat.com>
9550
9551 PR sanitizer/55435
9552 * c-common.c (handle_no_address_safety_analysis_attribute): New
9553 function.
9554 (c_common_attribute_table): Add no_address_safety_analysis.
9555
5dc99c46
SB
95562012-11-16 Simon Baldwin <simonb@google.com>
9557
9558 * c.opt: Add f[no-]canonical-system-headers.
9559 * c-opts.c (c_common_handle_option): Handle
9560 OPT_fcanonical_system_headers.
9561
a4a0016d
ESR
95622012-11-09 Ed Smith-Rowland <3dw4rd@verizon.net>
9563
9564 PR c++/54413
9565 * c-opts.c (c_common_handle_option): Set new flags.
9566 * c.opt: Describe new flags.
9567
7dbb85a7
JM
95682012-11-09 Jason Merrill <jason@redhat.com>
9569
9570 * c.opt (Wabi-tag): New.
9571
ad7bac31
AK
95722012-11-09 Andi Kleen <ak@linux.intel.com>
9573
9574 PR 55139
9575 * c-common.c (get_atomic_generic_size): Mask with
8e745a17 9576 MEMMODEL_MASK
ad7bac31 9577
7332899a
MLI
95782012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
9579
9580 PR c/53063
9581 * c.opt (Wformat): Make it Alias Wformat=1.
9582 (Wformat-contains-nul,Wformat-extra-args,Wformat-nonliteral,
9583 Wformat-security,Wformat-y2k,Wformat-zero-length): Use
9584 LangEnabledBy.
9585 (Wformat=): RejectNegative. Use LangEnabledBy.
9586 (Wnonnull): Use LangEnabledBy.
9587 * c-opts.c (c_common_handle_option): Do not handle Wformat here.
9588 * c-format.c (set_Wformat): Delete.
9589 (decode_format_attr): Replace OPT_Wformat with OPT_Wformat_.
ab20d992
JJ
9590 (maybe_read_dollar_number): Likewise.
9591 (avoid_dollar_number): Likewise.
9592 (finish_dollar_format_checking): Likewise.
9593 (check_format_info): Likewise.
9594 (check_format_info_main): Likewise.
9595 (check_format_types): Likewise.
9596 (format_type_warning): Likewise.
9597 * c-common.c (int): Likewise.
9598 (check_function_sentinel): Likewise.
8e745a17 9599 * c-common.h (warn_format,set_Wformat): Do not declare here.
7332899a 9600
34a180a6
MLI
96012012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
9602
9603 PR c/53063
9604 * c.opt(Warray-bounds,Wdelete-non-virtual-dtor,Wenum-compare,
9605 Wmain,Woverlength-strings, Wunknown-pragmas,Wunused-macros):
9606 Use LangEnabledBy.
9607 (Wswitch,Wswitch-default,Wswitch-enum): Likewise. Move here from
9608 common.opt.
9609 (Wvariadic-macros): Init(1).
9610 * c-opts.c (c_common_handle_option): Do not handle them
9611 explicitly.
9612 (c_common_post_options): Likewise.
9613 (sanitize_cpp_opts): warn_unused_macros is now
9614 cpp_warn_unused_macros.
9615 (push_command_line_include): Likewise.
9616 * c-common.c (warn_unknown_pragmas): Do not define.
9617 * c-common.h (warn_unknown_pragmas): Do not declare.
9618
3f46d6a5
MLI
96192012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
9620
9621 PR c/51294
9622 * c-common.c (conversion_warning): Handle conditional expressions.
9623
880661a4
JW
96242012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
9625
9626 PR c++/54930
9627 * c.opt (Wreturn_local_addr): Define new option.
9628
4514a96b
JM
96292012-10-25 Jason Merrill <jason@redhat.com>
9630
f14edc1a
JM
9631 * c.opt (Wvirtual-move-assign): New.
9632
4514a96b
JM
9633 * c.opt (Winherited-variadic-ctor): New.
9634
93100c6b
MG
96352012-10-25 Marc Glisse <marc.glisse@inria.fr>
9636
9637 PR c++/54427
9638 * c-common.c (scalar_to_vector): Handle VEC_COND_EXPR.
9639
1efcb8c6
JM
96402012-10-23 Joseph Myers <joseph@codesourcery.com>
9641
9642 * c-common.h (pch_cpp_save_state): Declare.
9643 * c-target.def (c_preinclude): New hook.
9644 * c-opts.c (done_preinclude): New.
9645 (push_command_line_include): Handle default preincluded header.
9646 (cb_file_change): Call pch_cpp_save_state when calling
9647 push_command_line_include.
9648 * c-pch.c (pch_ready_to_save_cpp_state, pch_cpp_state_saved)
9649 (pch_cpp_save_state): New.
9650 (pch_init): Call pch_cpp_save_state conditionally, instead of
9651 calling cpp_save_state.
9652
4a0ae68e
MLI
96532012-10-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
9654
9655 PR c/53063
9656 PR c/40989
9657 * c.opt (Waddress,Wchar-subscripts,Wsign-conversion,Wimplicit,
9658 Wimplicit-function-declaration,Wimplicit-int,Wsizeof-pointer-memaccess,
9659 Wnarrowing,Wparentheses,Wpointer-sign,Wreturn-type,Wsequence-point,
9660 Wsign-compare,Wuninitialized,Wmaybe-uninitialized,Wunused,
9661 Wvolatile-register-var): Add LangEnabledBy or EnabledBy.
9662 * c-opts.c (c_common_handle_option): Remove explicit handling from
9663 here.
9664 (c_common_post_options): Likewise.
9665
67e4210b
EB
96662012-10-18 Eric Botcazou <ebotcazou@adacore.com>
9667
9668 * c-ada-spec.c (LOCATION_COL): Delete.
9669 (compare_location): New function.
9670 (compare_node): Use it.
9671 (compare_comment): Likewise.
9672
65d4f2cd
MLI
96732012-10-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
9674
9675 PR c/53063
9676 PR c/40989
9677 * c.opt (Wstrict-aliasing=,Wstrict-overflow=): Use LangEnabledBy.
9678 * c-opts.c (c_common_handle_option): Do not set them here. Add
9679 comment.
9680 (c_common_post_options): Likewise.
9681
909881cb
EB
96822012-10-16 Eric Botcazou <ebotcazou@adacore.com>
9683
9684 * c-ada-spec.c (ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX): Define.
9685 (dump_generic_ada_node) <INTEGER_CST>: Deal with sizetype specially.
9686 Remove POINTER_TYPE handling, add large unsigned handling and use
9687 ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX for big numbers.
9688
3a785c97
JJ
96892012-10-12 Jakub Jelinek <jakub@redhat.com>
9690
9691 PR c/54381
9692 * c-common.h (sizeof_pointer_memaccess_warning): Adjust prototype.
9693 * c-common.c (sizeof_pointer_memaccess_warning): Take array of 3
9694 locs and array of 3 trees instead of just single loc and single
9695 sizeof_arg tree. Handle __builtin___*_chk builtins too, and
9696 also stpncpy, bcopy, bcmp, bzero, snprintf and vsnprintf builtins.
9697 For *cmp* builtins that take two sources strings report warnings
9698 about first and second source, not about destination and source.
9699
5e54f81d
MG
97002012-10-12 Marc Glisse <marc.glisse@inria.fr>
9701
9702 PR c++/53055
9703 * c-common.h (enum ref_operator) [RO_ARROW_STAR]: New.
9704
f5b02f1e
EB
97052012-10-11 Eric Botcazou <ebotcazou@adacore.com>
9706
9707 * c-ada-spec.c (dump_ada_template): Bail out for template declarations
9708 declaring something coming from another file.
9709
b46dbc6c
AC
97102012-10-10 Arnaud Charlet <charlet@adacore.com>
9711
f5b02f1e 9712 PR ada/54845
b46dbc6c
AC
9713 * c-ada-spec.c (print_ada_struct_decl): Increase buf size.
9714
5d9de0d0
PC
97152012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
9716
9717 PR c++/54194
9718 * c-common.c (warn_about_parentheses): Add location_t parameter;
9719 use EXPR_LOC_OR_LOC.
9720 * c-common.h: Update declaration.
9721
a212e43f
MG
97222012-10-09 Marc Glisse <marc.glisse@inria.fr>
9723
9724 PR c++/54427
9725 * c-common.c (scalar_to_vector): Moved from c-typeck.c. Support
9726 more operations. Make error messages optional.
9727 * c-common.h (enum stv_conv): Moved from c-typeck.c.
9728 (scalar_to_vector): Declare.
9729
b1db7f91
JM
97302012-10-08 Jason Merrill <jason@redhat.com>
9731
9732 * c-common.c (c_common_reswords): Add thread_local.
9733
e28d52cf
DS
97342012-10-08 Dodji Seketeli <dodji@redhat.com>
9735
9736 PR c++/53528 C++11 attribute support
9737 * c-common.h (bitfield_p, cxx_fundamental_alignment_p): Declare
9738 new functions.
9739 * c-common.c (check_cxx_fundamental_alignment_constraints): New
9740 static function.
9741 (handle_aligned_attribute): In choose strictest alignment
9742 among many. Use new check_cxx_fundamental_alignment_constraints.
9743 (handle_transparent_union_attribute): In c++11 attribute syntax,
9744 don't look through typedefs.
9745
3b78de56
AC
97462012-10-04 Arnaud Charlet <charlet@adacore.com>
9747
9748 * c-ada-spec.c (print_ada_declaration): Remove handling of TDF_RAW.
9749 * c.opt (-fdump-ada-spec, -fdump-ada-spec-slim): Move switch definition
9750 out of dumpfile.h.
9751
6040bb5f
DC
97522012-09-25 Dehao Chen <dehao@google.com>
9753
9754 PR middle-end/54645
3b78de56 9755 * c-pch.c (c_common_read_pch): Rebuild the location_adhoc_data
6040bb5f
DC
9756 map when read in the pch.
9757
3f8257db 97582012-09-18 Arnaud Charlet <charlet@adacore.com>
0b07a57e
AC
9759
9760 * c-ada-spec.c: Style fixes.
9761
3f8257db 97622012-09-18 Thomas Quinot <quinot@adacore.com>
da5182be
TQ
9763
9764 * c.opt (-fada-spec-parent): Define new command line switch.
9765 * c-ada-spec.c (get_ada_package): When -fada-spec-parent
9766 is specified, generate binding spec as a child of the specified unit.
9767
0ccb505d
PC
97682012-09-13 Paolo Carlini <paolo.carlini@oracle.com>
9769 Manuel López-Ibáñez <manu@gcc.gnu.org>
9770
9771 PR c++/53210
9772 * c.opt ([Winit-self]): Enabled by -Wall in C++.
9773
c583af79
AC
97742012-08-23 Arnaud Charlet <charlet@adacore.com>
9775
9776 * c-ada-spec.c (dump_generic_ada_node): Fix handling of name_only
9777 for pointers, and add missing Convention C pragma.
9778 (print_ada_struct_decl): Add missing aliased keyword.
9779 (dump_ads): Add pragma Ada_2005 and Style_Checks (Off).
9780
1a4049e7
JJ
97812012-08-17 Jakub Jelinek <jakub@redhat.com>
9782
9783 * c-common.c (sizeof_pointer_memaccess_warning): New function.
9784 * c.opt (-Wsizeof-pointer-memaccess): Add new option.
9785 * c-opts.c (c_common_handle_option): Enable it for -Wall.
9786 * c-common.h (sizeof_pointer_memaccess_warning): Add prototype.
9787 * c-common.def (SIZEOF_EXPR): Moved here from cp-tree.def.
9788
70b5e7dc
RG
97892012-08-10 Richard Guenther <rguenther@suse.de>
9790
9791 * c-pretty-print.c (pp_c_expression): Handle anonymous SSA names.
9792
f8923f7e
SB
97932012-08-07 Steven Bosscher <steven@gcc.gnu.org>
9794
9795 * c-pretty-print.c (pp_c_function_definition): Use pp_newline_and_flush
9796 instead of separate pp_newline and pp_flush.
9797 (print_c_tree): Likewise.
9798
e45abe1f
RH
97992012-07-26 Richard Henderson <rth@redhat.com>
9800
9801 * c-common.c (handle_hot_attribute): Allow labels.
9802 (handle_cold_attribute): Likewise.
9803
332f1d24
JJ
98042012-07-20 Jakub Jelinek <jakub@redhat.com>
9805
9806 PR c++/28656
9807 * c-common.c (check_function_nonnull): Handle multiple nonnull
9808 attributes properly.
9809
7ee2468b
SB
98102012-07-16 Steven Bosscher <steven@gcc.gnu.org>
9811
9812 * c-gimplify.c: Include dumpfile.h instead of tree-dump.h.
9813 * c-ada-spec.c: Likewise.
9814 * c-dump.c (dump_stmt): Move to cp/dump.c, the only user.
9815
ee7b28eb
SB
98162012-07-14 Steven Bosscher <steven@gcc.gnu.org>
9817
9818 * c-pch.c (CHECK_NO_ASM_OUT_DURING_PCH): Do not define.
9819 Remove code conditional on it.
9820
6bdf3519
SB
98212012-07-11 Steven Bosscher <steven@gcc.gnu.org>
9822
9823 * c-gimplify.c: Do not include basic-block.h.
9824 * c-common.c: Do not include linfuncs.h.
9825
532aafad
SB
98262012-07-08 Steven Bosscher <steven@gcc.gnu.org>
9827
9828 * c-common.h: Include tree.h.
9829
8d0d1915
JM
98302012-07-02 Jason Merrill <jason@redhat.com>
9831
9832 PR c++/53524
9833 * c-common.c (get_priority): Call default_conversion.
9834
fbc873ad
UB
98352012-07-01 Uros Bizjak <ubizjak@gmail.com>
9836
9837 * c-pch.c (c_common_write_pch): Remove unused variables.
9838
d4a10d0a
SB
98392012-06-29 Steven Bosscher <steven@gcc.gnu.org>
9840
9841 * cppspec.c: Moved from gcc/ to here.
9842
6f3a2e23
KT
98432012-06-27 Kai Tietz <ktietz@redhat.com>
9844
9845 PR preprocessor/37215
9846 * c-ppoutput.c (preprocess_file): Check for nonempty buffer.
9847
8ca92d04
SB
98482012-06-21 Steven Bosscher <steven@gcc.gnu.org>
9849
9850 * c-common.h (c_common_print_pch_checksum): Remove.
9851 * c-pch.c: Do not include output.h.
9852 (CHECK_NO_ASM_OUT_DURING_PCH): Define and add FIXME.
9853 (asm_out_file): Define iff CHECK_NO_ASM_OUT_DURING_PCH isdefined.
9854 (asm_file_startpos): Define iff CHECK_NO_ASM_OUT_DURING_PCH is defined.
9855 (struct c_pch_header): Remove.
9856 (get_ident): Update gpch version.
9857 (pch_init): Do not print executable_checksum to asm_out_file.
9858 Do not fail if there is no asm_out_file to read back from. Set
9859 asm_file_startpos only if CHECK_NO_ASM_OUT_DURING_PCH is defined.
9860 (c_common_write_pch): Verify that nothing was written to asm_out_file
9861 since pch_init was called. Do not write a c_pch_header, and do not
9862 copy from asm_out_file to the PCH.
9863 (c_common_read_pch): Do not read a c_pch_header, and do not restore
9864 the content of asm_out_file from the PCH.
9865 (c_common_print_pch_checksum): Remove.
9866 * c-opts.c (c_common_init): Print out executable_checksum directly.
9867
70f42967
SB
98682012-06-19 Steven Bosscher <steven@gcc.gnu.org>
9869
9870 * c-target.def (objc_declare_unresolved_class_reference,
9871 objc_declare_class_definition): Add new hooks.
9872
a8781821
SB
98732012-06-19 Steven Bosscher <steven@gcc.gnu.org>
9874
9875 * c-lex.c: Do not include output.h.
9876 (cb_ident): Try to put out .ident with targetm.asm_out.output_ident.
9877 Remove uses of ASM_OUTPUT_IDENT.
9878
9e1a8dd1
RR
98792012-06-15 Marc Glisse <marc.glisse@inria.fr>
9880
9881 PR c++/51033
9882 * c-common.h (c_build_vec_perm_expr): Move decl here.
9883 * c-common.c (c_build_vec_perm_expr): Move definition
9884 here.
9885
6f07a821
SB
98862012-06-06 Steven Bosscher <steven@gcc.gnu.org>
9887
9888 * c.opt (fconserve-space): Turn into a no-op.
9889
9faeb493 98902012-06-04 Sterling Augustine <saugustine@google.com>
c265f413
SA
9891
9892 * c-pretty-print.h (pp_c_flag_gnu_v3): New enumerator.
9893 * c-pretty-print.c (pp_c_specifier_qualifier_list): Check it at
9894 both the start and end of the function.
9895
a4b7d13c
SB
98962012-06-04 Steven Bosscher <steven@gcc.gnu.org>
9897
9898 * c-common.c: Do not include output.h.
9899 * c-pragma.c: Likewise.
9900
c265f413
SA
99012012-06-04 Steven Bosscher <steven@gcc.gnu.org>
9902
9903 * error.c (dump_decl): Check pp_c_flag_gnu_v3.
9904 (decl_as_dwarf_string, lang_decl_dwarf_name): New functions.
9905 (lang_decl_name): Handle namespace decls.
9906
be7a421e
SB
99072012-05-31 Steven Bosscher <steven@gcc.gnu.org>
9908
9909 * c-ada-spec.c: Do not include output.h.
9910 * c-semantics.c: Likewise.
9911
65de6659
JM
99122012-05-29 Joseph Myers <joseph@codesourcery.com>
9913
9914 * c-common.c: Fix typo.
9915
ca5f4331
MM
99162012-05-29 Michael Matz <matz@suse.de>
9917
9918 * c-common.h (c_expand_decl): Remove prototype.
9919
4f7f7aca
MLI
99202012-05-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
9921
9922 * c.opt (Wmissing-braces): Use LangEnabledBy(C ObjC,Wall).
9923 * c-opts.c (c_common_handle_option): Remove code handling
9924 warn_missing_braces.
9925
4a792f9b
PC
99262012-05-28 Paolo Carlini <paolo.carlini@oracle.com>
9927
9928 PR c++/25137
9929 * c-opts.c (c_common_handle_option): For C++ -Wall doesn't enable
9930 -Wmissing_braces.
9931
650dc14a
DS
99322012-05-22 Dodji Seketeli <dodji@redhat.com>
9933
9934 PR c++/53322
9935 * c.opt (Wunused-local-typedefs): Use EnabledBy(Wunused).
9936
9b095bf1
MLI
99372012-05-17 Manuel López-Ibáñez <manu@gcc.gnu.org>
9938
9939 * c.opt (--pedantic-errors,-pedantic-errors): Do not handle here.
9940 * c-opts.c (c_common_handle_option): Do not handle explicitly
9941 Wreturn-type, Wwrite-strings, warn_ecpp, and -pedantic-errors.
9942
0b2c4be5
DS
99432012-05-16 Dodji Seketeli <dodji@redhat.com>
9944
9945 PR preprocessor/7263
ab20d992 9946 * c-lex.c (c_lex_with_flags): Pass a virtual location to the call
0b2c4be5
DS
9947 to cpp_classify_number. For diagnostics, use the precise location
9948 instead of the global input_location.
9949
a1bde5af
PC
99502012-05-15 Paolo Carlini <paolo.carlini@oracle.com>
9951
d02924ef 9952 PR c++/11856
a1bde5af
PC
9953 * c-common.c (shorten_compare): Check c_inhibit_evaluation_warnings.
9954
d1ede5f4
BS
99552012-05-14 Bernd Schmidt <bernds@codesourcery.com>
9956
a1bde5af 9957 * c-common.c (DEF_ATTR_STRING): Define and undefine as necessary.
d1ede5f4 9958
f2bc201f
MLI
99592012-05-14 Manuel López-Ibáñez <manu@gcc.gnu.org>
9960
9961 PR 53063
9962 * c.opt (Wc++0X-compat,Wdelete-non-virtual-dtor,Wjump-misses-init,
9963 Wreorder): Use LangEnabledBy.
9964 * c-opts.c (c_common_handle_option): Do not enable them
9965 explicitly. Call lang-specific generated functions.
9966 (c_common_post_options): Do not set them here.
9967
95744782
MLI
99682012-05-13 Manuel López-Ibáñez <manu@gcc.gnu.org>
9969
9970 * c.opt (Wclobbered,Wempty-body,Wignored-qualifiers,
9971 Wmissing-field-initializers,Wmissing-parameter-type,
9972 Wold-style-declaration,Woverride-init): Use EnabledBy.
9973 * c-opts.c (c_common_post_options): Do not set here explicitly.
9974
7d5a5747
MLI
99752012-05-11 Manuel López-Ibáñez <manu@gcc.gnu.org>
9976
9977 PR 53063
9978 * c-opts.c (c_common_handle_option): Use handle_generated_option
9979 to enable sub-options.
9980
5a3c9cf2
PC
99812012-05-10 Paolo Carlini <paolo.carlini@oracle.com>
9982
9983 PR c++/53158
9984 * c-common.c (warnings_for_convert_and_check): Use warning_at.
9985
3ac8781c
RG
99862012-05-10 Richard Guenther <rguenther@suse.de>
9987
9988 * c-common.c (c_sizeof_or_alignof_type): Remove assert and
9989 adjust commentary about TYPE_IS_SIZETYPE types.
9990
1e537948
MLI
99912012-05-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
9992
9993 PR c++/53261
9994 * c-common.c (warn_logical_operator): Check that argument of
9995 integer_zerop is not NULL.
9996
f2c4a785
MLI
99972012-05-05 Manuel López-Ibáñez <manu@gcc.gnu.org>
9998
9999 PR c/43772
10000 * c-common.c (warn_logical_operator): Do not warn if either side
10001 is already true or false.
10002
50f305ca
MLI
100032012-05-04 Manuel López-Ibáñez <manu@gcc.gnu.org>
10004
10005 PR c/51712
10006 * c-common.c (expr_original_type): New.
10007 (shorten_compare): Do not warn for enumeration types.
10008
0c3641b0
MLI
100092012-05-03 Manuel López-Ibáñez <manu@gcc.gnu.org>
10010
10011 * c.opt (fpermissive): Add Var(flag_permissive).
10012
7edaa4d2
MG
100132012-04-30 Marc Glisse <marc.glisse@inria.fr>
10014
10015 PR c++/51033
10016 * c-common.c (convert_vector_to_pointer_for_subscript): New function.
10017 * c-common.h (convert_vector_to_pointer_for_subscript): Declare it.
10018
b9c8da34
DS
100192012-04-30 Dodji Seketeli <dodji@redhat.com>
10020
10021 Add -Wvarargs option
ab20d992 10022 * c.opt (Wvarargs): Define new option.
b9c8da34 10023
e6c69da0
MLI
100242012-04-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
10025
10026 * c-common.c (check_function_arguments): Replace
10027 Wmissing-format-attribute with Wsuggest-attribute=format.
10028
90137d8f
MLI
100292012-04-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
10030
10031 * c.opt (Wsuggest-attribute=format): New. Alias of
10032 Wmissing-format-attribute.
10033 * c-format.c (decode_format_type): Replace
10034 Wmissing-format-attribute with Wsuggest-attribute=format.
10035 (check_function_format): Likewise.
10036
9faeb493 100372012-04-27 Ollie Wild <aaw@google.com>
7f5f5f98
OW
10038
10039 * c-common.c: Add CPP_W_LITERAL_SUFFIX mapping.
10040 * c-opts.c (c_common_handle_option): Handle OPT_Wliteral_suffix.
10041 * c.opt: Add Wliteral-suffix.
10042
c1771a20
MLI
100432012-04-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
10044
10045 PR c/44774
10046 * c.opt (Wpedantic): New.
10047 (pedantic): Alias Wpedantic.
10048 * c-opts.c (c_common_handle_option): Replace -pedantic with -Wpedantic.
10049 (c_common_post_options): Likewise.
10050 (sanitize_cpp_opts): Likewise.
10051 * c-lex.c (interpret_float): Likewise.
10052 * c-format.c (check_format_types): Likewise.
10053 * c-common.c (pointer_int_sum): Likewise.
10054 (c_sizeof_or_alignof_type): Likewise.
10055 (c_add_case_label): Likewise.
10056 (c_do_switch_warnings): Likewise.
10057 * c-pragma.c (handle_pragma_float_const_decimal64): Likewise.
10058
04b391c1
JM
100592012-04-15 Jason Merrill <jason@redhat.com>
10060
10061 PR c++/52818
10062 * c-format.c (CPLUSPLUS_STD_VER): C++11 inherits from C99.
10063 (C_STD_NAME): Distinguish between C++98 and C++11.
10064
ac868f29
EB
100652012-04-11 Eric Botcazou <ebotcazou@adacore.com>
10066
10067 PR target/52624
10068 * c-common.h (uint16_type_node): Rename into...
10069 (c_uint16_type_node): ...this.
10070 * c-common.c (c_common_nodes_and_builtins): Adjust for above renaming.
10071 * c-cppbuiltin.c (builtin_define_stdint_macros): Likewise.
10072
fd4116f4
MLI
100732012-04-10 Manuel López-Ibáñez <manu@gcc.gnu.org>
10074
10075 * c-common.c (warn_if_unused_value): Move definition to here.
10076 * c-common.h (warn_if_unused_value): Move declaration to here.
10077
573ac65e
WB
100782012-03-23 William Bader <williambader@hotmail.com>
10079
10080 * c-lex.c (c_lex_with_flags): Avoid declarations after stmts.
10081
552b8185
JM
100822012-03-20 Jason Merrill <jason@redhat.com>
10083
10084 * c-common.h (enum cxx_dialect): Add cxx1y.
10085 * c-common.c (c_common_nodes_and_builtins): Use >= for cxx_dialect
10086 test.
10087 * c-cppbuiltin.c (c_cpp_builtins): Likewise.
10088 * c-opts.c (c_common_post_options): Likewise.
10089 (set_std_cxx1y): New.
10090 (c_common_handle_option): Call it.
10091 * c.opt (-std=c++1y, -std=gnu++1y): New flags.
10092
04398fa8
PC
100932012-03-19 Paolo Carlini <paolo.carlini@oracle.com>
10094
10095 PR c++/14710
10096 * c.opt ([Wuseless-cast]): Add.
10097
d2a12ae7
RG
100982012-03-16 Richard Guenther <rguenther@suse.de>
10099
10100 * c-pretty-print.c (pp_c_initializer_list): Adjust.
10101
a12bf402
MLI
101022012-03-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
10103
10104 PR c++/44783
10105 * c.opt (ftemplate-backtrace-limit) Add.
10106
5c30094f
RO
101072012-03-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
10108
10109 * c-cppbuiltin.c (c_cpp_builtins): Remove #pragma extern_prefix
10110 handling.
10111 * c-pragma.c (handle_pragma_extern_prefix): Remove.
10112 (init_pragma): Don't register extern_prefix.
10113
21fa2faf
RG
101142012-03-12 Richard Guenther <rguenther@suse.de>
10115
10116 * c-common.c (c_common_get_narrower): Use c_common_type_for_size.
10117 (builtin_type_for_size): Likewise.
10118
e3793c6f
JJ
101192012-02-13 Jakub Jelinek <jakub@redhat.com>
10120
10121 PR c++/52215
10122 * c-common.c (sync_resolve_params): Don't decide whether to convert
10123 or not based on TYPE_SIZE comparison, convert whenever arg_type
10124 is unsigned INTEGER_TYPE.
10125
93286335
PC
101262012-02-06 Paolo Carlini <paolo.carlini@oracle.com>
10127
10128 PR c/52118
10129 * c.opt ([Wunused-local-typedefs]): Fix description.
10130
7a421706
MS
101312012-01-24 Mike Stump <mikestump@comcast.net>
10132
10133 * c-common.c (c_common_type_for_mode): Match signed/unsigned types
10134 exactly.
10135
ba9b1f11
RG
101362012-01-18 Richard Guenther <rguenther@suse.de>
10137
10138 * c-opts.c (c_common_post_options): Reset LTO flags if
10139 we are about to generate a PCH.
10140
465406be
PC
101412012-01-17 Paolo Carlini <paolo.carlini@oracle.com>
10142
10143 PR c++/51777
10144 * c-pretty-print.c (pp_c_integer_constant): For unsigned constants
10145 use pp_unsigned_wide_integer.
10146
aee15221
RG
101472012-01-10 Richard Guenther <rguenther@suse.de>
10148
10149 PR middle-end/51806
10150 * c-opts.c (c_common_handle_option): Move -Werror handling
10151 to language independent code.
10152
5720c0dc
RG
101532012-01-05 Richard Guenther <rguenther@suse.de>
10154
10155 PR middle-end/51764
10156 * c.opt (Wmudflap, fmudflap, fmudflapth, fmudflapir): Move here
10157 from common.opt.
10158
73ac190a
PC
101592011-12-30 Paolo Carlini <paolo.carlini@oracle.com>
10160
10161 PR c++/51316
10162 * c-common.c (c_sizeof_or_alignof_type): In C++ allow for alignof
10163 of array types with an unknown bound.
10164
48b0b196
JM
101652011-12-20 Joseph Myers <joseph@codesourcery.com>
10166
10167 * c-common.c (flag_isoc99): Update comment to refer to C11.
10168 (flag_isoc1x): Change to flag_isoc11.
10169 * c-common.h (flag_isoc99): Update comment to refer to C11.
10170 (flag_isoc1x): Change to flag_isoc11.
10171 * c-cppbuiltin.c (cpp_atomic_builtins): Change comment to refer to
10172 C11.
10173 * c-opts.c (set_std_c1x): Change to set_std_c11.
10174 (c_common_handle_option): Handle OPT_std_c11 and OPT_std_gnu11.
10175 Call set_std_c11.
10176 (set_std_c89, set_std_c99, set_std_c11): Use flag_isoc11.
10177 (set_std_c1): Use CLK_STDC11 and CLK_GNUC11.
10178 * c.opt (std=c1x): Change to std=c11. Document as non-draft
10179 standard.
10180 (std=c1x, std=iso9899:2011): Add as aliases of std=c11.
10181 (std=gnu1x): Change to std=gnu11. Refer to non-draft standard.
10182 (std=gnu1x): Make alias of std=gnu11.
10183
d58d6eb5
JM
101842011-12-19 Jason Merrill <jason@redhat.com>
10185
10186 PR c++/51228
10187 * c-common.c (handle_transparent_union_attribute): Check the first
10188 field if the type is complete.
10189
b3908fcc
JW
101902011-12-15 Jonathan Wakely <jwakely.gcc@gmail.com>
10191
10192 PR libstdc++/51365
10193 * c-common.c (RID_IS_FINAL): Add.
10194 * c-common.h (RID_IS_FINAL): Add.
10195
fea3ca91
IS
101962011-11-30 Iain Sandoe <iains@gcc.gnu.org>
10197
10198 * c.opt (fgnu-runtime): Provide full description.
10199 (fnext-runtime): Likewise.
10200 * c-opts.c (OPT_fgnu_runtime, OPT_fnext_runtime) Remove.
10201
62bad7cd
AM
102022011-11-28 Andrew MacLeod <amacleod@redhat.com>
10203
10204 * c-cpp-builtin.c (cpp_atomic_builtins):New. Emit all atomic
10205 predefines in one place. Add LOCK_FREE predefines.
10206 (c_cpp_builtins): Move Legacy HAVE_SYNC predefines to
10207 new func.
10208
c466c4ff
AM
102092011-11-24 Andrew MacLeod <amacleod@redhat.com>
10210
10211 PR c/51256
9faeb493 10212 * c-common.c (get_atomic_generic_size): Check for various error
c466c4ff 10213 conditions
9faeb493
UB
10214 (resolve_overloaded_atomic_exchange,
10215 resolve_overloaded_atomic_compare_exchange,
c466c4ff
AM
10216 resolve_overloaded_atomic_load, resolve_overloaded_atomic_store): Return
10217 error_mark_node for error conditions.
9faeb493 10218
a5952633
RG
102192011-11-08 Richard Guenther <rguenther@suse.de>
10220
10221 PR middle-end/51010
ab20d992 10222 * c-pretty-print.c (pp_c_expression): Handle SSA_NAMEs.
a5952633 10223
0a35513e
AH
102242011-11-07 Richard Henderson <rth@redhat.com>
10225 Aldy Hernandez <aldyh@redhat.com>
10226 Torvald Riegel <triegel@redhat.com>
10227
10228 Merged from transactional-memory.
10229
10230 * c-common.c (handle_tm_wrap_attribute,
10231 handle_tm_attribute, ignore_attribute, parse_tm_stmt_attr): New.
10232 (struct c_common_reswords): Added __transaction* keywords.
10233 (struct c_common_attribute_table): Added transaction* and tm_regparm
10234 attributes.
10235 * c-common.h: Added RID_TRANSACTION*. Added TM_ATTR* and TM_STMT*
10236 masks.
10237 (parse_tm_stmt_attr, tm_attr_to_mask, tm_mask_to_attr,
10238 find_tm_attribute): Declare.
10239
6d87092d
JM
102402011-11-07 Jason Merrill <jason@redhat.com>
10241
10242 PR c++/35688
10243 * c-common.c, c-common.h: Revert yesterday's changes.
10244
8e7860a1
JM
102452011-11-06 Jason Merrill <jason@redhat.com>
10246
10247 PR c++/35688
10248 * c-common.c (decl_has_visibility_attr): Split out from...
10249 (c_determine_visibility): ...here.
10250 * c-common.h: Declare it.
10251
d19fa6b5
JM
102522011-11-06 Joseph Myers <joseph@codesourcery.com>
10253
10254 * c-common.c (c_common_reswords): Add _Alignas and _Alignof.
10255 (c_sizeof_or_alignof_type): Diagnose alignof applied to a function
10256 type.
10257 (check_user_alignment): New. Split out of
10258 handle_aligned_attribute. Disallow integer constants with
10259 noninteger types. Conditionally allow zero.
10260 (handle_aligned_attribute): Use check_user_alignment.
10261 * c-common.h (RID_ALIGNAS, check_user_alignment): New.
10262
86951993
AM
102632011-11-06 Andrew MacLeod <amacleod@redhat.com>
10264 Richard Henderson <rth@redhat.com>
10265
10266 Merged from cxx-mem-model.
10267
10268 * c-cppbuiltin.c (c_cpp_builtins): Test both atomic and sync patterns.
9faeb493 10269 * c-common.c (sync_resolve_params, sync_resolve_return): Only tweak
86951993
AM
10270 parameters that are the same type size.
10271 (get_atomic_generic_size): New. Find size of generic
10272 atomic function parameters and do typechecking.
10273 (add_atomic_size_parameter): New. Insert size into parameter list.
10274 (resolve_overloaded_atomic_exchange): Restructure __atomic_exchange to
10275 either __atomic_exchange_n or external library call.
9faeb493 10276 (resolve_overloaded_atomic_compare_exchange): Restructure
86951993 10277 __atomic_compare_exchange to either _n variant or external library call.
9faeb493 10278 (resolve_overloaded_atomic_load): Restructure __atomic_load to either
86951993
AM
10279 __atomic_load_n or an external library call.
10280 (resolve_overloaded_atomic_store): Restructure __atomic_store to either
10281 __atomic_store_n or an external library call.
10282 (resolve_overloaded_builtin): Handle new __atomic builtins.
10283
cf9e9959
EB
102842011-11-04 Eric Botcazou <ebotcazou@adacore.com>
10285
10286 PR c++/50608
10287 * c-common.c (c_fully_fold_internal) <ADDR_EXPR>: Call fold_offsetof_1.
10288 (fold_offsetof_1): Make global. Remove STOP_REF argument and adjust.
10289 <INDIRECT_REF>: Return the argument.
10290 <ARRAY_REF>: Remove special code for negative offset.
10291 Call fold_build_pointer_plus instead of size_binop.
10292 (fold_offsetof): Remove STOP_REF argument and adjust.
10293 * c-common.h (fold_offsetof_1): Declare.
10294 (fold_offsetof): Remove STOP_REF argument.
10295
25339f10
JM
102962011-11-02 Paolo Carlini <paolo.carlini@oracle.com>
10297
10298 PR c++/50810
10299 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
10300 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
10301 Wnarrowing for C++0x and C++98.
10302 * c.opt ([Wnarrowing]): Update.
10303
89401152
PC
103042011-11-01 Paolo Carlini <paolo.carlini@oracle.com>
10305
10306 PR c++/44277
10307 * c.opt: Add Wzero-as-null-pointer-constant.
10308
97e3ad20
JM
103092011-10-31 Jason Merrill <jason@redhat.com>
10310
15694fdd
JM
10311 * c.opt (-fdeduce-init-list): Off by default.
10312
97e3ad20
JM
10313 PR c++/50920
10314 * c-common.h (cxx_dialect): Add cxx11 and cxx03.
10315 * c.opt: Add -std=c++11, -std=gnu++11, -std=gnu++03,
10316 and -Wc++11-compat.
10317 * c-opts.c (set_std_cxx11): Rename from set_std_cxx0x.
10318
fb9120e3
RAV
103192011-10-27 Roberto Agostino Vitillo <ravitillo@lbl.gov>
10320
10321 PR c++/30066
10322 * c.opt (fvisibility-inlines-hidden): Description change.
10323
3ce4f9e4
ESR
103242011-10-26 Ed Smith-Rowland <3dw4rd@verizon.net>
10325
10326 Implement C++11 user-defined literals.
10327 * c-common.c (build_userdef_literal): New.
10328 * c-common.def: New tree code.
10329 * c-common.h (tree_userdef_literal): New tree struct and accessors.
10330 * c-lex.c (interpret_float): Add suffix parm.
10331 (c_lex_with_flags): Build literal tokens.
10332
5f53c243
PC
103332011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
10334
10335 PR c++/50841
10336 Revert:
10337 2011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
10338
10339 PR c++/50810
10340 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
10341 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
10342 Wnarrowing for C++0x and C++98.
10343 * c.opt ([Wnarrowing]): Update.
10344
263734e1
PC
103452011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
10346
10347 PR c++/50810
10348 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
10349 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
10350 Wnarrowing for C++0x and C++98.
10351 * c.opt ([Wnarrowing]): Update.
10352
d2e312d7
PC
103532011-10-21 Paolo Carlini <paolo.carlini@oracle.com>
10354
10355 PR c++/45385
10356 * c-common.c (conversion_warning): Remove code looking for
10357 artificial operands.
10358
d17687f6
DS
103592011-10-18 Dodji Seketeli <dodji@redhat.com>
10360
10361 PR bootstrap/50760
10362 * c-lex.c (fe_file_change): Use LINEMAP_SYSP when
9faeb493 10363 !NO_IMPLICIT_EXTERN_C.
d17687f6 10364
fc8396e9
PC
103652011-10-17 Michael Spertus <mike_spertus@symantec.com>
10366
10367 * c-common.c (c_common_reswords): Add __bases,
10368 __direct_bases.
10369 * c-common.h: Add RID_BASES and RID_DIRECT_BASES.
10370
103712011-10-17 Paolo Carlini <paolo.carlini@oracle.com>
10372
10373 PR c++/50757
10374 * c.opt ([Wnonnull]): Add C++ and Objective-C++.
10375
847e697a
TT
103762011-10-15 Tom Tromey <tromey@redhat.com>
10377 Dodji Seketeli <dodji@redhat.com>
10378
10379 * c.opt (fdebug-cpp): New option.
10380 * c-opts.c (c_common_handle_option): Handle the option.
10381 * c-ppoutput.c (maybe_print_line_1): New static function. Takes an
10382 output stream in parameter. Factorized from ...
10383 (maybe_print_line): ... this. Dump location debug information when
10384 -fdebug-cpp is in effect.
10385 (print_line_1): New static function. Takes an output stream in
10386 parameter. Factorized from ...
10387 (print_line): ... here. Dump location information when -fdebug-cpp
10388 is in effect.
10389 (scan_translation_unit): Dump location information when
10390 -fdebug-cpp is in effect.
10391
92582b75
TT
103922011-10-15 Tom Tromey <tromey@redhat.com>
10393 Dodji Seketeli <dodji@redhat.com>
10394
10395 * c.opt (ftrack-macro-expansion): New option. Handle it with and
10396 without argument.
10397 * c-opts.c (c_common_handle_option)<case
10398 OPT_ftrack_macro_expansion_, case OPT_ftrack_macro_expansion>: New
10399 cases. Handle -ftrack-macro-expansion with and without argument.
10400
46427374
TT
104012011-10-15 Tom Tromey <tromey@redhat.com>
10402 Dodji Seketeli <dodji@redhat.com>
10403
10404 * c-ppoutput.c (scan_translation_unit, maybe_print_line)
10405 (print_line, cb_define, do_line_change): Adjust to avoid touching
10406 the internals of struct line_map. Use the public API instead.
10407 * c-pch.c (c_common_read_pch): Likewise.
10408 * c-lex.c (fe_file_change): Likewise.
10409
fc8396e9
PC
104102011-10-14 Paolo Carlini <paolo.carlini@oracle.com>
10411
10412 PR c++/17212
10413 * c.opt ([Wformat-zero-length]): Add C++ and Objective-C++.
10414
104152011-10-11 Paolo Carlini <paolo.carlini@oracle.com>
10416
10417 PR c++/33067
10418 * c-pretty-print.c (pp_c_floating_constant): Output
10419 max_digits10 (in the ISO C++ WG N1822 sense) decimal digits.
10420
e79983f4
MM
104212011-10-11 Michael Meissner <meissner@linux.vnet.ibm.com>
10422
10423 * c-common.c (def_builtin_1): Delete old interface with two
10424 parallel arrays to hold standard builtin declarations, and replace
10425 it with a function based interface that can support creating
10426 builtins on the fly in the future. Change all uses, and poison
10427 the old names. Make sure 0 is not a legitimate builtin index.
10428 * c-omp.c (c_finish_omp_barrier): Ditto.
10429 (c_finish_omp_taskwait): Ditto.
10430 (c_finish_omp_flush): Ditto.
10431
6637388f
TG
104322011-10-11 Tristan Gingold <gingold@adacore.com>
10433
10434 * c.opt: (fallow-parameterless-variadic-functions): New.
10435
3797cb21
DS
104362011-09-08 Dodji Seketeli <dodji@redhat.com>
10437
10438 PR c++/33255 - Support -Wunused-local-typedefs warning
10439 * c-common.h (struct c_language_function::local_typedefs): New
10440 field.
9faeb493
UB
10441 (record_locally_defined_typedef, maybe_record_typedef_use)
10442 (maybe_warn_unused_local_typedefs): Declare new functions.
3797cb21 10443 * c-common.c (record_locally_defined_typedef)
9faeb493
UB
10444 (maybe_record_typedef_use)
10445 (maybe_warn_unused_local_typedefs): Define new functions.
3797cb21
DS
10446 * c.opt: Declare new -Wunused-local-typedefs flag.
10447
693ddb1b
EB
104482011-09-06 Eric Botcazou <ebotcazou@adacore.com>
10449
10450 PR middle-end/50266
10451 * c-common.c (c_fully_fold_internal) <ADDR_EXPR>: Fold offsetof-like
10452 computations.
10453
830c740f
RG
104542011-09-05 Richard Guenther <rguenther@suse.de>
10455
10456 * c-common.c (complete_array_type): Use ssize_int (-1) instead
10457 of integer_minus_one_node for empty array upper bounds.
10458
892a371f
DS
104592011-08-28 Dodji Seketeli <dodji@redhat.com>
10460
10461 * c-pch.c (c_common_read_pch): Call linemap_add with LC_ENTER as
10462 it's the first time it's being called on this main TU.
10463
0e3fdb48
RB
104642011-08-24 Richard Guenther <rguenther@suse.de>
10465
10466 PR c/49396
10467 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Fix conditional.
10468
104692011-08-22 Gabriel Charette <gchare@google.com>
e3dfef44
GC
10470
10471 * c-opts.c (c_finish_options): Force BUILTINS_LOCATION for tokens
10472 defined in cpp_init_builtins and c_cpp_builtins.
10473
d4a83c10
JM
104742011-08-19 Joseph Myers <joseph@codesourcery.com>
10475
10476 * c-common.c (c_common_reswords): Add __builtin_complex.
10477 * c-common.h (RID_BUILTIN_COMPLEX): New.
10478
bbceee64
JM
104792011-08-18 Joseph Myers <joseph@codesourcery.com>
10480
10481 * c-common.c (c_common_reswords): Add _Noreturn.
10482 (keyword_is_function_specifier): Handle RID_NORETURN.
10483 * c-common.h (RID_NORETURN): New.
10484
3f8257db 104852011-08-10 Artjoms Sinkarovs <artyom.shinakroff@gmail.com>
0e3a99ae
AS
10486
10487 * c-common.c (unsafe_conversion_p): New function. Check if it is
10488 unsafe to convert an expression to the type.
10489 (conversion_warning): Adjust, use unsafe_conversion_p.
10490 * c-common.h (unsafe_conversion_p): New function declaration.
10491
20906c66
JJ
104922011-08-02 Jakub Jelinek <jakub@redhat.com>
10493
10494 * c-common.h (c_finish_omp_atomic): Adjust prototype.
10495 (c_finish_omp_taskyield): New prototype.
10496 * c-omp.c (c_finish_omp_atomic): Add OPCODE, V, LHS1 and RHS1
10497 arguments. Handle OMP_ATOMIC_READ, OMP_ATOMIC_CAPTURE_OLD and
10498 OMP_ATOMIC_CAPTURE_NEW in addition to OMP_ATOMIC. If LHS1
10499 or RHS1 have side-effects, evaluate those too in the right spot,
10500 if it is a decl and LHS is also a decl, error out if they
10501 aren't the same.
10502 (c_finish_omp_taskyield): New function.
10503 * c-cppbuiltin.c (c_cpp_builtins): Change _OPENMP to 201107.
10504 * c-pragma.c (omp_pragmas): Add taskyield.
10505 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_TASKYIELD.
10506 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_FINAL and
10507 PRAGMA_OMP_CLAUSE_MERGEABLE.
10508
770e5a2e
DS
105092011-07-25 Dodji Seketeli <dodji@redhat.com>
10510
10511 * c-common.h (set_underlying_type): Remove parm name from
10512 declaration.
10513
1baae426
RG
105142011-07-25 Romain Geissler <romain.geissler@gmail.com>
10515
10516 * c-pretty-print.h: Search c-common.h in c-family.
9faeb493 10517
fcb21722
JM
105182011-07-22 Jason Merrill <jason@redhat.com>
10519
76f86d00
JM
10520 PR c++/49793
10521 * c.opt (Wnarrowing): New.
10522
3a636414
JM
10523 PR c++/30112
10524 * c-common.h: Declare c_linkage_bindings.
10525 * c-pragma.c (handle_pragma_redefine_extname): Use it.
10526
fcb21722
JM
10527 PR c++/49813
10528 * c-opts.c (set_std_cxx0x): Set flag_isoc94 and flag_isoc99.
10529 * c-pretty-print.c (pp_c_cv_qualifiers): Check c_dialect_cxx as well
10530 as flag_isoc99 for 'restrict'.
10531 (pp_c_specifier_qualifier_list): Likewise for _Complex.
10532
02614448
ILT
105332011-07-21 Ian Lance Taylor <iant@google.com>
10534
10535 PR middle-end/49705
10536 * c-common.c (c_disable_warnings): New static function.
10537 (c_enable_warnings): New static function.
10538 (c_fully_fold_internal): Change local unused_p to bool. Call
10539 c_disable_warnings and c_enable_warnings rather than change
10540 c_inhibit_evaluation_warnings.
10541
34429675
JM
105422011-07-20 Jason Merrill <jason@redhat.com>
10543
10544 PR c++/6709 (DR 743)
10545 PR c++/42603 (DR 950)
10546 * c-common.h (CPP_KEYWORD, CPP_TEMPLATE_ID): Move from cp/parser.h.
10547 (CPP_NESTED_NAME_SPECIFIER, N_CP_TTYPES): Likewise.
10548 (CPP_DECLTYPE): New.
10549 * c-common.c (c_parse_error): Handle CPP_DECLTYPE.
10550
5d49b6a7
RG
105512011-07-19 Richard Guenther <rguenther@suse.de>
10552
10553 * c-common.c (pointer_int_sum): Use fold_build_pointer_plus.
10554 * c-omp.c (c_finish_omp_for): Likewise.
10555
e84a58ff
EB
105562011-07-12 Eric Botcazou <ebotcazou@adacore.com>
10557
10558 * c-ada-spec.c (dump_nested_types): Put semi-colon after empty loop
10559 body on the next line.
10560
329af3c7
JM
105612011-07-08 Jason Merrill <jason@redhat.com>
10562
4063e61b
JM
10563 PR c++/45437
10564 * c-omp.c (check_omp_for_incr_expr): Handle preevaluation.
10565
329af3c7
JM
10566 PR c++/49673
10567 * c-common.c (c_apply_type_quals_to_decl): Don't check
10568 TYPE_NEEDS_CONSTRUCTING.
10569
1a072294
RG
105702011-07-06 Richard Guenther <rguenther@suse.de>
10571
10572 * c-common.c (c_common_nodes_and_builtins):
10573 Merge calls to build_common_tree_nodes and build_common_tree_nodes_2.
10574
fce5dddd
RG
105752011-07-05 Richard Guenther <rguenther@suse.de>
10576
10577 * c-common.c (c_common_nodes_and_builtins): Build all common
10578 tree nodes first.
10579
45d439ac
JJ
105802011-06-27 Jakub Jelinek <jakub@redhat.com>
10581
56300785
JJ
10582 * c-common.h (c_tree_chain_next): New static inline function.
10583
45d439ac
JJ
10584 * c-common.c (check_builtin_function_arguments): Handle
10585 BUILT_IN_ASSUME_ALIGNED.
10586
e0a8ecf2
AM
105872011-06-21 Andrew MacLeod <amacleod@redhat.com>
10588
10589 * c-common.c: Add sync_ or SYNC__ to builtin names.
10590 * c-omp.c: Add sync_ or SYNC__ to builtin names.
dfb43cd5
PV
10591
105922011-06-20 Pierre Vittet <piervit@pvittet.com>
10593
10594 * c-pragma.h (pragma_handler_1arg, pragma_handler_2arg): New
10595 handler.
10596 (gen_pragma_handler): New union.
10597 (internal_pragma_handler): New type.
10598 (c_register_pragma_with_data)
10599 (c_register_pragma_with_expansion_and_data): New functions.
10600
10601 * c-pragma.c (registered_pragmas, c_register_pragma_1)
10602 (c_register_pragma, c_register_pragma_with_expansion)
10603 (c_invoke_pragma_handler): Changed to work with
10604 internal_pragma_handler.
10605 (c_register_pragma_with_data)
10606 (c_register_pragma_with_expansion_and_data): New functions.
10607
677f3fa8
JM
106082011-06-14 Joseph Myers <joseph@codesourcery.com>
10609
10610 * c-common.c: Include common/common-target.h.
10611 (handle_section_attribute): Use
10612 targetm_common.have_named_sections.
10613 * c-cppbuiltin.c: Include common/common-target.h.
10614 (c_cpp_builtins): Use targetm_common.except_unwind_info.
10615
d7fc8c14
RG
106162011-06-10 Richard Guenther <rguenther@suse.de>
10617
10618 * c-pretty-print.c (pp_c_type_specifier): Use pp_c_identifier
10619 to print a IDENTIFIER_NODE.
10620
10e48e39
RO
106212011-06-09 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
10622 Joseph Myers <joseph@codesourcery.com>
10623
10624 * c.opt (fbuilding-libgcc): New option.
10625 * c-cppbuiltin.c (c_cpp_builtins): Define
10626 __LIBGCC_TRAMPOLINE_SIZE__ if flag_building_libgcc.
10627
6976ae51
JM
106282011-06-07 Jason Merrill <jason@redhat.com>
10629
3ff60975
JM
10630 * c-common.c (max_tinst_depth): Lower default to 900.
10631
6976ae51
JM
10632 * c-format.c (gcc_cxxdiag_char_table): Add 'S' format.
10633
009db074
RG
106342011-06-07 Richard Guenther <rguenther@suse.de>
10635
10636 * c-common.c (c_common_nodes_and_builtins): Do not set
10637 size_type_node or call set_sizetype.
10638
b4592b92
DS
106392011-06-07 Dodji Seketeli <dodji@redhat.com>
10640
10641 PR debug/49130
10642 * c-pretty-print.c (pp_c_integer_constant): Consider the canonical
9faeb493 10643 type when using pointer comparison to compare types.
b4592b92 10644
014ab419
JW
106452011-06-02 Jonathan Wakely <jwakely.gcc@gmail.com>
10646
10647 * c.opt: Add -Wdelete-non-virtual-dtor.
10648 * c-opts.c (c_common_handle_option): Include it in -Wall.
10649
4f60111f
NF
106502011-05-30 Nathan Froyd <froydnj@gcc.gnu.org>
10651
10652 PR bootstrap/49190
10653
10654 Revert:
10655 2011-05-26 Nathan Froyd <froydnj@codesourcery.com>
10656
10657 * c-common.h (struct c_common_identifier): Inherit from tree_typed,
10658 not tree_common.
10659
4cc4f2f4
JJ
106602011-05-27 Jakub Jelinek <jakub@redhat.com>
10661
10662 PR c++/49165
10663 * c-common.c (c_common_truthvalue_conversion) <case COND_EXPR>: For
10664 C++ don't call c_common_truthvalue_conversion on void type arms.
10665
38e01f9e
NF
106662011-05-27 Nathan Froyd <froydnj@codesourcery.com>
10667
10668 * c-common.h (struct stmt_tree_s) [x_cur_stmt_list]: Change to a VEC.
10669 (stmt_list_stack): Define.
10670 (cur_stmt_list): Adjust for new type of x_cur_stmt_list.
10671 * c-semantics.c (push_stmt_list, pop_stmt_list): Likewise.
10672
92e948a8
NF
106732011-05-26 Nathan Froyd <froydnj@codesourcery.com>
10674
10675 * c-common.c (warning_candidate_p): Check for BLOCKs.
10676
a2fc3e63
NF
106772011-05-26 Nathan Froyd <froydnj@codesourcery.com>
10678
10679 * c-common.h (struct c_common_identifier): Inherit from tree_typed,
10680 not tree_common.
10681
0957c029
JJ
106822011-05-25 Jakub Jelinek <jakub@redhat.com>
10683
10684 * c-common.c (def_fn_type): Remove extra va_end.
10685
828fb3ba
JM
106862011-05-23 Jason Merrill <jason@redhat.com>
10687
10688 PR c++/48106
10689 * c-common.c (c_common_get_narrower): New.
10690 (shorten_binary_op, shorten_compare, warn_for_sign_compare): Use it.
10691
dde05067
NF
106922011-05-23 Nathan Froyd <froydnj@codesourcery.com>
10693
10694 * c-common.h (check_function_arguments): Tweak prototype of
10695 check_function_arguments.
10696 * c-common.c (check_function_arguments): Likewise. Adjust
10697 calls to check_function_nonnull, check_function_format, and
10698 check_function_sentinel.
10699 (check_function_sentinel): Take a FUNCTION_TYPE rather than
10700 separate attributes and typelist arguments. Use
10701 FOREACH_FUNCTION_ARGS to iterate over argument types.
10702
3c0d13bf
PC
107032011-05-15 Paolo Carlini <paolo.carlini@oracle.com>
10704
10705 * c-common.c (c_common_reswords): Reorder.
10706 * c-common.h (rid): Likewise.
10707
8242dd04
NF
107082011-05-10 Nathan Froyd <froydnj@codesourcery.com>
10709
10710 * c-common.c (def_fn_type): Don't call build_function_type, call
10711 build_function_type_array or build_varargs_function_type_array
10712 instead.
10713 (c_common_nodes_and_builtins): Likewise.
10714
3d528853
NF
107152011-05-05 Nathan Froyd <froydnj@codesourcery.com>
10716
10717 * c-common.c (c_add_case_label): Omit the loc argument to
10718 build_case_label.
10719 * c-common.h (build_case_label): Remove.
10720 * c-semantics.c (build_case_label): Remove.
10721
a04a722b
JM
107222011-05-05 Joseph Myers <joseph@codesourcery.com>
10723
10724 * c-objc.h (objc_start_method_definition): Update prototype.
10725 * stub-objc.c (objc_start_method_definition): Add extra parameter.
10726
e19a18d4
NF
107272011-05-04 Nathan Froyd <froydnj@codesourcery.com>
10728
10729 * c-common.c (check_main_parameter_types): Reindent. Don't use
10730 TYPE_ARG_TYPES directly.
10731 (handle_nonnull_attribute): Likewise.
10732 (sync_resolve_params): Likewise.
10733 * c-format.c (handle_format_arg_attribute): Likewise. Adjust call
10734 to check_format_string.
10735 (handle_format_attribute): Likewise.
10736 (check_format_string): Take a function type to examine instead of
10737 a type list. Use a function_arg_iterator to step through argument
10738 types.
10739
c62c040f
RG
107402011-05-04 Richard Guenther <rguenther@suse.de>
10741
10742 * c-common.c (fix_string_type): Use size_int for index type bounds.
10743 (start_fname_decls): Do not pass NULL to build_int_cst.
10744 (c_init_attributes): Likewise.
10745 * c-lex.c (c_lex_with_flags): Likewise.
10746
c12ff9d8
JM
107472011-04-27 Jason Merrill <jason@redhat.com>
10748
10749 * c-common.c (make_tree_vector_from_list): New.
10750 * c-common.h: Declare it.
10751
304dfbe3
RG
107522011-04-26 Richard Guenther <rguenther@suse.de>
10753
10754 PR preprocessor/48248
10755 * c-ppoutput.c (maybe_print_line): Always optimize newlines
10756 for output size with -P.
10757
3c0d13bf
PC
107582011-04-25 Paolo Carlini <paolo.carlini@oracle.com>
10759
10760 * c-common.c (struct c_common_resword): Add __underlying_type.
10761 * c-common.h (enum rid): Add RID_UNDERLYING_TYPE.
10762
04695783
JM
107632011-04-20 Jim Meyering <meyering@redhat.com>
10764
10765 * c-format.c (init_dollar_format_checking): Remove useless
10766 if-before-free.
10767
0dc33c3c
NP
107682011-04-15 Nicola Pero <nicola.pero@meta-innovation.com>
10769
10770 * c-objc.h (objc_get_interface_ivars): Removed.
3c0d13bf 10771 (objc_detect_field_duplicates): New.
0dc33c3c 10772 * stub-objc.c: Likewise.
3c0d13bf 10773
c59633d9
NP
107742011-04-14 Nicola Pero <nicola.pero@meta-innovation.com>
10775
10776 * stub-objc.c (objc_declare_protocols): Renamed to
10777 objc_declare_protocol.
10778 * c-objc.h: Likewise.
3c0d13bf 10779
32dabdaf
NP
107802011-04-14 Nicola Pero <nicola.pero@meta-innovation.com>
10781
10782 * stub-objc.c (objc_declare_class): Updated argument name.
10783
81f653d6
NF
107842011-04-12 Nathan Froyd <froydnj@codesourcery.com>
10785
10786 * c-common.h (c_common_init_ts): Declare.
10787 * c-common.c (c_common_init_ts): Define.
10788
eb345401
NP
107892011-04-12 Nicola Pero <nicola.pero@meta-innovation.com>
10790
10791 * c-objc.h (objc_build_message_expr): Updated prototype.
10792 * stub-objc.c (objc_build_message_expr): Likewise.
9faeb493 10793
a358e188
MJ
107942011-04-12 Martin Jambor <mjambor@suse.cz>
10795
10796 * c-gimplify.c (c_genericize): Call cgraph_get_create_node instead
10797 of cgraph_node.
10798
e6313a78
RG
107992011-04-11 Richard Guenther <rguenther@suse.de>
10800
10801 * c-common.c (complete_array_type): Build a range type of
10802 proper type.
10803
dcf0c47e
NF
108042011-04-08 Nathan Froyd <froydnj@codesourcery.com>
10805
10806 * c-common.c (handle_sentinel_attribute): Don't use TYPE_ARG_TYPES.
10807 (handle_type_generic_attribute): Likewise.
10808
1ee44b26
JM
108092011-04-07 Jason Merrill <jason@redhat.com>
10810
10811 PR c++/48450
10812 * c-common.c (c_common_truthvalue_conversion): Don't ignore
10813 conversion from C++0x scoped enum.
10814
acce4e77
JM
108152011-04-06 Joseph Myers <joseph@codesourcery.com>
10816
10817 * c-target-def.h: New file.
10818 * c-target.def: New file.
10819 * c-target.h: New file.
10820 * c-common.c (targetcm): Don't define here.
10821 * c-common.h (default_handle_c_option): Declare.
10822 * c-format.c: Include c-target.h instead of target.h.
10823 * c-opts.c: Include c-target.h instead of target.h. Explicitly
10824 include tm.h.
10825 (default_handle_c_option): Move from targhooks.c.
10826
e2eefb55
JJ
108272011-03-29 Jakub Jelinek <jakub@redhat.com>
10828
10829 PR preprocessor/48248
10830 * c-ppoutput.c (print): Add src_file field.
10831 (init_pp_output): Initialize it.
10832 (maybe_print_line): Don't optimize by adding up to 8 newlines
10833 if map->to_file and print.src_file are different file.
10834 (print_line): Update print.src_file.
10835
ba78087b
KT
108362011-03-25 Kai Tietz <ktietz@redhat.com>
10837
10838 * c-ada-spec.c (compare_comment): Use filename_cmp
10839 instead of strcmp for filename.
10840
0edf1bb2
JL
108412011-03-25 Jeff Law <law@redhat.com>
10842
adfac8df 10843 * c-common.c (def_fn_type): Add missing va_end.
0edf1bb2 10844
c7dc8804
JM
108452011-03-25 Jason Merrill <jason@redhat.com>
10846
10847 * c.opt: Add -std=c++03.
10848
d1d879b1
EB
108492011-03-22 Eric Botcazou <ebotcazou@adacore.com>
10850
10851 * c-ada-spec.c (dump_ada_template): Skip non-class instances.
10852
3f8257db 108532011-03-17 Kai Tietz <ktietz@redhat.com>
62d784f7
KT
10854
10855 PR target/12171
5050afdf
KT
10856 * c-pretty-print.c (pp_c_specifier_qualifier_list):
10857 Display allowed attributes for function pointer types.
10858 (pp_c_attributes_display): New function to display
10859 attributes having affects_type_identity flag set to true.
10860 * c-pretty-print.h (pp_c_attributes_display): New prototype.
10861
62d784f7
KT
10862 * c-common.c (c_common_attribute_table):
10863 Add new element.
10864 (c_common_format_attribute_table): Likewise.
10865
82d37118
JM
108662011-03-18 Jason Merrill <jason@redhat.com>
10867
49a000c3
JM
10868 * c.opt (fconstexpr-depth): Add Var(max_constexpr_depth).
10869 * c-common.h: Don't declare it here.
10870 * c-common.c: Or define it here.
10871 * c-opts.c (c_common_handle_option): Or set it here.
10872
82d37118
JM
10873 PR c++/35315
10874 * c-common.c (handle_transparent_union_attribute): Don't
10875 make a duplicate type in C++.
10876
17bc631c
JM
108772011-03-15 Jason Merrill <jason@redhat.com>
10878
10879 * c-common.c (max_constexpr_depth): New.
10880 * c-common.h: Declare it.
10881 * c-opts.c (c_common_handle_option): Set it.
10882 * c.opt (fconstexpr-depth): New option.
10883
1b9b91a6
JM
108842011-03-11 Jason Merrill <jason@redhat.com>
10885
f231b5ff
JM
10886 * c-common.c (attribute_takes_identifier_p): Add missing const.
10887
1b9b91a6
JM
10888 PR c++/46803
10889 * c-common.c (attribute_takes_identifier_p): Assume that an
10890 unknown attribute takes an identifier.
10891
a19e4d44
NF
108922011-03-07 Nathan Froyd <froydnj@codesourcery.com>
10893
10894 PR c/47786
10895 * c-common.c (c_type_hash): Call list_length instead of iterating
10896 through DECL_CHAIN. Rename 'i' to 'n_elements'.
10897
982d62f6
JJ
108982011-02-19 Jakub Jelinek <jakub@redhat.com>
10899
10900 PR c/47809
10901 * c-common.c (c_fully_fold_internal): Handle VIEW_CONVERT_EXPR.
10902
0a256240
NP
109032011-02-17 Iain Sandoe <iains@gcc.gnu.org>
10904
10905 * c.opt (fobjc-abi-version=) New.
10906 (fobjc-nilcheck): New.
10907
ba9e6dd5
NF
109082011-02-03 Nathan Froyd <froydnj@codesourcery.com>
10909
10910 PR c++/46890
10911 * c-common.h (keyword_is_decl_specifier): Declare.
10912 * c-common.c (keyword_is_decl_specifier): Define.
10913 (keyword_is_function_specifier): New function.
10914
7273813a
JJ
109152011-01-26 Jakub Jelinek <jakub@redhat.com>
10916
10917 PR c/47473
10918 * c-lex.c (interpret_float): If CPP_N_IMAGINARY, ensure
10919 EXCESS_PRECISION_EXPR is created with COMPLEX_TYPE instead of
10920 REAL_TYPE.
10921
908ef79b
AC
109222011-01-26 Arnaud Charlet <charlet@adacore.com>
10923
10924 * c-ada-spec.c (dump_generic_ada_node): Avoid dereferencing null type.
10925
237e9384
JJ
109262011-01-26 Jakub Jelinek <jakub@redhat.com>
10927
10928 PR pch/47430
10929 * c-opts.c (c_common_post_options): Call c_common_no_more_pch
10930 after init_c_lex if pch_file is set.
10931
47ea1edf
DK
109322011-01-26 Dave Korn <dave.korn.cygwin@gmail.com>
10933
d4dba752 10934 PR c++/43601
47ea1edf
DK
10935 * c.opt (-fkeep-inline-dllexport): New switch.
10936
2aa9c6ae
RG
109372011-01-12 Richard Guenther <rguenther@suse.de>
10938
10939 PR middle-end/32511
10940 * c-common.c (handle_weak_attribute): Warn instead of error
10941 on declaring an inline function weak.
10942
7bd11157
TT
109432011-01-05 Tom Tromey <tromey@redhat.com>
10944
10945 * c-common.h (lvalue_error): Update.
10946 * c-common.c (lvalue_error): Add 'loc' argument. Call error_at,
10947 not error.
10948
0e66e494 109492010-12-29 Nicola Pero <nicola.pero@meta-innovation.com>
9faeb493 10950
b4f588c4
NP
10951 PR objc/47075
10952 * c-objc.h (objc_finish_message_expr): Added argument to
10953 prototype.
10954
f4da8dce
NF
109552010-12-22 Nathan Froyd <froydnj@codesourcery.com>
10956
10957 * c-common.c (handle_nonnull_attribute, handle_sentinel_attribute):
10958 Use prototype_p.
10959
46270f14
NP
109602010-12-18 Nicola Pero <nicola.pero@meta-innovation.com>
10961
10962 * c-objc.h (objc_maybe_warn_exceptions): New.
9faeb493 10963 * stub-objc.c (objc_maybe_warn_exceptions): New.
46270f14 10964
4816c593
NF
109652010-12-10 Nathan Froyd <froydnj@codesourcery.com>
10966
10967 * c-common.h (readonly_error): Declare.
10968 * c-common.c (readonly_error): Define.
10969
7a6daeb0
NF
109702010-12-09 Nathan Froyd <froydnj@codesourcery.com>
10971
10972 * c-common.h (invalid_indirection_error): Declare.
10973 * c-common.c (invalid_indirection_error): Define.
10974
892f6119
RG
109752010-12-03 Richard Guenther <rguenther@suse.de>
10976
10977 PR c/46745
10978 * c-pretty-print.c (pp_c_postfix_expression): Handle MEM_REF.
10979 (pp_c_unary_expression): Likewise.
10980 (pp_c_expression): Likewise.
10981
6c39e757
NP
109822010-11-30 Nicola Pero <nicola.pero@meta-innovation.com>
10983
10984 * c-common.h (objc_finish_function): New.
10985 (objc_non_volatilized_type): Removed.
10986 (objc_type_quals_match): Removed.
10987 * stub-objc.c (objc_finish_function): New.
10988 (objc_non_volatilized_type): Removed.
10989 (objc_type_quals_match): Removed.
9faeb493 10990
7c475d11
JM
109912010-11-30 Joseph Myers <joseph@codesourcery.com>
10992
10993 * c-common.h (parse_optimize_options): Declare.
10994 * c-cppbuiltin.c, c-format.c, c-gimplify.c, c-lex.c, c-omp.c,
10995 c-pch.c, c-pragma.c, c-semantics.c: Don't include toplev.h.
10996
71f3e391
JM
109972010-11-29 Joseph Myers <joseph@codesourcery.com>
10998
10999 * c-opts.c (check_deps_environment_vars): Use getenv instead of
11000 GET_ENVIRONMENT.
11001 * c-pch.c (O_BINARY): Don't define here.
11002 * c-pragma.h: Include "cpplib.h" instead of <cpplib.h>.
11003
d5fabb58
JM
110042010-11-25 Joseph Myers <joseph@codesourcery.com>
11005
11006 * c-cppbuiltin.c (c_cpp_builtins): Pass &global_options to
11007 targetm.except_unwind_info.
11008
299404a1
JM
110092010-11-23 Joseph Myers <joseph@codesourcery.com>
11010
11011 * c-opts.c (c_common_handle_option): Pass location to
11012 set_struct_debug_option.
11013
c98cd5bf
JM
110142010-11-23 Joseph Myers <joseph@codesourcery.com>
11015
11016 * c-common.c (visibility_options): Move from ../opts.c.
11017 * c-common.h (struct visibility_flags, visibility_options):
11018 Declare here.
11019 * c-opts.c (finish_options): Rename to c_finish_options.
11020 (c_common_init): Update call to finish_options.
11021
a9546771
NP
110222010-11-22 Nicola Pero <nicola.pero@meta-innovation.com>
11023
11024 PR objc/34033
11025 * c-lex.c (lex_string): Check that each string in an Objective-C
11026 string concat sequence starts with either one or zero '@', and
11027 that there are no spurious '@' signs at the end.
11028
24a57808
JM
110292010-11-20 Joseph Myers <joseph@codesourcery.com>
11030
11031 * c-pragma.c: Remove conditionals on HANDLE_PRAGMA_PACK,
11032 HANDLE_PRAGMA_PACK_PUSH_POP, HANDLE_PRAGMA_WEAK and
11033 HANDLE_PRAGMA_VISIBILITY.
11034 * c-pragma.h (HANDLE_PRAGMA_WEAK, HANDLE_PRAGMA_PACK,
11035 HANDLE_PRAGMA_VISIBILITY): Don't define.
11036 (HANDLE_SYSV_PRAGMA, HANDLE_PRAGMA_PACK_PUSH_POP): Don't test.
11037
a9aa2c3a
NF
110382010-11-20 Nathan Froyd <froydnj@codesourcery.com>
11039
11040 PR c++/16189
11041 PR c++/36888
11042 PR c++/45331
11043 * c-common.h (keyword_begins_type_specifier): Declare.
11044 (keyword_is_storage_class_specifier): Declare.
11045 (keyword_is_type_qualifier): Declare.
11046 * c-common.c (keyword_begins_type_specifier): New function.
11047 (keyword_is_storage_class_specifier): New function.
11048 (keyword_is_type_qualifier): Declare.
11049
5386338c
JM
110502010-11-19 Joseph Myers <joseph@codesourcery.com>
11051
11052 PR c/46547
11053 * c-common.c (in_late_binary_op): Define.
11054 (c_common_truthvalue_conversion): Check in_late_binary_op before
11055 calling c_save_expr.
11056 * c-common.h (in_late_binary_op): Declare.
11057
69ccdddb
JM
110582010-11-19 Joseph Myers <joseph@codesourcery.com>
11059
11060 * c-opts.c (c_common_handle_option): Update calls to
11061 set_struct_debug_option.
11062
6b192a09
NP
110632010-11-19 Nicola Pero <nicola.pero@meta-innovation.com>
11064
11065 * c-common.h (objc_declare_protocols): Added additional argument.
11066 * stub-objc.c (objc_declare_protocol): Same change.
9faeb493 11067
fb52b50a
NF
110682010-11-18 Nathan Froyd <froydnj@codesourcery.com>
11069
11070 PR c/33193
11071 * c-common.h (build_real_imag_expr): Declare.
11072 * c-semantics.c (build_real_imag_expr): Define.
11073
b37421c6
JM
110742010-11-17 Joseph Myers <joseph@codesourcery.com>
11075
11076 * c-opts.c (c_common_parse_file): Take no arguments.
11077 * c-common.h (c_common_parse_file): Update prototype.
11078
07078664
JJ
110792010-11-16 Jakub Jelinek <jakub@redhat.com>
11080
11081 PR c++/46401
11082 * c-common.c (warning_candidate_p): Don't track non-const calls
11083 or STRING_CSTs.
11084
c6a13190
ILT
110852010-11-15 Ian Lance Taylor <iant@google.com>
11086
11087 * c-lex.c (init_c_lex): Set macro debug callbacks if
11088 flag_dump_go_spec is set.
11089
925e8657
NP
110902010-11-15 Nicola Pero <nicola.pero@meta-innovation.com>
11091
11092 * c-common.h (objc_build_incr_expr_for_property_ref): New.
11093 * stub-objc.c (objc_build_incr_expr_for_property_ref): New.
11094
bb0a9581
NF
110952010-11-15 Nathan Froyd <froydnj@codesourcery.com>
11096
11097 PR preprocessor/45038
11098 * c-cppbuiltin.c (c_cpp_builtins): Use different format for C++
11099 dialects.
11100
c5fa0890
JM
111012010-11-12 Joseph Myers <joseph@codesourcery.com>
11102
11103 * c-common.h (c_family_lang_mask): Declare.
11104 * c-opts.c (c_family_lang_mask): Make extern.
11105 * c-pragma.c (handle_pragma_diagnostic): Use
11106 control_warning_option.
11107
a4d8c676
JM
111082010-11-12 Joseph Myers <joseph@codesourcery.com>
11109
11110 * c-common.c (parse_optimize_options): Update call to
11111 decode_options.
11112 * c-common.h (c_common_handle_option): Update prototype.
11113 * c-opts.c (c_common_handle_option): Take location_t parameter and
11114 pass it to other functions.
11115
f954bd2c
JM
111162010-11-11 Joseph Myers <joseph@codesourcery.com>
11117
11118 * c-opts.c (warning_as_error_callback): Remove.
11119 (c_common_initialize_diagnostics): Don't call
11120 register_warning_as_error_callback.
11121 (c_common_handle_option): Handle -Werror=normalized= here.
11122
d8a07487
JM
111232010-11-10 Joseph Myers <joseph@codesourcery.com>
11124
11125 * c-common.c (handle_mode_attribute): Use %' and word "signedness"
11126 in diagnostic.
11127 * c-opts.c (c_common_parse_file): Start diagnostics with lowercase
11128 letter.
11129 * c-pragma.c (handle_pragma_target, handle_pragma_optimize):
11130 Remove trailing '.' from diagnostics.
11131 * c.opt (Wwrite-strings_: Avoid '`' in help text.
11132
d5478783
JM
111332010-11-10 Joseph Myers <joseph@codesourcery.com>
11134
11135 * c-common.c (parse_optimize_options): Pass global_dc to
11136 decode_options.
11137 * c-opts.c (c_common_handle_option): Pass &global_options to
11138 set_Wstrict_aliasing.
11139 * c.opt (v): Don't mark Common or document here.
11140
91ebb981
IS
111412010-11-06 Iain Sandoe <iains@gcc.gnu.org>
11142
11143 PR target/44981
11144 * c-format.c (format_type): New type gcc_objc_string_format_type.
11145 (valid_stringptr_type_p): New.
11146 (handle_format_arg_attribute): Use valid_stringptr_type_p ().
9faeb493 11147 (check_format_string): Pass expected type, use
91ebb981
IS
11148 valid_stringptr_type_p (), check that the format string types are
11149 consistent with the format specification.
11150 (decode_format_attr): Warn if NSString is used outside objective-c.
11151 (format_types_orig): Add NSString.
11152 (format_name): New.
11153 (format_flags): New.
11154 (check_format_arg): Handle format strings requiring an external parser.
11155 first_target_format_type: New variable.
11156 (handle_format_attribute): Set up first_target_format_type, pass the
11157 expected format arg string type to check_format_string().
ab20d992 11158 * c-common.h (FMT_FLAG_PARSE_ARG_CONVERT_EXTERNAL): New flag.
91ebb981
IS
11159 * stub-objc.c (objc_string_ref_type_p): New.
11160 (objc_check_format_arg): New.
11161
bede2adc
NP
111622010-11-04 Nicola Pero <nicola.pero@meta-innovation.com>
11163
9faeb493 11164 Fixed using the Objective-C 2.0 dot-syntax with class names.
bede2adc
NP
11165 * c-common.h (objc_build_class_component_ref): New.
11166 * stub-objc.c (objc_build_class_component_ref): New.
11167
9a179d01
NP
111682010-11-03 Nicola Pero <nicola.pero@meta-innovation.com>
11169
11170 * c.opt (Wproperty-assign-default): New option.
11171
22d8d616
NP
111722010-11-03 Nicola Pero <nicola.pero@meta-innovation.com>
11173
11174 Implemented -fobjc-std=objc1 flag.
11175 * c.opt (fobjc-std=objc1): New option.
11176
2debdb4f
NP
111772010-11-01 Nicola Pero <nicola.pero@meta-innovation.com>
11178
11179 Implemented format and noreturn attributes for Objective-C methods.
11180 * c-common.c (handle_noreturn_attribute): Recognize 'noreturn'
11181 attribute for Objective-C methods.
11182
ec52b111
JM
111832010-10-31 Jason Merrill <jason@redhat.com>
11184
11185 * c-common.c (conversion_warning, warn_for_collisions_1): Use
11186 EXPR_LOC_OR_HERE.
11187
46a88c12
NP
111882010-10-30 Nicola Pero <nicola.pero@meta-innovation.com>
11189
11190 Implemented Objective-C 2.0 @property, @synthesize and @dynamic.
11191 * c-common.h (enum rid): Removed RID_COPIES and RID_IVAR.
11192 (objc_add_property_declaration): Removed arguments for copies and
11193 ivar.
11194 (objc_build_getter_call): Renamed to
11195 objc_maybe_build_component_ref.
11196 (objc_build_setter_call): Renamed to objc_maybe_build_modify_expr.
11197 (objc_is_property_ref): New.
11198 * c-common.c (c_common_reswords): Removed copies and ivar.
11199 * stub-objc.c (objc_add_property_declaration): Removed arguments
11200 for copies and ivar.
11201 (objc_build_getter_call): Renamed to
11202 objc_maybe_build_component_ref.
11203 (objc_build_setter_call): Renamed to objc_maybe_build_modify_expr.
11204 (objc_is_property_ref): New.
9faeb493 11205
1e4bf85b
AC
112062010-10-29 Arnaud Charlet <charlet@adacore.com>
11207 Matthew Gingell <gingell@adacore.com>
11208
11209 * c-ada-spec.c (separate_class_package): New function.
11210 (pp_ada_tree_identifier): Prefix references to C++ classes with the
11211 name of their enclosing package.
11212 (print_ada_declaration): Use separate_class_package.
11213
81f0bab2
JM
112142010-10-27 Jason Merrill <jason@redhat.com>
11215
2b08f2c5
JM
11216 * c-common.c (c_common_reswords): Add __is_literal_type.
11217 * c-common.h (enum rid): Add RID_IS_LITERAL_TYPE.
11218
81f0bab2
JM
11219 * c-common.c (check_case_value): Remove special C++ code.
11220
200290f2
NP
112212010-10-27 Nicola Pero <nicola.pero@meta-innovation.com>
11222
11223 * c-common.h (enum rid): Added RID_READWRITE, RID_ASSIGN,
11224 RID_RETAIN, RID_COPY and RID_NONATOMIC. Updated RID_FIRST_PATTR
11225 and RID_LAST_PATTR.
11226 (objc_add_property_declaration): Added additional arguments.
11227 (objc_property_attribute_kind): Removed.
11228 (objc_set_property_attr): Removed.
11229 * c-common.c (c_common_reswords): Added readwrite, assign, retain,
11230 copy and nonatomic.
11231 * stub-objc.c (objc_add_property_declaration): Added additional
11232 arguments.
11233 (objc_set_property_attr): Removed.
9faeb493 11234
f614132b
NP
112352010-10-27 Nicola Pero <nicola.pero@meta-innovation.com>
11236
11237 * c-common.h (objc_add_property_variable): Renamed to
11238 objc_add_property_declaration. Added location argument.
11239 * stub-objc.c (objc_add_property_variable): Same change.
b1726d6c 11240
b8a18805
NP
112412010-10-23 Nicola Pero <nicola.pero@meta-innovation.com>
11242
11243 * c-common.h (objc_maybe_printable_name): New.
11244 * stub-objc.c (objc_maybe_printable_name): New.
11245
3f8257db
JJ
112462010-10-22 Artjoms Sinkarovs <artyom.shinakroff@gmail.com>
11247 Andrew Pinski <pinskia@gmail.com>
30cd1c5d
AS
11248
11249 * c-common.h (c_common_mark_addressable_vec): Declare.
11250 * c-common.c (c_common_mark_addressable_vec): New function.
11251
249a82c4
NP
112522010-10-20 Nicola Pero <nicola.pero@meta-innovation.com>
11253
11254 * c-common.h (objc_set_method_type): Removed.
11255 (objc_add_method_declaration): Added boolean argument.
11256 (objc_start_method_definition): Same change.
11257 (objc_build_method_signature): Same change.
11258 * stub-objc.c (objc_set_method_type): Removed.
11259 (objc_add_method_declaration): Added boolean argument.
11260 (objc_start_method_definition): Same change.
11261 (objc_build_method_signature): Same change.
11262
977e30bc
NP
112632010-10-20 Nicola Pero <nicola.pero@meta-innovation.com>
11264
11265 * c-common.h (finish_file): Removed.
11266 (objc_write_global_declarations): New.
11267 * c-opts.c (c_common_parse_file): Do not call finish_file.
11268 * stub-objc.c (objc_write_global_declarations): New.
9faeb493 11269
da57d1b9
NP
112702010-10-18 Nicola Pero <nicola.pero@meta-innovation.com>
11271
11272 Implemented parsing @synthesize and @dynamic for
11273 Objective-C/Objective-C++.
11274 * c-common.h (enum rid): Add RID_AT_SYNTHESIZE and RID_AT_DYNAMIC.
11275 (objc_add_synthesize_declaration): New.
11276 (objc_add_dynamic_declaration): New.
11277 * c-common.c (c_common_reswords): Add synthesize and dynamic.
11278 * stub-objc.c (objc_add_synthesize_declaration): New.
11279 (objc_add_dynamic_declaration): New.
9faeb493 11280
0069111f
MM
112812010-10-18 Michael Meissner <meissner@linux.vnet.ibm.com>
11282
11283 PR target/46041
11284 * c-cppbuiltin.c (mode_has_fma): Move function here from
11285 builtins.c. Don't use the fma optab, instead just use the
11286 HAVE_fma* macros, so that __FP_FAST_FMA* will be defined when
11287 using -save-temps.
11288
e426b47b
NP
112892010-10-18 Nicola Pero <nicola.pero@meta-innovation.com>
11290
11291 Merge from 'apple/trunk' branch on FSF servers.
0069111f 11292
3f8257db 11293 2005-11-08 Fariborz Jahanian <fjahanian@apple.com>
e426b47b 11294
9faeb493 11295 Radar 4330422
e426b47b
NP
11296 * c-common.h (objc_non_volatilized_type): New declaration
11297 * stub-objc.c (objc_non_volatilized_type): New stub.
11298
90fbfdc3
NP
112992010-10-17 Nicola Pero <nicola.pero@meta-innovation.com>
11300
e426b47b 11301 Merge from 'apple/trunk' branch on FSF servers.
90fbfdc3 11302
ab20d992 11303 2006-03-27 Fariborz Jahanian <fjahanian@apple.com>
90fbfdc3 11304
9faeb493 11305 Radar 4133425
90fbfdc3 11306 * c-common.h (objc_diagnose_private_ivar): New decl.
0069111f 11307 * stub-objc.c (objc_diagnose_private_ivar): New stub.
90fbfdc3 11308
c37d8c30
IS
113092010-10-17 Iain Sandoe <iains@gcc.gnu.org>
11310
11311 * c-common.c (c_common_reswords): Add package, RID_AT_PACKAGE.
11312 * c-common.h (enum rid): Add RID_AT_PACKAGE.
11313 (objc_ivar_visibility_kind): New enum.
11314 (objc_set_visibility): Adjust prototype to use visibility enum.
0069111f 11315 * stub-objc.c (objc_set_visibility): Adjust stub to use
c37d8c30
IS
11316 visibility enum.
11317
1b1562a5
MM
113182010-10-14 Michael Meissner <meissner@linux.vnet.ibm.com>
11319
11320 * c-cppbuiltin.c (builtin_define_float_constants): Emit
11321 __FP_FAST_FMA, __FP_FAST_FMAF, and __FP_FAST_FMAL if the machine
11322 has the appropriate fma builtins.
11323 (c_cpp_builtins): Adjust call to builtin_define_float_constants.
11324
668ea4b1
IS
113252010-10-14 Iain Sandoe <iains@gcc.gnu.org>
11326
1b1562a5 11327 merge from FSF apple 'trunk' branch.
3f8257db 11328 2006 Fariborz Jahanian <fjahanian@apple.com>
1b1562a5 11329
668ea4b1
IS
11330 Radars 4436866, 4505126, 4506903, 4517826
11331 * c-common.c (c_common_resword): Define @property and its attributes.
11332 * c-common.h: Define property attribute enum entries.
11333 (OBJC_IS_PATTR_KEYWORD): New.
11334 (objc_property_attribute_kind): New enum.
11335 Declare objc_set_property_attr (), objc_add_property_variable (),
11336 objc_build_getter_call () and objc_build_setter_call ().
11337 * stub-objc.c (objc_set_property_attr): New stub.
11338 (objc_add_property_variable): Likewise.
11339 (objc_build_getter_call): Likewise.
11340 (objc_build_setter_call) Likewise.
1b1562a5 11341
a1178b30
IS
113422010-10-13 Iain Sandoe <iains@gcc.gnu.org>
11343
1b1562a5 11344 merge from FSF apple 'trunk' branch.
ab20d992 11345 2006-04-26 Fariborz Jahanian <fjahanian@apple.com>
a1178b30
IS
11346
11347 Radar 3803157 (method attributes)
11348 * c-common.c (handle_deprecated_attribute): Recognize
11349 objc methods as valid declarations.
11350 * c-common.h: Declare objc_method_decl ().
1b1562a5 11351 * stub-objc.c (objc_method_decl): New stub.
a1178b30 11352
a75bfaa6
JM
113532010-10-08 Joseph Myers <joseph@codesourcery.com>
11354
11355 * c-common.c (parse_optimize_options): Call
11356 decode_cmdline_options_to_array_default_mask before
11357 decode_options. Update arguments to decode_options.
11358 * c-common.h (c_common_init_options_struct): Declare.
11359 * c-opts.c (c_common_init_options_struct): New. Split out from
11360 c_common_init_options.
11361
f05b9d93
NP
113622010-10-06 Nicola Pero <nicola.pero@meta-innovation.com>
11363
11364 Implemented fast enumeration for Objective-C.
11365 * c-common.h (objc_finish_foreach_loop): New.
11366 * stub-objc.c (objc_finish_foreach_loop): New.
11367
1ebe4b4f
JM
113682010-10-05 Joseph Myers <joseph@codesourcery.com>
11369
11370 * c-common.h (struct diagnostic_context): Don't declare here.
11371 (c_common_initialize_diagnostics): Declare using
11372 diagnostic_context typedef.
11373 * c-opts.c (c_common_handle_option): Pass global_dc to
11374 handle_generated_option.
11375
d4d24ba4
JM
113762010-10-04 Joseph Myers <joseph@codesourcery.com>
11377
11378 * c-opts.c (c_common_handle_option): Pass &global_options_set to
11379 handle_generated_option.
11380
478a1c5b
ILT
113812010-10-03 Ian Lance Taylor <iant@google.com>
11382
11383 * c.opt (-fplan9-extensions): New option.
11384
82a1c2fe
FXC
113852010-10-03 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
11386
11387 * c-cppbuiltin.c (define__GNUC__, builtin_define_type_precision):
11388 Remove.
11389 (c_cpp_builtins): Call functions from cppbuiltin.c instead
11390 of duplicating code.
11391
92902b1b
IS
113922010-09-30 Iain Sandoe <iains@gcc.gnu.org>
11393
11394 * c-common.c: Add two new entries for @optional
11395 and @required keywords.
11396
11397 merge from FSF 'apple/trunk' branch.
3f8257db 11398 2006-01-30 Fariborz Jahanian <fjahanian@apple.com>
92902b1b
IS
11399
11400 Radar 4386773
11401 * c-common.h (RID_AT_OPTIONAL, RID_AT_REQUIRED): Two new
11402 objective-c keywords.
11403 (objc_set_method_opt): New declaration.
11404 * stub-objc.c (objc_set_method_opt): New stub.
9faeb493 11405
46625112
JM
114062010-09-30 Joseph Myers <joseph@codesourcery.com>
11407
11408 * c-common.c (handle_optimize_attribute): Pass &global_options to
11409 cl_optimization_save and cl_optimization_restore.
11410 * c-opts.c (c_common_handle_option): Pass &global_options to
11411 handle_generated_option.
11412 * c-pragma.c (handle_pragma_diagnostic): Use option_flag_var.
11413 (handle_pragma_pop_options, handle_pragma_reset_options): Pass
11414 &global_options to cl_optimization_restore.
11415
49b91f05
NP
114162010-09-30 Nicola Pero <nicola.pero@meta-innovation.com>
11417
11418 * c-lex.c (c_lex_with_flags): Updated comments for CPP_AT_NAME
11419 Objective-C/Objective-C++ keywords.
11420
13ed556f 114212010-09-29 Nicola Pero <nicola.pero@meta-innovation.com>
a6341d57 11422
9faeb493
UB
11423 Merge from 'apple/trunk' branch on FSF servers.
11424
3f8257db 11425 2005-10-04 Fariborz Jahanian <fjahanian@apple.com>
a6341d57
NP
11426
11427 Radar 4281748
11428 * c-common.h (objc_check_global_decl): New declaration.
11429 * stub-objc.c (objc_check_global_decl): New stub.
11430
f0036cca
JM
114312010-09-29 Joseph Myers <joseph@codesourcery.com>
11432
11433 * c.opt: Don't use VarExists.
11434
e3339d0f
JM
114352010-09-29 Joseph Myers <joseph@codesourcery.com>
11436
11437 * c-common.c (c_cpp_error): Update names of diagnostic_context
11438 members.
11439 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Update names of
11440 cl_optimization members.
11441 * c-opts.c (warning_as_error_callback, c_common_handle_option,
11442 sanitize_cpp_opts, finish_options): Update names of cpp_options
11443 members.
11444
1973201f
NP
114452010-09-29 Nicola Pero <nicola.pero@meta-innovation.com>
11446
11447 * c-common.h (OBJC_IS_CXX_KEYWORD): New macro. Updated comments.
11448 (objc_is_reserved_word): Removed.
11449 * c-common.c: Updated comments.
11450 * c-lex.c (c_lex_with_flags): Use OBJC_IS_CXX_KEYWORD instead of
11451 objc_is_reserved_word.
11452 * stub-objc.c (objc_is_reserved_word): Removed.
11453
f7e71da5
IS
114542010-09-28 Iain Sandoe <iains@gcc.gnu.org>
11455
9faeb493 11456 * c-common.h (objc_add_method_declaration): Adjust prototype to
f7e71da5
IS
11457 include attributes.
11458 (objc_start_method_definition): Likewise.
11459 (objc_build_keyword_decl): Likewise.
11460 * stub-objc.c:(objc_add_method_declaration): Handle attributes.
11461 (objc_start_method_definition): Likewise.
11462 (objc_build_keyword_decl): Likewise.
11463
c165dca7
IS
114642010-09-28 Iain Sandoe <iains@gcc.gnu.org>
11465
11466 * c-common.h (objc_start_class_interface): Adjust prototype.
11467 (objc_start_category_interface): Likewise.
11468 (objc_start_protocol): Likewise.
11469 * stub-objc.c (objc_start_protocol): Adjust for extra argument.
11470 (objc_start_class_interface): Likewise.
11471 (objc_start_category_interface): Likewise.
11472
7458026b
ILT
114732010-09-27 Ian Lance Taylor <iant@google.com>
11474
11475 * c-common.c (c_common_attribute_table): Add no_split_stack.
11476 (handle_no_split_stack_attribute): New static function.
11477
b581b85b
NP
114782010-09-27 Nicola Pero <nicola.pero@meta-innovation.com>
11479
9faeb493 11480 Merge from 'apple/trunk' branch on FSF servers.
b581b85b 11481
3f8257db 11482 2005-12-15 Fariborz Jahanian <fjahanian@apple.com>
b581b85b 11483
9faeb493 11484 Radar 4229905
b581b85b
NP
11485 * c-common.h (objc_have_common_type): New declaration.
11486 * stub-objc.c (objc_have_common_type): New stub.
11487
11488 2005-06-22 Ziemowit Laski <zlaski@apple.com>
11489
11490 Radar 4154928
11491 * c-common.h (objc_common_type): New prototype.
9faeb493 11492 * stub-objc.c (objc_common_type): New stub.
b581b85b 11493
46a4da10
JH
114942010-09-24 Jan Hubicka <jh@suse.cz>
11495
11496 * c-common.c (handle_leaf_attribute): New function.
11497 (struct attribute_spec c_common_att): Add leaf.
11498
e200444e
JM
114992010-09-22 Joseph Myers <joseph@codesourcery.com>
11500
11501 * c.opt (-all-warnings, -ansi, -assert, -assert=, -comments,
11502 -comments-in-macros, -define-macro, -define-macro=, -dependencies,
11503 -dump, -dump=, -imacros, -imacros=, -include, -include=,
11504 -include-barrier, -include-directory, -include-directory=,
11505 -include-directory-after, -include-directory-after=,
11506 -include-prefix, -include-prefix=, -include-with-prefix,
11507 -include-with-prefix=, -include-with-prefix-after,
11508 -include-with-prefix-after=, -include-with-prefix-before,
11509 -include-with-prefix-before=, -no-integrated-cpp,
11510 -no-line-commands, -no-standard-includes, -no-warnings, -output,
11511 -output=, -pedantic, -pedantic-errors, -preprocess,
11512 -print-missing-file-dependencies, -trace-includes, -traditional,
11513 -traditional-cpp, -trigraphs, -undefine-macro, -undefine-macro=,
11514 -user-dependencies, -verbose, -write-dependencies,
11515 -write-user-dependencies, no-integrated-cpp, traditional): New.
11516
29a80ea6
NP
115172010-09-21 Nicola Pero <nicola.pero@meta-innovation.com>
11518
11519 PR objc/23710
ac1fc2fc
NP
11520 * c-common.h (objc_start_method_definition): Return bool instead
11521 of void.
11522 * stub-objc.c (objc_start_method_definition): Return bool instead
11523 of void.
11524
115252010-09-21 Nicola Pero <nicola.pero@meta-innovation.com>
11526
11527 PR objc/25965
11528 * c-common.h (objc_get_interface_ivars): New declaration.
11529 * stub-objc.c (objc_get_interface_ivars): New stub.
29a80ea6 11530
de621752
ILT
115312010-09-15 Ian Lance Taylor <iant@google.com>
11532
11533 * c-common.c (parse_optimize_options): Do not capitalize warning
06730c5d 11534 messages. Remove period at end of warning message.
de621752 11535
ba885ec5
NS
115362010-09-09 Nathan Sidwell <nathan@codesourcery.com>
11537
11538 * c-common.c (handle_alias_ifunc_attribute): New, broken out of ...
11539 (handle_alias_attribute): ... here.
11540 (handle_ifunc_attribute): New.
11541
c5ee1358
MM
115422010-09-06 Mark Mitchell <mark@codesourcery.com>
11543
11544 * c-common.h (do_warn_double_promotion): Declare.
11545 * c-common.c (do_warn_double_promotion): Define.
11546
0a0b3574
MM
115472010-09-05 Mark Mitchell <mark@codesourcery.com>
11548
11549 * c.opt (Wdouble-promotion): New.
11550
d1779886
JM
115512010-09-02 Joseph Myers <joseph@codesourcery.com>
11552
11553 * c.opt (falt-external-templates, fhuge-objects, fvtable-gc,
11554 fvtable-thunks, fxref): Mark no longer supported in help text.
11555
2d2bd949
JM
115562010-09-02 Joseph Myers <joseph@codesourcery.com>
11557
11558 * c.opt (Wimport, fall-virtual, falt-external-templates,
11559 fdefault-inline, fenum-int-equiv, fexternal-templates,
11560 fguiding-decls, fhonor-std, fhuge-objects, flabels-ok,
11561 fname-mangling-version-, fnew-abi, fnonnull-objects,
11562 foptional-diags, fsquangle, fstrict-prototype, fthis-is-variable,
11563 fvtable-gc, fvtable-thunks, fxref): Mark with Ignore and Warn as
11564 applicable.
11565 (fhandle-exceptions): Mark with Alias and Warn.
11566 * c-opts.c (c_common_handle_option): Don't handle options marked
11567 as ignored.
11568
5de8299c
JM
115692010-09-02 Joseph Myers <joseph@codesourcery.com>
11570
11571 * c.opt (Wcomments, Werror-implicit-function-declaration,
11572 ftemplate-depth-, std=c89, std=c9x, std=gnu89, std=gnu9x,
11573 std=iso9899:1990, std=iso9899:1999, std=iso9899:199x): Mark as
11574 aliases.
11575 * c-common.c (option_codes): Use OPT_Wcomment instead of
11576 OPT_Wcomments.
11577 * c-opts.c (warning_as_error_callback, c_common_handle_option):
11578 Don't handle options marked as aliases.
11579
0ceb0201
RG
115802010-08-25 Richard Guenther <rguenther@suse.de>
11581
11582 * c-common.c (c_common_get_alias_set): Remove special
11583 handling for pointers.
11584
ac47786e
NF
115852010-08-20 Nathan Froyd <froydnj@codesourcery.com>
11586
11587 * c-common.c: Use FOR_EACH_VEC_ELT.
11588 * c-gimplify.c: Likewise.
11589 * c-pragma.c: Likewise.
11590
c878765b
JM
115912010-08-16 Joseph Myers <joseph@codesourcery.com>
11592
11593 * c.opt (MDX): Change back to MD. Mark NoDriverArg instead of
11594 RejectDriver.
11595 (MMDX): Change back to MMD. Mark NoDriverArg instead of
11596 RejectDriver.
11597 * c-opts.c (c_common_handle_option): Use OPT_MD and OPT_MMD
11598 instead of OPT_MDX and OPT_MMDX.
11599
603349bf
JM
116002010-08-16 Joseph Myers <joseph@codesourcery.com>
11601
11602 * c.opt (MDX, MMDX, lang-asm): Mark RejectDriver.
11603
644fa7ac
JM
116042010-08-12 Joseph Myers <joseph@codesourcery.com>
11605
11606 * c.opt (MD, MMD): Change to MDX and MMDX.
11607 * c-opts.c (c_common_handle_option): Use OPT_MMD and OPT_MMDX.
11608
481e1176
JM
116092010-08-11 Joseph Myers <joseph@codesourcery.com>
11610
11611 * c-opts.c (c_common_handle_option): Call handle_generated_option
11612 instead of handle_option.
11613
ac8dc9f7
NF
116142010-08-08 Nathan Froyd <froydnj@codesourcery.com>
11615
11616 * c-pragma.c (add_to_renaming_pragma_list): Fix call to VEC_safe_push.
11617 (maybe_apply_renaming_pragma): Delete unneeded declarations.
11618
4f8c876d
NF
116192010-08-08 Nathan Froyd <froydnj@codesourcery.com>
11620
11621 * c-pragma.c (pending_redefinition): Declare. Declare a VEC of it.
11622 (pending_redefine_extname): Change type to a VEC.
11623 (add_to_renaming_pragma_list): Update for new type of
11624 pending_redefine_extname.
ac8dc9f7 11625 (maybe_apply_renaming_pragma): Likewise.
4f8c876d 11626
3b0c690e
AC
116272010-08-04 Arnaud Charlet <charlet@adacore.com>
11628
11629 * c-ada-spec.c (dump_ada_template): Mark underlying instance type as
11630 visited.
11631 (dump_generic_ada_node): Code clean up. Use TREE_VISITED flag to
11632 decide whether a type has already been declared/seen.
11633 Do not go to the original type.
11634 (dump_nested_types): New parameter forward.
11635 Generate forward declaration if needed and mark type as visited.
11636 (print_ada_declaration): Call dump_nested_types if not already done.
11637 Mark types as visited.
11638
1890bccc
JM
116392010-08-03 Joseph Myers <joseph@codesourcery.com>
11640
11641 * c.opt (-print-pch-checksum): Remove option.
11642 * c-opts.c (c_common_handle_option): Don't handle
11643 OPT_print_pch_checksum.
11644
5f20c657
JM
116452010-07-27 Joseph Myers <joseph@codesourcery.com>
11646
11647 * c-common.h (c_common_handle_option): Update prototype and return
11648 value type.
11649 * c-opts.c (c_common_handle_option): Update prototype and return
11650 value type. Update calls to handle_option and
11651 enable_warning_as_error.
11652
f551f80c
JJ
116532010-07-27 Jakub Jelinek <jakub@redhat.com>
11654
11655 PR c/45079
11656 * c-pretty-print.c (pp_c_expression): Handle C_MAYBE_CONST_EXPR.
11657
61ff2bdc
JM
116582010-07-27 Joseph Myers <joseph@codesourcery.com>
11659
11660 * c-common.h (c_common_missing_argument): Remove.
11661 * c-opts.c (c_common_missing_argument): Remove.
11662 * c.opt (A, D, F, I, MD, MMD, MQ, MT, U, fconstant-string-class=,
11663 idirafter, imacros, include, isysroot, isystem, iquote): Add
11664 MissingArgError.
11665 * c-objc-common.h (LANG_HOOKS_MISSING_ARGUMENT): Remove.
11666
7a9bf9a4
JM
116672010-07-27 Joseph Myers <joseph@codesourcery.com>
11668
11669 * c-common.h (c_common_option_lang_mask,
11670 c_common_initialize_diagnostics, c_common_complain_wrong_lang_p):
11671 New.
11672 (c_common_init_options): Update prototype.
11673 * c-opts.c (c_common_option_lang_mask): New.
11674 (c_common_initialize_diagnostics): Split out of
11675 c_common_init_options.
11676 (accept_all_c_family_options, c_common_complain_wrong_lang_p):
11677 New.
11678 (c_common_init_options): Update prototype. Use decoded options in
11679 search for -lang-asm.
11680
910ad8de
NF
116812010-07-15 Nathan Froyd <froydnj@codesourcery.com>
11682
11683 * c-common.c: Carefully replace TREE_CHAIN with DECL_CHAIN.
11684 * c-format.c: Likewise.
11685
718f9c0f
MLI
116862010-07-08 Manuel López-Ibáñez <manu@gcc.gnu.org>
11687
11688 * c-common.h: Include diagnostic-core.h. Error if already
11689 included.
11690 * c-semantics.c: Do not define GCC_DIAG_STYLE here.
11691
4d451982
MLI
116922010-07-03 Manuel López-Ibáñez <manu@gcc.gnu.org>
11693
adfac8df 11694 * c-common.c (IN_GCC_FRONTEND): Do not undef.
4d451982
MLI
11695 Do not include expr.h
11696 (vector_mode_valid_p): Move here.
11697
119fe915
SB
116982010-06-21 DJ Delorie <dj@redhat.com>
11699
11700 * c-pragma.c (handle_pragma_diagnostic): Add push/pop,
11701 allow these pragmas anywhere.
11702
117032010-06-14 Jakub Jelinek <jakub@redhat.com>
11704
11705 PR bootstrap/44509
11706 * c-cppbuiltin.c: Include gt-c-family-c-cppbuiltin.h.
11707 (lazy_hex_fp_values, lazy_hex_fp_value_count): Add GTY(()) markers.
11708 (lazy_hex_fp_value, builtin_define_with_hex_fp_value): Use
11709 ggc_strdup instead of xstrdup.
11710
117112010-06-10 Jakub Jelinek <jakub@redhat.com>
11712
11713 * c-cppbuiltin.c: Include cpp-id-data.h.
11714 (lazy_hex_fp_values, lazy_hex_fp_value_count): New variables.
11715 (lazy_hex_fp_value): New function.
11716 (builtin_define_with_hex_fp_value): Provide definitions lazily.
11717
6662d794
MLI
117182010-06-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
11719
11720 * c-gimplify.c: Do not include tree-flow.h
11721
38f8b050
JR
117222010-06-29 Joern Rennecke <joern.rennecke@embecosm.com>
11723
11724 PR other/44034
11725 * c-common.c: Rename targetm member:
11726 targetm.enum_va_list -> targetm.enum_va_list_p
11727
9589f23e
AS
117282010-06-28 Anatoly Sokolov <aesok@post.ru>
11729
11730 * c-common.c (shorten_compare): Adjust call to force_fit_type_double.
11731
3b06d379
SB
117322010-06-28 Steven Bosscher <steven@gcc.gnu.org>
11733
11734 * c-cppbuiltin.c: Do not include except.h.
11735
d166d4c3
AK
117362010-06-24 Andi Kleen <ak@linux.intel.com>
11737
9faeb493
UB
11738 * c-common.c (warn_for_omitted_condop): New.
11739 * c-common.h (warn_for_omitted_condop): Add prototype.
d166d4c3 11740
70cb8be6
JM
117412010-06-21 Joseph Myers <joseph@codesourcery.com>
11742
11743 * c.opt (lang-objc): Remove.
11744 * c-opts.c (c_common_handle_option): Don't handle OPT_lang_objc.
11745
a4c97feb
JR
117462010-06-21 Joern Rennecke <joern.rennecke@embecosm.com>
11747
11748 * c-opts.c: Include "tm_p.h".
11749
6e2f1956
JM
117502010-06-20 Joseph Myers <joseph@codesourcery.com>
11751
11752 * c-common.c (parse_optimize_options): Update call to
11753 decode_options.
11754
bc87224e
NF
117552010-06-18 Nathan Froyd <froydnj@codesourcery.com>
11756
11757 * c-common.c (record_types_used_by_current_var_decl): Adjust for
11758 new type of types_used_by_cur_var_decl.
11759
b49cf425
JR
117602010-06-17 Joern Rennecke <joern.rennecke@embecosm.com>
11761
11762 PR bootstrap/44512
11763 * c-cppbuiltin.c (builtin_define_with_hex_fp_value): Add cast
11764 for C++ standard compliance.
11765
59f9c2ed
JM
117662010-06-16 Jason Merrill <jason@redhat.com>
11767
11768 * c.opt: Add -Wnoexcept.
11769
33766b66
RG
117702010-06-16 Richard Guenther <rguenther@suse.de>
11771
11772 PR c/44555
11773 * c-common.c (c_common_truthvalue_conversion): Remove
11774 premature and wrong optimization concering ADDR_EXPRs.
11775
eff7e30c
AC
117762010-06-15 Arnaud Charlet <charlet@adacore.com>
11777
11778 * c-ada-spec.c (dump_sloc): Remove column info.
11779 (is_simple_enum): New function.
11780 (dump_generic_ada_node, print_ada_declaration): Map C enum types to Ada
11781 enum types when relevant.
11782
6312e84d
MLI
117832010-06-11 Manuel López-Ibáñez <manu@gcc.gnu.org>
11784
9faeb493 11785 * c-common.c (conversion_warning): Warn at expression
6312e84d
MLI
11786 location.
11787
1cb42611
JM
117882010-06-10 Joseph Myers <joseph@codesourcery.com>
11789
11790 * c-opts.c (c_common_handle_option): Don't handle
11791 OPT_fshow_column.
11792
a9429e29
LB
117932010-06-08 Laurynas Biveinis <laurynas.biveinis@gmail.com>
11794
11795 * c-pragma.c (push_alignment): Use typed GC allocation.
11796 (handle_pragma_push_options): Likewise.
11797
11798 * c-common.c (parse_optimize_options): Likewise.
11799
11800 * c-common.h (struct sorted_fields_type): Add variable_size GTY
11801 option.
11802
5498f011
JM
118032010-06-07 Joseph Myers <joseph@codesourcery.com>
11804
11805 * c-common.c (flag_preprocess_only, flag_undef, flag_no_builtin,
11806 flag_no_nonansi_builtin, flag_short_double, flag_short_wchar,
11807 flag_lax_vector_conversions, flag_ms_extensions, flag_no_asm,
11808 flag_signed_bitfields, warn_strict_null_sentinel,
11809 flag_nil_receivers, flag_zero_link, flag_replace_objc_classes,
11810 flag_gen_declaration, flag_no_gnu_keywords,
11811 flag_implement_inlines, flag_implicit_templates,
11812 flag_implicit_inline_templates, flag_optional_diags,
11813 flag_elide_constructors, flag_default_inline, flag_rtti,
11814 flag_conserve_space, flag_access_control, flag_check_new,
11815 flag_new_for_scope, flag_weak, flag_working_directory,
11816 flag_use_cxa_atexit, flag_use_cxa_get_exception_ptr,
11817 flag_enforce_eh_specs, flag_threadsafe_statics,
11818 flag_pretty_templates): Remove.
11819 * c-common.h (flag_preprocess_only, flag_nil_receivers,
11820 flag_objc_exceptions, flag_objc_sjlj_exceptions, flag_zero_link,
11821 flag_replace_objc_classes, flag_undef, flag_no_builtin,
11822 flag_no_nonansi_builtin, flag_short_double, flag_short_wchar,
11823 flag_lax_vector_conversions, flag_ms_extensions, flag_no_asm,
11824 flag_const_strings, flag_signed_bitfields, flag_gen_declaration,
11825 flag_no_gnu_keywords, flag_implement_inlines,
11826 flag_implicit_templates, flag_implicit_inline_templates,
11827 flag_optional_diags, flag_elide_constructors, flag_default_inline,
11828 flag_rtti, flag_conserve_space, flag_access_control,
11829 flag_check_new, flag_new_for_scope, flag_weak,
11830 flag_working_directory, flag_use_cxa_atexit,
11831 flag_use_cxa_get_exception_ptr, flag_enforce_eh_specs,
11832 flag_threadsafe_statics, flag_pretty_templates,
11833 warn_strict_null_sentinel): Remove.
11834 * c.opt (E, Wstrict-null-sentinel, faccess-control, fasm,
11835 fbuiltin, fcheck-new, fconserve-space, felide-constructors,
11836 fenforce-eh-specs, ffor-scope, fgnu-keywords, fimplement-inlines,
11837 fimplicit-inline-templates, fimplicit-templates,
11838 flax-vector-conversions, fms-extensions, fnil-receivers,
11839 fnonansi-builtins, fpretty-templates, freplace-objc-classes,
11840 frtti, fshort-double, fshort-enums, fshort-wchar,
11841 fsigned-bitfields, fsigned-char, fstats, fthreadsafe-statics,
11842 funsigned-bitfields, funsigned-char, fuse-cxa-atexit,
11843 fuse-cxa-get-exception-ptr, fweak, fworking-directory, fzero-link,
11844 gen-decls, undef): Use Var.
11845 (fdefault-inline, foptional-diags): Document as doing nothing.
11846 * c-opts.c (c_common_handle_option): Remove cases for options now
11847 using Var. Mark ignored options as such.
11848
39dabefd
SB
118492010-06-05 Steven Bosscher <steven@gcc.gnu.org>
11850
9faeb493 11851 * c-common.c: Moved to here from parent directory.
39dabefd
SB
11852 * c-common.def: Likewise.
11853 * c-common.h: Likewise.
11854 * c-cppbuiltin.c: Likewise.
11855 * c-dump.c: Likewise.
11856 * c-format.c: Likewise.
11857 * c-format.h : Likewise.
11858 * c-gimplify.c: Likewise.
11859 * c-lex.c: Likewise.
11860 * c-omp.c: Likewise.
11861 * c.opt: Likewise.
11862 * c-opts.c: Likewise.
11863 * c-pch.c: Likewise.
11864 * c-ppoutput.c: Likewise.
11865 * c-pragma.c: Likewise.
11866 * c-pragma.h: Likewise.
11867 * c-pretty-print.c: Likewise.
11868 * c-pretty-print.h: Likewise.
11869 * c-semantics.c: Likewise.
11870 * stub-objc.c: Likewise.
11871
11872 * c-common.c: Include gt-c-family-c-common.h.
11873 * c-pragma.c: Include gt-c-family-c-pragma.h.
11874\f
c48514be 11875Copyright (C) 2010-2021 Free Software Foundation, Inc.
39dabefd
SB
11876
11877Copying and distribution of this file, with or without modification,
11878are permitted in any medium without royalty provided the copyright
11879notice and this notice are preserved.