]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/c-family/ChangeLog
openmp: Fix intermittent hanging of task-detach-6 libgomp tests [PR98738]
[thirdparty/gcc.git] / gcc / c-family / ChangeLog
CommitLineData
50352c6c
GA
12021-02-19 Nathan Sidwell <nathan@acm.org>
2
3 * c.opt (flang-info-module-read, flang-info-module-read=): New.
4
bf81237e
GA
52021-02-18 H.J. Lu <hjl.tools@gmail.com>
6
7 PR target/99113
8 * c-attribs.c (c_common_attribute_table): Add the "retain"
9 attribute.
10 (handle_retain_attribute): New function.
11
0e804ce3
GA
122021-02-16 Marek Polacek <polacek@redhat.com>
13
14 PR c++/99062
15 * c-attribs.c (handle_assume_aligned_attribute): Check that the
16 alignment argument is non-negative. Tweak a warning message.
17
fab095da
GA
182021-02-12 Martin Sebor <msebor@redhat.com>
19
20 PR c/99055
21 * c-warn.c (warn_parm_array_mismatch): Free strings returned from
22 print_generic_expr_to_str.
23
4b37c3ea
GA
242021-02-10 Richard Biener <rguenther@suse.de>
25
26 * c-common.c (parse_optimize_options): Free decoded_options.
27
a19dd5e6
GA
282021-02-04 emsr <3dw4rd@verizon.net>
29
30 * c-cppbuiltin.c (c_cpp_builtins): __cpp_size_t_suffix=202011L.
31
9faaa807
GA
322021-02-03 Ed Smith-Rowland <3dw4rd@verizon.net>
33
34 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_size_t_suffix.
35 * c-lex.c (interpret_integer): Set node type for size literal.
36
85d04a2e
GA
372021-01-28 Jakub Jelinek <jakub@redhat.com>
38
39 * c.opt (-std=c++2a, -std=c++20, -std=gnu++2a, -std=gnu++20): Remove
40 draft from description.
41 (-std=c++2b): Fix a pasto, 2020 -> 2023.
42
e62bb7f0
GA
432021-01-26 Paul Fee <paul.f.fee@gmail.com>
44
45 * c-common.h (cxx_dialect): Add cxx23 as a dialect.
46 * c.opt: Add options for -std=c++23, std=c++2b, -std=gnu++23
47 and -std=gnu++2b
48 * c-opts.c (set_std_cxx23): New.
49 (c_common_handle_option): Set options when -std=c++23 is enabled.
50 (c_common_post_options): Adjust comments.
51 (set_std_cxx20): Likewise.
52
161e4c08
GA
532021-01-25 Martin Sebor <msebor@redhat.com>
54
55 PR c++/98646
56 * c-common.c (check_nonnull_arg): Adjust warning text.
57
4c9bcd5c
GA
582021-01-17 Martin Sebor <msebor@redhat.com>
59
60 * c-pretty-print.c (c_pretty_printer::primary_expression): Don't
61 assume SSA_NAME_IDENTIFIER evaluates to nonzero.
62
59cf67d1
GA
632021-01-16 Kwok Cheung Yeung <kcy@codesourcery.com>
64
65 * c-pragma.h (pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_DETACH.
66 Redefine PRAGMA_OACC_CLAUSE_DETACH.
67
2f7f0d32
GA
682021-01-15 Jakub Jelinek <jakub@redhat.com>
69
70 PR tree-optimization/98597
71 * c-pretty-print.c: Include options.h.
72 (c_fold_indirect_ref_for_warn): New function.
73 (print_mem_ref): Use it. If it returns something that has compatible
74 type and is TBAA compatible with zero offset, print it and return,
75 otherwise print it using offsetof syntax or array ref syntax. Fix up
76 printing if MEM_REFs first operand is ADDR_EXPR, or when the first
77 argument has pointer to array type. Print pointers using the standard
78 formatting.
79
6851dda2
GA
802021-01-12 Martin Sebor <msebor@redhat.com>
81
82 PR c/98597
83 PR c/98592
84 * c-pretty-print.c (print_mem_ref): Avoid assuming MEM_REF operand
85 has pointer type. Remove redundant code. Avoid calling
86 gimple_canonical_types_compatible_p.
87
7d187e4f
GA
882021-01-07 Martin Sebor <msebor@redhat.com>
89
90 PR middle-end/98578
91 * c-pretty-print.c (print_mem_ref): Strip array from access type.
92 Avoid assuming acces type's size is constant. Correct condition
93 guarding the printing of a parenthesis.
94
942ae5be
GA
952021-01-06 Martin Sebor <msebor@redhat.com>
96
97 PR c++/95768
98 * c-pretty-print.c (c_pretty_printer::primary_expression): For
99 SSA_NAMEs print VLA names and GIMPLE defining statements.
100 (print_mem_ref): New function.
101 (c_pretty_printer::unary_expression): Call it.
102
1032021-01-06 Richard Biener <rguenther@suse.de>
104
105 PR tree-optimization/95582
106 * c-attribs.c (c_common_attribute_table): Add entry for
107 signed_bool_precision.
108 (handle_signed_bool_precision_attribute): New.
109
8daa719b
GA
1102020-12-24 Iain Sandoe <iain@sandoe.co.uk>
111
112 * c.opt: Add -stdlib= option and enumerations for
113 libstdc++ and libc++.
114
eefe499f
GA
1152020-12-16 Martin Liska <mliska@suse.cz>
116
117 * c.opt: Remove usage of Report.
118
d52945ce
GA
1192020-12-14 Martin Sebor <msebor@redhat.com>
120
121 PR middle-end/98166
122 PR c++/57111
123 PR middle-end/98160
124 * c-attribs.c (maybe_add_noinline): New function.
125 (handle_malloc_attribute): Call it. Use ATTR_FLAG_INTERNAL.
126 Implicitly add attribute noinline to functions not declared inline
127 and warn on those.
128
ca2bd949
GA
1292020-12-09 Tobias Burnus <tobias@codesourcery.com>
130
131 * c-pragma.c (omp_pragmas): Add 'allocate'.
132 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_ALLOCATE.
133
f6e8e279
GA
1342020-12-08 Jakub Jelinek <jakub@redhat.com>
135
136 PR c++/98187
137 * c-pragma.c (omp_pragmas): Remove "master".
138 (omp_pragmas_simd): Add "master".
139
bc8a7013
GA
1402020-12-07 Marek Polacek <polacek@redhat.com>
141
142 PR c++/98126
143 * c-common.c (verify_tree_lim_r): New function.
144 (verify_sequence_points): Use it. Use nullptr instead of 0.
145
b8dd0ef7
GA
1462020-12-03 Martin Sebor <msebor@redhat.com>
147
148 PR c++/90629
149 PR middle-end/94527
150 * c-attribs.c (handle_dealloc_attribute): New function.
151 (handle_malloc_attribute): Handle argument forms of attribute.
152 * c.opt (-Wmismatched-dealloc): New option.
153 (-Wmismatched-new-delete): New option.
154
1552020-12-03 Jakub Jelinek <jakub@redhat.com>
156
157 PR libstdc++/93121
158 * c-common.h (enum rid): Add RID_BUILTIN_BIT_CAST.
159 * c-common.c (c_common_reswords): Add __builtin_bit_cast.
160
e0f5e792
GA
1612020-12-01 JeanHeyd Meneide <phdofthehouse@gmail.com>
162
163 * c-cppbuiltin.c (c_cpp_builtins): Add predefined
164 {__GNUC_EXECUTION_CHARSET_NAME} and
165 _WIDE_EXECUTION_CHARSET_NAME} macros.
166
1672020-12-01 Nathan Sidwell <nathan@acm.org>
168
169 * c-common.c (module, import, export): New internal tokens (with
170 trailing space).
171 * c-common.h (RID__MODULE, RID__IMPORT & RID__EXPORT): Enumerate
172 them.
173 (D_CXX_MODULES, D_CXX_MODULES_FLAGS): Enable them.
174 * c-cppbuiltin.c (c_cpp_builtins): Feature macro.
175
1762020-12-01 Nathan Sidwell <nathan@acm.org>
177
178 * c-opts.c (c_common_init_options): Ask for module dependencies.
179 (c_common_handle_option): Handle -Mmodules -Mno-modules.
180 * c-pch.c (c_common_valid_pch): ... does not play with C++
181 modules.
182 * c.opt (Mmodules, Mno-modules): New preprocessor dependency
183 options.
184 (fmodules-ts, fmodule-header, fmodule-implicit-inline)
185 (fmodule-only, fmodule-mapper, fmodule-lazy)
186 (fmodule-version-ignore, Winvalid-imported-macros)
187 (flang-info-include-translate, flang-info-include-translate-not):
188 New options
189
5fbf0ecb
GA
1902020-11-28 Eric Botcazou <ebotcazou@adacore.com>
191
192 * c-ada-spec.c (dump_nested_type) <RECORD_TYPE>: Remove obsolete code.
193 (dump_ada_structure): Also deal with convention, unchecked union and
194 bit-field for nested types. In the latter case, print an Alignment
195 aspect along with the Pack aspect.
196
360258da
GA
1972020-11-25 Martin Sebor <msebor@redhat.com>
198
199 PR bootstrap/94982
200 * c-attribs.c (handle_patchable_function_entry_attribute): Avoid
201 -Wformat-diag.
202
1e2c9a27
GA
2032020-11-24 Martin Sebor <msebor@redhat.com>
204
205 * c-warn.c (warn_parm_array_mismatch): Avoid invalid redeclarations.
206
8e6198d0
GA
2072020-11-23 Jozef Lawrynowicz <jozef.l@mittosystems.com>
208
209 * c-attribs.c (handle_special_var_sec_attribute): New.
210 (handle_noinit_attribute): Remove.
211 (attr_noinit_exclusions): Rename to...
212 (attr_section_exclusions): ...this, and add "persistent" attribute
213 exclusion.
214 (c_common_attribute_table): Add "persistent" attribute.
215
7a97e2fc
GA
2162020-11-21 Aaron Sawdey <acsawdey@linux.ibm.com>
217
218 * c-pretty-print.c (c_pretty_printer::simple_type_specifier):
219 Treat opaque types like other types.
220 (c_pretty_printer::direct_abstract_declarator): Opaque types are
221 supported types.
222
82e5048e
GA
2232020-11-20 Martin Sebor <msebor@redhat.com>
224
225 * c-warn.c (warn_parm_array_mismatch): Bail on invalid redeclarations
226 with fewer arguments.
227
2282020-11-20 Martin Sebor <msebor@redhat.com>
229
230 PR middle-end/97879
231 * c-attribs.c (handle_access_attribute): Handle ATTR_FLAG_INTERNAL.
232 Error out on invalid modes.
233
2342020-11-20 Jakub Jelinek <jakub@redhat.com>
235
236 PR libstdc++/88101
237 * c-common.c (check_builtin_function_arguments): Handle
238 BUILT_IN_CLEAR_PADDING.
239
25bb75f8
GA
2402020-11-18 Nathan Sidwell <nathan@acm.org>
241
242 * c-lex.c (c_lex_with_flags): CPP_HEADER_NAMEs can now be seen.
243
4dabb037
GA
2442020-11-17 Nathan Sidwell <nathan@acm.org>
245
246 * c-common.h (enum c_tree_index): Reorder to place lazy fields
247 after newly-added CTI_MODULE_HWM.
248
2492020-11-17 Joseph Myers <joseph@codesourcery.com>
250
251 * c-cppbuiltin.c (builtin_define_float_constants): Define
252 "*_IS_IEC_60559__" macros.
253
2542020-11-17 Nathan Sidwell <nathan@acm.org>
255
256 * c-lex.c: #include "langhooks.h".
257 (cb_undef): Maybe call preprocess_undef lang hook.
258 * c-opts.c (c_common_post_options): Maybe call preprocess_options
259 lang hook.
260 (push_command_line_include): Maybe call preprocess_main_file lang
261 hook.
262 (cb_file_change): Likewise.
263 * c-ppoutput.c: #include "langhooks.h.
264 (scan_translation_unit): Maybe call preprocess_token lang hook.
265 (class do_streamer): New, derive from token_streamer.
266 (directives_only_cb): Data pointer is do_streamer, call
267 preprocess_token lang hook.
268 (scan_translation_unit_directives_only): Use do_streamer.
269 (print_line_1): Move src_line recording to after string output.
270 (cb_undef): Maybe call preprocess_undef lang hook.
271
2722020-11-17 Nathan Sidwell <nathan@acm.org>
273
274 * c-ppoutput.c (scan_translation_unit): Use token_streamer, remove
275 code duplicating that functionality.
276
2772020-11-17 Jakub Jelinek <jakub@redhat.com>
278
279 PR c/90628
280 * c-common.c (check_builtin_function_arguments)
281 <case BUILT_IN_ADD_OVERFLOW>: Diagnose when last argument is pointer
282 to _Atomic. For the TYPE_READONLY case, adjust message to be usable
283 for more builtins and argument positions.
284
29c5d9ce
GA
2852020-11-16 Iain Sandoe <iain@sandoe.co.uk>
286
287 PR objc/97854
288 * stub-objc.c: Include c-common.h to declare enum rid.
289
77f67db2
GA
2902020-11-13 Jakub Jelinek <jakub@redhat.com>
291
292 PR c++/63287
293 * c-cppbuiltin.c: Include configargs.h.
294 (c_cpp_builtins): For C++11 and later if THREAD_MODEL_SPEC is not
295 defined, predefine __STDCPP_THREADS__ to 1 unless thread_model is
296 "single".
297
2982020-11-13 Gergö Barany <gergo@codesourcery.com>
299 Thomas Schwinge <thomas@codesourcery.com>
300
301 * c.opt (fopenacc-kernels): Add.
302
3032020-11-13 Jason Merrill <jason@redhat.com>
304
305 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_using_enum.
306
3072020-11-13 Piotr H. Dabrowski <phd@phd.re>
308
309 PR c++/91318
310 * c-cppbuiltin.c: c_cpp_builtins_optimize_pragma(): use cpp_define_unused()
311
3122020-11-13 Martin Liska <mliska@suse.cz>
313
314 * c-attribs.c (build_attr_access_from_parms): Format properly.
315
3162020-11-13 Iain Sandoe <iain@sandoe.co.uk>
317
318 PR objc/90707
319 * c-common.c (c_common_reswords): null_unspecified, nullable,
320 nonnull, null_resettable: New keywords.
321 * c-common.h (enum rid): RID_NULL_UNSPECIFIED, RID_NULLABLE,
322 RID_NONNULL, RID_NULL_RESETTABLE: New.
323 (OBJC_IS_PATTR_KEYWORD): Include nullability keywords in the
324 ranges accepted for property attributes.
325 * c-attribs.c (handle_objc_nullability_attribute): New.
326 * c-objc.h (enum objc_property_attribute_group): Add
327 OBJC_PROPATTR_GROUP_NULLABLE.
328 (enum objc_property_attribute_kind):Add
329 OBJC_PROPERTY_ATTR_NULL_UNSPECIFIED, OBJC_PROPERTY_ATTR_NULLABLE,
330 OBJC_PROPERTY_ATTR_NONNULL, OBJC_PROPERTY_ATTR_NULL_RESETTABLE.
331
3322020-11-13 Iain Sandoe <iain@sandoe.co.uk>
333
334 PR objc/77404
335 * c-attribs.c (handle_objc_root_class_attribute): New
336 * c-objc.h (objc_start_class_interface): Add a location
337 value for the position of the class name.
338 * c.opt: Add Wobjc-root-class.
339 * stub-objc.c (objc_start_class_interface): Add a location
340 value for the position of the class name.
341
a5a11525
GA
3422020-11-12 Joseph Myers <joseph@codesourcery.com>
343
344 * c-lex.c (c_common_has_attribute): Take argument std_syntax.
345 Allow scope for C. Handle standard attributes for C. Do not
346 accept unscoped attributes if std_syntax and not handled as
347 standard attributes.
348 * c-common.h (c_common_has_attribute): Update prototype.
349
3502020-11-12 Nicholas Guriev <guriev-ns@ya.ru>
351
352 PR pch/86674
353 * c-pch.c (c_common_valid_pch): Use cpp_warning with CPP_W_INVALID_PCH
354 reason to fix -Werror=invalid-pch and -Wno-error=invalid-pch switches.
355
0f5f9ed5
GA
3562020-11-11 Patrick Palka <ppalka@redhat.com>
357
358 PR c++/88115
359 * c-opts.c (c_common_post_options): Update latest_abi_version.
360
bb622641
GA
3612020-11-10 Jakub Jelinek <jakub@redhat.com>
362
363 PR c/97748
364 * c-common.h (warn_if_unused_value): Add quiet argument defaulted
365 to false.
366 * c-warn.c (warn_if_unused_value): Likewise. Pass it down
367 recursively and just return true instead of warning if it is true.
368 Handle COMPLEX_EXPR.
369
3702020-11-10 Chung-Lin Tang <cltang@codesourcery.com>
371
372 * c-common.h (c_omp_adjust_map_clauses): New declaration.
373 * c-omp.c (struct map_clause): Helper type for c_omp_adjust_map_clauses.
374 (c_omp_adjust_map_clauses): New function.
375
2bee28dd
GA
3762020-11-09 Marek Polacek <polacek@redhat.com>
377
378 DR 1914
379 * c-common.c (attribute_fallthrough_p): Tweak the warning
380 message.
381
3822020-11-09 Patrick Palka <ppalka@redhat.com>
383
384 * c-pragma.c (handle_pragma_diagnostic): Split the
385 unknown-option -Wpragmas diagnostic into a warning and a
386 subsequent note containing a spelling suggestion. Avoid
387 computing the suggestion if -Wpragmas warnings are being
388 suppressed.
389
3902020-11-09 Patrick Palka <ppalka@redhat.com>
391
392 PR testsuite/97117
393 * c-indentation.c (get_visual_column): Remove location_t
394 parameter. Move the column-tracking diagnostic code from here
395 to ...
396 (should_warn_for_misleading_indentation): ... here, before the
397 early exit for when the loci are not all distinct. Don't pass a
398 location_t argument to get_visual_column.
399 (assert_get_visual_column_succeeds): Don't pass a location_t
400 argument to get_visual_column.
401 (assert_get_visual_column_fails): Likewise.
402
fb95de7a
GA
4032020-11-08 Iain Sandoe <iain@sandoe.co.uk>
404
405 * c-common.h (OBJC_IS_PATTR_KEYWORD): Add class to the list
406 of keywords accepted in @property attribute contexts.
407 * c-objc.h (enum objc_property_attribute_group): Add
408 OBJC_PROPATTR_GROUP_CLASS.
409 (enum objc_property_attribute_kind): Add
410 OBJC_PROPERTY_ATTR_CLASS.
411
2da7ee05
GA
4122020-11-07 Iain Sandoe <iain@sandoe.co.uk>
413
414 * c-common.c (c_common_reswords): Add 'atomic' property
415 attribute.
416 * c-common.h (enum rid): Add RID_PROPATOMIC for atomic
417 property attributes.
418
4192020-11-07 Iain Sandoe <iain@sandoe.co.uk>
420
421 * c-attribs.c (handle_nsobject_attribute): New.
422 * c.opt: Add WNSObject-attribute.
423
44cab2d8
GA
4242020-11-06 Iain Sandoe <iain@sandoe.co.uk>
425
426 * c-objc.h (enum objc_property_attribute_group): New
427 (enum objc_property_attribute_kind): New.
428 (OBJC_PROPATTR_GROUP_MASK): New.
429 (struct property_attribute_info): Small class encapsulating
430 parser output from property attributes.
431 (objc_prop_attr_kind_for_rid): New
432 (objc_add_property_declaration): Simplify interface.
433 * stub-objc.c (enum rid): Dummy type.
434 (objc_add_property_declaration): Simplify interface.
435 (objc_prop_attr_kind_for_rid): New.
436
4372020-11-06 Nathan Sidwell <nathan@acm.org>
438
439 * c-ada-spec.c (collect_ada_nodes): Rename
440 DECL_IS_BUILTIN->DECL_IS_UNDECLARED_BUILTIN.
441 (collect_ada_node): Likewise.
442 (dump_forward_type): Likewise.
443 * c-common.c (set_underlying_type): Rename
444 DECL_IS_BUILTIN->DECL_IS_UNDECLARED_BUILTIN.
445 (user_facing_original_type, c_common_finalize_early_debug): Likewise.
446
4472020-11-06 Jakub Jelinek <jakub@redhat.com>
448
449 * c-common.c (verify_sequence_points): Remove DEBUG_FUNCTION.
450
0cfd9109
GA
4512020-11-05 Marek Polacek <polacek@redhat.com>
452
453 PR c++/97675
454 * c.opt (Wexceptions): New option.
455
4562020-11-05 Marek Polacek <polacek@redhat.com>
457
458 PR c++/25814
459 * c.opt (Wvexing-parse): New option.
460
35c125cb
GA
4612020-11-04 Jakub Jelinek <jakub@redhat.com>
462
463 PR c++/97670
464 * c-omp.c (c_omp_split_clauses): Look through array reductions to find
465 underlying decl to clear in the allocate_head bitmap.
466
4672020-11-04 Iain Sandoe <iain@sandoe.co.uk>
468
469 * c-objc.h (objc_non_constant_expr_p): New.
470 * stub-objc.c (objc_non_constant_expr_p): New.
471
fd2325ea
GA
4722020-11-03 Nathan Sidwell <nathan@acm.org>
473
474 * c.opt (MQ,MT): Reword description to be make-agnostic.
475
88ce3d5f
GA
4762020-11-02 Nathan Sidwell <nathan@acm.org>
477
478 * c-opts.c (c_common_post_options): Move var decl to its
479 initialization point.
480
4812020-11-01 Iain Sandoe <iain@sandoe.co.uk>
482
483 * c-lex.c (c_lex_with_flags): When combining '@' with a
484 keyword for Objective-C, combine the location ranges too.
485
4862020-10-30 Qing Zhao <qing.zhao@oracle.com>
487 H.J.Lu <hjl.tools@gmail.com>
488
489 * c-attribs.c (c_common_attribute_table): Add new attribute
490 zero_call_used_regs.
491 (handle_zero_call_used_regs_attribute): New function.
492
e93aae4a
GA
4932020-10-28 Marek Polacek <polacek@redhat.com>
494
495 PR c++/97573
496 * c-opts.c (c_common_post_options): In C++20, turn on
497 -Wdeprecated-enum-enum-conversion and
498 -Wdeprecated-enum-float-conversion.
499 * c.opt (Wdeprecated-enum-enum-conversion,
500 Wdeprecated-enum-float-conversion): New options.
501 (Wenum-conversion): Allow for C++ too.
502
5032020-10-28 Jakub Jelinek <jakub@redhat.com>
504
505 * c-pragma.h (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_ALLOCATE.
506 * c-omp.c: Include bitmap.h.
507 (c_omp_split_clauses): Handle OMP_CLAUSE_ALLOCATE.
508
f19e7c8d
GA
5092020-10-26 Ville Voutilainen <ville.voutilainen@gmail.com>
510
511 * c-common.c (__is_nothrow_assignable): New.
512 (__is_nothrow_constructible): Likewise.
513 * c-common.h (RID_IS_NOTHROW_ASSIGNABLE): New.
514 (RID_IS_NOTHROW_CONSTRUCTIBLE): Likewise.
515
efe71fcc
GA
5162020-10-23 Jan Hubicka <hubicka@ucw.cz>
517
518 * c-common.c (c_common_finalize_early_debug): Update for new thunk api.
519
5202020-10-23 Marek Polacek <polacek@redhat.com>
521
522 PR c++/91741
523 * c-common.c (verify_tree): Handle PAREN_SIZEOF_EXPR.
524 (c_common_init_ts): Likewise.
525 * c-common.def (PAREN_SIZEOF_EXPR): New tree code.
526 * c-common.h (maybe_warn_sizeof_array_div): Declare.
527 * c-warn.c (sizeof_pointer_memaccess_warning): Unwrap NOP_EXPRs.
528 (maybe_warn_sizeof_array_div): New function.
529 * c.opt (Wsizeof-array-div): New option.
530
5312020-10-23 Martin Sebor <msebor@redhat.com>
532
533 PR c/97463
534 * c-warn.c (warn_parm_ptrarray_mismatch): Move null test earlier.
535
56ddd5e2
GA
5362020-10-22 Martin Liska <mliska@suse.cz>
537
538 PR c/94722
539 * c-attribs.c (handle_no_stack_protect_function_attribute): New.
540 (handle_stack_protect_attribute): Add error message for a
541 no_stack_protector function.
542
5432020-10-22 Martin Liska <mliska@suse.cz>
544
545 * c-cppbuiltin.c (c_cpp_builtins): Use the stack_protector enum.
546
5472020-10-22 Jan Hubicka <hubicka@ucw.cz>
548
549 * c-gimplify.c: Include tree-nested.h
550 (c_genericize): Update for new nested function info.
551
b2698c21
GA
5522020-10-14 Martin Sebor <msebor@redhat.com>
553
554 PR c/97413
555 * c-attribs.c (build_attr_access_from_parms): Wrap chain of VLA
556 bounds in an extra list.
557
7e9282ae
GA
5582020-10-05 Richard Biener <rguenther@suse.de>
559 Jakub Jelinek <jakub@redhat.com>
560
561 PR c++/97197
562 * c-pretty-print.c: Include langhooks.h.
563 (c_pretty_printer::postfix_expression): Handle TARGET_MEM_REF as
564 expression.
565 (c_pretty_printer::expression): Handle TARGET_MEM_REF as
566 unary_expression.
567 (c_pretty_printer::unary_expression): Handle TARGET_MEM_REF.
568
660bfe61
GA
5692020-09-30 Martin Sebor <msebor@redhat.com>
570
571 PR middle-end/97189
572 * c-attribs.c (append_access_attr): Use the function declaration
573 location for a warning about an attribute access argument.
574
93bca37c
GA
5752020-09-29 Marek Polacek <polacek@redhat.com>
576
577 PR c++/94695
578 * c.opt (Wrange-loop-construct): New option.
579
82b77dee
GA
5802020-09-23 Martin Sebor <msebor@redhat.com>
581
582 PR c/97131
583 * c-warn.c (warn_parm_ptrarray_mismatch): Handle more invalid input.
584
5852020-09-23 Marek Polacek <polacek@redhat.com>
586
587 PR c/97125
588 * c-gimplify.c (c_genericize): Only call do_warn_duplicated_branches_r
589 after loops and other structured control constructs have been lowered.
590
521d2711
GA
5912020-09-22 Jakub Jelinek <jakub@redhat.com>
592
593 * c.opt (Wbuiltin-declaration-mismatch): Fix typo in variable name:
594 warn_builtin_declaraion_mismatch -> warn_builtin_declaration_mismatch.
595
44135373
GA
5962020-09-21 Marek Polacek <polacek@redhat.com>
597
598 * c.opt (Wctad-maybe-unsupported): New option.
599
2fe5b7d1
GA
6002020-09-19 Martin Sebor <msebor@redhat.com>
601
602 PR c/50584
603 * c-common.h (warn_parm_array_mismatch): Declare new function.
604 (has_attribute): Move declaration of an existing function.
605 (build_attr_access_from_parms): Declare new function.
606 * c-warn.c (parm_array_as_string): Define new function.
607 (plus_one): Define new function.
608 (warn_parm_ptrarray_mismatch): Define new function.
609 (warn_parm_array_mismatch): Define new function.
610 (vla_bound_parm_decl): New function.
611 * c.opt (-Warray-parameter, -Wvla-parameter): New options.
612 * c-pretty-print.c (pp_c_type_qualifier_list): Don't print array type
613 qualifiers here...
614 (c_pretty_printer::direct_abstract_declarator): ...but instead print
615 them in brackets here. Also print [static]. Strip extraneous
616 expressions from VLA bounds.
617
6182020-09-19 Martin Sebor <msebor@redhat.com>
619
620 PR c/50584
621 * c-attribs.c (c_common_attribute_table): Add "arg spec" attribute.
622 (handle_argspec_attribute): New function.
623 (get_argument, get_argument_type): New functions.
624 (append_access_attrs): Add overload. Handle internal attribute
625 representation in addition to external.
626 (handle_access_attribute): Handle internal attribute representation
627 in addition to external.
628 (build_attr_access_from_parms): New function.
629
6302020-09-19 Sandra Loosemore <sandra@codesourcery.com>
631
632 * c-gimplify.c (genericize_c_loop): Rewrite to match
633 c_finish_loop in c-typeck.c.
634
6352020-09-19 Sandra Loosemore <sandra@codesourcery.com>
636
637 * c-common.c (c_block_may_fallthrough): New, split from
638 cxx_block_may_fallthrough in the cp front end.
639 (c_common_init_ts): Move handling of loop and switch-related
640 statements here from the cp front end.
641 * c-common.def (FOR_STMT, WHILE_STMT, DO_STMT): Move here from
642 cp front end.
643 (BREAK_STMT, CONTINUE_STMT, SWITCH_STMT): Likewise.
644 * c-common.h (c_block_may_fallthru): Declare.
645 (bc_state_t): Move here from cp front end.
646 (save_bc_state, restore_bc_state): Declare.
647 (c_genericize_control_stmt): Declare.
648 (WHILE_COND, WHILE_BODY): Likewise.
649 (DO_COND, DO_BODY): Likewise.
650 (FOR_INIT_STMT, FOR_COND, FOR_EXPR, FOR_BODY, FOR_SCOPE): Likewise.
651 (SWITCH_STMT_COND, SWITCH_STMT_BODY): Likewise.
652 (SWITCH_STMT_TYPE, SWITCH_STMT_SCOPE): Likewise.
653 (SWITCH_STMT_ALL_CASES_P, SWITCH_STMT_NO_BREAK_P): Likewise.
654 (LABEL_DECL_BREAK, LABEL_DECL_CONTINUE): Likewise.
655 * c-dump.c (dump_stmt): Copy from cp front end.
656 (c_dump_tree): Move code to handle structured loop and switch
657 tree nodes here from cp front end.
658 * c-gimplify.c: Adjust includes.
659 (enum bc_t, bc_label, begin_bc_block, finish_bc_block): Move from
660 cp front end.
661 (save_bc_state, restore_bc_state): New functions using old code
662 from cp front end.
663 (get_bc_label, expr_loc_or_loc): Move from cp front end.
664 (genericize_c_loop): Move from cp front end.
665 (genericize_for_stmt, genericize_while_stmt): Likewise.
666 (genericize_do_stmt, genericize_switch_stmt): Likewise.
667 (genericize_continue_stmt, genericize_break_stmt): Likewise.
668 (genericize_omp_for_stmt): Likewise.
669 (c_genericize_control_stmt): New function using code split from
670 cp front end.
671 (c_genericize_control_r): New.
672 (c_genericize): Call walk_tree with c_genericize_control_r.
673 * c-pretty-print.c (c_pretty_printer::statement): Move code to handle
674 structured loop and switch tree nodes here from cp front end.
675
2aad20c0
GA
6762020-09-17 Patrick Palka <ppalka@redhat.com>
677
678 PR c/80076
679 * c-indentation.c (should_warn_for_misleading_indentation): Move
680 declarations of local variables closer to their first use.
681 Handle virtual token locations by resolving them to their
682 respective macro expansion points. If all three tokens are
683 produced from the same macro expansion, then instead use their
684 loci within the macro definition.
685
ecde1b0a
GA
6862020-09-16 Martin Sebor <msebor@redhat.com>
687
688 PR c/78666
689 PR c/96126
690 * c-attribs.c (validate_attr_args): New function.
691 (validate_attr_arg): Same.
692 (handle_section_attribute): Call it. Introduce a local variable.
693 (handle_alloc_size_attribute): Same.
694 (handle_alloc_align_attribute): Same.
695
50a71cd0
GA
6962020-09-14 Jakub Jelinek <jakub@redhat.com>
697
698 * c-attribs.c (handle_optimize_attribute): Adjust
699 cl_optimization_save, cl_optimization_restore and
700 build_optimization_node callers.
701 * c-pragma.c (handle_pragma_optimize): Adjust
702 build_optimization_node caller.
703 (handle_pragma_push_options): Adjust
704 build_optimization_node and build_target_option_node callers.
705 (handle_pragma_pop_options, handle_pragma_reset_options):
706 Adjust cl_optimization_restore callers.
707
8f7ea26a
GA
7082020-08-28 Martin Sebor <msebor@redhat.com>
709
710 * c.opt (Wstringop-overread): New option.
711
a6493809
GA
7122020-08-11 Jakub Jelinek <jakub@redhat.com>
713
714 PR c/96545
715 * c-common.c (get_atomic_generic_size): Require that first argument's
716 type points to a complete type and use tree_fits_uhwi_p instead of
717 just INTEGER_CST TREE_CODE check for the TYPE_SIZE_UNIT.
718
48cc2e46
GA
7192020-07-31 Martin Sebor <msebor@redhat.com>
720
721 PR c++/96003
722 * c-common.c (check_function_arguments_recurse): Return early when
723 no-warning bit is set.
724
7252020-07-31 Richard Biener <rguenther@suse.de>
726
727 PR debug/96383
728 * c-common.h (c_common_finalize_early_debug): Declare.
729 * c-common.c: Include debug.h.
730 (c_common_finalize_early_debug): finalize_early_debug langhook
731 implementation generating debug for extern declarations.
732
e71dab87
GA
7332020-07-27 Nathan Sidwell <nathan@acm.org>
734
735 * c-common.c (try_to_locate_new_include_insertion_point): Use
736 strcmp, not pointer equality.
737
ae2e0bc1
GA
7382020-07-25 Martin Sebor <msebor@redhat.com>
739
740 PR c++/96310
741 * c-common.c (check_nonnull_arg): Print note only when warning was
742 issued.
743
3ea9abca
GA
7442020-07-22 Tobias Burnus <tobias@codesourcery.com>
745
746 * c-omp.c (c_finish_omp_critical): Check for no name but
747 nonzero hint provided.
748
0933f508
GA
7492020-07-20 Jason Merrill <jason@redhat.com>
750
751 * c-cppbuiltin.c (c_cpp_builtins): Update
752 __cpp_nontype_template_args for C++20.
753
7542020-07-20 Martin Sebor <msebor@redhat.com>
755
756 PR c/96249
757 * c.opt: Remove stray text.
758
8ca07a30
GA
7592020-07-14 Lewis Hyatt <lhyatt@gmail.com>
760
761 PR other/86904
762 * c-indentation.c (should_warn_for_misleading_indentation): Get
763 global tabstop from the new source.
764 * c-opts.c (c_common_handle_option): Remove handling of -ftabstop, which
765 is now a common option.
766 * c.opt: Likewise.
767
a82c4c4c 7682020-07-08 Eric Botcazou <ebotcazou@adacore.com>
50873cc5
GA
769
770 * c.opt (Wscalar-storage-order): Add explicit variable.
771
f60ee68d
GA
7722020-07-07 Nathan Sidwell <nathan@acm.org>
773
774 * c-opts.c (c_common_post_options): Add 'injecting' arg to
775 cpp_read_main_file.
776 (c_finish_options): Add linemap_line_start calls for builtin and cmd
777 maps. Force token position to line_table's highest line.
778 * c-ppoutput.c (print_line_1): Refactor, print line zero.
779 (cb_define): Always increment source line.
780
4077d74c
GA
7812020-07-06 Martin Sebor <msebor@redhat.com>
782
783 PR c++/95984
784 * c-common.c (check_function_nonnull): Avoid checking syntesized calls
785 to stub lambda objects with null this pointer.
786 (check_nonnull_arg): Handle C++ nullptr.
787
b5f24739
GA
7882020-07-02 Jason Merrill <jason@redhat.com>
789 Jakub Jelinek <jakub@redhat.com>
790
791 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_consteval.
792
46fbb6c6
GA
7932020-06-30 Jakub Jelinek <jakub@redhat.com>
794
795 PR c++/95963
796 * c-common.c (check_function_arguments_recurse): Don't crash on
797 calls to internal functions.
798
69273534
GA
7992020-06-28 Martin Sebor <msebor@redhat.com>
800
801 PR c++/86568
802 * c-common.c (struct nonnull_arg_ctx): Add members.
803 (check_function_nonnull): Use nonnull_arg_ctx as argument. Handle
804 C++ member functions specially. Consider the this pointer implicitly
805 nonnull.
806 (check_nonnull_arg): Use location of argument when available.
807 (check_function_arguments): Use nonnull_arg_ctx as argument.
808
9a33c41f
GA
8092020-06-27 Jakub Jelinek <jakub@redhat.com>
810
811 PR middle-end/95903
812 * c-common.c (pointer_int_sum): Use TYPE_OVERFLOW_UNDEFINED instead of
813 !TYPE_UNSIGNED check to see if we can apply distributive law and handle
814 smaller precision intop operands separately.
815
c9c05f73
GA
8162020-06-26 Marek Polacek <polacek@redhat.com>
817
818 * c-opts.c (c_common_init_options): Default to gnu++17.
819
aff95ee7
GA
8202020-06-17 Jonathan Wakely <jwakely@redhat.com>
821
bd0a89dc 822 PR c/95378
aff95ee7
GA
823 * c-common.c (get_atomic_generic_size): Check cv-qualifiers in
824 pointer arguments.
825
56638b9b
GA
8262020-06-16 Jakub Jelinek <jakub@redhat.com>
827
828 * c-common.h (c_omp_check_loop_iv_exprs): Add an int argument.
829 * c-omp.c (struct c_omp_check_loop_iv_data): Add maybe_nonrect and
830 idx members.
831 (c_omp_is_loop_iterator): New function.
832 (c_omp_check_loop_iv_r): Use it. Add support for silent scanning
833 if outer loop iterator is present. Perform duplicate checking through
834 hash_set in the function rather than expecting caller to do that.
835 Pass NULL instead of d->ppset to walk_tree_1.
836 (c_omp_check_nonrect_loop_iv): New function.
837 (c_omp_check_loop_iv): Use it. Fill in new members, allow
838 non-rectangular loop forms, diagnose multiple associated loops with
839 the same iterator. Pass NULL instead of &pset to walk_tree_1.
840 (c_omp_check_loop_iv_exprs): Likewise.
841
ec6ffbb9
GA
8422020-06-10 Martin Liska <mliska@suse.cz>
843
844 PR tree-optimization/92860
845 * c-attribs.c (handle_optimize_attribute):
846 Save global options and compare it after parsing of function
847 attribute.
848 * c-pragma.c (opt_stack::saved_global_options): New field.
849 (handle_pragma_push_options): Save global_options.
850 (handle_pragma_pop_options): Compare them after pop.
851
b952c2cf
GA
8522020-06-09 Jakub Jelinek <jakub@redhat.com>
853
854 PR c/95580
855 * c-pretty-print.c (c_pretty_printer::unary_expression): Handle the
856 case when MEM_REF's first argument has type pointer to incomplete type.
857
1a59f3db
GA
8582020-06-05 Jason Merrill <jason@redhat.com>
859
860 * c-pretty-print.c (pp_c_additive_expression): Handle negative
861 operand to POINTER_PLUS_EXPR.
862
3add3425
GA
8632020-06-04 Martin Sebor <msebor@redhat.com>
864
865 PR middle-end/10138
866 PR middle-end/95136
867 * c-attribs.c (append_access_attrs): Handle attr_access::none.
868 (handle_access_attribute): Same.
869
9a5b7438
GA
8702020-06-03 Mark Wielaard <mark@klomp.org>
871
872 * known-headers.cc (get_cp_stdlib_header_for_string_macro_name):
873 New function.
874 * known-headers.h (get_cp_stdlib_header_for_string_macro_name):
875 New function declaration.
876
8772020-06-03 Mark Wielaard <mark@klomp.org>
878
879 * known-headers.cc (get_string_macro_hint): New function.
880 (get_stdlib_header_for_name): Use get_string_macro_hint.
881 (get_c_stdlib_header_for_string_macro_name): New function.
882 * known-headers.h (get_c_stdlib_header_for_string_macro_name):
883 New function declaration.
884
8852020-06-03 Tobias Burnus <tobias@codesourcery.com>
886
887 * c-common.h (c_omp_predetermined_mapping): Declare.
888 * c-omp.c (c_omp_predetermined_mapping): New.
889
af114c38
MW
8902020-05-22 Mark Wielaard <mark@klomp.org>
891
892 * known-headers.cc (get_stdlib_header_for_name): Add a new
893 stdlib_hint array for stdbool and stdint.
894
45c50b6a
MW
8952020-05-22 Mark Wielaard <mark@klomp.org>
896
897 * known-headers.cc (get_stdlib_header_for_name): Return
898 "<stdbool.h>" for "bool", "true" or "false" when STDLIB_C and
899 flag_isoc99.
900
c22027a0
NS
9012020-05-20 Nathan Sidwell <nathan@acm.org>
902
38a4db21
NS
903 * c-common.c (try_to_locate_new_include_insertion_point): Revert change.
904
c22027a0
NS
905 * c-common.c (try_to_locate_new_include_insertion_point): Use
906 strcmp to compare filenames.
907 * c-lex.c (init_c_lex): Move declaration to initialization.
908 * c-opts.c (handle_deferred_opts): Move cpp_get_deps call into
909 deferred count loop.
910
29f0e90d
JM
9112020-05-15 Jason Merrill <jason@redhat.com>
912
913 * c-opts.c (set_std_cxx20): Set flag_coroutines.
914
b04445d4
JM
9152020-05-13 Jason Merrill <jason@redhat.com>
916
917 * c.opt (std=c++20): Make c++2a the alias.
918 (std=gnu++20): Likewise.
919 * c-common.h (cxx_dialect): Change cxx2a to cxx20.
920 * c-opts.c: Adjust.
921 * c-cppbuiltin.c: Adjust.
922 * c-ubsan.c: Adjust.
923 * c-warn.c: Adjust.
924
11dd3be5
EB
9252020-05-12 Eric Botcazou <ebotcazou@adacore.com>
926
927 * c-ada-spec.c (dump_ads): Output pragma Warnings ("U"); on entry.
928
b224c376
NS
9292020-05-08 Nathan Sidwell <nathan@acm.org>
930
931 Reimplement directives only processing.
932 * c-ppoutput.c (token_streamer): Ne.
933 (directives_only_cb): New. Swallow ...
934 (print_lines_directives_only): ... this.
935 (scan_translation_unit_directives_only): Reimplment using the
936 published interface.
937
f1d94677
MP
9382020-05-07 Marek Polacek <polacek@redhat.com>
939
940 * c-format.c (badwords): Add "nonstatic".
941
9b95bb52
JJ
942202-05-07 Jakub Jelinek <jakub@redhat.com>
943
944 PR c/94968
945 * c-common.c (speculation_safe_value_resolve_params): Return false if
946 error_operand_p (val2).
947 (resolve_overloaded_builtin) <case BUILT_IN_SPECULATION_SAFE_VALUE_N>:
948 Remove extraneous semicolon.
949
530b4409 9502020-05-06 qing zhao <qing.zhao@oracle.com>
951
952 PR c/94230
953 * c-indentation.c (get_visual_column): Add a hint to use the new
954 -flarge-source-files option.
955
b776bdca
SSF
9562020-05-05 Stefan Schulze Frielinghaus <stefansf@linux.ibm.com>
957
958 * c-attribs.c (handle_vector_size_attribute): Add attribute
959 nonnull for argument args in order to silence warning of
960 uninitialized variable usage. Since this is local to the
961 compilation unit and thus cannot be checked at call sides by the
962 compiler, added an assert statement in order to verify this.
963
6607bdd9
L
9642020-05-01 H.J. Lu <hongjiu.lu@intel.com>
965
966 PR target/93492
967 * c-attribs.c (handle_patchable_function_entry_attribute): Limit
968 value to USHRT_MAX (65535).
969
691eeb65
JJ
9702020-04-29 Jakub Jelinek <jakub@redhat.com>
971
972 * c-format.c (PP_FORMAT_CHAR_TABLE): Add %{ and %}.
973
26d76be7
JJ
9742020-04-27 Jakub Jelinek <jakub@redhat.com>
975
976 PR c/94755
977 * c-common.c (resolve_overloaded_builtin): Return error_mark_node for
978 fncode == BUILT_IN_NONE before initialization of first_param.
979
7291b2ed
MP
9802020-04-23 Marek Polacek <polacek@redhat.com>
981
982 PR c++/94733
983 * c-attribs.c (find_tm_attribute): Use get_attribute_name instead of
984 TREE_PURPOSE.
985
58a29af8
PP
9862020-04-14 Patrick Palka <ppalka@redhat.com>
987
988 PR c++/85278
989 * c-pretty-print.c (pp_c_pointer) <case REFERENCE_TYPE>: Print a double
990 ampersand if it's an rvalue reference type.
991
09f04139
MS
9922020-04-13 Martin Sebor <msebor@redhat.com>
993
994 PR c/92326
995 * c-pretty-print.c (c_pretty_printer::direct_abstract_declarator): Avoid
996 printing array bound for flexible array members.
997
ee26baf4
IS
9982020-04-13 Iain Sandoe <iain@sandoe.co.uk>
999
1000 * c-cppbuiltin.c (c_cpp_builtins): Update coroutines builtin
1001 define, per n4861.
1002
75efe9cb
RB
10032020-04-02 Richard Biener <rguenther@suse.de>
1004
1005 PR c/94392
1006 * c-opts.c (c_common_post_options): Enable -ffinite-loops
1007 for -O2 and C++11 or newer.
1008
75defde9
PP
10092020-03-28 Patrick Palka <ppalka@redhat.com>
1010
1011 * c.opt: Add -fconcepts-diagnostics-depth.
1012
52f24a9e
MS
10132020-03-27 Martin Sebor <msebor@redhat.com>
1014
1015 PR c++/94346
1016 * c-attribs.c (handle_copy_attribute): Avoid passing expressions
1017 to decl_attributes. Make handling of different kinds of entities
1018 more robust.
1019
ccacf77b
MS
10202020-03-27 Martin Sebor <msebor@redhat.com>
1021
1022 PR c++/94098
1023 * c-attribs.c (handle_access_attribute): Avoid setting TYPE_ATTRIBUTES
1024 here.
1025
ca6c7225
JJ
10262020-03-23 Jakub Jelinek <jakub@redhat.com>
1027
1028 PR c++/91993
1029 * c-warn.c (warnings_for_convert_and_check): For expr and/or
1030 result being COMPOUND_EXPRs, skip to ultimate rhs.
1031
1aa22b19
RS
10322020-03-20 Richard Sandiford <richard.sandiford@arm.com>
1033
1034 PR middle-end/94072
1035 * c-common.c (c_common_type_for_mode): Before using a registered
1036 built-in type, check that the vectorness of the type matches
1037 the vectorness of the mode.
1038
700d4cb0
JJ
10392020-03-17 Jakub Jelinek <jakub@redhat.com>
1040
1041 * c-common.c (resolve_overloaded_builtin): Fix up duplicated word
1042 issue in a diagnostic message.
1043
b408e010
LH
10442020-03-15 Lewis Hyatt <lhyatt@gmail.com>
1045
1046 * c.opt: Avoid redundancy in the help text.
1047
e78e50d5
MP
10482020-03-02 Marek Polacek <polacek@redhat.com>
1049
1050 PR c++/93958 - add missing -std=gnu++20.
1051 * c.opt: Add -std=gnu++20.
1052
649e1741
MS
10532020-03-01 Martin Sebor <msebor@redhat.com>
1054
1055 PR c++/92721
1056 * c-attribs.c (append_access_attrs): Correctly handle attribute.
1057 (handle_access_attribute): Same.
1058
7b60f3ba
JJ
10592020-02-25 Jakub Jelinek <jakub@redhat.com>
1060
1061 PR c/93858
1062 * c-pragma.c (handle_pragma_diagnostic): Add missing ? after
1063 "did you mean" hint in diagnostics.
1064
fb260504
JM
10652020-02-15 Jason Merrill <jason@redhat.com>
1066
1067 * c.opt: Add -std=c++20.
1068
1d757b09
EB
10692020-02-14 Eric Botcazou <ebotcazou@adacore.com>
1070
1071 * c-ada-spec.c: Include bitmap.h.
1072 (dump_ada_double_name): Rename into...
1073 (dump_anonymous_type_name): ...this. Always use the TYPE_UID.
1074 (dump_ada_array_type): Adjust to above renaming. Robustify.
1075 (dump_nested_types_1): New function copied from... Add dumped_types
1076 parameter and pass it down to dump_nested_type.
1077 (dump_nested_types): ...this. Remove parent parameter. Just call
1078 dump_nested_types_1 on an automatic bitmap.
1079 (dump_nested_type): Add dumped_types parameter.
1080 <ARRAY_TYPE>: Do not dump it if already present in dumped_types.
1081 Adjust recursive calls and adjust to above renaming.
1082 (dump_ada_declaration): Adjust call to dump_nested_types.
1083 Tidy up and adjust to above renaming.
1084 (dump_ada_specs): Initialize and release bitmap obstack.
1085
0cc575e4
MS
10862020-02-10 Martin Sebor <msebor@redhat.com>
1087
1088 PR c/93640
1089 * c-attribs.c (handle_access_attribute): Correct off-by-one mistakes.
1090
a59aa302
JJ
10912020-02-10 Jakub Jelinek <jakub@redhat.com>
1092
1093 PR other/93641
1094 * c-format.c (check_plain): Fix up last argument of strncasecmp.
1095 Remove useless extra test.
1096
e464fc90
TB
10972020-02-03 Julian Brown <julian@codesourcery.com>
1098 Tobias Burnus <tobias@codesourcery.com>
1099
1100 * c-cppbuiltin.c (c_cpp_builtins): Update _OPENACC define to 201711.
1101
e3b6c052
JM
11022020-01-29 Jason Merrill <jason@redhat.com>
1103
1104 PR c++/89357
1105 * c-attribs.c (check_cxx_fundamental_alignment_constraints): Remove.
1106
6d00f052
JM
11072020-01-23 Jason Merrill <jason@redhat.com>
1108
1109 * c-warn.c (conversion_warning): Change -Wsign-conversion handling.
1110
8a990ffa
MS
11112020-01-23 Martin Sebor <msebor@redhat.com>
1112
1113 PR c/84919
1114 * c-common.c (check_function_arguments): Avoid overlap checking
1115 of sprintf functions.
1116
55b7df8b
JM
11172020-01-22 Jason Merrill <jason@redhat.com>
1118
1119 PR testsuite/93391 - PR 40752 test fails with unsigned plain char.
1120 PR c++/40752
1121 * c-warn.c (conversion_warning): Check operands only after checking
1122 the whole expression. Don't check second operand of + for sign.
1123
c77074d0
JM
11242020-01-21 Jason Merrill <jason@redhat.com>
1125 Manuel López-Ibáñez <manu@gcc.gnu.org>
1126
1127 PR c++/40752 - useless -Wconversion with short +=.
1128 * c.opt (-Warith-conversion): New.
1129 * c-warn.c (conversion_warning): Recurse for operands of
1130 operators. Only warn about the whole expression with
1131 -Warith-conversion.
1132
731dbfc3
JM
11332020-01-21 Jason Merrill <jason@redhat.com>
1134
1135 * c-common.c (unsafe_conversion_p): Don't warn, return UNSAFE_SIGN.
1136 * c-warn.c (conversion_warning): Warn about UNSAFE_SIGN.
1137
ad1a3914
NS
11382020-01-20 Nathan Sidwell <nathan@acm.org>
1139
1140 PR preprocessor/80005
1141 * c-cppbuiltins.c (c_cpp_builtins): Don't define __has_include{,_next}.
1142
49789fd0
IS
11432020-01-18 Iain Sandoe <iain@sandoe.co.uk>
1144
1145 * c-common.c (co_await, co_yield, co_return): New.
1146 * c-common.h (RID_CO_AWAIT, RID_CO_YIELD,
1147 RID_CO_RETURN): New enumeration values.
1148 (D_CXX_COROUTINES): Bit to identify coroutines are active.
1149 (D_CXX_COROUTINES_FLAGS): Guard for coroutine keywords.
1150 * c-cppbuiltin.c (__cpp_coroutines): New cpp define.
1151 * c.opt (fcoroutines): New command-line switch.
1152
4bc1899b
DM
11532020-01-10 David Malcolm <dmalcolm@redhat.com>
1154
1155 * c-format.c (local_event_ptr_node): New.
1156 (PP_FORMAT_CHAR_TABLE): Add entry for "%@".
1157 (init_dynamic_diag_info): Initialize local_event_ptr_node.
1158 * c-format.h (T_EVENT_PTR): New define.
1159
f25e33fa
MS
11602020-01-10 Martin Sebor <msebor@redhat.com>
1161
1162 PR c/93132
1163 * c-attribs.c (append_access_attrs): Validate against the translated
1164 access string rather than the human-readable representation.
1165
8d9254fc
JJ
11662020-01-01 Jakub Jelinek <jakub@redhat.com>
1167
1168 Update copyright years.
1169
39292e25
EB
11702019-12-20 Eric Botcazou <ebotcazou@adacore.com>
1171
1172 * c-ada-spec.h (decl_sloc): Delete.
1173 * c-ada-spec.c (decl_sloc): Make static.
1174
519d7496
JB
11752019-12-19 Julian Brown <julian@codesourcery.com>
1176
1177 * c-common.h (c_omp_map_clause_name): Add prototype.
1178 * c-omp.c (c_omp_map_clause_name): New function.
1179 * c-pragma.h (pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_ATTACH and
1180 PRAGMA_OACC_CLAUSE_DETACH.
1181
a6163563
JB
11822019-12-19 Julian Brown <julian@codesourcery.com>
1183 Maciej W. Rozycki <macro@codesourcery.com>
1184 Tobias Burnus <tobias@codesourcery.com>
1185 Thomas Schwinge <thomas@codesourcery.com>
1186
1187 * c-pragma.h (pragma_omp_clause): Add
1188 PRAGMA_OACC_CLAUSE_NO_CREATE.
1189
e8f1ade2
MS
11902019-12-17 Martin Sebor <msebor@redhat.com>
1191
1192 PR c++/61339
1193 * c.opt (-Wmismatched-tags, -Wredundant-tags): New options.
1194
368877a1
DM
11952019-12-11 David Malcolm <dmalcolm@redhat.com>
1196
1197 * c-pretty-print.c (c_pretty_printer::clone): New vfunc
1198 implementation.
1199 * c-pretty-print.h (c_pretty_printer::clone): New vfunc decl.
1200
d68f5d45
DM
12012019-12-09 David Malcolm <dmalcolm@redhat.com>
1202
1203 * c-format.c (range_label_for_format_type_mismatch::get_text):
1204 Replace label_text ctor called with true with label_text::take.
1205
d3e28653
DM
12062019-12-09 David Malcolm <dmalcolm@redhat.com>
1207
1208 * c-format.c (selftest::test_type_mismatch_range_labels): Remove
1209 initial newline from expected outputs.
1210 * c-opts.c (c_diagnostic_finalizer): Add pp_newline call before
1211 call to diagnostic_show_locus.
1212
abd6d8cc
JJ
12132019-12-06 Jakub Jelinek <jakub@redhat.com>
1214
1215 * c-cppbuiltin.c (c_cpp_builtins): Don't define __cpp_consteval for
1216 now.
1217
7906797e
MP
12182019-12-05 Marek Polacek <polacek@redhat.com>
1219 Jakub Jelinek <jakub@redhat.com>
1220
1221 PR c++/91353 - P1331R2: Allow trivial default init in constexpr contexts.
1222 * c-cppbuiltin.c (c_cpp_builtins): Adjust the value of __cpp_constexpr.
1223
5c04da88
MP
12242019-12-05 Marek Polacek <polacek@redhat.com>
1225
1226 PR c++/92271 - make __is_same alias for __is_same_as.
1227 * c-common.c: Add __is_same, an alias for __is_same_as.
1228
43aae289
MP
12292019-12-03 Marek Polacek <polacek@redhat.com>
1230
1231 PR c++/91363 - P0960R3: Parenthesized initialization of aggregates.
1232 * c-cppbuiltin.c (c_cpp_builtins): Predefine
1233 __cpp_aggregate_paren_init=201902 for -std=c++2a.
1234
d7ddfbcb
JH
12352019-11-30 Jan Hubicka <hubicka@ucw.cz>
1236
1237 * c-attribs.c (handle_symver_attribute): New function
1238 (c_common_attributes): Add symver.
1239
65ef05d0
RS
12402019-11-30 Richard Sandiford <richard.sandiford@arm.com>
1241
1242 * c-common.c (pointer_int_sum): Use verify_type_context to check
1243 whether the target allows pointer arithmetic for the types involved.
1244 (c_sizeof_or_alignof_type, c_alignof_expr): Use verify_type_context
1245 to check whether the target allows sizeof and alignof operations
1246 for the types involved.
1247
1a291106
JM
12482019-11-27 Jason Merrill <jason@redhat.com>
1249
1250 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_deduction_guides.
1251
05d6cb1a
JJ
12522019-11-26 Jakub Jelinek <jakub@redhat.com>
1253
1254 PR c++/61414
1255 * c-attribs.c (handle_mode_attribute): Add mode attribute to
1256 ENUMERAL_TYPEs.
1257
5b8d9367
JM
12582019-11-25 Joseph Myers <joseph@codesourcery.com>
1259
1260 PR c/91985
1261 * c-common.c (c_common_type_for_mode): Handle decimal
1262 floating-point types being NULL_TREE.
1263 * c-format.c (get_format_for_type_1): Handle specified types being
1264 NULL_TREE.
1265 * c-lex.c (interpret_float): Give an error for decimal
1266 floating-point constants when decimal floating-point not
1267 supported.
1268
1fbf51cb
JJ
12692019-11-23 Jakub Jelinek <jakub@redhat.com>
1270
1271 PR middle-end/83859
1272 * c-attribs.c (append_access_attrs): Avoid buffer overflow. Avoid
1273 memory leak. Use XNEWVEC macro. Use auto_diagnostic_group to
1274 group warning with inform together.
1275 (handle_access_attribute): Formatting fix.
1276
761df906
JJ
12772019-11-22 Jakub Jelinek <jakub@redhat.com>
1278
bdaf8be1
JJ
1279 PR c/90677
1280 * c-common.h (identifier_global_tag): Declare.
1281 * c-format.c (get_pointer_to_named_type): Renamed to ...
1282 (get_named_type): ... this. Use identifier_global_tag instead of
1283 identifier_global_value, handle the return value being a TYPE_P.
1284 (init_dynamic_diag_info): Adjust get_pointer_to_named_type callers
1285 to call get_named_type instead. Formatting fixes.
1286
c2ecce6d 1287 Implement P1902R1, Missing feature-test macros 2017-2019.
761df906
JJ
1288 * c-cppbuiltin.c (c_cpp_builtins): Bump __cpp_init_captures
1289 and __cpp_generic_lambdas for -std=c++2a. Define
1290 __cpp_designated_initializers, __cpp_constexpr_in_decltype and
1291 __cpp_consteval for -std=c++2a. Remove a FIXME comment about
1292 __cpp_concepts for -std=c++2a.
1293
54aa6b58
MS
12942019-11-22 Martin Sebor <msebor@redhat.com>
1295
1296 PR middle-end/83859
1297 * c-attribs.c (handle_access_attribute): New function.
1298 (c_common_attribute_table): Add new attribute.
1299 (get_argument_type): New function.
1300 (append_access_attrs): New function.
1301 (get_nonnull_operand): Rename...
1302 (get_attribute_operand): ...to this.
1303 * c-common.c (get_nonnull_operand): Rename...
1304 (get_attribute_operand): ...to this.
1305
6c80b1b5
JM
13062019-11-21 Joseph Myers <joseph@codesourcery.com>
1307
1308 * c-attribs.c (handle_fallthrough_attribute): Use pedwarn instead
1309 of warning.
1310
192961ff
JM
13112019-11-19 Joseph Myers <joseph@codesourcery.com>
1312
1313 * c-common.c (attribute_fallthrough_p): In C, use pedwarn not
1314 warning for standard attributes mixed with fallthrough attributes.
1315
f8aea5e3
JM
13162019-11-15 Joseph Myers <joseph@codesourcery.com>
1317
1318 * c-attribs.c (handle_fallthrough_attribute): Remove static.
1319 * c-common.h (handle_fallthrough_attribute): Declare.
1320
2cc94aa8
JM
13212019-11-15 Joseph Myers <joseph@codesourcery.com>
1322
1323 * c-attribs.c (handle_deprecated_attribute): Remove static.
1324 * c-common.h (handle_deprecated_attribute): Declare.
1325
7c5890cc
JM
13262019-11-14 Joseph Myers <joseph@codesourcery.com>
1327
1328 * c-lex.c (lex_charconst): Make CPP_UTF8CHAR constants unsigned
1329 char for C.
1330
b2417b59
JJ
13312019-11-14 Jakub Jelinek <jakub@redhat.com>
1332
d0ec7c93
JJ
1333 * c-omp.c (c_omp_check_context_selector): Add nvidia to the list of
1334 valid vendors.
1335
b2417b59
JJ
1336 * c-omp.c (c_omp_check_context_selector): Handle name lists
1337 containing string literals. Don't diagnose atomic_default_mem_order
1338 with multiple props.
1339
00be2a5f
JM
13402019-11-13 Joseph Myers <joseph@codesourcery.com>
1341
1342 * c-cppbuiltin.c (builtin_define_float_constants): Also define
1343 NORM_MAX constants. Update call to get_max_float.
1344 (LAZY_HEX_FP_VALUES_CNT): Update value to include NORM_MAX
1345 constants.
1346
2dbad62d
EB
13472019-11-13 Eric Botcazou <ebotcazou@adacore.com>
1348
1349 * c-ada-spec.c (get_underlying_decl): Do not look through typedefs.
1350 (dump_forward_type): Do not generate a declaration for function types.
1351 (dump_nested_type) <ARRAY_TYPE>: Do not generate a nested declaration
1352 of the component type if it is declared in another file.
1353
6ed76044
ML
13542019-11-12 Martin Liska <mliska@suse.cz>
1355
1356 * c-opts.c (c_common_post_options):
1357 Use SET_OPTION_IF_UNSET.
1358
62aee289
MR
13592019-11-12 Maciej W. Rozycki <macro@codesourcery.com>
1360 Frederik Harwath <frederik@codesourcery.com>
1361
1362 gcc/c-family/
1363 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_SERIAL enumeration
1364 constant.
1365 * c-pragma.c (oacc_pragmas): Add "serial" entry.
1366
f486280c
RS
13672019-11-08 Richard Sandiford <richard.sandiford@arm.com>
1368
1369 * c-common.h (gnu_vector_type_p): New function.
1370 * c-common.c (c_build_vec_perm_expr): Require __builtin_shuffle
1371 vectors to satisfy gnu_vector_type_p.
1372 (c_build_vec_convert): Likewise __builtin_convertvector.
1373 (convert_vector_to_array_for_subscript): Likewise when applying
1374 implicit vector to array conversion.
1375 (scalar_to_vector): Likewise when converting vector-scalar
1376 operations to vector-vector operations.
1377
017c6491
JM
13782019-11-08 Joseph Myers <joseph@codesourcery.com>
1379
1380 * c.opt (Wold-style-definition): Initialize to -1.
1381 * c-opts.c (c_common_post_options): Set warn_old_style_definition
1382 to flag_isoc2x if not set explicitly.
1383
c01bd174
JM
13842019-11-07 Joseph Myers <joseph@codesourcery.com>
1385
1386 * c-attribs.c (parse_tm_stmt_attr): Handle scoped attributes.
1387
0df65305
JM
13882019-11-05 Jason Merrill <jason@redhat.com>
1389
1390 * c-opts.c (c_common_post_options): -fconcepts-ts implies
1391 -fconcepts.
1392
e0c866dd
KK
13932019-11-04 Kamlesh Kumar <kamleshbhalui@gmail.com>
1394
1395 * c-opts.c (c_common_post_options): Update
1396 latest_abi_version.
1397
f968ef9b
JJ
13982019-11-02 Jakub Jelinek <jakub@redhat.com>
1399
d0c464d2
JJ
1400 * c-common.h (c_omp_get_context_selector): Remove.
1401 * c-omp.c (c_omp_get_context_selector): Moved to omp-general.c
1402 and renamed to omp_get_context_selector.
1403
917dd789
JJ
1404 * c-omp.c (c_omp_mark_declare_variant): Use
1405 omp_context_selector_set_compare.
1406
f968ef9b
JJ
1407 PR c++/88335 - Implement P1073R3: Immediate functions
1408 * c-common.h (enum rid): Add RID_CONSTEVAL.
1409 * c-common.c (c_common_reswords): Add consteval.
1410
5f6705b7
JJ
14112019-11-01 Martin Sebor <msebor@redhat.com>
1412
1413 PR middle-end/91679
1414 PR middle-end/91647
1415 PR middle-end/91463
1416 PR middle-end/92312
1417 * c-pretty-print.c (direct_abstract_declarator): Print
1418 bound in zero-length arrays.
1419 * c.opt (-Wzero-length-bounds): New option.
1420
43f1814c
NS
14212019-10-30 Nathan Sidwell <nathan@acm.org>
1422
1423 * c-cppbuiltin.c (c_cpp_builtins): Add 'L' suffix to feature
1424 macros.
1425
ad1539d5
MS
14262019-10-28 Martin Sebor <msebor@redhat.com>
1427
1428 PR c/66970
1429 * c-common.c (c_common_nodes_and_builtins): Call c_define_builtins
1430 even when only preprocessing.
1431 * c-common.h (names_builtin_p): Declare new function.
1432 * c-lex.c (init_c_lex): Set has_builtin.
1433 (c_common_has_builtin): Define a new function.
1434 * c-ppoutput.c (init_pp_output): Set has_builtin.
1435
135df52c
JJ
14362019-10-24 Jakub Jelinek <jakub@redhat.com>
1437
1438 * c-common.h (c_omp_context_selector_matches): Remove.
1439 * c-omp.c (c_omp_context_selector_matches): Remove.
1440 * c-attribs.c (c_common_attribute_table): Add
1441 "omp declare target {host,nohost,block}" attributes.
1442
8ad0c477
JM
14432019-10-17 JeanHeyd Meneide <phdofthehouse@gmail.com>
1444
1445 * c-lex.c (c_common_has_attribute): Update nodiscard value.
1446
56898e43
RS
14472019-10-14 Richard Sandiford <richard.sandiford@arm.com>
1448
1449 * c-common.h (user_facing_original_type_p): Declare.
1450 * c-common.c: Include c-spellcheck.h.
1451 (user_facing_original_type_p): New function.
1452
20de9568
JJ
14532019-10-12 Jakub Jelinek <jakub@redhat.com>
1454
1455 * c-common.h (c_omp_mark_declare_variant,
1456 c_omp_context_selector_matches): Declare.
1457 * c-omp.c: Include attribs.h, gimplify.h, cgraph.h, symbol-summary.h
1458 and hsa-common.h.
1459 (c_omp_get_context_selector): Support second argument NULL.
1460 (c_omp_mark_declare_variant, c_omp_context_selector_matches): New
1461 functions.
1462 * c-attribs.c (c_common_attribute_table): Remove "omp declare variant"
1463 attribute, add "omp declare variant base" and
1464 "omp declare variant variant" attributes.
1465
175a85b2
JM
14662019-10-11 Joseph Myers <joseph@codesourcery.com>
1467
1468 * c.opt (Wc11-c2x-compat): Add CPP(cpp_warn_c11_c2x_compat)
1469 CppReason(CPP_W_C11_C2X_COMPAT).
1470
fe2bc27c
JM
14712019-10-11 Joseph Myers <joseph@codesourcery.com>
1472
1473 * c-common.c (c_common_reswords): Do not use D_EXT for _Decimal32,
1474 _Decimal64 and _Decimal128.
1475
27dfdc0f
JM
14762019-10-10 Joseph Myers <joseph@codesourcery.com>
1477
1478 * c-cppbuiltin.c (c_cpp_builtins): Do not define macros for DFP
1479 types if DFP not supported.
1480
94e7f906
JJ
14812019-10-10 Jakub Jelinek <jakub@redhat.com>
1482
1483 * c-common.h (c_omp_check_context_selector,
1484 c_omp_get_context_selector): Declare.
1485 * c-omp.c (c_omp_declare_simd_clauses_to_numbers): Fix spelling
1486 in diagnostic message.
1487 (c_omp_check_context_selector, c_omp_get_context_selector): New
1488 functions.
1489 * c-attribs.c (c_common_attribute_table): Add "omp declare variant"
1490 attribute.
1491 (handle_omp_declare_variant_attribute): New function.
1492
a7160771
MS
14932019-10-09 Martin Sebor <msebor@redhat.com>
1494
1495 PR tree-optimization/90879
1496 * c.opt (-Wstring-compare): New option.
1497
cb57504a
JM
14982019-10-08 Andrew Sutton <asutton@lock3software.com>
1499 Jason Merrill <jason@redhat.com>
1500
1501 Update the concepts implementation to conform to the C++20
1502 specification, improve compile times, and generally clean up
1503 the implementation.
1504
1505 * c-cppbuiltin.c (c_cpp_builtins): Use new feature test values for
1506 concepts when -std=c++2a. Bump __cpp_concepts to 201907.
1507 * c.opt: Add -Wconcepts-ts.
1508 * c-opts.c (c_common_post_options): Warn when -fconcepts is used
1509 with -std=c++2a. Disable warning for -fconcepts in C++20 mode.
1510 (set_std_cxx2a): Enable concepts by default.
1511
fbb2a6dc
JM
15122019-10-08 Joseph Myers <joseph@codesourcery.com>
1513
1514 * c-opts.c (c_common_post_options): Set
1515 -fno-fp-int-builtin-inexact for C2X.
1516
8e007055
JJ
15172019-10-05 Jakub Jelinek <jakub@redhat.com>
1518
1519 PR c++/91369 - Implement P0784R7: constexpr new
1520 * c-cppbuiltin.c (c_cpp_builtins): Predefine
1521 __cpp_constexpr_dynamic_alloc=201907 for -std=c++2a.
1522
843f104d
JM
15232019-10-04 Joseph Myers <joseph@codesourcery.com>
1524
1525 PR c/82752
1526 * c-format.c (C_STD_VER): Handle C2x.
1527 (C_STD_NAME): Likewise.
1528 (strftime_flag_specs): Add 'O' modifier with 'p' flag.
1529 (time_char_table): Use separate entry for 'B' and 'b', with 'O'
1530 modifier allowed and 'p' flag.
1531 * c-format.h (enum format_std_version): Add STD_C2X.
1532 (struct format_char_info): Mention 'p' in comment on flags2.
1533
e9c9a142
DM
15342019-10-01 David Malcolm <dmalcolm@redhat.com>
1535
1536 * c-opts.c (c_diagnostic_finalizer): Temporarily clear prefix when
1537 calling diagnostic_show_locus, rather than destroying it afterwards.
1538
7552c36a
JJ
15392019-10-01 Jakub Jelinek <jakub@redhat.com>
1540
1541 PR c++/91925
1542 * c-warn.c (check_alignment_of_packed_member): Ignore FIELD_DECLs
1543 with NULL DECL_FIELD_OFFSET.
1544
8209db25
RS
15452019-10-01 Richard Sandiford <richard.sandiford@arm.com>
1546
1547 * c-pretty-print.c (pp_c_specifier_qualifier_list): If a vector type
1548 has a type name, use it in preference to the __vector syntax.
1549
9343bf99
RS
15502019-09-30 Richard Sandiford <richard.sandiford@arm.com>
1551
1552 * c-pretty-print.c (pp_c_parameter_type_list): Avoid printing
1553 two spaces between a comma and "...".
1554
59bc434a
JJ
15552019-09-27 Jakub Jelinek <jakub@redhat.com>
1556
1557 PR c++/88203
1558 * c-common.h (c_omp_predefined_variable): Declare.
1559 * c-omp.c (c_omp_predefined_variable): New function.
1560 (c_omp_predetermined_sharing): Return OMP_CLAUSE_DEFAULT_SHARED
1561 for predefined variables.
1562
c6447c20
RS
15632019-09-27 Richard Sandiford <richard.sandiford@arm.com>
1564
1565 * c-common.h (build_function_call_vec): Take the original
1566 function decl as an optional final parameter.
1567 (check_builtin_function_arguments): Take the original function decl.
1568 * c-common.c (check_builtin_function_arguments): Likewise.
1569 Handle all built-in functions, not just BUILT_IN_NORMAL ones.
1570 Use targetm.check_builtin_call to check BUILT_IN_MD functions.
1571
c4438114
JM
15722019-09-15 Jason Merrill <jason@redhat.com>
1573
1574 * c-warn.c (warn_logical_operator): Strip location wrappers. Don't
1575 fold_for_warn in "|| mask" warning.
1576
68a57628
ML
15772019-09-10 Martin Liska <mliska@suse.cz>
1578
1579 * c.opt: Use newly added WarnRemoved.
1580
f48ef52e
ML
15812019-09-09 Martin Liska <mliska@suse.cz>
1582
1583 * c.opt: Update comment of removed
1584 options that are preserved only for backward
1585 compatibility.
1586
67f6e649
ML
15872019-09-06 Martin Liska <mliska@suse.cz>
1588
1589 PR c++/91125
1590 * c-common.c: Remove definition of flag_use_repository.
1591 * c-common.h: Likewise.
1592 * c-opts.c (c_common_handle_option):
1593 Do not handle OPT_frepo option.
1594 * c.opt: Mark the option with Deprecated.
1595
db9d2274
MP
15962019-09-04 Marek Polacek <polacek@redhat.com>
1597
1598 * c.opt (fdeduce-init-list): Ignored.
1599
68e2c199
PK
16002019-09-04 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1601
1602 PR c/78736
1603 * c.opt (Wenum-conversion): New option.
1604
7a4418a5
JL
16052019-09-03 Jozef Lawrynowicz <jozef.l@mittosystems.com>
1606
1607 * c-attribs.c (handle_section_attribute): Call the
1608 handle_generic_attribute target hook after performing target
1609 independent processing.
1610 (handle_noinit_attribute): Likewise.
1611
5f76ab15
ILT
16122019-09-03 Ian Lance Taylor <iant@golang.org>
1613
1614 * c-cppbuiltin.c (builtin_define_with_hex_fp_value): Always expand
1615 when using -fgo-dump-spec.
1616
ae0d3f6a
ML
16172019-09-02 Martin Liska <mliska@suse.cz>
1618
1619 PR c++/91155
1620 * c-common.c (fname_as_string): Use cxx_printable_name for
1621 __PRETTY_FUNCTION__ same as was used before r265711.
1622
8a902edb
MP
16232019-08-28 Marek Polacek <polacek@redhat.com>
1624
1625 Implement P1152R4: Deprecating some uses of volatile.
1626 PR c++/91361
1627 * c-opts.c (c_common_post_options): Enable -Wvolatile by
1628 default for C++2a, unless -Wno-deprecated.
1629 * c.opt (Wvolatile): New warning.
1630
4742dbe7
MP
16312019-08-28 Marek Polacek <polacek@redhat.com>
1632
1633 PR c++/91360 - Implement C++20 P1143R2: constinit.
1634 * c-common.c (c_common_reswords): Add constinit and __constinit.
1635 (keyword_is_decl_specifier): Handle RID_CONSTINIT.
1636 * c-common.h (enum rid): Add RID_CONSTINIT, RID_FIRST_CXX20, and
1637 RID_LAST_CXX20.
1638 (D_CXX20): Define.
1639 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_constinit.
1640 * c-format.c (cxx_keywords): Add "constinit".
1641 * c.opt (Wc++2a-compat, Wc++20-compat): New options.
1642
6a074892
JJ
16432019-08-27 Jakub Jelinek <jakub@redhat.com>
1644
1645 PR c++/91415
1646 * c-common.c (verify_tree): For LSHIFT_EXPR, RSHIFT_EXPR,
1647 COMPONENT_REF and ARRAY_REF in cxx_dialect >= cxx17 mode handle it
1648 like COMPOUND_EXPR rather than normal expression.
1649
22f8849d
IS
16502019-08-23 Iain Sandoe <iain@sandoe.co.uk>
1651
1652 PR pch/61250
1653 * c-lex.c (c_lex_with_flags): Don't call
1654 c_common_no_more_pch () from here.
1655
df375b03
JJ
16562019-08-23 Jakub Jelinek <jakub@redhat.com>
1657
1658 PR middle-end/91283
1659 * c-common.c (c_ts18661_flt_eval_method): Use flag_excess_precision
1660 instead of flag_excess_precision_cmdline.
1661 * c-cppbuiltin.c (c_cpp_flt_eval_method_iec_559): Likewise.
1662 * c-opts.c (c_common_post_options): Likewise.
1663
14b7950f
MS
16642019-08-22 Martin Sebor <msebor@redhat.com>
1665
1666 PR middle-end/91490
1667 * c-common.c (braced_list_to_string): Add argument and overload.
1668 Handle flexible length arrays and unions.
1669
8bb2ee59
EB
16702019-08-21 Eric Botcazou <ebotcazou@adacore.com>
1671
1672 * c-ada-spec.c (dump_ada_function_declaration): Be prepared for broken
1673 function declarations where arguments are missing. Rename variables.
1674
21c1e205
RB
16752019-08-15 Richard Biener <rguenther@suse.de>
1676
1677 * c-common.c (c_stddef_cpp_builtins): When the GIMPLE FE is
1678 enabled, define __SIZETYPE__.
1679
f0033821
CL
16802019-08-14 Christophe Lyon <christophe.lyon@linaro.org>
1681
1682 * c-attribs.c (c_common_attribute_table): Add "noinit" entry. Add
1683 exclusion with "section" attribute.
1684 (attr_noinit_exclusions): New table.
1685 (handle_noinit_attribute): New function.
1686
4d732405
RS
16872019-08-13 Richard Sandiford <richard.sandiford@arm.com>
1688
1689 PR middle-end/91421
1690 * c-common.c (resolve_overloaded_builtin): Use
1691 copy_decl_built_in_function.
1692
51ad8481
MS
16932019-08-13 Martin Sebor <msebor@redhat.com>
1694
1695 PR c/80619
1696 * c-format.c (printf_length_specs): Set FMT_LEN_w for "w".
1697 (asm_fprintf_length_spec): Same.
1698 * c-format.h (format_lengths): Add FMT_LEN_w.
1699
77eb117f
JJ
17002019-08-10 Jakub Jelinek <jakub@redhat.com>
1701
1702 * c-pragma.h (enum pragma_omp_clause): Add
1703 PRAGMA_OMP_CLAUSE_DEVICE_TYPE.
1704
398e3feb
JJ
17052019-08-07 Jakub Jelinek <jakub@redhat.com>
1706
1707 * c-pragma.h (enum pragma_omp_clause): Add
1708 PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR. Set PRAGMA_OACC_CLAUSE_USE_DEVICE
1709 equal to PRAGMA_OMP_CLAUSE_USE_DEVICE_PTR instead of being a separate
1710 enumeration value.
1711
ab574db6
MP
17122019-08-05 Marek Polacek <polacek@redhat.com>
1713
1714 PR c++/91338 - Implement P1161R3: Deprecate a[b,c].
1715 * c-opts.c (c_common_post_options): Enable -Wcomma-subscript by
1716 default for C++2a, unless -Wno-deprecated.
1717 * c.opt (Wcomma-subscript): New warning.
1718
554a530f
JJ
17192019-07-20 Jakub Jelinek <jakub@redhat.com>
1720
1721 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_LOOP.
1722 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_BIND.
1723 * c-pragma.c (omp_pragmas_simd): Add PRAGMA_OMP_LOOP entry.
1724 * c-common.h (enum c_omp_clause_split): Add C_OMP_CLAUSE_SPLIT_LOOP.
1725 * c-omp.c (c_omp_split_clauses): Add support for 4 new combined
1726 constructs with the loop construct.
1727
1a888209
JJ
17282019-07-13 Jakub Jelinek <jakub@redhat.com>
1729
1730 PR c/91149
1731 * c-omp.c (c_omp_split_clauses): Fix a pasto in
1732 OMP_CLAUSE_REDUCTION_TASK handling.
1733
1fdd6f04
JJ
17342019-07-12 Jakub Jelinek <jakub@redhat.com>
1735
1736 * c-pragma.h (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_ORDER.
1737 * c-omp.c (c_omp_split_clauses): Handle splitting of OMP_CLAUSE_ORDER.
1738
99b1c316
MS
17392019-07-09 Martin Sebor <msebor@redhat.com>
1740
1741 PR c++/61339
1fdd6f04 1742 * c-opts.c (handle_deferred_opts): Change class-key of PODs to struct
99b1c316
MS
1743 and others to class.
1744 * c-pretty-print.h: Same.
1745
6c1dae73
MS
17462019-07-09 Martin Sebor <msebor@redhat.com>
1747
1748 PR c++/61339
1749 * c-format.c (check_argument_type): Change class-key from class to
1750 struct and vice versa to match convention and avoid -Wclass-is-pod
1751 and -Wstruct-no-pod.
1752 * c-pretty-print.h: Same.
1753
8ba6ea87
ML
17542019-07-03 Martin Liska <mliska@suse.cz>
1755
1756 * c-common.c (try_to_locate_new_include_insertion_point): Remove
1757 dead assignemts.
1758
83eb9522
JJ
17592019-07-03 Jakub Jelinek <jakub@redhat.com>
1760
1761 * c-omp.c (c_omp_split_clauses): Put OMP_CLAUSE_REDUCTION_INSCAN
1762 clauses on OMP_FOR rather than OMP_PARALLEL when OMP_FOR is combined
1763 with OMP_PARALLEL.
1764
1c6ffbab
QZ
17652019-07-02 qing zhao <qing.zhao@oracle.com>
1766
1767 PR preprocessor/90581
1768 * c-opts.c (c_common_handle_option): Handle -fmax-include-depth.
1769 * c.opt: Add new option -fmax-include-depth.
1770
7ffc7de5
JM
17712019-06-26 Jason Merrill <jason@redhat.com>
1772
1773 PR c++/55442 - memory-hog with highly recursive constexpr.
1774 * c.opt (fconstexpr-loop-limit): New.
1775
361af3e4
JJ
17762019-06-25 Jakub Jelinek <jakub@redhat.com>
1777
1778 PR sanitizer/90954
1779 * c-omp.c (c_finish_omp_atomic): Allow tree_invariant_p in addition
1780 to SAVE_EXPR in first operand of a COMPOUND_EXPR.
1781
ab20d992
JJ
17822019-06-25 Jozef Lawrynowicz <jozef.l@mittosystems.com>
1783
1784 * c-common.c (c_common_nodes_and_builtins): Define
1785 alternate "__intN__" name for "__intN" types.
1786
f4af4019
JH
17872019-06-24 Jan Hubicka <jh@suse.cz>
1788
1789 * c-common.c (braced_lists_to_strings): Check that
1790 type is array or integer prior checking string flag.
1791
da9e9b57
MB
17922019-06-21 Matthew Beliveau <mbelivea@redhat.com>
1793
1794 PR c++/90875 - added -Wswitch-outside-range option
1795 * c.opt (Wswitch-outside-range): Added new option.
1796 * c-warn.c (c_do_switch_warnings): Use OPT_Wswitch-outside-range.
1797
3f3d6a6f
MP
17982019-06-21 Marek Polacek <polacek@redhat.com>
1799
1800 PR c++/90953 - ICE with -Wmissing-format-attribute.
1801 * c-common.c (check_function_arguments_recurse): Use
1802 get_attribute_name.
1803 (check_missing_format_attribute): Likewise.
1804
1bf32c11
MP
18052019-06-19 Marek Polacek <polacek@redhat.com>
1806
1807 PR c++/60364 - noreturn after first decl not diagnosed.
1808 * c-attribs.c (handle_noreturn_attribute): No longer static.
1809 * c-common.h (handle_noreturn_attribute, attr_noreturn_exclusions):
1810 Declare.
1811 * c-format.c (check_function_format): Use get_attribute_name.
1812
a04c0734
MS
18132019-06-19 Martin Sebor <msebor@redhat.com>
1814
1815 PR translation/90156
1816 * c-format.c (function_format_info::format_type): Adjust type.
1817 (function_format_info::is_raw): New member.
1818 (decode_format_type): Adjust signature. Handle "raw" diag attributes.
1819 (decode_format_attr): Adjust call to decode_format_type.
1820 Avoid a redundant call to convert_format_name_to_system_name.
1821 Avoid abbreviating the word "arguments" in a diagnostic.
1822 (format_warning_substr): New function.
1823 (avoid_dollar_number): Quote dollar sign in a diagnostic.
1824 (finish_dollar_format_checking): Same.
1825 (check_format_info): Same.
1826 (struct baltoks_t): New.
1827 (c_opers, c_keywords, cxx_keywords, badwords, contrs): New arrays.
1828 (maybe_diag_unbalanced_tokens, check_tokens, check_plain): New
1829 functions.
1830 (check_format_info_main): Call check_plain. Use baltoks_t. Call
1831 maybe_diag_unbalanced_tokens.
1832 (handle_format_attribute): Spell out the word "arguments" in
1833 a diagnostic.
1834
d3786ebb
MB
18352019-06-11 Matthew Beliveau <mbelivea@redhat.com>
1836
1837 PR c++/90449 - add -Winaccessible-base option.
1838 * c.opt (Winaccessible-base): New option.
1839
bf38f7e9
JJ
18402019-06-10 Jakub Jelinek <jakub@redhat.com>
1841
1842 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_SCAN.
1843 * c-pragma.c (omp_pragmas_simd): Add #pragma omp scan.
1844 * c-omp.c (c_omp_split_clauses): Diagnose inscan reductions on
1845 combined/composite constructs where it is not allowed. Copy over
1846 OMP_CLAUSE_REDUCTION_INSCAN.
1847
0ecf545c
MS
18482019-06-05 Martin Sebor <msebor@redhat.com>
1849
1850 * c-attribs.c (handle_mode_attribute): Adjust quoting and hyphenation.
1851 (handle_alias_ifunc_attribute): Same.
1852 (handle_copy_attribute): Same.
1853 (handle_weakref_attribute): Same.
1854 (handle_nonnull_attribute): Same.
1855 * c-warn.c (warn_for_sign_compare): Same.
1856 (warn_for_restrict): Same.
1857 * c.opt: Same.
1858
36b34127
MS
18592019-06-05 Martin Sebor <msebor@redhat.com>
1860
1861 * c-pragma.c (handle_pragma_weak): Adjust quoting in a diagnostic.
1862 * c.opt (-Wformat-diag): Remove a spurious period.
1863
357a352f
JJ
18642019-05-29 Jakub Jelinek <jakub@redhat.com>
1865
1866 PR c/90628
1867 * c-common.c (check_builtin_function_arguments)
1868 <case BUILTIN_*_OVERFLOW>: Diagnose pointer to const qualified integer
1869 as last argument.
1870
2b8235ea
EB
18712019-05-23 Eric Botcazou <ebotcazou@adacore.com>
1872
1873 * c-ada-spec.c (compare_node): Compare the DECL_UIDs as a last resort.
1874
6d86ddc4
ML
18752019-05-22 Martin Liska <mliska@suse.cz>
1876
1877 PR lto/90500
1878 * c-attribs.c (handle_copy_attribute): Do not copy
1879 target_clones attribute.
1880
419ba5b9
EB
18812019-05-21 Eric Botcazou <ebotcazou@adacore.com>
1882
1883 * c-ada-spec.h (enum cpp_operation): Add IS_ASSIGNMENT_OPERATOR.
1884 * c-ada-spec.c (print_assignment_operator): New function.
1885 (dump_ada_declaration) <FUNCTION_DECL>: Call it do dump explicit copy
1886 assignment operators declared as methods and filter out the others.
1887
e03436e7
TS
18882019-05-17 Thomas Schwinge <thomas@codesourcery.com>
1889
1890 PR c/89433
1891 * c-attribs.c (c_common_attribute_table): Set min_len to -1 for
1892 "omp declare target".
1893
a9c697b8
MS
18942019-05-16 Martin Sebor <msebor@redhat.com>
1895
ab20d992
JJ
1896 * c-attribs.c (handle_no_sanitize_attribute): Quote identifiers,
1897 keywords, operators, and types in diagnostics.
1898 (handle_scalar_storage_order_attribute): Same.
1899 (handle_mode_attribute): Same.
1900 (handle_visibility_attribute): Same.
1901 (handle_assume_aligned_attribute): Same.
1902 (handle_no_split_stack_attribute): Same.
1903 * c-common.c (shorten_compare): Same.
1904 (c_common_truthvalue_conversion): Same.
1905 (cb_get_source_date_epoch): Same.
1906 * c-lex.c (cb_def_pragma): Quote keywords, operators, and types
1907 in diagnostics.
1908 (interpret_float): Same.
1909 * c-omp.c (c_finish_omp_for): Same.
1910 * c-opts.c (c_common_post_options): Same.
1911 * c-pch.c (c_common_pch_pragma): Same.
1912 * c-pragma.c (pop_alignment): Same.
1913 (handle_pragma_pack): Same.
1914 (apply_pragma_weak): Same.
1915 (handle_pragma_weak): Same.
1916 (handle_pragma_scalar_storage_order): Same.
1917 (handle_pragma_redefine_extname): Same.
1918 (add_to_renaming_pragma_list): Same.
1919 (maybe_apply_renaming_pragma): Same.
1920 (push_visibility): Same.
1921 (handle_pragma_visibility): Same.
1922 (handle_pragma_optimize): Same.
1923 (handle_pragma_message): Same.
1924 * c-warn.c (warn_for_omitted_condop): Same.
1925 (lvalue_error): Same.
a9c697b8 1926
6b943512
RB
19272019-05-15 Richard Biener <rguenther@suse.de>
1928
1929 PR c/90474
1930 * c-common.c (c_common_mark_addressable_vec): Also mark
1931 a COMPOUND_LITERAL_EXPR_DECL addressable similar to
1932 c_mark_addressable.
ab20d992 1933
b744fc85
NS
19342019-05-06 Nathan Sidwell <nathan@acm.org>
1935
1936 * c-opts.c (handle_defered_opts): Rename struct deps to struc mkdeps.
1937
598f50d7
NS
19382019-04-30 Nathan Sidwell <nathan@acm.org>
1939
1940 * c-common.c (c_common_init_ts): Use MARK_TS_EXP. Mark SIZEOF_EXPR.
1941
5bcc5a3b
ML
19422019-04-30 Martin Liska <mliska@suse.cz>
1943
1944 * c-pragma.c (handle_pragma_diagnostic): Provide hints
1945 for unknown options.
1946
e78a87f7
RS
19472019-04-26 Richard Sandiford <richard.sandiford@arm.com>
1948
1949 * c-warn.c (strict_aliasing_warning): Apply COMPLETE_TYPE_P to
1950 the pointer target rather than the pointer itself.
1951
c280b7ee
JJ
19522019-04-19 Jakub Jelinek <jakub@redhat.com>
1953
1954 PR c/89888
1955 * c-common.h (c_add_case_label): Remove orig_type and outside_range_p
1956 arguments.
1957 (c_do_switch_warnings): Remove outside_range_p argument.
1958 * c-common.c (check_case_bounds): Removed.
1959 (c_add_case_label): Remove orig_type and outside_range_p arguments.
1960 Don't call check_case_bounds. Fold low_value as well as high_value.
1961 * c-warn.c (c_do_switch_warnings): Remove outside_range_p argument.
1962 Check for case labels outside of range of original type here and
1963 adjust them.
1964
8e8225e6
JJ
19652019-04-12 Jakub Jelinek <jakub@redhat.com>
1966
63b8a166
JJ
1967 PR translation/90041
1968 * c.opt (-fhandle-exceptions): Use %< and %> around option names
1969 in the Warn diagnostics.
1970
8e8225e6
JJ
1971 PR c/89946
1972 * c-attribs.c (handle_patchable_function_entry_attribute): Add
1973 function comment. Warn if arguments of the attribute are not positive
1974 integer constants.
1975
53a3f614
EB
19762019-04-09 Eric Botcazou <ebotcazou@adacore.com>
1977
1978 * c-ada-spec.c (print_destructor): Deal with deleting destructors.
1979 (dump_ada_declaration) <FUNCTION_DECL>: Likewise.
1980
22be5873
EB
19812019-04-07 Eric Botcazou <ebotcazou@adacore.com>
1982
1983 * c-ada-spec.c (is_float128): New predicate extracted from...
1984 (dump_ada_node) <COMPLEX_TYPE>: Use it to recognize __cfloat128.
1985 <REAL_TYPE>: ...here. Call it.
1986
34facf20
DM
19872019-04-05 David Malcolm <dmalcolm@redhat.com>
1988
1989 PR c/89985
1990 * c-warn.c (check_address_or_pointer_of_packed_member): Add
1991 auto_diagnostic_group. Guard inform calls by result of
1992 warning_at call.
1993
05564120
MP
19942019-04-05 Marek Polacek <polacek@redhat.com>
1995
ab20d992 1996 PR c++/89973 - -Waddress-of-packed-member ICE with invalid conversion.
05564120
MP
1997 * c-warn.c (check_address_or_pointer_of_packed_member): Check the type
1998 of RHS.
1999
7a506c3c
JM
20002019-04-03 Jason Merrill <jason@redhat.com>
2001
2002 PR c++/86586 - -fcompare-debug=-Wsign-compare.
2003 * c-warn.c (warn_for_sign_compare): Call fold_for_warn.
2004
ddeae8c8
MS
20052019-04-01 Martin Sebor <msebor@redhat.com>
2006
2007 PR c/89685
2008 * c-attribs.c (handle_copy_attribute): Handle references and
2009 non-constant expressions.
2010
a15ffa22
JJ
20112019-03-22 Jakub Jelinek <jakub@redhat.com>
2012
2013 PR c++/87481
2014 * c.opt (-fconstexpr-ops-limit=): New option.
2015
36a3a7a3
JJ
20162019-03-21 Jakub Jelinek <jakub@redhat.com>
2017
2018 * c-common.c (per_file_includes_t): Use false as Lazy in hash_set
2019 template param.
2020
bec1da64
MS
20212019-03-19 Martin Sebor <msebor@redhat.com>
2022
2023 PR tree-optimization/89688
2024 * c-common.c (braced_list_to_string): Make static.
2025 (braced_lists_to_strings): Define new function.
2026 * c-common.h (braced_list_to_string): Remove.
2027 (braced_lists_to_strings): Declare.
2028
1fe61adf
ML
20292019-03-12 Martin Liska <mliska@suse.cz>
2030
2031 * c-opts.c (c_common_handle_option): Wrap option with %< and %>.
2032
93964ebd
ML
20332019-03-11 Martin Liska <mliska@suse.cz>
2034
2035 * c-opts.c (c_common_post_options): Wrap apostrophes
2036 in gcc internal format with %'.
2037
a3f9f006
ML
20382019-03-11 Martin Liska <mliska@suse.cz>
2039
2040 * c-attribs.c (handle_nocf_check_attribute): Wrap an option name
2041 in a string format message and fix GNU coding style.
2042 * c-common.c (vector_types_convertible_p): Likewise.
2043 (c_build_vec_perm_expr): Likewise.
2044 * c-indentation.c (get_visual_column): Likewise.
2045 * c-opts.c (c_common_handle_option): Likewise.
2046 (c_common_post_options): Likewise.
2047 (sanitize_cpp_opts): Likewise.
2048 * c-pch.c (c_common_pch_pragma): Likewise.
2049 * c-pragma.c (handle_pragma_pack): Likewise.
2050
1db01ff9
JJ
20512019-03-08 Jakub Jelinek <jakub@redhat.com>
2052
2053 PR tree-optimization/89550
2054 * c-common.c (c_common_truthvalue_conversion): Only set
2055 TREE_NO_WARNING if warning_at returned true.
2056 * c-warn.c (overflow_warning, warn_logical_operator): Likewise.
2057
ba790e6f
JJ
20582019-02-25 Sandra Loosemore <sandra@codesourcery.com>
2059 Martin Sebor <msebor@gmail.com>
2060
2061 * c.opt (Wmissing-attributes): Clean up doc string.
2062
7da73ba7
JJ
20632019-02-25 Jakub Jelinek <jakub@redhat.com>
2064
2065 PR c/89495
2066 * c-format.c (maybe_read_dollar_number): Compute nargnum in
2067 HOST_WIDE_INT type to avoid overflows and change overflow_flag
2068 checking.
2069
921bb9d1
RB
20702019-02-22 Richard Biener <rguenther@suse.de>
2071
2072 * c-pch.c (no_checksum): Remove.
2073 (pch_init): Remove assertion that executable_checksum is not
2074 all zero.
2075 (c_common_valid_pch): Likewise.
2076
e2ebb05c
MS
20772019-02-18 Martin Sebor <msebor@redhat.com>
2078
2079 PR middle-end/89294
2080 * c-common.c (invalid_array_size_error): Handle cst_size_not_constant.
2081
3fe53000
DM
20822019-02-16 David Malcolm <dmalcolm@redhat.com>
2083
2084 PR c++/88680
2085 * c-common.c (shorten_compare): Call fold_for_warn on op0 when
2086 implementing -Wtype-limits.
2087
28a8cef1
MS
20882019-02-11 Martin Sebor <msebor@redhat.com>
2089
2090 PR c++/87996
2091 * c-common.c (invalid_array_size_error): New function.
2092 (valid_array_size_p): Call it. Handle size as well as type.
2093 * c-common.h (valid_constant_size_p): New function.
2094 (enum cst_size_error): New type.
2095
ec2be203
DM
20962019-01-31 David Malcolm <dmalcolm@redhat.com>
2097
2098 PR c/89122
2099 * known-headers.cc (get_stdlib_header_for_name): Add
2100 {FLT|DBL|LDBL}_{MAX|MIN} to "hints" array.
2101
8936f047
JJ
21022019-01-31 Jakub Jelinek <jakub@redhat.com>
2103
2104 PR libstdc++/88170
2105 * c-pretty-print.c (pp_c_enumeration_constant): Print always as
2106 a C cast in pp_c_flag_gnu_v3 mode.
2107
6a335b96
JJ
21082019-01-29 Jakub Jelinek <jakub@redhat.com>
2109
2110 PR c/86125
2111 * c-common.c (c_common_nodes_and_builtins): Build type variants for
2112 builtin_structptr_types types even for C.
2113
2a06eba5
BE
21142019-01-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
2115
2116 * c-warn.c (check_address_or_pointer_of_packed_member): Handle the case
2117 when rhs is of array type correctly. Fix handling of nested structures.
2118 Fix handling of indirect_ref together with nop_expr and/or addr_expr.
2119 (check_and_warn_address_or_pointer_of_packed_member): Fix handling of
2120 type casts within nested compound expressions.
2121
18a23298
JJ
21222019-01-22 Jakub Jelinek <jakub@redhat.com>
2123
2124 PR middle-end/88968
2125 * c-omp.c (c_finish_omp_atomic): For bitfield atomics, update type
2126 variable after using BIT_FIELD_REF.
2127
420183d9
L
21282019-01-18 H.J. Lu <hongjiu.lu@intel.com>
2129
2130 PR c/51628
2131 PR c/88664
2132 * c-common.h (warn_for_address_or_pointer_of_packed_member):
2133 Remove the boolean argument.
2134 * c-warn.c (check_address_of_packed_member): Renamed to ...
2135 (check_address_or_pointer_of_packed_member): This. Also
2136 warn pointer conversion.
2137 (check_and_warn_address_of_packed_member): Renamed to ...
2138 (check_and_warn_address_or_pointer_of_packed_member): This.
2139 Also warn pointer conversion.
2140 (warn_for_address_or_pointer_of_packed_member): Remove the
2141 boolean argument. Don't check pointer conversion here.
2142
99063eee
RS
21432019-01-15 Richard Sandiford <richard.sandiford@arm.com>
2144
2145 PR inline-asm/52813
2146 * c.opt (Wdeprecated): Move documentation and variable to common.opt.
2147
a30d0196
JJ
21482019-01-14 Jakub Jelinek <jakub@redhat.com>
2149
2150 * c-cppbuiltin.c (c_cpp_builtin): Define __cpp_guaranteed_copy_elision
2151 and __cpp_nontype_template_parameter_auto. Add a comment that
2152 __cpp_template_auto is deprecated.
2153
2d91f79d
TH
21542019-01-14 Tom Honermann <tom@honermann.net>
2155
2156 Implement P0482R5, char8_t: A type for UTF-8 characters and strings
2157 * c-common.c (c_common_reswords): Add char8_t.
2158 (fix_string_type): Use char8_t for the type of u8 string literals.
2159 (c_common_get_alias_set): char8_t doesn't alias.
2160 (c_common_nodes_and_builtins): Define char8_t as a builtin type in
2161 C++.
2162 (c_stddef_cpp_builtins): Add __CHAR8_TYPE__.
2163 (keyword_begins_type_specifier): Add RID_CHAR8.
2164 * c-common.h (rid): Add RID_CHAR8.
2165 (c_tree_index): Add CTI_CHAR8_TYPE and CTI_CHAR8_ARRAY_TYPE.
2166 Define D_CXX_CHAR8_T and D_CXX_CHAR8_T_FLAGS.
2167 Define char8_type_node and char8_array_type_node.
2168 * c-cppbuiltin.c (cpp_atomic_builtins): Predefine
2169 __GCC_ATOMIC_CHAR8_T_LOCK_FREE.
2170 (c_cpp_builtins): Predefine __cpp_char8_t.
2171 * c-lex.c (lex_string): Use char8_array_type_node as the type of
2172 CPP_UTF8STRING.
2173 (lex_charconst): Use char8_type_node as the type of CPP_UTF8CHAR.
2174 * c-opts.c: If not otherwise specified, enable -fchar8_t when
2175 targeting C++2a.
2176 * c.opt: Add the -fchar8_t command line option.
2177
23db6ced
MS
21782019-01-14 Martin Sebor <msebor@redhat.com>
2179
2180 PR target/88638
2181 * c-attribs.c (positional_argument): Call valid_format_string_type_p
2182 and issue errors if it fails.
2183 * c-common.h (valid_format_string_type_p): Declare.
2184 * c-format.c (valid_stringptr_type_p): Rename...
2185 (valid_format_string_type_p): ...to this and make extern.
2186 (handle_format_arg_attribute): Adjust to new name.
2187 (check_format_string): Same.
2188
234c3818
L
21892019-01-13 H.J. Lu <hongjiu.lu@intel.com>
2190
2191 * c-warn.c (warn_for_address_or_pointer_of_packed_member):
2192 Replace "may may" with "may" in warning message.
2193
d8fcab68
JJ
21942019-01-07 Jakub Jelinek <jakub@redhat.com>
2195
2196 PR c++/85052
2197 * c-common.h (enum rid): Add RID_BUILTIN_CONVERTVECTOR.
2198 (c_build_vec_convert): Declare.
2199 * c-common.c (c_build_vec_convert): New function.
2200
29d24852
MS
22012019-01-04 Martin Sebor <msebor@redhat.com>
2202
2203 PR c/88546
2204 * c-attribs.c (handle_copy_attribute): Avoid copying attribute leaf.
2205 Handle C++ empty throw specification and C11 _Noreturn.
2206 (has_attribute): Also handle C11 _Noreturn.
2207
9069a4c9
MS
22082019-01-04 Martin Sebor <msebor@redhat.com>
2209
2210 PR c/88363
2211 * c-attribs.c (positional_argument): Also accept enumerated types.
2212
a5544970
JJ
22132019-01-01 Jakub Jelinek <jakub@redhat.com>
2214
2215 Update copyright years.
2216
da77eace
L
22172018-12-20 H.J. Lu <hongjiu.lu@intel.com>
2218
2219 PR c/51628
2220 * c-common.h (warn_for_address_or_pointer_of_packed_member): New.
2221 * c-warn.c (check_alignment_of_packed_member): New function.
2222 (check_address_of_packed_member): Likewise.
2223 (check_and_warn_address_of_packed_member): Likewise.
2224 (warn_for_address_or_pointer_of_packed_member): Likewise.
2225 * c.opt: Add -Wno-address-of-packed-member.
2226
573767d4
DM
22272018-12-20 David Malcolm <dmalcolm@redhat.com>
2228
2229 PR c++/87504
2230 * c-warn.c (get_outermost_macro_expansion): New function.
2231 (spelled_the_same_p): Use it to unwind the macro expansions, and
2232 compare the outermost macro in each nested expansion, rather than
2233 the innermost.
2234
a14feb3c
DM
22352018-12-19 David Malcolm <dmalcolm@redhat.com>
2236
2237 PR c++/87504
2238 * c-common.h (warn_tautological_cmp): Convert 1st param from
2239 location_t to const op_location_t &.
2240 * c-warn.c (find_array_ref_with_const_idx_r): Call fold_for_warn
2241 when testing for INTEGER_CST.
2242 (warn_tautological_bitwise_comparison): Convert 1st param from
2243 location_t to const op_location_t &; use it to build a
2244 binary_op_rich_location, and use this.
2245 (spelled_the_same_p): New function.
2246 (warn_tautological_cmp): Convert 1st param from location_t to
2247 const op_location_t &. Warn for macro expansions if
2248 spelled_the_same_p. Use binary_op_rich_location.
2249
dfd7fdca
DM
22502018-12-19 David Malcolm <dmalcolm@redhat.com>
2251
2252 PR c++/43064
2253 PR c++/43486
2254 * c-common.c (unsafe_conversion_p): Fold any location wrapper.
2255 (verify_tree): Handle location wrappers.
2256 (c_common_truthvalue_conversion): Strip any location wrapper.
2257 Handle CONST_DECL.
2258 (fold_offsetof): Strip any location wrapper.
2259 (complete_array_type): Likewise for initial_value.
2260 (convert_vector_to_array_for_subscript): Call fold_for_warn on the
2261 index before checking for INTEGER_CST.
2262 * c-pretty-print.c (c_pretty_printer::primary_expression): Don't
2263 print parentheses around location wrappers.
2264 * c-warn.c (warn_logical_operator): Call fold_for_warn on op_right
2265 before checking for INTEGER_CST.
2266 (warn_tautological_bitwise_comparison): Call
2267 tree_strip_any_location_wrapper on lhs, rhs, and bitop's operand
2268 before checking for INTEGER_CST.
2269 (readonly_error): Strip any location wrapper.
2270 (warn_array_subscript_with_type_char): Strip location wrappers
2271 before checking for INTEGER_CST. Use the location of the index if
2272 available.
2273
5c8b3702
JM
22742018-12-06 Jason Merrill <jason@redhat.com>
2275
2276 PR c++/88136 - -Wdeprecated-copy false positives
2277 * c.opt (Wdeprecated-copy-dtor): New.
2278 (Wdeprecated-copy): Move to -Wextra.
2279
673670da
MS
22802018-11-29 Martin Sebor <msebor@redhat.com>
2281
2282 PR c/88172
2283 PR testsuite/88208
2284 * c-attribs.c (common_handle_aligned_attribute): Silently avoid setting
2285 alignments to values less than the target requires.
2286 (has_attribute): For attribute aligned consider both the attribute
2287 and the alignment bits.
2288 * c-common.c (c_init_attributes): Optionally issue a warning for
2289 zero alignment.
2290
04864ec8
MS
22912018-11-28 Martin Sebor <msebor@redhat.com>
2292
2293 PR c/88065
2294 PR c/87297
2295 * c-warn.c (sizeof_pointer_memaccess_warning): Bail if source
2296 or destination is an error.
2297
ace83db0
JJ
22982018-11-28 Jakub Jelinek <jakub@redhat.com>
2299
2300 PR c++/88215
2301 * c-ubsan.c: Include langhooks.h.
2302 (ubsan_instrument_division): Change gcc_assert that main variants
2303 of op0 and op1 types are equal to gcc_checking_assert that the
2304 main variants are compatible types.
2305
da193a27
EB
23062018-11-27 Eric Botcazou <ebotcazou@adacore.com>
2307
2308 * c-ada-spec.c: Include stringpool.h.
2309 (has_static_fields): Return false for incomplete types.
2310 (is_tagged_type): Likewise.
2311 (has_nontrivial_methods): Likewise.
2312 (dump_ada_node) <INTEGER_TYPE>: Deal specifically with __int128.
2313 (struct overloaded_name_hash): New structure.
2314 (struct overloaded_name_hasher): Likewise.
2315 (overloaded_names): New global variable.
2316 (init_overloaded_names): New static function.
2317 (overloaded_name_p): New predicate.
2318 (dump_ada_declaration) <TYPE_DECL>: Tidy up and set TREE_VISITED
2319 on the TYPE_STUB_DECL of the original type of a typedef, if any.
2320 <FUNCTION_DECL>: Bail out for an unsupported overloaded name.
2321 Remove always-true condition and dump forward types.
2322 (dump_ada_specs): Delete overloaded_names.
2323
98f08eb8
MS
23242018-11-20 Martin Sebor <msebor@redhat.com>
2325
2326 * c-attribs.c (type_for_vector_size): New function.
2327 (type_valid_for_vector_size): Same.
2328 (handle_vector_size_attribute): Move code to the functions above
2329 and call them.
2330 (validate_attribute, has_attribute): New functions.
2331 * c-common.h (has_attribute): Declare.
2332 (rid): Add RID_HAS_ATTRIBUTE_EXPRESSION.
2333 * c-common.c (c_common_resword): Same.
2334
2674fa47
JM
23352018-11-16 Jason Merrill <jason@redhat.com>
2336
2337 * c-lex.c (c_common_has_attribute): Handle likely/unlikely.
2338 * c-attribs.c (attr_cold_hot_exclusions): Make public.
2339
258b3854
JJ
23402018-11-16 Jakub Jelinek <jakub@redhat.com>
2341
2342 PR middle-end/87854
2343 * c-common.c (fix_string_type): Reject string literals larger than
2344 TYPE_MAX_VALUE (ssizetype) bytes.
2345
1d249509
MS
23462018-11-15 Martin Sebor <msebor@redhat.com>
2347
2348 PR c++/87541
2349 PR c++/87542
2350 * c-attribs.c (positional_argument): New function.
2351 (handle_alloc_size_attribute): Use it and simplify.
2352 (handle_alloc_align_attribute): Same.
2353 (handle_assume_aligned_attribute): Same.
2354 (handle_nonnull_attribute): Same.
2355 * c-common.c (check_function_arguments): Pass fntype to
2356 check_function_format.
2357 * c-common.h (check_function_format): Add an argument.
2358 (PosArgFlags, positional_argument): Declare new type and function.
2359 * c-format.c (decode_format_attr): Add arguments.
2360 (check_format_string, get_constant): Same.
2361 (convert_format_name_to_system_name): Adjust.
2362
478dd60d
DM
23632018-11-15 David Malcolm <dmalcolm@redhat.com>
2364
2365 PR other/19165
2366 * c-opts.c (c_diagnostic_finalizer): Add diagnostic_t param.
2367
8cca0163
JJ
23682018-11-14 Jakub Jelinek <jakub@redhat.com>
2369
8ee09943
JJ
2370 P1236R1 - Signed integers are two's complement
2371 * c-warn.c (maybe_warn_shift_overflow): Don't warn for c++2a.
2372 * c-ubsan.c (ubsan_instrument_shift): Make signed shifts
2373 with in-range second operand well defined for -std=c++2a.
2374
8cca0163
JJ
2375 PR other/88007
2376 * c-common.c (parse_optimize_options): Allocate option string from
2377 opts_obstack rather than as GC memory. Move the allocation after
2378 warning for invalid option.
2379
620e594b
DM
23802018-11-13 David Malcolm <dmalcolm@redhat.com>
2381
2382 * c-common.c (c_get_substring_location): Update for renaming of
2383 get_source_location_for_substring to get_location_within_string.
2384 * c-lex.c: Replace "source_location" with "location_t".
2385 * c-opts.c: Likewise.
2386 * c-ppoutput.c: Likewise.
2387
f9731de3
MS
23882018-11-13 Martin Sebor <msebor@redhat.com>
2389
2390 PR middle-end/81824
2391 * c-attribs.c (handle_copy_attribute): Exclude inlining attributes.
2392 (handle_tls_model_attribute): Improve diagnostics.
2393
e4bd6d5e
JM
23942018-11-12 Jason Merrill <jason@redhat.com>
2395
a6bb6b07
JM
2396 * c-cppbuiltin.c (c_cpp_builtins): Define
2397 __cpp_impl_destroying_delete.
2398
e4bd6d5e
JM
2399 * c-cppbuiltin.c (c_cpp_builtins): Change __cpp_explicit_bool to
2400 __cpp_conditional_explicit.
2401
79a2c428
MS
24022018-11-09 Martin Sebor <msebor@redhat.com>
2403
2404 PR middle-end/81824
2405 * c-attribs.c (handle_copy_attribute): New function.
2406
4c7bd361
MS
24072018-11-09 Martin Sebor <msebor@redhat.com>
2408
2409 PR c/87795
2410 * c-common.c (check_user_alignment): Use MAX_OFILE_ALIGNMENT.
2411
28567c40
JJ
24122018-11-08 Jakub Jelinek <jakub@redhat.com>
2413
2414 * c-common.h (c_finish_omp_taskgroup): Add CLAUSES argument.
2415 (c_finish_omp_atomic): Replace bool SEQ_CST argument with
2416 enum omp_memory_order MEMORY_ORDER.
2417 (c_finish_omp_flush): Add MO argument.
2418 (c_omp_depend_t_p, c_finish_omp_depobj): Declare.
2419 (c_finish_omp_for): Add FINAL_P argument.
2420 * c-omp.c: Include memmodel.h.
2421 (c_finish_omp_taskgroup): Add CLAUSES argument. Set
2422 OMP_TASKGROUP_CLAUSES to it.
2423 (c_finish_omp_atomic): Replace bool SEQ_CST argument with
2424 enum omp_memory_order MEMORY_ORDER. Set OMP_ATOMIC_MEMORY_ORDER
2425 instead of OMP_ATOMIC_SEQ_CST.
2426 (c_omp_depend_t_p, c_finish_omp_depobj): New functions.
2427 (c_finish_omp_flush): Add MO argument, if not MEMMODEL_LAST, emit
2428 __atomic_thread_fence call with the given value.
2429 (check_omp_for_incr_expr): Formatting fixes.
2430 (c_finish_omp_for): Add FINAL_P argument. Allow NE_EXPR
2431 even in OpenMP loops, diagnose if NE_EXPR and incr expression
2432 is not constant expression 1 or -1. Transform NE_EXPR loops
2433 with iterators pointers to VLA into LT_EXPR or GT_EXPR loops.
2434 (c_omp_check_loop_iv_r): Look for orig decl of C++ range for
2435 loops too.
2436 (c_omp_split_clauses): Add support for combined
2437 #pragma omp parallel master and
2438 #pragma omp {,parallel }master taskloop{, simd} constructs.
2439 Handle OMP_CLAUSE_IN_REDUCTION. Handle OMP_CLAUSE_REDUCTION_TASK.
2440 Handle OMP_CLAUSE_NONTEMPORAL. Handle splitting OMP_CLAUSE_IF
2441 also to OMP_SIMD. Copy OMP_CLAUSE_LASTPRIVATE_CONDITIONAL.
2442 (c_omp_predetermined_sharing): Don't return
2443 OMP_CLAUSE_DEFAULT_SHARED for const qualified decls.
2444 * c-pragma.c (omp_pragmas): Add PRAGMA_OMP_DEPOBJ and
2445 PRAGMA_OMP_REQUIRES.
2446 * c-pragma.h (enum pragma_kind): Likewise.
2447 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_NONTEMPORAL
2448 and PRAGMA_OMP_CLAUSE_{IN,TASK}_REDUCTION.
2449
204839e7
DM
24502018-11-08 David Malcolm <dmalcolm@redhat.com>
2451
2452 * c-format.c (gcc_dump_printf_char_table): Add entry for %f.
2453
d8010ee4
DM
24542018-11-08 David Malcolm <dmalcolm@redhat.com>
2455
2456 * c-format.c (local_cgraph_node_ptr_node): New variable.
2457 (gcc_dump_printf_char_table): Add entry for %C.
2458 (get_pointer_to_named_type): New function, taken from the handling
2459 code for "gimple *" from...
2460 (init_dynamic_diag_info): ...here. Add handling for
2461 "cgraph_node *".
2462 * c-format.h (T_CGRAPH_NODE): New.
2463
4be5c72c
JM
24642018-10-19 Jason Merrill <jason@redhat.com>
2465
2466 * c-cppbuiltin.c (c_cpp_builtins): Add
2467 __cpp_nontype_template_parameter_class.
2468
f3f6029d
NS
24692018-10-31 Nathan Sidwell <nathan@acm.org>
2470
ab5324fb
NS
2471 * c-opts.c (c_finish_options): Force command line macro
2472 location. Refactor to avoid repeating main debug hook.
2473 (push_command_line_include): Clarify comment.
2474
f3f6029d
NS
2475 * c-opts.c (c_finish_options): Adjust cpp_force_token_locations call.
2476
91e3ec29
MS
24772018-10-30 Martin Sebor <msebor@redhat.com>
2478
2479 PR middle-end/87041
2480 * c-format.c (check_format_types): Avoid diagnosing null pointer
2481 arguments to printf-family of functions.
2482
b5ff4f5c
MP
24832018-10-30 Marek Polacek <polacek@redhat.com>
2484
2485 Implement P0892R2, explicit(bool).
2486 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_explicit_bool.
2487
7e2de6df
DM
24882018-10-29 David Malcolm <dmalcolm@redhat.com>
2489
2490 * name-hint.h (name_hint::take_deferred): New member function.
2491
b2bf438c
DM
24922018-10-29 David Malcolm <dmalcolm@redhat.com>
2493
2494 PR c++/56856
2495 * c-common.c (check_function_sentinel): Call fold_for_warn on the
2496 argument.
2497 (check_function_restrict): Rename param "argarray" to
2498 "unfolded_argarray", and make a copy named "argarray", calling
2499 fold_for_warn on each argument.
2500 (check_function_arguments): Add note about responsibility for
2501 folding the arguments.
2502
9f936c86
JM
25032018-10-17 Joseph Myers <joseph@codesourcery.com>
2504
2505 * c-common.c (flag_isoc2x): New variable.
2506 * c-common.h (clk_c): Update comment to reference C2X.
2507 (flag_isoc99, flag_isoc11): Update comments to reference future
2508 standard versions in general.
2509 (flag_isoc2x): Declare.
2510 * c-opts.c (set_std_c2x): New function.
2511 (c_common_handle_option): Handle -std=c2x and -std=gnu2x.
2512 (set_std_c89, set_std_c99, set_std_c11, set_std_c17): Set
2513 flag_isoc2x to 0.
2514 * c.opt (Wc11-c2x-compat, std=c2x, std=gnu2x): New options.
2515
7a8a92c4
JM
25162018-10-17 Joseph Myers <joseph@codesourcery.com>
2517
2518 * c.opt (std=c17, std=c18, std=gnu17, std=gnu18, std=iso9899:2017)
2519 (std=iso9899:2018): Document C17 as published in 2018.
2520
4dc003ff
CL
25212018-10-12 Christophe Lyon <christophe.lyon@linaro.org>
2522
2523 PR c++/87364
2524 * c-pretty-print.c (c_pretty_printer::constant): Fix typo.
2525
79371671
WW
25262018-10-11 Will Wray <wjwray@gmail.com>
2527
2528 PR c++/87364
2529 * c-pretty-print.h (pp_c_type_cast): Prototype.
2530 (pp_c_integer_constant): Likewise.
2531 * c-pretty-print.c (pp_c_type_cast): No longer static.
2532 (pp_c_integer_constant): Likewise.
2533 (pp_c_enumeration_constant): Fix loop termination when finding
2534 name of constant. No longer returns a value. Call
2535 pp_c_integer_constant.
2536 (c_pretty_printer::constant): Update for changes to
2537 pp_c_enumeration_constant.
2538
46c62690
JJ
25392018-10-11 Jakub Jelinek <jakub@redhat.com>
2540
2541 * c-lex.c (c_common_has_attribute): Return 201803 instead of 20180312
2542 for no_unique_address.
2543
c24300ba
DM
25442018-10-09 David Malcolm <dmalcolm@redhat.com>
2545
2546 * c-common.c (c_option_controlling_cpp_error): Rename to...
2547 (c_option_controlling_cpp_diagnostic): ...this, and convert
2548 "reason" from int to enum.
2549 (c_cpp_error): Rename to...
2550 (c_cpp_diagnostic): ...this, converting level and reason to enums.
2551 * c-common.h (c_cpp_error): Rename to...
2552 (c_cpp_diagnostic): ...this, converting level and reason to enums.
2553 * c-opts.c (c_common_init_options): Update for renaming.
2554
8656dafa
RS
25552018-10-08 Richard Sandiford <richard.sandiford@arm.com>
2556
2557 PR c/87286
2558 * c-common.c (vector_types_compatible_elements_p): Use
2559 INTEGRAL_TYPE_P instead of checking only for INTEGER_TYPE.
2560
8cff0652
VK
25612018-10-04 Vinay Kumar <vinay.kumar@blackfigtech.com>
2562
2563 * c-attribs.c (get_priority): Add a warning flag warn_prio_ctor_dtor
2564 to generate constructor destructor priority warning.
2565 * c.opt (-Wprio-ctor-dtor): New option.
2566
bedf03a2
JM
25672018-10-01 Jason Merrill <jason@redhat.com>
2568
2569 * c-lex.c (c_common_has_attribute): Add no_unique_address.
2570
6cc430c1
EB
25712018-10-01 Eric Botcazou <ebotcazou@adacore.com>
2572
2573 * c-ada-spec.c (get_underlying_decl): Get to the main type variant.
2574 (dump_ada_node): Add const keyword.
2575
87677ac7
ML
25762018-09-25 Martin Liska <mliska@suse.cz>
2577
2578 * c-common.c (c_common_truthvalue_conversion):
2579 Remove Pascal from documentation.
2580
518196cb
EB
25812018-09-21 Eric Botcazou <ebotcazou@adacore.com>
2582
2583 * c-ada-spec.c: Include diagnostic.h.
2584 (dump_ada_declaration) <RECORD_TYPE>: Issue a warning on packed layout.
2585
a599af84
MP
25862018-09-19 Marek Polacek <polacek@redhat.com>
2587
2588 * c.opt (Wclass-conversion): New.
2589
9c4a4b3c
DM
25902018-09-17 David Malcolm <dmalcolm@redhat.com>
2591
2592 * c-format.c (range_label_for_format_type_mismatch::get_text):
2593 Update for new param.
2594
c896ecfe
DM
25952018-09-17 David Malcolm <dmalcolm@redhat.com>
2596
2597 * c-format.c (format_warning_at_char): Update for introduction of
2598 format_string_diagnostic_t.
2599 (format_type_warning): Likewise.
2600
80c6d1f4
MJ
26012018-09-17 Martin Jambor <mjambor@suse.cz>
2602
2603 PR c/63886
2604 * c.opt (Wabsolute-value): New.
2605
6d900107
BE
26062018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
2607
2608 * c-common.c (complete_flexible_array_elts): New helper function.
2609 * c-common.h (complete_flexible_array_elts): Declare.
2610
b5764229
BE
26112018-09-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
2612
2613 * c-common.c (braced_list_to_string): Remove eval parameter.
2614 Add some more checks. Always create zero-terminated STRING_CST.
2615 * c-common.h (braced_list_to_string): Adjust prototype.
2616
85204e23
DM
26172018-08-27 David Malcolm <dmalcolm@redhat.com>
2618
2619 PR 87091
2620 * c-common.c (c_cpp_error): Update for conversion of show_caret_p
2621 to a tri-state.
2622 (maybe_suggest_missing_token_insertion): Likewise.
2623 (maybe_add_include_fixit): Add param "override_location". If set,
2624 and source-printing is enabled, then override the rich_location's
2625 primary location with that of the insertion point for the fix-it
2626 hint, marking it with SHOW_LINES_WITHOUT_RANGE.
2627 * c-common.h (extern void maybe_add_include_fixit): Add bool
2628 param.
2629 * c-format.c (selftest::test_type_mismatch_range_labels): Update
2630 for conversion of show_caret_p to a tri-state.
2631 * c-warn.c (warn_for_restrict): Likewise.
2632 * known-headers.cc
2633 (suggest_missing_header::~suggest_missing_header): Update call to
2634 maybe_add_include_fixit to suggest overriding the location, as it
2635 is for a note.
2636
3d78e008
ML
26372018-08-27 Martin Liska <mliska@suse.cz>
2638
2639 * c-common.c (check_function_restrict): Use new function
92a285c1
ML
2640 fndecl_built_in_p and remove check for FUNCTION_DECL if
2641 possible.
3d78e008
ML
2642 (check_builtin_function_arguments): Likewise.
2643 (reject_gcc_builtin): Likewise.
2644 * c-warn.c (sizeof_pointer_memaccess_warning): Likewise.
2645
b5be6d0c
MP
26462018-08-26 Marek Polacek <polacek@redhat.com>
2647
2648 PR c++/87029, Implement -Wredundant-move.
2649 * c.opt (Wredundant-move): New option.
2650
79ca9c35
MP
26512018-08-21 Marek Polacek <polacek@redhat.com>
2652
2653 PR c++/86981, Implement -Wpessimizing-move.
2654 * c.opt (Wpessimizing-move): New option.
2655
097f82ec
DM
26562018-08-20 David Malcolm <dmalcolm@redhat.com>
2657
2658 PR other/84889
2659 * c-attribs.c (common_handle_aligned_attribute): Add
2660 auto_diagnostic_group instance.
2661 * c-indentation.c (warn_for_misleading_indentation): Likewise.
2662 * c-opts.c (c_common_post_options): Likewise.
2663 * c-warn.c (warn_logical_not_parentheses): Likewise.
2664 (warn_duplicated_cond_add_or_warn): Likewise.
2665 (warn_for_multistatement_macros): Likewise.
2666
3fb558b1
NS
26672018-08-20 Nathan Sidwell <nathan@acm.org>
2668
2669 * c-ada-spec.c (macro_length, dump_ada_macros): Adjust macro parm
2670 access.
2671
800c0e98
NS
26722018-08-17 Nathan Sidwell <nathan@acm.org>
2673
2674 * c-cppbuiltin.c (struct lazy_hex_fp_value_struct): Remove macro
2675 field.
2676 (laxy_hex_fp_value_count): Make unsigned.
2677 (lazy_hex_fp_value): Provided with macro & lazy number. Directly
2678 manipulate the macro.
2679 (builtin_defin_with_hex_fp_value): Adjust callback name, use
2680 cpp_define_lazily.
2681
6f795a92
DM
26822018-08-17 David Malcolm <dmalcolm@redhat.com>
2683
2684 * c-format.c (enum format_type): Add gcc_dump_printf_format_type.
2685 (gcc_dump_printf_length_specs): New.
2686 (gcc_dump_printf_flag_pairs): New.
2687 (gcc_dump_printf_flag_specs): New.
2688 (gcc_dump_printf_char_table): New.
2689 (format_types_orig): Add entry for "gcc_dump_printf".
2690 (init_dynamic_diag_info): Set up length_char_specs and
2691 conversion_specs for gcc_dump_printf_format_type.
2692 (handle_format_attribute): Handle gcc_dump_printf_format_type.
2693
c5d725c0
NS
26942018-08-17 Nathan Sidwell <nathan@acm.org>
2695
10f04917
NS
2696 * c-ada-spec.c (macro_length, dump_ada_macros): Constify.
2697
c5d725c0
NS
2698 * c-ada-spec.c: Don't #include "cpp-id-data.h"
2699 * c-cppbuiltin.c: Likewise.
2700
c0c12356
ML
27012018-08-17 Martin Liska <mliska@suse.cz>
2702
2703 * c.opt: Remove Warn, Init and Report for options with
92a285c1
ML
2704 Ignore/Deprecated flag. Warning is done automatically for
2705 Deprecated flags.
c0c12356 2706
10fcc142
DM
27072018-08-16 David Malcolm <dmalcolm@redhat.com>
2708
2709 PR c++/70693
2710 * c-common.c (selftest::c_family_tests): Call
2711 selftest::c_indentation_c_tests.
2712 * c-common.h (selftest::c_indentation_c_tests): New decl.
2713 * c-indentation.c: Include "selftest.h".
2714 (next_tab_stop): Add "tab_width" param, rather than accessing
2715 cpp_opts.
2716 (get_visual_column): Likewise. Clarify comment. Bulletproof
2717 against reading past the end of the line.
2718 (get_first_nws_vis_column): Add "tab_width" param.
2719 (detect_intervening_unindent): Likewise.
2720 (should_warn_for_misleading_indentation): Read tab width from
2721 cpp_opts and pass around.
2722 (selftest::test_next_tab_stop): New test.
2723 (selftest::assert_get_visual_column_succeeds): New function.
2724 (ASSERT_GET_VISUAL_COLUMN_SUCCEEDS): New macro.
2725 (selftest::assert_get_visual_column_fails): New function.
2726 (ASSERT_GET_VISUAL_COLUMN_FAILS): New macro.
2727 (selftest::test_get_visual_column): New test.
2728 (selftest::c_indentation_c_tests): New function.
2729
3f6677f4
NS
27302018-08-16 Nathan Sidwell <nathan@acm.org>
2731
2732 * c-ada-spec.c (count_ada_macro): Use cpp_user_macro_p.
2733 (store_ada_macro): Likewise.
2734 * c-ppoutput.c (cb_used_define, dump_macro): Likewise.
2735 * c-spellcheck.cc (should-suggest_as_macro_p): Likewise,
2736
96e6ae57
DM
27372018-08-15 David Malcolm <dmalcolm@redhat.com>
2738
2739 * c-format.c: Include "selftest-diagnostic.h" and
2740 "gcc-rich-location.h".
2741 (format_warning_at_char): Pass NULL for new label params of
2742 format_warning_va.
2743 (class indirection_suffix): New class.
2744 (class range_label_for_format_type_mismatch): New class.
2745 (format_type_warning): Move logic for generating "*" suffix to
2746 class indirection_suffix. Create "fmt_label" and "param_label"
2747 to show their types, and pass them to the
2748 format_warning_at_substring calls.
2749 (selftest::test_type_mismatch_range_labels): New test.
2750 (selftest::c_format_c_tests): Call it.
2751
23aa9f7c
MS
27522018-08-13 Martin Sebor <msebor@redhat.com>
2753
2754 PR tree-optimization/71625
2755 * c-common.c (braced_list_to_string): New function.
2756 * c-common.h (braced_list_to_string): Declare it.
2757
f10a9135
NS
27582018-08-08 Nathan Sidwell <nathan@acm.org>
2759
2760 * c-common.c (try_to_locate_new_include_inertion_point): Use
2761 linemap_included_from_linemap.
2762 * c-lex.c (fe_file_change): Use linemap_included_from.
2763 * c-ppoutput.c (pp_file_change): Likewise.
2764
8a45b051
MS
27652018-08-01 Martin Sebor <msebor@redhat.com>
2766
2767 PR tree-optimization/86650
ab20d992 2768 * c-format.c (gcc_tdiag_char_table): Update comment for "%G".
8a45b051
MS
2769 (gcc_cdiag_char_table, gcc_cxxdiag_char_table): Same.
2770 (init_dynamic_diag_info): Update from "gcall *" to "gimple *".
2771 * c-format.h (T89_G): Update to be "gimple *" rather than
2772 "gcall *".
2773 (local_gcall_ptr_node): Rename...
2774 (local_gimple_ptr_node): ...to this.
2775
e540ccc0
DM
27762018-07-31 David Malcolm <dmalcolm@redhat.com>
2777
2778 * c-format.c (PP_FORMAT_CHAR_TABLE): New macro, based on existing
2779 table entries for gcc_diag_char_table, and the 'Z' entry from
2780 gcc_tdiag_char_table, changing the "chain" entry for 'Z' from
2781 &gcc_tdiag_char_table[0] to &gcc_diag_char_table[0].
2782 (gcc_diag_char_table): Use PP_FORMAT_CHAR_TABLE, implicitly
2783 adding missing "Z" for this table. Remove erroneous "G" and "K"
2784 entries.
2785 (gcc_tdiag_char_table): Use PP_FORMAT_CHAR_TABLE. Remove "v".
2786 (gcc_cdiag_char_table): Use PP_FORMAT_CHAR_TABLE.
2787 (gcc_cxxdiag_char_table): Use PP_FORMAT_CHAR_TABLE. Remove "v".
2788
425fc685
RE
27892018-07-31 Richard Earnshaw <rearnsha@arm.com>
2790
2791 * c-common.c (speculation_safe_resolve_call): New function.
2792 (speculation_safe_resolve_params): New function.
2793 (speculation_safe_resolve_return): New function.
2794 (resolve_overloaded_builtin): Handle __builtin_speculation_safe_value.
2795 * c-cppbuiltin.c (c_cpp_builtins): Add pre-define for
2796 __HAVE_SPECULATION_SAFE_VALUE.
2797
181463c2
DM
27982018-07-20 David Malcolm <dmalcolm@redhat.com>
2799
2800 * c-common.c (c_cpp_error): Remove redundant "line_table"
2801 parameter from call to rich_location::set_range.
2802 (maybe_suggest_missing_token_insertion): Likewise.
2803
0d7f9065
MS
28042018-07-20 Martin Sebor <msebor@redhat.com>
2805
2806 PR middle-end/82063
ab20d992 2807 * c.opt (-Warray-bounds): Remove redundant -Wall.
0d7f9065 2808
00abf86c
MS
28092018-07-20 Martin Sebor <msebor@redhat.com>
2810
2811 PR middle-end/82063
2812 * c-common.h (c_common_handle_option): Change function argument
2813 to HOST_WIDE_INT.
2814 * c-opts.c (c_common_init_options): Same.
2815 (c_common_handle_option): Same. Remove special handling of
2816 OPT_Walloca_larger_than_ and OPT_Wvla_larger_than_.
2817 * c.opt (-Walloc-size-larger-than, -Walloca-larger-than): Change
2818 options to take a HOST_WIDE_INT argument and accept a byte-size
2819 suffix. Initialize.
2820 (-Wvla-larger-than): Same.
2821 (-Wno-alloc-size-larger-than, -Wno-alloca-larger-than): New.
2822 (-Wno-vla-larger-than): Same.
2823
9b452033
JJ
28242018-07-12 Jakub Jelinek <jakub@redhat.com>
2825
2826 * c-attribs.c (c_common_attribute_table): Add
2827 "omp declare target implicit" attribute.
2828
cd0762f3
RB
28292018-07-12 Richard Biener <rguenther@suse.de>
2830
2831 PR c/86453
2832 * c-attribs.c (handle_packed_attribute): Do not build a variant
2833 type with TYPE_PACKED, instead ignore the attribute if we may
2834 not apply to the original type.
2835
0b27c3ed
JJ
28362018-07-10 Jakub Jelinek <jakub@redhat.com>
2837
2838 PR c++/86443
2839 * c-omp.c (c_omp_check_loop_iv_r, c_omp_check_loop_iv): Allow declv
2840 to contain TREE_LIST for both the original class iterator and the
2841 "last" helper var.
2842
e730a0ef
EB
28432018-07-07 Eric Botcazou <ebotcazou@adacore.com>
2844
2845 * c-ada-spec.c (to_ada_name): Remove index parameter.
2846 (pp_ada_tree_identifier): Likewise.
2847 (dump_ada_macros): Adjust call to to_ada_name.
2848 (struct overloaded_name_hash): Delete.
2849 (struct overloaded_name_hasher): Likewise.
2850 (overloaded_names): Likewise.
2851 (compute_overloading_index): Likewise.
2852 (dump_ada_decl_name): Do not call compute_overloading_index and
2853 adjust calls to pp_ada_tree_identifier.
2854 (dump_ada_double_name): Adjust calls to pp_ada_tree_identifier.
2855 (dump_ada_import): Add spc parameter and switch to aspect syntax.
2856 (dump_ada_function_declaration): Adjust call to pp_ada_tree_identifier.
2857 (dump_ada_enum_type): Remove type and display_convention parameters.
2858 Adjust calls to pp_ada_tree_identifier.
2859 (dump_ada_node): Likewise and for dump_ada_structure.
2860 (dump_nested_type) <ENUMERAL_TYPE>: Adjust call to dump_ada_enum_type
2861 and tidy up.
2862 <RECORD_TYPE>: Adjust call to dump_ada_structure and switch to aspect
2863 syntax.
2864 (print_constructor): Adjust call to pp_ada_tree_identifier.
2865 (print_destructor): Likewise.
2866 (dump_ada_declaration): Switch to aspect syntax.
2867 (dump_ada_structure): Likewise and tidy up. Replace display_convention
2868 parameter with nested parameter.
2869 (dump_ads): Emit pragma Ada_2012 in lieu of pragma Ada_2005.
2870 (dump_ada_specs): Do not delete overloaded_names table.
2871
8de583fc
PB
28722018-07-06 Peter Bergner <bergner@linux.ibm.com>
2873
2874 PR target/86324
e730a0ef 2875 * c-attribs.c (handle_mode_attribute): Call translate_mode_attribute
8de583fc
PB
2876 target hook.
2877
09cff37b
NS
28782018-07-05 Nathan Sidwell <nathan@acm.org>
2879
2880 * c-lex.c (fe_file_change): Check SYSTEM_IMPLICIT_EXTERN_C not
2881 NO_IMPLICIT_EXTERN_C.
2882
98086b2b
ML
28832018-06-28 Martin Liska <mliska@suse.cz>
2884
2885 * cppspec.c: Include opt-suggestions.h.
2886
ab20d992
JJ
28872018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
2888 Thomas Schwinge <thomas@codesourcery.com>
829c6349
CLT
2889 Cesar Philippidis <cesar@codesourcery.com>
2890
2891 * c-pragma.h (enum pragma_omp_clause): Add
2892 PRAGMA_OACC_CLAUSE_{FINALIZE,IF_PRESENT}. Remove
2893 PRAGMA_OACC_CLAUSE_PRESENT_OR_{COPY,COPYIN,COPYOUT,CREATE}.
2894
f41b7612
JJ
28952018-06-20 Jakub Jelinek <jakub@redhat.com>
2896
2897 PR c++/86210
2898 * c-common.c (check_nonnull_arg): Use fold_for_warn. Adjust obsolete
2899 comment.
2900
4252ccd7
MS
29012018-06-18 Martin Sebor <msebor@redhat.com>
2902
2903 PR middle-end/85602
2904 * c-warn.c (sizeof_pointer_memaccess_warning): Check for attribute
2905 nonstring.
2906
e197e64e
KV
29072018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
2908
2909 * c-common.c (c_common_truthvalue_conversion): Handle ABSU_EXPR.
2910
34a7a230
JM
29112018-06-13 Jason Merrill <jason@redhat.com>
2912
5cef3733
JM
2913 * c-opts.c (c_common_post_options): Warn about useless -Wabi.
2914 (c_common_handle_option) [OPT_Wabi_]: Remove flag_abi_compat_version
2915 handling.
2916
34a7a230
JM
2917 PR c++/86094 - wrong code with defaulted move ctor.
2918 * c-opts.c (c_common_post_options): Bump the current ABI version to
2919 13. Set warn_abi_version and flag_abi_compat_version to the current
2920 version rather than 0. Fix defaulting flag_abi_compat_version from
2921 warn_abi_version.
2922
bb0f14ae
MS
29232018-06-12 Martin Sebor <msebor@redhat.com>
2924
2925 PR c/85931
2926 * c-warn.c (sizeof_pointer_memaccess_warning): Avoid warning when
2927 sizeof source and destination yields the same value.
2928
3713f2e2
ML
29292018-06-12 Martin Liska <mliska@suse.cz>
2930
2931 * c.opt: Make MPX-related options as Deprecated.
2932
4af78ef8
DM
29332018-06-08 David Malcolm <dmalcolm@redhat.com>
2934
2935 * c-pretty-print.c (c_pretty_printer::statement): Use TDF_NONE
2936 rather than 0.
2937
31db0fe0
ML
29382018-06-08 Martin Liska <mliska@suse.cz>
2939
2940 * c-attribs.c (handle_bnd_variable_size_attribute): Remove support
2941 for MPX (macros, related functions, fields in cgraph_node, ...).
2942 (handle_bnd_legacy): Likewise.
2943 (handle_bnd_instrument): Likewise.
2944 * c.opt: Likewise.
2945
fe16acf2
JJ
29462018-06-06 Jakub Jelinek <jakub@redhat.com>
2947
2948 PR c++/86068
2949 * c-cppbuiltin.c (c_cpp_builtins): Fix a typo, set
2950 __cpp_transactional_memory to 201500 instead of 210500.
2951
4dbdb49b
JM
29522018-06-06 Jason Merrill <jason@redhat.com>
2953
2954 PR c++/85710 - ICE with -Wmemset-elt-size.
2955 * c-warn.c (warn_for_memset): Don't crash on incomplete element type.
2956
f8ad043f
JM
29572018-06-01 Jason Merrill <jason@redhat.com>
2958
2959 * c-cppbuiltin.c (c_cpp_builtins): Bump __cpp_deduction_guides to
2960 201703.
2961
abc24d93
EB
29622018-06-01 Eric Botcazou <ebotcazou@adacore.com>
2963
2964 * c-ada-spec.c (dump_ada_declaration) <TYPE_DECL>: Generate a forward
2965 declaration for a typedef independently of whether the declaration of
2966 the subtype is generated.
2967
d258f4aa
MS
29682018-05-31 Martin Sebor <msebor@redhat.com>
2969
2970 PR c/82063
2971 * c.opt (-Wno-alloc-size-larger-than): New option.
2972
b67b9225
DP
29732018-04-22 David Pagan <dave.pagan@oracle.com>
2974
2975 PR c/55976
2976 * c-opts.c (c_common_post_options): Set default for warn_return_type
ab20d992 2977 for C++/C++ with ObjC extensions only. For C, makes it possible to
b67b9225
DP
2978 differentiate between default (no option), -Wreturn-type, and
2979 -Wno-return-type.
2980
04eb9c55
JM
29812018-05-29 Jason Merrill <jason@redhat.com>
2982
2983 * c.opt (Winit-list-lifetime): New flag.
2984
b0c31bc6
BE
29852018-05-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
2986
2987 * c-lex.c (get_fileinfo): Use splay_tree_compare_strings and
2988 splay_tree_delete_pointers.
2989
44284983
JJ
29902018-05-26 Jakub Jelinek <jakub@redhat.com>
2991
2992 PR bootstrap/85921
2993 * c-warn.c (diagnose_mismatched_attributes): Remove unnecessary
2994 noinline variable to workaround broken kernel headers.
2995
b46b715d
JM
29962018-05-18 Jason Merrill <jason@redhat.com>
2997
2998 * c.opt (Wdeprecated-copy): New flag.
2999
40659769
ML
30002018-05-17 Martin Liska <mliska@suse.cz>
3001
3002 * c-warn.c (overflow_warning): Do not use
3003 space in between 'G_' and '('.
3004
403962ea
JM
30052018-05-09 Jason Merrill <jason@redhat.com>
3006
3007 * c-common.c (valid_array_size_p): Add complain parameter.
3008 * c-common.h: ...which defaults to true.
3009
1c9ee609
JJ
30102018-05-11 Jakub Jelinek <jakub@redhat.com>
3011
3012 PR c/85696
3013 * c-omp.c (c_omp_predetermined_sharing): Return
3014 OMP_CLAUSE_DEFAULT_SHARED for artificial vars with integral type.
3015
19916065
ML
30162018-05-11 Martin Liska <mliska@suse.cz>
3017
92a285c1 3018 PR sanitizer/85556
19916065
ML
3019 * c-attribs.c (handle_no_sanitize_attribute): Iterate all
3020 TREE_LIST values.
3021
79e7b1fe
JJ
30222018-05-10 Jakub Jelinek <jakub@redhat.com>
3023
3024 PR c++/85662
3025 * c-common.h (fold_offsetof_1): Removed.
3026 (fold_offsetof): Add TYPE argument defaulted to size_type_node and
3027 CTX argument defaulted to ERROR_MARK.
3028 * c-common.c (fold_offsetof_1): Renamed to ...
3029 (fold_offsetof): ... this. Remove wrapper function. Add TYPE
3030 argument, convert the pointer constant to TYPE and use size_binop
3031 with PLUS_EXPR instead of fold_build_pointer_plus if type is not
3032 a pointer type. Adjust recursive calls.
3033
86c12f76
EB
30342018-05-10 Eric Botcazou <ebotcazou@adacore.com>
3035
3036 PR c++/85400
3037 * c-attribs.c (handle_visibility_attribute): Do not set no_add_attrs.
3038
ee336e84
NS
30392018-05-07 Nathan Sidwell <nathan@acm.org>
3040
3041 * c.opt (ffor-scope): Remove functionality, issue warning.
3042
6c072e21
NS
30432018-05-03 Nathan Sidwell <nathan@acm.org>
3044
3045 * c.opt (ffriend-injection): Remove functionality, issue warning.
3046
2cc7d3a7
DM
30472018-05-01 David Malcolm <dmalcolm@redhat.com>
3048
3049 PR c/84258
3050 * c-format.c (struct format_check_results): Add field
3051 "number_non_char".
3052 (check_format_info): Initialize it, and warn if encountered.
3053 (check_format_arg): Distinguish between wide char and
3054 everything else when detecting arrays of non-char.
3055
7761dfbe
DM
30562018-04-30 David Malcolm <dmalcolm@redhat.com>
3057
3058 * c-format.c (get_corrected_substring): Update for
3059 location_get_source_line returning a char_span. Use a char_span
3060 when handling the prefix of the correction.
3061 * c-indentation.c (get_visual_column): Update for
3062 location_get_source_line returning a char_span.
3063 (get_first_nws_vis_column): Likewise.
3064
62e98ef1
DM
30652018-03-29 David Malcolm <dmalcolm@redhat.com>
3066
3067 PR c++/84269
3068 * known-headers.cc (get_stdlib_header_for_name): Add various names
3069 from <assert.h>, <string.h>, and <memory.h>; add more names from
3070 <stdio.h>.
3071
a7dea617
JJ
30722018-03-27 Jakub Jelinek <jakub@redhat.com>
3073
3074 PR c++/85061
3075 * c-common.c (fold_offsetof_1) <case COMPOUND_EXPR>: Assert that
3076 get_base_address of the second operand is a VAR_P, rather than the
3077 operand itself, and use gcc_checking_assert instead of gcc_assert.
3078
889a3a30
MP
30792018-03-23 Marek Polacek <polacek@redhat.com>
3080
3081 PR c++/85045
3082 * c-pretty-print.c (c_pretty_printer::multiplicative_expression)
3083 <case RDIV_EXPR>: Tweak condition.
3084
452154b9
EB
30852018-03-20 Eric Botcazou <ebotcazou@adacore.com>
3086
3087 * c-ada-spec.c (pp_ada_tree_identifier): Deal specifically with _Bool.
3088
63ecb626
JJ
30892018-03-16 Jakub Jelinek <jakub@redhat.com>
3090
ce811fc4
JJ
3091 PR c/84909
3092 * c-warn.c (conversion_warning): Replace "to to" with "to" in
3093 diagnostics.
3094
63ecb626
JJ
3095 PR c/84910
3096 * c-warn.c (diagnose_mismatched_attributes): Remove trailing space from
3097 diagnostics.
3098
a1295eec
RB
30992018-03-16 Richard Biener <rguenther@suse.de>
3100
3101 PR c/84873
3102 * c-gimplify.c (c_gimplify_expr): Revert previous change. Instead
3103 unshare the possibly folded expression.
3104
919674fb
RB
31052018-03-15 Richard Biener <rguenther@suse.de>
3106
3107 PR c/84873
3108 * c-gimplify.c (c_gimplify_expr): Do not fold expressions.
3109
f99309b2
MS
31102018-03-13 Martin Sebor <msebor@redhat.com>
3111
3112 PR tree-optimization/84725
3113 * c-attribs.c (handle_nonstring_attribute): Allow attribute nonstring
3114 with all three narrow character types, including their qualified forms.
3115
e9b9fa4c
MS
31162018-03-12 Martin Sebor <msebor@redhat.com>
3117
3118 PR tree-optimization/83456
ab20d992 3119 * c-common.c (check_function_restrict): Return bool.
e9b9fa4c
MS
3120 Restore checking of bounded built-in functions.
3121 (check_function_arguments): Also return the result
3122 of warn_for_restrict.
ab20d992
JJ
3123 * c-common.c (check_function_restrict): Return bool.
3124 * c-warn.c (warn_for_restrict): Return bool.
e9b9fa4c 3125
0805d020
MP
31262018-03-02 Marek Polacek <polacek@redhat.com>
3127
3128 PR c++/84171
3129 * c-warn.c (warn_for_sign_compare): Bail out if any of the operands
3130 is erroneous.
3131
ed2a2f08
TS
31322018-03-02 Thomas Schwinge <thomas@codesourcery.com>
3133
3134 * c-attribs.c (c_common_attribute_table): Remove "cilk simd
3135 function".
3136
90abdde0
MP
31372018-03-01 Marek Polacek <polacek@redhat.com>
3138
3139 PR c++/84639
3140 * c-attribs.c (common_handle_aligned_attribute): Don't use invalid
3141 alignment in computation.
3142
c6db43fa
EB
31432018-02-28 Eric Botcazou <ebotcazou@adacore.com>
3144
3145 * c-ada-spec.c (dump_ada_node) <NULLPTR_TYPE>: New case.
3146 <REAL_TYPE>: Deal specifically with _Float128/__float128.
3147
9e25c7ed
EB
31482018-02-28 Eric Botcazou <ebotcazou@adacore.com>
3149
3150 * c-ada-spec.c (dump_ada_double_name) <ENUMERAL_TYPE>: New case.
3151 (is_char_array): Take a type instead of a declaration.
3152 (dump_ada_array_type): Likewise.
3153 (is_simple_enum): Minor tweak.
3154 (dump_ada_enum_type): New function extracted from...
3155 (dump_ada_node) <ENUMERAL_TYPE>: ...here. Invoke it.
3156 <INTEGER_TYPE>: Remove unreachable code.
3157 <RECORD_TYPE>: Likewise. Minor tweaks.
3158 (dump_nested_type) <ARRAY_TYPE>: Adjust to above changes.
3159 <ENUMERAL_TYPE>: New case.
3160 <RECORD_TYPE>: Factor out common code.
3161 (dump_ada_declaration) <ARRAY_TYPE>: Adjust to above changes.
3162 Minor tweaks. Deal with enumeral types.
3163 (dump_ada_structure): Minor tweaks.
3164
09de3550
EB
31652018-02-28 Eric Botcazou <ebotcazou@adacore.com>
3166
3167 * c-ada-spec.c (dump_ada_node) <POINTER_TYPE>: Do not use generic
3168 address for incomplete structures.
3169 (dump_forward_type): Do not bail out for incomplete structures.
3170 (dump_ada_declaration): Do not special-case incomplete structures
3171 for subtypes. Dump them as null records for types.
3172
095d8d4b
EB
31732018-02-28 Eric Botcazou <ebotcazou@adacore.com>
3174
3175 * c-ada-spec.c (dump_ada_import): Use boolean and fix formatting.
3176 (is_char_array): Fix formatting.
3177 (dump_template_types): Likewise.
3178 (dump_generic_ada_node): Rename into...
3179 (dump_ada_node): ...this.
3180 <POINTER_TYPE>: Remove superfluous space. Use generic address for
3181 incomplete structures and not for empty structures. Do not use it
3182 when forward declarations are needed.
3183 (dump_forward_type): New function.
3184 (dump_nested_types): Remove FORWARD parameter. Do not consider
3185 TREE_VISITED and do not generate a forward declaration. Only dump
3186 original nested types for nested declaration.
3187 (dump_nested_type) <POINTER_TYPE>: Call dump_forward_type.
3188 <ARRAY_TYPE>: Likewise if the component type is an anonymous pointer.
3189 <RECORD_TYPE>: Do not consider TREE_VISITED.
3190 (dump_ada_declaration): Use booleans and fix formatting throughout.
3191 <TYPE_DECL>: Skip incomplete structures and not empty structures.
3192 Call dump_forward_type instead of dump_nested_types for a typedef.
3193 Remove superfluous check and adjust call to dump_nested_types.
3194 <POINTER_TYPE>: Call dump_forward_type and fall through.
3195 (dump_ada_struct_decl): Rename into...
3196 (dump_ada_structure): ...this. Do not special-case empty structures.
3197
d4cfd486
MS
31982018-02-27 Martin Sebor <msebor@redhat.com>
3199
3200 PR c++/83871
3201 * c.opt (-Wmissing-attributes): New option.
3202
b22dbd03
ML
32032018-02-21 Martin Liska <mliska@suse.cz>
3204
3205 * c.opt (Wcatch-value=): Add IntegerRange.
3206
883dfe2a
JM
32072018-02-15 Jason Merrill <jason@redhat.com>
3208
3209 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_deduction_guides.
3210
0444aa9c
NS
32112018-02-09 Nathan Sidwell <nathan@acm.org>
3212
3213 PR c/84293
3214 * c-common.h (strict_aliasing_warning): Drop OTYPE arg, insert LOC
3215 arg.
3216 * c-warn.c (strict_aliasing_warning): Drop OTYPE arg, require LOC
3217 arg. Adjust.
3218
cea71f0a
MS
32192018-02-09 Martin Sebor <msebor@redhat.com>
3220
3221 PR lto/84212
3222 * c.opt (-Wstringop-overflow, -Warray-bounds): Add LTO.
3223 (-Walloc-size-larger-than, -Wformat-truncation=): Same.
3224 (-Wmaybe-uninitialized, -Wnonnull, -Wrestrict): Same.
3225 (-Wstrict-overflow, -Wsuggest-attribute): Same.
3226 (-Wuninitialized): Same.
3227
8c8b7be5
EB
32282018-02-09 Eric Botcazou <ebotcazou@adacore.com>
3229
3230 * c-ada-spec.c (dump_ada_declaration): Do not generate the 'constant'
3231 keyword for components.
3232
7c30b12a
PC
32332018-02-02 Paolo Carlini <paolo.carlini@oracle.com>
3234
3235 * c-common.h (DECL_UNNAMED_BIT_FIELD): New.
3236
eece7fe5
JK
32372018-02-02 Julia Koval <julia.koval@intel.com>
3238
3239 * c-common.h (omp_clause_mask): Move to wide_int_bitmask.h.
3240
7d07a93a
MP
32412018-01-29 Marek Polacek <polacek@redhat.com>
3242
3243 PR c/83966
3244 * c-format.c (check_function_format): Check current_function_decl.
3245
53723269
JJ
32462018-01-27 Jakub Jelinek <jakub@redhat.com>
3247
3248 * c-cppbuiltin.c (c_cpp_builtins): Use ggc_strdup for the fp_suffix
3249 argument.
3250 (LAZY_HEX_FP_VALUES_CNT): Define.
3251 (lazy_hex_fp_values): Allow up to LAZY_HEX_FP_VALUES_CNT lazy hex fp
3252 values rather than just 12.
3253 (builtin_define_with_hex_fp_value): Likewise.
3254
7365279f
BK
32552018-01-18 Boris Kolpackov <boris@codesynthesis.com>
3256
92a285c1
ML
3257 PR other/70268
3258 * c.opt (-fmacro-prefix-map): New option.
3259 * c-opts.c (c_common_handle_option): Handle it.
3260 * c-lex.c (init_c_lex): Set remap_filename cpp callback.
3261 * c-ppoutput.c (init_pp_output): Likewise.
7365279f 3262
bb9869d5
DM
32632018-01-17 David Malcolm <dmalcolm@redhat.com>
3264
3265 PR c++/83814
3266 * c-common.c (fold_for_warn): Move to c/c-fold.c and cp/expr.c.
3267
68dc87c3
EB
32682018-01-10 Eric Botcazou <ebotcazou@adacore.com>
3269
3270 * c-ada-spec.c (dump_number): Add FLOAT_P parameter.
3271 Skip 'f' and 'F' characters if it is true.
3272 (store_ada_macro): Minor tweak.
3273 (dump_ada_macros) <CPP_COMMENT>: Likewise.
3274 <CPP_WSTRING>: Likewise.
3275 <CPP_STRING>: Output '&' in the buffer if not the first string.
3276 <CPP_NUMBER>: Adjust calls to dump_number.
3277
9a004410
DM
32782018-01-10 David Malcolm <dmalcolm@redhat.com>
3279
3280 PR c++/43486
3281 * c-common.c: Include "selftest.h".
3282 (get_atomic_generic_size): Perform the test for integral type
3283 before the range test for any integer constant, fixing indentation
3284 of braces. Call fold_for_warn before testing for an INTEGER_CST.
3285 (reject_gcc_builtin): Strip any location wrapper from EXPR.
3286 (selftest::test_fold_for_warn): New function.
3287 (selftest::c_common_c_tests): New function.
3288 (selftest::c_family_tests): Call it, and
3289 selftest::c_pretty_print_c_tests.
3290 * c-common.h (selftest::c_pretty_print_c_tests): New decl.
3291 * c-format.c (check_format_arg): Convert VAR_P check to a
3292 fold_for_warn.
3293 * c-pretty-print.c: Include "selftest.h".
3294 (pp_c_cast_expression): Don't print casts for location wrappers.
3295 (selftest::assert_c_pretty_printer_output): New function.
3296 (ASSERT_C_PRETTY_PRINTER_OUTPUT): New macro.
3297 (selftest::test_location_wrappers): New function.
3298 (selftest::c_pretty_print_c_tests): New function.
3299 * c-warn.c (warn_for_memset): Call fold_for_warn on the arguments.
3300
5c0caeb3
RS
33012018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
3302 Alan Hayward <alan.hayward@arm.com>
3303 David Sherwood <david.sherwood@arm.com>
3304
3305 * c-common.c (c_common_type_for_mode): Handle MODE_VECTOR_BOOL.
3306
73a699ae
RS
33072018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
3308 Alan Hayward <alan.hayward@arm.com>
3309 David Sherwood <david.sherwood@arm.com>
3310
3311 * c-ubsan.c (ubsan_instrument_shift): Treat GET_MODE_BITSIZE
3312 as polynomial.
3313
928686b1
RS
33142018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
3315 Alan Hayward <alan.hayward@arm.com>
3316 David Sherwood <david.sherwood@arm.com>
3317
3318 * c-common.c (vector_types_convertible_p, c_build_vec_perm_expr)
3319 (convert_vector_to_array_for_subscript): Handle polynomial
3320 TYPE_VECTOR_SUBPARTS.
3321 (c_common_type_for_mode): Check valid_vector_subparts_p.
3322 * c-pretty-print.c (pp_c_initializer_list): Handle polynomial
3323 VECTOR_CST_NELTS.
3324
85ec4feb
JJ
33252018-01-03 Jakub Jelinek <jakub@redhat.com>
3326
3327 Update copyright years.
3328
170a8bd6 33292017-12-22 Mike Stump <mikestump@comcast.net>
92a285c1 3330 Eric Botcazou <ebotcazou@adacore.com>
170a8bd6
EB
3331
3332 * c-pragma.c (init_pragma): Register pragma GCC unroll.
3333 * c-pragma.h (enum pragma_kind): Add PRAGMA_UNROLL.
3334
ab20d992 33352017-12-22 Alexandre Oliva <aoliva@redhat.com>
18408e96
AO
3336
3337 PR debug/83527
3338 PR debug/83419
3339 * c-semantics.c (only_debug_stmts_after_p): New.
3340 (pop_stmt_list): Clear side effects in debug-only stmt list.
3341 Check for single nondebug stmt followed by debug stmts only.
3342
c12d20d4
AO
33432017-12-21 Alexandre Oliva <aoliva@redhat.com>
3344
3345 PR debug/83419
3346 * c-semantics.c (pop_stmt_list): Propagate side effects from
3347 single nondebug stmt to container list.
3348
01512446
JJ
33492017-12-19 Jakub Jelinek <jakub@redhat.com>
3350
3351 * known-headers.cc (get_stdlib_header_for_name): Replace Yoda
3352 conditions with typical order conditions.
3353
82cfbd01
MP
33542017-12-18 Marek Polacek <polacek@redhat.com>
3355
3356 * c-warn.c (warn_logical_operator): Return early if -Wlogical-op is
3357 not in effect.
3358
99da11ec
MS
33592017-12-17 Martin Sebor <msebor@redhat.com>
3360
3361 * c-attribs.c (common_handle_aligned_attribute): Avoid issuing
3362 an error for attribute warn_if_not_aligned.
3363
cc8bea0a
MS
33642017-12-16 Martin Sebor <msebor@redhat.com>
3365
3366 PR tree-optimization/78918
3367 * c-common.c (check_function_restrict): Avoid checking built-ins.
3368 * c.opt (-Wrestrict): Include in -Wall.
3369
4849deb1
JJ
33702017-12-15 Jakub Jelinek <jakub@redhat.com>
3371
3372 * c-attribs.c (c_common_attribute_table,
3373 c_common_format_attribute_table): Swap affects_type_identity
3374 and handler fields, adjust comments.
3375
c65e18d3
BE
33762017-12-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
3377
3378 * c.opt (Wcast-function-type): New warning option.
3379 * c-lex.c (get_fileinfo): Avoid warning.
3380 * c-ppoutput.c (scan_translation_unit_directives_only): Remove cast.
3381
2004617a
QZ
33822017-12-14 Qing Zhao <qing.zhao@oracle.com>
3383
7365279f 3384 PR middle_end/79538
2004617a
QZ
3385 * c-cppbuiltin.c (builtin_define_with_hex_fp_value):
3386 Adjust the size of buf1 and buf2, add a new buf to avoid
3387 format-overflow warning.
3388
ab20d992 33892017-12-12 Alexandre Oliva <aoliva@redhat.com>
96a95ac1
AO
3390
3391 * c-semantics.c (pop_stmt_list): Move begin stmt marker into
3392 subsequent statement list.
3393
5d9ae53d
MS
33942017-12-07 Martin Sebor <msebor@redhat.com>
3395
3396 PR c/81544
3397 PR c/81566
3398 * c-attribs.c (attr_aligned_exclusions): New array.
3399 (attr_alloc_exclusions, attr_cold_hot_exclusions): Same.
3400 (attr_common_exclusions, attr_const_pure_exclusions): Same.
3401 (attr_gnu_inline_exclusions, attr_inline_exclusions): Same.
3402 (attr_noreturn_exclusions, attr_returns_twice_exclusions): Same.
3403 (attr_warn_unused_result_exclusions): Same.
3404 (handle_hot_attribute, handle_cold_attribute): Simplify.
3405 (handle_const_attribute): Warn on function returning void.
3406 (handle_pure_attribute): Same.
3407 (handle_aligned_attribute): Diagnose conflicting attribute
3408 specifications.
3409 * c-warn.c (diagnose_mismatched_attributes): Simplify.
3410
c79144f8
DM
34112017-12-06 David Malcolm <dmalcolm@redhat.com>
3412
3413 PR c/83236
3414 * c-common.c (selftest::c_family_tests): Call
3415 selftest::c_spellcheck_cc_tests.
3416 * c-common.h (selftest::c_spellcheck_cc_tests): New decl.
3417 * c-spellcheck.cc: Include "selftest.h".
3418 (name_reserved_for_implementation_p): New function.
3419 (should_suggest_as_macro_p): New function.
3420 (find_closest_macro_cpp_cb): Move the check for NT_MACRO to
3421 should_suggest_as_macro_p and call it.
3422 (selftest::test_name_reserved_for_implementation_p): New function.
3423 (selftest::c_spellcheck_cc_tests): New function.
3424 * c-spellcheck.h (name_reserved_for_implementation_p): New decl.
3425
613bc14f
DM
34262017-12-06 David Malcolm <dmalcolm@redhat.com>
3427
3428 * c-spellcheck.cc: New file, taken from macro-handling code in
3429 spellcheck-tree.c.
3430 * c-spellcheck.h: New file, taken from macro-handling code in
3431 spellcheck-tree.h.
3432
e76c7157
JJ
34332017-12-01 Jakub Jelinek <jakub@redhat.com>
3434
3435 * c-attribs.c (c_common_attribute_table): Remove "cilk simd function"
3436 attribute.
3437 (handle_simd_attribute): Don't check for "cilk simd function"
3438 attribute. Reindent, formatting changes.
3439
b0da4034
JK
34402017-11-30 Julia Koval <julia.koval@intel.com>
3441
3442 * c-common.h (inv_list): Remove.
3443
058f0b9e
JJ
34442017-11-28 Jakub Jelinek <jakub@redhat.com>
3445
3446 PR sanitizer/81275
3447 * c-common.c (c_switch_covers_all_cases_p_1,
3448 c_switch_covers_all_cases_p): New functions.
3449 * c-common.h (c_switch_covers_all_cases_p): Declare.
3450
5e9d6aa4 34512017-11-28 Julia Koval <julia.koval@intel.com>
92a285c1 3452 Sebastian Peryt <sebastian.peryt@intel.com>
5e9d6aa4
JK
3453
3454 * array-notation-common.c: Delete.
3455 * c-cilkplus.c: Ditto.
3456 * c-common.c (_Cilk_spawn, _Cilk_sync, _Cilk_for): Remove.
3457 * c-common.def (ARRAY_NOTATION_REF): Remove.
3458 * c-common.h (RID_CILK_SPAWN, build_array_notation_expr,
3459 build_array_notation_ref, C_ORT_CILK, c_check_cilk_loop,
3460 c_validate_cilk_plus_loop, cilkplus_an_parts,
3461 cilk_ignorable_spawn_rhs_op,
3462 cilk_recognize_spawn): Remove.
3463 * c-gimplify.c (CILK_SPAWN_STMT): Remove.
3464 * c-omp.c: Remove CILK_SIMD check.
3465 * c-pragma.c: Ditto.
3466 * c-pragma.h: Remove CILK related pragmas.
3467 * c-pretty-print.c (c_pretty_printer::postfix_expression): Remove
3468 ARRAY_NOTATION_REF condition.
3469 (c_pretty_printer::expression): Ditto.
3470 * c.opt (fcilkplus): Remove.
3471 * cilk.c: Delete.
3472
1af4ebf5
MG
34732017-11-21 Marc Glisse <marc.glisse@inria.fr>
3474
3475 * c-pretty-print.c (pp_c_additive_expression,
3476 c_pretty_printer::expression): Handle POINTER_DIFF_EXPR.
3477
d44ed508
JJ
34782017-11-21 Jakub Jelinek <jakub@redhat.com>
3479
7d2f0f9b
JJ
3480 * c-common.c (get_nonnull_operand): Use tree_to_uhwi.
3481
d44ed508
JJ
3482 PR c++/83059
3483 * c-common.c (get_atomic_generic_size): Use TREE_INT_CST_LOW
3484 instead of tree_to_uhwi, formatting fix.
3485
26edace6
DM
34862017-11-20 David Malcolm <dmalcolm@redhat.com>
3487
3488 PR c/81404
3489 * known-headers.cc: New file, based on material from c/c-decl.c.
3490 (suggest_missing_header): Copied as-is.
3491 (get_stdlib_header_for_name): New, based on get_c_name_hint but
3492 heavily edited to add C++ support. Add some knowledge about
3493 <limits.h>, <stdint.h>, and <wchar.h>.
3494 * known-headers.h: Likewise.
3495
6c7a259b
DM
34962017-11-20 David Malcolm <dmalcolm@redhat.com>
3497
3498 * c-common.h (enum lookup_name_fuzzy_kind): Move to name-hint.h.
3499 (lookup_name_fuzzy): Likewise. Convert return type from
3500 const char * to name_hint. Add location_t param.
3501 * name-hint.h: New header.
3502
f9c59f7e
JJ
35032017-11-19 Jakub Jelinek <jakub@redhat.com>
3504
3505 PR c/66618
3506 PR c/69960
3507 * c-common.h (c_fully_fold): Add LVAL argument defaulted to false.
3508
1e39313a
JM
35092017-11-16 Joseph Myers <joseph@codesourcery.com>
3510
3511 * c.opt (-std=c17, std=gnu17, -std=iso9899:2017): Refer to 2018
3512 expected publication date of C17.
3513 (-std=c18, -std=gnu18, -std=iso9899:2018): New option aliases.
3514
3ca0dc60
JM
35152017-11-15 Joseph Myers <joseph@codesourcery.com>
3516
3517 PR c/81156
3518 * c-common.c (c_common_reswords): Add __builtin_tgmath.
3519 * c-common.h (enum rid): Add RID_BUILTIN_TGMATH.
3520
025d57f0
MS
35212017-11-10 Martin Sebor <msebor@redhat.com>
3522
3523 PR c/81117
3524 * c-common.c (catenate_strings): Use memcpy instead of strncpy.
3525 * c-warn.c (sizeof_pointer_memaccess_warning): Handle arrays.
3526 * c.opt (-Wstringop-truncation): New option.
3527
1b6fa695
ML
35282017-11-06 Martin Liska <mliska@suse.cz>
3529
3530 PR middle-end/82404
3531 * c-opts.c (c_common_post_options): Set -Wreturn-type for C++
3532 FE.
3533 * c.opt: Set default value of warn_return_type.
3534
64a5912c
DM
35352017-10-31 David Malcolm <dmalcolm@redhat.com>
3536
3537 * c-common.c (binary_op_error): Update for renaming of
3538 error_at_rich_loc.
3539 (c_parse_error): Likewise.
3540 * c-warn.c (warn_logical_not_parentheses): Likewise for
3541 renaming of inform_at_rich_loc.
3542 (warn_for_restrict): Likewise for renaming of
3543 warning_at_rich_loc_n.
3544
c76dc9c3
JM
35452017-10-30 Joseph Myers <joseph@codesourcery.com>
3546
3547 * c.opt (std=c17, std=gnu17, std=iso9899:2017): New options.
3548 * c-opts.c (set_std_c17): New function.
3549 (c_common_init_options): Use gnu17 as default C version.
3550 (c_common_handle_option): Handle -std=c17 and -std=gnu17.
3551
ee5fd23a
MM
35522017-10-27 Michael Meissner <meissner@linux.vnet.ibm.com>
3553
3554 * c-cppbuiltin.c (mode_has_fma): Add support for PowerPC KFmode.
3555 (c_cpp_builtins): If a machine has a fast fma _Float<N> and
3556 _Float<N>X variant, define __FP_FAST_FMA<N> and/or
3557 __FP_FAST_FMA<N>X.
3558
d1047465
MP
35592017-10-23 Marek Polacek <polacek@redhat.com>
3560
3561 PR c/82681
3562 * c-warn.c (warnings_for_convert_and_check): Fix typos.
3563
9e878cf1
EB
35642017-10-19 Eric Botcazou <ebotcazou@adacore.com>
3565
3566 * c-common.c (check_builtin_function_arguments): Also check arguments
3567 of __builtin_alloca_with_align_and_max.
3568
89b6abbb
DM
35692017-10-17 David Malcolm <dmalcolm@redhat.com>
3570
3571 * c-format.c (format_warning_at_char): Pass UNKNOWN_LOCATION
3572 rather than NULL to format_warning_va.
3573 (check_format_types): Likewise when calling format_type_warning.
3574 Remove code to extract source_ranges and source_range * in favor
3575 of just a location_t.
3576 (format_type_warning): Convert source_range * param to a
3577 location_t.
3578
39382c09
JJ
35792017-10-13 Jakub Jelinek <jakub@redhat.com>
3580
3581 * c-gimplify.c (c_gimplify_expr): Handle [LR]ROTATE_EXPR like
3582 [LR]SHIFT_EXPR.
3583
62e1c678
DM
35842017-10-12 David Malcolm <dmalcolm@redhat.com>
3585
3586 * c-common.c (enum missing_token_insertion_kind): New enum.
3587 (get_missing_token_insertion_kind): New function.
3588 (maybe_suggest_missing_token_insertion): New function.
3589 * c-common.h (maybe_suggest_missing_token_insertion): New decl.
3590
b90c9338
NS
35912017-10-11 Nathan Sidwell <nathan@acm.org>
3592
3593 * c-opts.c (add_prefixed_path): Change chain to incpath_kind.
3594 (c_common_handle_option): Update incpath_kind names.
3595
3a266bcd
ML
35962017-10-11 Martin Liska <mliska@suse.cz>
3597
3598 PR sanitizer/82490
3599 * c-attribs.c (handle_no_sanitize_attribute): Report directly
3600 Wattributes warning.
3601
8e6cdc90
RS
36022017-10-10 Richard Sandiford <richard.sandiford@linaro.org>
3603
3604 * c-ada-spec.c (dump_generic_ada_node): Use wi::to_wide when
3605 operating on trees as wide_ints.
3606 * c-common.c (pointer_int_sum): Likewise.
3607 * c-pretty-print.c (pp_c_integer_constant): Likewise.
3608 * c-warn.c (match_case_to_enum_1): Likewise.
3609 (c_do_switch_warnings): Likewise.
3610 (maybe_warn_shift_overflow): Likewise.
3611
802b38c9
JJ
36122017-10-10 Jakub Jelinek <jakub@redhat.com>
3613
3614 PR c/82437
3615 * c-warn.c (warn_tautological_bitwise_comparison): Use wi::to_wide
3616 instead of wide_int::from.
3617
4e34b338
JJ
36182017-10-06 Jakub Jelinek <jakub@redhat.com>
3619
3620 PR c/82437
3621 * c-warn.c (warn_tautological_bitwise_comparison): Instead of
3622 using to_widest use wide_int with the larger of the two precisions.
3623
4bc4b2b4
BE
36242017-10-05 Bernd Edlinger <bernd.edlinger@hotmail.de>
3625
3626 * c-pretty-print.c (pp_c_parameter_type_list): Print ... for variadic
3627 functions.
3628
a1488398
RS
36292017-10-02 Richard Sandiford <richard.sandiford@linaro.org>
3630
3631 * c-warn.c (warn_tautological_bitwise_comparison): Use wi::to_widest
3632 when combining the original unconverted comparison operands.
3633
01c9fb68
JJ
36342017-09-29 Jakub Jelinek <jakub@redhat.com>
3635
3636 * c-attribs.c (handle_noipa_attribute): Don't add "stack_protect"
3637 attribute.
3638
6e3e8419
EB
36392017-09-29 Eric Botcazou <ebotcazou@adacore.com>
3640
3641 * c-ada-spec.c (to_ada_name): Add index parameter.
3642 (pp_ada_tree_identifier): Likewise.
3643 (dump_ada_macros): Adjust call to to_ada_name.
3644 (struct overloaded_name_hash): New type.
3645 (struct overloaded_name_hasher): Likewise.
3646 (overloaded_names): New hash table.
3647 (compute_overloading_index): New function.
3648 (dump_ada_decl_name): Call it and pass the result to
3649 pp_ada_tree_identifier.
3650 (dump_ada_double_name): Adjust calls to pp_ada_tree_identifier.
3651 (dump_ada_function_declaration): Likewise.
3652 (dump_generic_ada_node): Likewise.
3653 (print_constructor): Likewise.
3654 (print_destructor): Likewise.
3655 (dump_ada_specs): Delete overloaded_names table.
3656
79310774
EB
36572017-09-29 Eric Botcazou <ebotcazou@adacore.com>
3658
3659 * c-ada-spec.c (max_ada_macros): Move around.
3660 (store_ada_macro_index): Likewise.
3661 (source_file): Rename into...
3662 (macro_source_file): ...this.
3663 (count_ada_macro): Move around.
3664 (store_ada_macro): Likewise.
3665 (compare_macro): Likewise.
3666 (print_ada_macros): Merge in...
3667 (dump_ada_macros): ...this.
3668 (source_file_base): Rename into...
3669 (current_source_file): ...this.
3670 (print_comment): Move around.
3671 (dump_ada_nodes): Call dump_ada_declaration directly.
3672 (struct with): Change type of limited field to bool.
3673 (append_withs): Change type of limited_access parameter to bool.
3674 (pp_ada_tree_identifie): Likewise.
3675 (dump_ada_decl_nam): Likewise.
3676 (dump_generic_ada_node): Likewise. Do not print the return type.
3677 (to_ada_name): Change type of space_found parameter to bool.
3678 (dump_ada_function_declaration): Return void and change type of
3679 parameters to bool. Also print the return type for a function.
3680 (print_ada_methods): Rename into...
3681 (dump_ada_methods): ...this.
3682 (print_ada_declaration): Rename into ...
3683 (dump_ada_declaration): ...this. Do not print the return type.
3684 (print_ada_struct_decl): Rename into...
3685 (dump_ada_struct_decl): ...this.
3686
7d386d45
JJ
36872017-09-29 Jakub Jelinek <jakub@redhat.com>
3688
3689 * c-attribs.c (handle_packed_attribute): Test DECL_C_BIT_FIELD
3690 rather than DECL_INITIAL.
3691 (common_handle_aligned_attribute): Likewise.
3692
ab20d992 36932017-09-20 Alexandre Oliva <aoliva@redhat.com>
9ed32e27
AO
3694
3695 * c.opt (gen-decls): Add RejectNegative.
3696
026a79f7
AS
36972017-09-15 Andrew Sutton <andrew.n.sutton@gmail.com>
3698 Jakub Jelinek <jakub@redhat.com>
3699
3700 Add support for -std=c++2a.
3701 * c-common.h (cxx_dialect): Add cxx2a as a dialect.
3702 * opt.c: Add options for -std=c++2a and -std=gnu++2a.
3703 * c-opts.c (set_std_cxx2a): New.
3704 (c_common_handle_option): Set options when -std=c++2a is enabled.
3705 (c_common_post_options): Adjust comments.
3706 (set_std_cxx14, set_std_cxx17): Likewise.
3707
4a8ca690
EB
37082017-09-15 Eric Botcazou <ebotcazou@adacore.com>
3709
3710 * c-pragma.c (handle_pragma_scalar_storage_order): Expand on error
3711 message for non-uniform endianness and issue a warning in C++.
3712
7b936140
JJ
37132017-09-15 Jakub Jelinek <jakub@redhat.com>
3714
3715 * c.opt (Wc++1z-compat): Change from option to undocumented alias.
3716 (Wc++17-compat): Change from undocumented alias to option.
3717 (Wnoexcept-type): Enable by Wc++17-compat instead of Wc++1z-compat,
3718 change C++1z to C++17 in description.
3719 (std=c++1z, std=gnu++1z): Change from option to undocumented
3720 deprecated alias.
3721 (std=c++17, std=gnu++17): Change from undocumented alias to option.
3722 Adjust description.
3723 * c-common.h (enum cxx_dialect): Rename cxx1z to cxx17.
3724 * c-opts.c (set_std_cxx1z): Rename to ...
3725 (set_std_cxx17): ... this.
3726 (c_common_handle_option): Rename OPT_std_c__1z to OPT_std_c__17
3727 and OPT_std_gnu__1z to OPT_std_gnu__17. Adjust set_std_cxx1z
7365279f 3728 caller.
7b936140
JJ
3729 (c_common_post_options): Use cxx17 instead of cxx1z. Adjust
3730 comments.
3731
12263f13
L
37322017-09-12 H.J. Lu <hongjiu.lu@intel.com>
3733
3734 * c-attribs.c (common_handle_aligned_attribute): Don't warn
3735 function alignment if warn_if_not_aligned_p is true.
3736
6836632e
NS
37372017-09-12 Nathan Sidwell <nathan@acm.org>
3738
3739 * c-common.c (field_decl_cmp, resort_data, resort_field_decl_cmp,
3740 resort_sorted_fields): Move to c/c-decl.c.
3741 * c-common.h (field_decl_cmp, resort_sorted_fields): Delete.
3742 (struct sorted_fields_type): Move to c/c-lang.h.
3743
019bf9ad
JW
37442017-09-09 Jonathan Wakely <jwakely@redhat.com>
3745
3746 PR c++/81852
3747 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_threadsafe_static_init.
3748
bc7fe952
MP
37492017-09-04 Marek Polacek <polacek@redhat.com>
3750
3751 PR c/81783
3752 * c-warn.c (warn_tautological_bitwise_comparison): New function.
3753 (warn_tautological_cmp): Call it.
3754
ab20d992 37552017-09-01 Boris Kolpackov <boris@codesynthesis.com>
de7c2c6a
BK
3756
3757 * c-opts.c (c_common_finish): Write dependency information even if
3758 there are errors.
3759
d2e05fcb
JJ
37602017-09-01 Jakub Jelinek <jakub@redhat.com>
3761
3762 PR c/81887
3763 * c-pragma.c (omp_pragmas): Move "ordered" entry from here to ...
3764 (omp_pragmas_simd): ... here.
3765 * c-omp.c (c_finish_omp_ordered): If clauses isn't simd clause alone,
3766 create new clauses list containing just simd clause.
3767
18e2a8b8
RS
37682017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
3769 Alan Hayward <alan.hayward@arm.com>
3770 David Sherwood <david.sherwood@arm.com>
3771
3772 * c-attribs.c (vector_mode_valid_p) Fold GET_MODE_INNER call
3773 into scalar_mode_supported_p call.
3774 (handle_mode_attribute): Update call to scalar_mode_supported_p.
3775
16d22000
RS
37762017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
3777 Alan Hayward <alan.hayward@arm.com>
3778 David Sherwood <david.sherwood@arm.com>
3779
3780 * c-common.c (c_common_fixed_point_type_for_size): Use opt_scalar_mode
3781 for the mode iterator.
3782
b397965c
RS
37832017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
3784 Alan Hayward <alan.hayward@arm.com>
3785 David Sherwood <david.sherwood@arm.com>
3786
3787 * c-lex.c (interpret_fixed): Use SCALAR_TYPE_MODE.
3788 * c-common.c (c_build_vec_perm_expr): Likewise.
3789
357b7604
RS
37902017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
3791 Alan Hayward <alan.hayward@arm.com>
3792 David Sherwood <david.sherwood@arm.com>
3793
3794 * c-common.c (c_common_type_for_mode): Use as_a <scalar_int_mode>.
3795
e05c94ba
RS
37962017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
3797 Alan Hayward <alan.hayward@arm.com>
3798 David Sherwood <david.sherwood@arm.com>
3799
3800 * c-attribs.c (handle_mode_attribute): Check for a scalar_int_mode
3801 before calling targetm.addr_space.valid_pointer_mode.
3802
5c20c4af
RS
38032017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
3804 Alan Hayward <alan.hayward@arm.com>
3805 David Sherwood <david.sherwood@arm.com>
3806
3807 * c-cppbuiltin.c (c_cpp_builtins): Use opt_scalar_float_mode.
3808
c94843d2 38092017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
92a285c1
ML
3810 Alan Hayward <alan.hayward@arm.com>
3811 David Sherwood <david.sherwood@arm.com>
c94843d2
RS
3812
3813 * c-common.c (c_common_fixed_point_type_for_size): Use new mode
3814 iterators.
3815 * c-cppbuiltin.c (c_cpp_builtins): Likewise.
3816
4e10a5a7
RS
38172017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
3818 Alan Hayward <alan.hayward@arm.com>
3819 David Sherwood <david.sherwood@arm.com>
3820
3821 * c-cppbuiltin.c (mode_has_fma): Prefix mode names with E_ in
3822 case statements.
3823
130fcab0
ML
38242017-08-29 Martin Liska <mliska@suse.cz>
3825
3826 PR other/39851
3827 * c-common.c (parse_optimize_options): Add argument to function
3828 call.
3829 * c-pragma.c (handle_pragma_diagnostic): Likewise.
3830
14e18d71
DM
38312017-08-24 David Malcolm <dmalcolm@redhat.com>
3832
3833 * c-lex.c (interpret_float): Use token location
3834 when building an EXCESS_PRECISION_EXPR.
3835
2f687306
DM
38362017-08-21 David Malcolm <dmalcolm@redhat.com>
3837
3838 * c-common.c (check_function_arguments): Add "arglogs" param; pass
3839 it to check_function_format.
3840 * c-common.h (check_function_arguments): Add vec<location_t> *
3841 param.
3842 (check_function_format): Likewise.
3843 * c-format.c (struct format_check_context): Add field "arglocs".
3844 (check_function_format): Add param "arglocs"; pass it to
3845 check_format_info.
ab20d992 3846 (check_format_info): Add param "arglocs"; use it to initialize
2f687306
DM
3847 new field of format_ctx.
3848 (check_format_arg): Pass format_ctx->arglocs to new param of
3849 check_format_info_main.
3850 (class argument_parser): New field "arglocs".
3851 (argument_parser::argument_parser): Add "arglocs_" param and use
3852 it to initialize new field.
3853 (argument_parser::check_argument_type): Pass new arglocs field to
3854 check_format_types.
3855 (check_format_info_main): Add param "arglocs", and use it when
3856 constructing arg_parser.
3857 (check_format_types): Add param "arglocs"; use it if non-NULL when
3858 !EXPR_HAS_LOCATION (cur_param) to get at location information.
3859
00aa1fa2
L
38602017-08-18 H.J. Lu <hongjiu.lu@intel.com>
3861
3862 PR c/53037
3863 * c-attribs.c (handle_warn_if_not_aligned_attribute): New.
3864 (c_common_attribute_table): Add warn_if_not_aligned.
3865 (handle_aligned_attribute): Renamed to ...
3866 (common_handle_aligned_attribute): Remove argument, name, and add
3867 argument, warn_if_not_aligned. Handle warn_if_not_aligned.
3868 (handle_aligned_attribute): New.
3869 * c.opt: Add -Wif-not-aligned and -Wpacked-not-aligned.
3870
27be025d
MS
38712017-08-14 Martin Sebor <msebor@redhat.com>
3872
3873 PR c/81117
3874 * c-attribs.c (c_common_attribute_table): Add nonstring entry.
3875 (handle_nonstring_attribute): New function.
3876
da67acb9
MS
38772017-08-14 Martin Sebor <msebor@redhat.com>
3878
3879 PR c/81117
3880 * c-format.h (T89_G): New macro.
3881 * c-format.c (local_gcall_ptr_node): New variable.
3882 (init_dynamic_diag_info): Initialize it.
3883
a8b522b4
ML
38842017-08-11 Martin Liska <mliska@suse.cz>
3885
3886 * c-opts.c (c_common_post_options): Replace ASM_OUTPUT_DEF with
3887 TARGET_SUPPORTS_ALIASES.
3888
32129a17
DM
38892017-08-10 David Malcolm <dmalcolm@redhat.com>
3890
3891 * c-common.c (c_parse_error): Add rich_location * param, using it
3892 rather implicitly using input_location.
3893 * c-common.h (c_parse_error): Add rich_location * param.
3894
30af3a2b
MP
38952017-08-09 Marek Polacek <polacek@redhat.com>
3896
3897 * c-common.c (pointer_int_sum): Use true/false instead of 1/0.
3898 (c_common_truthvalue_conversion): Likewise.
3899 * c-omp.c (c_finish_omp_atomic): Likewise.
3900 * c-common.h (build_binary_op): Update declaration.
3901
314e6352
ML
39022017-08-08 Martin Liska <mliska@suse.cz>
3903
3904 * c-ada-spec.c: Include header files.
3905 * c-ubsan.c: Likewise.
3906 * c-warn.c: Likewise.
3907
56b5041c
JJ
39082017-08-07 Jakub Jelinek <jakub@redhat.com>
3909
3910 PR c/69389
3911 * c-omp.c (c_finish_omp_atomic): Handle atomics on bitfields.
3912
db440138
EB
39132017-08-07 Eric Botcazou <ebotcazou@adacore.com>
3914
3915 * c-ada-spec.c (has_nontrivial_methods): Test for FUNCTION_DECL.
3916 (print_ada_methods): Likewise.
3917 (print_ada_declaration): Likewise.
3918
577eec56
ML
39192017-08-07 Martin Liska <mliska@suse.cz>
3920
3921 * array-notation-common.c: Add new includes.
3922 * c-format.c( handle_format_attribute): Canonicalize a format
3923 function name.
3924 * c-lex.c (c_common_has_attribute): Canonicalize name of an
3925 attribute.
3926 * c-pretty-print.c: Add new include.
3927
b854df3c
EB
39282017-08-05 Eric Botcazou <ebotcazou@adacore.com>
3929
3930 * c-ada-spec.c (has_static_fields): Look only into variables.
3931 (print_constructor): Add TYPE parameter and use it for the name.
3932 (print_destructor): Likewise.
3933 (print_ada_declaration): Adjust to new constructor/destructor names.
3934 Adjust calls to print_constructor and print_destructor.
3935 (print_ada_struct_decl): Do not test TREE_STATIC on FIELD_DECL.
3936 Look only into variables in the final loop.
3937
9f2cb25e
EB
39382017-08-01 Eric Botcazou <ebotcazou@adacore.com>
3939
3940 * c-ada-spec.c (has_static_fields): Look only into fields.
3941 (dump_generic_ada_node): Small tweak.
3942 (dump_nested_types): Look only into fields.
3943 (print_ada_declaration): Look only into methods. Small tweak.
3944 (print_ada_struct_decl): Look only into fields. Use DECL_VIRTUAL_P.
3945
f4bcd9eb
EB
39462017-08-01 Eric Botcazou <ebotcazou@adacore.com>
3947
3948 * c-ada-spec.c (print_generic_ada_decl): Pass correctly-typed constant.
3949 (dump_ada_function_declaration): Likewise.
3950 (dump_generic_ada_node): Likewise.
3951 (print_ada_declaration): Add support for const-qualified variables.
3952
f34ebeb2
ML
39532017-07-31 Martin Liska <mliska@suse.cz>
3954
3955 PR sanitize/81530
3956 * c-ubsan.c (ubsan_maybe_instrument_array_ref):
3957 Guard condition with flag_sanitize_p also with current_function_decl
3958 non-null equality.
3959 (ubsan_maybe_instrument_reference_or_call): Likewise.
3960
218e5d04
UB
39612017-07-30 Uros Bizjak <ubizjak@gmail.com>
3962
3963 * c-format.c (asm_fprintf_char_table): Add 'z' to format_chars.
3964
942047f2
EB
39652017-07-29 Eric Botcazou <ebotcazou@adacore.com>
3966
3967 * c-ada-spec.c (dump_generic_ada_node): Take into account signedness
3968 for enumeral types.
3969 (print_ada_declaration): Add missing guard for record types.
3970
a40ff0ae
JJ
39712017-07-27 Jakub Jelinek <jakub@redhat.com>
3972
3973 PR c/45784
3974 * c-omp.c (c_finish_omp_for): If the condition is wrapped in
3975 rhs of COMPOUND_EXPR(s), skip them and readd their lhs into
3976 new COMPOUND_EXPRs around the rhs of the comparison.
3977
06bd22f6
MP
39782017-07-27 Marek Polacek <polacek@redhat.com>
3979
3980 PR c/81417
3981 * c-warn.c (warn_for_sign_compare): Tweak the warning message. Print
3982 the types.
3983
036ea399
JJ
39842017-07-27 Jakub Jelinek <jakub@redhat.com>
3985
3986 * c-attribs.c (c_common_attribute_table): Add noipa attribute.
3987 (handle_noipa_attribute): New function.
3988
417ca011
TD
39892017-07-07 Torsten Duwe <duwe@suse.de>
3990
3991 * c-attribs.c (c_common_attribute_table): Add entry for
3992 "patchable_function_entry".
3993
5aaa8fb4
NS
39942017-07-20 Nathan Sidwell <nathan@acm.org>
3995
3996 Remove TYPE_METHODS.
3997 * c-ada-spec.c (is_tagged_type, has_nontrivial_methods,
3998 dump_ada_template, print_ada_methods,
3999 print_ada_declaration): Member fns are on TYPE_FIELDS.
4000
ff22eb12
NS
40012017-07-18 Nathan Sidwell <nathan@acm.org>
4002
4003 * c-warn.c (warn_for_memset): Use TYPE_{MIN,MAX}_VALUE.
4004
eea77d1f
DM
40052017-07-14 David Malcolm <dmalcolm@redhat.com>
4006
4007 * c-common.c (try_to_locate_new_include_insertion_point): New
4008 function.
4009 (per_file_includes_t): New typedef.
4010 (added_includes_t): New typedef.
4011 (added_includes): New variable.
4012 (maybe_add_include_fixit): New function.
4013 * c-common.h (maybe_add_include_fixit): New decl.
4014
281ac396
MS
40152017-07-10 Martin Sebor <msebor@redhat.com>
4016
4017 PR other/81345
4018 * c.opt (-Wstringop-overflow): Set defaults in LangEnabledBy.
4019
b6f43128
DM
40202017-07-06 David Malcolm <dmalcolm@redhat.com>
4021
4022 * c-common.c (selftest::c_family_tests): New.
4023 * c-common.h (selftest::run_c_tests): Move decl to c/c-lang.h.
4024 (selftest::c_family_tests): New decl.
4025
efbf55b0
MP
40262017-07-04 Marek Polacek <polacek@redhat.com>
4027
4028 PR c/81231
4029 * c-common.c (sync_resolve_size): Give error for pointers to incomplete
4030 types.
4031
6c86bd88
MP
40322017-07-04 Marek Polacek <polacek@redhat.com>
4033
4034 * c-warn.c (warn_if_unused_value): Remove WITH_CLEANUP_EXPR handling.
4035
17a7218b
ML
40362017-06-28 Martin Liska <mliska@suse.cz>
4037
4038 PR ipa/81128
4039 * c-attribs.c (handle_alias_ifunc_attribute): Append ifunc alias
4040 to a function declaration.
4041
63010089
ML
40422017-06-28 Martin Liska <mliska@suse.cz>
4043
4044 PR driver/79659
4045 * c.opt: Add IntegerRange to various options.
4046
3e2becc4
MP
40472017-06-26 Marek Polacek <polacek@redhat.com>
4048
4049 PR c/80116
4050 * c-common.h (warn_for_multistatement_macros): Declare.
4051 * c-warn.c: Include "c-family/c-indentation.h".
4052 (warn_for_multistatement_macros): New function.
4053 * c.opt (Wmultistatement-macros): New option.
4054 * c-indentation.c (guard_tinfo_to_string): No longer static.
4055 Change the parameter type to "enum rid". Handle RID_SWITCH.
4056 * c-indentation.h (guard_tinfo_to_string): Declare.
4057
2db9b7cd
MG
40582017-06-23 Marc Glisse <marc.glisse@inria.fr>
4059
4060 * c-common.c (c_common_nodes_and_builtins): Use builtin_structptr_types.
4061
c3684b7b
MS
40622017-06-15 Martin Sebor <msebor@redhat.com>
4063
4064 PR c++/80560
4065 * c.opt (-Wclass-memaccess): New option.
4066
e72c4afd
BK
40672017-06-14 Boris Kolpackov <boris@codesynthesis.com>
4068
4069 * c-opts.c (c_common_finish): Handle '-' special value to -MF.
4070
8a516588
MP
40712017-06-13 Marek Polacek <polacek@redhat.com>
4072
4073 PR objc/80949
4074 * c-warn.c (do_warn_duplicated_branches): Return if any of the
4075 branches is null.
4076
45b2222a
ML
40772017-06-13 Martin Liska <mliska@suse.cz>
4078
4079 PR sanitize/78204
4080 * c-attribs.c (add_no_sanitize_value): New function.
4081 (handle_no_sanitize_attribute): Likewise.
4082 (handle_no_sanitize_address_attribute): Use the function.
4083 (handle_no_sanitize_thread_attribute): New function.
4084 (handle_no_address_safety_analysis_attribute): Use
4085 add_no_sanitize_value.
4086 (handle_no_sanitize_undefined_attribute): Likewise.
4087 * c-common.h: Declare new functions.
4088 * c-ubsan.c (ubsan_instrument_division): Use sanitize_flags_p.
4089 (ubsan_instrument_shift): Likewise.
4090 (ubsan_instrument_bounds): Likewise.
4091 (ubsan_maybe_instrument_array_ref): Likewise.
4092 (ubsan_maybe_instrument_reference_or_call): Likewise.
4093
a01f151f
JM
40942017-06-11 Jason Merrill <jason@redhat.com>
4095
4096 * c-ada-spec.c, c-pragma.c: Use id_equal.
4097
3de4ac6d
MP
40982017-06-04 Marek Polacek <polacek@redhat.com>
4099
4100 PR c/80919
4101 * c-format.c (matching_type_p): Return false if any of the types
4102 requires structural equality.
4103
2474f48f
MS
41042017-06-02 Martin Sebor <msebor@redhat.com>
4105
4106 PR c/80892
4107 * c-warn.c (conversion_warning): Use -Wconversion for integer
4108 conversion and -Wfloat-conversion for floating one.
4109
40ffd95f
BE
41102017-06-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
4111
4112 * c.opt (Wsizeof-pointer-div): New warning option.
4113
3fa4634c
VR
41142017-06-01 Volker Reichelt <v.reichelt@netcologne.de>
4115
4116 * c.opt (Wcatch-value): New shortcut for Wcatch-value=1.
4117 (Wcatch-value=1): Enable by -Wall.
4118
f012c8ef
DM
41192017-05-30 David Malcolm <dmalcolm@redhat.com>
4120
4121 * c-format.c (gcc_cxxdiag_char_table): Add 'H' and 'I' to
4122 format_chars.
4123 * c.opt (fdiagnostics-show-template-tree): New option.
4124 (felide-type): New option.
4125
63dbcd13
VR
41262017-05-25 Volker Reichelt <v.reichelt@netcologne.de>
4127
4128 * c.opt (Wcatch-value=): New C++ warning flag.
4129
be136b5c
NS
41302017-05-24 Nathan Sidwell <nathan@acm.org>
4131
4132 * c=common.c (field_decl_cmp, resort_field_decl_cmp): Adjust T
4133 const casts to avoid warning.
4134
3cd211af
MS
41352017-05-24 Martin Sebor <msebor@redhat.com>
4136
4137 PR c/80731
4138 * c-common.h (unsafe_conversion_p): Add a function argument.
4139 * c-common.c (unsafe_conversion_p): Same.
4140 Add type names and values to diagnostics.
4141 (scalar_to_vector): Adjust.
4142 * c-warn.c (constant_expression_error): Add a function argument.
4143 Add type names and values to diagnostics.
4144 (conversion_warning): Add a function argument.
4145 Add type names and values to diagnostics.
4146 (warnings_for_convert_and_check): Same.
4147
1ff7be5a
JM
41482017-05-19 Jason Merrill <jason@redhat.com>
4149
4150 * c-warn.c (match_case_to_enum_1): Don't warn about enums with no
4151 enumerators.
4152
ff502317
BE
41532017-05-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
4154
4155 * c-format.c (locus): Move out of function scope,
4156 add GTY attribute.
4157
2a8a8d7b
NS
41582017-05-19 Nathan Sidwell <nathan@acm.org>
4159
4160 * c-opts.c (class_dump_file, class_dump_flags): Delete.
4161 (c_common_parse_file): Remove class dump handling.
4162 (get_dump_info): Likewise.
4163
39aac208
RB
41642017-05-19 Richard Biener <rguenther@suse.de>
4165
4166 PR c++/80593
4167 * c-warn.c (strict_aliasing_warning): Do not warn for accesses
4168 to alias-set zero memory.
4169
6ecd2339
BE
41702017-05-18 Bernd Edlinger <bernd.edlinger@hotmail.de>
4171
4172 * c-format.c (local_tree_type_node): Add GTY attribute.
4173
6574d78e
MP
41742017-05-18 Marek Polacek <polacek@redhat.com>
4175
4176 * c-common.c (c_common_type_for_size): Use NULL_TREE instead of 0.
4177 (c_common_fixed_point_type_for_size): Likewise.
4178 (c_common_type_for_mode): Likewise.
4179 (shorten_compare): Likewise.
4180 (c_promoting_integer_type_p): Use false/true instead of 0/1.
4181 * c-pragma.c (maybe_apply_renaming_pragma): Use NULL_TREE instead of 0.
4182
e3455240
MP
41832017-05-18 Marek Polacek <polacek@redhat.com>
4184
4185 * c-common.c (self_promoting_args_p): Change the return type to bool.
4186 Use false/true instead of 0/1.
4187 * c-common.h (self_promoting_args_p): Update.
4188
3fa8871b
MP
41892017-05-17 Marek Polacek <polacek@redhat.com>
4190
4191 * c-common.c: Use NULL_TREE instead of 0 where appropriate.
4192 * c-warn.c: Likewise.
4193
b42cc3ca
VV
41942017-05-17 Ville Voutilainen <ville.voutilainen@gmail.com>
4195
4196 Implement new C++ intrinsics __is_assignable and __is_constructible.
4197 * c-common.c (__is_assignable, __is_constructible): New.
4198 * c-common.h (RID_IS_ASSIGNABLE, RID_IS_CONSTRUCTIBLE): Likewise.
4199
1a817418
ML
42002017-05-17 Martin Liska <mliska@suse.cz>
4201
4202 * c-common.h: Introduce dump_flags_t type and
4203 use it instead of int type.
4204 * c-gimplify.c (c_genericize): Likewise.
4205 * c-opts.c: Likewise.
4206
b2fa0a8b
MP
42072017-05-17 Marek Polacek <polacek@redhat.com>
4208
4209 * c-common.c (c_save_expr): Remove.
4210 (c_common_truthvalue_conversion): Remove a call to c_save_expr.
4211 * c-common.h (c_save_expr): Remove declaration.
4212
31c2d57d
VR
42132017-05-09 Volker Reichelt <v.reichelt@netcologne.de>
4214
4215 PR c/35441
4216 * c-pretty-print.c (c_pretty_printer::expression): Handle MAX_EXPR,
4217 MIN_EXPR, EXACT_DIV_EXPR, RDIV_EXPR, LROTATE_EXPR, RROTATE_EXPR.
4218 (c_pretty_printer::postfix_expression): Handle MAX_EXPR, MIN_EXPR.
4219 (c_pretty_printer::multiplicative_expression): Handle EXACT_DIV_EXPR,
4220 RDIV_EXPR.
4221 (pp_c_shift_expression): Handle LROTATE_EXPR, RROTATE_EXPR.
4222
684f84de
MP
42232017-05-09 Marek Polacek <polacek@redhat.com>
4224
4225 PR c/80525
4226 * c-warn.c (unwrap_c_maybe_const): New.
4227 (warn_logical_operator): Call it.
4228
641da50a
NS
42292017-05-09 Nathan Sidwell <nathan@acm.org>
4230
4231 * c-common.c (c_register_builtin_type): Use pushdecl lang_hook.
4232 * c-common.h (pushdecl_top_level, pushdecl): Don't declare here.
4233
631238ac
MS
42342017-05-08 Martin Sebor <msebor@redhat.com>
4235
4236 PR translation/80280
4237 * c-format.h (struct format_flag_spec): Add new member.
4238 (T89_T): New macro.
4239 * c-format.c (local_tree_type_node): New global.
4240 (printf_flag_specs, asm_fprintf_flag_spec): Initialize new data.
4241 (gcc_diag_flag_specs, scanf_flag_specs, strftime_flag_specs): Ditto.
4242 (strfmon_flag_specs): Likewise.
4243 (gcc_diag_char_table, gcc_cdiag_char_table): Split up specifiers
4244 with distinct quoting properties.
4245 (gcc_tdiag_char_table, gcc_cxxdiag_char_table): Same.
4246 (flag_chars_t::validate): Add argument and handle bad quoting.
4247 (check_format_info_main): Handle quoting problems.
4248 (init_dynamic_diag_info): Simplify.
4249
49f0c04c
JM
42502017-05-08 Jason Merrill <jason@redhat.com>
4251
4252 * c-opts.c (c_common_post_options): Update defaults for
4253 flag_abi_version and flag_abi_compat_version.
4254
56d35585
DM
42552017-05-05 David Malcolm <dmalcolm@redhat.com>
4256
4257 * c-common.c (c_cpp_error): Replace report_diagnostic
4258 with diagnostic_report_diagnostic.
4259
0f2c4a8f
MS
42602017-05-04 Martin Sebor <msebor@redhat.com>
4261
4262 PR translation/80280
4263 * c-attribs.c (handle_alias_ifunc_attribute): Quote a %D directive.
4264 (handle_weakref_attribute): Same.
4265
6fe63fb4
NS
42662017-05-03 Nathan Sidwell <nathan@acm.org>
4267
4268 Canonicalize canonical type hashing
4269 * c-common.c (complete_array_type): Use type_hash_canon.
4270
815d9cc6
XR
42712017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn>
4272
92a285c1 4273 PR c++/80038
815d9cc6
XR
4274 * c-common.h (cilk_gimplify_call_params_in_spawned_fn): Remove
4275 prototype.
4276 (cilk_install_body_pedigree_operations): Likewise.
4277 * cilk.c (cilk_set_spawn_marker): Mark functions that should be
4278 detatched.
4279 (cilk_gimplify_call_params_in_spawned_fn): Remove.
4280 (cilk_install_body_pedigree_operations): Likewise.
4281 (gimplify_cilk_spawn): Add EXPR_STMT and CLEANUP_POINT_EXPR
4282 unwrapping.
4283
f8a36447
JJ
42842017-04-27 Jakub Jelinek <jakub@redhat.com>
4285
4286 PR c++/80534
4287 * c-common.c (complete_array_type): Only hash TYPE_TYPELESS_STORAGE
4288 flag on non-aggregate element types.
4289
7c145456
BE
42902017-04-25 Bernd Edlinger <bernd.edlinger@hotmail.de>
4291
4292 * c-common.c (c_type_hasher, type_hash_table): Remove.
4293 (c_common_get_alias_set): Remove unreachable code.
4294 * c-opts.c (c_common_post_options): Make sure cc1 takes only one file.
4295
c3cbcd45
VR
42962017-04-20 Volker Reichelt <v.reichelt@netcologne.de>
4297
4298 * c.opt (Wextra-semi): New C++ warning flag.
4299
8a59d466
JJ
43002017-04-20 Jakub Jelinek <jakub@redhat.com>
4301
4302 PR middle-end/80423
4303 * c-common.c (complete_array_type): Preserve TYPE_TYPELESS_STORAGE.
4304
8487c9a5
JJ
43052017-04-18 Jakub Jelinek <jakub@redhat.com>
4306
4307 PR middle-end/79788
4308 PR middle-end/80375
4309 * c-common.c (c_common_type_for_mode): Don't handle
4310 widest_*_literal_type_node here.
4311 c_common_signed_or_unsigned_type): Likewise.
4312 (c_common_nodes_and_builtins): Set widest_*_literal_type_node
4313 to *intTI_type_node or *intDI_type_node depending on whether
4314 TImode is supported by the target or not.
4315
3ee0fb02
ML
43162017-04-10 Martin Liska <mliska@suse.cz>
4317
4318 PR sanitizer/80350
4319 * c-ubsan.c (ubsan_instrument_shift): Evaluate RHS before
4320 doing an UBSAN check.
4321
5764ee3c
JW
43222017-04-03 Jonathan Wakely <jwakely@redhat.com>
4323
4324 * c-warn.c (do_warn_double_promotion): Fix typo in comment.
4325
6f3af356
JJ
43262017-03-31 Jakub Jelinek <jakub@redhat.com>
4327
4328 PR c++/79572
4329 * c-ubsan.h (ubsan_maybe_instrument_reference): Change argument to
4330 tree *.
4331 * c-ubsan.c (ubsan_maybe_instrument_reference): Likewise. Handle
4332 not just NOP_EXPR to REFERENCE_TYPE, but also INTEGER_CST with
4333 REFERENCE_TYPE.
4334
f6a7a9d5
DM
43352017-03-31 David Malcolm <dmalcolm@redhat.com>
4336
4337 PR documentation/78732
4338 * c.opt (Wendif-labels): Fix description to refer to
4339 #else rather than #elif.
4340
af88f557
JJ
43412017-03-31 Jakub Jelinek <jakub@redhat.com>
4342
4343 PR libstdc++/80251
4344 * c-common.h (enum rid): Add RID_IS_AGGREGATE.
4345 * c-common.c (c_common_reswords): Add __is_aggregate trait.
4346
a9e4a1a5
JJ
43472017-03-27 Jakub Jelinek <jakub@redhat.com>
4348
4349 PR middle-end/80162
4350 * c-common.c (c_common_mark_addressable_vec): Don't set
4351 TREE_ADDRESSABLE on DECL_HARD_REGISTER.
4352
3f01b620
MS
43532017-03-21 Martin Sebor <msebor@redhat.com>
4354
4355 PR c++/79548
4356 * c-common.c (set_underlying_type): Mark type used only when
4357 original del is declared unused.
4358
2f6f187a
DM
43592017-03-10 David Malcolm <dmalcolm@redhat.com>
4360
4361 PR translation/79848
4362 * c-format.c (check_format_string): Simplify uses of "%<%s%>" to
4363 "%qs".
4364
a02fa805
DM
43652017-03-10 David Malcolm <dmalcolm@redhat.com>
4366
4367 PR c/79921
4368 * c-indentation.c (warn_for_misleading_indentation): Remove parens
4369 from inform's message, so that xgettext can locate it.
4370
822a132c
MP
43712017-03-09 Marek Polacek <polacek@redhat.com>
4372
4373 PR c++/79962
4374 PR c++/79984
4375 * c-attribs.c (handle_nonnull_attribute): Save the result of default
4376 conversion to the attribute list.
4377
bba81f1c
ML
43782017-03-09 Martin Liska <mliska@suse.cz>
4379
4380 * c-ada-spec.c (macro_length): Increment value instead of a pointer.
4381
108154ff
JM
43822017-03-03 Jason Merrill <jason@redhat.com>
4383
4384 * c.opt (Wnoexcept-type): New.
4385
eb0e7c34
RB
43862017-03-02 Richard Biener <rguenther@suse.de>
4387
4388 PR c/79756
4389 * c-common.c (c_common_mark_addressable_vec): Look through
4390 C_MAYBE_CONST_EXPR.
4391
9453ba0a
ML
43922017-02-28 Martin Liska <mliska@suse.cz>
4393
4394 * c.opt: Replace space with tabular for options of <number>
4395 type.
4396
6a825afe
ML
43972017-02-28 Martin Liska <mliska@suse.cz>
4398
4399 * c.opt: Fix --help=option -Q for options which are of
4400 an enum type.
4401
4227c9ad
JJ
44022017-02-24 Jakub Jelinek <jakub@redhat.com>
4403
4404 PR c++/79588
4405 * c-common.c (check_function_restrict): New function.
4406 (check_function_arguments): Add FNDECL argument. Call
4407 check_function_restrict if -Wrestrict.
4408 * c-warn.c (warn_for_restrict): Remove ARGS argument, add ARGARRAY
4409 and NARGS. Use auto_vec for ARG_POSITIONS, simplify.
4410 * c-common.h (check_function_arguments): Add FNDECL argument.
4411 (warn_for_restrict): Remove ARGS argument, add ARGARRAY and NARGS.
4412
59909673
EB
44132017-02-24 Eric Botcazou <ebotcazou@adacore.com>
4414
4415 * c-ada-spec.c (dump_ada_function_declaration): Add comment about the
4416 treatment of parameters with pointer-to-tagged type and tidy up.
4417 (print_ada_methods): Remove the special treatment of C++ static member
4418 functions.
4419
54dcd526
ML
44202017-02-22 Martin Liska <mliska@suse.cz>
4421
4422 * c.opt: Replace inequality signs with square brackets
4423 for -Wnornalized.
4424
00bc9de3
JJ
44252017-02-21 Jakub Jelinek <jakub@redhat.com>
4426
4427 PR c++/79641
4428 * c-attribs.c (handle_mode_attribute): Use build_qualified_type to
4429 preserve quals.
4430
97fcf744
JM
44312017-02-17 Joseph Myers <joseph@codesourcery.com>
4432
4433 * c-cppbuiltin.c (builtin_define_float_constants): Define
4434 __DECIMAL_DIG__ to the value for long double.
4435
c7545f1c
MP
44362017-02-15 Marek Polacek <polacek@redhat.com>
4437
4438 PR c/79515
4439 * c-warn.c (do_warn_double_promotion): Don't warn if an invalid
4440 conversion has occured.
4441
c2e84327
DM
44422017-01-24 David Malcolm <dmalcolm@redhat.com>
4443
4444 * c-common.c (c_common_reswords): Add "__RTL".
4445 * c-common.h (enum rid): Add RID_RTL.
4446
2ebd93e1
MP
44472017-01-20 Marek Polacek <polacek@redhat.com>
4448
4449 PR c/64279
4450 * c-common.h (do_warn_duplicated_branches_r): Declare.
4451 * c-gimplify.c (c_genericize): Walk the function tree calling
4452 do_warn_duplicated_branches_r.
4453 * c-warn.c (expr_from_macro_expansion_r): New.
4454 (do_warn_duplicated_branches): New.
4455 (do_warn_duplicated_branches_r): New.
4456 * c.opt (Wduplicated-branches): New option.
4457
0d80ab91
DM
44582017-01-17 David Malcolm <dmalcolm@redhat.com>
4459
4460 PR c++/71497
4461 * c-indentation.c (warn_for_misleading_indentation): Use the past
4462 subjunctive in the note.
4463
7f991c36
AH
44642017-01-17 Aldy Hernandez <aldyh@redhat.com>
4465
4466 PR c/79116
4467 * array-notation-common.c (cilkplus_extract_an_triplets): Convert
4468 start type to integer_type.
4469
1c70261c
JJ
44702017-01-16 Jakub Jelinek <jakub@redhat.com>
4471
4472 PR driver/49726
4473 * c.opt (gen-decls): Add Driver flag.
4474
1ddca3f3
PC
44752017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
4476
4477 Revert:
4478 2017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
4479
4480 PR c++/71737
4481 * c-common.c (set_underlying_type): Always set DECL_ORIGINAL_TYPE.
4482
7d2f3f1d
PC
44832017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
4484
4485 PR c++/71737
4486 * c-common.c (set_underlying_type): Always set DECL_ORIGINAL_TYPE.
4487
bce6f760
MS
44882017-01-12 Martin Sebor <msebor@redhat.com>
4489
4490 (-Wformat-overflow): ...to this.
4491
bf5fbf46
MS
44922017-01-11 Martin Sebor <msebor@redhat.com>
4493
4494 PR c/78768
4495 * c.opt (-Walloca-larger-than, -Wformat-length, -Wformat-truncation):
4496 Also enable for LTO.
4497
e363df3f
JM
44982017-01-10 Jason Merrill <jason@redhat.com>
4499
4500 Implement P0195R2, C++17 variadic using.
4501 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_variadic_using.
4502
bd2c6270
JJ
45032017-01-09 Jakub Jelinek <jakub@redhat.com>
4504
4505 PR translation/79019
4506 PR translation/79020
4507 * c.opt (Wnormalized=): Fix typo in description.
4508
efcc8d38
MS
45092017-01-08 Martin Sebor <msebor@redhat.com>
4510
4511 PR middle-end/77708
4512 * c.opt (-Wformat-truncation): New option.
4513
ab20d992 45142017-01-06 Alexandre Oliva <aoliva@redhat.com>
435f3f7a
AO
4515
4516 * c-pretty-print.c (pp_c_tree_decl_identifier): Convert 16-bit
4517 value to unsigned short to fit in 4 hex digits without
4518 warnings.
4519
4e89adf9
EB
45202017-01-05 Eric Botcazou <ebotcazou@adacore.com>
4521
4522 * c.opt (fsso-struct): Add 'native' value.
4523
cd445b54
ML
45242017-01-05 Martin Liska <mliska@suse.cz>
4525
4526 PR pch/78970
4527 * c-opts.c (c_common_post_options): Reject '-' filename for a precompiled
4528 header.
4529
a9342885
MP
45302017-01-04 Marek Polacek <polacek@redhat.com>
4531
4532 PR c++/64767
4533 * c.opt (Wpointer-compare): New option.
4534
fc73e60c
JJ
45352017-01-04 Jakub Jelinek <jakub@redhat.com>
4536
4537 PR driver/78957
4538 * c.opt (fsso-struct=): Add RejectNegative.
4539
cbe34bb5
JJ
45402017-01-01 Jakub Jelinek <jakub@redhat.com>
4541
4542 Update copyright years.
4543
d4a6c0ea
ML
45442016-12-29 Martin Liska <mliska@suse.cz>
4545
4546 PR c/78933
4547 * c.opt (strong-eval-order): Add RejectNegative keyword.
4548
67a5ad7c
JM
45492016-12-22 Jason Merrill <jason@redhat.com>
4550
4551 Implement P0522R0, matching of template template arguments.
4552 * c-cppbuiltin.c (c_cpp_builtins): Define
4553 __cpp_template_template_args.
4554
0dba7960
JJ
45552016-12-21 Jakub Jelinek <jakub@redhat.com>
4556
4557 PR bootstrap/78817
4558 * c-common.c (struct nonnull_arg_ctx): New type.
4559 (check_function_nonnull): Return bool instead of void. Use
4560 nonnull_arg_ctx as context rather than just location_t.
4561 (check_nonnull_arg): Adjust for the new context type, set
4562 warned_p to true if a warning has been diagnosed.
4563 (check_function_arguments): Return bool instead of void.
4564 * c-common.h (check_function_arguments): Adjust prototype.
4565
31bfc9b9
JM
45662016-12-21 Jason Merrill <jason@redhat.com>
4567
4568 * c.opt (-fnew-ttp-matching): New flag.
4569 * c-opts.c (c_common_post_options): Default on if -std=c++1z.
4570
629b3d75
MJ
45712016-12-14 Martin Jambor <mjambor@suse.cz>
4572
4573 * c-omp.c: Include omp-general.h instead of omp-low.h.
4574 (c_finish_oacc_wait): Adjusted call to find_omp_clause to use its new
4575 name.
4576
474da67e
MS
45772016-12-14 Martin Sebor <msebor@redhat.com>
4578
4579 PR c/17308
4580 * c-common.c (check_nonnull_arg): Disable when optimization
4581 is enabled.
4582
fe366b87
MP
45832016-12-12 Marek Polacek <polacek@redhat.com>
4584
4585 PR c++/78647
4586 * c-common.c (attribute_fallthrough_p): Return false for
4587 error_mark_node.
4588
8bd9f164
MS
45892016-12-08 Martin Sebor <msebor@redhat.com>
4590
4591 PR c/78284
4592 * c.opt (-Walloc-zero, -Walloc-size-larger-than): New options.
4593
060162e0
MS
45942016-12-08 Martin Sebor <msebor@redhat.com>
4595
4596 PR c/78165
92a285c1
ML
4597 * c-pretty-print (pp_c_integer_constant): Avoid formatting type
4598 suffix.
060162e0 4599
ee92e7ba
MS
46002016-12-07 Martin Sebor <msebor@redhat.com>
4601
4602 PR c/53562
4603 PR middle-end/77784
4604 PR middle-end/78149
4605 PR middle-end/78138
4606 * c.opt (-Wstringop-overflow): New option.
4607
84b0769e
MO
46082016-12-02 Maxim Ostapenko <m.ostapenko@samsung.com>
4609
4610 * c-attribs.c (asan odr indicator): New attribute.
4611 (handle_asan_odr_indicator_attribute): New function.
4612
7fa6a965
PK
46132016-11-26 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
4614
4615 * c-common.c (c_common_nodes_and_builtins): Remove initialization of
4616 ptrdiff_type_node;
4617
56d8ffc1
JG
46182016-11-23 James Greenhalgh <james.greenhalgh@arm.com>
4619
4620 * c-common.c (excess_precision_mode_join): New.
4621 (c_ts18661_flt_eval_method): New.
4622 (c_c11_flt_eval_method): Likewise.
4623 (c_flt_eval_method): Likewise.
4624 * c-common.h (excess_precision_mode_join): New.
4625 (c_flt_eval_method): Likewise.
4626 * c-cppbuiltin.c (c_cpp_flt_eval_method_iec_559): New.
4627 (cpp_iec_559_value): Call it.
4628 (c_cpp_builtins): Modify logic for __LIBGCC_*_EXCESS_PRECISION__,
4629 call c_flt_eval_method to set __FLT_EVAL_METHOD__ and
4630 __FLT_EVAL_METHOD_TS_18661_3__.
4631
04f0fcf7
JG
46322016-11-23 James Greenhalgh <james.greenhalgh@arm.com>
4633
4634 * c-opts.c (c_common_post_options): Add logic to handle the default
4635 case for -fpermitted-flt-eval-methods.
4636
fb2675cb
PB
46372016-11-23 Paolo Bonzini <bonzini@gnu.org>
4638
4639 * c.opt (Wexpansion-to-defined): New.
4640
ec1c5694
JJ
46412016-11-23 Jakub Jelinek <jakub@redhat.com>
4642
4643 PR target/78451
4644 * c-pragma.c (handle_pragma_target): Don't replace
4645 current_target_pragma, but chainon the new args to the current one.
4646
730c9e75
NS
46472016-11-22 Nathan Sidwell <nathan@acm.org>
4648
4649 * array-notation-common.c (cilkplus_extract_an_trplets): Fix
cacd29be 4650 indentation and formatting.
730c9e75 4651
89990732
MS
46522016-11-21 Martin Sebor <msebor@redhat.com>
4653
4654 * c.opt (-fprintf-return-value): Enable by default.
4655
48330c93
BE
46562016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
4657
4658 PR c++/71973
4659 * c.opt (-Wbuiltin-declaration-mismatch): New warning.
4660 * c-common.c (c_common_nodes_and_builtins): Initialize
4661 const_tm_ptr_type_node.
4662
0d939c95
MP
46632016-11-16 Marek Polacek <polacek@redhat.com>
4664
4665 PR c/78285
4666 * c-common.c (c_add_case_label): Turn error_at calls into inform.
4667
8e745a17
JJ
46682016-11-14 Jakub Jelinek <jakub@redhat.com>
4669
4670 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_structured_bindings.
4671
1ee62b92 46722016-11-14 Prasad Ghangal <prasad.ghangal@gmail.com>
8e745a17
JJ
4673 Richard Biener <rguenther@suse.de>
4674
4675 * c-common.h (c_common_resword): Add RID_GIMPLE, RID_PHI types.
4676 * c-common.h (enum rid): Add RID_GIMPLE, RID_PHI.
4677 * c.opt (fgimple): New option.
1ee62b92 4678
22b15758
UB
46792016-11-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
4680
4681 PR c/35503
4682 * c-common.h (warn_for_restrict): Declare.
4683 * c-warn.c: Include gcc-rich-location.h.
4684 (warn_for_restrict): New function.
4685 * c-format.c (gcc_tdiag_char_table): Add entry for "Z" specifier.
4686 (gcc_cdiag_char_table): Likewise.
4687 (gcc_cxxdiag_char_table): Likewise.
4688 * c.opt (Wrestrict): New option.
4689
4be719cd
EB
46902016-11-13 Eric Botcazou <ebotcazou@adacore.com>
4691
4692 * c-ada-spec.c (print_ada_declaration): For typedef declarations, look
4693 for nested types only if the type is a record or union and dump SLOC.
4694
4a826ca6
JM
46952016-11-09 Jason Merrill <jason@redhat.com>
4696
4697 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_template_auto.
4698
2e955d50
JJ
46992016-11-09 Jakub Jelinek <jakub@redhat.com>
4700
4701 * c-ubsan.c (ubsan_instrument_shift): Handle split
4702 -fsanitize=shift-base and -fsanitize=shift-exponent.
4703
51dc6603
JM
47042016-11-07 Jason Merrill <jason@redhat.com>
4705
4706 * c.opt (Wc++1z-compat): New.
4707 * c-cppbuiltin.c (c_cpp_builtins): Add __cpp_noexcept_function_type.
4708
6dc4a604
ML
47092016-11-07 Martin Liska <mliska@suse.cz>
4710
4711 * c-warn.c (warn_for_unused_label): Save all labels used
4712 in goto or in &label.
4713
b302001e
JM
47142016-11-03 Jason Merrill <jason@redhat.com>
4715
4716 * c-cppbuiltin.c (c_cpp_builtins): Correct
4717 __cpp_inheriting_constructors.
4718
31f7f784
JM
47192016-11-01 Jason Merrill <jason@redhat.com>
4720
2bc78e3c
JM
4721 * c-cppbuiltin.c (c_cpp_builtins): Update
4722 __cpp_inheriting_constructors.
4723
31f7f784
JM
4724 * c.opt (-fnew-inheriting-ctors): New.
4725 * c-opts.c: Default to on for ABI 11+.
4726
dcb466ec
JJ
47272016-10-31 Jakub Jelinek <jakub@redhat.com>
4728
4729 PR c++/77948
4730 * c.opt (fext-numeric-literals): Add Var and Init.
4731 * c-opts.c (c_common_handle_option): Don't clear
4732 cpp_opts->ext_numeric_literals for -std=c++{11,14,1z}.
4733 (c_common_post_options): Clear it here if not set
4734 explicitly.
4735
52e1b91e
AH
47362016-10-28 Aldy Hernandez <aldyh@redhat.com>
4737
4738 PR debug/77773
4739 * c-pretty-print.c (simple_type_specifier): Do not dereference `t'
4740 if NULL.
4741
e16f1cc7
JJ
47422016-10-25 Jakub Jelinek <jakub@redhat.com>
4743
4744 * c-common.h (enum rid): Add RID_BUILTIN_LAUNDER.
4745 * c-common.c (c_common_reswords): Add __builtin_launder.
4746
f8348061
BE
47472016-10-24 Bernd Edlinger <bernd.edlinger@hotmail.de>
4748
4749 * c-common.c (c_common_truthvalue_conversion): Warn for
4750 multiplications in boolean context. Fix the quoting of '<<' and '<'
4751 in the shift warning.
4752
eff89e01
BE
47532016-10-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
4754
4755 * c-common.c (c_common_truthvalue_conversion): Fix the comment.
4756
24bc7bf4
JM
47572016-10-20 Jason Merrill <jason@redhat.com>
4758
4759 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_concepts value.
4760
4c712374
BE
47612016-10-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
4762
4763 * c-common.c (c_common_truthvalue_conversion): Warn only for signed
4764 integer shift ops in boolean context.
4765
47662016-10-18 Aldy Hernandez <aldyh@redhat.com>
adc577c5
AH
4767
4768 * c.opt (Walloca): New.
4769 (Walloca-larger-than=): New.
4770 (Wvla-larger-than=): New.
4771
8fa18c06
MP
47722016-10-17 Marek Polacek <polacek@redhat.com>
4773
4774 * c-warn.c (find_array_ref_with_const_idx_r): Remove parameter names.
4775 Return immediately when finding a match.
4776 (warn_tautological_cmp): Remove a boolean variable that is no longer
4777 needed.
4778
b12b1915
MP
47792016-10-17 Marek Polacek <polacek@redhat.com>
4780
4781 * c-attribs.c: New file.
4782 * c-common.c: Move attributes handling to c-attribs.c.
4783 (get_nonnull_operand): No longer static.
4784 * c-common.h: Move the declarations from c-attribs.c to its own section.
4785
2045acd9
JM
47862016-10-14 Jason Merrill <jason@redhat.com>
4787
4788 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_aggregate_bases
4789 and __cpp_deduction_guides.
4790
14a2c9aa
JM
47912016-10-13 Jason Merrill <jason@redhat.com>
4792
4793 * c-cppbuiltin.c (c_cpp_builtins): Add __cpp_inline_variables.
4794
4d0cdd0c
TP
47952016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
4796
4797 * c-cppbuiltin.c: Include memmodel.h.
4798 * c-opts.c: Likewise.
4799 * c-pragma.c: Likewise.
4800 * c-warn.c: Likewise.
4801
70f6d5e1
JJ
48022016-10-12 Jakub Jelinek <jakub@redhat.com>
4803
4804 * c.opt (Wextra): Add as C/C++/ObjC/ObjC++ option.
4805 (Wimplicit-fallthrough=): Enable for these languages by -Wextra.
4806 * c-opts.c (sanitize_cpp_opts): Initialize
4807 cpp_opts->cpp_warn_implicit_fallthrough.
4808
78f61294
MP
48092016-10-11 Marek Polacek <polacek@redhat.com>
4810
4811 * c-common.c (warning_candidate_p): Change the return type to bool
4812 and return true/false instead of 1/0.
4813 (vector_mode_valid_p): Likewise.
4814
038b5cc0
MP
48152016-10-11 Marek Polacek <polacek@redhat.com>
4816
4817 * c-common.c (fold_for_warn): No longer static.
4818 (bool_promoted_to_int_p): Likewise.
4819 (c_common_get_narrower): Likewise.
4820 (constant_expression_warning): Move to c-warn.c.
4821 (constant_expression_error): Likewise.
4822 (overflow_warning): Likewise.
4823 (warn_logical_operator): Likewise.
4824 (find_array_ref_with_const_idx_r): Likewise.
4825 (warn_tautological_cmp): Likewise.
4826 (expr_has_boolean_operands_p): Likewise.
4827 (warn_logical_not_parentheses): Likewise.
4828 (warn_if_unused_value): Likewise.
4829 (strict_aliasing_warning): Likewise.
4830 (sizeof_pointer_memaccess_warning): Likewise.
4831 (check_main_parameter_types): Likewise.
4832 (conversion_warning): Likewise.
4833 (warnings_for_convert_and_check): Likewise.
4834 (match_case_to_enum_1): Likewise.
4835 (match_case_to_enum): Likewise.
4836 (c_do_switch_warnings): Likewise.
4837 (warn_for_omitted_condop): Likewise.
4838 (readonly_error): Likewise.
4839 (lvalue_error): Likewise.
4840 (invalid_indirection_error): Likewise.
4841 (warn_array_subscript_with_type_char): Likewise.
4842 (warn_about_parentheses): Likewise.
4843 (warn_for_unused_label): Likewise.
4844 (warn_for_div_by_zero): Likewise.
4845 (warn_for_memset): Likewise.
4846 (warn_for_sign_compare): Likewise.
4847 (do_warn_double_promotion): Likewise.
4848 (do_warn_unused_parameter): Likewise.
4849 (record_locally_defined_typedef): Likewise.
4850 (maybe_record_typedef_use): Likewise.
4851 (maybe_warn_unused_local_typedefs): Likewise.
4852 (maybe_warn_bool_compare): Likewise.
4853 (maybe_warn_shift_overflow): Likewise.
4854 (warn_duplicated_cond_add_or_warn): Likewise.
4855 (diagnose_mismatched_attributes): Likewise.
4856 * c-common.h: Move the declarations from c-warn.c to its own section.
4857 * c-warn.c: New file.
4858
627be19f
JM
48592016-10-08 Jason Merrill <jason@redhat.com>
4860
4861 * c-common.c (c_common_truthvalue_conversion): Don't distribute
4862 into COND_EXPR in C++.
4863
7bad794a
JJ
48642016-10-08 Jakub Jelinek <jakub@redhat.com>
4865
4866 * c-lex.c (c_lex_with_flags) <case CPP_COMMENT>: For CPP_COMMENT
4867 token with PREV_FALLTHROUGH, skip all following CPP_PADDING and
4868 CPP_COMMENT tokens and set add_flags to PREV_FALLTHROUGH afterwards.
4869
be845b04
JJ
48702016-10-07 Jakub Jelinek <jakub@redhat.com>
4871
4872 Implement LWG2296 helper intrinsic
4873 * c-common.h (enum rid): Add RID_ADDRESSOF.
4874 * c-common.c (c_common_reswords): Add __builtin_addressof.
4875
c09c4992
BE
48762016-10-07 Bernd Edlinger <bernd.edlinger@hotmail.de>
4877
4878 PR c++/77700
4879 * c-common.c (c_common_truthvalue_conversion): Warn also for
4880 suspicious enum values in boolean context.
4881
342cfb3e
JJ
48822016-10-06 Jakub Jelinek <jakub@redhat.com>
4883
4884 Implement P0258R2 - helper for C++17
4885 std::has_unique_object_representations trait
4886 * c-common.h (enum rid): Add RID_HAS_UNIQUE_OBJ_REPRESENTATIONS.
4887 * c-common.c (c_common_reswords): Add
4888 __has_unique_object_representations.
4889
2e69f143
JJ
48902016-10-05 Jakub Jelinek <jakub@redhat.com>
4891
4892 PR sanitizer/66343
4893 * c-ubsan.c (ubsan_instrument_return): Don't call
4894 initialize_sanitizer_builtins here.
4895
700fff34
BE
48962016-10-05 Bernd Edlinger <bernd.edlinger@hotmail.de>
4897
4898 * c-common.c (c_common_truthvalue_conversion): Warn also for suspicious
4899 conditional expression in boolean context when only one arm is
4900 non-boolean.
4901
9563bfcd
JJ
49022016-10-05 Jakub Jelinek <jakub@redhat.com>
4903
04a32443
JJ
4904 PR sanitizer/77823
4905 * c-ubsan.c (ubsan_instrument_shift): Return NULL_TREE if type0
4906 is not integral.
4907
9563bfcd
JJ
4908 * c-common.c (c_common_reswords): Update comment for C++11.
4909
f1644724
JM
49102016-10-04 Jason Merrill <jason@redhat.com>
4911
4912 * c-common.c (make_tree_vector_from_ctor): New.
4913 * c-common.h: Declare it.
4914
5a79befb
JJ
49152016-10-04 Jakub Jelinek <jakub@redhat.com>
4916
4917 * c-cppbuiltin.c (c_cpp_builtins): Don't define
4918 __LIBGCC_JCR_SECTION_NAME__.
4919
1633d3b9
BE
49202016-10-03 Bernd Edlinger <bernd.edlinger@hotmail.de>
4921
4922 * c-common.c (c_common_truthvalue_conversion): Warn for suspicious
4923 left shift in boolean context.
4924
a2c6e7f2
JJ
49252016-09-29 Jakub Jelinek <jakub@redhat.com>
4926
4927 Implement P0001R1 - C++17 removal of register storage class specifier
4928 * c.opt (Wregister): New warning.
4929 * c-opts.c (c_common_post_options): Enable -Wregister by
4930 default for C++17.
4931
75304c87
JG
49322016-09-29 James Greenhalgh <james.greenhalgh@arm.com>
4933
4934 * c-opts.c (c_common_post_options): Remove special case for
4935 TARGET_FLT_EVAL_METHOD_NON_DEFAULT with -fexcess-precision=standard
4936 in C++.
4937
bbfac6da
JJ
49382016-09-27 Jakub Jelinek <jakub@redhat.com>
4939
6e39060a
JJ
4940 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_capture_star_this for
4941 -std=c++1z.
4942
bbfac6da
JJ
4943 * c-ada-spec.c (print_ada_declaration): Remove break after return.
4944
e73cf9a2
TP
49452016-09-26 Thomas Preud'homme <thomas.preudhomme@arm.com>
4946
4947 * c-common.c: Include memmodel.h.
4948
c6147dc4
MP
49492016-09-26 Marek Polacek <polacek@redhat.com>
4950
4951 * c-lex.c (c_common_has_attribute): Handle attribute fallthrough.
4952
81fea426
MP
49532016-09-26 Marek Polacek <polacek@redhat.com>
4954
4955 PR c/7652
4956 * c-common.c (c_common_attribute_table): Add fallthrough attribute.
4957 (handle_fallthrough_attribute): New function.
4958 (attribute_fallthrough_p): New function.
4959 * c-common.h (attribute_fallthrough_p): Declare.
4960
9a2300e9
MP
49612016-09-24 Marek Polacek <polacek@redhat.com>
4962
4963 PR c/77490
4964 * c.opt (Wbool-operation): New.
4965
a09e9e35
BE
49662016-09-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
4967
4968 * c-common.c (c_common_truthvalue_conversion): Inhibit
4969 Wint-in-bool-context warning with from_macro_definition_at.
4970 Mention the expression will always evaluate to true.
4971
d43b4ccc
MS
49722016-09-21 Martin Sebor <msebor@redhat.com>
4973
4974 PR bootstrap/77676
4975 * c.opt (fprintf-return-value): Temporarily initialize to zero
4976 to unblock bootstrap failures.
4977
2e1c20b1
JJ
49782016-09-21 Jakub Jelinek <jakub@redhat.com>
4979
4980 PR c++/77651
4981 * c.opt (Waligned-new=): Add RejectNegative.
4982 (faligned-new=): Likewise. Spelling fix - change
4983 aligned_new_threshhold to aligned_new_threshold.
4984 * c-cppbuiltin.c (c_cpp_builtins): Change aligned_new_threshhold
4985 to aligned_new_threshold.
4986
88d0c3f0
MS
49872016-09-20 Martin Sebor <msebor@redhat.com>
4988
4989 PR middle-end/49905
4990 * c.opt: Add -Wformat-length and -fprintf-return-value.
4991
144a96e4
BE
49922016-09-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
4993
4994 PR c++/77434
4995 * c.opt (Wint-in-bool-context): New warning.
4996 * c-common.c (c_common_truthvalue_conversion): Warn on integer
4997 constants in boolean context.
4998
63012d9a
JM
49992016-09-19 Joseph Myers <joseph@codesourcery.com>
5000
5001 * c-common.c (max_align_t_align): Also consider alignment of
5002 float128_type_node.
5003
931388ce
JM
50042016-09-15 Jason Merrill <jason@redhat.com>
5005
5006 * c-common.c (check_cxx_fundamental_alignment_constraints): Check
5007 DECL_EXTERNAL.
5008
38711381
JM
50092016-09-14 Jason Merrill <jason@redhat.com>
5010
5011 * c-common.c (check_cxx_fundamental_alignment_constraints): Don't
5012 limit FIELD_DECL, either.
5013
e51fbec3
MP
50142016-09-14 Marek Polacek <polacek@redhat.com>
5015
5016 * c-common.c (c_common_truthvalue_conversion): Use false instead of 0.
5017 * c-common.h (build_unary_op): Change nonconvert parameter type to bool.
5018 * c-omp.c (c_finish_omp_atomic): Use false instead of 0.
5019
254830ba
DM
50202016-09-13 David Malcolm <dmalcolm@redhat.com>
5021
5022 * c-common.c (warn_logical_not_parentheses): Replace
5023 rich_location::add_fixit_insert calls with add_fixit_insert_before
5024 and add_fixit_insert_after, eliminating the "next_loc" calculation.
5025
42763690
JM
50262016-09-13 Jason Merrill <jason@redhat.com>
5027 Tom de Vries <tom@codesourcery.com>
5028
5029 PR c++/77427
5030 * c-common.c (set_underlying_type): Don't treat array as builtin type.
5031
9453eee9
JM
50322016-09-13 Jason Merrill <jason@redhat.com>
5033
5034 * c-common.c (check_cxx_fundamental_alignment_constraints): Don't
5035 limit types at all.
5036
e96809e3
JM
50372016-09-12 Jason Merrill <jason@redhat.com>
5038
5039 * c-common.c (check_cxx_fundamental_alignment_constraints): Fix
5040 bit/byte confusion, allow large alignment for types.
5041
54dcdb88
BE
50422016-09-12 Bernd Edlinger <bernd.edlinger@hotmail.de>
5043
5044 PR c++/77496
5045 * c-common.c (warn_for_omitted_condop): Also warn for boolean data.
5046
d1463eb9
DM
50472016-09-12 David Malcolm <dmalcolm@redhat.com>
5048
5049 PR c/72858
5050 * c-format.c (argument_parser::check_argument_type): Add params
5051 "type_start" and "conversion_char". Use the former to generate
5052 offset_to_type_start and pass it and conversion_char to
5053 check_format_types.
5054 (check_format_info_main): Capture the start of the type
5055 information as "type_start", and pass it an format_char
5056 to arg_parser.check_argument_type.
5057 (check_format_types): Provide an example in the leading comment.
5058 Add params "offset_to_type_start" and "conversion_char"; pass
5059 them to format_type_warning calls.
5060 (test_get_modifier_for_format_len): Likewise.
5061 (matching_type_p): New function.
5062 (get_format_for_type): Add param "conversion_char" and move
5063 implementation into...
5064 (get_format_for_type_1): ...new function, called twice.
5065 Use new function matching_type_p rather than checking for
5066 TYPE_CANONICAL equality.
5067 (get_corrected_substring): New function.
5068 (format_type_warning): Provide an example in the leading comment.
5069 Add params "offset_to_type_start" and "conversion_char". Replace
5070 call to get_format_for_type with call to get_corrected_substring
5071 and move rejection of hints for widths/precisions there.
5072 (assert_format_for_type_streq): Add param "conversion_char".
5073 (ASSERT_FORMAT_FOR_TYPE_STREQ): Add param CONVERSION_CHAR.
5074 (test_get_format_for_type_printf): Add conversion chars to the
5075 tests, adding coverage for various combinations of integer
5076 vs double conversions, and for preserving octal and hexadecimal
5077 conversions.
5078 (test_get_format_for_type_scanf): Add conversion chars to the
5079 tests.
5080
5b28efbb
TV
50812016-09-10 Tom de Vries <tom@codesourcery.com>
5082
5083 PR C/71602
5084 * c-common.c (build_va_arg): Handle more strict
5085 targetm.canonical_va_list_type. Replace first argument type error with
5086 assert.
5087
3f0177e7
MS
50882016-09-09 Martin Sebor <msebor@redhat.com>
5089
5090 PR c/77520
5091 PR c/77521
5092 * c-format.c (argument_parser::find_format_char_info): Use %qc
5093 format directive unconditionally.
5094
af63ba4b
JM
50952016-09-09 Jason Merrill <jason@redhat.com>
5096
5097 Implement C++17 new of over-aligned types.
5098 * c.opt: Add -faligned-new and -Waligned-new.
5099 * c-common.c (max_align_t_align): Split out from...
5100 (cxx_fundamental_alignment_p): ...here.
5101 * c-common.h: Declare it.
5102 * c-cppbuiltin.c (c_cpp_builtins): Handle aligned new.
5103
c65248cb
JM
51042016-09-09 Joseph Myers <joseph@codesourcery.com>
5105
5106 * c-cppbuiltin.c (builtin_define_type_width): New function.
5107 (builtin_define_stdint_macros, c_cpp_builtins): Define type width
5108 macros.
5109
e5106e27
DM
51102016-09-07 David Malcolm <dmalcolm@redhat.com>
5111
5112 * c-common.c (get_cpp_ttype_from_string_type): Handle being passed
5113 a POINTER_TYPE.
5114 (substring_loc::get_location): Move to substring-locations.c,
5115 keeping implementation as...
5116 (c_get_substring_location): New function, from the above, reworked
5117 to use accessors rather than member lookup.
5118 * c-common.h (class substring_loc): Move to substring-locations.h,
5119 replacing with a forward decl.
5120 (c_get_substring_location): New decl.
5121 * c-format.c: Include "substring-locations.h".
5122 (format_warning_va): Move to substring-locations.c.
5123 (format_warning_at_substring): Likewise.
5124
ab20d992 51252016-09-06 Martin Sebor <msebor@redhat.com>
a42e7952
MS
5126
5127 PR c/77336
5128 * c-format.c (check_function_format): Avoid issuing warnings for
5129 functions unless they call format functions with non-constant
5130 format strings.
5131
b772a565
RB
51322016-09-06 Richard Biener <rguenther@suse.de>
5133
5134 PR c/77450
5135 * c-common.c (c_common_mark_addressable_vec): Handle
5136 COMPOUND_LITERAL_EXPR.
5137
25ff5dd3
MP
51382016-09-05 Marek Polacek <polacek@redhat.com>
5139
5140 PR c/77423
5141 * c-common.c (bool_promoted_to_int_p): New function.
5142 (expr_has_boolean_operands_p): New function.
5143 (warn_logical_not_parentheses): Return if expr_has_boolean_operands_p.
5144 (maybe_warn_bool_compare): Use bool_promoted_to_int_p.
5145
21234eb5
TV
51462016-09-04 Tom de Vries <tom@codesourcery.com>
5147
5148 revert:
5149 2016-08-29 Tom de Vries <tom@codesourcery.com>
5150
5151 * c-common.c (build_va_arg): Replace first argument type error
5152 with assert.
5153
9dc5773f
JJ
51542016-09-02 Jakub Jelinek <jakub@redhat.com>
5155
5156 PR c/65467
5157 * c-omp.c (c_finish_omp_atomic): Reject _Atomic qualified expressions.
5158 (c_finish_omp_for): Reject _Atomic qualified iterators.
5159
51602016-09-01 Martin Sebor <msebor@redhat.com>
3d7b83b6
MS
5161
5162 * c-ada-spec.c (dump_ada_function_declaration): Increase buffer
5163 size to guarantee it fits the output of the formatted function
5164 regardless of its arguments.
5165
295844f6
MP
51662016-09-01 Marek Polacek <polacek@redhat.com>
5167
5168 PR c/7652
5169 * c-common.c (resolve_overloaded_builtin): Fix formatting. Add
5170 FALLTHRU comments.
5171
3d06b6f2
MP
51722016-08-29 Marek Polacek <polacek@redhat.com>
5173
5174 PR c/77292
5175 * c-common.c (warn_logical_not_parentheses): Don't warn for
5176 a comparison or a logical operator.
5177
34cedad5
TV
51782016-08-29 Tom de Vries <tom@codesourcery.com>
5179
5180 * c-common.c (build_va_arg): Fix type comparison assert.
5181
f162d717
TV
51822016-08-29 Tom de Vries <tom@codesourcery.com>
5183
5184 * c-common.c (build_va_arg): Replace first argument type error
5185 with assert.
5186
ba9bbd6f
TV
51872016-08-29 Tom de Vries <tom@codesourcery.com>
5188
5189 PR c/77398
5190 * c-common.c (build_va_arg): Add first argument error. Build va_arg
5191 with error_mark_node as va_list instead of with illegal va_list.
5192
ebef225f
MP
51932016-08-25 Marek Polacek <polacek@redhat.com>
5194 David Malcolm <dmalcolm@redhat.com>
5195
5196 * c-common.c (warn_logical_not_parentheses): Print fixit hints.
5197 * c-common.h (warn_logical_not_parentheses): Update declaration.
5198
b00e6e75
MP
51992016-08-22 Marek Polacek <polacek@redhat.com>
5200
5201 PR c++/77321
5202 * c-common.c (warn_for_memset): Check type for null.
5203
6dc198e3
JM
52042016-08-22 Joseph Myers <joseph@codesourcery.com>
5205
14ec014e 5206 * c-cppbuiltin.c (c_cpp_builtins): Check _FloatN and
6dc198e3
JM
5207 _FloatNx types for suffixes for built-in functions.
5208
c65699ef
JM
52092016-08-19 Joseph Myers <joseph@codesourcery.com>
5210
5211 PR c/32187
5212 * c-common.h (RID_FLOAT16, RID_FLOATN_NX_FIRST, RID_FLOAT32)
5213 (RID_FLOAT64, RID_FLOAT128, RID_FLOAT32X, RID_FLOAT64X)
5214 (RID_FLOAT128X): New enum rid values.
5215 (CASE_RID_FLOATN_NX): New macro.
5216 * c-common.c (c_common_reswords): Add _FloatN and _FloatNx
5217 keywords.
5218 (c_common_type_for_mode): Check for _FloatN and _FloatNx and
5219 corresponding complex types.
5220 (c_common_nodes_and_builtins): For non-C++, register _FloatN and
5221 _FloatNx and corresponding complex types.
5222 (keyword_begins_type_specifier): Use CASE_RID_FLOATN_NX.
5223 * c-cppbuiltin.c (builtin_define_float_constants): Check _FloatN
5224 and _FloatNx types for the widest type for determining
5225 DECIMAL_DIG. Define __LDBL_DECIMAL_DIG__ as well as
5226 __DECIMAL_DIG__ for long double. Handle FMA_SUFFIX being NULL.
5227 (c_cpp_builtins): Call builtin_define_float_constants for _FloatN
5228 and _FloatNx types.
5229 * c-lex.c (interpret_float): Handle _FloatN and _FloatNx
5230 constants.
5231 * c-pretty-print.c (pp_c_floating_constant): Handle _FloatN and
5232 _FloatNx types.
5233
cc015f3a
DM
52342016-08-18 David Malcolm <dmalcolm@redhat.com>
5235
5236 * c-opts.c (c_diagnostic_finalizer): Update for change to
5237 diagnostic_show_locus.
5238
cb18fd07
DM
52392016-08-18 David Malcolm <dmalcolm@redhat.com>
5240
5241 * c-common.c: Include "spellcheck.h".
5242 (cb_get_suggestion): New function.
5243 * c-common.h (cb_get_suggestion): New decl.
5244 * c-lex.c (init_c_lex): Initialize cb->get_suggestion to
5245 cb_get_suggestion.
5246
a76989dc
MP
52472016-08-18 Marek Polacek <polacek@redhat.com>
5248
5249 PR c/71514
5250 * c-common.c (get_atomic_generic_size): Disallow pointer-to-function
5251 and pointer-to-VLA.
5252
65e736c0
DM
52532016-08-16 David Malcolm <dmalcolm@redhat.com>
5254
5255 PR c/72857
5256 * c-common.c (substring_loc::get_range): Rename to...
5257 (substring_loc::get_location): ...this, converting param from a
5258 source_range * to a location_t *. Call
5259 get_source_location_for_substring rather than
5260 get_source_range_for_substring, and pass in m_caret_idx.
5261 * c-common.h (substring_loc::substring_loc): Add param "caret_idx".
5262 (substring_loc::get_range): Replace with...
5263 (substring_loc::get_location): ...this.
5264 (substring_loc::set_caret_index): New method.
5265 (substring_loc): Add field m_caret_idx.
5266 * c-format.c (format_warning_va): Update for above changes.
5267 Rename local "substring_loc" to "fmt_substring_loc" to avoid
5268 clashing with type name.
5269 (format_warning_at_char): Add caret_idx param to substring_loc ctor.
5270 (check_argument_type): Likewise.
5271 (format_type_warning): Rename param "fmt_loc" to "whole_fmt_loc"
5272 Use a copy when emitting warnings, setting the caret index from TYPE.
5273
7e1dde14 52742016-08-16 Eric Botcazou <ebotcazou@adacore.com>
8e745a17 5275 Arnaud Charlet <charlet@adacore.com>
7e1dde14
EB
5276
5277 * c-ada-spec.c (dump_number): New function.
5278 (handle_escape_character): Likewise.
5279 (print_ada_macros): Add handling of constant integers and strings.
5280
191816a3
MP
52812016-08-12 Marek Polacek <polacek@redhat.com>
5282
5283 PR c/7652
5284 * c-common.c (scalar_to_vector): Adjust fall through comment.
5285 * c-opts.c (c_common_handle_option): Likewise.
5286 * c-pragma.c (handle_pragma_pack): Add FALLTHRU.
5287 * c-pretty-print.c (c_pretty_printer::postfix_expression): Adjust
5288 fall through comment.
5289 * cilk.c (extract_free_variables): Add FALLTHRU.
5290
452df4a4
JM
52912016-08-10 Jason Merrill <jason@redhat.com>
5292
5293 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_if_constexpr.
5294
f3365c12
JM
52952016-08-09 Jason Merrill <jason@redhat.com>
5296
5297 * c-common.c (c_common_attribute_table): vector_size affects type
5298 identity.
5299
f0bc3323
MP
53002016-08-09 Marek Polacek <polacek@redhat.com>
5301
5302 PR c/7652
5303 * c-ada-spec.c (dump_generic_ada_node): Add return.
5304
98e5a19a
JM
53052016-08-09 Jason Merrill <jason@redhat.com>
5306
5307 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_constexpr for
5308 C++17 constexpr lambdas.
5309
895aa8e1
DM
53102016-08-08 David Malcolm <dmalcolm@redhat.com>
5311
5312 PR c/64955
5313 * c-common.h (selftest::c_format_c_tests): New declaration.
5314 (selftest::run_c_tests): New declaration.
5315 * c-format.c: Include "selftest.h.
5316 (format_warning_va): Add param "corrected_substring" and use
5317 it to add a replacement fix-it hint.
5318 (format_warning_at_substring): Likewise.
5319 (format_warning_at_char): Update for new param of
5320 format_warning_va.
5321 (argument_parser::check_argument_type): Pass "fki" to
5322 check_format_types.
5323 (check_format_types): Add param "fki" and pass it to
5324 format_type_warning.
5325 (deref_n_times): New function.
5326 (get_modifier_for_format_len): New function.
5327 (selftest::test_get_modifier_for_format_len): New function.
5328 (get_format_for_type): New function.
5329 (format_type_warning): Add param "fki" and use it to attempt
5330 to provide hints for argument types when calling
5331 format_warning_at_substring.
5332 (selftest::get_info): New function.
5333 (selftest::assert_format_for_type_streq): New function.
5334 (ASSERT_FORMAT_FOR_TYPE_STREQ): New macro.
5335 (selftest::test_get_format_for_type_printf): New function.
5336 (selftest::test_get_format_for_type_scanf): New function.
5337 (selftest::c_format_c_tests): New function.
5338
e52ed3fe
DM
53392016-08-08 David Malcolm <dmalcolm@redhat.com>
5340
5341 PR c/52952
5342 * c-format.c: Include "diagnostic.h".
5343 (location_column_from_byte_offset): Delete.
5344 (location_from_offset): Delete.
5345 (format_warning_va): New function.
5346 (format_warning_at_substring): New function.
5347 (format_warning_at_char): New function.
5348 (check_format_arg): Capture location of format_tree and pass to
5349 check_format_info_main.
5350 (argument_parser): Add fields "start_of_this_format" and
5351 "format_string_cst".
5352 (flag_chars_t::validate): Add param "format_string_cst". Convert
5353 warning_at call using location_from_offset to call to
5354 format_warning_at_char.
5355 (argument_parser::argument_parser): Add param "format_string_cst_"
5356 and use use it to initialize field "format_string_cst".
5357 Initialize new field "start_of_this_format".
5358 (argument_parser::read_format_flags): Convert warning_at call
5359 using location_from_offset to a call to format_warning_at_char.
5360 (argument_parser::read_any_format_left_precision): Likewise.
5361 (argument_parser::read_any_format_precision): Likewise.
5362 (argument_parser::read_any_other_modifier): Likewise.
5363 (argument_parser::find_format_char_info): Likewise, in three places.
5364 (argument_parser::parse_any_scan_set): Likewise, in one place.
5365 (argument_parser::handle_conversions): Likewise, in two places.
5366 (argument_parser::check_argument_type): Add param "fmt_param_loc"
5367 and use it to make a substring_loc. Pass the latter to
5368 check_format_types.
5369 (check_format_info_main): Add params "fmt_param_loc" and
5370 "format_string_cst". Convert warning_at calls using
5371 location_from_offset to calls to format_warning_at_char. Pass the
5372 new params to the arg_parser ctor. Pass "format_string_cst" to
5373 flag_chars.validate. Pass "fmt_param_loc" to
5374 arg_parser.check_argument_type.
5375 (check_format_types): Convert first param from a location_t
5376 to a const substring_loc & and rename to "fmt_loc". Attempt
5377 to extract the range of the relevant parameter and pass it
5378 to format_type_warning.
5379 (format_type_warning): Convert first param from a location_t
5380 to a const substring_loc & and rename to "fmt_loc". Add
5381 params "param_range" and "type". Replace calls to warning_at
5382 with calls to format_warning_at_substring.
5383
1c4d457e
DM
53842016-08-08 David Malcolm <dmalcolm@redhat.com>
5385
5386 * c-format.c (class flag_chars_t): New class.
5387 (struct length_modifier): New struct.
5388 (class argument_parser): New class.
5389 (flag_chars_t::flag_chars_t): New ctor.
5390 (flag_chars_t::has_char_p): New method.
5391 (flag_chars_t::add_char): New method.
5392 (flag_chars_t::validate): New method.
5393 (flag_chars_t::get_alloc_flag): New method.
5394 (flag_chars_t::assignment_suppression_p): New method.
5395 (argument_parser::argument_parser): New ctor.
5396 (argument_parser::read_any_dollar): New method.
5397 (argument_parser::read_format_flags): New method.
5398 (argument_parser::read_any_format_width): New method.
5399 (argument_parser::read_any_format_left_precision): New method.
5400 (argument_parser::read_any_format_precision): New method.
5401 (argument_parser::handle_alloc_chars): New method.
5402 (argument_parser::read_any_length_modifier): New method.
5403 (argument_parser::read_any_other_modifier): New method.
5404 (argument_parser::find_format_char_info): New method.
5405 (argument_parser::validate_flag_pairs): New method.
5406 (argument_parser::give_y2k_warnings): New method.
5407 (argument_parser::parse_any_scan_set): New method.
5408 (argument_parser::handle_conversions): New method.
5409 (argument_parser::check_argument_type): New method.
5410 (check_format_info_main): Introduce classes argument_parser
5411 and flag_chars_t, moving the code within the loop into methods
5412 of these classes. Make various locals "const".
5413
88fa5555
DM
54142016-08-05 David Malcolm <dmalcolm@redhat.com>
5415
5416 * c-common.c: Include "substring-locations.h".
5417 (get_cpp_ttype_from_string_type): New function.
5418 (g_string_concat_db): New global.
5419 (substring_loc::get_range): New method.
5420 * c-common.h (g_string_concat_db): New declaration.
5421 (class substring_loc): New class.
5422 * c-lex.c (lex_string): When concatenating strings, capture the
5423 locations of all tokens using a new obstack, and record the
5424 concatenation locations within g_string_concat_db.
5425 * c-opts.c (c_common_init_options): Construct g_string_concat_db
5426 on the ggc-heap.
5427
78169471
MP
54282016-07-29 Marek Polacek <polacek@redhat.com>
5429
638fc14f
MP
5430 PR c/71926
5431 * c-common.c (c_common_truthvalue_conversion): Use LOCATION for the
5432 parentheses warning.
5433
78169471
MP
5434 PR c/71574
5435 * c-common.c (handle_alloc_align_attribute): Also check FUNCTION_DECL.
5436
1225d6b1
ML
54372016-07-28 Martin Liska <mliska@suse.cz>
5438
5439 PR gcov-profile/68025
5440 * c-common.c (handle_no_profile_instrument_function_attribute):
5441
ec1e2a40
BE
54422016-07-27 Bernd Edlinger <bernd.edlinger@hotmail.de>
5443
5444 * c-common.c (check_user_alignment): Use LOG2_BITS_PER_UNIT instead of
5445 BITS_PER_UNIT_LOG.
5446
5ec2cd9f
JM
54472016-07-25 Jason Merrill <jason@redhat.com>
5448
5449 PR c++/65970
5450 * c.opt (fconstexpr-loop-limit): New.
5451
9dc5773f 54522016-07-22 Martin Sebor <msebor@redhat.com>
2e6b45af
MS
5453
5454 PR c++/71675
5455 * c-common.c (resolve_overloaded_builtin): Avoid converting
5456 __atomic_compare_exchange_n return type to that of what its
5457 first argument points to.
5458
e3fe09c1
UB
54592016-07-22 Uros Bizjak <ubizjak@gmail.com>
5460
5461 * c-common.c: Use HOST_WIDE_INT_M1U instead of
5462 ~(unsigned HOST_WIDE_INT) 0.
5463
bc91c436
ML
54642016-07-22 Martin Liska <mliska@suse.cz>
5465
5466 PR gcov-profile/69028
5467 PR gcov-profile/62047
5468 * cilk.c (create_cilk_helper_decl): Set location of a new decl
5469 to the current_function_decl.
5470
451dcc66
JM
54712016-07-21 Jason Merrill <jason@redhat.com>
5472
5473 PR c++/65168
5474 * c-common.c (c_common_truthvalue_conversion): Check
5475 c_inhibit_evaluation_warnings for warning about address of
5476 reference.
5477
de6a69ee
DM
54782016-07-20 David Malcolm <dmalcolm@redhat.com>
5479
5480 * c-common.h (lookup_name_fuzzy): Convert return type from tree to
5481 const char *.
5482
d022c55a
JM
54832016-07-15 Jason Merrill <jason@redhat.com>
5484
5485 * c-opts.c (c_common_post_options): Update -fabi-version default to 11.
5486
ddbbcb19
JJ
54872016-07-15 Jakub Jelinek <jakub@redhat.com>
5488
5489 PR c/71858
5490 * c-common.h (enum lookup_name_fuzzy_kind): Add
5491 FUZZY_LOOKUP_FUNCTION_NAME.
5492
d0cf395a
JM
54932016-07-08 Jason Merrill <jason@redhat.com>
5494
5495 P0145: Refining Expression Order for C++.
5496 * c.opts (-fargs-in-order): Rename to -fstrong-eval-order.
5497 * c-opts.c: Adjust.
5498
98d44e93
MT
54992016-07-05 Markus Trippelsdorf <markus@trippelsdorf.de>
5500
5501 PR c++/71214
5502 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_rvalue_references.
5503
f9d8d994
TS
55042016-06-29 Thomas Schwinge <thomas@codesourcery.com>
5505
5506 * c-pragma.h (enum pragma_kind): Rename
5507 PRAGMA_OMP_DECLARE_REDUCTION to PRAGMA_OMP_DECLARE. Adjust all
5508 users.
5509
4aa83879
RB
55102016-06-29 Richard Biener <rguenther@suse.de>
5511
5512 PR middle-end/71002
5513 * c-common.c (c_common_get_alias_set): Remove union type punning case.
5514
a25bd9e6
JM
55152016-06-24 Jason Merrill <jason@redhat.com>
5516
5517 P0145R2: Refining Expression Order for C++.
5518 * c-common.c (verify_tree) [COMPOUND_EXPR]: Fix handling on LHS of
5519 MODIFY_EXPR.
5520
a86451b9
JJ
55212016-06-24 Jakub Jelinek <jakub@redhat.com>
5522
5523 * c-common.c (check_builtin_function_arguments): Require last
5524 argument of BUILT_IN_*_OVERFLOW_P to have INTEGER_TYPE type.
5525 Adjust wording of diagnostics for BUILT_IN_*_OVERLFLOW
5526 if the last argument is pointer to enumerated or boolean type.
5527
1a4f11c8
DM
55282016-06-22 David Malcolm <dmalcolm@redhat.com>
5529
5530 PR c/70339
5531 * c-common.h (enum lookup_name_fuzzy_kind): New enum.
5532 (lookup_name_fuzzy): New prototype.
5533
fe55692c
JDA
55342016-06-21 John David Anglin <danglin@gcc.gnu.org>
5535
5536 * c-common.c (get_source_date_epoch): Use int64_t instead of long long.
5537
4eb24e01
JM
55382016-06-14 Jason Merrill <jason@redhat.com>
5539
5540 P0145R2: Refining Expression Order for C++.
5541 * c.opt (fargs-in-order): New.
5542 * c-opts.c (c_common_post_options): Adjust flag_args_in_order.
5543
ef7cf206
JJ
55442016-06-13 Jakub Jelinek <jakub@redhat.com>
5545
0dda258b
JJ
5546 PR sanitizer/71498
5547 * c-gimplify.c (ubsan_walk_array_refs_r): Set *walk_subtrees = 0 on
5548 all BIND_EXPRs, and on all BIND_EXPRs recurse also on BIND_EXPR_BODY.
5549
ef7cf206
JJ
5550 PR preprocessor/71183
5551 * c-ppoutput.c (init_pp_output): Set cb->get_source_date_epoch
5552 to cb_get_source_date_epoch.
5553
50b15873
JJ
55542016-06-10 Jakub Jelinek <jakub@redhat.com>
5555
5556 PR c/68657
5557 * c.opt (Wpsabi): Add Warning flag.
5558
4d926e34
MS
55592016-06-10 Martin Sebor <msebor@redhat.com>
5560
5561 PR c/71392
14ec014e 5562 * c-common.c (handle_nonnull_attribute): Accept
4d926e34
MS
5563 the nonnull attribute in type-generic builtins.
5564
e01b4e16
MS
55652016-06-09 Martin Sebor <msebor@redhat.com>
5566
5567 PR c/70883
5568 * c-common.c (builtin_function_validate_nargs): Make text of error
5569 message consistent with others like it.
5570
44a845ca
MS
55712016-06-08 Martin Sebor <msebor@redhat.com>
5572 Jakub Jelinek <jakub@redhat.com>
5573
5574 PR c++/70507
5575 PR c/68120
5576 * c-common.c (check_builtin_function_arguments): Handle
5577 BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
5578
a80a7051
RB
55792016-06-08 Richard Biener <rguenther@suse.de>
5580
5581 * c-common.c (parse_optimize_options): Improve diagnostic messages.
5582
bfd67b47
RB
55832016-06-07 Richard Biener <rguenther@suse.de>
5584
5585 PR c/61564
5586 * c-common.c (parse_optimize_options): Only apply CL_OPTIMIZATION
5587 options and warn about others.
5588
15c98b2e
ES
55892016-06-01 Eduard Sanou <dhole@openmailbox.org>
5590
5591 * c-common.c (get_source_date_epoch): Rename to
5592 cb_get_source_date_epoch.
5593 * c-common.c (cb_get_source_date_epoch): Use a single generic erorr
5594 message when the parsing fails. Use error_at instead of fatal_error.
5595 * c-common.h (get_source_date_epoch): Rename to
5596 cb_get_source_date_epoch.
5597 * c-common.h (cb_get_source_date_epoch): Prototype.
5598 * c-common.h (MAX_SOURCE_DATE_EPOCH): Define.
5599 * c-common.h (c_omp_region_type): Remove trailing comma.
5600 * c-lex.c (init_c_lex): Set cb->get_source_date_epoch callback.
5601 * c-lex.c (c_lex_with_flags): Remove initialization of
5602 pfile->source_date_epoch.
5603
00631022
JJ
56042016-05-30 Jakub Jelinek <jakub@redhat.com>
5605
5606 PR c++/71349
5607 * c-omp.c (c_omp_split_clauses): Put OMP_CLAUSE_DEPEND to
5608 C_OMP_CLAUSE_SPLIT_TARGET. Put OMP_CLAUSE_NOWAIT to
5609 C_OMP_CLAUSE_SPLIT_TARGET if combined with target construct,
5610 instead of C_OMP_CLAUSE_SPLIT_FOR.
5611
f17a223d
RB
56122016-05-24 Richard Biener <rguenther@suse.de>
5613
5614 PR middle-end/70434
5615 PR c/69504
5616 * c-common.h (convert_vector_to_pointer_for_subscript): Rename to ...
5617 (convert_vector_to_array_for_subscript): ... this.
5618 * c-common.c (convert_vector_to_pointer_for_subscript): Use a
5619 VIEW_CONVERT_EXPR to an array type. Rename to ...
5620 (convert_vector_to_array_for_subscript): ... this.
5621
4f2e1536
MP
56222016-05-12 Marek Polacek <polacek@redhat.com>
5623
5624 PR c/70756
5625 * c-common.c (pointer_int_sum): Call size_in_bytes_loc instead of
5626 size_in_bytes and pass LOC to it.
5627
d6e83a8d
MM
56282016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
5629
5630 PR c/43651
5631 * c.opt (Wduplicate-decl-specifier): New option.
5632
5c3a10fb
MP
56332016-05-11 Marek Polacek <polacek@redhat.com>
5634
5635 PR c++/71024
5636 * c-common.c (diagnose_mismatched_attributes): New function.
5637 * c-common.h (diagnose_mismatched_attributes): Declare.
5638
deef7113
MP
56392016-05-04 Marek Polacek <polacek@redhat.com>
5640
5641 * c.opt (Wdangling-else): New option.
5642
79ce98bc
MP
56432016-05-03 Marek Polacek <polacek@redhat.com>
5644
5645 PR c/70859
5646 * c-common.c (builtin_function_validate_nargs): Add location
5647 parameter. Use it.
5648 (check_builtin_function_arguments): Add location and arguments
5649 parameters. Use them.
5650 * c-common.h (check_builtin_function_arguments): Update declaration.
5651
381cdae4
RB
56522016-05-03 Richard Biener <rguenther@suse.de>
5653
5654 * cilk.c (cilk_gimplify_call_params_in_spawned_fn): Do not
5655 allow call args to gimplify to SSA names.
5656
1d793c34
MP
56572016-05-03 Marek Polacek <polacek@redhat.com>
5658
5659 * c-common.h (enum c_omp_region_type): Remove stray comma.
5660
77886428
CP
56612016-05-02 Cesar Philippidis <cesar@codesourcery.com>
5662
5663 * c-common.h (enum c_omp_region_type): Define.
5664
697e0b28
RS
56652016-05-02 Richard Sandiford <richard.sandiford@arm.com>
5666
5667 * c-common.c (shorten_compare): Use wi::to_wide.
5668
e7ff0319
CP
56692016-04-29 Cesar Philippidis <cesar@codesourcery.com>
5670
5671 PR middle-end/70626
5672 * c-common.h (c_oacc_split_loop_clauses): Add boolean argument.
5673 * c-omp.c (c_oacc_split_loop_clauses): Use it to duplicate
5674 reduction clauses in acc parallel loops.
5675
2fff3db8
MP
56762016-04-29 Marek Polacek <polacek@redhat.com>
5677
5678 PR c/70852
5679 * c-common.c (warn_for_memset): Check domain before accessing it.
5680
509063eb
DV
56812016-04-29 Dominik Vogt <vogt@linux.vnet.ibm.com>
5682
5683 PR/69089
5684 * c-common.c (handle_aligned_attribute): Allow 0 as an argument to the
5685 "aligned" attribute.
5686
b632761d
JM
56872016-04-28 Jason Merrill <jason@redhat.com>
5688
5689 * c-lex.c (c_common_has_attribute): Handle nodiscard.
5690
174f6622
ES
56912016-04-28 Eduard Sanou <dhole@openmailbox.org>
5692 Matthias Klose <doko@debian.org>
5693
5694 * c-common.c (get_source_date_epoch): New function, gets the environment
7365279f 5695 variable SOURCE_DATE_EPOCH and parses it as long long with error
174f6622
ES
5696 handling.
5697 * c-common.h (get_source_date_epoch): Prototype.
5698 * c-lex.c (c_lex_with_flags): set parse_in->source_date_epoch.
5699
6bc2bb18
RB
57002015-04-27 Ryan Burn <contact@rnburn.com>
5701
5702 PR c++/69024
5703 PR c++/68997
5704 * cilk.c (cilk_ignorable_spawn_rhs_op): Change to external linkage.
5705 (cilk_recognize_spawn): Renamed from recognize_spawn and change to
5706 external linkage.
5707 (cilk_detect_and_unwrap): Corresponding changes.
5708 (extract_free_variables): Don't extract free variables from
5709 AGGR_INIT_EXPR slot.
5710 * c-common.h (cilk_ignorable_spawn_rhs_op): Prototype.
5711 (cilk_recognize_spawn): Likewise.
5712
c1e1f433
BS
57132016-04-27 Bernd Schmidt <bschmidt@redhat.com>
5714
5715 * c.opt (Wmemset-elt-size): New option.
5716 * c-common.c (warn_for_memset): New function.
5717 * c-common.h (warn_for_memset): Declare.
5718
d067e05f
JM
57192016-04-25 Jason Merrill <jason@redhat.com>
5720
5721 * c-common.c (handle_unused_attribute): Accept CONST_DECL.
5722 No longer static.
5723 * c-common.h: Declare it.
5724 * c-lex.c (c_common_has_attribute): Add maybe_unused.
5725
9aa36ae5
JM
57262016-04-22 Jason Merrill <jason@redhat.com>
5727
5728 * c-cppbuiltin.c (c_cpp_builtins): Fix __cpp_range_based_for.
5729
477d4906
IV
57302016-04-20 Ilya Verbin <ilya.verbin@intel.com>
5731
5732 PR c++/69363
5733 * c-cilkplus.c (c_finish_cilk_clauses): Remove function.
5734 * c-common.h (c_finish_cilk_clauses): Remove declaration.
5735
fe37c7af
MM
57362016-04-18 Michael Matz <matz@suse.de>
5737
5738 * c-common.c (handle_aligned_attribute): Use SET_TYPE_ALIGN
5739 and SET_DECL_ALIGN.
5740
23f2660f
EB
57412016-04-17 Eric Botcazou <ebotcazou@adacore.com>
5742
5743 * c-ada-spec.c (get_underlying_decl): Return the typedef, if any.
5744 (dump_generic_ada_node) <POINTER_TYPE>: Clean up handling of access
5745 to incomplete types.
5746 (dump_nested_type): Remove redundant tests and tidy up.
5747 (print_ada_declaration): Also set TREE_VISITED on the declaration of
5748 a type which is the typedef of an original type.
5749
1e77281b
MP
57502016-04-15 Marek Polacek <polacek@redhat.com>
5751
5752 PR c/70651
5753 * c-common.c (build_va_arg): Change two asserts into errors and return
5754 error_mark_node.
5755
b3a77f21
MP
57562016-04-13 Marek Polacek <polacek@redhat.com>
5757
5758 PR c++/70639
5759 * c-indentation.c (should_warn_for_misleading_indentation): Bail out
5760 for switch statements, too.
5761
322b8466
JM
57622016-03-28 Jason Merrill <jason@redhat.com>
5763
5764 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_range_based_for.
5765
fbdb6baf
MP
57662016-03-23 Marek Polacek <polacek@redhat.com>
5767
5768 PR c++/69884
5769 * c.opt (Wignored-attributes): New option.
5770
5c240f4d
DM
57712016-03-22 David Malcolm <dmalcolm@redhat.com>
5772
5773 PR c/69993
5774 * c-indentation.c (warn_for_misleading_indentation): Rewrite the
5775 diagnostic text, reversing the order of the warning and note so
5776 that they appear in source order.
5777
14ba7b28
MP
57782016-03-17 Marek Polacek <polacek@redhat.com>
5779
5780 PR c/69407
5781 * c-common.c (resolve_overloaded_builtin): Set TREE_USED for the fetch
5782 operations.
5783
08a1cadc
JM
57842016-03-14 Jason Merrill <jason@redhat.com>
5785
2aaeea19
JM
5786 * c-cppbuiltin.c (c_cpp_builtins): Set __cpp_hex_float.
5787
08a1cadc
JM
5788 * c-cppbuiltin.c (c_cpp_builtins): Bump __cpp_range_based_for.
5789
c06d25bb
RB
57902016-03-09 Richard Biener <rguenther@suse.de>
5791
5792 PR c/70143
5793 * c-common.c (strict_aliasing_warning): Add back
5794 alias_sets_conflict_p check.
5795
80aac5c8
JM
57962016-03-08 Jason Merrill <jason@redhat.com>
5797
5798 * c-opts.c (set_std_cxx1z): Don't enable concepts.
5799
64b23c13
DM
58002016-03-04 David Malcolm <dmalcolm@redhat.com>
5801
5802 PR c/68187
5803 * c-indentation.c (get_visual_column): Move code to determine next
5804 tab stop to...
5805 (next_tab_stop): ...this new function.
5806 (line_contains_hash_if): Delete function.
5807 (detect_preprocessor_logic): Delete function.
5808 (get_first_nws_vis_column): New function.
5809 (detect_intervening_unindent): New function.
5810 (should_warn_for_misleading_indentation): Replace call to
5811 detect_preprocessor_logic with a call to
5812 detect_intervening_unindent.
5813
729526f5
DM
58142016-03-04 David Malcolm <dmalcolm@redhat.com>
5815
5816 PR c/68187
5817 * c-indentation.c (should_warn_for_misleading_indentation): When
5818 suppressing warnings about cases where the guard and body are on
5819 the same column, only use the first non-whitespace column in place
5820 of the guard token column when dealing with "else" clauses.
5821 When rejecting aligned BODY and NEXT, loosen the requirement
5822 from equality with the first non-whitespace of guard to simply
5823 that they not be indented relative to it.
5824
e9a35493
RB
58252016-03-04 Richard Biener <rguenther@suse.de>
5826
5827 PR c++/70054
5828 * c-common.c (strict_aliasing_warning): Use alias_set_subset_of
5829 instead of alias_sets_conflict_p.
5830
1be56bc5
MP
58312016-03-01 Marek Polacek <polacek@redhat.com>
5832
5833 PR c++/69795
5834 * c-common.c (reject_gcc_builtin): Check for FUNCTION_DECL rather than
5835 any DECL.
5836
35886f0b
MS
58372016-02-22 Martin Sebor <msebor@redhat.com>
5838
5839 PR middle-end/69780
5840 * c-common.c (check_builtin_function_arguments): Validate and
5841 reject invalid arguments to __builtin_alloca_with_align.
5842
4246c8da
MW
58432016-02-20 Mark Wielaard <mjw@redhat.com>
5844
5845 PR c/28901
5846 * c.opt (Wunused-const-variable): Turn into Alias for...
5847 (Wunused-const-variable=): New option.
5848
268be88c
BE
58492016-02-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
5850
5851 PR c++/69865
5852 * c-opts.c (c_common_post_options): Move call to set_std_cxx14 from
5853 here...
5854 (c_common_init_options): ...to here.
5855 (set_std_cxx98): Initialize flag_isoc94 and flag_isoc99.
5856
871b3f47
JJ
58572016-02-19 Jakub Jelinek <jakub@redhat.com>
5858
5859 PR c++/69826
5860 * c-pragma.c (c_pp_lookup_pragma): Handle PRAGMA_CILK_GRAINSIZE.
5861 (init_pragma): Register PRAGMA_CILK_GRAINSIZE even for
5862 flag_preprocess_only.
5863
bf14eba2
JJ
58642016-02-16 Jakub Jelinek <jakub@redhat.com>
5865
5866 PR c/69835
5867 * c.opt (Wnonnull-compare): Enable for -Wall.
5868
ba6b3795
JJ
58692016-02-15 Jakub Jelinek <jakub@redhat.com>
5870
5871 PR c++/69797
5872 * c-common.c (sync_resolve_size): Diagnose too few arguments
5873 even when params is non-NULL empty vector.
5874
a011cd92
BS
58752016-02-08 Bernd Schmidt <bschmidt@redhat.com>
5876
5877 PR target/60410
5878 * c.opt (fshort-double): Remove.
5879
46cb9332
MS
58802016-02-05 Martin Sebor <msebor@redhat.com>
5881
5882 PR c++/69662
5883 * c.opt (Warning options): Update -Wplacement-new to take
5884 an optional argument.
5885
e1b81f2b
JJ
58862016-02-01 Jakub Jelinek <jakub@redhat.com>
5887
5888 PR preprocessor/69543
5889 PR c/69558
5890 * c-pragma.c (handle_pragma_diagnostic): Pass input_location
5891 instead of loc to control_warning_option.
5892
b6adbb9f
NS
58932016-02-01 Nathan Sidwell <nathan@codesourcery.com>
5894
5895 * c.opt (fopenacc-dim=): New option.
5896
5d70666e
RB
58972016-01-27 Ryan Burn <contact@rnburn.com>
5898
5899 PR cilkplus/69267
5900 * cilk.c (cilk_gimplify_call_params_in_spawned_fn): Change to use
5901 gimplify_arg. Removed superfluous post_p argument.
5902 * c-family.h (cilk_gimplify_call_params_in_spawned_fn): Removed
5903 superfluous post_p argument.
5904 * c-gimplify.c (c_gimplify_expr): Likewise.
5905
01e1dea3
DM
59062016-01-26 David Malcolm <dmalcolm@redhat.com>
5907
5908 PR other/69006
5909 * c-opts.c (c_diagnostic_finalizer): Replace invocation of
5910 pp_newline_and_flush with pp_flush.
5911
9f04a53e
MS
59122016-01-20 Martin Sebor <msebor@redhat.com>
5913
5914 PR c/69405
5915 * c-common.c (sync_resolve_size): Avoid printing diagnostic about
5916 an incompatible argument when the argument isn't a valid tree node.
5917
7f26f7df
JM
59182016-01-18 Jason Merrill <jason@redhat.com>
5919
5920 PR c++/68767
5921 * c-common.c (check_function_arguments_recurse): Fold the whole
5922 COND_EXPR, not just the condition.
5923
f62bf092
TV
59242016-01-18 Tom de Vries <tom@codesourcery.com>
5925
5926 * c-omp.c (c_oacc_split_loop_clauses): Don't copy OMP_CLAUSE_REDUCTION,
5927 classify as loop clause.
5928
e0a575ff
JJ
59292016-01-15 Jakub Jelinek <jakub@redhat.com>
5930
5931 PR bootstrap/68271
5932 * c-pragma.c (c_register_pragma_1): Adjust comment to note that
5933 C++ FE no longer has limit on number of pragmas.
5934
59352015-01-14 Ryan Burn <contact@rnburn.com>
b6e3db06
RB
5936
5937 PR c++/69048
5938 * cilk.c (create_cilk_wrapper_body): Call fold_build_cleanup_point_expr
c47eaca6 5939 to add missing cleanup point.
b6e3db06 5940
c7df95d8
DM
59412016-01-14 David Malcolm <dmalcolm@redhat.com>
5942
5943 PR c++/68819
5944 * c-indentation.c (get_visual_column): Add location_t param.
5945 Handle the column number being zero by effectively disabling the
5946 warning, with an "inform".
5947 (should_warn_for_misleading_indentation): Add location_t argument
5948 for all uses of get_visual_column.
5949
21efdd80
PP
59502016-01-10 Patrick Palka <ppalka@gcc.gnu.org>
5951
5952 PR c++/69029
5953 * c-indentation.c (should_warn_for_misleading_indentation):
5954 Don't warn about do-while statements.
5955
7a127fa7
MS
59562016-01-07 Martin Sebor <msebor@redhat.com>
5957
5958 PR c/68966
5959 * c-common.c (sync_resolve_size): Reject first argument when it's
5960 a pointer to _Bool.
5961
c589e975
DM
59622016-01-05 David Malcolm <dmalcolm@redhat.com>
5963
5964 PR c/69122
5965 * c-indentation.c (get_visual_column): Remove default argument.
5966 (should_warn_for_misleading_indentation): For the multiline case,
5967 update call to get_visual_column for next_stmt_exploc so that it
5968 captures the location of the first non-whitespace character in the
5969 relevant line. Don't issue warnings if there is non-whitespace
5970 before the next statement.
5971
818ab71a
JJ
59722016-01-04 Jakub Jelinek <jakub@redhat.com>
5973
5974 Update copyright years.
5975
745e411d
DM
59762015-12-21 David Malcolm <dmalcolm@redhat.com>
5977
5978 * c-common.c (binary_op_error): Convert first param from
5979 location_t to rich_location * and use it when emitting an error.
5980 * c-common.h (binary_op_error): Convert first param from
5981 location_t to rich_location *.
5982
de67c4c3
DM
59832015-12-16 David Malcolm <dmalcolm@redhat.com>
5984
5985 * c-common.h (conflict_marker_get_final_tok_kind): New prototype.
5986 * c-lex.c (conflict_marker_get_final_tok_kind): New function.
5987
4a38b02b
IV
59882015-12-15 Ilya Verbin <ilya.verbin@intel.com>
5989
5990 * c-common.c (c_common_attribute_table): Handle "omp declare target
5991 link" attribute.
5992
54d62f51
JJ
59932015-12-14 Jakub Jelinek <jakub@redhat.com>
5994
5995 PR c/68833
5996 * c.opt (Wmissing-format-attribute, Wnormalized): Add Warning option.
5997
8d4227c8
TB
59982014-12-12 Tobias Burnus <burnus@net-b.de>
5999
6000 PR fortran/68815
6001 * c-format.c (gcc_gfc_char_table): Add 'q' flag to remaining
6002 specifiers (%d, %i,%u and %c).
6003
f6069ccc
DM
60042015-12-10 David Malcolm <dmalcolm@redhat.com>
6005
6006 * c.opt (Wmisleading-indentation): Add to -Wall for C and C++.
6007
63bbf46d
JJ
60082015-12-08 Jakub Jelinek <jakub@redhat.com>
6009
6010 PR c/48088
6011 PR c/68657
6012 * c.opt (Wfloat-conversion, Wsign-conversion): Add Warning.
6013 * c-pragma.c (handle_pragma_diagnostic): Adjust
6014 control_warning_option caller.
6015
f79520bb
DM
60162015-12-07 David Malcolm <dmalcolm@redhat.com>
6017
6018 * c-common.c (c_cpp_error): Update for change to
6019 rich_location::set_range.
6020
b3d5bc62
JJ
60212015-12-04 Paolo Bonzini <bonzini@gnu.org>
6022
6023 * c-common.c (maybe_warn_shift_overflow): Warn on all overflows if
6024 shifting 1 out of the sign bit.
6025
60262015-12-04 Kirill Yukhin <kirill.yukhin@intel.com>
6027
6028 * c-common.c (c_common_attribute_table[]): Update max arguments
6029 count for "simd" attribute.
6030 (handle_simd_attribute): Parse "notinbranch" and "inbranch" arguments.
6031
6eb4a537
JJ
60322015-12-03 Jakub Jelinek <jakub@redhat.com>
6033
6034 PR preprocessor/57580
6035 * c-ppoutput.c (print): Change printed field to bool.
6036 Move src_file last for smaller padding.
6037 (init_pp_output): Set print.printed to false instead of 0.
6038 (scan_translation_unit): Fix up formatting. Set print.printed
6039 to true after printing something other than newline.
6040 (scan_translation_unit_trad): Set print.printed to true instead of 1.
6041 (maybe_print_line_1): Set print.printed to false instead of 0.
6042 (print_line_1): Likewise.
6043 (do_line_change): Set print.printed to true instead of 1.
6044 (cb_define, dump_queued_macros, cb_include, cb_def_pragma,
6045 dump_macro): Set print.printed to false after printing newline.
6046
4250754e
JM
60472015-12-02 Jason Merrill <jason@redhat.com>
6048
f479b43d
JM
6049 * c-common.c (fold_for_warn): New.
6050 (warn_logical_operator, warn_tautological_cmp)
6051 (check_function_arguments_recurse, maybe_warn_bool_compare): Use it.
6052
4250754e
JM
6053 * c-common.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
6054 (c_fully_fold_internal, decl_constant_value_for_optimization):
6055 Move to c/c-fold.c.
6056 * c-common.h: Don't declare decl_constant_value_for_optimization.
6057
e9e32ee6
JM
60582015-12-02 Joseph Myers <joseph@codesourcery.com>
6059
6060 PR c/68162
6061 * c-common.h (c_build_qualified_type): Add extra default
6062 arguments.
6063
37d5ad46
JB
60642015-12-01 Julian Brown <julian@codesourcery.com>
6065 Cesar Philippidis <cesar@codesourcery.com>
6066 James Norris <James_Norris@mentor.com>
6067
6068 * c-pragma.c (oacc_pragmas): Add PRAGMA_OACC_HOST_DATA.
6069 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_HOST_DATA.
6070 (pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_USE_DEVICE.
6071
f07862c7
EB
60722015-11-30 Eric Botcazou <ebotcazou@adacore.com>
6073
6074 * c-ada-spec.c (print_ada_macros): Remove redundant blank line.
6075 (decl_sloc_common): Delete and move bulk of processing to...
6076 (decl_sloc): ...here.
6077 (pp_ada_tree_identifier): Remove reference to QUAL_UNION_TYPE.
6078 (dump_ada_double_name): Remove S parameter and compute the suffix.
6079 (dump_ada_array_type): Add PARENT parameter. Simplify computation of
6080 element type and deal with an anonymous one.
6081 (dump_ada_template): Use RECORD_OR_UNION_TYPE_P macro.
6082 (dump_generic_ada_node): Tweak. Adjust call to dump_ada_array_type
6083 and remove reference to QUAL_UNION_TYPE.
6084 (dump_nested_types): Make 2 passes on the fields and move bulk to...
6085 (dump_nested_type): ...here. New function extracted from above.
6086 Generate a full declaration for anonymous element type of arrays.
6087 (print_ada_declaration): Really skip anonymous declarations. Remove
6088 references to QUAL_UNION_TYPE. Adjust call to dump_ada_array_type.
6089 Clean up processing of declarations of array types and objects.
6090 (print_ada_struct_decl): Remove reference to QUAL_UNION_TYPE.
6091 Remove obsolete code and tidy up.
6092
75c8aac3
JH
60932015-11-29 Jan Hubicka <hubicka@ucw.cz>
6094
6095 PR c/67581
6096 * c-common.c (handle_transparent_union_attribute): Update
6097 also type variants.
6098
b58d3df2
ML
60992015-11-27 Martin Liska <mliska@suse.cz>
6100
6101 PR c++/68312
6102 * array-notation-common.c (cilkplus_extract_an_triplets):
6103 Release vector of vectors.
6104 * cilk.c (gimplify_cilk_spawn): Free allocated memory.
6105
89a01fcf
EB
61062015-11-26 Eric Botcazou <ebotcazou@adacore.com>
6107
6108 PR c++/68527
6109 * c-ada-spec.c (dump_nested_types): Add guard for error_mark_node.
6110 (print_ada_struct_decl): Likewise.
6111
cc5c5226
IZ
61122015-11-23 Igor Zamyatin <igor.zamyatin@intel.com>
6113
6114 PR c++/68001
6115 * c-gimplify.c (c_gimplify_expr): Stop the process if see an error.
6116 * cilk.c (recognize_spawn): Determine location in a more precise
6117 way.
6118
269adb9d
JM
61192015-11-19 Jason Merrill <jason@redhat.com>
6120
6121 * c-common.c (shorten_compare): But look through macros from
6122 system headers.
6123
d0eccfcd
JM
61242015-11-18 Jason Merrill <jason@redhat.com>
6125
6126 * c-common.c (shorten_compare): Don't -Wtype-limits if the
6127 non-constant operand comes from a macro.
6128
3e44547c
JM
61292015-11-17 Jason Merrill <jason@redhat.com>
6130
6131 PR bootstrap/68346
6132 * c-common.c (warn_tautological_cmp): Fold before checking for
6133 constants.
6134
0f62c7a0
MP
61352015-11-16 Marek Polacek <polacek@redhat.com>
6136
6137 PR c++/68362
6138 * c-common.c (check_case_bounds): Fold low and high cases.
6139
a868811e
MP
61402015-11-16 Marek Polacek <polacek@redhat.com>
6141
6142 * c-ada-spec.c (dump_ada_template): Use RECORD_OR_UNION_TYPE_P.
6143 * c-common.c (c_common_get_alias_set): Likewise.
6144 (handle_visibility_attribute): Likewise.
6145
fff77217
KY
61462015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
6147
6148 * c-common.c (handle_simd_attribute): New.
6149 (struct attribute_spec): Add entry for "simd".
6150 (handle_simd_attribute): New.
6151
269e63b7
KT
61522015-11-13 Kai Tietz <ktietz70@googlemail.com>
6153
6154 * c-lex.c (interpret_float): Use fold_convert.
6155
ebedc9a3
DM
61562015-11-13 David Malcolm <dmalcolm@redhat.com>
6157
6158 * c-common.c (c_fully_fold_internal): Capture existing souce_range,
6159 and store it on the result.
6160 * c-opts.c (c_common_init_options): Set
6161 global_dc->colorize_source_p.
6162
6e232ba4
JN
61632015-11-12 James Norris <jnorris@codesourcery.com>
6164 Joseph Myers <joseph@codesourcery.com>
6165
7365279f 6166 * c-pragma.c (oacc_pragmas): Add entry for declare directive.
6e232ba4
JN
6167 * c-pragma.h (enum pragma_kind): Add PRAGMA_OACC_DECLARE.
6168 (enum pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT and
6169 PRAGMA_OACC_CLAUSE_LINK.
6170
e78bede6
MP
61712015-11-11 Marek Polacek <polacek@redhat.com>
6172
6173 PR c/68107
6174 PR c++/68266
6175 * c-common.c (valid_array_size_p): New function.
6176 * c-common.h (valid_array_size_p): Declare.
6177
3f8257db 61782015-11-11 Dominique d'Humieres <dominiq@lps.ens.fr>
4ac93c7c
DH
6179
6180 PR bootstrap/68271
6181 * c-pragma.c (c_register_pragma_1): Update the gcc_assert to 256.
6182
69f293c9
AM
61832015-11-11 Andrew MacLeod <amacleod@redhat.com>
6184
6185 * array-notation-common.c: Remove unused header files.
6186 * c-ada-spec.c: Likewise.
6187 * c-cilkplus.c: Likewise.
6188 * c-common.c: Likewise.
6189 * c-cppbuiltin.c: Likewise.
6190 * c-dump.c: Likewise.
6191 * c-format.c: Likewise.
6192 * c-gimplify.c: Likewise.
6193 * c-indentation.c: Likewise.
6194 * c-lex.c: Likewise.
6195 * c-omp.c: Likewise.
6196 * c-opts.c: Likewise.
6197 * c-pch.c: Likewise.
6198 * c-ppoutput.c: Likewise.
6199 * c-pragma.c: Likewise.
6200 * c-pretty-print.c: Likewise.
6201 * c-semantics.c: Likewise.
6202 * c-ubsan.c: Likewise.
6203 * cilk.c: Likewise.
6204 * stub-objc.c: Likewise.
6205
3a40d81d
NS
62062015-11-09 Thomas Schwinge <thomas@codesourcery.com>
6207 Cesar Philippidis <cesar@codesourcery.com>
6208 James Norris <jnorris@codesourcery.com>
6209 Julian Brown <julian@codesourcery.com>
6210 Nathan Sidwell <nathan@codesourcery.com>
6211
6212 * c-pragma.c (oacc_pragmas): Add "routine".
6213 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_ROUTINE.
6214
ee45a32d
EB
62152015-11-08 Eric Botcazou <ebotcazou@adacore.com>
6216
6217 * c-common.c (c_common_attributes): Add scalar_storage_order.
6218 (handle_scalar_storage_order_attribute): New function.
6219 * c-pragma.c (global_sso): New variable.
6220 (maybe_apply_pragma_scalar_storage_order): New function.
6221 (handle_pragma_scalar_storage_order): Likewise.
6222 (init_pragma): Register scalar_storage_order.
6223 * c-pragma.h (maybe_apply_pragma_scalar_storage_order): Declare.
6224 * c.opt (Wscalar-storage-order): New warning.
6225 (fsso-struct=): New option.
6226
eb11eb15
MS
62272015-11-08 Martin Sebor <msebor@redhat.com>
6228
6229 * c.opt (Wplacement-new): Add a period to the end of a sentence.
6230
0aad0198
RS
62312015-11-07 Richard Sandiford <richard.sandiford@arm.com>
6232
6233 * c-common.c: Don't undef DEF_BUILTIN.
6234
8a645150
DM
62352015-11-06 David Malcolm <dmalcolm@redhat.com>
6236
6237 * c-common.c (c_cpp_error): Convert parameter from location_t to
6238 rich_location *. Eliminate the "column_override" parameter and
6239 the call to diagnostic_override_column.
6240 Update the "done_lexing" clause to set range 0
6241 on the rich_location, rather than overwriting a location_t.
6242 * c-common.h (c_cpp_error): Convert parameter from location_t to
6243 rich_location *. Eliminate the "column_override" parameter.
6244
7a5e4956
CP
62452015-11-05 Cesar Philippidis <cesar@codesourcery.com>
6246 Thomas Schwinge <thomas@codesourcery.com>
6247 James Norris <jnorris@codesourcery.com>
6248
6249 * c-omp.c (c_oacc_split_loop_clauses): Make TILE, GANG, WORKER, VECTOR,
6250 AUTO, SEQ, INDEPENDENT and PRIVATE loop clauses. Associate REDUCTION
6251 clauses with parallel and kernels and loops.
6252 * c-pragma.h (enum pragma_omp_clause): Add entries for
6253 PRAGMA_OACC_CLAUSE_{INDEPENDENT,TILE,DEFAULT}.
6254 * pt.c (tsubst_omp_clauses): Add support for OMP_CLAUSE_{NUM_GANGS,
6255 NUM_WORKERS,VECTOR_LENGTH,GANG,WORKER,VECTOR,ASYNC,WAIT,TILE,AUTO,
6256 INDEPENDENT,SEQ}.
6257 (tsubst_expr): Add support for OMP_CLAUSE_{KERNELS,PARALLEL,LOOP}.
6258
e2f5cc96
MS
62592015-11-05 Martin Sebor <msebor@redhat.com>
6260
6261 PR c++/67942
6262 * c.opt (-Wplacement-new): New option.
6263
e01d41e5
JJ
62642015-11-05 Jakub Jelinek <jakub@redhat.com>
6265
6266 * c-common.h (c_finish_omp_atomic): Add TEST argument.
6267 (c_omp_check_loop_iv, c_omp_check_loop_iv_exprs): New prototypes.
6268 * c-omp.c (c_finish_omp_atomic): Add TEST argument. Don't call
6269 save_expr or create_tmp_var* if TEST is true.
6270 (c_finish_omp_for): Store OMP_FOR_ORIG_DECLS always.
6271 Don't call add_stmt here.
6272 (struct c_omp_check_loop_iv_data): New type.
6273 (c_omp_check_loop_iv_r, c_omp_check_loop_iv,
6274 c_omp_check_loop_iv_exprs): New functions.
6275 (c_omp_split_clauses): Adjust for lastprivate being allowed on
6276 distribute.
6277 (c_omp_declare_simd_clauses_to_numbers): Change
6278 OMP_CLAUSE_LINEAR_VARIABLE_STRIDE OMP_CLAUSE_LINEAR_STEP into numbers.
6279 (c_omp_declare_simd_clauses_to_decls): Similarly change those
6280 from numbers to PARM_DECLs.
6281
595278be
MM
62822015-11-04 Mikhail Maltsev <maltsevm@gmail.com>
6283
6284 * c-omp.c (c_omp_split_clauses): Remove conditional compilation. Use
6285 flag_checking.
6286
3f8257db 62872015-11-03 Bernd Schmidt <bschmidt@redhat.com>
c85158de
MS
6288
6289 PR c++-common/67882
b3d5bc62
JJ
6290 * c-common.h (fold_offsetof_1): Add argument.
6291 * c-common.c (fold_offsetof_1): Diagnose more invalid
c85158de
MS
6292 offsetof expressions that reference elements past the end of
6293 an array.
6294
4bf9e5a8
TS
62952015-11-03 Thomas Schwinge <thomas@codesourcery.com>
6296 Chung-Lin Tang <cltang@codesourcery.com>
6297
6298 * c-pragma.c (oacc_pragmas): Add "atomic".
6299 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_ATOMIC.
6300
3b1661a9
ES
63012015-10-30 Evgeny Stupachenko <evstupac@gmail.com>
6302
6303 * c-common.c (handle_target_clones_attribute): New.
6304 (c_common_attribute_table): Add handle_target_clones_attribute.
6305 (handle_always_inline_attribute): Add check on target_clones attribute.
6306 (handle_target_attribute): Ditto.
6307
2adfab87
AM
63082015-10-29 Andrew MacLeod <amacleod@redhat.com>
6309
6310 * array-notation-common.c: Reorder #include's and remove duplicates.
6311 * c-ada-spec.c: Likewise.
6312 * c-cilkplus.c: Likewise.
6313 * c-common.c: Likewise.
6314 * c-cppbuiltin.c: Likewise.
6315 * c-dump.c: Likewise.
6316 * c-format.c: Likewise.
6317 * c-gimplify.c: Likewise.
6318 * c-indentation.c: Likewise.
6319 * c-lex.c: Likewise.
6320 * c-omp.c: Likewise.
6321 * c-opts.c: Likewise.
6322 * c-pch.c: Likewise.
6323 * c-ppoutput.c: Likewise.
6324 * c-pragma.c: Likewise.
6325 * c-pretty-print.c: Likewise.
6326 * c-semantics.c: Likewise.
6327 * c-ubsan.c: Likewise.
6328 * cilk.c: Likewise.
6329 * stub-objc.c: Likewise.
6330
d90ec4f2
JM
63312015-10-28 Jason Merrill <jason@redhat.com>
6332
6333 * c-common.c (pointer_int_sum): Fold the MULT_EXPR.
6334
88bae6f4
TS
63352015-10-27 Thomas Schwinge <thomas@codesourcery.com>
6336 James Norris <jnorris@codesourcery.com>
6337 Cesar Philippidis <cesar@codesourcery.com>
6338
6339 PR c/64765
6340 PR c/64880
6341 * c-common.h (c_oacc_split_loop_clauses): Declare function.
6342 * c-omp.c (c_oacc_split_loop_clauses): New function.
6343
b1726d6c
MS
63442015-10-21 Martin Sebor <msebor@redhat.com>
6345
6346 PR driver/68043
6347 * c.opt: End each sentence that describes an option with a period.
6348
fa60eeb9
MP
63492015-10-20 Marek Polacek <polacek@redhat.com>
6350
6351 * array-notation-common.c (is_cilkplus_vector_p): Define.
6352 * c-common.h (is_cilkplus_vector_p): Declare.
6353
95979049
MP
63542015-10-20 Marek Polacek <polacek@redhat.com>
6355
6356 * c.opt (std=gnu++11): Do not describe as experimental.
6357 (std=gnu++14): Likewise.
6358
2a9fb712
JM
63592015-10-19 Jason Merrill <jason@redhat.com>
6360
6361 * c-cppbuiltin.c (c_cpp_builtins): Define
6362 __cpp_nontype_template_args.
6363
13b380a3
JM
63642015-10-19 Jason Merrill <jason@redhat.com>
6365
6366 * c-cppbuiltin.c (c_cpp_builtins): Define
6367 __cpp_enumerator_attributes, __cpp_fold_expressions,
6368 __cpp_unicode_characters.
6369
d9a6bd32
JJ
63702015-10-13 Jakub Jelinek <jakub@redhat.com>
6371 Aldy Hernandez <aldyh@redhat.com>
6372
6373 * c-common.c (enum c_builtin_type): Define DEF_FUNCTION_TYPE_9,
6374 DEF_FUNCTION_TYPE_10 and DEF_FUNCTION_TYPE_11.
6375 (c_define_builtins): Likewise.
6376 * c-common.h (enum c_omp_clause_split): Add
6377 C_OMP_CLAUSE_SPLIT_TASKLOOP.
6378 (c_finish_omp_critical, c_finish_omp_ordered): Add CLAUSES argument.
6379 (c_finish_omp_for): Add ORIG_DECLV argument.
6380 * c-cppbuiltin.c (c_cpp_builtins): Predefine _OPENMP as
6381 201511 instead of 201307.
6382 * c-omp.c (c_finish_omp_critical): Add CLAUSES argument, set
6383 OMP_CRITICAL_CLAUSES to it.
6384 (c_finish_omp_ordered): Add CLAUSES argument, set
6385 OMP_ORDERED_CLAUSES to it.
6386 (c_finish_omp_for): Add ORIG_DECLV argument, set OMP_FOR_ORIG_DECLS
6387 to it if OMP_FOR. Clear DECL_INITIAL on the IVs.
6388 (c_omp_split_clauses): Handle OpenMP 4.5 combined/composite
6389 constructs and new OpenMP 4.5 clauses. Clear
6390 OMP_CLAUSE_SCHEDULE_SIMD if not combined with OMP_SIMD. Add
6391 verification code.
6392 * c-pragma.c (omp_pragmas_simd): Add taskloop.
6393 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_TASKLOOP.
6394 (enum pragma_omp_clause): Add
6395 PRAGMA_OMP_CLAUSE_{DEFAULTMAP,GRAINSIZE,HINT,{IS,USE}_DEVICE_PTR}
6396 and PRAGMA_OMP_CLAUSE_{LINK,NOGROUP,NUM_TASKS,PRIORITY,SIMD,THREADS}.
6397
624d31fe
RS
63982015-10-05 Richard Sandiford <richard.sandiford@arm.com>
6399
6400 * c-lex.c (interpret_float): Use real_equal instead of
6401 REAL_VALUES_EQUAL.
6402
b8fd7909
JM
64032015-10-04 Jason Merrill <jason@redhat.com>
6404
6405 Implement N4514, C++ Extensions for Transactional Memory.
6406 * c-common.c (c_common_reswords): Add C++ TM TS keywords.
6407 (c_common_attribute_table): Add transaction_safe_dynamic.
6408 transaction_safe now affects type identity.
6409 (handle_tm_attribute): Handle transaction_safe_dynamic.
6410 * c-common.h (enum rid): Add RID_ATOMIC_NOEXCEPT,
6411 RID_ATOMIC_CANCEL, RID_SYNCHRONIZED.
6412 (OBJC_IS_CXX_KEYWORD): Add RID_SYNCHRONIZED.
6413 (D_TRANSMEM): New.
6414 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_transactional_memory.
6415 * c-pretty-print.c (pp_c_attributes_display): Don't print
6416 transaction_safe in C++.
6417
12651878
MP
64182015-10-02 Marek Polacek <polacek@redhat.com>
6419
6420 * c.opt (Wduplicated-cond): Don't enable by -Wall anymore.
6421
3e3b8d63
MP
64222015-10-02 Marek Polacek <polacek@redhat.com>
6423
6424 PR c/64249
6425 * c-common.c (warn_duplicated_cond_add_or_warn): New function.
6426 * c-common.h (warn_duplicated_cond_add_or_warn): Declare.
6427 * c.opt (Wduplicated-cond): New option.
6428
0d1a8f75
JM
64292015-10-01 Joseph Myers <joseph@codesourcery.com>
6430
6431 * c.opt (std=c11): Do not describe as experimental.
6432 (std=gnu11): Likewise.
6433 (std=iso9899:2011): Likewise.
6434
3e32ee19
NS
64352015-09-28 Nathan Sidwell <nathan@codesourcery.com>
6436
6437 * c-common.c (DEF_FUNCTION_TYPE_VAR_6): New.
6438 (DEF_FUNCTION_TYPE_VAR_11): Delete.
6439
974348ee
MP
64402015-09-25 Marek Polacek <polacek@redhat.com>
6441
6442 * c-ubsan.c (ubsan_instrument_division): Remove unnecessary code.
6443 (ubsan_instrument_shift): Likewise.
6444
15dbc1a6
MP
64452015-09-25 Marek Polacek <polacek@redhat.com>
6446
6447 PR sanitizer/64906
6448 * c-ubsan.c (ubsan_instrument_division): Also pre-evaluate OP1.
6449
6b95d7cc
PP
64502015-09-24 Patrick Palka <ppalka@gcc.gnu.org>
6451
6452 * c-indentation.c (should_warn_for_misleading_indentation):
6453 Compare next_stmt_vis_column with guard_line_first_nws instead
6454 of with guard_line_vis_column.
6455
c1822f9c
MLI
64562015-09-23 Manuel López-Ibáñez <manu@gcc.gnu.org>
6457
6458 PR c/49654
6459 PR c/49655
6460 * c-pragma.c (handle_pragma_diagnostic): Detect non-warning
6461 options and options not valid for the current language.
6462
d5398058
PP
64632015-09-22 Patrick Palka <ppalka@gcc.gnu.org>
6464
6465 * c-indentation.c (should_warn_for_misleading_indentation):
6466 Float out and consolidate the calls to get_visual_column that
6467 are passed guard_exploc as an argument. Compare
6468 next_stmt_vis_column with guard_line_first_nws instead of with
6469 body_line_first_nws.
6470
6b333269
NS
64712015-09-22 Nathan Sidwell <nathan@codesourcery.com>
6472
6473 * c.opt (Wmultiple-inheritance, Wvirtual-inheritance, Wtemplates,
6474 Wnamespaces): New C++ warnings.
6475
a75f1574
JM
64762015-09-22 Jason Merrill <jason@redhat.com>
6477
6478 * c-common.h (abi_compat_version_crosses): New.
6479 (warn_abi_version): Declare.
6480 * c-common.c: Define it.
6481 * c-opts.c (c_common_post_options): Handle it.
6482 flag_abi_compat_version defaults to 8.
6483
bdaaa8b7
VV
64842015-09-21 Ville Voutilainen <ville.voutilainen@gmail.com>
6485
6486 Complete the implementation of N4230, Nested namespace definition.
6487 * c-cppbuiltin.c: Add __cpp_namespace_attributes and
6488 __cpp_nested_namespace_definitions.
6489
eaa797e8
MLI
64902015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
6491
6492 * c-pragma.c (handle_pragma_diagnostic): Fix wrong return.
6493
c4914de6
MLI
64942015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
6495
6496 * c-pragma.c (handle_pragma_diagnostic): Use explicit location
6497 when warning.
6498 * c-pragma.h (pragma_lex): Add optional loc argument.
6499
fcb87c50
MM
65002015-09-16 Mikhail Maltsev <maltsevm@gmail.com>
6501
6502 * c-format.c (check_format_arg): Adjust to use common block size in all
6503 object pools.
6504
31bdd08a
DM
65052015-09-15 David Malcolm <dmalcolm@redhat.com>
6506
6507 * c-format.c (location_from_offset): Update for change in
6508 signature of location_get_source_line.
6509 * c-indentation.c (get_visual_column): Likewise.
6510 (line_contains_hash_if): Likewise.
6511
aa9f4b4c
MP
65122015-09-14 Marek Polacek <polacek@redhat.com>
6513
6514 * c-opts.c (c_common_post_options): Set C++ standard earlier, before
6515 setting various warnings.
6516
aa256c4a
MP
65172015-09-14 Marek Polacek <polacek@redhat.com>
6518
6519 * c-common.c (warn_for_sign_compare): Cast to unsigned when shifting
6520 a negative value.
6521
0f876f22
MW
65222015-09-11 Mark Wielaard <mjw@redhat.com>
6523
6524 PR c/28901
6525 * c.opt (Wunused-variable): Option from common.opt.
6526 (Wunused-const-variable): New option.
6527
273aa49e
PC
65282015-09-09 Paolo Carlini <paolo.carlini@oracle.com>
6529
6530 PR c++/53184
6531 * c.opt ([Wsubobject-linkage]): Add.
6532
1807ffc1
MS
65332015-09-03 Martin Sebor <msebor@redhat.com>
6534
6535 PR c/66516
6536 * c-common.h (c_decl_implicit, reject_gcc_builtin): Declare new
6537 functions.
6538 * c-common.c (reject_gcc_builtin): Define.
6539
38942840
BI
65402015-09-02 Balaji V. Iyer <balaji.v.iyer@intel.com>
6541
6542 PR middle-end/60586
6543 * c-common.h (cilk_gimplify_call_params_in_spawned_fn): New
6544 prototype.
6545 * c-gimplify.c (c_gimplify_expr): Added a call to the function
6546 cilk_gimplify_call_params_in_spawned_fn.
6547 * cilk.c (cilk_gimplify_call_params_in_spawned_fn): New function.
6548 (gimplify_cilk_spawn): Removed EXPR_STMT and CLEANUP_POINT_EXPR
6549 unwrapping.
6550
c316b5e4
MP
65512015-08-25 Marek Polacek <polacek@redhat.com>
6552
6553 PR middle-end/67330
6554 * c-common.c (handle_weak_attribute): Don't check whether the
6555 visibility can be changed here.
6556
584a7c46
MLI
65572015-08-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
6558
6559 * c-lex.c (c_lex_with_flags): Use explicit locations.
6560
a79683d5
TS
65612015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
6562
6563 * c-ada-spec.h, c-common.c, c-common.h, c-format.c, c-format.h,
6564 c-objc.h, c-ppoutput.c, c-pragma.c, c-pragma.h: Remove useless
6565
61717a45
FXC
65662015-08-18 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
6567
6568 PR middle-end/36757
6569 * c-common.c (check_builtin_function_arguments): Add check
6570 for BUILT_IN_SIGNBIT argument.
6571
329524f5
PC
65722015-08-18 Paolo Carlini <paolo.carlini@oracle.com>
6573
6574 PR c++/67160
6575 * c-cppbuiltin.c (c_cpp_builtins): Fix __cpp_static_assert value
6576 in c++1z mode.
6577
4ee55665
MP
65782015-08-17 Marek Polacek <polacek@redhat.com>
6579
6580 * c-pretty-print.c (pp_c_cv_qualifiers): Remove code dealing
6581 with whitespaces before qualifier names.
6582
b893e375
MP
65832015-08-12 Marek Polacek <polacek@redhat.com>
6584
6585 PR c++/55095
6586 * c-common.c (maybe_warn_shift_overflow): Properly handle
6587 left-shifting 1 into the sign bit.
6588
c2d89095
MLI
65892015-08-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
6590
6591 * c.opt (Wchkp): Use LangEnabledBy instead of EnabledBy.
6592
971e17ff
AS
65932015-08-06 Andrew Sutton <andrew.n.sutton@gmail.com>
6594 Braden Obrzut <admin@maniacsvault.net>
6595 Jason Merrill <jason@redhat.com>
6596
6597 Add C++ Concepts TS support.
6598 * c-common.c (c_common_reswords): Add __is_same_as, concept, requires.
6599 * c-common.h (enum rid): Add RID_IS_SAME_AS, RID_CONCEPT, RID_REQUIRES.
6600 (D_CXX_CONCEPTS, D_CXX_CONCEPTS_FLAGS): New.
6601 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_concepts.
6602 * c-opts.c (set_std_cxx1z): Set flag_concepts.
6603 * c.opt (fconcepts): New.
6604
b3d5bc62
JJ
66052015-08-02 Martin Sebor <msebor@redhat.com>
6606
6607 * c.opt (-Wframe-address): New warning option.
6608
8ebca419
PP
66092015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
6610
6611 * c-indentation.c (should_warn_for_misleading_indentation):
6612 Improve heuristics.
6613
1a1e101f
PP
66142015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
6615
6616 * c-indentation.c (get_visual_column): Add parameter first_nws,
6617 use it. Update comment documenting the function.
6618 (is_first_nonwhitespace_on_line): Remove.
6619 (should_warn_for_misleading_indentation): Replace usage of
6620 of is_first_nonwhitespace_on_line with get_visual_column.
6621
992118a1
PP
66222015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
6623
6624 * c-indentation.h (struct token_indent_info): Define.
6625 (get_token_indent_info): Define.
6626 (warn_for_misleading_information): Declare.
6627 * c-common.h (warn_for_misleading_information): Remove.
6628 * c-identation.c (warn_for_misleading_indentation):
6629 Change declaration to take three token_indent_infos. Adjust
6630 accordingly.
6631 * c-identation.c (should_warn_for_misleading_indentation):
6632 Likewise. Bail out early if the body is a compound statement.
6633 (guard_tinfo_to_string): Define.
6634
e8fa3817
JM
66352015-07-30 Jason Merrill <jason@redhat.com>
6636
6637 * c-pretty-print.c (unary_expression) [INDIRECT_REF]: Don't print
6638 '*' for reference decay.
6639
173864e8
MP
66402015-07-30 Marek Polacek <polacek@redhat.com>
6641
6642 * c-common.c (warn_tautological_cmp): Bail for float types.
6643
f2afe6dd
MP
66442015-07-27 Marek Polacek <polacek@redhat.com>
6645
6646 PR bootstrap/67030
6647 * c-common.c (warn_tautological_cmp): Don't warn for macro expansion.
6648
05b28fd6
MP
66492015-07-27 Marek Polacek <polacek@redhat.com>
6650
6651 PR c++/66555
6652 PR c/54979
6653 * c-common.c (find_array_ref_with_const_idx_r): New function.
6654 (warn_tautological_cmp): New function.
6655 * c-common.h (warn_tautological_cmp): Declare.
6656 * c.opt (Wtautological-compare): New option.
6657
5a5062b8
MP
66582015-07-23 Marek Polacek <polacek@redhat.com>
6659
6660 * c-ubsan.c (ubsan_instrument_division): Use unshare_expr throughout.
6661 (ubsan_instrument_shift): Likewise.
6662
dc891fe7
MP
66632015-07-23 Marek Polacek <polacek@redhat.com>
6664
6665 PR sanitizer/66908
6666 * c-ubsan.c: Include gimplify.h.
6667 (ubsan_instrument_division): Unshare OP0 and OP1.
6668 (ubsan_instrument_shift): Likewise.
6669
451b5e48
MP
66702015-07-20 Marek Polacek <polacek@redhat.com>
6671 Richard Sandiford <richard.sandiford@arm.com>
6672
6673 PR c++/55095
6674 * c-common.c (c_fully_fold_internal): Warn about left shift overflows.
6675 Use EXPR_LOC_OR_LOC.
6676 (maybe_warn_shift_overflow): New function.
6677 * c-common.h (maybe_warn_shift_overflow): Declare.
6678 * c-opts.c (c_common_post_options): Set warn_shift_overflow.
6679 * c.opt (Wshift-overflow): New option.
6680
fb0b2914
ML
66812015-07-16 Martin Liska <mliska@suse.cz>
6682
6683 * c-format.c (static void check_format_info_main): Use
6684 object_allocator instead of pool_allocator.
6685 (check_format_arg): Likewise.
6686 (check_format_info_main): Likewise.
6687
903f5c23
AM
66882015-07-15 Andrew MacLeod <amacleod@redhat.com>
6689
6690 * c-opts.c: Remove multiline #include comment.
6691
026c3cfd
AH
66922015-07-12 Aldy Hernandez <aldyh@redhat.com>
6693
6694 * c-common.c: Fix double word typos.
6695
bb49ee66
EB
66962015-07-10 Eric Botcazou <ebotcazou@adacore.com>
6697
6698 * c-ada-spec.h (cpp_operation): Revert latest change.
6699 * c-ada-spec.c (print_ada_declaration): Likewise. Skip implicit
6700 constructors and destructors.
6701
1916bcb5
AM
67022015-07-09 Andrew MacLeod <amacleod@redhat.com>
6703
6704 * c-common.h: Adjust includes for flags.h changes.
6705 * stub-objc.c: Likewise.
026c3cfd 6706
a9dcd529
EB
67072015-07-08 Eric Botcazou <ebotcazou@adacore.com>
6708
6709 * c-ada-spec.h (cpp_operation): Add IS_CONSTEXPR.
6710 * c-ada-spec.c (print_ada_declaration): Skip constexpr constructors.
6711
b03b462f
JJ
67122015-07-08 Jakub Jelinek <jakub@redhat.com>
6713
6714 * c-omp.c (c_omp_declare_simd_clauses_to_numbers): If all clauses
6715 are to be removed, return NULL rather than original clauses list.
6716
c7131fb2
AM
67172015-07-07 Andrew MacLeod <amacleod@redhat.com>
6718
6719 * array-notation-common.c: Adjust includes.
6720 * c-ada-spec.c: Likewise.
6721 * c-cilkplus.c: Likewise.
6722 * c-common.h: Likewise.
6723 * c-cppbuiltin.c: Likewise.
6724 * c-dump.c: Likewise.
6725 * c-format.c: Likewise.
6726 * c-gimplify.c: Likewise.
6727 * c-indentation.c: Likewise.
6728 * c-lex.c: Likewise.
6729 * c-omp.c: Likewise.
6730 * c-opts.c: Likewise.
6731 * c-pch.c: Likewise.
6732 * c-ppoutput.c: Likewise.
6733 * c-pragma.c: Likewise.
6734 * c-pretty-print.c: Likewise.
6735 * c-semantics.c: Likewise.
6736 * c-ubsan.c: Likewise.
6737 * cilk.c: Likewise.
6738 * stub-objc.c: Likewise.
6739
2a7fb83f
EB
67402015-07-07 Eric Botcazou <ebotcazou@adacore.com>
6741
6742 * c-ada-spec.h (cpp_operation): Add IS_MOVE_CONSTRUCTOR.
6743 * c-ada-spec.c (print_ada_declaration): Skip move constructors.
6744
a03c9bf1
JM
67452015-07-01 Jason Merrill <jason@redhat.com>
6746
36a85135
JM
6747 * c-common.h (D_CXX11): Rename from D_CXX0X.
6748 (RID_FIRST_CXX11, RID_LAST_CXX11): Rename from *_CXX0X.
6749 * c-common.c: Adjust.
6750
e7fa68d5
JM
6751 * c-opts.c (c_common_post_options): Default to C++14.
6752
a03c9bf1
JM
6753 * c-opts.c (c_common_post_options): Highest ABI level is now 10.
6754
fe95b036
ESR
67552015-06-30 Edward Smith-Rowland <3dw4rd@verizon.net>
6756
6757 Implement N4197 - Adding u8 character literals
b3d5bc62 6758 * c-ada-spec.c (print_ada_macros): Treat CPP_UTF8CHAR like
a64be36b 6759 CPP_CHAR.
b3d5bc62 6760 * c-common.c (c_parse_error): Print CPP_UTF8CHAR and
a64be36b 6761 CPP_UTF8CHAR_USERDEF tokens.
b3d5bc62 6762 * c-lex.c (c_lex_with_flags): Treat CPP_UTF8CHAR_USERDEF
a64be36b
EB
6763 and CPP_UTF8CHAR tokens.
6764 (lex_charconst): Treat CPP_UTF8CHAR token.
fe95b036 6765
da2e71c9
MLI
67662015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
6767
6768 PR fortran/66605
6769 * c-common.c (do_warn_unused_parameter): Move here.
6770 * c-common.h (do_warn_unused_parameter): Declare.
6771
b155cfd9
MP
67722015-06-29 Marek Polacek <polacek@redhat.com>
6773
6774 PR c/66322
6775 * c-common.c (check_case_bounds): Add bool * parameter. Set
6776 OUTSIDE_RANGE_P.
6777 (c_add_case_label): Add bool * parameter. Pass it down to
6778 check_case_bounds.
6779 (c_do_switch_warnings): Add bool parameters. Implement -Wswitch-bool
6780 warning here.
6781 * c-common.h (c_add_case_label, c_do_switch_warnings): Update
6782 declarations.
6783
31521951
MP
67842015-06-27 Marek Polacek <polacek@redhat.com>
6785
6786 * c-common.c (check_main_parameter_types): Use VECTOR_TYPE_P
6787 or VECTOR_INTEGER_TYPE_P throughout.
6788 * c-gimplify.c: Likewise.
6789
22d03525
MP
67902015-06-26 Marek Polacek <polacek@redhat.com>
6791
6792 * array-notation-common.c (find_rank): Use INDIRECT_REF_P.
6793 * c-common.c (c_fully_fold_internal): Likewise.
6794 (c_alignof_expr): Likewise.
6795 * c-pretty-print.c (c_pretty_printer::postfix_expression): Likewise.
6796 * c-ubsan.c (ubsan_instrument_bounds): Likewise.
b1726d6c 6797 * cilk.c (create_parm_list): Likewise.
22d03525 6798
af05e6e5
MP
67992015-06-26 Marek Polacek <polacek@redhat.com>
6800
6801 * c-common.c (handle_unused_attribute): Use VAR_OR_FUNCTION_DECL_P.
6802
f0889939
AM
68032015-06-25 Andrew MacLeod <amacleod@redhat.com>
6804
6805 * c-common.c: Remove ipa-ref.h and plugin-api.h from include list.
6806 * c-gimplify.c: Likewise.
6807 * c-pragma.c: Likewise.
6808 * c-ubsan.c: Likewise.
6809 * cilk.c: Likewise.
6810
ca752f39
RS
68112015-06-25 Richard Sandiford <richard.sandiford@arm.com>
6812
6813 * c-common.c (c_type_hasher): Inherit from ggc_ptr_hash rather than
6814 ggc_hasher.
6815
16a16ec7
AM
68162015-06-25 Andrew MacLeod <amacleod@redhat.com>
6817
6818 * cilk.c: Move calls.h after tm.h in the include chain.
6819
0ae9bd27
MP
68202015-06-25 Marek Polacek <polacek@redhat.com>
6821
6822 * array-notation-common.c: Use VAR_P throughout.
6823 * c-ada-spec.c: Likewise.
6824 * c-common.c: Likewise.
6825 * c-format.c: Likewise.
6826 * c-gimplify.c: Likewise.
6827 * c-omp.c: Likewise.
6828 * c-pragma.c: Likewise.
6829 * c-pretty-print.c: Likewise.
6830 * cilk.c: Likewise.
6831
62f9079a
MP
68322015-06-25 Marek Polacek <polacek@redhat.com>
6833
6834 * cilk.c (extract_free_variables): Use is_global_var.
6835
0fa16060
RS
68362015-06-23 Richard Sandiford <richard.sandiford@arm.com>
6837
6838 * c-common.c: Don't include target-def.h.
6839
a68ae2e1
MP
68402015-06-23 Marek Polacek <polacek@redhat.com>
6841
6842 * c-common.c (warn_logical_operator): Use tree_int_cst_equal
6843 when comparing INTEGER_CSTs.
6844
c6a2f2d9
PMR
68452015-06-22 Pierre-Marie de Rodat <derodat@adacore.com>
6846
6847 * c-ada-spec.h (cpp_operation): Add HAS_DEPENDENT_TEMPLATE_ARGS.
6848 * c-ada-spec.c (collect_ada_nodes): Skip NAMESPACE_DECL
6849 (dump_ada_template): Skip partially specialized types.
6850
6b4db501
MM
68512015-06-22 Mikhail Maltsev <maltsevm@gmail.com>
6852
6853 * c-common.c (scalar_to_vector): Use std::swap instead of manually
6854 swapping.
6855
abb226c9
AM
68562015-06-17 Andrew MacLeod <amacleod@redhat.com>
6857
6858 * array-notation-common.c: Do not include input.h, line-map.h or is-a.h.
6859 * c-ada-spec.c: Likewise.
6860 * c-cilkplus.c: Likewise.
6861 * c-common.c: Likewise.
6862 * c-common.h: Likewise.
6863 * c-cppbuiltin.c: Likewise.
6864 * c-dump.c: Likewise.
6865 * c-format.c: Likewise.
6866 * c-gimplify.c: Likewise.
6867 * c-indentation.c: Likewise.
6868 * c-lex.c: Likewise.
6869 * c-omp.c: Likewise.
6870 * c-opts.c: Likewise.
6871 * c-pch.c: Likewise.
6872 * c-ppoutput.c: Likewise.
6873 * c-pragma.c: Likewise.
6874 * c-pretty-print.c: Likewise.
6875 * c-semantics.c: Likewise.
6876 * c-ubsan.c: Likewise.
6877 * cilk.c: Likewise.
6878 * stub-objc.c: Likewise.
6879
076fecad
PP
68802015-06-13 Patrick Palka <ppalka@gcc.gnu.org>
6881
6882 PR c++/65168
6883 * c-common.c (c_common_truthvalue_conversion): Warn when
6884 converting an address of a reference to a truth value.
6885
13fdf2e2
AM
68862015-06-08 Andrew MacLeod <amacleod@redhat.com>
6887
6888 * array-notation-common.c : Adjust include files.
6889 * c-ada-spec.c : Likewise.
6890 * c-cilkplus.c : Likewise.
6891 * c-common.c : Likewise.
6892 * c-common.h : Likewise.
6893 * c-cppbuiltin.c : Likewise.
6894 * c-dump.c : Likewise.
6895 * c-format.c : Likewise.
6896 * c-gimplify.c : Likewise.
6897 * c-indentation.c : Likewise.
6898 * c-lex.c : Likewise.
6899 * c-omp.c : Likewise.
6900 * c-opts.c : Likewise.
6901 * c-pch.c : Likewise.
6902 * c-ppoutput.c : Likewise.
6903 * c-pragma.c : Likewise.
6904 * c-pretty-print.c : Likewise.
6905 * c-semantics.c : Likewise.
6906 * c-ubsan.c : Likewise.
6907 * cilk.c : Likewise.
6908 * stub-objc.c : Likewise.
6909
a1661b90
MP
69102015-06-08 Marek Polacek <polacek@redhat.com>
6911
6912 PR c/66415
6913 * c-format.c (location_from_offset): Return LOC if LINE is null.
6914
d7438551
AH
69152015-06-05 Aldy Hernandez <aldyh@redhat.com>
6916
6917 * c-common.h (c_parse_final_cleanups): New prototype.
6918 * c-opts.c (c_common_parse_file): Call c_parse_final_cleanups.
6919
b3d5bc62
JJ
69202015-06-04 Sriraman Tallam <tmsriram@google.com>
6921
6922 * c-common.c (noplt): New attribute.
6923 (handle_noplt_attribute): New handler.
6924
ecb9f223
AM
69252015-06-04 Andrew MacLeod <amacleod@redhat.com>
6926
6927 * array-notation-common.c: Adjust includes for restructured coretypes.h.
6928 * c-ada-spec.c: Likewise.
6929 * c-cilkplus.c: Likewise.
6930 * c-common.c: Likewise.
6931 * c-common.h: Likewise.
6932 * c-cppbuiltin.c: Likewise.
6933 * c-dump.c: Likewise.
6934 * c-format.c: Likewise.
6935 * c-gimplify.c: Likewise.
6936 * c-indentation.c: Likewise.
6937 * c-lex.c: Likewise.
6938 * c-omp.c: Likewise.
6939 * c-opts.c: Likewise.
6940 * c-pch.c: Likewise.
6941 * c-ppoutput.c: Likewise.
6942 * c-pragma.c: Likewise.
6943 * c-pretty-print.c: Likewise.
6944 * c-semantics.c: Likewise.
6945 * c-ubsan.c: Likewise.
6946 * cilk.c: Likewise.
6947 * stub-objc.c: Likewise.
6948
6ac48155
DM
69492015-06-02 David Malcolm <dmalcolm@redhat.com>
6950
6951 PR c/66220:
6952 * c-indentation.c (should_warn_for_misleading_indentation): Use
6953 expand_location rather than expand_location_to_spelling_point.
6954 Don't warn if the guarding statement is more indented than the
6955 next/body stmts.
6956
773ce42e
DM
69572015-06-02 David Malcolm <dmalcolm@redhat.com>
6958
6959 * c-indentation.c (warn_for_misleading_indentation): Bail out
6960 immediately if -Wmisleading-indentation isn't enabled.
6961
4fef8379
ML
69622015-06-01 Martin Liska <mliska@suse.cz>
6963
6964 * c-format.c (check_format_arg):Use new type-based pool allocator.
6965 (check_format_info_main) Likewise.
6966
1edfb384
EB
69672015-05-31 Eric Botcazou <ebotcazou@adacore.com>
6968
6969 * c-ada-spec.c (is_tagged_type): Test for TYPE_METHODS on main variant.
6970 (has_nontrivial_methods): Likewise.
6971
9677ef52
MP
69722015-05-25 Marek Polacek <polacek@redhat.com>
6973
6974 * c-ubsan.c (ubsan_instrument_shift): Use type0.
6975
fd5c817a
MP
69762015-05-22 Marek Polacek <polacek@redhat.com>
6977
6978 PR c/47043
6979 * c-common.c (handle_deprecated_attribute): Allow CONST_DECL.
6980
a2f45fe6 69812015-05-21 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
581edfa3
TS
6982
6983 * c-cppbuiltin.c (c_cpp_builtins): Use if instead of #if with
6984 STACK_GROWS_DOWNWARD.
6985
a2f45fe6 69862015-05-21 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
62f9f30b
TS
6987
6988 * c-cppbuiltin.c (c_cpp_builtins): Check the value of
6989 STACK_GROWS_DOWNWARD rather than if it is defined.
6990
0fee2ac2 69912015-05-21 Manuel López-Ibáñez <manu@gcc.gnu.org>
b1726d6c 6992
0fee2ac2
MLI
6993 PR c/52952
6994 * c-format.c (location_column_from_byte_offset): New.
6995 (location_from_offset): New.
6996 (struct format_wanted_type): Add offset_loc field.
6997 (check_format_info): Move handling of location for extra arguments
6998 closer to the point of warning.
6999 (check_format_info_main): Pass the result of location_from_offset
7000 to warning_at.
7001 (format_type_warning): Pass the result of location_from_offset
7002 to warning_at.
7003
cf4ef6f7
MP
70042015-05-20 Marek Polacek <polacek@redhat.com>
7005
7006 * c-omp.c (check_omp_for_incr_expr): Use BINARY_CLASS_P.
7007
3a65ee74
MP
70082015-05-20 Marek Polacek <polacek@redhat.com>
7009
7010 * c-ada-spec.c (dump_sloc): Use DECL_P.
7011
21b634ae
MP
70122015-05-20 Marek Polacek <polacek@redhat.com>
7013
7014 * c-pragma.c: Use VAR_OR_FUNCTION_DECL_P throughout.
7015 * c-common.c: Likewise.
7016
0e50b624
DM
70172015-05-19 David Malcolm <dmalcolm@redhat.com>
7018
7019 * c-common.h (fe_file_change): Strengthen param from
7020 const line_map * to const line_map_ordinary *.
7021 (pp_file_change): Likewise.
7022 * c-lex.c (fe_file_change): Likewise.
7023 (cb_define): Use linemap_check_ordinary when invoking
7024 SOURCE_LINE.
7025 (cb_undef): Likewise.
7026 * c-opts.c (c_finish_options): Use linemap_check_ordinary when
7027 invoking cb_file_change.
7028 (c_finish_options): Likewise.
7029 (push_command_line_include): Likewise.
7030 (cb_file_change): Strengthen param "new_map" from
7031 const line_map * to const line_map_ordinary *.
7032 * c-ppoutput.c (cb_define): Likewise for local "map".
7033 (pp_file_change): Likewise for param "map" and local "from".
7034
fab27f52
MM
70352015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
7036
7037 * c-common.c (shorten_compare): Use std::swap instead of explicit swaps.
7038
2fe1d762
TV
70392015-05-18 Tom de Vries <tom@codesourcery.com>
7040
7041 * c-common.c (build_va_arg_1): New function.
7042 (build_va_arg): Add address operator to va_list operand if necessary.
7043
7a37fa90
MM
70442015-05-15 Mikhail Maltsev <maltsevm@gmail.com>
7045
7046 PR c/48956
7047 * c-common.c (int_safely_convertible_to_real_p): Define.
7048 (unsafe_conversion_p): Check conversions involving complex types.
7049 (conversion_warning): Add new warning message for conversions which
7050 discard imaginary component.
7051 * c-common.h: (enum conversion_safety): Add new enumerator for such
7052 conversions.
7053
3aa3c9fc
MP
70542015-05-14 Marek Polacek <polacek@redhat.com>
7055
7056 PR c/66066
7057 PR c/66127
7058 * c-common.c (c_fully_fold): Pass false down to c_fully_fold_internal.
7059 (c_fully_fold_internal): Fold C_MAYBE_CONST_EXPRs with
7060 C_MAYBE_CONST_EXPR_INT_OPERANDS set. Add FOR_INT_CONST argument and
7061 use it. If FOR_INT_CONST, require that all evaluated operands be
7062 INTEGER_CSTs.
7063
c3388e62
DM
70642015-05-12 David Malcolm <dmalcolm@redhat.com>
7065
7066 * c-common.h (warn_for_misleading_indentation): New prototype.
7067 * c-indentation.c: New file.
7068 * c.opt (Wmisleading-indentation): New option.
7069
c7b38fd5
TV
70702015-05-12 Tom de Vries <tom@codesourcery.com>
7071
7072 PR tree-optimization/66010
7073 * c-common.c (build_va_arg): Don't mark ap addressable unless necessary.
7074
381bf11e
JM
70752015-05-09 Jason Merrill <jason@redhat.com>
7076
edff0c06
JM
7077 * c-opts.c (c_common_post_options): Also clear
7078 cpp_opts->cpp_warn_cxx11_compat.
7079
129211bc
JM
7080 * c-common.h (enum cxx_dialect): Add cxx_unset.
7081 * c-common.c (cxx_dialect): Initialize to cxx_unset.
7082 * c-opts.c (c_common_post_options): Set C++ dialect to C++98 if unset.
7083
381bf11e
JM
7084 * c.opt (std=c++14): Remove Undocumented flag and experimental warning.
7085 (std=gnu++0x): Mark as Undocumented.
7086 (std=gnu++1y): Add deprecated message.
7087
fe191308
JM
70882015-05-08 Jason Merrill <jason@redhat.com>
7089
765189ff
JM
7090 * c.opt (Wc++11-compat): Make primary. Rename var warn_cxx11_compat.
7091 * c-opts.c: Adjust.
7092
fe191308
JM
7093 * c.opt (Wc++0x-compat): Also set cpp_warn_cxx11_compat.
7094
755e528f
MP
70952015-05-08 Marek Polacek <polacek@redhat.com>
7096
7097 PR c/64918
7098 * c.opt (Woverride-init-side-effects): New option.
7099
0173bd2a
MP
71002015-05-07 Marek Polacek <polacek@redhat.com>
7101
7102 PR c/65179
7103 * c-common.c (c_fully_fold_internal): Warn when left shifting a
7104 negative value.
7105 * c.opt (Wshift-negative-value): New option.
7106 * c-opts.c (c_common_post_options): Set warn_shift_negative_value
7107 when -Wextra and C99/C++11 mode.
7108
e0f0d3b9
MP
71092015-05-07 Marek Polacek <polacek@redhat.com>
7110 Martin Uecker <uecker@eecs.berkeley.edu>
7111
7112 * c-ubsan.c (ubsan_instrument_bounds): Don't skip instrumenting
7113 flexible member array-like members if SANITIZE_BOUNDS_STRICT.
7114
8243e2a9
JM
71152015-05-05 Jason Merrill <jason@redhat.com>
7116
7117 * c.opt (Wterminate): New.
7118
577cd070
MP
71192015-04-30 Marek Polacek <polacek@redhat.com>
7120
7121 * c-common.c (maybe_warn_bool_compare): When comparing with 0/1,
7122 require that the non-constant be of a boolean type.
7123
0373796b
JT
71242015-04-29 Josh Triplett <josh@joshtriplett.org>
7125
e0f0d3b9
MP
7126 * c-common.c (handle_section_attribute): Refactor to reduce
7127 nesting and distinguish between error cases.
0373796b 7128
716c0ba6
MP
71292015-04-29 Marek Polacek <polacek@redhat.com>
7130
7131 PR c/64610
7132 * c-common.c (maybe_warn_bool_compare): Warn when comparing a boolean
7133 with 0/1.
7134
8848828b
JJ
71352015-04-29 Jakub Jelinek <jakub@redhat.com>
7136
7137 * c-common.h (omp_clause_mask): Unconditionally define as a class.
7138 Use uint64_t instead of unsigned HOST_WIDE_INT and 64 instead of
7139 HOST_BITS_PER_WIDE_INT.
7140
ecd0e562
TV
71412015-04-28 Tom de Vries <tom@codesourcery.com>
7142
7143 PR tree-optimization/65887
7144 * c-common.c (build_va_arg): Mark va_arg ap argument as addressable.
7145
2a877204 71462015-04-28 Eric Botcazou <ebotcazou@adacore.com>
e0f0d3b9 7147 Pierre-Marie de Rodat <derodat@adacore.com>
2a877204
EB
7148
7149 * c-ada-spec.c (in_function): Delete.
7150 (dump_generic_ada_node): Do not change in_function and remove the
7151 redundant code dealing with it.
7152 (print_ada_declaration): Do not change in_function. Use INDENT_INCR.
7153 (print_ada_methods): Output the static member functions in a nested
7154 package after the regular methods as well as associated renamings.
7155
4853031e
MP
71562015-04-24 Marek Polacek <polacek@redhat.com>
7157
7158 PR c/65830
7159 * c-common.c (c_fully_fold_internal): Use OPT_Wshift_count_negative
7160 and OPT_Wshift_count_overflow.
7161
8c2b7f79
MP
7162 PR c/63357
7163 * c-common.c (warn_logical_operator): Warn if the operands have the
7164 same expressions.
7165
b8787813
MP
71662015-04-24 Marek Polacek <polacek@redhat.com>
7167
7168 PR c/61534
7169 * c-common.c (warn_logical_operator): Bail if either operand comes
7170 from a macro expansion.
7171
8fba1830
BRF
71722015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
7173
7174 PR target/55143
7175 * c-common.c (c_default_pointer_mode): Add definition.
7176 * c-common.h (c_default_pointer_mode): Add declaration.
7177
17958621
JJ
71782015-03-11 Jakub Jelinek <jakub@redhat.com>
7179
7180 * c-common.c (c_common_nodes_and_builtins): Don't call xstrdup
7181 on record_builtin_type argument.
7182
7ccb1a11
JJ
71832015-03-10 Jakub Jelinek <jakub@redhat.com>
7184
7185 PR c/65120
7186 * c-common.c (warn_logical_not_parentheses): Don't warn for
7187 !x == 0 or !x != 0.
7188
04fd785e
MP
71892015-03-07 Marek Polacek <polacek@redhat.com>
7190
7191 PR sanitizer/65280
7192 * c-ubsan.c (ubsan_instrument_bounds): Check for COMPONENT_REF
7193 before trying to figure out whether we have a flexible array member.
7194
a4e26206 71952015-03-06 Eric Botcazou <ebotcazou@adacore.com>
8e745a17 7196 Jonathan Wakely <jwakely.gcc@gmail.com>
a4e26206
EB
7197
7198 * c-ada-spec.c (dump_ada_double_name): Fix pasto.
7199
0d2489f4
EB
72002015-03-05 Eric Botcazou <ebotcazou@adacore.com>
7201
7202 PR ada/65319
7203 * c-ada-spec.c (print_destructor): Remove obsolete code.
7204
83ed54d7
EB
72052015-03-01 Eric Botcazou <ebotcazou@adacore.com>
7206
7207 * c-ada-spec.c (is_tagged_type): Add guard for DECL_VINDEX.
7208 (dump_template_types): Adjust DECL_TEMPLATE_INSTANTIATIONS and
7209 DECL_TEMPLATE_RESULT emulations.
7210 (dump_ada_template)): Add guard for TYPE_METHODS.
7211
7631f0e2
MP
72122015-02-27 Marek Polacek <polacek@redhat.com>
7213
7214 PR c/65040
7215 * c.opt (Wformat-signedness): Don't enable by -Wformat=2.
7216
d1783ae5
KT
72172015-02-27 Kai Tietz <ktietz@redhat.com>
7218
7219 PR c/35330
7220 * c-pragma.c (handle_pragma_weak): Do not try to create
7221 weak/alias of declarations not being function, or variable
7222 declarations.
7223
56a9f6bc
TS
72242015-02-24 Thomas Schwinge <thomas@codesourcery.com>
7225
7226 PR libgomp/64625
7227 * c-common.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
7228 Remove macros.
7229 (DEF_FUNCTION_TYPE_VAR_7, DEF_FUNCTION_TYPE_VAR_11): New macros.
7230
3d5cb23d
MP
72312015-02-16 Marek Polacek <polacek@redhat.com>
7232
7233 PR c/65066
7234 * c-format.c (check_format_types): Handle null param.
7235
fa008882
MP
72362015-02-13 Marek Polacek <polacek@redhat.com>
7237
7238 PR c/65040
7239 * c-format.c (check_format_types): Don't warn about different
7240 signedness if the original value is in the range of WANTED_TYPE.
7241
785f21af
JM
72422015-02-12 Jason Merrill <jason@redhat.com>
7243
7244 PR c++/64956
7245 * c-opts.c (c_common_post_options): Change flag_abi_version from 0
7246 to the current highest version.
7247 * c-cppbuiltin.c (c_cpp_builtins): Assert that it isn't 0.
7248
4886ec8e
JJ
72492015-02-04 Jakub Jelinek <jakub@redhat.com>
7250
7251 PR c/64824
7252 PR c/64868
7253 * c-omp.c (c_finish_omp_atomic): Use TRUNC_DIV_EXPR
7254 instead of RDIV_EXPR. Use build_binary_op instead of
7255 build2_loc.
7256
40fecdd6
JM
72572015-01-30 Joseph Myers <joseph@codesourcery.com>
7258
7259 * c-opts.c, c-pch.c, cppspec.c: All callers of fatal_error changed
7260 to pass input_location as first argument.
7261
a0c88d06
TV
72622015-01-23 Tom de Vries <tom@codesourcery.com>
7263
7264 PR libgomp/64672
7265 * c.opt (fopenacc): Mark as LTO option.
7266
1506ae0e
TV
72672015-01-23 Tom de Vries <tom@codesourcery.com>
7268
7269 PR libgomp/64707
7270 * c.opt (fopenmp): Mark as LTO option.
7271
31be63ab
JJ
72722015-01-21 Jakub Jelinek <jakub@redhat.com>
7273
7274 PR c/63307
b1726d6c 7275 * cilk.c (fill_decls_vec): Only put decls into vector v.
31be63ab
JJ
7276 (compare_decls): Fix up formatting.
7277
72782015-01-21 Igor Zamyatin <igor.zamyatin@intel.com>
7279
7280 PR c/63307
7281 * cilk.c: Include vec.h.
7282 (struct cilk_decls): New structure.
7283 (wrapper_parm_cb): Split this function to...
7284 (fill_decls_vec): ...this...
7285 (create_parm_list): ...and this.
7286 (compare_decls): New function.
7287 (for_local_cb): Remove.
7288 (wrapper_local_cb): Ditto.
7289 (build_wrapper_type): For now first traverse and fill vector of
7290 declarations then sort it and then deal with sorted vector.
7291 (cilk_outline): Ditto.
7292 (declare_one_free_variable): Ditto.
7293
6875457f
JM
72942015-01-21 Jason Merrill <jason@redhat.com>
7295
7296 PR c++/64629
7297 * c-format.c (check_format_arg): Call decl_constant_value.
7298
185c9e56
ML
72992015-01-19 Martin Liska <mliska@suse.cz>
7300
7301 * c-common.c (handle_noicf_attribute): New function.
7302
41dbbb37
TS
73032015-01-15 Thomas Schwinge <thomas@codesourcery.com>
7304 Bernd Schmidt <bernds@codesourcery.com>
7305 James Norris <jnorris@codesourcery.com>
7306 Cesar Philippidis <cesar@codesourcery.com>
7307 Ilmir Usmanov <i.usmanov@samsung.com>
7308 Jakub Jelinek <jakub@redhat.com>
7309
7310 * c.opt (fopenacc): New option.
7311 * c-cppbuiltin.c (c_cpp_builtins): Conditionally define _OPENACC.
7312 * c-common.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
7313 New macros.
7314 * c-common.h (c_finish_oacc_wait): New prototype.
7315 * c-omp.c: Include "omp-low.h" and "gomp-constants.h".
7316 (c_finish_oacc_wait): New function.
7317 * c-pragma.c (oacc_pragmas): New variable.
7318 (c_pp_lookup_pragma, init_pragma): Handle it.
7319 * c-pragma.h (enum pragma_kind): Add PRAGMA_OACC_CACHE,
7320 PRAGMA_OACC_DATA, PRAGMA_OACC_ENTER_DATA, PRAGMA_OACC_EXIT_DATA,
7321 PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP, PRAGMA_OACC_PARALLEL,
7322 PRAGMA_OACC_UPDATE, PRAGMA_OACC_WAIT.
7323 (enum pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_ASYNC,
7324 PRAGMA_OACC_CLAUSE_AUTO, PRAGMA_OACC_CLAUSE_COLLAPSE,
7325 PRAGMA_OACC_CLAUSE_COPY, PRAGMA_OACC_CLAUSE_COPYIN,
7326 PRAGMA_OACC_CLAUSE_COPYOUT, PRAGMA_OACC_CLAUSE_CREATE,
7327 PRAGMA_OACC_CLAUSE_DELETE, PRAGMA_OACC_CLAUSE_DEVICE,
7328 PRAGMA_OACC_CLAUSE_DEVICEPTR, PRAGMA_OACC_CLAUSE_FIRSTPRIVATE,
7329 PRAGMA_OACC_CLAUSE_GANG, PRAGMA_OACC_CLAUSE_HOST,
7330 PRAGMA_OACC_CLAUSE_IF, PRAGMA_OACC_CLAUSE_NUM_GANGS,
7331 PRAGMA_OACC_CLAUSE_NUM_WORKERS, PRAGMA_OACC_CLAUSE_PRESENT,
7332 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPY,
7333 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPYIN,
7334 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPYOUT,
7335 PRAGMA_OACC_CLAUSE_PRESENT_OR_CREATE, PRAGMA_OACC_CLAUSE_PRIVATE,
7336 PRAGMA_OACC_CLAUSE_REDUCTION, PRAGMA_OACC_CLAUSE_SELF,
7337 PRAGMA_OACC_CLAUSE_SEQ, PRAGMA_OACC_CLAUSE_VECTOR,
7338 PRAGMA_OACC_CLAUSE_VECTOR_LENGTH, PRAGMA_OACC_CLAUSE_WAIT,
7339 PRAGMA_OACC_CLAUSE_WORKER.
7340
3f8257db 73412015-01-14 Marcos Diaz <marcos.diaz@tallertechnologies.com>
5434dc07
MD
7342
7343 * c-cppbuiltin.c (c_cpp_builtins): New cpp define __SSP_EXPLICIT__
7344 for the new option fstack-protector_explicit.
7345 * c-common.c (c_common_attribute_table): Add stack_protect attribute.
7346 (handle_stack_protect_attribute): New function.
7347
3f8257db 73482015-01-13 Martin Uecker <uecker@eecs.berkeley.edu>
de1b5c17
MU
7349
7350 * c.opt: New option -Warray-bounds=.
7351
adfac8df
JJ
73522015-01-09 Michael Collison <michael.collison@linaro.org>
7353
7354 * array-notation-common.c: Include hash-set.h, machmode.h,
7355 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
7356 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
7357 * c-ada-spec.c: Ditto.
7358 * c-cilkplus.c: Ditto.
7359 * c-common.c: Include input.h due to flattening of tree.h.
7360 Define macro GCC_C_COMMON_C.
7361 * c-common.h: Flatten tree.h header files into c-common.h.
7362 Remove include of tree-core.h.
7363 * c-cppbuiltin.c: Include hash-set.h, machmode.h,
7364 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
7365 fold-const.h, wide-int.h, and inchash.h due to
7366 flattening of tree.h.
7367 * c-dump.c: Ditto.
7368 * c-format.c: Flatten tree.h header files into c-common.h.
7369 * c-cppbuiltin.c: Include hash-set.h, machmode.h,
7370 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
7371 fold-const.h, wide-int.h, and inchash.h due to
7372 flattening of tree.h.
7373 * c-dump.c: Include hash-set.h, machmode.h,
7374 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
7375 fold-const.h, wide-int.h, and inchash.h due to
7376 flattening of tree.h.
7377 * c-format.c: Include hash-set.h, machmode.h,
7378 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
7379 fold-const.h, wide-int.h, inchash.h and real.h due to
7380 flattening of tree.h.
7381 * c-gimplify.c: Include hash-set.h, machmode.h,
7382 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
7383 fold-const.h, wide-int.h, and inchash.h due to
7384 flattening of tree.h.
7385 * cilk.c: Ditto.
7386 * c-lex.c: Ditto.
7387 * c-omp.c: Ditto.
7388 * c-opts.c: Ditto.
7389 * c-pch.c: Ditto.
7390 * c-ppoutput.c: Ditto.
7391 * c-pragma.c: Ditto.
7392 * c-pretty-print.c: Ditto.
7393 * c-semantics.c: Ditto.
7394 * c-ubsan.c: Ditto.
7395 * stub-objc.c: Ditto.
7396
f5481fc4
JM
73972015-01-08 Jason Merrill <jason@redhat.com>
7398
7399 * c-ubsan.c (ubsan_maybe_instrument_array_ref): Use
7400 do_ubsan_in_current_function.
7401 (ubsan_maybe_instrument_reference_or_call): Likewise.
7402 * c-ubsan.h: Declare it.
7403
de35aa66
MS
74042015-01-08 Mike Stump <mikestump@comcast.net>
7405
7406 * c-common.c (c_common_attribute_table): Add no_sanitize_thread.
7407
4a9a42ab
MP
74082015-01-07 Marek Polacek <polacek@redhat.com>
7409
7410 PR c/64440
7411 * c-common.c (c_fully_fold_internal): Warn for division and modulo
7412 if orig_op1 isn't INTEGER_CST, op1 is INTEGER_CST and is zero.
7413
2f42e5de
TS
74142015-01-05 Trevor Saunders <tsaunders@mozilla.com>
7415
7416 PR c++/31397
7417 * c.opt (Wsuggest-override): New option.
7418
5624e564
JJ
74192015-01-05 Jakub Jelinek <jakub@redhat.com>
7420
7421 Update copyright years.
7422
5bd012f8
MP
74232015-01-05 Marek Polacek <polacek@redhat.com>
7424
7425 PR c/64423
7426 * c-common.c (warn_array_subscript_with_type_char): Add location_t
7427 parameter. Use it.
7428 * c-common.h (warn_array_subscript_with_type_char): Update
7429 declaration.
7430
a7fa8d18
ESR
74312014-12-20 Edward Smith-Rowland <3dw4rd@verizon.net>
7432
7433 * c-cppbuiltin.c (__cpp_sized_deallocation): Uncomment and move macro.
7434 Control macro with flag_sized_deallocation.
7435
3f8257db 74362014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
768952be
MU
7437
7438 * c.opt (Wdiscarded-array-qualifiers): New option.
7439
1f8d3e84
JJ
74402014-12-19 Jakub Jelinek <jakub@redhat.com>
7441
7442 PR preprocessor/63831
7443 * c-cppbuiltin.c (c_cpp_builtins): Don't define __has_attribute
7444 and __has_cpp_attribute here.
7445 * c-ppoutput.c (init_pp_output): Set cb->has_attribute to
7446 c_common_has_attribute.
7447 * c-common.h (c_common_has_attribute): New prototype.
7448 * c-lex.c (init_c_lex): Set cb->has_attribute to
7449 c_common_has_attribute instead of cb_has_attribute.
7450 (get_token_no_padding): New function.
7451 (cb_has_attribute): Renamed to ...
7452 (c_common_has_attribute): ... this. No longer static. Use
7453 get_token_no_padding, require ()s, don't build TREE_LIST
7454 unnecessarily, fix up formatting, adjust diagnostics, call
7455 init_attributes.
7456
20b06add
JM
74572014-12-15 Jason Merrill <jason@redhat.com>
7458
7459 * c.opt (-fsized-deallocation, -Wc++14-compat): New.
7460 (-Wsized-deallocation): New.
7461 * c-opts.c (c_common_post_options): -fsized-deallocation defaults
7462 to on in C++14 and up.
7463
94a073b2
JM
74642014-12-11 Jason Merrill <jason@redhat.com>
7465
acaa5911
JM
7466 * c-cppbuiltin.c (c_cpp_builtins): Enable C++14 __cpp_constexpr.
7467
94a073b2
JM
7468 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_runtime_arrays if
7469 we aren't complaining about VLAs.
7470
7fb66c15
MP
74712014-12-06 Marek Polacek <polacek@redhat.com>
7472
7473 PR tree-optimization/64183
7474 * c-gimplify.c (c_gimplify_expr): Don't convert the RHS of a
7475 shift-expression if it is integer_type_node. Use types_compatible_p.
7476
b731b390
JJ
74772014-11-29 Jakub Jelinek <jakub@redhat.com>
7478
7479 * c-common.c (convert_vector_to_pointer_for_subscript): Remove NULL
7480 last argument from create_tmp_var_raw and create_tmp_var calls.
7481 * cilk.c (gimplify_cilk_spawn): Likewise.
7482 * c-omp.c (c_finish_omp_atomic): Likewise.
7483
6a4da643
MP
74842014-11-28 Marek Polacek <polacek@redhat.com>
7485
7486 * c-ubsan.c (ubsan_instrument_shift): Use op1_utype for MINUS_EXPR
7487 instead of unsigned_type_node.
7488
541e35a6
MP
74892014-11-28 Marek Polacek <polacek@redhat.com>
7490
7491 PR c/63862
7492 * c-ubsan.c (ubsan_instrument_shift): Change the type of a MINUS_EXPR
7493 to op1_utype.
7494 * c-gimplify.c (c_gimplify_expr): Convert right operand of a shift
7495 expression to unsigned_type_node.
7496
dcc97066
MW
74972014-11-20 Mark Wielaard <mjw@redhat.com>
7498
7499 PR debug/38757
7500 * c-opts.c (set_std_c89): Set lang_hooks.name.
7501 (set_std_c99): Likewise.
7502 (set_std_c11): Likewise.
7503 (set_std_cxx98): Likewise.
7504 (set_std_cxx11): Likewise.
7505 (set_std_cxx14): Likewise.
7506 (set_std_cxx1z): Likewise.
7507
aa7da51a
JJ
75082014-11-21 Jakub Jelinek <jakub@redhat.com>
7509
7510 PR target/63764
7511 * c-common.h (convert_vector_to_pointer_for_subscript): Change
7512 return type to bool.
009a3480 7513 * c-common.c: Include gimple-expr.h.
aa7da51a
JJ
7514 (convert_vector_to_pointer_for_subscript): Change return type to
7515 bool. If *vecp is not lvalue_p and has VECTOR_TYPE, return true
7516 and copy it into a TARGET_EXPR and use that instead of *vecp
7517 directly.
7518
538dd0b7
DM
75192014-11-19 David Malcolm <dmalcolm@redhat.com>
7520
7521 Merger of git branch "gimple-classes-v2-option-3".
7522 * ChangeLog.gimple-classes: New.
7523 * c-gimplify.c (add_block_to_enclosing): Strengthen local "stack"
7524 from being just a vec<gimple> to a vec<gbind *>.
7525
c39a5e99
JJ
75262014-11-18 Jakub Jelinek <jakub@redhat.com>
7527
7528 PR sanitizer/63813
7529 * c-ubsan.c (ubsan_maybe_instrument_reference_or_call): Change type
7530 argument to ptype, set type to TREE_TYPE (ptype). Don't call
7531 get_pointer_alignment for non-pointers. Use ptype, or if it is
7532 reference type, corresponding pointer type, as type of kind
7533 argument.
7534 (ubsan_maybe_instrument_reference,
7535 ubsan_maybe_instrument_member_call): Adjust callers.
7536
8537a4a9
MP
75372014-11-15 Marek Polacek <polacek@redhat.com>
7538
7539 PR middle-end/63884
7540 * array-notation-common.c (is_sec_implicit_index_fn): Return false
7541 for NULL fndecl.
7542 (extract_array_notation_exprs): Return for NULL node.
7543
2079956a
JM
75442014-11-12 Joseph Myers <joseph@codesourcery.com>
7545
7546 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Define and
7547 undefine __NO_MATH_ERRNO__ based on changes to -fmath-errno state.
7548
1304953e
JJ
75492014-11-12 Jakub Jelinek <jakub@redhat.com>
7550
7551 PR c/59708
7552 * c-common.c (check_builtin_function_arguments): Handle
7553 BUILT_IN_{ADD,SUB,MUL}_OVERFLOW.
7554
e5e44252
AK
75552014-11-10 Andi Kleen <ak@linux.intel.com>
7556
7557 PR c/60804
7558 * c-common.h (check_no_cilk): Declare.
7559 * cilk.c (get_error_location): New function.
7560 (check_no_cilk): Dito.
7561
e64b984d
AK
75622014-11-10 Andi Kleen <ak@linux.intel.com>
7563
7564 * cilk.c (recognize_spawn): Use expression location
7565 for error message.
7566
13c21655
PC
75672014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
7568
7569 * c.opt ([Wshift-count-negative, Wshift-count-overflow]): Add.
7570
42fd12b1
ESR
75712014-11-10 Edward Smith-Rowland <3dw4rd@verizon.net>
7572
7573 * c-cppbuiltin.c (__has_attribute, __has_cpp_attribute): New macros;
7574 (__cpp_rtti, __cpp_exceptions): New macros for C++98;
7575 (__cpp_range_based_for, __cpp_initializer_lists,
7576 __cpp_delegating_constructors, __cpp_nsdmi,
7577 __cpp_inheriting_constructors, __cpp_ref_qualifiers): New macros
7578 for C++11; (__cpp_attribute_deprecated): Remove in favor of
7579 __has_cpp_attribute.
7580 * c-lex.c (cb_has_attribute): New callback CPP function;
7581 (init_c_lex): Set has_attribute callback.
7582
6f450181
RB
75832014-11-04 Richard Biener <rguenther@suse.de>
7584
7585 * c-common.c (shorten_compare): Do not shorten mixed
7586 DFP and non-DFP compares.
7587
26f0e1d6
ESR
75882014-11-01 Edward Smith-Rowland <3dw4rd@verizon.net>
7589
7590 * g++.dg/cpp1y/feat-cxx11.C: Commentary and rearrangement of tests.
7591 * g++.dg/cpp1y/feat-cxx11-neg.C: Add aggregate NSDMI test.
7592 Commentary and rearrangement of tests.
7593 * g++.dg/cpp1y/feat-cxx14.C: Enable aggregate NSDMI test.
7594 Commentary and rearrangement of tests.
ab20d992 7595 * g++.dg/cpp1y/feat-cxx98-neg.C: Ditto.
26f0e1d6
ESR
7596 * g++.dg/cpp1y/feat-cxx98.C: Commentary.
7597
ef4bddc2
RS
75982014-10-29 Richard Sandiford <richard.sandiford@arm.com>
7599
7600 * c-common.c, c-common.h, c-cppbuiltin.c, c-lex.c: Remove redundant
7601 enum from machine_mode.
7602
c582198b
AM
76032014-10-28 Andrew MacLeod <amacleod@redhat.com>
7604
adfac8df
JJ
7605 * c-common.c: Adjust include files.
7606 * c-gimplify.c: Ditto.
7607 * cilk.c: Ditto.
7608 * c-pragma.c: Ditto.
7609 * c-ubsan.c: Ditto.
c582198b 7610
60393bbc
AM
76112014-10-27 Andrew MacLeod <amacleod@redhat.com>
7612
7613 * c-gimplify.c: Adjust include files.
7614
d723bb7c
MLI
76152014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
7616
7617 PR c++/53061
7618 * c-opts.c (c_common_diagnostics_set_defaults): Renamed from
7619 c_common_initialize_diagnostics.
7620 * c-common.h: Likewise.
7621
90f3520e
MP
76222014-10-24 Marek Polacek <polacek@redhat.com>
7623
7624 PR c/56980
7625 * c-pretty-print.c (c_pretty_printer::simple_type_specifier): Don't
7626 print "struct"/"union"/"enum" for typedefed names.
7627
59d7607a
MP
76282014-10-23 Marek Polacek <polacek@redhat.com>
7629
7630 * c-ubsan.c (ubsan_instrument_shift): Perform the MINUS_EXPR
7631 in unsigned type.
7632
d95a2703
JJ
76332014-10-22 Jakub Jelinek <jakub@redhat.com>
7634 Yury Gribov <y.gribov@samsung.com>
7635
7636 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
7637 ubsan_instrument_vla): Check bits in flag_sanitize_recover bitmask
7638 instead of flag_sanitize_recover as bool flag.
7639
8e6ef852
KY
76402014-10-21 Kirill Yukhin <kirill.yukhin@intel.com>
7641
7642 * cilk.c: Revert previous change.
7643
948cf550
IZ
76442014-10-20 Igor Zamyatin <igor.zamyatin@intel.com>
7645
7646 PR c/63307
7647 * cilk.c: Include vec.h.
7648 (struct cilk_decls): New structure.
7649 (wrapper_parm_cb): Split this function to...
7650 (fill_decls_vec): ...this...
7651 (create_parm_list): ...and this.
7652 (compare_decls): New function.
7653 (for_local_cb): Remove.
7654 (wrapper_local_cb): Ditto.
7655 (build_wrapper_type): For now first traverse and fill vector of
7656 declarations then sort it and then deal with sorted vector.
7657 (cilk_outline): Ditto.
7658 (declare_one_free_variable): Ditto.
7659
92574c7c
MP
76602014-10-17 Marek Polacek <polacek@redhat.com>
7661
7662 * c-opts.c (c_common_post_options): Set warn_implicit_int.
7663 * c.opt (Wimplicit-int): Initialize to -1.
7664
83685514
AM
76652014-10-16 Andrew MacLeod <amacleod@redhat.com>
7666
7667 * c-pragma.c: Adjust include files.
7668 * c-semantics.c: Likewise.
7669
5b8300ea
DD
76702014-10-16 DJ Delorie <dj@redhat.com>
7671
7672 * c-cppbuiltin.c (cpp_atomic_builtins): Don't assume pointers are
7673 multiples of bytes.
7674
5f83e90b
JM
76752014-10-14 Jason Merrill <jason@redhat.com>
7676
7677 PR c++/63455
7678 * c-common.h (CPP_PREPARSED_EXPR): New.
7679 (N_CP_TTYPES): Adjust.
7680
d73326ca
MP
76812014-10-15 Marek Polacek <polacek@redhat.com>
7682
7683 * c-opts.c (c_common_init_options): Make -std=gnu11 the default for C.
7684
78a7c317
DD
76852014-10-14 DJ Delorie <dj@redhat.com>
7686
7687 * c-pretty-print.c (pp_c_integer_constant): Check for all __intN
7688 types, not just __int128.
7689 * c-cppbuiltin.c (c_cpp_builtins): Add builtins for all __intN
7690 types, not just __int128.
7691 (cpp_atomic_builtins): Round pointer sizes up.
7692 (type_suffix): Use type precision, not specific types.
7693 * c-common.c (c_common_reswords): Remove __int128 special case.
7694 (c_common_type_for_size): Check for all __intN types, not just
7695 __int128.
7696 (c_common_type_for_mode): Likewise.
7697 (c_common_signed_or_unsigned_type): Likewise.
7698 (c_build_bitfield_integer_type): Likewise.
7699 (c_common_nodes_and_builtins): Likewise.
7700 (keyword_begins_type_specifier): Likewise.
7701 * c-common.h (rid): Remove RID_INT128 and add RID_INT_N_* for all
7702 __intN variants.
7703
2a22f99c
TS
77042014-10-12 Trevor Saunders <tsaunders@mozilla.com>
7705
7706 * c-common.c: Use hash_table instead of hashtab.
7707
2a8ef767
ESR
77082014-10-06 Edward Smith-Rowland <3dw4rd@verizon.net>
7709
adfac8df 7710 * c-cppbuiltin.c: Move __cpp_attribute_deprecated to the
2a8ef767
ESR
7711 C++11 section.
7712
3c9aabbd
MG
77132014-10-03 Marc Glisse <marc.glisse@inria.fr>
7714
7715 PR c++/54427
7716 PR c++/57198
7717 PR c++/58845
7718 * c-common.c (warn_logical_operator): Punt for vectors.
7719
a15f7cb8
ESR
77202014-10-01 Edward Smith-Rowland <3dw4rd@verizon.net>
7721
7722 Implement SD-6: SG10 Feature Test Recommendations
7723 * c-cppbuiltin.c (c_cpp_builtins()): Define language feature
7724 macros and the __has_header macro.
7725
8d0cf15e
JM
77262014-09-30 Jason Merrill <jason@redhat.com>
7727
dd5d5481
JM
7728 * c-common.h (enum rid): Add RID_IS_TRIVIALLY_ASSIGNABLE and
7729 RID_IS_TRIVIALLY_CONSTRUCTIBLE.
7730 * c-common.c (c_common_reswords): Add __is_trivially_copyable.
7731
b752325e
JM
7732 * c-common.h (enum rid): Add RID_IS_TRIVIALLY_COPYABLE.
7733 * c-common.c (c_common_reswords): Add __is_trivially_copyable.
7734
8d0cf15e
JM
7735 * c-common.h (enum rid): Remove RID_IS_CONVERTIBLE_TO.
7736 * c-common.c (c_common_reswords): Remove __is_convertible_to.
7737
083e891e
MP
77382014-09-24 Marek Polacek <polacek@redhat.com>
7739
7740 PR c/61405
7741 PR c/53874
7742 * c-common.h (struct c_common_resword): Don't define CPP_KEYWORD.
7743
7861b648
AK
77442014-09-23 Andi Kleen <ak@linux.intel.com>
7745
7746 * c-common.c (handle_no_reorder_attribute): New function.
7747 (c_common_attribute_table): Add no_reorder attribute.
7748
9a79452d
JM
77492014-09-22 Joseph Myers <joseph@codesourcery.com>
7750
7751 * c-cppbuiltin.c (c_cpp_builtins): Define
7752 __LIBGCC_*_EXCESS_PRECISION__ macros for supported floating-point
7753 modes.
7754
dd69f047
JM
77552014-09-18 Joseph Myers <joseph@codesourcery.com>
7756
7757 * c-cppbuiltin.c (c_cpp_builtins): Define __LIBGCC_*_FUNC_EXT__
7758 for supported floating-point modes.
7759
737a4826
MLI
77602014-09-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
7761
7762 * c.opt (Wpsabi): Use LangEnabledBy.
7763 * c-opts.c (c_common_handle_option): Do not handle here.
7764
8cc4b7a2
JM
77652014-09-12 Joseph Myers <joseph@codesourcery.com>
7766
7767 * c-cppbuiltin.c (c_cpp_builtins): Define __LIBGCC_HAS_%s_MODE__
7768 macros for floating-point modes.
7769
179b5a55
MG
77702014-09-11 Marc Glisse <marc.glisse@inria.fr>
7771
7772 PR target/58757
7773 * c-cppbuiltin.c (builtin_define_float_constants): Correct
7774 __*_DENORM_MIN__ without denormals.
7775
570a11fe
JJ
77762014-09-10 Jakub Jelinek <jakub@redhat.com>
7777
7778 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
7779 ubsan_instrument_vla, ubsan_instrument_return): Adjust
7780 ubsan_create_data callers.
7781 (ubsan_instrument_bounds): Don't emit UBSAN_BOUNDS at all if
7782 index is constant or BIT_AND_EXPR with constant mask and is
7783 small enough for the bound.
7784 * c-gimplify.c (ubsan_walk_array_refs_r): For ADDR_EXPR of
7785 ARRAY_REF, make sure the inner ARRAY_REF is not walked again.
7786
b559c810
MLI
77872014-09-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
7788
7789 * c.opt: Add CppReason to various flags.
7790 (Wdate-time): Re-sort.
7791 * c-common.c: Include c-common.h earlier.
7792 (struct reason_option_codes_t): Delete.
7793 (c_option_controlling_cpp_error): Prefix global type and struct
7794 with cpp_.
7795
1ef33fd4
MLI
77962014-09-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
7797
7798 * c.opt (Wnormalized): New.
7799 (Wnormalized=): Use Enum and Reject Negative.
7800 * c-opts.c (c_common_handle_option): Do not handle Wnormalized here.
7801
66bb34c0
JM
78022014-09-08 Joseph Myers <joseph@codesourcery.com>
7803
7804 * c-cppbuiltin.c (c_cpp_builtins): Define macros for mantissa
7805 digits of floating-point modes if -fbuilding-libgcc.
7806
53d68b9f
JM
78072014-09-05 Joseph Myers <joseph@codesourcery.com>
7808
7809 * c-cppbuiltin.c (c_cpp_builtins): Also define
7810 __LIBGCC_EH_TABLES_CAN_BE_READ_ONLY__,
7811 __LIBGCC_EH_FRAME_SECTION_NAME__, __LIBGCC_JCR_SECTION_NAME__,
7812 __LIBGCC_CTORS_SECTION_ASM_OP__, __LIBGCC_DTORS_SECTION_ASM_OP__,
7813 __LIBGCC_TEXT_SECTION_ASM_OP__, __LIBGCC_INIT_SECTION_ASM_OP__,
7814 __LIBGCC_INIT_ARRAY_SECTION_ASM_OP__,
7815 __LIBGCC_STACK_GROWS_DOWNWARD__,
7816 __LIBGCC_DONT_USE_BUILTIN_SETJMP__,
7817 __LIBGCC_DWARF_ALT_FRAME_RETURN_COLUMN__,
7818 __LIBGCC_DWARF_FRAME_REGISTERS__,
7819 __LIBGCC_EH_RETURN_STACKADJ_RTX__, __LIBGCC_JMP_BUF_SIZE__,
7820 __LIBGCC_STACK_POINTER_REGNUM__ and
7821 __LIBGCC_VTABLE_USES_DESCRIPTORS__ for -fbuilding-libgcc.
7822 (builtin_define_with_value): Handle backslash-escaping in string
7823 macro values.
7824
f65586dc
RB
78252014-09-05 Richard Biener <rguenther@suse.de>
7826
7827 PR middle-end/63148
7828 * c-format.c (check_format_arg): Properly handle
7829 effectively signed POINTER_PLUS_EXPR offset.
7830
2b71f4a4
MLI
78312014-09-04 Manuel López-Ibáñez <manu@gcc.gnu.org>
7832
7833 * c.opt (Wc90-c99-compat,Wc++-compat,Wcomment,Wendif-labels,
7834 Winvalid-pch,Wlong-long,Wmissing-include-dirs,Wmultichar,Wpedantic,
7835 (Wdate-time,Wtraditional,Wundef,Wvariadic-macros): Add CPP, Var
7836 and Init.
7837 * c-opts.c (c_common_handle_option): Do not handle here.
7838 (sanitize_cpp_opts): Likewise.
7839 * c-common.c (struct reason_option_codes_t): Handle
7840 CPP_W_C90_C99_COMPAT and CPP_W_PEDANTIC.
7841
d2e4feca
MP
78422014-09-03 Marek Polacek <polacek@redhat.com>
7843
7844 * c.opt (Wlogical-not-parentheses): Enable by -Wall.
7845
9a771876
JJ
78462014-09-02 Jakub Jelinek <jakub@redhat.com>
7847 Balaji V. Iyer <balaji.v.iyer@intel.com>
7848 Igor Zamyatin <igor.zamyatin@intel.com>
7849
7850 * c-cilkplus.c (cilk_for_number_of_iterations): New function.
7851 * c-common.c (c_common_reswords): Added _Cilk_for.
7852 * c-common.h (enum rid): Added RID_CILK_FOR.
7853 (cilk_for_number_of_iterations): Add declaration.
7854 * c-omp.c (c_finish_omp_for): Added checks for CILK_SIMD and
7855 CILK_FOR.
7856 * c-pragma.c (init_pragma): Register "grainsize" pragma.
7857 * c-pragma.h (enum pragma_kind): Add PRAGMA_CILK_GRAINSIZE.
7858
81b5d104
MLI
78592014-08-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
7860
7861 * c.opt (Wbuiltin-macro-redefined,Wdeprecated,Wendif-labels,
7862 Winvalid-pch,Wliteral-suffix,Wmissing-include-dirs,Wtrigraphs,
7863 Wundef): Use CPP, Var and Init.
7864 * c-opts.c (c_common_handle_option): Do not handle the above flags here.
7865
b753b37b
MLI
78662014-08-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
7867
7868 * c.opt (Wbuiltin-macro-redefined): Use CPP, Var and Init.
7869 * c-opts.c (c_common_handle_option): Do not handle here.
7870
028aee17
JM
78712014-08-25 Jason Merrill <jason@redhat.com>
7872
7873 * c.opt: Change -std=c++1y and -std=gnu++1y to be aliases for
7874 -std=c++14 and -std=gnu++14, rather than the reverse.
7875 * c-opts.c (c_common_handle_option): Change OPT_std_c__1y and
7876 OPT_std_gnu__1y to OPT_std_c__14 and OPT_std_gnu__14.
7877 * c-common.h (cxx_dialect): Remove cxx1y.
7878
e4276ba5
ESR
78792014-08-23 Edward Smith-Rowland <3dw4rd@verizon.net>
7880
7881 * c-common.h (enum cxx_dialect): Add cxx14.
7882 * c-opts.c (set_std_cxx1y): Rename to set_std_cxx14; Use cxx14.
7883 * c-ubsan.c (ubsan_instrument_shift): Change comment and logic from
7884 cxx_dialect == cxx11 || cxx_dialect == cxx1y to cxx_dialect >= cxx11.
7885
a545cacd
JM
78862014-08-22 Jason Merrill <jason@redhat.com>
7887
7888 * c.opt (std=gnu++17): Fix alias.
7889
59ea0364
MP
78902014-08-22 Marek Polacek <polacek@redhat.com>
7891
7892 PR c++/62199
7893 * c-common.c (warn_logical_not_parentheses): Don't check LHS. Don't
7894 check for vector types. Drop LHS argument.
7895 * c-common.h (warn_logical_not_parentheses): Adjust.
7896
596e808c
MLI
78972014-08-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
7898
7899 * c.opt (Wcomment): Use CPP, Var and LangEnabledBy.
7900 (Wmultichar): Likewise.
7901 (Wdate-time): Use C-family languages instead of Common. Use CPP
7902 and Var.
7903 * c-opts.c (c_common_handle_option): Do not handle the above
7904 options here.
7905 (sanitize_cpp_opts): Likewise.
7906
18767f65
MLI
79072014-08-21 Manuel López-Ibáñez <manu@gcc.gnu.org>
7908
7909 PR fortran/44054
7910 * c-opts.c: Include tree-diagnostics.h.
7911 (c_diagnostic_finalizer): New.
7912 (c_common_initialize_diagnostics): Use it.
7913
b4413594
MLI
79142014-08-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
7915
7916 PR preprocessor/51303
7917 * c-common.c (struct reason_option_codes_t option_codes):
7918 Add CPP_W_MISSING_INCLUDE_DIRS. Sort alphabetically.
7919
43f9a13c
MLI
79202014-08-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
7921
7922 PR c/60975
7923 PR c/53063
7924 * c.opt (Wvariadic-macros): Use CPP and LangEnabledBy.
7925 * c-opts.c (c_common_handle_option): Call cpp_handle_option_auto.
7926 (c_common_post_options): Call init_global_opts_from_cpp.
7927 (sanitize_cpp_opts): Do not handle Wvariadic-macros here.
7928
04159acf
MP
79292014-08-19 Marek Polacek <polacek@redhat.com>
7930
7931 PR c++/62153
7932 * c-common.c (maybe_warn_bool_compare): New function.
7933 * c-common.h (maybe_warn_bool_compare): Declare.
7934 * c.opt (Wbool-compare): New option.
7935
35aff4fb
MP
79362014-08-19 Marek Polacek <polacek@redhat.com>
7937
7938 * c.opt (Wc99-c11-compat): New option.
7939
177cce46
MP
79402014-08-19 Marek Polacek <polacek@redhat.com>
7941
7942 * c-opts.c (sanitize_cpp_opts): Make warn_long_long be set according
7943 to warn_c90_c99_compat.
7944 * c.opt (Wc90-c99-compat, Wdeclaration-after-statement): Initialize
7945 to -1.
7946
6ae9194f
MLI
79472014-08-19 Manuel López-Ibáñez <manu@gcc.gnu.org>
7948 Steven Bosscher <steven@gcc.gnu.org>
7949
7950 PR c/52952
7951 * c-format.c: Add extra_arg_loc and format_string_loc to struct
7952 format_check_results.
7953 (check_function_format): Use true and add comment for boolean
7954 argument.
7955 (finish_dollar_format_checking): Use explicit location when warning.
7956 (check_format_info): Likewise.
7957 (check_format_arg): Set extra_arg_loc and format_string_loc.
7958 (check_format_info_main): Use explicit location when warning.
7959 (check_format_types): Pass explicit location.
7960 (format_type_warning): Likewise.
7961
8e54f6d3
MLI
79622014-08-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
7963
7964 PR fortran/44054
7965 * c-format.c: Handle Fortran flags.
7966
cd4e76fc
IZ
79672014-08-12 Igor Zamyatin <igor.zamyatin@intel.com>
7968
7969 PR other/61962
7970 * array-notation-common.c (find_rank): Added handling for other
7971 types of references.
7972
f3bede71
MP
79732014-08-10 Marek Polacek <polacek@redhat.com>
7974
7975 PR c/51849
7976 * c-opts.c (sanitize_cpp_opts): Pass warn_c90_c99_compat to libcpp.
7977 * c.opt (Wc90-c99-compat): Add option.
7978
9f25a338
TS
79792014-08-07 Trevor Saunders <tsaunders@mozilla.com>
7980
7981 * c-gimplify.c, cilk.c: Remove includes of pointer-set.h.
7982
62e4eb35
MP
79832014-08-03 Marek Polacek <polacek@redhat.com>
7984
ab20d992 7985 * c-common.c (check_case_value): Add location_t parameter. Use it.
62e4eb35
MP
7986 (c_add_case_label): Pass loc to check_case_value.
7987
b787e7a2
TS
79882014-08-02 Trevor Saunders <tsaunders@mozilla.com>
7989
7990 * cilk.c: Use hash_map instead of pointer_map.
7991
6e2830c3
TS
79922014-08-02 Trevor Saunders <tsaunders@mozilla.com>
7993
7994 * c-gimplify.c: Use hash_set instead of pointer_set.
7995
a7ee52fb
IZ
79962014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
7997
7998 PR middle-end/61455
7999 * array-notation-common.c (extract_array_notation_exprs): Handling
8000 of DECL_EXPR added.
8001
944fa280
JJ
80022014-08-01 Jakub Jelinek <jakub@redhat.com>
8003
8004 * c-common.h (min_align_of_type): Removed prototype.
8005 * c-common.c (min_align_of_type): Removed.
8006 * c-ubsan.h (ubsan_maybe_instrument_reference,
8007 ubsan_maybe_instrument_member_call): New prototypes.
8008 * c-ubsan.c: Include stor-layout.h and builtins.h.
8009 (ubsan_maybe_instrument_reference_or_call,
8010 ubsan_maybe_instrument_reference, ubsan_maybe_instrument_call): New
8011 functions.
8012
b4dfdc11
MG
80132014-07-31 Marc Glisse <marc.glisse@inria.fr>
8014
8015 PR c++/60517
8016 * c.opt (-Wreturn-local-addr): Move to common.opt.
8017
a41844e5
JM
80182014-07-30 Jason Merrill <jason@redhat.com>
8019
8020 PR c++/61659
8021 PR c++/61687
8022 Revert:
8023 * c.opt (-fuse-all-virtuals): New.
8024
976d5a22
TT
80252014-07-30 Tom Tromey <tromey@redhat.com>
8026
8027 PR c/59855
8028 * c.opt (Wdesignated-init): New option.
8029 * c-common.c (c_common_attribute_table): Add "designated_init".
8030 (handle_designated_init): New function.
8031
cdc94aca
MP
80322014-07-24 Marek Polacek <polacek@redhat.com>
8033
8034 PR c/57653
8035 * c-opts.c (c_finish_options): If -imacros is in effect, return.
8036
f41373b6
DS
80372014-07-16 Dodji Seketeli <dodji@redhat.com>
8038
8039 PR preprocessor/60723 - missing system-ness marks for macro tokens
8040 * c-ppoutput.c (struct print::prev_was_system_token): New data
8041 member.
8042 (init_pp_output): Initialize it.
8043 (maybe_print_line_1, maybe_print_line, print_line_1, print_line)
8044 (do_line_change): Return a flag saying if a line marker was
8045 emitted or not.
8046 (scan_translation_unit): Detect if the system-ness of the token we
8047 are about to emit is different from the one of the previously
8048 emitted token. If so, emit a line marker. Avoid emitting useless
8049 adjacent line markers. Avoid emitting line markers for tokens
8050 originating from the expansion of built-in macros.
8051 (scan_translation_unit_directives_only): Adjust.
8052
4d661eaa
MP
80532014-07-15 Marek Polacek <polacek@redhat.com>
8054
8055 * c-ubsan.c (ubsan_instrument_bounds): Don't instrument if
8056 TYPE_MAX_VALUE is NULL.
8057
b108f48f
JJ
80582014-07-14 Jakub Jelinek <jakub@redhat.com>
8059
8060 PR middle-end/61294
8061 * c.opt (Wmemset-transposed-args): New warning.
8062
c0221884
JM
80632014-07-10 Jason Merrill <jason@redhat.com>
8064
8065 PR c++/61659
8066 PR c++/61687
8067 * c.opt (-fuse-all-virtuals): New.
8068
63dfbb95
RB
80692014-07-09 Richard Biener <rguenther@suse.de>
8070
8071 PR c-family/61741
8072 * c-gimplify.c (c_gimplify_expr): Gimplify self-modify expressions
8073 using unsigned arithmetic if overflow does not wrap instead of
8074 if overflow is undefined.
8075
773ec47f
MP
80762014-07-06 Marek Polacek <polacek@redhat.com>
8077
8078 PR c/6940
8079 * c.opt (Wsizeof-array-argument): New option.
8080
00a7ba58
JJ
80812014-07-03 Jakub Jelinek <jakub@redhat.com>
8082
b1726d6c 8083 * c-ada-spec.c (dump_ada_nodes): Don't call qsort if
00a7ba58
JJ
8084 comments->count <= 1, as comments->entries might be NULL.
8085
52ec0ea3
MP
80862014-07-01 Marek Polacek <polacek@redhat.com>
8087
8088 * c.opt (Wint-conversion): New option.
8089
d5c3d343
MP
80902014-07-01 Marek Polacek <polacek@redhat.com>
8091
8092 PR c/58286
8093 * c.opt (Wincompatible-pointer-types): New option.
8094
6e7ceb17
PC
80952014-06-30 Paolo Carlini <paolo.carlini@oracle.com>
8096
8097 PR c++/51400
8098 * c-common.c (handle_noreturn_attribute, handle_const_attribute):
8099 Do not discard TYPE_QUALS of type.
8100
da73100b
JM
81012014-06-26 Jason Merrill <jason@redhat.com>
8102
8103 * c-common.h (enum cxx_dialect): Add cxx1z.
8104 * c.opt (std=c++1z, std=c++17, std=gnu++1z, std=gnu++17): New.
8105 * c-opts.c (c_common_handle_option, set_std_cxx1z): Handle it.
8106
08eedf75
TJ
81072014-06-26 Teresa Johnson <tejohnson@google.com>
8108
8109 * c-common.h (get_dump_info): Declare.
8110 * c-gimplify.c (c_genericize): Use saved dump files.
8111 * c-opts.c (c_common_parse_file): Begin and end dumps
8112 once around parsing invocation.
8113 (get_dump_info): New function.
8114
7b56b2f8
MP
81152014-06-23 Marek Polacek <polacek@redhat.com>
8116 Andrew MacLeod <amacleod@redhat.com>
8117
8118 PR c/61553
8119 * c-common.c (get_atomic_generic_size): Don't segfault if the
8120 type doesn't have a size.
8121
0e37a2f3
MP
81222014-06-20 Marek Polacek <polacek@redhat.com>
8123
8124 * c-gimplify.c: Include "c-ubsan.h" and "pointer-set.h".
8125 (ubsan_walk_array_refs_r): New function.
8126 (c_genericize): Instrument array bounds.
8127 * c-ubsan.c: Include "internal-fn.h".
8128 (ubsan_instrument_division): Mark instrumented arrays as having
8129 side effects. Adjust ubsan_type_descriptor call.
8130 (ubsan_instrument_shift): Likewise.
8131 (ubsan_instrument_vla): Adjust ubsan_type_descriptor call.
8132 (ubsan_instrument_bounds): New function.
8133 (ubsan_array_ref_instrumented_p): New function.
8134 (ubsan_maybe_instrument_array_ref): New function.
8135 * c-ubsan.h (ubsan_instrument_bounds): Declare.
8136 (ubsan_array_ref_instrumented_p): Declare.
8137 (ubsan_maybe_instrument_array_ref): Declare.
8138
81392014-06-20 Hale Wang <hale.wang@arm.com>
dd6fe7d4
HW
8140
8141 PR lto/61123
8142 * c.opt (fshort-enums): Add to LTO.
8143 * c.opt (fshort-wchar): Likewise.
8144
5c3d09f7
MP
81452014-06-16 Marek Polacek <polacek@redhat.com>
8146
8147 PR c/60439
8148 * c.opt (Wswitch-bool): Add Var.
8149
9cf32741
JJ
81502014-06-12 Jakub Jelinek <jakub@redhat.com>
8151
8152 PR middle-end/61486
8153 * c-omp.c (c_omp_split_clauses): Don't crash on firstprivate in
8154 #pragma omp target teams or
8155 #pragma omp {,target }teams distribute simd.
8156
62984918
JM
81572014-06-12 Jason Merrill <jason@redhat.com>
8158
8159 * c.opt (Wabi=, fabi-compat-version): New.
8160 * c-opts.c (c_common_handle_option): Handle -Wabi=.
8161 (c_common_post_options): Handle flag_abi_compat_version default.
8162 Disallow -fabi-compat-version=1.
8163 * c-common.h (abi_version_crosses): New.
8164
f961457f
JH
81652014-06-11 Jan Hubicka <hubicka@ucw.cz>
8166
adfac8df 8167 * c-common.c (handle_section_attribute): Update handling for
f961457f
JH
8168 section names that are no longer trees.
8169
92d28cbb
JJ
81702014-06-10 Jakub Jelinek <jakub@redhat.com>
8171
8172 PR fortran/60928
8173 * c-pragma.c (omp_pragmas_simd): Move PRAGMA_OMP_TASK...
8174 (omp_pragmas): ... back here.
8175
742938c9
MP
81762014-06-05 Marek Polacek <polacek@redhat.com>
8177
8178 PR c/49706
8179 * c-common.c (warn_logical_not_parentheses): New function.
8180 * c-common.h (warn_logical_not_parentheses): Declare.
8181 * c.opt (Wlogical-not-parentheses): New option.
8182
9d548dfb
MP
81832014-06-04 Marek Polacek <polacek@redhat.com>
8184
8185 PR c/30020
8186 * c-common.c (check_case_bounds): Add location parameter.
8187 Use it.
8188 (c_add_case_label): Pass loc to check_case_bounds.
8189
fedfecef
MP
81902014-06-03 Marek Polacek <polacek@redhat.com>
8191
8192 PR c/60439
8193 * c.opt (Wswitch-bool): New option.
8194
f6a7cffc
TS
81952014-05-22 Thomas Schwinge <thomas@codesourcery.com>
8196
040d18b6
TS
8197 * c-common.h (c_omp_sharing_predetermined, c_omp_remap_decl):
8198 Remove prototypes.
8199 (record_types_used_by_current_var_decl): Move prototype to where
8200 it belongs.
8201
f6a7cffc
TS
8202 * c-common.c (DEF_FUNCTION_TYPE_0, DEF_FUNCTION_TYPE_6)
8203 (DEF_FUNCTION_TYPE_7, DEF_FUNCTION_TYPE_8)
8204 (DEF_FUNCTION_TYPE_VAR_5): Cosmetic fixes.
8205
632f2871
RS
82062014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
8207
8208 * c-common.h (CTI_VOID_ZERO, void_zero_node): Delete.
8209 * c-common.c (c_common_nodes_and_builtins): Don't initialize
8210 void_zero_node.
8211 * c-pretty-print.c (pp_c_void_constant): New function.
8212 (c_pretty_printer::constant, c_pretty_printer::primary_expression)
8213 (c_pretty_printer::expression): Handle VOID_CST.
8214 * cilk.c (extract_free_variables): Likewise.
8215 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift)
8216 (ubsan_instrument_vla): Use void_node instead of void_zero_node.
8217
766090c2
TS
82182014-05-17 Trevor Saunders <tsaunders@mozilla.com>
8219
8220 * c-common.h (sorted_fields_type): Remove variable_size GTY attribute.
8221 * c-pragma.c (push_alignment): Adjust.
8222 (handle_pragma_push_options): Likewise.
8223
661a0813
MP
82242014-05-09 Marek Polacek <polacek@redhat.com>
8225
8226 PR c/50459
8227 * c-common.c (check_user_alignment): Return -1 if alignment is error
8228 node.
8229 (handle_aligned_attribute): Don't call default_conversion on
8230 FUNCTION_DECLs.
8231 (handle_vector_size_attribute): Likewise.
8232 (handle_tm_wrap_attribute): Handle case when wrap_decl is error node.
8233 (handle_sentinel_attribute): Call default_conversion and allow even
8234 integral types as an argument.
8235
2793eeab
MP
82362014-05-08 Marek Polacek <polacek@redhat.com>
8237
8238 PR c/61053
8239 * c-common.c (min_align_of_type): New function factored out from...
8240 (c_sizeof_or_alignof_type): ...here.
8241 * c-common.h (min_align_of_type): Declare.
8242
f827930a
MP
82432014-05-08 Marek Polacek <polacek@redhat.com>
8244
8245 PR c/61077
8246 * c-common.c (check_main_parameter_types): Warn for _Atomic-qualified
8247 parameter type of main.
8248
ca49b74e
DD
82492014-05-07 DJ Delorie <dj@redhat.com>
8250
8251 * c-cppbuiltin.c (print_bits_of_hex): New.
8252 (builtin_define_type_minmax): Print values using hex so as not to
8253 require a pre-computed list of string values.
8254
1d60af08
KZ
82552014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
8256 Mike Stump <mikestump@comcast.net>
8257 Richard Sandiford <rdsandiford@googlemail.com>
8258
8259 * c-ada-spec.c: Include wide-int.h.
8260 (ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX): Remove.
8261 (dump_generic_ada_node): Use wide-int interfaces.
8262 * c-common.c: Include wide-int-print.h.
8263 (shorten_compare): Use wide-int interfaces and tree_int_cst_lt.
8264 (pointer_int_sum): Use wide-int interfaces.
8265 (c_common_nodes_and_builtins): Use make_int_cst.
8266 (match_case_to_enum_1): Use tree_fits_uhwi_p and tree_fits_shwi_p.
8267 (handle_alloc_size_attribute): Use wide-int interfaces.
8268 (get_nonnull_operand): Likewise.
8269 * c-format.c (get_constant): Use tree_fits_uhwi_p.
8270 * c-lex.c: Include wide-int.h.
8271 (narrowest_unsigned_type): Take a widest_int rather than two
8272 HOST_WIDE_INTs.
8273 (narrowest_signed_type): Likewise.
8274 (interpret_integer): Update accordingly. Use wide-int interfaces.
8275 (lex_charconst): Use wide-int interfaces.
8276 * c-pretty-print.c: Include wide-int.h.
8277 (pp_c_integer_constant): Use wide-int interfaces.
8278 * cilk.c (declare_one_free_variable): Use tree_int_cst_lt instead of
8279 INT_CST_LT_UNSIGNED.
8280
b15458be
RB
82812014-05-06 Richard Biener <rguenther@suse.de>
8282
8283 * c-opts.c (c_common_post_options): For -freestanding,
8284 -fno-hosted and -fno-builtin disable pattern recognition
8285 if not enabled explicitely.
8286
6577374e
MP
82872014-05-02 Marek Polacek <polacek@redhat.com>
8288
8289 * c.opt (Wsizeof-pointer-memaccess): Describe option.
8290
d00887e8
MP
82912014-05-01 Marek Polacek <polacek@redhat.com>
8292
8293 PR c/43245
8294 * c.opt (Wdiscarded-qualifiers): Add.
8295
f8ed5150
MP
82962014-04-30 Marek Polacek <polacek@redhat.com>
8297
8298 * c-ubsan.c (ubsan_instrument_division): Handle REAL_TYPEs. Perform
8299 INT_MIN / -1 sanitization only for integer types.
8300
45484dcf
MP
83012014-04-25 Marek Polacek <polacek@redhat.com>
8302
8303 PR c/18079
8304 * c-common.c (handle_noinline_attribute): Warn if the attribute
8305 conflicts with always_inline attribute.
8306 (handle_always_inline_attribute): Warn if the attribute conflicts
8307 with noinline attribute.
8308
38e514c0
MP
83092014-04-25 Marek Polacek <polacek@redhat.com>
8310
8311 PR c/60156
8312 * c-common.c (check_main_parameter_types): Warn about variadic main.
8313
44875f92
MS
83142014-04-24 Mike Stump <mikestump@comcast.net>
8315
8316 * c.opt (Wshadow-ivar): Default to on.
8317
dcaaa5a0
DP
83182014-04-24 Dimitris Papavasiliou <dpapavas@gmail.com>
8319
8320 * c.opt (Wshadow-ivar, flocal-ivars, fivar-visibility): Add.
8321
c07d7c02
MP
83222014-04-23 Marek Polacek <polacek@redhat.com>
8323
8324 * c-common.c (handle_tm_wrap_attribute): Tweak error message.
8325
1c33c9b7
JJ
83262014-04-22 Jakub Jelinek <jakub@redhat.com>
8327
8328 PR sanitizer/60275
8329 * c-ubsan.c (ubsan_instrument_return): Return __builtin_trap ()
8330 if flag_sanitize_undefined_trap_on_error.
8331 (ubsan_instrument_division, ubsan_instrument_shift,
8332 ubsan_instrument_vla): Likewise. Use __ubsan_handle_*_abort ()
8333 if !flag_sanitize_recover.
8334
793c625f
MG
83352014-04-22 Marc Glisse <marc.glisse@inria.fr>
8336
8337 PR libstdc++/43622
8338 * c-common.c (registered_builtin_types): Make non-static.
8339 * c-common.h (registered_builtin_types): Declare.
8340
b0f1bf36 83412014-04-14 Richard Biener <rguenther@suse.de>
ab20d992 8342 Marc Glisse <marc.glisse@inria.fr>
b0f1bf36
RB
8343
8344 PR c/60819
8345 * c-common.c (convert_vector_to_pointer_for_subscript): Properly
8346 apply may-alias the scalar pointer type when applicable.
8347
3b07fa4a
IZ
83482014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
8349
8350 PR middle-end/60467
8351 * cilk.c (cilk_set_spawn_marker): Remove FUNCTION_DECL
8352 as possible argument for Cilk_spawn.
8353
cbbd2b1c
TB
83542014-04-11 Tobias Burnus <burnus@net-b.de>
8355
8356 PR c/60194
8357 * c.opt (Wformat-signedness): Add
8358 * c-format.c(check_format_types): Use it.
8359
6415bd5d
JM
83602014-04-11 Jason Merrill <jason@redhat.com>
8361
8362 PR c++/57926
8363 * c-common.c (sync_resolve_size, get_atomic_generic_size): Call
8364 default_conversion for an array argument.
8365
6525783a
MP
83662014-04-08 Marek Polacek <polacek@redhat.com>
8367
8368 PR sanitizer/60745
8369 * c-ubsan.c: Include asan.h.
8370 (ubsan_instrument_return): Call initialize_sanitizer_builtins.
8371
880a467b
NS
83722014-04-03 Nathan Sidwell <nathan@codesourcery.com>
8373
8374 * c.opt (Wnon-virtual-dtor): Auto set when Weffc++.
8375
7b59ff2d
MP
83762014-04-02 Marek Polacek <polacek@redhat.com>
8377
8378 * c-common.h (c_expand_expr): Remove declaration.
8379
8edbfaa6
JJ
83802014-03-28 Jakub Jelinek <jakub@redhat.com>
8381
8382 PR c++/60689
8383 * c-common.c (add_atomic_size_parameter): When creating new
8384 params vector, push the size argument first.
8385
07d72e1d
JJ
83862014-03-26 Jakub Jelinek <jakub@redhat.com>
8387
8388 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
8389 ubsan_instrument_vla, ubsan_instrument_return): Adjust
8390 ubsan_create_data callers.
8391
b35e0fa0
JJ
83922014-03-22 Jakub Jelinek <jakub@redhat.com>
8393
8394 PR debug/60603
8395 * c-opts.c (c_finish_options): Restore cb_file_change call to
8396 <built-in>.
8397
39a1ebb3
JJ
83982014-03-13 Jakub Jelinek <jakub@redhat.com>
8399
8400 PR middle-end/36282
8401 * c-pragma.c (apply_pragma_weak): Only look at
8402 TREE_SYMBOL_REFERENCED (DECL_ASSEMBLER_NAME (decl)) if
8403 DECL_ASSEMBLER_NAME_SET_P (decl).
8404 (maybe_apply_pending_pragma_weaks): Exit early if
8405 vec_safe_is_empty (pending_weaks) rather than only when
8406 !pending_weaks.
8407 (maybe_apply_pragma_weak): Likewise. If !DECL_ASSEMBLER_NAME_SET_P,
8408 set assembler name back to NULL afterwards.
8409
a07f6ed2
JM
84102014-03-11 Jason Merrill <jason@redhat.com>
8411
8412 * c.opt: Add -std=gnu++14.
8413
75b107f5
IB
84142014-03-11 Ian Bolton <ian.bolton@arm.com>
8415
8416 * c-opts.c (c_common_post_options): Don't override
8417 -ffp-contract=fast if unsafe-math-optimizations is on.
8418
f42c637e
PM
84192014-03-08 Paulo Matos <paulo@matos-sorge.com>
8420
22b15758 8421 * c.opt: Enable LTO FE for fshort-double.
f42c637e 8422
70e24808
JM
84232014-03-07 Jason Merrill <jason@redhat.com>
8424
8425 * c.opt: Add -std=c++14.
8426
3af9c5e9
MP
84272014-03-06 Marek Polacek <polacek@redhat.com>
8428
8429 PR c/60197
8430 * cilk.c (contains_cilk_spawn_stmt): New function.
8431 (contains_cilk_spawn_stmt_walker): Likewise.
8432 (recognize_spawn): Give error on invalid use of _Cilk_spawn.
8433 * c-common.h (contains_cilk_spawn_stmt): Add declaration.
8434
b3bdf019
JJ
84352014-03-03 Jakub Jelinek <jakub@redhat.com>
8436
8437 * c-pragma.c (c_pp_lookup_pragma): Handle PRAGMA_CILK_SIMD.
8438 (init_pragma): Call cpp_register_deferred_pragma for PRAGMA_CILK_SIMD
8439 even when flag_preprocess_only.
8440
ca7e759d
JM
84412014-02-26 Jason Merrill <jason@redhat.com>
8442
8443 PR c++/59231
8444 PR c++/11586
8445 * c-common.c (shorten_compare): Don't check
8446 c_inhibit_evaluation_warnings.
8447
28e41874
JJ
84482014-02-19 Jakub Jelinek <jakub@redhat.com>
8449
cca615af
JJ
8450 PR c/37743
8451 * c-common.c (c_common_nodes_and_builtins): When initializing
8452 c_uint{16,32,64}_type_node, also set corresponding
8453 uint{16,32,64}_type_node to the same value.
8454
28e41874
JJ
8455 PR c++/60267
8456 * c-pragma.c (init_pragma): Don't call cpp_register_deferred_pragma
8457 for PRAGMA_IVDEP if flag_preprocess_only.
8458
c2bf53a1
JJ
84592014-02-12 Jakub Jelinek <jakub@redhat.com>
8460
8461 PR c/60101
8462 * c-common.c (merge_tlist): If copy is true, call new_tlist,
8463 if false, add ADD itself, rather than vice versa.
8464 (verify_tree): For COND_EXPR, don't call merge_tlist with non-zero
8465 copy. For SAVE_EXPR, only call merge_tlist once.
8466
8fcbce72
JJ
84672014-02-08 Jakub Jelinek <jakub@redhat.com>
8468
8469 PR middle-end/60092
8470 * c-common.c (handle_alloc_size_attribute): Use tree_fits_uhwi_p
8471 and tree_to_uhwi.
8472 (handle_alloc_align_attribute, handle_assume_aligned_attribute): New
8473 functions.
8474 (c_common_attribute_table): Add alloc_align and assume_aligned
8475 attributes.
8476
0a756a3f
MP
84772014-02-06 Marek Polacek <polacek@redhat.com>
8478
8479 PR c/60087
8480 * c-common.c (warn_for_sign_compare): Call warning_at with location
8481 instead of warning.
8482
7ec4847a
MP
84832014-02-05 Marek Polacek <polacek@redhat.com>
8484
8485 PR c/53123
8486 * c-omp.c (c_finish_omp_atomic): Remove unreachable return
8487 statement.
8488
66f20604
MP
84892014-02-04 Marek Polacek <polacek@redhat.com>
8490
8491 PR c/60036
8492 * c-common.c (conversion_warning): Unwrap C_MAYBE_CONST_EXPR and/or
8493 SAVE_EXPR.
8494
5d77fb19
MG
84952014-02-03 Marc Glisse <marc.glisse@inria.fr>
8496
8497 PR c++/53017
8498 PR c++/59211
8499 * c-common.c (handle_aligned_attribute, handle_alloc_size_attribute,
8500 handle_vector_size_attribute, handle_nonnull_attribute): Call
8501 default_conversion on the attribute argument.
8502 (handle_nonnull_attribute): Increment the argument number.
8503
81e5eca8
MP
85042014-01-31 Marek Polacek <polacek@redhat.com>
8505
8506 PR c/59963
8507 * c-common.c (add_atomic_size_parameter): Pass vNULL to
8508 build_function_call_vec.
8509 (resolve_overloaded_builtin): Likewise.
8510 * c-common.h (build_function_call_vec): Adjust declaration.
8511
68fca595
MP
85122014-01-30 Marek Polacek <polacek@redhat.com>
8513
8514 PR c/59940
8515 * c-common.h (unsafe_conversion_p): Adjust declaration.
8516 (warnings_for_convert_and_check): Likewise.
8517 (convert_and_check): Likewise.
8518 * c-common.c (unsafe_conversion_p): Add location parameter. Call
8519 expansion_point_location_if_in_system_header on it.
8520 (warnings_for_convert_and_check): Add location parameter. Call
8521 expansion_point_location_if_in_system_header on it. Use it.
8522 (convert_and_check): Add location parameter. Use it.
8523 (conversion_warning): Likewise.
8524 (c_add_case_label): Adjust convert_and_check calls.
8525 (scalar_to_vector): Adjust unsafe_conversion_p calls.
8526
b72271b9
BI
85272014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
8528
8529 * c-common.c (c_define_builtins): Replaced flag_enable_cilkplus with
8530 flag_cilkplus.
8531 * c-pragma.c (init_pragma): Likewise.
8532 * c.opt: Likewise.
8533
393e8e8b
MP
85342014-01-23 Marek Polacek <polacek@redhat.com>
8535
8536 PR c/59846
8537 * c-common.c (shorten_compare): Add location_t parameter.
8538 * c-common.h (shorten_binary_op): Adjust declaration.
8539
f04dda30
MP
85402014-01-23 Marek Polacek <polacek@redhat.com>
8541
8542 PR c/58346
8543 * c-common.c (pointer_to_zero_sized_aggr_p): New function.
8544 * c-common.h: Declare it.
8545
621955cb
EB
85462014-01-20 Eric Botcazou <ebotcazou@adacore.com>
8547
8548 * c-ada-spec.h (dump_ada_specs): Revert prototype change.
8549 * c-ada-spec.c (dump_ads): Likewise.
8550 (cpp_check): Likewise.
8551 (dump_ada_specs): Likewise.
8552
85532014-01-15 Laurent Alfonsi <laurent.alfonsi@st.com>
67bf2939
LA
8554
8555 PR c++/49718
8556 * c-common.c (handle_no_instrument_function_attribute): Allow
8557 no_instrument_function attribute in class member
8558 definition/declaration.
8559
241f845a
JJ
85602014-01-15 Jakub Jelinek <jakub@redhat.com>
8561
8562 PR c/58943
8563 * c-omp.c (c_finish_omp_atomic): Set in_late_binary_op around
8564 build_modify_expr with non-NOP_EXPR opcode. Handle return from it
8565 being COMPOUND_EXPR.
8566 (c_finish_omp_for): Handle incr being COMPOUND_EXPR with first
8567 operand a SAVE_EXPR and second MODIFY_EXPR.
8568
e83b8e2e
JJ
85692014-01-09 Jakub Jelinek <jakub@redhat.com>
8570
8571 PR target/58115
8572 * c-pch.c (c_common_write_pch): Call
8573 prepare_target_option_nodes_for_pch.
8574
23a5b65a
RS
85752014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
8576
8577 Update copyright years
8578
f9030485
RS
85792014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
8580
8581 * array-notation-common.c, c-cilkplus.c: Use the standard form for
8582 the copyright notice.
8583
f2aa696b
EB
85842013-12-28 Eric Botcazou <ebotcazou@adacore.com>
8585
8586 * c-ada-spec.c (print_constructor): New function.
8587 (print_destructor): Retrieve the origin of the destructor.
8588 (print_ada_declaration): Revamp handling of constructors/destructors.
8589
3f8257db 85902013-12-23 Stuart Hastings <stuart@apple.com>
1f26ac87
JM
8591 Bill Maddox <maddox@google.com>
8592 Jason Merrill <jason@redhat.com>
8593
8594 * c.opt: Add -fdeclone-ctor-dtor.
8595 * c-opts.c (c_common_post_options): Default to on iff -Os.
8596
41958c28
BI
85972013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
8598
8599 * c-common.c (c_common_attribute_table): Added "cilk simd function"
8600 attribute.
8601 * c-pragma.h (enum pragma_cilk_clause): Remove.
ab20d992 8602 (enum pragma_omp_clause): Added the following fields:
41958c28
BI
8603 PRAGMA_CILK_CLAUSE_NOMASK, PRAGMA_CILK_CLAUSE_MASK,
8604 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_NONE,
8605 PRAGMA_CILK_CLAUSE_LINEAR, PRAGMA_CILK_CLAUSE_PRIVATE,
8606 PRAGMA_CILK_CLAUSE_FIRSTPRIVATE, PRAGMA_CILK_CLAUSE_LASTPRIVATE,
8607 PRAGMA_CILK_CLAUSE_UNIFORM.
8608
b1726d6c 8609
12893402
BI
86102013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
8611
8612 * cilk.c (cilk_outline): Made this function non-static.
8613 (gimplify_cilk_spawn): Removed pre_p and post_p arguments.
8614 (create_cilk_wrapper): Added a new parameter: a function pointer.
8615 (c_install_body_w_frame_cleanup): Remove
8616 (extract_free_variables): Added VEC_INIT_EXPR and CONSTRUCTOR case.
8617 * c-common.h (cilk_outline): New prototype.
8618 (gimplify_cilk_spawn): Removed two parameters.
8619 (cilk_install_body_with_frame_cleanup): New prototype.
8620 * c-gimplify.c (c_gimplify_expr): Added MODIFY_EXPR, CALL_EXPR and
8621 CILK_SPAWN_STMT case.
8622
085b42ed
BS
86232013-12-11 Bernd Schmidt <bernds@codesourcery.com>
8624
2ce064c3
BS
8625 * c-common.c (c_fully_fold_internal): Handle ADDR_SPACE_CONVERT_EXPR.
8626
085b42ed
BS
8627 * c-common.h (enum c_tree_index): Remove CTI_INT_ARRAY_TYPE.
8628 (int_array_type_node): Remove.
8629 * c-common.c (c_common_nodes_and_builtins): Don't build it.
8630
9e36c9ed
MP
86312013-12-05 Marek Polacek <polacek@redhat.com>
8632
8633 PR c/52023
8634 * c-common.c (c_sizeof_or_alignof_type): Move a declaration into
8635 [ADJUST_FIELD_ALIGN].
8636
296674db
JM
86372013-12-04 Joseph Myers <joseph@codesourcery.com>
8638
8639 PR c/52023
8640 * c-common.c (c_sizeof_or_alignof_type): Add parameter min_alignof
8641 and check field alignment if set.
8642 * c-common.h (c_sizeof_or_alignof_type): Update prototype.
8643 (c_sizeof, c_alignof): Update calls to c_sizeof_or_alignof_type.
8644
b1726d6c 86452013-12-04 Jakub Jelinek <jakub@redhat.com>
31e071ae
MP
8646 Marek Polacek <polacek@redhat.com>
8647
8648 * c-gimplify.c (c_gimplify_expr): If doing the integer-overflow
8649 sanitization, call unsigned_type_for only when !TYPE_OVERFLOW_WRAPS.
8650
d7947e19
L
86512013-11-29 H.J. Lu <hongjiu.lu@intel.com>
8652
8653 PR c/59309
8654 * cilk.c (gimplify_cilk_spawn): Properly handle function without
8655 arguments.
8656
fad7652e
JJ
86572013-11-29 Jakub Jelinek <jakub@redhat.com>
8658
8659 PR c/59280
8660 * c-common.c (get_priority): If TREE_VALUE (args) is IDENTIFIER_NODE,
8661 goto invalid. If it is error_mark_node, don't issue further
8662 diagnostics.
8663
8b5e1202
SO
86642013-11-28 Sergey Ostanevich <sergos.gnu@gmail.com>
8665
8666 * c.opt (Wopenmp-simd): New.
8667
0a508bb6
JJ
86682013-11-22 Jakub Jelinek <jakub@redhat.com>
8669
8670 * c-ubsan.h (ubsan_instrument_return): New prototype.
8671 * c-ubsan.c (ubsan_instrument_return): New function.
8672
2fb9a547
AM
86732013-11-22 Andrew MacLeod <amacleod@redhat.com>
8674
8675 * c-common.c: Add required include files from gimple.h.
ab20d992
JJ
8676 * c-gimplify.c: Likewise.
8677 * cilk.c: Likewise.
2fb9a547 8678
8400e75e
DM
86792013-11-22 David Malcolm <dmalcolm@redhat.com>
8680
8681 * c-common.c (unsafe_conversion_p): Remove use of
8682 EXPR_LOC_OR_HERE macro.
8683 (conversion_warning): Likewise.
8684 (warnings_for_convert_and_check): Likewise.
8685 (warn_for_collisions_1): Likewise.
8686 (shorten_compare): Likewise, and remove use of in_system_header
8687 macro, using the location from the former.
8688 * c-lex.c (dump_one_header): Remove use of input_filename macro.
8689 (cb_def_pragma): Remove use of in_system_header macro.
8690 (lex_string): Likewise.
8691 * c-pragma.c (handle_pragma_float_const_decimal64): Likewise.
8692
eb1ce453
KZ
86932013-11-20 Kenneth Zadeck <zadeck@naturalbridge.com>
8694 Mike Stump <mikestump@comcast.net>
8695 Richard Sandiford <rdsandiford@googlemail.com>
8696
8697 * c-ada-spec.c (is_simple_enum): Use tree_to_shwi and tree_to_uhwi
8698 instead of TREE_INT_CST_LOW, in cases where there is a protecting
8699 tree_fits_shwi_p or tree_fits_uhwi_p.
8700 (dump_generic_ada_node): Likewise.
8701 * c-format.c (check_format_arg): Likewise.
8702 * c-pretty-print.c (pp_c_integer_constant): Likewise.
8703
6b3b8c27
KZ
87042013-11-20 Kenneth Zadeck <zadeck@naturalbridge.com>
8705
8706 * c-common.c (check_function_arguments_recurse): Use tree_to_uhwi.
8707
49b0aa18
JC
87082013-11-19 Joshua J Cogliati <jrincayc@yahoo.com>
8709
8710 PR c/53001
8711 * c-common.c (unsafe_conversion_p): Make this function
8712 return an enumeration with more detail.
8713 (conversion_warning): Use the new return type of
8714 unsafe_conversion_p to separately warn either about conversions
8715 that lower floating point number precision or about the other
8716 kinds of conversions.
8717 * c-common.h (enum conversion_safety): New enumeration.
8e745a17
JJ
8718 (unsafe_conversion_p): switching return type to
8719 conversion_safety enumeration.
49b0aa18
JC
8720 * c.opt: Adding new warning -Wfloat-conversion and
8721 enabling it with -Wconversion.
8722
b826515a
BS
87232013-11-19 Basile Starynkevitch <basile@starynkevitch.net>
8724
8e745a17
JJ
8725 * c-opts.c: Include plugin.h.
8726 (cb_file_change): Invoke plugin event PLUGIN_INCLUDE_FILE.
b826515a 8727
b9a55b13
MP
87282013-11-19 Marek Polacek <polacek@redhat.com>
8729
8730 * c-ubsan.c (ubsan_instrument_division): Adjust ubsan_create_data
8731 call.
8732 (ubsan_instrument_shift): Likewise.
8733 (ubsan_instrument_vla): Likewise.
8734
7d362f6c
RS
87352013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
8736
8737 * c-common.c (convert_vector_to_pointer_for_subscript): Remove
8738 cast to unsigned type.
8739
386b1f1f
RS
87402013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
8741
8742 * c-common.c (fold_offsetof_1): Use tree_to_uhwi rather than
8743 tree_low_cst.
8744 (complete_array_type): Update comment to refer to tree_to_[su]hwi
8745 rather than tree_low_cst.
8746
ae7e9ddd
RS
87472013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
8748
8749 * c-common.c, c-cppbuiltin.c: Replace tree_low_cst (..., 1) with
8750 tree_to_uhwi throughout.
8751
9439e9a1
RS
87522013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
8753
8754 * c-common.c, c-format.c, c-omp.c, c-pretty-print.c: Replace
8755 tree_low_cst (..., 0) with tree_to_shwi throughout.
8756
cc269bb6
RS
87572013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
8758
8759 * c-ada-spec.c, c-common.c, c-pretty-print.c: Replace
8760 host_integerp (..., 1) with tree_fits_uhwi_p throughout.
8761
9541ffee
RS
87622013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
8763
8764 * c-ada-spec.c, c-common.c, c-format.c, c-pretty-print.c: Replace
8765 host_integerp (..., 0) with tree_fits_shwi_p throughout.
8766
c02065fc
AH
87672013-11-15 Aldy Hernandez <aldyh@redhat.com>
8768
8769 * c-cilkplus.c: New file.
8770 * c-common.c (readonly_error): Add location argument.
8771 * c-common.h (readonly_error): Same.
8772 (c_finish_cilk_clauses): Protoize.
8773 (c_check_cilk_loop): Same.
8774 c-omp.c (c_finish_omp_for): Handle CILK_SIMD nodes.
8775 Do not fail on error_mark_node.
8776 Abstract increment canonicalization to here...
8777 (c_omp_for_incr_canonicalize_ptr): New.
8778 c-pragma.c (init_pragma): Register "simd" pragma.
8779 c-pragma.h (enum pragma_kind): Add PRAGMA_CILK_SIMD.
8780 (enum pragma_cilk_clause): New.
8781
9cc65f15
RS
87822013-11-15 Richard Sandiford <rdsandiford@googlemail.com>
8783
8784 * c-pretty-print.c (pp_c_character_constant): Remove unnecessary
8785 wchar_type and host_integerp checks.
8786
18f429e2
AM
87872013-11-14 Andrew MacLeod <amacleod@redhat.com>
8788
8789 * c-common.c: Likewise.
8790 * c-gimplify.c: Likewise.
8791 * cilk.c: Likewise.
8792
d8a2d370
DN
87932013-11-14 Diego Novillo <dnovillo@google.com>
8794
8795 * c-common.c: Include fold-const.h.
8796 Include stor-layout.h.
8797 Include calls.h.
8798 Include stringpool.h.
8799 Include attribs.h.
8800 Include varasm.h.
8801 Include trans-mem.h.
8802 * c-cppbuiltin.c: Include stor-layout.h.
8803 Include stringpool.h.
8804 * c-format.c: Include stringpool.h.
8805 * c-lex.c: Include stringpool.h.
8806 Include stor-layout.h.
8807 * c-pragma.c: Include stringpool.h.
8808 Include attribs.h.
8809 Include varasm.h.
8810 Include gcc-symtab.h.
8811 * c-pretty-print.c: Include stor-layout.h.
8812 Include attribs.h.
8813 * cilk.c: Include stringpool.h.
8814 Include calls.h.
8815
38b7bc7f
JM
88162013-11-13 Joseph Myers <joseph@codesourcery.com>
8817
8818 * c-common.h (enum rid): Add RID_AUTO_TYPE.
8819 * c-common.c (c_common_reswords): Add __auto_type.
8820 (keyword_begins_type_specifier): Handle RID_AUTO_TYPE.
8821
45b0be94
AM
88222013-11-12 Andrew MacLeod <amacleod@redhat.com>
8823
18f429e2
AM
8824 * c-common.c: Include gimplify.h.
8825 * c-gimplify.c: Likewise.
8826 * cilk.c: Likewise.
8827 * c-omp.c: Include gimple-expr.h instead of gimple.h.
8828 * c-ubsan.c: Don't include gimple.h.
45b0be94 8829
582d9b50
JM
88302013-11-12 Joseph Myers <joseph@codesourcery.com>
8831
8832 * c-common.c (c_common_reswords): Add _Thread_local.
8833
6b28e197
JM
88342013-11-09 Joseph Myers <joseph@codesourcery.com>
8835
8836 * c-common.c (atomic_size_supported_p): New function.
8837 (resolve_overloaded_atomic_exchange)
8838 (resolve_overloaded_atomic_compare_exchange)
8839 (resolve_overloaded_atomic_load, resolve_overloaded_atomic_store):
8840 Use it instead of comparing size with a local list of sizes.
8841
267bac10
JM
88422013-11-07 Andrew MacLeod <amacleod@redhat.com>
8843 Joseph Myers <joseph@codesourcery.com>
8844
8845 * c-common.h (enum rid): Add RID_ATOMIC.
8846 * c-common.c (c_common_reswords): Add _Atomic.
8847 (sync_resolve_params): Use TYPE_MAIN_VARIANT on pointer argument.
8848 (keyword_is_type_qualifier): Accept RID_ATOMIC.
8849 * c-format.c (check_format_types): Check for extra _Atomic
8850 qualifiers in format argument.
8851 * c-pretty-print.c (pp_c_cv_qualifiers): Handle atomic qualifier.
8852 (pp_c_type_qualifier_list): Mention _Atomic in comment.
8853
5157b91e
TB
88542013-11-06 Tobias Burnus <burnus@net-b.de>
8855
8856 * c-common.c (reason_option_codes_t): Add CPP_W_DATE_TIME.
8857
6dbe0958
JM
88582013-11-06 Joseph Myers <joseph@codesourcery.com>
8859
8860 * c-opts.c (c_common_post_options): Set -ffp-contract=off in C
8861 standards modes.
8862 * c-cppbuiltin.c (cpp_iec_559_value): Consider -ffp-contract=fast
8863 to mean lack of IEEE 754 support.
8864
e8ff5196
TB
88652013-11-05 Tobias Burnus <burnus@net-b.de>
8866
8867 * c.opt (-Wdate-time): New option
8868 * c-opts.c (sanitize_cpp_opts): Pass on to libcpp.
8869
254a0760
JM
88702013-11-05 Joseph Myers <joseph@codesourcery.com>
8871
8872 * c-cppbuiltin.c (cpp_iec_559_value): Test
8873 flag_excess_precision_cmdline not flag_excess_precision.
8874
6d7f7e0a
TB
88752013-11-05 Tobias Burnus <burnus@net-b.de>
8876
8877 * c.opt (fopenmp-simd): New option.
8878 * c-pragma.c (omp_pragmas): Move pragmas which can contain simd to ...
8879 (omp_pragmas): ... this new struct.
8880 (c_pp_lookup_pragma): Also walk omp_pragmas.
8881 (init_pragma): Init pragmas for -fopenmp-simd.
8882
55a7f02f
MP
88832013-11-04 Marek Polacek <polacek@redhat.com>
8884
8885 PR c++/58979
8886 * c-common.c (invalid_indirection_error): Handle RO_ARROW_STAR case.
8887
9193fb05
JM
88882013-11-04 Joseph Myers <joseph@codesourcery.com>
8889
8890 * c-cppbuiltin.c (cpp_iec_559_value, cpp_iec_559_complex_value):
8891 New functions.
8892 (c_cpp_builtins): Define __GCC_IEC_559 and __GCC_IEC_559_COMPLEX.
8893
94159ecf
EB
88942013-11-04 Eric Botcazou <ebotcazou@adacore.com>
8895
8896 * c-ada-spec.h (cpp_operation): Add IS_TRIVIAL.
8897 (dump_ada_specs): Adjust prototype of second callback.
8898 * c-ada-spec.c (cpp_check): New global variable.
8899 (dump_ada_nodes): Remove cpp_check parameter and do not pass it down.
8900 (print_generic_ada_decl): Likewise.
8901 (has_static_fields): Change return type to bool and add guard.
8902 (has_nontrivial_methods): New predicate.
8903 (is_tagged_type): Change return type to bool.
8904 (separate_class_package): Call has_nontrivial_methods.
8905 (pp_ada_tree_identifier): Minor tweaks.
8906 (dump_ada_function_declaration): Adjust calls to dump_generic_ada_node.
8907 (dump_ada_array_domains): Likewise.
8908 (dump_ada_array_type): Likewise.
8909 (dump_template_types): Remove cpp_check parameter and do not pass it to
8910 dump_generic_ada_node.
8911 (dump_ada_template): Likewise.
8912 (dump_generic_ada_node): Remove cpp_check parameter and do not pass it
8913 recursively.
8914 (print_ada_methods): Change return type to integer. Remove cpp_check
8915 parameter and do not pass it down.
8916 (dump_nested_types): Remove cpp_check parameter and do not pass it to
8917 dump_generic_ada_node.
8918 (print_ada_declaration): Likewise. Test RECORD_OR_UNION_TYPE_P before
8919 accessing methods.
8920 (print_ada_struct_decl): Remove cpp_check parameter and do not pass it
8921 down. Use has_nontrivial_methods to recognize C++ classes. Use return
8922 value of print_ada_methods.
8923 (dump_ads): Rename cpp_check parameter to check and adjust prototype.
8924 Set cpp_check to it before invoking dump_ada_nodes.
8925 (dump_ada_specs): Likewise.
8926
b906f4ca
MP
89272013-11-03 Marek Polacek <polacek@redhat.com>
8928
8929 * c-ubsan.c: Don't include hash-table.h.
8930 (ubsan_instrument_vla): New function.
8931 * c-ubsan.h: Declare it.
8932
5e20cdc9
DM
89332013-10-31 David Malcolm <dmalcolm@redhat.com>
8934
8935 Automated part of renaming of symtab_node_base to symtab_node.
8936
8937 Patch autogenerated by rename_symtab.py from
8938 https://github.com/davidmalcolm/gcc-refactoring-scripts
8939 revision 58bb219cc090b2f4516a9297d868c245495ee622
8940
8941 * c-pragma.c (maybe_apply_pending_pragma_weaks): Rename
8942 symtab_node_base to symtab_node.
8943
7057e645
ESR
89442013-10-31 Edward Smith-Rowland <3dw4rd@verizon.net>
8945
8e745a17 8946 Implement C++14 digit separators.
7057e645
ESR
8947 * c-lex.c (interpret_float): Remove digit separators from scratch string
8948 before building real literal.
8949
193ea7bc
JJ
89502013-10-30 Jakub Jelinek <jakub@redhat.com>
8951
8952 * cilk.c (create_cilk_helper_decl): Use HOST_WIDE_INT_PRINT_DEC.
8953
939b37da
BI
89542013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
8955
8956 * c-common.c (c_common_reswords[]): Added _Cilk_spawn and _Cilk_sync
8957 fields.
8958 (c_define_builtins): Called cilk_init_builtins if Cilk Plus is
8959 enabled.
8960 * c-common.h (enum rid): Added RID_CILK_SPAWN and RID_CILK_SYNC.
8961 (insert_cilk_frame): New prototype.
8962 (cilk_init_builtins): Likewise.
8963 (gimplify_cilk_spawn): Likewise.
8964 (c_cilk_install_body_w_frame_cleanup): Likewise.
8965 (cilk_detect_spawn_and_unwrap): Likewise.
8966 (cilk_set_spawn_marker): Likewise.
8967 (build_cilk_sync): Likewise.
8968 (build_cilk_spawn): Likewise.
8969 * cilk.c: New file.
8970
67348ccc
DM
89712013-10-29 David Malcolm <dmalcolm@redhat.com>
8972
8973 Patch autogenerated by refactor_symtab.py from
8974 https://github.com/davidmalcolm/gcc-refactoring-scripts
8975 revision 58bb219cc090b2f4516a9297d868c245495ee622
8976
8977 * c-gimplify.c (c_genericize): Update for conversion of symtab types
8978 to a true class hierarchy.
8979 * c-pragma.c (maybe_apply_pending_pragma_weaks): Likewise.
8980
d570872d
RS
89812013-10-27 Richard Sandiford <rdsandiford@googlemail.com>
8982
8983 * c-lex.c (interpret_integer): Remove call to cpp_num_sign_extend.
8984
98906124
JL
89852013-10-26 Jeff Law <law@redhat.com>
8986
adfac8df
JJ
8987 * c-common.c (c_define_builtins): Remove mudflap support.
8988 * c.opt: Ignore and warn for mudflap options.
98906124 8989
d73749df 89902013-10-24 Tobias Burnus <burnus@net-b.de>
8170608b
TB
8991
8992 PR other/33426
8993 * c-pragma.c (init_pragma) Add #pragma ivdep handling.
8994 * c-pragma.h (pragma_kind): Add PRAGMA_IVDEP.
8995
3f04b1bb
JM
89962013-10-23 Jason Merrill <jason@redhat.com>
8997
8998 * c-format.c (gcc_cxxdiag_char_table): Add %X.
8999
acf0174b
JJ
90002013-10-11 Jakub Jelinek <jakub@redhat.com>
9001
acd15a28
JJ
9002 * c-common.h (omp_clause_mask::operator !=): New method.
9003 * c-omp.c (c_omp_split_clauses): Use if ((mask & something) != 0)
9004 instead of if (mask & something) tests everywhere.
9005
acf0174b
JJ
9006 * c-cppbuiltin.c (c_cpp_builtins): Predefine _OPENMP to
9007 201307 instead of 201107.
9008 * c-common.c (DEF_FUNCTION_TYPE_8): Define.
9009 (c_common_attribute_table): Add "omp declare target" and
9010 "omp declare simd" attributes.
9011 (handle_omp_declare_target_attribute,
9012 handle_omp_declare_simd_attribute): New functions.
9013 * c-omp.c: Include c-pragma.h.
9014 (c_finish_omp_taskgroup): New function.
9015 (c_finish_omp_atomic): Add swapped argument, if true,
9016 build the operation first with rhs, lhs arguments and use NOP_EXPR
9017 build_modify_expr.
9018 (c_finish_omp_for): Add code argument, pass it down to make_code.
9019 (c_omp_split_clauses): New function.
9020 (c_split_parallel_clauses): Removed.
9021 (c_omp_declare_simd_clause_cmp, c_omp_declare_simd_clauses_to_numbers,
9022 c_omp_declare_simd_clauses_to_decls): New functions.
9023 * c-common.h (omp_clause_mask): New type.
9024 (OMP_CLAUSE_MASK_1): Define.
9025 (omp_clause_mask::omp_clause_mask, omp_clause_mask::operator &=,
9026 omp_clause_mask::operator |=, omp_clause_mask::operator ~,
9027 omp_clause_mask::operator |, omp_clause_mask::operator &,
9028 omp_clause_mask::operator <<, omp_clause_mask::operator >>,
9029 omp_clause_mask::operator ==): New methods.
9030 (enum c_omp_clause_split): New.
9031 (c_finish_omp_taskgroup): New prototype.
9032 (c_finish_omp_atomic): Add swapped argument.
9033 (c_finish_omp_for): Add code argument.
9034 (c_omp_split_clauses): New prototype.
9035 (c_split_parallel_clauses): Removed.
9036 (c_omp_declare_simd_clauses_to_numbers,
9037 c_omp_declare_simd_clauses_to_decls): New prototypes.
9038 * c-pragma.c (omp_pragmas): Add new OpenMP 4.0 constructs.
9039 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_CANCEL,
9040 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_DECLARE_REDUCTION,
9041 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_SIMD,
9042 PRAGMA_OMP_TARGET, PRAGMA_OMP_TASKGROUP and PRAGMA_OMP_TEAMS.
9043 Remove PRAGMA_OMP_PARALLEL_FOR and PRAGMA_OMP_PARALLEL_SECTIONS.
9044 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_ALIGNED,
9045 PRAGMA_OMP_CLAUSE_DEPEND, PRAGMA_OMP_CLAUSE_DEVICE,
9046 PRAGMA_OMP_CLAUSE_DIST_SCHEDULE, PRAGMA_OMP_CLAUSE_FOR,
9047 PRAGMA_OMP_CLAUSE_FROM, PRAGMA_OMP_CLAUSE_INBRANCH,
9048 PRAGMA_OMP_CLAUSE_LINEAR, PRAGMA_OMP_CLAUSE_MAP,
9049 PRAGMA_OMP_CLAUSE_NOTINBRANCH, PRAGMA_OMP_CLAUSE_NUM_TEAMS,
9050 PRAGMA_OMP_CLAUSE_PARALLEL, PRAGMA_OMP_CLAUSE_PROC_BIND,
9051 PRAGMA_OMP_CLAUSE_SAFELEN, PRAGMA_OMP_CLAUSE_SECTIONS,
9052 PRAGMA_OMP_CLAUSE_SIMDLEN, PRAGMA_OMP_CLAUSE_TASKGROUP,
9053 PRAGMA_OMP_CLAUSE_THREAD_LIMIT, PRAGMA_OMP_CLAUSE_TO and
9054 PRAGMA_OMP_CLAUSE_UNIFORM.
9055
826cacfe
MG
90562013-10-09 Marc Glisse <marc.glisse@inria.fr>
9057
9058 PR tree-optimization/20318
9059 * c-common.c (handle_returns_nonnull_attribute): New function.
9060 (c_common_attribute_table): Add returns_nonnull.
9061
2284b034
MG
90622013-10-03 Marc Glisse <marc.glisse@inria.fr>
9063
9064 PR c++/19476
9065 * c.opt (fcheck-new): Move to common.opt.
9066
b56e9788
MP
90672013-09-25 Marek Polacek <polacek@redhat.com>
9068 Jakub Jelinek <jakub@redhat.com>
9069
9070 PR sanitizer/58413
9071 * c-ubsan.c (ubsan_instrument_shift): Don't instrument
9072 an expression if we can prove it is correct.
9073 (ubsan_instrument_division): Likewise. Remove unnecessary
9074 check.
9075
ce6923c5
MP
90762013-09-18 Marek Polacek <polacek@redhat.com>
9077
9078 PR sanitizer/58411
9079 * c-common.c (handle_no_sanitize_undefined_attribute): New function.
9080 Declare it.
9081 (struct attribute_spec c_common_att): Add no_sanitize_undefined.
9082
fb5610fb
IS
90832013-09-14 Iain Sandoe <iain@codesourcery.com>
9084
9085 PR target/48094
9086 * c.opt (fgnu-runtime, fnext-runtime, fobjc-abi-version,
9087 fobjc-gc, freplace-objc-classes): Accept for LTO.
9088
88b0e79e
JC
90892013-09-13 Jacek Caban <jacek@codeweavers.com>
9090
9091 * c-target.def: New hook
9092
c9b0866a
PC
90932013-09-09 Paolo Carlini <paolo.carlini@oracle.com>
9094
9095 PR c++/43452
9096 * c.opt (Wdelete-incomplete): Add.
9097
0af94e6f
JR
90982013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
9099
9100 * c-common.c (same_scalar_type_ignoring_signedness): Delete.
9101 (vector_types_compatible_elements_p): New function.
9102 * c-common.h: (same_scalar_type_ignoring_signedness): Delete
9103 declaration.
9104 (vector_types_compatible_elements_p): Declare.
9105
7c26172c
GDR
91062013-09-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
9107
9108 * c-pretty-print.h (c_pretty_printer::simple_type_specifier): Now
9109 a virtual member function.
9110 (pp_simple_type_specifier): Remove.
9111 (pp_c_type_specifier): Likewise.
9112 * c-pretty-print.c (c_pretty_printer::simple_type_specifier):
9113 Rename from pp_c_type_specifier. Adjust.
9114 (c_pretty_printer::c_pretty_printer): Do not assign to
9115 simple_type_specifier.
9116
20059c8b
GDR
91172013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
9118
9119 * c-pretty-print.h (c_pretty_printer::type_id): Now a virtual
9120 member function.
9121 (c_pretty_printer::storage_class_specifier): Likewise.
9122 (c_pretty_printer::initializer): Likewise.
9123 (pp_declaration): Remove.
9124 (pp_declaration_specifiers): Likewise.
9125 (pp_abstract_declarator): Likewise.
9126 (pp_declarator): Likewise.
9127 (pp_type_id): Likewise.
9128 (pp_statement): Likewise.
9129 (pp_constant): Likewise.
9130 (pp_id_expression): Likewise.
9131 (pp_primary_expression): Likewise.
9132 (pp_unary_expression): Likewise.
9133 (pp_multiplicative_expression): Likewise.
9134 (pp_conditional_expression): Likewise.
9135 (pp_assignment_expression): Likewise.
9136 (pp_expression): Likewise.
9137 (pp_c_type_id): Likewise.
9138 (pp_c_storage_class_specifier): Likewise.
9139 * c-pretty-print.c (pp_c_type_cast): Tidy.
9140 (pp_c_pointer): Likewise.
9141 (pp_c_type_specifier): Likewise.
9142 (pp_c_parameter_type_list): Likewise.
9143 (pp_c_function_definition): Likewise.
9144 (pp_c_init_declarator): Likewise.
9145 (pp_c_initializer_list): Likewise.
9146 (pp_c_constructor_elts): Likewise.
9147 (c_pretty_printer::direct_abstract_declarator): Likewise.
9148 (c_pretty_printer::declaration_specifiers): Likewise.
9149 (c_pretty_printer::primary_expression): Likewise.
9150 (c_pretty_printer::postfix_expression): Likewise.
9151 (c_pretty_printer::type_id): Rename from pp_c_type_id.
9152 (c_pretty_printer::storage_class_specifier): Rename from
9153 pp_c_storage_class_specifier.
9154 (c_pretty_printer::initializer): Rename from pp_c_initializer.
9155 (c_pretty_printer::c_pretty_printer): Do not assign to type_id,
9156 storage_class_specifier, initializer, offset_list, flags.
9157
de5a5fa1
MP
91582013-08-30 Marek Polacek <polacek@redhat.com>
9159
9160 * c-ubsan.c: New file.
9161 * c-ubsan.h: New file.
9162
8f0e4d72
GDR
91632013-08-30 Gabriel Dos Reis <gdr@integrable-solutions.net>
9164
9165 * c-pretty-print.h (c_pretty_printer::declaration): Now a virtual
9166 member function.
9167 (c_pretty_printer::declaration_specifiers): Likewise.
9168 (c_pretty_printer::declarator): Likewise.
9169 (c_pretty_printer::abstract_declarator): Likewise.
9170 (c_pretty_printer::direct_abstract_declarator): Likewise.
9171 (c_pretty_printer::direct_declarator): Likewise.
9172 (c_pretty_printer::function_specifier): Likewise.
9173 (pp_declaration): Adjust.
9174 (pp_declaration_specifiers): Likewise.
9175 (pp_abstract_declarator): Likewise.
9176 (pp_direct_declarator): Likewise.
9177 (pp_function_specifier): Likewise.
9178 (pp_direct_abstract_declarator): Remove as unused.
9179 (pp_c_declaration): Remove.
9180 (pp_c_declaration_specifiers): Likewise.
9181 (pp_c_declarator): Likewise.
9182 (pp_c_direct_declarator): Likewise.
9183 (pp_c_function_specifier): Likewise.
9184 (pp_c_direct_abstract_declarator): Likewise.
9185 * c-pretty-print.c (c_pretty_printer::abstract_declarator): Rename
9186 from pp_c_abstract_declarator. Adjust.
ab20d992 9187 (c_pretty_printer::direct_abstract_declarator): Rename from
8f0e4d72
GDR
9188 pp_c_direct_abstract_declarator. Adjust.
9189 (c_pretty_printer::function_specifier): Rename from
9190 pp_c_function_specifier. Adjust.
9191 (c_pretty_printer::declaration_specifiers): Rename from
9192 pp_c_declaration_specifiers. Adjust.
9193 (c_pretty_printer::direct_declarator): Rename from
9194 pp_c_direct_declarator. Adjust.
9195 (c_pretty_printer::declarator): Rename from pp_c_declarator. Adjust.
9196 (c_pretty_printer::declaration): Rename from pp_c_declaration. Adjust.
9197 (c_pretty_printer::c_pretty_printer): Do not assign to
9198 declaration, declaration_specifiers, declarator,
9199 direct_declarator, direct_abstract_declarator, function_specifier.
9200
00d34d3a
GDR
92012013-08-26 Gabriel Dos Reis <gdre@integrable-solutions.net>
9202
9203 * c-pretty-print.h (c_pretty_printer::unary_expression): Now a
9204 virtual member function.
9205 (c_pretty_printer::multiplicative_expression): Likewise.
9206 (c_pretty_printer::conditional_expression): Likewise.
9207 (c_pretty_printer::assignment_expression): Likewise.
9208 (c_pretty_printer::expression): Likewise.
9209 (pp_unary_expression): Adjust.
9210 (pp_multiplicative_expression): Likewise.
9211 (pp_assignment_expression): Likewise.
9212 (pp_conditional_expression): Likewise.
9213 (pp_expression): Likewise.
9214 * c-pretty-print.c (c_pretty_printer::unary_expression): Rename
9215 from pp_c_unary_expression. Adjust.
9216 (c_pretty_printer::multiplicative_expression): Rename from
9217 pp_c_multiplicative_expression. Adjust.
9218 (c_pretty_printer::conditional_expression): Rename from
9219 pp_c_conditional_expression. Adjust.
9220 (c_pretty_printer::assignment_expression): Rename from
9221 pp_c_assignment_expression. Adjust.
9222 (c_pretty_printer::expression): Rename from pp_c_expression. Adjust.
9223 (c_pretty_printer::c_pretty_printer): Do not assign to
9224 unary_expression, multiplicative_expression,
9225 conditional_expression, expression.
9226
fb22178f
GDR
92272013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
9228
9229 * c-pretty-print.h (c_pretty_printer::postfix_expression): Now a
9230 virtual member function.
9231 (pp_postfix_expression): Adjust.
9232 (pp_c_postfix_expression): Remove.
9233 * c-pretty-print.c (c_pretty_printer::postfix_expression): Rename
9234 from pp_c_postfix_expression. Adjust.
9235 (c_pretty_printer::c_pretty_printer): Do not assign to
9236 postfix_expression.
9237
7ecc2600
GDR
92382013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
9239
9240 * c-pretty-print.h (c_pretty_printer::primary_expression): Now a
9241 virtua member function.
9242 (pp_primary_expression): Adjust.
9243 (pp_c_primary_expression): Remove.
9244 * c-pretty-print.c (c_pretty_printer::primary_expression): Rename
9245 from pp_c_primary_expression. Adjust.
9246 (pp_c_initializer_list): Use pp_primary_expression.
9247 (c_pretty_printer::c_pretty_printer): Do not assign to
9248 primary_expression.
9249
0691175f
GDR
92502013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
9251
9252 * c-pretty-print.h (c_pretty_printer::translate_string): Declare.
9253 * c-pretty-print.c (M_): Remove.
9254 (c_pretty_printer::translate_string): Define.
9255 (pp_c_type_specifier): Use it.
9256 (pp_c_primary_expression): Likewise.
9257 (pp_c_expression): Likewise.
9258
66dfe4c4
GDR
92592013-08-24 Gabriel Dos Reis <gdr@integrable-solutions.net>
9260
9261 * c-pretty-print.h (c_pretty_printer::id_expression): Now a
9262 virtual function.
9263 (pp_c_id_expression): Remove.
9264 (pp_id_expression): Adjust.
9265 * c-pretty-print.c (c_pretty_printer::id_expression): Rename from
9266 pp_c_id_expression. Adjust.
9267 (pp_c_postfix_expression): Use pp_id_expression.
9268 (c_pretty_printer::c_pretty_printer): Do not assign to id_expression.
9269
ca43e9d5
GDR
92702013-08-24 Gabriel Dos Reis <gdr@integrable-solutions.net>
9271
9272 * c-pretty-print.h (c_pretty_printer::constant): Now a virtual
9273 member function.
9274 (pp_constant): Adjust.
9275 (pp_c_constant): Remove.
9276 * c-pretty-print.c (c_pretty_printer::constant): Rename from
9277 pp_c_constant. Adjust.
9278 (pp_c_constant)
9279 (pp_c_primary_expression): Call pp_constant in lieu of pp_c_constant.
9280 (c_pretty_printer::c_pretty_printer): Remove assignment to constant.
9281
da6ca2b5
GDR
92822013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
9283
9284 * c-pretty-print.h (pp_c_pretty_printer_init): Remove.
9285 (c_pretty_printer::c_pretty_printer): Declare.
9286 * c-pretty-print.c (pretty_printer::c_pretty_printer): Rename from
9287 c_pretty_printer_init. Adjust.
9288 (print_c_tree): Do not call c_pretty_printer_init.
9289 * c-ada-spec.c (dump_ads): Remove call to pp_construct.
9290
65a372f4
AC
92912013-08-09 Arnaud Charlet <charlet@adacore.com>
9292
9293 * c-ada-spec.c (print_ada_declaration): Prevent accessing null asm name
9294
fd9b0f32
PC
92952013-08-05 Paolo Carlini <paolo.carlini@oracle.com>
9296
9297 PR c++/58080
9298 * c-common.c (pointer_int_sum): Add bool parameter.
9299 * c-common.h (pointer_int_sum): Adjust declaration.
9300
e0aec1e9
GDR
93012013-08-05 Gabriel Dos Reis <gdr@integrable-solutions.net>
9302
9303 * c-pretty-print.c (print_c_tree): Simplify. Use non-static local
9304 c_pretty_printer variable.
9305
b066401f
GDR
93062013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
9307
9308 * c-pretty-print.h (c_pretty_printer): Derive from pretty_printer.
9309 (pp_base): Remove.
9310 (pp_c_base): Likewise. Adjust users.
9311 * c-pretty-print.c (pp_c_maybe_whitespace): Adjust.
9312 (pp_c_whitespace): Do not call pp_base.
9313 (pp_c_left_paren): Likewise.
9314 (pp_c_right_paren): Likewise.
9315 (pp_c_left_brace): Likewise.
9316 (pp_c_right_brace): Likewise.
9317 (pp_c_left_bracket): Likewise.
9318 (pp_c_right_bracket): Likewise.
9319 (pp_c_dot): Likewise.
9320 (pp_c_ampersand): Likewise.
9321 (pp_c_star): Likewise.
9322 (pp_c_arrow): Likewise.
9323 (pp_c_semicolon): Likewise.
9324 (pp_c_complement): Likewise.
9325 (pp_c_exclamation): Likewise.
9326 (pp_c_direct_declarator): Likewise.
9327 (pp_c_ws_string): Likewise.
9328 (pp_c_identifier): Likewise.
9329 (pp_c_statement): Likewise.
9330 (print_c_tree): Likewise.
9331
65e5a578
ESR
93322013-08-04 Ed Smith-Rowland <3dw4rd@verizon.net>
9333
9334 PR c++/58072
9335 * c-common.c (c_parse_error): Catch user-defined literal tokens and
9336 provide useful error strings.
9337
137a1a27
GDR
93382013-08-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
9339
9340 * c-ada-spec.c (pp_ada_tree_identifier): Use specialized pretty
9341 printer functions instead of pp_string or operators and punctuators.
9342 (dump_generic_ada_node): Likewise.
9343 * c-pretty-print.c (pp_c_type_specifier): Likewise.
9344 (pp_c_relational_expression): Likewise.
9345 (pp_c_logical_or_expression): Likewise.
9346
07838b13
GDR
93472013-08-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
9348
9349 * c-ada-spec.c (print_ada_macros): Use specialized pretty printer
9350 functions instead of pp_character.
9351 (pp_ada_tree_identifier): Likewise.
9352 (dump_ada_double_name): Likewise.
9353 (dump_ada_function_declaration): Likewise.
9354 (dump_ada_array_domains): Likewise.
9355 (dump_template_types): Likewise.
9356 (dump_generic_ada_node): Likewise.
9357 (print_ada_declaration): Likewise.
9358 (print_ada_struct_decl): Likewise.
9359 * c-pretty-print.c (pp_c_integer_constant): Likewise.
9360
433cc7b0
TT
93612013-07-23 Tom Tromey <tromey@redhat.com>
9362
9363 * c-common.h (enum rid) <RID_GENERIC>: New constant.
9364 * c-common.c (c_common_reswords): Add _Generic.
9365
688010ba
OB
93662013-07-21 OndÅ\99ej Bílka <neleai@seznam.cz>
9367
9368 * c-common.c: Fix typos.
9369 * c-common.h: Likewise.
9370
2a99e5e6
LL
93712013-07-13 Lubos Lunak <l.lunak@suse.cz>
9372
9373 PR c++/55203
9374 * c-common.c (c_common_attribute_table): Add warn_unused.
9375 (handle_warn_unused_attribute): New.
9376
c26302d5
JJ
93772013-07-10 Jakub Jelinek <jakub@redhat.com>
9378
9379 * c-ppoutput.c (scan_translation_unit): Call account_for_newlines
9380 for all CPP_TOKEN_FLD_STR tokens, not just CPP_COMMENT.
9381
dfeadaa0
PC
93822013-07-10 Paolo Carlini <paolo.carlini@oracle.com>
9383
9384 PR c++/57869
9385 * c.opt: Add Wconditionally-supported.
9386
6a2fa4b2
GS
93872013-07-08 Graham Stott <graham.stott@btinternet.com>
9388
adfac8df 9389 * array-notation-common.c (length_mismatch_in_expr_p): Delete
6a2fa4b2
GS
9390 unused variables l_length and l_node.
9391
ecdbd01a 93922013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
40d3d530
JR
9393
9394 PR c/57821
9395 * c-common.c (complete_array_type): Delay folding first index
9396 like other indices. When folding, check for index overflow.
9397
bedc293e
MG
93982013-06-27 Marc Glisse <marc.glisse@inria.fr>
9399
9400 PR c++/57509
9401 * c-common.h (c_build_vec_perm_expr): New complain argument.
9402 * c-common.c (c_build_vec_perm_expr): Likewise.
9403 Use save_expr also in C++.
9404
604b2bfc
GDR
94052013-06-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
9406
9407 * c-common.c (c_common_nodes_and_builtins): Use cxx11 in lieu of cxx0x.
9408 * c-cppbuiltin.c (c_cpp_builtins): Likewise.
9409 * c-opts.c (c_common_post_options): Likewise.
9410
dfeadaa0 94112013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
713b46fa
BI
9412
9413 * array-notation-common.c (length_mismatch_in_expr): Changed the
9414 parameter type's from a dynamic array to a vec_tree. Also removed
9415 the size parameters.
9416 * c-common.h (length_mismatch_in_expr_p): Fixed prototype's as per
9417 the change above.
9418
2ce86d2e
BI
94192013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
9420
9421 * c-common.h (struct cilkplus_an_parts): New structure.
9422 (struct cilkplus_an_loop_parts): Likewise.
9423 (cilkplus_extract_an_triplets): New prototype.
9424 (fix_sec_implicit_args): Likewise.
9425 * array-notation-common.c (cilkplus_extract_an_triplets): New function.
9426 (fix_sec_implicit_args): Likewise.
604b2bfc 9427
07a6825b
BI
94282013-06-20 Balaji V. Iyer <balaji.v.iyer@intel.com>
9429
9430 * array-notation-common.c (find_inv_trees): Removed an unwanted
9431 typecasting.
9432 * c-common.h (struct inv_list::additional_tcodes): Changed type from
9433 enum rid to enum tree_code.
9434
08346abd
JH
94352013-06-11 Jan Hubicka <jh@suse.cz>
9436
9437 * c-common.c (handle_alias_ifunc_attribute): Do not set
9438 DECL_EXTERNAL for weakref variables.
9439 * c-pragma.c (handle_pragma_weak): Make sure aliases
9440 are not declared as external.
9441
d60f1706
BI
94422013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
9443
9444 * array-notation-common.c (length_mismatch_in_expr_p): Moved this
9445 function from c/c-array-notation.c.
9446 (is_cilkplus_reduce_builtin): Likewise.
9447 (find_rank): Likewise.
9448 (extract_array_notation_exprs): Likewise.
9449 (replace_array_notations): Likewise.
9450 (find_inv_trees): Likewise.
9451 (replace_inv_trees): Likewise.
9452 (contains_array_notation_expr): Likewise.
9453 (find_correct_array_notation_type): Likewise.
9454 * c-common.h (struct inv_list): Moved this struct from the file
9455 c/c-array-notation.c and added a new field called additional tcodes.
9456 (length_mismatch_in_expr_p): New prototype.
9457 (is_cilkplus_reduce_builtin): Likewise.
9458 (find_rank): Likewise.
9459 (extract_array_notation_exprs): Likewise.
9460 (replace_array_notation): Likewise.
9461 (find_inv_trees): Likewise.
9462 (replace_inv_trees): Likewise.
9463 (find_correct_array_notation_type): Likewise.
dfeadaa0 9464
36536d79
BI
94652013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
9466
9467 * c-common.c (c_define_builtins): When cilkplus is enabled, the
9468 function array_notation_init_builtins is called.
9469 (c_common_init_ts): Added ARRAY_NOTATION_REF as typed.
9470 * c-common.def (ARRAY_NOTATION_REF): New tree.
9471 * c-common.h (build_array_notation_expr): New function declaration.
9472 (build_array_notation_ref): Likewise.
9473 (extract_sec_implicit_index_arg): New extern declaration.
9474 (is_sec_implicit_index_fn): Likewise.
9475 (ARRAY_NOTATION_CHECK): New define.
9476 (ARRAY_NOTATION_ARRAY): Likewise.
9477 (ARRAY_NOTATION_START): Likewise.
9478 (ARRAY_NOTATION_LENGTH): Likewise.
9479 (ARRAY_NOTATION_STRIDE): Likewise.
9480 * c-pretty-print.c (pp_c_postifix_expression): Added a new case for
9481 ARRAY_NOTATION_REF.
9482 (pp_c_expression): Likewise.
9483 * c.opt (flag_enable_cilkplus): New flag.
9484 * array-notation-common.c: New file.
9485
f7716d57
JJ
94862013-05-14 Jakub Jelinek <jakub@redhat.com>
9487
9488 PR c++/57274
9489 * c-common.c (verify_tree): Don't recurse into SIZEOF_EXPR.
9490
a5e0cd1d
MG
94912013-05-10 Marc Glisse <marc.glisse@inria.fr>
9492
9493 * c-common.c (vector_types_convertible_p): No TYPE_PRECISION for
9494 vectors.
9495
f6bc1c4a
HS
94962013-05-07 Han Shen <shenhan@google.com>
9497
9498 * c-cppbuiltin.c (c_cpp_builtins): Added "__SSP_STRONG__=3".
9499
3f12f6e9
SKS
95002013-04-29 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
9501
9502 * c-common.c (check_user_alignment): Emit error for negative values.
9503
61949153
PC
95042013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
9505
9506 * c-opts.c (set_std_cxx11): Use CLK_CXX1Y and CLK_GNUCXX1Y.
9507
e93e18e9
PC
95082013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
9509
9510 * c-cppbuiltin.c (c_cpp_builtins): Do not define
9511 __GXX_EXPERIMENTAL_CXX1Y__.
9512
44d90fe1 95132013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
8e745a17 9514 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
44d90fe1
PC
9515
9516 * c.opt ([Wpointer-arith]): Enabled by -Wpedantic, as documented.
9517 * c-common.c (pointer_int_sum): Change -Wpointer-arith pedwarns
9518 to simply use OPT_Wpointer_arith.
9519 (c_sizeof_or_alignof_type): Likewise.
9520
13f39b2e
PC
95212013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
9522
9523 * c-cppbuiltin.c (c_cpp_builtins): Define __GXX_EXPERIMENTAL_CXX1Y__.
9524
4b84d650
JJ
95252013-04-12 Jakub Jelinek <jakub@redhat.com>
9526
9527 * c-format.c (gcc_diag_char_table, gcc_tdiag_char_table,
9528 gcc_cdiag_char_table, gcc_cxxdiag_char_table): Add %r and %R format
9529 specifiers.
9530
fb037b5d
SB
95312013-04-07 Steven Bosscher <steven@gcc.gnu.org>
9532
9533 * c-pragma.c (add_to_renaming_pragma_list): Fix leading comment.
9534
4e856798
PC
95352013-04-03 Paolo Carlini <paolo.carlini@oracle.com>
9536
9537 * c-common.c (pointer_int_sum): Remove dead code.
9538
4b1baac8
RS
95392013-03-09 Richard Sandiford <rdsandiford@googlemail.com>
9540
9541 PR middle-end/56524
9542 * c-common.c (handle_optimize_attribute): Don't call
9543 save_optabs_if_changed.
9544
0b50e654
JJ
95452013-03-05 Jakub Jelinek <jakub@redhat.com>
9546
9547 PR middle-end/56461
9548 * c-pch.c (pch_init): Free target_validity at the end.
9549
48c41403
JJ
95502013-03-04 Jakub Jelinek <jakub@redhat.com>
9551
9552 * c-pretty-print.c (pp_c_pretty_printer_init): Clear pp->flags.
9553
e664c61c
KS
95542013-02-28 Konstantin Serebryany <konstantin.s.serebryany@gmail.com>
9555 Jakub Jelinek <jakub@redhat.com>
9556
9557 PR sanitizer/56454
9558 * c-common.c (handle_no_sanitize_address_attribute): New function.
9559 (c_common_attribute_table): Add no_sanitize_address attribute.
9560 (handle_no_address_safety_analysis_attribute): Add
9561 no_sanitize_address attribute, not no_address_safety_analysis
9562 attribute.
9563
a475fd3d 95642013-02-18 Aldy Hernandez <aldyh@redhat.com>
135204dd
AH
9565
9566 PR target/52555
9567 * c-common.c (handle_optimize_attribute): Call
9568 save_optabs_if_changed.
9569
f6007d99
JJ
95702013-02-18 Jakub Jelinek <jakub@redhat.com>
9571 Steven Bosscher <steven@gcc.gnu.org>
9572
9573 PR pch/54117
9574 * c-opts.c (c_common_post_options): If debug info is enabled
9575 and non-dwarf*, refuse to load PCH files and when writing PCH
9576 file warn.
9577
cf35e2b1
JJ
95782013-02-05 Jakub Jelinek <jakub@redhat.com>
9579
9580 PR middle-end/56167
9581 * c-common.c (handle_error_attribute): Fix condition.
9582
32887460
JJ
95832013-01-30 Jakub Jelinek <jakub@redhat.com>
9584
9585 PR c++/55742
9586 * c-common.c (handle_target_attribute): Revert 2012-12-26 change.
9587
5af057d8
JM
95882013-01-18 Jason Merrill <jason@redhat.com>
9589
9590 PR target/54908
9591 * c.opt (-fextern-tls-init): New.
9592 * c-opts.c (c_common_post_options): Handle it.
9593
cc83c823
JJ
95942013-01-09 Jakub Jelinek <jakub@redhat.com>
9595
9596 PR c/48418
9597 * c-common.c (c_fully_fold_internal): Warn for LSHIFT_EXPR and
9598 RSHIFT_EXPR, if orig_op1 isn't INTEGER_CST, op1 is INTEGER_CST
9599 and is either negative or bigger or equal to type precision
9600 of the first operand.
9601
a859517f
MP
96022012-12-03 Marek Polacek <polacek@redhat.com>
9603
9604 PR c/55570
9605 * c-common.c (check_user_alignment): Swap order of tests,
9606 check TREE_CODE first.
9607
2d7aa578
ESR
96082012-11-29 Ed Smith-Rowland <3dw4rd@verizon.net>
9609
9610 PR c++/52654
9611 * c-common.h (overflow_type): New enum.
9612 (build_userdef_literal): Add overflow_type argument.
9613 (tree_userdef_literal): Add overflow_type.
9614 (USERDEF_LITERAL_OVERFLOW): New access macro.
9615 * c-common.c (build_userdef_literal): Add overflow_type
9616 argument.
9617 * c-lex.c (c_lex_with_flags): Add overflow_type to
9618 build_userdef_literal calls.
9619 (interpret_integer, interpret_float): Add overflow_type argument.
9620
cc3c4f62
RB
96212012-11-28 Richard Biener <rguenther@suse.de>
9622
9623 PR c/35634
9624 * c-gimplify.c (c_gimplify_expr): Gimplify self-modify expressions
9625 here and use a type with proper overflow behavior for types that would
9626 need to be promoted for the arithmetic.
9627
77bc5132
JJ
96282012-11-23 Jakub Jelinek <jakub@redhat.com>
9629
9630 PR sanitizer/55435
9631 * c-common.c (handle_no_address_safety_analysis_attribute): New
9632 function.
9633 (c_common_attribute_table): Add no_address_safety_analysis.
9634
5dc99c46
SB
96352012-11-16 Simon Baldwin <simonb@google.com>
9636
9637 * c.opt: Add f[no-]canonical-system-headers.
9638 * c-opts.c (c_common_handle_option): Handle
9639 OPT_fcanonical_system_headers.
9640
a4a0016d
ESR
96412012-11-09 Ed Smith-Rowland <3dw4rd@verizon.net>
9642
9643 PR c++/54413
9644 * c-opts.c (c_common_handle_option): Set new flags.
9645 * c.opt: Describe new flags.
9646
7dbb85a7
JM
96472012-11-09 Jason Merrill <jason@redhat.com>
9648
9649 * c.opt (Wabi-tag): New.
9650
ad7bac31
AK
96512012-11-09 Andi Kleen <ak@linux.intel.com>
9652
9653 PR 55139
9654 * c-common.c (get_atomic_generic_size): Mask with
8e745a17 9655 MEMMODEL_MASK
ad7bac31 9656
7332899a
MLI
96572012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
9658
9659 PR c/53063
9660 * c.opt (Wformat): Make it Alias Wformat=1.
9661 (Wformat-contains-nul,Wformat-extra-args,Wformat-nonliteral,
9662 Wformat-security,Wformat-y2k,Wformat-zero-length): Use
9663 LangEnabledBy.
9664 (Wformat=): RejectNegative. Use LangEnabledBy.
9665 (Wnonnull): Use LangEnabledBy.
9666 * c-opts.c (c_common_handle_option): Do not handle Wformat here.
9667 * c-format.c (set_Wformat): Delete.
9668 (decode_format_attr): Replace OPT_Wformat with OPT_Wformat_.
ab20d992
JJ
9669 (maybe_read_dollar_number): Likewise.
9670 (avoid_dollar_number): Likewise.
9671 (finish_dollar_format_checking): Likewise.
9672 (check_format_info): Likewise.
9673 (check_format_info_main): Likewise.
9674 (check_format_types): Likewise.
9675 (format_type_warning): Likewise.
9676 * c-common.c (int): Likewise.
9677 (check_function_sentinel): Likewise.
8e745a17 9678 * c-common.h (warn_format,set_Wformat): Do not declare here.
7332899a 9679
34a180a6
MLI
96802012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
9681
9682 PR c/53063
9683 * c.opt(Warray-bounds,Wdelete-non-virtual-dtor,Wenum-compare,
9684 Wmain,Woverlength-strings, Wunknown-pragmas,Wunused-macros):
9685 Use LangEnabledBy.
9686 (Wswitch,Wswitch-default,Wswitch-enum): Likewise. Move here from
9687 common.opt.
9688 (Wvariadic-macros): Init(1).
9689 * c-opts.c (c_common_handle_option): Do not handle them
9690 explicitly.
9691 (c_common_post_options): Likewise.
9692 (sanitize_cpp_opts): warn_unused_macros is now
9693 cpp_warn_unused_macros.
9694 (push_command_line_include): Likewise.
9695 * c-common.c (warn_unknown_pragmas): Do not define.
9696 * c-common.h (warn_unknown_pragmas): Do not declare.
9697
3f46d6a5
MLI
96982012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
9699
9700 PR c/51294
9701 * c-common.c (conversion_warning): Handle conditional expressions.
9702
880661a4
JW
97032012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
9704
9705 PR c++/54930
9706 * c.opt (Wreturn_local_addr): Define new option.
9707
4514a96b
JM
97082012-10-25 Jason Merrill <jason@redhat.com>
9709
f14edc1a
JM
9710 * c.opt (Wvirtual-move-assign): New.
9711
4514a96b
JM
9712 * c.opt (Winherited-variadic-ctor): New.
9713
93100c6b
MG
97142012-10-25 Marc Glisse <marc.glisse@inria.fr>
9715
9716 PR c++/54427
9717 * c-common.c (scalar_to_vector): Handle VEC_COND_EXPR.
9718
1efcb8c6
JM
97192012-10-23 Joseph Myers <joseph@codesourcery.com>
9720
9721 * c-common.h (pch_cpp_save_state): Declare.
9722 * c-target.def (c_preinclude): New hook.
9723 * c-opts.c (done_preinclude): New.
9724 (push_command_line_include): Handle default preincluded header.
9725 (cb_file_change): Call pch_cpp_save_state when calling
9726 push_command_line_include.
9727 * c-pch.c (pch_ready_to_save_cpp_state, pch_cpp_state_saved)
9728 (pch_cpp_save_state): New.
9729 (pch_init): Call pch_cpp_save_state conditionally, instead of
9730 calling cpp_save_state.
9731
4a0ae68e
MLI
97322012-10-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
9733
9734 PR c/53063
9735 PR c/40989
9736 * c.opt (Waddress,Wchar-subscripts,Wsign-conversion,Wimplicit,
9737 Wimplicit-function-declaration,Wimplicit-int,Wsizeof-pointer-memaccess,
9738 Wnarrowing,Wparentheses,Wpointer-sign,Wreturn-type,Wsequence-point,
9739 Wsign-compare,Wuninitialized,Wmaybe-uninitialized,Wunused,
9740 Wvolatile-register-var): Add LangEnabledBy or EnabledBy.
9741 * c-opts.c (c_common_handle_option): Remove explicit handling from
9742 here.
9743 (c_common_post_options): Likewise.
9744
67e4210b
EB
97452012-10-18 Eric Botcazou <ebotcazou@adacore.com>
9746
9747 * c-ada-spec.c (LOCATION_COL): Delete.
9748 (compare_location): New function.
9749 (compare_node): Use it.
9750 (compare_comment): Likewise.
9751
65d4f2cd
MLI
97522012-10-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
9753
9754 PR c/53063
9755 PR c/40989
9756 * c.opt (Wstrict-aliasing=,Wstrict-overflow=): Use LangEnabledBy.
9757 * c-opts.c (c_common_handle_option): Do not set them here. Add
9758 comment.
9759 (c_common_post_options): Likewise.
9760
909881cb
EB
97612012-10-16 Eric Botcazou <ebotcazou@adacore.com>
9762
9763 * c-ada-spec.c (ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX): Define.
9764 (dump_generic_ada_node) <INTEGER_CST>: Deal with sizetype specially.
9765 Remove POINTER_TYPE handling, add large unsigned handling and use
9766 ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX for big numbers.
9767
3a785c97
JJ
97682012-10-12 Jakub Jelinek <jakub@redhat.com>
9769
9770 PR c/54381
9771 * c-common.h (sizeof_pointer_memaccess_warning): Adjust prototype.
9772 * c-common.c (sizeof_pointer_memaccess_warning): Take array of 3
9773 locs and array of 3 trees instead of just single loc and single
9774 sizeof_arg tree. Handle __builtin___*_chk builtins too, and
9775 also stpncpy, bcopy, bcmp, bzero, snprintf and vsnprintf builtins.
9776 For *cmp* builtins that take two sources strings report warnings
9777 about first and second source, not about destination and source.
9778
5e54f81d
MG
97792012-10-12 Marc Glisse <marc.glisse@inria.fr>
9780
9781 PR c++/53055
9782 * c-common.h (enum ref_operator) [RO_ARROW_STAR]: New.
9783
f5b02f1e
EB
97842012-10-11 Eric Botcazou <ebotcazou@adacore.com>
9785
9786 * c-ada-spec.c (dump_ada_template): Bail out for template declarations
9787 declaring something coming from another file.
9788
b46dbc6c
AC
97892012-10-10 Arnaud Charlet <charlet@adacore.com>
9790
f5b02f1e 9791 PR ada/54845
b46dbc6c
AC
9792 * c-ada-spec.c (print_ada_struct_decl): Increase buf size.
9793
5d9de0d0
PC
97942012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
9795
9796 PR c++/54194
9797 * c-common.c (warn_about_parentheses): Add location_t parameter;
9798 use EXPR_LOC_OR_LOC.
9799 * c-common.h: Update declaration.
9800
a212e43f
MG
98012012-10-09 Marc Glisse <marc.glisse@inria.fr>
9802
9803 PR c++/54427
9804 * c-common.c (scalar_to_vector): Moved from c-typeck.c. Support
9805 more operations. Make error messages optional.
9806 * c-common.h (enum stv_conv): Moved from c-typeck.c.
9807 (scalar_to_vector): Declare.
9808
b1db7f91
JM
98092012-10-08 Jason Merrill <jason@redhat.com>
9810
9811 * c-common.c (c_common_reswords): Add thread_local.
9812
e28d52cf
DS
98132012-10-08 Dodji Seketeli <dodji@redhat.com>
9814
9815 PR c++/53528 C++11 attribute support
9816 * c-common.h (bitfield_p, cxx_fundamental_alignment_p): Declare
9817 new functions.
9818 * c-common.c (check_cxx_fundamental_alignment_constraints): New
9819 static function.
9820 (handle_aligned_attribute): In choose strictest alignment
9821 among many. Use new check_cxx_fundamental_alignment_constraints.
9822 (handle_transparent_union_attribute): In c++11 attribute syntax,
9823 don't look through typedefs.
9824
3b78de56
AC
98252012-10-04 Arnaud Charlet <charlet@adacore.com>
9826
9827 * c-ada-spec.c (print_ada_declaration): Remove handling of TDF_RAW.
9828 * c.opt (-fdump-ada-spec, -fdump-ada-spec-slim): Move switch definition
9829 out of dumpfile.h.
9830
6040bb5f
DC
98312012-09-25 Dehao Chen <dehao@google.com>
9832
9833 PR middle-end/54645
3b78de56 9834 * c-pch.c (c_common_read_pch): Rebuild the location_adhoc_data
6040bb5f
DC
9835 map when read in the pch.
9836
3f8257db 98372012-09-18 Arnaud Charlet <charlet@adacore.com>
0b07a57e
AC
9838
9839 * c-ada-spec.c: Style fixes.
9840
3f8257db 98412012-09-18 Thomas Quinot <quinot@adacore.com>
da5182be
TQ
9842
9843 * c.opt (-fada-spec-parent): Define new command line switch.
9844 * c-ada-spec.c (get_ada_package): When -fada-spec-parent
9845 is specified, generate binding spec as a child of the specified unit.
9846
0ccb505d
PC
98472012-09-13 Paolo Carlini <paolo.carlini@oracle.com>
9848 Manuel López-Ibáñez <manu@gcc.gnu.org>
9849
9850 PR c++/53210
9851 * c.opt ([Winit-self]): Enabled by -Wall in C++.
9852
c583af79
AC
98532012-08-23 Arnaud Charlet <charlet@adacore.com>
9854
9855 * c-ada-spec.c (dump_generic_ada_node): Fix handling of name_only
9856 for pointers, and add missing Convention C pragma.
9857 (print_ada_struct_decl): Add missing aliased keyword.
9858 (dump_ads): Add pragma Ada_2005 and Style_Checks (Off).
9859
1a4049e7
JJ
98602012-08-17 Jakub Jelinek <jakub@redhat.com>
9861
9862 * c-common.c (sizeof_pointer_memaccess_warning): New function.
9863 * c.opt (-Wsizeof-pointer-memaccess): Add new option.
9864 * c-opts.c (c_common_handle_option): Enable it for -Wall.
9865 * c-common.h (sizeof_pointer_memaccess_warning): Add prototype.
9866 * c-common.def (SIZEOF_EXPR): Moved here from cp-tree.def.
9867
70b5e7dc
RG
98682012-08-10 Richard Guenther <rguenther@suse.de>
9869
9870 * c-pretty-print.c (pp_c_expression): Handle anonymous SSA names.
9871
f8923f7e
SB
98722012-08-07 Steven Bosscher <steven@gcc.gnu.org>
9873
9874 * c-pretty-print.c (pp_c_function_definition): Use pp_newline_and_flush
9875 instead of separate pp_newline and pp_flush.
9876 (print_c_tree): Likewise.
9877
e45abe1f
RH
98782012-07-26 Richard Henderson <rth@redhat.com>
9879
9880 * c-common.c (handle_hot_attribute): Allow labels.
9881 (handle_cold_attribute): Likewise.
9882
332f1d24
JJ
98832012-07-20 Jakub Jelinek <jakub@redhat.com>
9884
9885 PR c++/28656
9886 * c-common.c (check_function_nonnull): Handle multiple nonnull
9887 attributes properly.
9888
7ee2468b
SB
98892012-07-16 Steven Bosscher <steven@gcc.gnu.org>
9890
9891 * c-gimplify.c: Include dumpfile.h instead of tree-dump.h.
9892 * c-ada-spec.c: Likewise.
9893 * c-dump.c (dump_stmt): Move to cp/dump.c, the only user.
9894
ee7b28eb
SB
98952012-07-14 Steven Bosscher <steven@gcc.gnu.org>
9896
9897 * c-pch.c (CHECK_NO_ASM_OUT_DURING_PCH): Do not define.
9898 Remove code conditional on it.
9899
6bdf3519
SB
99002012-07-11 Steven Bosscher <steven@gcc.gnu.org>
9901
9902 * c-gimplify.c: Do not include basic-block.h.
9903 * c-common.c: Do not include linfuncs.h.
9904
532aafad
SB
99052012-07-08 Steven Bosscher <steven@gcc.gnu.org>
9906
9907 * c-common.h: Include tree.h.
9908
8d0d1915
JM
99092012-07-02 Jason Merrill <jason@redhat.com>
9910
9911 PR c++/53524
9912 * c-common.c (get_priority): Call default_conversion.
9913
fbc873ad
UB
99142012-07-01 Uros Bizjak <ubizjak@gmail.com>
9915
9916 * c-pch.c (c_common_write_pch): Remove unused variables.
9917
d4a10d0a
SB
99182012-06-29 Steven Bosscher <steven@gcc.gnu.org>
9919
9920 * cppspec.c: Moved from gcc/ to here.
9921
6f3a2e23
KT
99222012-06-27 Kai Tietz <ktietz@redhat.com>
9923
9924 PR preprocessor/37215
9925 * c-ppoutput.c (preprocess_file): Check for nonempty buffer.
9926
8ca92d04
SB
99272012-06-21 Steven Bosscher <steven@gcc.gnu.org>
9928
9929 * c-common.h (c_common_print_pch_checksum): Remove.
9930 * c-pch.c: Do not include output.h.
9931 (CHECK_NO_ASM_OUT_DURING_PCH): Define and add FIXME.
9932 (asm_out_file): Define iff CHECK_NO_ASM_OUT_DURING_PCH isdefined.
9933 (asm_file_startpos): Define iff CHECK_NO_ASM_OUT_DURING_PCH is defined.
9934 (struct c_pch_header): Remove.
9935 (get_ident): Update gpch version.
9936 (pch_init): Do not print executable_checksum to asm_out_file.
9937 Do not fail if there is no asm_out_file to read back from. Set
9938 asm_file_startpos only if CHECK_NO_ASM_OUT_DURING_PCH is defined.
9939 (c_common_write_pch): Verify that nothing was written to asm_out_file
9940 since pch_init was called. Do not write a c_pch_header, and do not
9941 copy from asm_out_file to the PCH.
9942 (c_common_read_pch): Do not read a c_pch_header, and do not restore
9943 the content of asm_out_file from the PCH.
9944 (c_common_print_pch_checksum): Remove.
9945 * c-opts.c (c_common_init): Print out executable_checksum directly.
9946
70f42967
SB
99472012-06-19 Steven Bosscher <steven@gcc.gnu.org>
9948
9949 * c-target.def (objc_declare_unresolved_class_reference,
9950 objc_declare_class_definition): Add new hooks.
9951
a8781821
SB
99522012-06-19 Steven Bosscher <steven@gcc.gnu.org>
9953
9954 * c-lex.c: Do not include output.h.
9955 (cb_ident): Try to put out .ident with targetm.asm_out.output_ident.
9956 Remove uses of ASM_OUTPUT_IDENT.
9957
9e1a8dd1
RR
99582012-06-15 Marc Glisse <marc.glisse@inria.fr>
9959
9960 PR c++/51033
9961 * c-common.h (c_build_vec_perm_expr): Move decl here.
9962 * c-common.c (c_build_vec_perm_expr): Move definition
9963 here.
9964
6f07a821
SB
99652012-06-06 Steven Bosscher <steven@gcc.gnu.org>
9966
9967 * c.opt (fconserve-space): Turn into a no-op.
9968
9faeb493 99692012-06-04 Sterling Augustine <saugustine@google.com>
c265f413
SA
9970
9971 * c-pretty-print.h (pp_c_flag_gnu_v3): New enumerator.
9972 * c-pretty-print.c (pp_c_specifier_qualifier_list): Check it at
9973 both the start and end of the function.
9974
a4b7d13c
SB
99752012-06-04 Steven Bosscher <steven@gcc.gnu.org>
9976
9977 * c-common.c: Do not include output.h.
9978 * c-pragma.c: Likewise.
9979
c265f413
SA
99802012-06-04 Steven Bosscher <steven@gcc.gnu.org>
9981
9982 * error.c (dump_decl): Check pp_c_flag_gnu_v3.
9983 (decl_as_dwarf_string, lang_decl_dwarf_name): New functions.
9984 (lang_decl_name): Handle namespace decls.
9985
be7a421e
SB
99862012-05-31 Steven Bosscher <steven@gcc.gnu.org>
9987
9988 * c-ada-spec.c: Do not include output.h.
9989 * c-semantics.c: Likewise.
9990
65de6659
JM
99912012-05-29 Joseph Myers <joseph@codesourcery.com>
9992
9993 * c-common.c: Fix typo.
9994
ca5f4331
MM
99952012-05-29 Michael Matz <matz@suse.de>
9996
9997 * c-common.h (c_expand_decl): Remove prototype.
9998
4f7f7aca
MLI
99992012-05-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
10000
10001 * c.opt (Wmissing-braces): Use LangEnabledBy(C ObjC,Wall).
10002 * c-opts.c (c_common_handle_option): Remove code handling
10003 warn_missing_braces.
10004
4a792f9b
PC
100052012-05-28 Paolo Carlini <paolo.carlini@oracle.com>
10006
10007 PR c++/25137
10008 * c-opts.c (c_common_handle_option): For C++ -Wall doesn't enable
10009 -Wmissing_braces.
10010
650dc14a
DS
100112012-05-22 Dodji Seketeli <dodji@redhat.com>
10012
10013 PR c++/53322
10014 * c.opt (Wunused-local-typedefs): Use EnabledBy(Wunused).
10015
9b095bf1
MLI
100162012-05-17 Manuel López-Ibáñez <manu@gcc.gnu.org>
10017
10018 * c.opt (--pedantic-errors,-pedantic-errors): Do not handle here.
10019 * c-opts.c (c_common_handle_option): Do not handle explicitly
10020 Wreturn-type, Wwrite-strings, warn_ecpp, and -pedantic-errors.
10021
0b2c4be5
DS
100222012-05-16 Dodji Seketeli <dodji@redhat.com>
10023
10024 PR preprocessor/7263
ab20d992 10025 * c-lex.c (c_lex_with_flags): Pass a virtual location to the call
0b2c4be5
DS
10026 to cpp_classify_number. For diagnostics, use the precise location
10027 instead of the global input_location.
10028
a1bde5af
PC
100292012-05-15 Paolo Carlini <paolo.carlini@oracle.com>
10030
d02924ef 10031 PR c++/11856
a1bde5af
PC
10032 * c-common.c (shorten_compare): Check c_inhibit_evaluation_warnings.
10033
d1ede5f4
BS
100342012-05-14 Bernd Schmidt <bernds@codesourcery.com>
10035
a1bde5af 10036 * c-common.c (DEF_ATTR_STRING): Define and undefine as necessary.
d1ede5f4 10037
f2bc201f
MLI
100382012-05-14 Manuel López-Ibáñez <manu@gcc.gnu.org>
10039
10040 PR 53063
10041 * c.opt (Wc++0X-compat,Wdelete-non-virtual-dtor,Wjump-misses-init,
10042 Wreorder): Use LangEnabledBy.
10043 * c-opts.c (c_common_handle_option): Do not enable them
10044 explicitly. Call lang-specific generated functions.
10045 (c_common_post_options): Do not set them here.
10046
95744782
MLI
100472012-05-13 Manuel López-Ibáñez <manu@gcc.gnu.org>
10048
10049 * c.opt (Wclobbered,Wempty-body,Wignored-qualifiers,
10050 Wmissing-field-initializers,Wmissing-parameter-type,
10051 Wold-style-declaration,Woverride-init): Use EnabledBy.
10052 * c-opts.c (c_common_post_options): Do not set here explicitly.
10053
7d5a5747
MLI
100542012-05-11 Manuel López-Ibáñez <manu@gcc.gnu.org>
10055
10056 PR 53063
10057 * c-opts.c (c_common_handle_option): Use handle_generated_option
10058 to enable sub-options.
10059
5a3c9cf2
PC
100602012-05-10 Paolo Carlini <paolo.carlini@oracle.com>
10061
10062 PR c++/53158
10063 * c-common.c (warnings_for_convert_and_check): Use warning_at.
10064
3ac8781c
RG
100652012-05-10 Richard Guenther <rguenther@suse.de>
10066
10067 * c-common.c (c_sizeof_or_alignof_type): Remove assert and
10068 adjust commentary about TYPE_IS_SIZETYPE types.
10069
1e537948
MLI
100702012-05-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
10071
10072 PR c++/53261
10073 * c-common.c (warn_logical_operator): Check that argument of
10074 integer_zerop is not NULL.
10075
f2c4a785
MLI
100762012-05-05 Manuel López-Ibáñez <manu@gcc.gnu.org>
10077
10078 PR c/43772
10079 * c-common.c (warn_logical_operator): Do not warn if either side
10080 is already true or false.
10081
50f305ca
MLI
100822012-05-04 Manuel López-Ibáñez <manu@gcc.gnu.org>
10083
10084 PR c/51712
10085 * c-common.c (expr_original_type): New.
10086 (shorten_compare): Do not warn for enumeration types.
10087
0c3641b0
MLI
100882012-05-03 Manuel López-Ibáñez <manu@gcc.gnu.org>
10089
10090 * c.opt (fpermissive): Add Var(flag_permissive).
10091
7edaa4d2
MG
100922012-04-30 Marc Glisse <marc.glisse@inria.fr>
10093
10094 PR c++/51033
10095 * c-common.c (convert_vector_to_pointer_for_subscript): New function.
10096 * c-common.h (convert_vector_to_pointer_for_subscript): Declare it.
10097
b9c8da34
DS
100982012-04-30 Dodji Seketeli <dodji@redhat.com>
10099
10100 Add -Wvarargs option
ab20d992 10101 * c.opt (Wvarargs): Define new option.
b9c8da34 10102
e6c69da0
MLI
101032012-04-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
10104
10105 * c-common.c (check_function_arguments): Replace
10106 Wmissing-format-attribute with Wsuggest-attribute=format.
10107
90137d8f
MLI
101082012-04-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
10109
10110 * c.opt (Wsuggest-attribute=format): New. Alias of
10111 Wmissing-format-attribute.
10112 * c-format.c (decode_format_type): Replace
10113 Wmissing-format-attribute with Wsuggest-attribute=format.
10114 (check_function_format): Likewise.
10115
9faeb493 101162012-04-27 Ollie Wild <aaw@google.com>
7f5f5f98
OW
10117
10118 * c-common.c: Add CPP_W_LITERAL_SUFFIX mapping.
10119 * c-opts.c (c_common_handle_option): Handle OPT_Wliteral_suffix.
10120 * c.opt: Add Wliteral-suffix.
10121
c1771a20
MLI
101222012-04-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
10123
10124 PR c/44774
10125 * c.opt (Wpedantic): New.
10126 (pedantic): Alias Wpedantic.
10127 * c-opts.c (c_common_handle_option): Replace -pedantic with -Wpedantic.
10128 (c_common_post_options): Likewise.
10129 (sanitize_cpp_opts): Likewise.
10130 * c-lex.c (interpret_float): Likewise.
10131 * c-format.c (check_format_types): Likewise.
10132 * c-common.c (pointer_int_sum): Likewise.
10133 (c_sizeof_or_alignof_type): Likewise.
10134 (c_add_case_label): Likewise.
10135 (c_do_switch_warnings): Likewise.
10136 * c-pragma.c (handle_pragma_float_const_decimal64): Likewise.
10137
04b391c1
JM
101382012-04-15 Jason Merrill <jason@redhat.com>
10139
10140 PR c++/52818
10141 * c-format.c (CPLUSPLUS_STD_VER): C++11 inherits from C99.
10142 (C_STD_NAME): Distinguish between C++98 and C++11.
10143
ac868f29
EB
101442012-04-11 Eric Botcazou <ebotcazou@adacore.com>
10145
10146 PR target/52624
10147 * c-common.h (uint16_type_node): Rename into...
10148 (c_uint16_type_node): ...this.
10149 * c-common.c (c_common_nodes_and_builtins): Adjust for above renaming.
10150 * c-cppbuiltin.c (builtin_define_stdint_macros): Likewise.
10151
fd4116f4
MLI
101522012-04-10 Manuel López-Ibáñez <manu@gcc.gnu.org>
10153
10154 * c-common.c (warn_if_unused_value): Move definition to here.
10155 * c-common.h (warn_if_unused_value): Move declaration to here.
10156
573ac65e
WB
101572012-03-23 William Bader <williambader@hotmail.com>
10158
10159 * c-lex.c (c_lex_with_flags): Avoid declarations after stmts.
10160
552b8185
JM
101612012-03-20 Jason Merrill <jason@redhat.com>
10162
10163 * c-common.h (enum cxx_dialect): Add cxx1y.
10164 * c-common.c (c_common_nodes_and_builtins): Use >= for cxx_dialect
10165 test.
10166 * c-cppbuiltin.c (c_cpp_builtins): Likewise.
10167 * c-opts.c (c_common_post_options): Likewise.
10168 (set_std_cxx1y): New.
10169 (c_common_handle_option): Call it.
10170 * c.opt (-std=c++1y, -std=gnu++1y): New flags.
10171
04398fa8
PC
101722012-03-19 Paolo Carlini <paolo.carlini@oracle.com>
10173
10174 PR c++/14710
10175 * c.opt ([Wuseless-cast]): Add.
10176
d2a12ae7
RG
101772012-03-16 Richard Guenther <rguenther@suse.de>
10178
10179 * c-pretty-print.c (pp_c_initializer_list): Adjust.
10180
a12bf402
MLI
101812012-03-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
10182
10183 PR c++/44783
10184 * c.opt (ftemplate-backtrace-limit) Add.
10185
5c30094f
RO
101862012-03-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
10187
10188 * c-cppbuiltin.c (c_cpp_builtins): Remove #pragma extern_prefix
10189 handling.
10190 * c-pragma.c (handle_pragma_extern_prefix): Remove.
10191 (init_pragma): Don't register extern_prefix.
10192
21fa2faf
RG
101932012-03-12 Richard Guenther <rguenther@suse.de>
10194
10195 * c-common.c (c_common_get_narrower): Use c_common_type_for_size.
10196 (builtin_type_for_size): Likewise.
10197
e3793c6f
JJ
101982012-02-13 Jakub Jelinek <jakub@redhat.com>
10199
10200 PR c++/52215
10201 * c-common.c (sync_resolve_params): Don't decide whether to convert
10202 or not based on TYPE_SIZE comparison, convert whenever arg_type
10203 is unsigned INTEGER_TYPE.
10204
93286335
PC
102052012-02-06 Paolo Carlini <paolo.carlini@oracle.com>
10206
10207 PR c/52118
10208 * c.opt ([Wunused-local-typedefs]): Fix description.
10209
7a421706
MS
102102012-01-24 Mike Stump <mikestump@comcast.net>
10211
10212 * c-common.c (c_common_type_for_mode): Match signed/unsigned types
10213 exactly.
10214
ba9b1f11
RG
102152012-01-18 Richard Guenther <rguenther@suse.de>
10216
10217 * c-opts.c (c_common_post_options): Reset LTO flags if
10218 we are about to generate a PCH.
10219
465406be
PC
102202012-01-17 Paolo Carlini <paolo.carlini@oracle.com>
10221
10222 PR c++/51777
10223 * c-pretty-print.c (pp_c_integer_constant): For unsigned constants
10224 use pp_unsigned_wide_integer.
10225
aee15221
RG
102262012-01-10 Richard Guenther <rguenther@suse.de>
10227
10228 PR middle-end/51806
10229 * c-opts.c (c_common_handle_option): Move -Werror handling
10230 to language independent code.
10231
5720c0dc
RG
102322012-01-05 Richard Guenther <rguenther@suse.de>
10233
10234 PR middle-end/51764
10235 * c.opt (Wmudflap, fmudflap, fmudflapth, fmudflapir): Move here
10236 from common.opt.
10237
73ac190a
PC
102382011-12-30 Paolo Carlini <paolo.carlini@oracle.com>
10239
10240 PR c++/51316
10241 * c-common.c (c_sizeof_or_alignof_type): In C++ allow for alignof
10242 of array types with an unknown bound.
10243
48b0b196
JM
102442011-12-20 Joseph Myers <joseph@codesourcery.com>
10245
10246 * c-common.c (flag_isoc99): Update comment to refer to C11.
10247 (flag_isoc1x): Change to flag_isoc11.
10248 * c-common.h (flag_isoc99): Update comment to refer to C11.
10249 (flag_isoc1x): Change to flag_isoc11.
10250 * c-cppbuiltin.c (cpp_atomic_builtins): Change comment to refer to
10251 C11.
10252 * c-opts.c (set_std_c1x): Change to set_std_c11.
10253 (c_common_handle_option): Handle OPT_std_c11 and OPT_std_gnu11.
10254 Call set_std_c11.
10255 (set_std_c89, set_std_c99, set_std_c11): Use flag_isoc11.
10256 (set_std_c1): Use CLK_STDC11 and CLK_GNUC11.
10257 * c.opt (std=c1x): Change to std=c11. Document as non-draft
10258 standard.
10259 (std=c1x, std=iso9899:2011): Add as aliases of std=c11.
10260 (std=gnu1x): Change to std=gnu11. Refer to non-draft standard.
10261 (std=gnu1x): Make alias of std=gnu11.
10262
d58d6eb5
JM
102632011-12-19 Jason Merrill <jason@redhat.com>
10264
10265 PR c++/51228
10266 * c-common.c (handle_transparent_union_attribute): Check the first
10267 field if the type is complete.
10268
b3908fcc
JW
102692011-12-15 Jonathan Wakely <jwakely.gcc@gmail.com>
10270
10271 PR libstdc++/51365
10272 * c-common.c (RID_IS_FINAL): Add.
10273 * c-common.h (RID_IS_FINAL): Add.
10274
fea3ca91
IS
102752011-11-30 Iain Sandoe <iains@gcc.gnu.org>
10276
10277 * c.opt (fgnu-runtime): Provide full description.
10278 (fnext-runtime): Likewise.
10279 * c-opts.c (OPT_fgnu_runtime, OPT_fnext_runtime) Remove.
10280
62bad7cd
AM
102812011-11-28 Andrew MacLeod <amacleod@redhat.com>
10282
10283 * c-cpp-builtin.c (cpp_atomic_builtins):New. Emit all atomic
10284 predefines in one place. Add LOCK_FREE predefines.
10285 (c_cpp_builtins): Move Legacy HAVE_SYNC predefines to
10286 new func.
10287
c466c4ff
AM
102882011-11-24 Andrew MacLeod <amacleod@redhat.com>
10289
10290 PR c/51256
9faeb493 10291 * c-common.c (get_atomic_generic_size): Check for various error
c466c4ff 10292 conditions
9faeb493
UB
10293 (resolve_overloaded_atomic_exchange,
10294 resolve_overloaded_atomic_compare_exchange,
c466c4ff
AM
10295 resolve_overloaded_atomic_load, resolve_overloaded_atomic_store): Return
10296 error_mark_node for error conditions.
9faeb493 10297
a5952633
RG
102982011-11-08 Richard Guenther <rguenther@suse.de>
10299
10300 PR middle-end/51010
ab20d992 10301 * c-pretty-print.c (pp_c_expression): Handle SSA_NAMEs.
a5952633 10302
0a35513e
AH
103032011-11-07 Richard Henderson <rth@redhat.com>
10304 Aldy Hernandez <aldyh@redhat.com>
10305 Torvald Riegel <triegel@redhat.com>
10306
10307 Merged from transactional-memory.
10308
10309 * c-common.c (handle_tm_wrap_attribute,
10310 handle_tm_attribute, ignore_attribute, parse_tm_stmt_attr): New.
10311 (struct c_common_reswords): Added __transaction* keywords.
10312 (struct c_common_attribute_table): Added transaction* and tm_regparm
10313 attributes.
10314 * c-common.h: Added RID_TRANSACTION*. Added TM_ATTR* and TM_STMT*
10315 masks.
10316 (parse_tm_stmt_attr, tm_attr_to_mask, tm_mask_to_attr,
10317 find_tm_attribute): Declare.
10318
6d87092d
JM
103192011-11-07 Jason Merrill <jason@redhat.com>
10320
10321 PR c++/35688
10322 * c-common.c, c-common.h: Revert yesterday's changes.
10323
8e7860a1
JM
103242011-11-06 Jason Merrill <jason@redhat.com>
10325
10326 PR c++/35688
10327 * c-common.c (decl_has_visibility_attr): Split out from...
10328 (c_determine_visibility): ...here.
10329 * c-common.h: Declare it.
10330
d19fa6b5
JM
103312011-11-06 Joseph Myers <joseph@codesourcery.com>
10332
10333 * c-common.c (c_common_reswords): Add _Alignas and _Alignof.
10334 (c_sizeof_or_alignof_type): Diagnose alignof applied to a function
10335 type.
10336 (check_user_alignment): New. Split out of
10337 handle_aligned_attribute. Disallow integer constants with
10338 noninteger types. Conditionally allow zero.
10339 (handle_aligned_attribute): Use check_user_alignment.
10340 * c-common.h (RID_ALIGNAS, check_user_alignment): New.
10341
86951993
AM
103422011-11-06 Andrew MacLeod <amacleod@redhat.com>
10343 Richard Henderson <rth@redhat.com>
10344
10345 Merged from cxx-mem-model.
10346
10347 * c-cppbuiltin.c (c_cpp_builtins): Test both atomic and sync patterns.
9faeb493 10348 * c-common.c (sync_resolve_params, sync_resolve_return): Only tweak
86951993
AM
10349 parameters that are the same type size.
10350 (get_atomic_generic_size): New. Find size of generic
10351 atomic function parameters and do typechecking.
10352 (add_atomic_size_parameter): New. Insert size into parameter list.
10353 (resolve_overloaded_atomic_exchange): Restructure __atomic_exchange to
10354 either __atomic_exchange_n or external library call.
9faeb493 10355 (resolve_overloaded_atomic_compare_exchange): Restructure
86951993 10356 __atomic_compare_exchange to either _n variant or external library call.
9faeb493 10357 (resolve_overloaded_atomic_load): Restructure __atomic_load to either
86951993
AM
10358 __atomic_load_n or an external library call.
10359 (resolve_overloaded_atomic_store): Restructure __atomic_store to either
10360 __atomic_store_n or an external library call.
10361 (resolve_overloaded_builtin): Handle new __atomic builtins.
10362
cf9e9959
EB
103632011-11-04 Eric Botcazou <ebotcazou@adacore.com>
10364
10365 PR c++/50608
10366 * c-common.c (c_fully_fold_internal) <ADDR_EXPR>: Call fold_offsetof_1.
10367 (fold_offsetof_1): Make global. Remove STOP_REF argument and adjust.
10368 <INDIRECT_REF>: Return the argument.
10369 <ARRAY_REF>: Remove special code for negative offset.
10370 Call fold_build_pointer_plus instead of size_binop.
10371 (fold_offsetof): Remove STOP_REF argument and adjust.
10372 * c-common.h (fold_offsetof_1): Declare.
10373 (fold_offsetof): Remove STOP_REF argument.
10374
25339f10
JM
103752011-11-02 Paolo Carlini <paolo.carlini@oracle.com>
10376
10377 PR c++/50810
10378 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
10379 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
10380 Wnarrowing for C++0x and C++98.
10381 * c.opt ([Wnarrowing]): Update.
10382
89401152
PC
103832011-11-01 Paolo Carlini <paolo.carlini@oracle.com>
10384
10385 PR c++/44277
10386 * c.opt: Add Wzero-as-null-pointer-constant.
10387
97e3ad20
JM
103882011-10-31 Jason Merrill <jason@redhat.com>
10389
15694fdd
JM
10390 * c.opt (-fdeduce-init-list): Off by default.
10391
97e3ad20
JM
10392 PR c++/50920
10393 * c-common.h (cxx_dialect): Add cxx11 and cxx03.
10394 * c.opt: Add -std=c++11, -std=gnu++11, -std=gnu++03,
10395 and -Wc++11-compat.
10396 * c-opts.c (set_std_cxx11): Rename from set_std_cxx0x.
10397
fb9120e3
RAV
103982011-10-27 Roberto Agostino Vitillo <ravitillo@lbl.gov>
10399
10400 PR c++/30066
10401 * c.opt (fvisibility-inlines-hidden): Description change.
10402
3ce4f9e4
ESR
104032011-10-26 Ed Smith-Rowland <3dw4rd@verizon.net>
10404
10405 Implement C++11 user-defined literals.
10406 * c-common.c (build_userdef_literal): New.
10407 * c-common.def: New tree code.
10408 * c-common.h (tree_userdef_literal): New tree struct and accessors.
10409 * c-lex.c (interpret_float): Add suffix parm.
10410 (c_lex_with_flags): Build literal tokens.
10411
5f53c243
PC
104122011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
10413
10414 PR c++/50841
10415 Revert:
10416 2011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
10417
10418 PR c++/50810
10419 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
10420 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
10421 Wnarrowing for C++0x and C++98.
10422 * c.opt ([Wnarrowing]): Update.
10423
263734e1
PC
104242011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
10425
10426 PR c++/50810
10427 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
10428 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
10429 Wnarrowing for C++0x and C++98.
10430 * c.opt ([Wnarrowing]): Update.
10431
d2e312d7
PC
104322011-10-21 Paolo Carlini <paolo.carlini@oracle.com>
10433
10434 PR c++/45385
10435 * c-common.c (conversion_warning): Remove code looking for
10436 artificial operands.
10437
d17687f6
DS
104382011-10-18 Dodji Seketeli <dodji@redhat.com>
10439
10440 PR bootstrap/50760
10441 * c-lex.c (fe_file_change): Use LINEMAP_SYSP when
9faeb493 10442 !NO_IMPLICIT_EXTERN_C.
d17687f6 10443
fc8396e9
PC
104442011-10-17 Michael Spertus <mike_spertus@symantec.com>
10445
10446 * c-common.c (c_common_reswords): Add __bases,
10447 __direct_bases.
10448 * c-common.h: Add RID_BASES and RID_DIRECT_BASES.
10449
104502011-10-17 Paolo Carlini <paolo.carlini@oracle.com>
10451
10452 PR c++/50757
10453 * c.opt ([Wnonnull]): Add C++ and Objective-C++.
10454
847e697a
TT
104552011-10-15 Tom Tromey <tromey@redhat.com>
10456 Dodji Seketeli <dodji@redhat.com>
10457
10458 * c.opt (fdebug-cpp): New option.
10459 * c-opts.c (c_common_handle_option): Handle the option.
10460 * c-ppoutput.c (maybe_print_line_1): New static function. Takes an
10461 output stream in parameter. Factorized from ...
10462 (maybe_print_line): ... this. Dump location debug information when
10463 -fdebug-cpp is in effect.
10464 (print_line_1): New static function. Takes an output stream in
10465 parameter. Factorized from ...
10466 (print_line): ... here. Dump location information when -fdebug-cpp
10467 is in effect.
10468 (scan_translation_unit): Dump location information when
10469 -fdebug-cpp is in effect.
10470
92582b75
TT
104712011-10-15 Tom Tromey <tromey@redhat.com>
10472 Dodji Seketeli <dodji@redhat.com>
10473
10474 * c.opt (ftrack-macro-expansion): New option. Handle it with and
10475 without argument.
10476 * c-opts.c (c_common_handle_option)<case
10477 OPT_ftrack_macro_expansion_, case OPT_ftrack_macro_expansion>: New
10478 cases. Handle -ftrack-macro-expansion with and without argument.
10479
46427374
TT
104802011-10-15 Tom Tromey <tromey@redhat.com>
10481 Dodji Seketeli <dodji@redhat.com>
10482
10483 * c-ppoutput.c (scan_translation_unit, maybe_print_line)
10484 (print_line, cb_define, do_line_change): Adjust to avoid touching
10485 the internals of struct line_map. Use the public API instead.
10486 * c-pch.c (c_common_read_pch): Likewise.
10487 * c-lex.c (fe_file_change): Likewise.
10488
fc8396e9
PC
104892011-10-14 Paolo Carlini <paolo.carlini@oracle.com>
10490
10491 PR c++/17212
10492 * c.opt ([Wformat-zero-length]): Add C++ and Objective-C++.
10493
104942011-10-11 Paolo Carlini <paolo.carlini@oracle.com>
10495
10496 PR c++/33067
10497 * c-pretty-print.c (pp_c_floating_constant): Output
10498 max_digits10 (in the ISO C++ WG N1822 sense) decimal digits.
10499
e79983f4
MM
105002011-10-11 Michael Meissner <meissner@linux.vnet.ibm.com>
10501
10502 * c-common.c (def_builtin_1): Delete old interface with two
10503 parallel arrays to hold standard builtin declarations, and replace
10504 it with a function based interface that can support creating
10505 builtins on the fly in the future. Change all uses, and poison
10506 the old names. Make sure 0 is not a legitimate builtin index.
10507 * c-omp.c (c_finish_omp_barrier): Ditto.
10508 (c_finish_omp_taskwait): Ditto.
10509 (c_finish_omp_flush): Ditto.
10510
6637388f
TG
105112011-10-11 Tristan Gingold <gingold@adacore.com>
10512
10513 * c.opt: (fallow-parameterless-variadic-functions): New.
10514
3797cb21
DS
105152011-09-08 Dodji Seketeli <dodji@redhat.com>
10516
10517 PR c++/33255 - Support -Wunused-local-typedefs warning
10518 * c-common.h (struct c_language_function::local_typedefs): New
10519 field.
9faeb493
UB
10520 (record_locally_defined_typedef, maybe_record_typedef_use)
10521 (maybe_warn_unused_local_typedefs): Declare new functions.
3797cb21 10522 * c-common.c (record_locally_defined_typedef)
9faeb493
UB
10523 (maybe_record_typedef_use)
10524 (maybe_warn_unused_local_typedefs): Define new functions.
3797cb21
DS
10525 * c.opt: Declare new -Wunused-local-typedefs flag.
10526
693ddb1b
EB
105272011-09-06 Eric Botcazou <ebotcazou@adacore.com>
10528
10529 PR middle-end/50266
10530 * c-common.c (c_fully_fold_internal) <ADDR_EXPR>: Fold offsetof-like
10531 computations.
10532
830c740f
RG
105332011-09-05 Richard Guenther <rguenther@suse.de>
10534
10535 * c-common.c (complete_array_type): Use ssize_int (-1) instead
10536 of integer_minus_one_node for empty array upper bounds.
10537
892a371f
DS
105382011-08-28 Dodji Seketeli <dodji@redhat.com>
10539
10540 * c-pch.c (c_common_read_pch): Call linemap_add with LC_ENTER as
10541 it's the first time it's being called on this main TU.
10542
0e3fdb48
RB
105432011-08-24 Richard Guenther <rguenther@suse.de>
10544
10545 PR c/49396
10546 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Fix conditional.
10547
105482011-08-22 Gabriel Charette <gchare@google.com>
e3dfef44
GC
10549
10550 * c-opts.c (c_finish_options): Force BUILTINS_LOCATION for tokens
10551 defined in cpp_init_builtins and c_cpp_builtins.
10552
d4a83c10
JM
105532011-08-19 Joseph Myers <joseph@codesourcery.com>
10554
10555 * c-common.c (c_common_reswords): Add __builtin_complex.
10556 * c-common.h (RID_BUILTIN_COMPLEX): New.
10557
bbceee64
JM
105582011-08-18 Joseph Myers <joseph@codesourcery.com>
10559
10560 * c-common.c (c_common_reswords): Add _Noreturn.
10561 (keyword_is_function_specifier): Handle RID_NORETURN.
10562 * c-common.h (RID_NORETURN): New.
10563
3f8257db 105642011-08-10 Artjoms Sinkarovs <artyom.shinakroff@gmail.com>
0e3a99ae
AS
10565
10566 * c-common.c (unsafe_conversion_p): New function. Check if it is
10567 unsafe to convert an expression to the type.
10568 (conversion_warning): Adjust, use unsafe_conversion_p.
10569 * c-common.h (unsafe_conversion_p): New function declaration.
10570
20906c66
JJ
105712011-08-02 Jakub Jelinek <jakub@redhat.com>
10572
10573 * c-common.h (c_finish_omp_atomic): Adjust prototype.
10574 (c_finish_omp_taskyield): New prototype.
10575 * c-omp.c (c_finish_omp_atomic): Add OPCODE, V, LHS1 and RHS1
10576 arguments. Handle OMP_ATOMIC_READ, OMP_ATOMIC_CAPTURE_OLD and
10577 OMP_ATOMIC_CAPTURE_NEW in addition to OMP_ATOMIC. If LHS1
10578 or RHS1 have side-effects, evaluate those too in the right spot,
10579 if it is a decl and LHS is also a decl, error out if they
10580 aren't the same.
10581 (c_finish_omp_taskyield): New function.
10582 * c-cppbuiltin.c (c_cpp_builtins): Change _OPENMP to 201107.
10583 * c-pragma.c (omp_pragmas): Add taskyield.
10584 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_TASKYIELD.
10585 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_FINAL and
10586 PRAGMA_OMP_CLAUSE_MERGEABLE.
10587
770e5a2e
DS
105882011-07-25 Dodji Seketeli <dodji@redhat.com>
10589
10590 * c-common.h (set_underlying_type): Remove parm name from
10591 declaration.
10592
1baae426
RG
105932011-07-25 Romain Geissler <romain.geissler@gmail.com>
10594
10595 * c-pretty-print.h: Search c-common.h in c-family.
9faeb493 10596
fcb21722
JM
105972011-07-22 Jason Merrill <jason@redhat.com>
10598
76f86d00
JM
10599 PR c++/49793
10600 * c.opt (Wnarrowing): New.
10601
3a636414
JM
10602 PR c++/30112
10603 * c-common.h: Declare c_linkage_bindings.
10604 * c-pragma.c (handle_pragma_redefine_extname): Use it.
10605
fcb21722
JM
10606 PR c++/49813
10607 * c-opts.c (set_std_cxx0x): Set flag_isoc94 and flag_isoc99.
10608 * c-pretty-print.c (pp_c_cv_qualifiers): Check c_dialect_cxx as well
10609 as flag_isoc99 for 'restrict'.
10610 (pp_c_specifier_qualifier_list): Likewise for _Complex.
10611
02614448
ILT
106122011-07-21 Ian Lance Taylor <iant@google.com>
10613
10614 PR middle-end/49705
10615 * c-common.c (c_disable_warnings): New static function.
10616 (c_enable_warnings): New static function.
10617 (c_fully_fold_internal): Change local unused_p to bool. Call
10618 c_disable_warnings and c_enable_warnings rather than change
10619 c_inhibit_evaluation_warnings.
10620
34429675
JM
106212011-07-20 Jason Merrill <jason@redhat.com>
10622
10623 PR c++/6709 (DR 743)
10624 PR c++/42603 (DR 950)
10625 * c-common.h (CPP_KEYWORD, CPP_TEMPLATE_ID): Move from cp/parser.h.
10626 (CPP_NESTED_NAME_SPECIFIER, N_CP_TTYPES): Likewise.
10627 (CPP_DECLTYPE): New.
10628 * c-common.c (c_parse_error): Handle CPP_DECLTYPE.
10629
5d49b6a7
RG
106302011-07-19 Richard Guenther <rguenther@suse.de>
10631
10632 * c-common.c (pointer_int_sum): Use fold_build_pointer_plus.
10633 * c-omp.c (c_finish_omp_for): Likewise.
10634
e84a58ff
EB
106352011-07-12 Eric Botcazou <ebotcazou@adacore.com>
10636
10637 * c-ada-spec.c (dump_nested_types): Put semi-colon after empty loop
10638 body on the next line.
10639
329af3c7
JM
106402011-07-08 Jason Merrill <jason@redhat.com>
10641
4063e61b
JM
10642 PR c++/45437
10643 * c-omp.c (check_omp_for_incr_expr): Handle preevaluation.
10644
329af3c7
JM
10645 PR c++/49673
10646 * c-common.c (c_apply_type_quals_to_decl): Don't check
10647 TYPE_NEEDS_CONSTRUCTING.
10648
1a072294
RG
106492011-07-06 Richard Guenther <rguenther@suse.de>
10650
10651 * c-common.c (c_common_nodes_and_builtins):
10652 Merge calls to build_common_tree_nodes and build_common_tree_nodes_2.
10653
fce5dddd
RG
106542011-07-05 Richard Guenther <rguenther@suse.de>
10655
10656 * c-common.c (c_common_nodes_and_builtins): Build all common
10657 tree nodes first.
10658
45d439ac
JJ
106592011-06-27 Jakub Jelinek <jakub@redhat.com>
10660
56300785
JJ
10661 * c-common.h (c_tree_chain_next): New static inline function.
10662
45d439ac
JJ
10663 * c-common.c (check_builtin_function_arguments): Handle
10664 BUILT_IN_ASSUME_ALIGNED.
10665
e0a8ecf2
AM
106662011-06-21 Andrew MacLeod <amacleod@redhat.com>
10667
10668 * c-common.c: Add sync_ or SYNC__ to builtin names.
10669 * c-omp.c: Add sync_ or SYNC__ to builtin names.
dfb43cd5
PV
10670
106712011-06-20 Pierre Vittet <piervit@pvittet.com>
10672
10673 * c-pragma.h (pragma_handler_1arg, pragma_handler_2arg): New
10674 handler.
10675 (gen_pragma_handler): New union.
10676 (internal_pragma_handler): New type.
10677 (c_register_pragma_with_data)
10678 (c_register_pragma_with_expansion_and_data): New functions.
10679
10680 * c-pragma.c (registered_pragmas, c_register_pragma_1)
10681 (c_register_pragma, c_register_pragma_with_expansion)
10682 (c_invoke_pragma_handler): Changed to work with
10683 internal_pragma_handler.
10684 (c_register_pragma_with_data)
10685 (c_register_pragma_with_expansion_and_data): New functions.
10686
677f3fa8
JM
106872011-06-14 Joseph Myers <joseph@codesourcery.com>
10688
10689 * c-common.c: Include common/common-target.h.
10690 (handle_section_attribute): Use
10691 targetm_common.have_named_sections.
10692 * c-cppbuiltin.c: Include common/common-target.h.
10693 (c_cpp_builtins): Use targetm_common.except_unwind_info.
10694
d7fc8c14
RG
106952011-06-10 Richard Guenther <rguenther@suse.de>
10696
10697 * c-pretty-print.c (pp_c_type_specifier): Use pp_c_identifier
10698 to print a IDENTIFIER_NODE.
10699
10e48e39
RO
107002011-06-09 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
10701 Joseph Myers <joseph@codesourcery.com>
10702
10703 * c.opt (fbuilding-libgcc): New option.
10704 * c-cppbuiltin.c (c_cpp_builtins): Define
10705 __LIBGCC_TRAMPOLINE_SIZE__ if flag_building_libgcc.
10706
6976ae51
JM
107072011-06-07 Jason Merrill <jason@redhat.com>
10708
3ff60975
JM
10709 * c-common.c (max_tinst_depth): Lower default to 900.
10710
6976ae51
JM
10711 * c-format.c (gcc_cxxdiag_char_table): Add 'S' format.
10712
009db074
RG
107132011-06-07 Richard Guenther <rguenther@suse.de>
10714
10715 * c-common.c (c_common_nodes_and_builtins): Do not set
10716 size_type_node or call set_sizetype.
10717
b4592b92
DS
107182011-06-07 Dodji Seketeli <dodji@redhat.com>
10719
10720 PR debug/49130
10721 * c-pretty-print.c (pp_c_integer_constant): Consider the canonical
9faeb493 10722 type when using pointer comparison to compare types.
b4592b92 10723
014ab419
JW
107242011-06-02 Jonathan Wakely <jwakely.gcc@gmail.com>
10725
10726 * c.opt: Add -Wdelete-non-virtual-dtor.
10727 * c-opts.c (c_common_handle_option): Include it in -Wall.
10728
4f60111f
NF
107292011-05-30 Nathan Froyd <froydnj@gcc.gnu.org>
10730
10731 PR bootstrap/49190
10732
10733 Revert:
10734 2011-05-26 Nathan Froyd <froydnj@codesourcery.com>
10735
10736 * c-common.h (struct c_common_identifier): Inherit from tree_typed,
10737 not tree_common.
10738
4cc4f2f4
JJ
107392011-05-27 Jakub Jelinek <jakub@redhat.com>
10740
10741 PR c++/49165
10742 * c-common.c (c_common_truthvalue_conversion) <case COND_EXPR>: For
10743 C++ don't call c_common_truthvalue_conversion on void type arms.
10744
38e01f9e
NF
107452011-05-27 Nathan Froyd <froydnj@codesourcery.com>
10746
10747 * c-common.h (struct stmt_tree_s) [x_cur_stmt_list]: Change to a VEC.
10748 (stmt_list_stack): Define.
10749 (cur_stmt_list): Adjust for new type of x_cur_stmt_list.
10750 * c-semantics.c (push_stmt_list, pop_stmt_list): Likewise.
10751
92e948a8
NF
107522011-05-26 Nathan Froyd <froydnj@codesourcery.com>
10753
10754 * c-common.c (warning_candidate_p): Check for BLOCKs.
10755
a2fc3e63
NF
107562011-05-26 Nathan Froyd <froydnj@codesourcery.com>
10757
10758 * c-common.h (struct c_common_identifier): Inherit from tree_typed,
10759 not tree_common.
10760
0957c029
JJ
107612011-05-25 Jakub Jelinek <jakub@redhat.com>
10762
10763 * c-common.c (def_fn_type): Remove extra va_end.
10764
828fb3ba
JM
107652011-05-23 Jason Merrill <jason@redhat.com>
10766
10767 PR c++/48106
10768 * c-common.c (c_common_get_narrower): New.
10769 (shorten_binary_op, shorten_compare, warn_for_sign_compare): Use it.
10770
dde05067
NF
107712011-05-23 Nathan Froyd <froydnj@codesourcery.com>
10772
10773 * c-common.h (check_function_arguments): Tweak prototype of
10774 check_function_arguments.
10775 * c-common.c (check_function_arguments): Likewise. Adjust
10776 calls to check_function_nonnull, check_function_format, and
10777 check_function_sentinel.
10778 (check_function_sentinel): Take a FUNCTION_TYPE rather than
10779 separate attributes and typelist arguments. Use
10780 FOREACH_FUNCTION_ARGS to iterate over argument types.
10781
3c0d13bf
PC
107822011-05-15 Paolo Carlini <paolo.carlini@oracle.com>
10783
10784 * c-common.c (c_common_reswords): Reorder.
10785 * c-common.h (rid): Likewise.
10786
8242dd04
NF
107872011-05-10 Nathan Froyd <froydnj@codesourcery.com>
10788
10789 * c-common.c (def_fn_type): Don't call build_function_type, call
10790 build_function_type_array or build_varargs_function_type_array
10791 instead.
10792 (c_common_nodes_and_builtins): Likewise.
10793
3d528853
NF
107942011-05-05 Nathan Froyd <froydnj@codesourcery.com>
10795
10796 * c-common.c (c_add_case_label): Omit the loc argument to
10797 build_case_label.
10798 * c-common.h (build_case_label): Remove.
10799 * c-semantics.c (build_case_label): Remove.
10800
a04a722b
JM
108012011-05-05 Joseph Myers <joseph@codesourcery.com>
10802
10803 * c-objc.h (objc_start_method_definition): Update prototype.
10804 * stub-objc.c (objc_start_method_definition): Add extra parameter.
10805
e19a18d4
NF
108062011-05-04 Nathan Froyd <froydnj@codesourcery.com>
10807
10808 * c-common.c (check_main_parameter_types): Reindent. Don't use
10809 TYPE_ARG_TYPES directly.
10810 (handle_nonnull_attribute): Likewise.
10811 (sync_resolve_params): Likewise.
10812 * c-format.c (handle_format_arg_attribute): Likewise. Adjust call
10813 to check_format_string.
10814 (handle_format_attribute): Likewise.
10815 (check_format_string): Take a function type to examine instead of
10816 a type list. Use a function_arg_iterator to step through argument
10817 types.
10818
c62c040f
RG
108192011-05-04 Richard Guenther <rguenther@suse.de>
10820
10821 * c-common.c (fix_string_type): Use size_int for index type bounds.
10822 (start_fname_decls): Do not pass NULL to build_int_cst.
10823 (c_init_attributes): Likewise.
10824 * c-lex.c (c_lex_with_flags): Likewise.
10825
c12ff9d8
JM
108262011-04-27 Jason Merrill <jason@redhat.com>
10827
10828 * c-common.c (make_tree_vector_from_list): New.
10829 * c-common.h: Declare it.
10830
304dfbe3
RG
108312011-04-26 Richard Guenther <rguenther@suse.de>
10832
10833 PR preprocessor/48248
10834 * c-ppoutput.c (maybe_print_line): Always optimize newlines
10835 for output size with -P.
10836
3c0d13bf
PC
108372011-04-25 Paolo Carlini <paolo.carlini@oracle.com>
10838
10839 * c-common.c (struct c_common_resword): Add __underlying_type.
10840 * c-common.h (enum rid): Add RID_UNDERLYING_TYPE.
10841
04695783
JM
108422011-04-20 Jim Meyering <meyering@redhat.com>
10843
10844 * c-format.c (init_dollar_format_checking): Remove useless
10845 if-before-free.
10846
0dc33c3c
NP
108472011-04-15 Nicola Pero <nicola.pero@meta-innovation.com>
10848
10849 * c-objc.h (objc_get_interface_ivars): Removed.
3c0d13bf 10850 (objc_detect_field_duplicates): New.
0dc33c3c 10851 * stub-objc.c: Likewise.
3c0d13bf 10852
c59633d9
NP
108532011-04-14 Nicola Pero <nicola.pero@meta-innovation.com>
10854
10855 * stub-objc.c (objc_declare_protocols): Renamed to
10856 objc_declare_protocol.
10857 * c-objc.h: Likewise.
3c0d13bf 10858
32dabdaf
NP
108592011-04-14 Nicola Pero <nicola.pero@meta-innovation.com>
10860
10861 * stub-objc.c (objc_declare_class): Updated argument name.
10862
81f653d6
NF
108632011-04-12 Nathan Froyd <froydnj@codesourcery.com>
10864
10865 * c-common.h (c_common_init_ts): Declare.
10866 * c-common.c (c_common_init_ts): Define.
10867
eb345401
NP
108682011-04-12 Nicola Pero <nicola.pero@meta-innovation.com>
10869
10870 * c-objc.h (objc_build_message_expr): Updated prototype.
10871 * stub-objc.c (objc_build_message_expr): Likewise.
9faeb493 10872
a358e188
MJ
108732011-04-12 Martin Jambor <mjambor@suse.cz>
10874
10875 * c-gimplify.c (c_genericize): Call cgraph_get_create_node instead
10876 of cgraph_node.
10877
e6313a78
RG
108782011-04-11 Richard Guenther <rguenther@suse.de>
10879
10880 * c-common.c (complete_array_type): Build a range type of
10881 proper type.
10882
dcf0c47e
NF
108832011-04-08 Nathan Froyd <froydnj@codesourcery.com>
10884
10885 * c-common.c (handle_sentinel_attribute): Don't use TYPE_ARG_TYPES.
10886 (handle_type_generic_attribute): Likewise.
10887
1ee44b26
JM
108882011-04-07 Jason Merrill <jason@redhat.com>
10889
10890 PR c++/48450
10891 * c-common.c (c_common_truthvalue_conversion): Don't ignore
10892 conversion from C++0x scoped enum.
10893
acce4e77
JM
108942011-04-06 Joseph Myers <joseph@codesourcery.com>
10895
10896 * c-target-def.h: New file.
10897 * c-target.def: New file.
10898 * c-target.h: New file.
10899 * c-common.c (targetcm): Don't define here.
10900 * c-common.h (default_handle_c_option): Declare.
10901 * c-format.c: Include c-target.h instead of target.h.
10902 * c-opts.c: Include c-target.h instead of target.h. Explicitly
10903 include tm.h.
10904 (default_handle_c_option): Move from targhooks.c.
10905
e2eefb55
JJ
109062011-03-29 Jakub Jelinek <jakub@redhat.com>
10907
10908 PR preprocessor/48248
10909 * c-ppoutput.c (print): Add src_file field.
10910 (init_pp_output): Initialize it.
10911 (maybe_print_line): Don't optimize by adding up to 8 newlines
10912 if map->to_file and print.src_file are different file.
10913 (print_line): Update print.src_file.
10914
ba78087b
KT
109152011-03-25 Kai Tietz <ktietz@redhat.com>
10916
10917 * c-ada-spec.c (compare_comment): Use filename_cmp
10918 instead of strcmp for filename.
10919
0edf1bb2
JL
109202011-03-25 Jeff Law <law@redhat.com>
10921
adfac8df 10922 * c-common.c (def_fn_type): Add missing va_end.
0edf1bb2 10923
c7dc8804
JM
109242011-03-25 Jason Merrill <jason@redhat.com>
10925
10926 * c.opt: Add -std=c++03.
10927
d1d879b1
EB
109282011-03-22 Eric Botcazou <ebotcazou@adacore.com>
10929
10930 * c-ada-spec.c (dump_ada_template): Skip non-class instances.
10931
3f8257db 109322011-03-17 Kai Tietz <ktietz@redhat.com>
62d784f7
KT
10933
10934 PR target/12171
5050afdf
KT
10935 * c-pretty-print.c (pp_c_specifier_qualifier_list):
10936 Display allowed attributes for function pointer types.
10937 (pp_c_attributes_display): New function to display
10938 attributes having affects_type_identity flag set to true.
10939 * c-pretty-print.h (pp_c_attributes_display): New prototype.
10940
62d784f7
KT
10941 * c-common.c (c_common_attribute_table):
10942 Add new element.
10943 (c_common_format_attribute_table): Likewise.
10944
82d37118
JM
109452011-03-18 Jason Merrill <jason@redhat.com>
10946
49a000c3
JM
10947 * c.opt (fconstexpr-depth): Add Var(max_constexpr_depth).
10948 * c-common.h: Don't declare it here.
10949 * c-common.c: Or define it here.
10950 * c-opts.c (c_common_handle_option): Or set it here.
10951
82d37118
JM
10952 PR c++/35315
10953 * c-common.c (handle_transparent_union_attribute): Don't
10954 make a duplicate type in C++.
10955
17bc631c
JM
109562011-03-15 Jason Merrill <jason@redhat.com>
10957
10958 * c-common.c (max_constexpr_depth): New.
10959 * c-common.h: Declare it.
10960 * c-opts.c (c_common_handle_option): Set it.
10961 * c.opt (fconstexpr-depth): New option.
10962
1b9b91a6
JM
109632011-03-11 Jason Merrill <jason@redhat.com>
10964
f231b5ff
JM
10965 * c-common.c (attribute_takes_identifier_p): Add missing const.
10966
1b9b91a6
JM
10967 PR c++/46803
10968 * c-common.c (attribute_takes_identifier_p): Assume that an
10969 unknown attribute takes an identifier.
10970
a19e4d44
NF
109712011-03-07 Nathan Froyd <froydnj@codesourcery.com>
10972
10973 PR c/47786
10974 * c-common.c (c_type_hash): Call list_length instead of iterating
10975 through DECL_CHAIN. Rename 'i' to 'n_elements'.
10976
982d62f6
JJ
109772011-02-19 Jakub Jelinek <jakub@redhat.com>
10978
10979 PR c/47809
10980 * c-common.c (c_fully_fold_internal): Handle VIEW_CONVERT_EXPR.
10981
0a256240
NP
109822011-02-17 Iain Sandoe <iains@gcc.gnu.org>
10983
10984 * c.opt (fobjc-abi-version=) New.
10985 (fobjc-nilcheck): New.
10986
ba9e6dd5
NF
109872011-02-03 Nathan Froyd <froydnj@codesourcery.com>
10988
10989 PR c++/46890
10990 * c-common.h (keyword_is_decl_specifier): Declare.
10991 * c-common.c (keyword_is_decl_specifier): Define.
10992 (keyword_is_function_specifier): New function.
10993
7273813a
JJ
109942011-01-26 Jakub Jelinek <jakub@redhat.com>
10995
10996 PR c/47473
10997 * c-lex.c (interpret_float): If CPP_N_IMAGINARY, ensure
10998 EXCESS_PRECISION_EXPR is created with COMPLEX_TYPE instead of
10999 REAL_TYPE.
11000
908ef79b
AC
110012011-01-26 Arnaud Charlet <charlet@adacore.com>
11002
11003 * c-ada-spec.c (dump_generic_ada_node): Avoid dereferencing null type.
11004
237e9384
JJ
110052011-01-26 Jakub Jelinek <jakub@redhat.com>
11006
11007 PR pch/47430
11008 * c-opts.c (c_common_post_options): Call c_common_no_more_pch
11009 after init_c_lex if pch_file is set.
11010
47ea1edf
DK
110112011-01-26 Dave Korn <dave.korn.cygwin@gmail.com>
11012
d4dba752 11013 PR c++/43601
47ea1edf
DK
11014 * c.opt (-fkeep-inline-dllexport): New switch.
11015
2aa9c6ae
RG
110162011-01-12 Richard Guenther <rguenther@suse.de>
11017
11018 PR middle-end/32511
11019 * c-common.c (handle_weak_attribute): Warn instead of error
11020 on declaring an inline function weak.
11021
7bd11157
TT
110222011-01-05 Tom Tromey <tromey@redhat.com>
11023
11024 * c-common.h (lvalue_error): Update.
11025 * c-common.c (lvalue_error): Add 'loc' argument. Call error_at,
11026 not error.
11027
0e66e494 110282010-12-29 Nicola Pero <nicola.pero@meta-innovation.com>
9faeb493 11029
b4f588c4
NP
11030 PR objc/47075
11031 * c-objc.h (objc_finish_message_expr): Added argument to
11032 prototype.
11033
f4da8dce
NF
110342010-12-22 Nathan Froyd <froydnj@codesourcery.com>
11035
11036 * c-common.c (handle_nonnull_attribute, handle_sentinel_attribute):
11037 Use prototype_p.
11038
46270f14
NP
110392010-12-18 Nicola Pero <nicola.pero@meta-innovation.com>
11040
11041 * c-objc.h (objc_maybe_warn_exceptions): New.
9faeb493 11042 * stub-objc.c (objc_maybe_warn_exceptions): New.
46270f14 11043
4816c593
NF
110442010-12-10 Nathan Froyd <froydnj@codesourcery.com>
11045
11046 * c-common.h (readonly_error): Declare.
11047 * c-common.c (readonly_error): Define.
11048
7a6daeb0
NF
110492010-12-09 Nathan Froyd <froydnj@codesourcery.com>
11050
11051 * c-common.h (invalid_indirection_error): Declare.
11052 * c-common.c (invalid_indirection_error): Define.
11053
892f6119
RG
110542010-12-03 Richard Guenther <rguenther@suse.de>
11055
11056 PR c/46745
11057 * c-pretty-print.c (pp_c_postfix_expression): Handle MEM_REF.
11058 (pp_c_unary_expression): Likewise.
11059 (pp_c_expression): Likewise.
11060
6c39e757
NP
110612010-11-30 Nicola Pero <nicola.pero@meta-innovation.com>
11062
11063 * c-common.h (objc_finish_function): New.
11064 (objc_non_volatilized_type): Removed.
11065 (objc_type_quals_match): Removed.
11066 * stub-objc.c (objc_finish_function): New.
11067 (objc_non_volatilized_type): Removed.
11068 (objc_type_quals_match): Removed.
9faeb493 11069
7c475d11
JM
110702010-11-30 Joseph Myers <joseph@codesourcery.com>
11071
11072 * c-common.h (parse_optimize_options): Declare.
11073 * c-cppbuiltin.c, c-format.c, c-gimplify.c, c-lex.c, c-omp.c,
11074 c-pch.c, c-pragma.c, c-semantics.c: Don't include toplev.h.
11075
71f3e391
JM
110762010-11-29 Joseph Myers <joseph@codesourcery.com>
11077
11078 * c-opts.c (check_deps_environment_vars): Use getenv instead of
11079 GET_ENVIRONMENT.
11080 * c-pch.c (O_BINARY): Don't define here.
11081 * c-pragma.h: Include "cpplib.h" instead of <cpplib.h>.
11082
d5fabb58
JM
110832010-11-25 Joseph Myers <joseph@codesourcery.com>
11084
11085 * c-cppbuiltin.c (c_cpp_builtins): Pass &global_options to
11086 targetm.except_unwind_info.
11087
299404a1
JM
110882010-11-23 Joseph Myers <joseph@codesourcery.com>
11089
11090 * c-opts.c (c_common_handle_option): Pass location to
11091 set_struct_debug_option.
11092
c98cd5bf
JM
110932010-11-23 Joseph Myers <joseph@codesourcery.com>
11094
11095 * c-common.c (visibility_options): Move from ../opts.c.
11096 * c-common.h (struct visibility_flags, visibility_options):
11097 Declare here.
11098 * c-opts.c (finish_options): Rename to c_finish_options.
11099 (c_common_init): Update call to finish_options.
11100
a9546771
NP
111012010-11-22 Nicola Pero <nicola.pero@meta-innovation.com>
11102
11103 PR objc/34033
11104 * c-lex.c (lex_string): Check that each string in an Objective-C
11105 string concat sequence starts with either one or zero '@', and
11106 that there are no spurious '@' signs at the end.
11107
24a57808
JM
111082010-11-20 Joseph Myers <joseph@codesourcery.com>
11109
11110 * c-pragma.c: Remove conditionals on HANDLE_PRAGMA_PACK,
11111 HANDLE_PRAGMA_PACK_PUSH_POP, HANDLE_PRAGMA_WEAK and
11112 HANDLE_PRAGMA_VISIBILITY.
11113 * c-pragma.h (HANDLE_PRAGMA_WEAK, HANDLE_PRAGMA_PACK,
11114 HANDLE_PRAGMA_VISIBILITY): Don't define.
11115 (HANDLE_SYSV_PRAGMA, HANDLE_PRAGMA_PACK_PUSH_POP): Don't test.
11116
a9aa2c3a
NF
111172010-11-20 Nathan Froyd <froydnj@codesourcery.com>
11118
11119 PR c++/16189
11120 PR c++/36888
11121 PR c++/45331
11122 * c-common.h (keyword_begins_type_specifier): Declare.
11123 (keyword_is_storage_class_specifier): Declare.
11124 (keyword_is_type_qualifier): Declare.
11125 * c-common.c (keyword_begins_type_specifier): New function.
11126 (keyword_is_storage_class_specifier): New function.
11127 (keyword_is_type_qualifier): Declare.
11128
5386338c
JM
111292010-11-19 Joseph Myers <joseph@codesourcery.com>
11130
11131 PR c/46547
11132 * c-common.c (in_late_binary_op): Define.
11133 (c_common_truthvalue_conversion): Check in_late_binary_op before
11134 calling c_save_expr.
11135 * c-common.h (in_late_binary_op): Declare.
11136
69ccdddb
JM
111372010-11-19 Joseph Myers <joseph@codesourcery.com>
11138
11139 * c-opts.c (c_common_handle_option): Update calls to
11140 set_struct_debug_option.
11141
6b192a09
NP
111422010-11-19 Nicola Pero <nicola.pero@meta-innovation.com>
11143
11144 * c-common.h (objc_declare_protocols): Added additional argument.
11145 * stub-objc.c (objc_declare_protocol): Same change.
9faeb493 11146
fb52b50a
NF
111472010-11-18 Nathan Froyd <froydnj@codesourcery.com>
11148
11149 PR c/33193
11150 * c-common.h (build_real_imag_expr): Declare.
11151 * c-semantics.c (build_real_imag_expr): Define.
11152
b37421c6
JM
111532010-11-17 Joseph Myers <joseph@codesourcery.com>
11154
11155 * c-opts.c (c_common_parse_file): Take no arguments.
11156 * c-common.h (c_common_parse_file): Update prototype.
11157
07078664
JJ
111582010-11-16 Jakub Jelinek <jakub@redhat.com>
11159
11160 PR c++/46401
11161 * c-common.c (warning_candidate_p): Don't track non-const calls
11162 or STRING_CSTs.
11163
c6a13190
ILT
111642010-11-15 Ian Lance Taylor <iant@google.com>
11165
11166 * c-lex.c (init_c_lex): Set macro debug callbacks if
11167 flag_dump_go_spec is set.
11168
925e8657
NP
111692010-11-15 Nicola Pero <nicola.pero@meta-innovation.com>
11170
11171 * c-common.h (objc_build_incr_expr_for_property_ref): New.
11172 * stub-objc.c (objc_build_incr_expr_for_property_ref): New.
11173
bb0a9581
NF
111742010-11-15 Nathan Froyd <froydnj@codesourcery.com>
11175
11176 PR preprocessor/45038
11177 * c-cppbuiltin.c (c_cpp_builtins): Use different format for C++
11178 dialects.
11179
c5fa0890
JM
111802010-11-12 Joseph Myers <joseph@codesourcery.com>
11181
11182 * c-common.h (c_family_lang_mask): Declare.
11183 * c-opts.c (c_family_lang_mask): Make extern.
11184 * c-pragma.c (handle_pragma_diagnostic): Use
11185 control_warning_option.
11186
a4d8c676
JM
111872010-11-12 Joseph Myers <joseph@codesourcery.com>
11188
11189 * c-common.c (parse_optimize_options): Update call to
11190 decode_options.
11191 * c-common.h (c_common_handle_option): Update prototype.
11192 * c-opts.c (c_common_handle_option): Take location_t parameter and
11193 pass it to other functions.
11194
f954bd2c
JM
111952010-11-11 Joseph Myers <joseph@codesourcery.com>
11196
11197 * c-opts.c (warning_as_error_callback): Remove.
11198 (c_common_initialize_diagnostics): Don't call
11199 register_warning_as_error_callback.
11200 (c_common_handle_option): Handle -Werror=normalized= here.
11201
d8a07487
JM
112022010-11-10 Joseph Myers <joseph@codesourcery.com>
11203
11204 * c-common.c (handle_mode_attribute): Use %' and word "signedness"
11205 in diagnostic.
11206 * c-opts.c (c_common_parse_file): Start diagnostics with lowercase
11207 letter.
11208 * c-pragma.c (handle_pragma_target, handle_pragma_optimize):
11209 Remove trailing '.' from diagnostics.
11210 * c.opt (Wwrite-strings_: Avoid '`' in help text.
11211
d5478783
JM
112122010-11-10 Joseph Myers <joseph@codesourcery.com>
11213
11214 * c-common.c (parse_optimize_options): Pass global_dc to
11215 decode_options.
11216 * c-opts.c (c_common_handle_option): Pass &global_options to
11217 set_Wstrict_aliasing.
11218 * c.opt (v): Don't mark Common or document here.
11219
91ebb981
IS
112202010-11-06 Iain Sandoe <iains@gcc.gnu.org>
11221
11222 PR target/44981
11223 * c-format.c (format_type): New type gcc_objc_string_format_type.
11224 (valid_stringptr_type_p): New.
11225 (handle_format_arg_attribute): Use valid_stringptr_type_p ().
9faeb493 11226 (check_format_string): Pass expected type, use
91ebb981
IS
11227 valid_stringptr_type_p (), check that the format string types are
11228 consistent with the format specification.
11229 (decode_format_attr): Warn if NSString is used outside objective-c.
11230 (format_types_orig): Add NSString.
11231 (format_name): New.
11232 (format_flags): New.
11233 (check_format_arg): Handle format strings requiring an external parser.
11234 first_target_format_type: New variable.
11235 (handle_format_attribute): Set up first_target_format_type, pass the
11236 expected format arg string type to check_format_string().
ab20d992 11237 * c-common.h (FMT_FLAG_PARSE_ARG_CONVERT_EXTERNAL): New flag.
91ebb981
IS
11238 * stub-objc.c (objc_string_ref_type_p): New.
11239 (objc_check_format_arg): New.
11240
bede2adc
NP
112412010-11-04 Nicola Pero <nicola.pero@meta-innovation.com>
11242
9faeb493 11243 Fixed using the Objective-C 2.0 dot-syntax with class names.
bede2adc
NP
11244 * c-common.h (objc_build_class_component_ref): New.
11245 * stub-objc.c (objc_build_class_component_ref): New.
11246
9a179d01
NP
112472010-11-03 Nicola Pero <nicola.pero@meta-innovation.com>
11248
11249 * c.opt (Wproperty-assign-default): New option.
11250
22d8d616
NP
112512010-11-03 Nicola Pero <nicola.pero@meta-innovation.com>
11252
11253 Implemented -fobjc-std=objc1 flag.
11254 * c.opt (fobjc-std=objc1): New option.
11255
2debdb4f
NP
112562010-11-01 Nicola Pero <nicola.pero@meta-innovation.com>
11257
11258 Implemented format and noreturn attributes for Objective-C methods.
11259 * c-common.c (handle_noreturn_attribute): Recognize 'noreturn'
11260 attribute for Objective-C methods.
11261
ec52b111
JM
112622010-10-31 Jason Merrill <jason@redhat.com>
11263
11264 * c-common.c (conversion_warning, warn_for_collisions_1): Use
11265 EXPR_LOC_OR_HERE.
11266
46a88c12
NP
112672010-10-30 Nicola Pero <nicola.pero@meta-innovation.com>
11268
11269 Implemented Objective-C 2.0 @property, @synthesize and @dynamic.
11270 * c-common.h (enum rid): Removed RID_COPIES and RID_IVAR.
11271 (objc_add_property_declaration): Removed arguments for copies and
11272 ivar.
11273 (objc_build_getter_call): Renamed to
11274 objc_maybe_build_component_ref.
11275 (objc_build_setter_call): Renamed to objc_maybe_build_modify_expr.
11276 (objc_is_property_ref): New.
11277 * c-common.c (c_common_reswords): Removed copies and ivar.
11278 * stub-objc.c (objc_add_property_declaration): Removed arguments
11279 for copies and ivar.
11280 (objc_build_getter_call): Renamed to
11281 objc_maybe_build_component_ref.
11282 (objc_build_setter_call): Renamed to objc_maybe_build_modify_expr.
11283 (objc_is_property_ref): New.
9faeb493 11284
1e4bf85b
AC
112852010-10-29 Arnaud Charlet <charlet@adacore.com>
11286 Matthew Gingell <gingell@adacore.com>
11287
11288 * c-ada-spec.c (separate_class_package): New function.
11289 (pp_ada_tree_identifier): Prefix references to C++ classes with the
11290 name of their enclosing package.
11291 (print_ada_declaration): Use separate_class_package.
11292
81f0bab2
JM
112932010-10-27 Jason Merrill <jason@redhat.com>
11294
2b08f2c5
JM
11295 * c-common.c (c_common_reswords): Add __is_literal_type.
11296 * c-common.h (enum rid): Add RID_IS_LITERAL_TYPE.
11297
81f0bab2
JM
11298 * c-common.c (check_case_value): Remove special C++ code.
11299
200290f2
NP
113002010-10-27 Nicola Pero <nicola.pero@meta-innovation.com>
11301
11302 * c-common.h (enum rid): Added RID_READWRITE, RID_ASSIGN,
11303 RID_RETAIN, RID_COPY and RID_NONATOMIC. Updated RID_FIRST_PATTR
11304 and RID_LAST_PATTR.
11305 (objc_add_property_declaration): Added additional arguments.
11306 (objc_property_attribute_kind): Removed.
11307 (objc_set_property_attr): Removed.
11308 * c-common.c (c_common_reswords): Added readwrite, assign, retain,
11309 copy and nonatomic.
11310 * stub-objc.c (objc_add_property_declaration): Added additional
11311 arguments.
11312 (objc_set_property_attr): Removed.
9faeb493 11313
f614132b
NP
113142010-10-27 Nicola Pero <nicola.pero@meta-innovation.com>
11315
11316 * c-common.h (objc_add_property_variable): Renamed to
11317 objc_add_property_declaration. Added location argument.
11318 * stub-objc.c (objc_add_property_variable): Same change.
b1726d6c 11319
b8a18805
NP
113202010-10-23 Nicola Pero <nicola.pero@meta-innovation.com>
11321
11322 * c-common.h (objc_maybe_printable_name): New.
11323 * stub-objc.c (objc_maybe_printable_name): New.
11324
3f8257db
JJ
113252010-10-22 Artjoms Sinkarovs <artyom.shinakroff@gmail.com>
11326 Andrew Pinski <pinskia@gmail.com>
30cd1c5d
AS
11327
11328 * c-common.h (c_common_mark_addressable_vec): Declare.
11329 * c-common.c (c_common_mark_addressable_vec): New function.
11330
249a82c4
NP
113312010-10-20 Nicola Pero <nicola.pero@meta-innovation.com>
11332
11333 * c-common.h (objc_set_method_type): Removed.
11334 (objc_add_method_declaration): Added boolean argument.
11335 (objc_start_method_definition): Same change.
11336 (objc_build_method_signature): Same change.
11337 * stub-objc.c (objc_set_method_type): Removed.
11338 (objc_add_method_declaration): Added boolean argument.
11339 (objc_start_method_definition): Same change.
11340 (objc_build_method_signature): Same change.
11341
977e30bc
NP
113422010-10-20 Nicola Pero <nicola.pero@meta-innovation.com>
11343
11344 * c-common.h (finish_file): Removed.
11345 (objc_write_global_declarations): New.
11346 * c-opts.c (c_common_parse_file): Do not call finish_file.
11347 * stub-objc.c (objc_write_global_declarations): New.
9faeb493 11348
da57d1b9
NP
113492010-10-18 Nicola Pero <nicola.pero@meta-innovation.com>
11350
11351 Implemented parsing @synthesize and @dynamic for
11352 Objective-C/Objective-C++.
11353 * c-common.h (enum rid): Add RID_AT_SYNTHESIZE and RID_AT_DYNAMIC.
11354 (objc_add_synthesize_declaration): New.
11355 (objc_add_dynamic_declaration): New.
11356 * c-common.c (c_common_reswords): Add synthesize and dynamic.
11357 * stub-objc.c (objc_add_synthesize_declaration): New.
11358 (objc_add_dynamic_declaration): New.
9faeb493 11359
0069111f
MM
113602010-10-18 Michael Meissner <meissner@linux.vnet.ibm.com>
11361
11362 PR target/46041
11363 * c-cppbuiltin.c (mode_has_fma): Move function here from
11364 builtins.c. Don't use the fma optab, instead just use the
11365 HAVE_fma* macros, so that __FP_FAST_FMA* will be defined when
11366 using -save-temps.
11367
e426b47b
NP
113682010-10-18 Nicola Pero <nicola.pero@meta-innovation.com>
11369
11370 Merge from 'apple/trunk' branch on FSF servers.
0069111f 11371
3f8257db 11372 2005-11-08 Fariborz Jahanian <fjahanian@apple.com>
e426b47b 11373
9faeb493 11374 Radar 4330422
e426b47b
NP
11375 * c-common.h (objc_non_volatilized_type): New declaration
11376 * stub-objc.c (objc_non_volatilized_type): New stub.
11377
90fbfdc3
NP
113782010-10-17 Nicola Pero <nicola.pero@meta-innovation.com>
11379
e426b47b 11380 Merge from 'apple/trunk' branch on FSF servers.
90fbfdc3 11381
ab20d992 11382 2006-03-27 Fariborz Jahanian <fjahanian@apple.com>
90fbfdc3 11383
9faeb493 11384 Radar 4133425
90fbfdc3 11385 * c-common.h (objc_diagnose_private_ivar): New decl.
0069111f 11386 * stub-objc.c (objc_diagnose_private_ivar): New stub.
90fbfdc3 11387
c37d8c30
IS
113882010-10-17 Iain Sandoe <iains@gcc.gnu.org>
11389
11390 * c-common.c (c_common_reswords): Add package, RID_AT_PACKAGE.
11391 * c-common.h (enum rid): Add RID_AT_PACKAGE.
11392 (objc_ivar_visibility_kind): New enum.
11393 (objc_set_visibility): Adjust prototype to use visibility enum.
0069111f 11394 * stub-objc.c (objc_set_visibility): Adjust stub to use
c37d8c30
IS
11395 visibility enum.
11396
1b1562a5
MM
113972010-10-14 Michael Meissner <meissner@linux.vnet.ibm.com>
11398
11399 * c-cppbuiltin.c (builtin_define_float_constants): Emit
11400 __FP_FAST_FMA, __FP_FAST_FMAF, and __FP_FAST_FMAL if the machine
11401 has the appropriate fma builtins.
11402 (c_cpp_builtins): Adjust call to builtin_define_float_constants.
11403
668ea4b1
IS
114042010-10-14 Iain Sandoe <iains@gcc.gnu.org>
11405
1b1562a5 11406 merge from FSF apple 'trunk' branch.
3f8257db 11407 2006 Fariborz Jahanian <fjahanian@apple.com>
1b1562a5 11408
668ea4b1
IS
11409 Radars 4436866, 4505126, 4506903, 4517826
11410 * c-common.c (c_common_resword): Define @property and its attributes.
11411 * c-common.h: Define property attribute enum entries.
11412 (OBJC_IS_PATTR_KEYWORD): New.
11413 (objc_property_attribute_kind): New enum.
11414 Declare objc_set_property_attr (), objc_add_property_variable (),
11415 objc_build_getter_call () and objc_build_setter_call ().
11416 * stub-objc.c (objc_set_property_attr): New stub.
11417 (objc_add_property_variable): Likewise.
11418 (objc_build_getter_call): Likewise.
11419 (objc_build_setter_call) Likewise.
1b1562a5 11420
a1178b30
IS
114212010-10-13 Iain Sandoe <iains@gcc.gnu.org>
11422
1b1562a5 11423 merge from FSF apple 'trunk' branch.
ab20d992 11424 2006-04-26 Fariborz Jahanian <fjahanian@apple.com>
a1178b30
IS
11425
11426 Radar 3803157 (method attributes)
11427 * c-common.c (handle_deprecated_attribute): Recognize
11428 objc methods as valid declarations.
11429 * c-common.h: Declare objc_method_decl ().
1b1562a5 11430 * stub-objc.c (objc_method_decl): New stub.
a1178b30 11431
a75bfaa6
JM
114322010-10-08 Joseph Myers <joseph@codesourcery.com>
11433
11434 * c-common.c (parse_optimize_options): Call
11435 decode_cmdline_options_to_array_default_mask before
11436 decode_options. Update arguments to decode_options.
11437 * c-common.h (c_common_init_options_struct): Declare.
11438 * c-opts.c (c_common_init_options_struct): New. Split out from
11439 c_common_init_options.
11440
f05b9d93
NP
114412010-10-06 Nicola Pero <nicola.pero@meta-innovation.com>
11442
11443 Implemented fast enumeration for Objective-C.
11444 * c-common.h (objc_finish_foreach_loop): New.
11445 * stub-objc.c (objc_finish_foreach_loop): New.
11446
1ebe4b4f
JM
114472010-10-05 Joseph Myers <joseph@codesourcery.com>
11448
11449 * c-common.h (struct diagnostic_context): Don't declare here.
11450 (c_common_initialize_diagnostics): Declare using
11451 diagnostic_context typedef.
11452 * c-opts.c (c_common_handle_option): Pass global_dc to
11453 handle_generated_option.
11454
d4d24ba4
JM
114552010-10-04 Joseph Myers <joseph@codesourcery.com>
11456
11457 * c-opts.c (c_common_handle_option): Pass &global_options_set to
11458 handle_generated_option.
11459
478a1c5b
ILT
114602010-10-03 Ian Lance Taylor <iant@google.com>
11461
11462 * c.opt (-fplan9-extensions): New option.
11463
82a1c2fe
FXC
114642010-10-03 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
11465
11466 * c-cppbuiltin.c (define__GNUC__, builtin_define_type_precision):
11467 Remove.
11468 (c_cpp_builtins): Call functions from cppbuiltin.c instead
11469 of duplicating code.
11470
92902b1b
IS
114712010-09-30 Iain Sandoe <iains@gcc.gnu.org>
11472
11473 * c-common.c: Add two new entries for @optional
11474 and @required keywords.
11475
11476 merge from FSF 'apple/trunk' branch.
3f8257db 11477 2006-01-30 Fariborz Jahanian <fjahanian@apple.com>
92902b1b
IS
11478
11479 Radar 4386773
11480 * c-common.h (RID_AT_OPTIONAL, RID_AT_REQUIRED): Two new
11481 objective-c keywords.
11482 (objc_set_method_opt): New declaration.
11483 * stub-objc.c (objc_set_method_opt): New stub.
9faeb493 11484
46625112
JM
114852010-09-30 Joseph Myers <joseph@codesourcery.com>
11486
11487 * c-common.c (handle_optimize_attribute): Pass &global_options to
11488 cl_optimization_save and cl_optimization_restore.
11489 * c-opts.c (c_common_handle_option): Pass &global_options to
11490 handle_generated_option.
11491 * c-pragma.c (handle_pragma_diagnostic): Use option_flag_var.
11492 (handle_pragma_pop_options, handle_pragma_reset_options): Pass
11493 &global_options to cl_optimization_restore.
11494
49b91f05
NP
114952010-09-30 Nicola Pero <nicola.pero@meta-innovation.com>
11496
11497 * c-lex.c (c_lex_with_flags): Updated comments for CPP_AT_NAME
11498 Objective-C/Objective-C++ keywords.
11499
13ed556f 115002010-09-29 Nicola Pero <nicola.pero@meta-innovation.com>
a6341d57 11501
9faeb493
UB
11502 Merge from 'apple/trunk' branch on FSF servers.
11503
3f8257db 11504 2005-10-04 Fariborz Jahanian <fjahanian@apple.com>
a6341d57
NP
11505
11506 Radar 4281748
11507 * c-common.h (objc_check_global_decl): New declaration.
11508 * stub-objc.c (objc_check_global_decl): New stub.
11509
f0036cca
JM
115102010-09-29 Joseph Myers <joseph@codesourcery.com>
11511
11512 * c.opt: Don't use VarExists.
11513
e3339d0f
JM
115142010-09-29 Joseph Myers <joseph@codesourcery.com>
11515
11516 * c-common.c (c_cpp_error): Update names of diagnostic_context
11517 members.
11518 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Update names of
11519 cl_optimization members.
11520 * c-opts.c (warning_as_error_callback, c_common_handle_option,
11521 sanitize_cpp_opts, finish_options): Update names of cpp_options
11522 members.
11523
1973201f
NP
115242010-09-29 Nicola Pero <nicola.pero@meta-innovation.com>
11525
11526 * c-common.h (OBJC_IS_CXX_KEYWORD): New macro. Updated comments.
11527 (objc_is_reserved_word): Removed.
11528 * c-common.c: Updated comments.
11529 * c-lex.c (c_lex_with_flags): Use OBJC_IS_CXX_KEYWORD instead of
11530 objc_is_reserved_word.
11531 * stub-objc.c (objc_is_reserved_word): Removed.
11532
f7e71da5
IS
115332010-09-28 Iain Sandoe <iains@gcc.gnu.org>
11534
9faeb493 11535 * c-common.h (objc_add_method_declaration): Adjust prototype to
f7e71da5
IS
11536 include attributes.
11537 (objc_start_method_definition): Likewise.
11538 (objc_build_keyword_decl): Likewise.
11539 * stub-objc.c:(objc_add_method_declaration): Handle attributes.
11540 (objc_start_method_definition): Likewise.
11541 (objc_build_keyword_decl): Likewise.
11542
c165dca7
IS
115432010-09-28 Iain Sandoe <iains@gcc.gnu.org>
11544
11545 * c-common.h (objc_start_class_interface): Adjust prototype.
11546 (objc_start_category_interface): Likewise.
11547 (objc_start_protocol): Likewise.
11548 * stub-objc.c (objc_start_protocol): Adjust for extra argument.
11549 (objc_start_class_interface): Likewise.
11550 (objc_start_category_interface): Likewise.
11551
7458026b
ILT
115522010-09-27 Ian Lance Taylor <iant@google.com>
11553
11554 * c-common.c (c_common_attribute_table): Add no_split_stack.
11555 (handle_no_split_stack_attribute): New static function.
11556
b581b85b
NP
115572010-09-27 Nicola Pero <nicola.pero@meta-innovation.com>
11558
9faeb493 11559 Merge from 'apple/trunk' branch on FSF servers.
b581b85b 11560
3f8257db 11561 2005-12-15 Fariborz Jahanian <fjahanian@apple.com>
b581b85b 11562
9faeb493 11563 Radar 4229905
b581b85b
NP
11564 * c-common.h (objc_have_common_type): New declaration.
11565 * stub-objc.c (objc_have_common_type): New stub.
11566
11567 2005-06-22 Ziemowit Laski <zlaski@apple.com>
11568
11569 Radar 4154928
11570 * c-common.h (objc_common_type): New prototype.
9faeb493 11571 * stub-objc.c (objc_common_type): New stub.
b581b85b 11572
46a4da10
JH
115732010-09-24 Jan Hubicka <jh@suse.cz>
11574
11575 * c-common.c (handle_leaf_attribute): New function.
11576 (struct attribute_spec c_common_att): Add leaf.
11577
e200444e
JM
115782010-09-22 Joseph Myers <joseph@codesourcery.com>
11579
11580 * c.opt (-all-warnings, -ansi, -assert, -assert=, -comments,
11581 -comments-in-macros, -define-macro, -define-macro=, -dependencies,
11582 -dump, -dump=, -imacros, -imacros=, -include, -include=,
11583 -include-barrier, -include-directory, -include-directory=,
11584 -include-directory-after, -include-directory-after=,
11585 -include-prefix, -include-prefix=, -include-with-prefix,
11586 -include-with-prefix=, -include-with-prefix-after,
11587 -include-with-prefix-after=, -include-with-prefix-before,
11588 -include-with-prefix-before=, -no-integrated-cpp,
11589 -no-line-commands, -no-standard-includes, -no-warnings, -output,
11590 -output=, -pedantic, -pedantic-errors, -preprocess,
11591 -print-missing-file-dependencies, -trace-includes, -traditional,
11592 -traditional-cpp, -trigraphs, -undefine-macro, -undefine-macro=,
11593 -user-dependencies, -verbose, -write-dependencies,
11594 -write-user-dependencies, no-integrated-cpp, traditional): New.
11595
29a80ea6
NP
115962010-09-21 Nicola Pero <nicola.pero@meta-innovation.com>
11597
11598 PR objc/23710
ac1fc2fc
NP
11599 * c-common.h (objc_start_method_definition): Return bool instead
11600 of void.
11601 * stub-objc.c (objc_start_method_definition): Return bool instead
11602 of void.
11603
116042010-09-21 Nicola Pero <nicola.pero@meta-innovation.com>
11605
11606 PR objc/25965
11607 * c-common.h (objc_get_interface_ivars): New declaration.
11608 * stub-objc.c (objc_get_interface_ivars): New stub.
29a80ea6 11609
de621752
ILT
116102010-09-15 Ian Lance Taylor <iant@google.com>
11611
11612 * c-common.c (parse_optimize_options): Do not capitalize warning
06730c5d 11613 messages. Remove period at end of warning message.
de621752 11614
ba885ec5
NS
116152010-09-09 Nathan Sidwell <nathan@codesourcery.com>
11616
11617 * c-common.c (handle_alias_ifunc_attribute): New, broken out of ...
11618 (handle_alias_attribute): ... here.
11619 (handle_ifunc_attribute): New.
11620
c5ee1358
MM
116212010-09-06 Mark Mitchell <mark@codesourcery.com>
11622
11623 * c-common.h (do_warn_double_promotion): Declare.
11624 * c-common.c (do_warn_double_promotion): Define.
11625
0a0b3574
MM
116262010-09-05 Mark Mitchell <mark@codesourcery.com>
11627
11628 * c.opt (Wdouble-promotion): New.
11629
d1779886
JM
116302010-09-02 Joseph Myers <joseph@codesourcery.com>
11631
11632 * c.opt (falt-external-templates, fhuge-objects, fvtable-gc,
11633 fvtable-thunks, fxref): Mark no longer supported in help text.
11634
2d2bd949
JM
116352010-09-02 Joseph Myers <joseph@codesourcery.com>
11636
11637 * c.opt (Wimport, fall-virtual, falt-external-templates,
11638 fdefault-inline, fenum-int-equiv, fexternal-templates,
11639 fguiding-decls, fhonor-std, fhuge-objects, flabels-ok,
11640 fname-mangling-version-, fnew-abi, fnonnull-objects,
11641 foptional-diags, fsquangle, fstrict-prototype, fthis-is-variable,
11642 fvtable-gc, fvtable-thunks, fxref): Mark with Ignore and Warn as
11643 applicable.
11644 (fhandle-exceptions): Mark with Alias and Warn.
11645 * c-opts.c (c_common_handle_option): Don't handle options marked
11646 as ignored.
11647
5de8299c
JM
116482010-09-02 Joseph Myers <joseph@codesourcery.com>
11649
11650 * c.opt (Wcomments, Werror-implicit-function-declaration,
11651 ftemplate-depth-, std=c89, std=c9x, std=gnu89, std=gnu9x,
11652 std=iso9899:1990, std=iso9899:1999, std=iso9899:199x): Mark as
11653 aliases.
11654 * c-common.c (option_codes): Use OPT_Wcomment instead of
11655 OPT_Wcomments.
11656 * c-opts.c (warning_as_error_callback, c_common_handle_option):
11657 Don't handle options marked as aliases.
11658
0ceb0201
RG
116592010-08-25 Richard Guenther <rguenther@suse.de>
11660
11661 * c-common.c (c_common_get_alias_set): Remove special
11662 handling for pointers.
11663
ac47786e
NF
116642010-08-20 Nathan Froyd <froydnj@codesourcery.com>
11665
11666 * c-common.c: Use FOR_EACH_VEC_ELT.
11667 * c-gimplify.c: Likewise.
11668 * c-pragma.c: Likewise.
11669
c878765b
JM
116702010-08-16 Joseph Myers <joseph@codesourcery.com>
11671
11672 * c.opt (MDX): Change back to MD. Mark NoDriverArg instead of
11673 RejectDriver.
11674 (MMDX): Change back to MMD. Mark NoDriverArg instead of
11675 RejectDriver.
11676 * c-opts.c (c_common_handle_option): Use OPT_MD and OPT_MMD
11677 instead of OPT_MDX and OPT_MMDX.
11678
603349bf
JM
116792010-08-16 Joseph Myers <joseph@codesourcery.com>
11680
11681 * c.opt (MDX, MMDX, lang-asm): Mark RejectDriver.
11682
644fa7ac
JM
116832010-08-12 Joseph Myers <joseph@codesourcery.com>
11684
11685 * c.opt (MD, MMD): Change to MDX and MMDX.
11686 * c-opts.c (c_common_handle_option): Use OPT_MMD and OPT_MMDX.
11687
481e1176
JM
116882010-08-11 Joseph Myers <joseph@codesourcery.com>
11689
11690 * c-opts.c (c_common_handle_option): Call handle_generated_option
11691 instead of handle_option.
11692
ac8dc9f7
NF
116932010-08-08 Nathan Froyd <froydnj@codesourcery.com>
11694
11695 * c-pragma.c (add_to_renaming_pragma_list): Fix call to VEC_safe_push.
11696 (maybe_apply_renaming_pragma): Delete unneeded declarations.
11697
4f8c876d
NF
116982010-08-08 Nathan Froyd <froydnj@codesourcery.com>
11699
11700 * c-pragma.c (pending_redefinition): Declare. Declare a VEC of it.
11701 (pending_redefine_extname): Change type to a VEC.
11702 (add_to_renaming_pragma_list): Update for new type of
11703 pending_redefine_extname.
ac8dc9f7 11704 (maybe_apply_renaming_pragma): Likewise.
4f8c876d 11705
3b0c690e
AC
117062010-08-04 Arnaud Charlet <charlet@adacore.com>
11707
11708 * c-ada-spec.c (dump_ada_template): Mark underlying instance type as
11709 visited.
11710 (dump_generic_ada_node): Code clean up. Use TREE_VISITED flag to
11711 decide whether a type has already been declared/seen.
11712 Do not go to the original type.
11713 (dump_nested_types): New parameter forward.
11714 Generate forward declaration if needed and mark type as visited.
11715 (print_ada_declaration): Call dump_nested_types if not already done.
11716 Mark types as visited.
11717
1890bccc
JM
117182010-08-03 Joseph Myers <joseph@codesourcery.com>
11719
11720 * c.opt (-print-pch-checksum): Remove option.
11721 * c-opts.c (c_common_handle_option): Don't handle
11722 OPT_print_pch_checksum.
11723
5f20c657
JM
117242010-07-27 Joseph Myers <joseph@codesourcery.com>
11725
11726 * c-common.h (c_common_handle_option): Update prototype and return
11727 value type.
11728 * c-opts.c (c_common_handle_option): Update prototype and return
11729 value type. Update calls to handle_option and
11730 enable_warning_as_error.
11731
f551f80c
JJ
117322010-07-27 Jakub Jelinek <jakub@redhat.com>
11733
11734 PR c/45079
11735 * c-pretty-print.c (pp_c_expression): Handle C_MAYBE_CONST_EXPR.
11736
61ff2bdc
JM
117372010-07-27 Joseph Myers <joseph@codesourcery.com>
11738
11739 * c-common.h (c_common_missing_argument): Remove.
11740 * c-opts.c (c_common_missing_argument): Remove.
11741 * c.opt (A, D, F, I, MD, MMD, MQ, MT, U, fconstant-string-class=,
11742 idirafter, imacros, include, isysroot, isystem, iquote): Add
11743 MissingArgError.
11744 * c-objc-common.h (LANG_HOOKS_MISSING_ARGUMENT): Remove.
11745
7a9bf9a4
JM
117462010-07-27 Joseph Myers <joseph@codesourcery.com>
11747
11748 * c-common.h (c_common_option_lang_mask,
11749 c_common_initialize_diagnostics, c_common_complain_wrong_lang_p):
11750 New.
11751 (c_common_init_options): Update prototype.
11752 * c-opts.c (c_common_option_lang_mask): New.
11753 (c_common_initialize_diagnostics): Split out of
11754 c_common_init_options.
11755 (accept_all_c_family_options, c_common_complain_wrong_lang_p):
11756 New.
11757 (c_common_init_options): Update prototype. Use decoded options in
11758 search for -lang-asm.
11759
910ad8de
NF
117602010-07-15 Nathan Froyd <froydnj@codesourcery.com>
11761
11762 * c-common.c: Carefully replace TREE_CHAIN with DECL_CHAIN.
11763 * c-format.c: Likewise.
11764
718f9c0f
MLI
117652010-07-08 Manuel López-Ibáñez <manu@gcc.gnu.org>
11766
11767 * c-common.h: Include diagnostic-core.h. Error if already
11768 included.
11769 * c-semantics.c: Do not define GCC_DIAG_STYLE here.
11770
4d451982
MLI
117712010-07-03 Manuel López-Ibáñez <manu@gcc.gnu.org>
11772
adfac8df 11773 * c-common.c (IN_GCC_FRONTEND): Do not undef.
4d451982
MLI
11774 Do not include expr.h
11775 (vector_mode_valid_p): Move here.
11776
119fe915
SB
117772010-06-21 DJ Delorie <dj@redhat.com>
11778
11779 * c-pragma.c (handle_pragma_diagnostic): Add push/pop,
11780 allow these pragmas anywhere.
11781
117822010-06-14 Jakub Jelinek <jakub@redhat.com>
11783
11784 PR bootstrap/44509
11785 * c-cppbuiltin.c: Include gt-c-family-c-cppbuiltin.h.
11786 (lazy_hex_fp_values, lazy_hex_fp_value_count): Add GTY(()) markers.
11787 (lazy_hex_fp_value, builtin_define_with_hex_fp_value): Use
11788 ggc_strdup instead of xstrdup.
11789
117902010-06-10 Jakub Jelinek <jakub@redhat.com>
11791
11792 * c-cppbuiltin.c: Include cpp-id-data.h.
11793 (lazy_hex_fp_values, lazy_hex_fp_value_count): New variables.
11794 (lazy_hex_fp_value): New function.
11795 (builtin_define_with_hex_fp_value): Provide definitions lazily.
11796
6662d794
MLI
117972010-06-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
11798
11799 * c-gimplify.c: Do not include tree-flow.h
11800
38f8b050
JR
118012010-06-29 Joern Rennecke <joern.rennecke@embecosm.com>
11802
11803 PR other/44034
11804 * c-common.c: Rename targetm member:
11805 targetm.enum_va_list -> targetm.enum_va_list_p
11806
9589f23e
AS
118072010-06-28 Anatoly Sokolov <aesok@post.ru>
11808
11809 * c-common.c (shorten_compare): Adjust call to force_fit_type_double.
11810
3b06d379
SB
118112010-06-28 Steven Bosscher <steven@gcc.gnu.org>
11812
11813 * c-cppbuiltin.c: Do not include except.h.
11814
d166d4c3
AK
118152010-06-24 Andi Kleen <ak@linux.intel.com>
11816
9faeb493
UB
11817 * c-common.c (warn_for_omitted_condop): New.
11818 * c-common.h (warn_for_omitted_condop): Add prototype.
d166d4c3 11819
70cb8be6
JM
118202010-06-21 Joseph Myers <joseph@codesourcery.com>
11821
11822 * c.opt (lang-objc): Remove.
11823 * c-opts.c (c_common_handle_option): Don't handle OPT_lang_objc.
11824
a4c97feb
JR
118252010-06-21 Joern Rennecke <joern.rennecke@embecosm.com>
11826
11827 * c-opts.c: Include "tm_p.h".
11828
6e2f1956
JM
118292010-06-20 Joseph Myers <joseph@codesourcery.com>
11830
11831 * c-common.c (parse_optimize_options): Update call to
11832 decode_options.
11833
bc87224e
NF
118342010-06-18 Nathan Froyd <froydnj@codesourcery.com>
11835
11836 * c-common.c (record_types_used_by_current_var_decl): Adjust for
11837 new type of types_used_by_cur_var_decl.
11838
b49cf425
JR
118392010-06-17 Joern Rennecke <joern.rennecke@embecosm.com>
11840
11841 PR bootstrap/44512
11842 * c-cppbuiltin.c (builtin_define_with_hex_fp_value): Add cast
11843 for C++ standard compliance.
11844
59f9c2ed
JM
118452010-06-16 Jason Merrill <jason@redhat.com>
11846
11847 * c.opt: Add -Wnoexcept.
11848
33766b66
RG
118492010-06-16 Richard Guenther <rguenther@suse.de>
11850
11851 PR c/44555
11852 * c-common.c (c_common_truthvalue_conversion): Remove
11853 premature and wrong optimization concering ADDR_EXPRs.
11854
eff7e30c
AC
118552010-06-15 Arnaud Charlet <charlet@adacore.com>
11856
11857 * c-ada-spec.c (dump_sloc): Remove column info.
11858 (is_simple_enum): New function.
11859 (dump_generic_ada_node, print_ada_declaration): Map C enum types to Ada
11860 enum types when relevant.
11861
6312e84d
MLI
118622010-06-11 Manuel López-Ibáñez <manu@gcc.gnu.org>
11863
9faeb493 11864 * c-common.c (conversion_warning): Warn at expression
6312e84d
MLI
11865 location.
11866
1cb42611
JM
118672010-06-10 Joseph Myers <joseph@codesourcery.com>
11868
11869 * c-opts.c (c_common_handle_option): Don't handle
11870 OPT_fshow_column.
11871
a9429e29
LB
118722010-06-08 Laurynas Biveinis <laurynas.biveinis@gmail.com>
11873
11874 * c-pragma.c (push_alignment): Use typed GC allocation.
11875 (handle_pragma_push_options): Likewise.
11876
11877 * c-common.c (parse_optimize_options): Likewise.
11878
11879 * c-common.h (struct sorted_fields_type): Add variable_size GTY
11880 option.
11881
5498f011
JM
118822010-06-07 Joseph Myers <joseph@codesourcery.com>
11883
11884 * c-common.c (flag_preprocess_only, flag_undef, flag_no_builtin,
11885 flag_no_nonansi_builtin, flag_short_double, flag_short_wchar,
11886 flag_lax_vector_conversions, flag_ms_extensions, flag_no_asm,
11887 flag_signed_bitfields, warn_strict_null_sentinel,
11888 flag_nil_receivers, flag_zero_link, flag_replace_objc_classes,
11889 flag_gen_declaration, flag_no_gnu_keywords,
11890 flag_implement_inlines, flag_implicit_templates,
11891 flag_implicit_inline_templates, flag_optional_diags,
11892 flag_elide_constructors, flag_default_inline, flag_rtti,
11893 flag_conserve_space, flag_access_control, flag_check_new,
11894 flag_new_for_scope, flag_weak, flag_working_directory,
11895 flag_use_cxa_atexit, flag_use_cxa_get_exception_ptr,
11896 flag_enforce_eh_specs, flag_threadsafe_statics,
11897 flag_pretty_templates): Remove.
11898 * c-common.h (flag_preprocess_only, flag_nil_receivers,
11899 flag_objc_exceptions, flag_objc_sjlj_exceptions, flag_zero_link,
11900 flag_replace_objc_classes, flag_undef, flag_no_builtin,
11901 flag_no_nonansi_builtin, flag_short_double, flag_short_wchar,
11902 flag_lax_vector_conversions, flag_ms_extensions, flag_no_asm,
11903 flag_const_strings, flag_signed_bitfields, flag_gen_declaration,
11904 flag_no_gnu_keywords, flag_implement_inlines,
11905 flag_implicit_templates, flag_implicit_inline_templates,
11906 flag_optional_diags, flag_elide_constructors, flag_default_inline,
11907 flag_rtti, flag_conserve_space, flag_access_control,
11908 flag_check_new, flag_new_for_scope, flag_weak,
11909 flag_working_directory, flag_use_cxa_atexit,
11910 flag_use_cxa_get_exception_ptr, flag_enforce_eh_specs,
11911 flag_threadsafe_statics, flag_pretty_templates,
11912 warn_strict_null_sentinel): Remove.
11913 * c.opt (E, Wstrict-null-sentinel, faccess-control, fasm,
11914 fbuiltin, fcheck-new, fconserve-space, felide-constructors,
11915 fenforce-eh-specs, ffor-scope, fgnu-keywords, fimplement-inlines,
11916 fimplicit-inline-templates, fimplicit-templates,
11917 flax-vector-conversions, fms-extensions, fnil-receivers,
11918 fnonansi-builtins, fpretty-templates, freplace-objc-classes,
11919 frtti, fshort-double, fshort-enums, fshort-wchar,
11920 fsigned-bitfields, fsigned-char, fstats, fthreadsafe-statics,
11921 funsigned-bitfields, funsigned-char, fuse-cxa-atexit,
11922 fuse-cxa-get-exception-ptr, fweak, fworking-directory, fzero-link,
11923 gen-decls, undef): Use Var.
11924 (fdefault-inline, foptional-diags): Document as doing nothing.
11925 * c-opts.c (c_common_handle_option): Remove cases for options now
11926 using Var. Mark ignored options as such.
11927
39dabefd
SB
119282010-06-05 Steven Bosscher <steven@gcc.gnu.org>
11929
9faeb493 11930 * c-common.c: Moved to here from parent directory.
39dabefd
SB
11931 * c-common.def: Likewise.
11932 * c-common.h: Likewise.
11933 * c-cppbuiltin.c: Likewise.
11934 * c-dump.c: Likewise.
11935 * c-format.c: Likewise.
11936 * c-format.h : Likewise.
11937 * c-gimplify.c: Likewise.
11938 * c-lex.c: Likewise.
11939 * c-omp.c: Likewise.
11940 * c.opt: Likewise.
11941 * c-opts.c: Likewise.
11942 * c-pch.c: Likewise.
11943 * c-ppoutput.c: Likewise.
11944 * c-pragma.c: Likewise.
11945 * c-pragma.h: Likewise.
11946 * c-pretty-print.c: Likewise.
11947 * c-pretty-print.h: Likewise.
11948 * c-semantics.c: Likewise.
11949 * stub-objc.c: Likewise.
11950
11951 * c-common.c: Include gt-c-family-c-common.h.
11952 * c-pragma.c: Include gt-c-family-c-pragma.h.
11953\f
c48514be 11954Copyright (C) 2010-2021 Free Software Foundation, Inc.
39dabefd
SB
11955
11956Copying and distribution of this file, with or without modification,
11957are permitted in any medium without royalty provided the copyright
11958notice and this notice are preserved.