]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/c-family/ChangeLog
PR middle-end/100574 - ICE in size_remaining, at builtins.c
[thirdparty/gcc.git] / gcc / c-family / ChangeLog
CommitLineData
037e3661
GA
12021-05-11 Joseph Myers <joseph@codesourcery.com>
2
3 * c-lex.c (interpret_float): Handle digit separators for C2X.
4
aa891c56
GA
52021-05-10 Martin Liska <mliska@suse.cz>
6
7 * c-ada-spec.c (print_destructor): Use startswith
8 function instead of strncmp.
9 (dump_ada_declaration): Likewise.
10 * c-common.c (disable_builtin_function): Likewise.
11 (def_builtin_1): Likewise.
12 * c-format.c (check_tokens): Likewise.
13 (check_plain): Likewise.
14 (convert_format_name_to_system_name): Likewise.
15
e4ff4ffb
GA
162021-04-28 Patrick McGehearty <patrick.mcgehearty@oracle.com>
17
18 * c-cppbuiltin.c (c_cpp_builtins): Add supporting macros for new
19 complex divide
20
c0fa3f2f
GA
212021-04-26 Thomas Schwinge <thomas@codesourcery.com>
22 Nathan Sidwell <nathan@codesourcery.com>
23 Tom de Vries <vries@codesourcery.com>
24 Julian Brown <julian@codesourcery.com>
25 Kwok Cheung Yeung <kcy@codesourcery.com>
26
27 * c.opt (Wopenacc-parallelism): New.
28
6e81e015
GA
292021-04-19 Thomas Schwinge <thomas@codesourcery.com>
30
31 * c.opt (fopenacc-kernels=): Remove.
32
019a9220
GA
332021-04-08 Jakub Jelinek <jakub@redhat.com>
34
35 * c-warn.c (do_warn_double_promotion): Fix comment typo,
36 occured -> occurred.
37 (check_alignment_of_packed_member): Fix a comment typo,
38 memeber -> member.
39 (warn_parm_ptrarray_mismatch): Fix comment typos, os -> of
40 and onless -> unless.
41 (warn_parm_array_mismatch): Fix comment typos, declaratation
42 -> declaration and woud -> would. Fix up comment indentation.
43
442021-04-08 Martin Sebor <msebor@redhat.com>
45
46 PR middle-end/99883
47 * c.opt (Wmismatched-new-delete): Correct spelling.
48
b1da9916
GA
492021-04-05 Eric Botcazou <ebotcazou@adacore.com>
50
51 * c-ada-spec.c (is_simple_enum): Minor tweaks.
52 (dump_ada_enum_type): Add TYPE and PARENT parameters. For non-simple
53 enumeral types use again the type name for the enumeration constants.
54 (dump_ada_node): Adjust call to dump_ada_enum_type.
55 (dump_nested_type): Likewise.
56
f1607029
GA
572021-04-01 Jason Merrill <jason@redhat.com>
58
59 PR c++/98481
60 * c-opts.c (c_common_post_options): Bump latest_abi_version.
61
4493b1c1
GA
622021-03-25 Jakub Jelinek <jakub@redhat.com>
63
64 PR c++/99565
65 * c-warn.c (do_warn_duplicated_branches): Pass also
66 OEP_ADDRESS_OF_SAME_FIELD to operand_equal_p.
67
6af7b307
GA
682021-03-20 Jakub Jelinek <jakub@redhat.com>
69
70 PR debug/99230
71 * c-gimplify.c (c_genericize_control_stmt): Handle STATEMENT_LIST.
72
ceae9533
GA
732021-03-05 Eric Botcazou <ebotcazou@adacore.com>
74
75 * c-ada-spec.c (dump_ada_declaration) <TYPE_DECL>: Dump nested types
76 after entering the separate class package, if any.
77
67f10d28
GA
782021-03-04 Richard Biener <rguenther@suse.de>
79
80 * c-pretty-print.c (c_pretty_printer::direct_abstract_declarator):
81 Handle ERROR_MARK.
82
832021-03-04 Jakub Jelinek <jakub@redhat.com>
84
85 PR c/99325
86 * c-ppoutput.c (print): Change src_line type from int to unsigned.
87 (token_streamer::stream) Likewise.
88 (maybe_print_line_1): Likewise. Don't strcmp src_file if src_loc is
89 UNKNOWN_LOCATION.
90
f3641ac7
GA
912021-03-03 Jakub Jelinek <jakub@redhat.com>
92
93 PR c/99324
94 * c-common.c (build_va_arg): Call c_common_mark_addressable_vec
95 instead of mark_addressable. Fix a comment typo -
96 neutrallly -> neutrally.
97
2c83c3fb
GA
982021-02-28 Jakub Jelinek <jakub@redhat.com>
99
100 PR c/99304
101 * c-attribs.c (handle_malloc_attribute): Fix a typo in inform
102 message - refernced -> referenced. Remove superfluous space before
103 closing paren of function calls.
104
daa68844
GA
1052021-02-25 Nathan Sidwell <nathan@acm.org>
106
107 PR c++/99166
108 * c.opt (-flang-info-module-cmi): Renamed option.
109
50352c6c
GA
1102021-02-19 Nathan Sidwell <nathan@acm.org>
111
112 * c.opt (flang-info-module-read, flang-info-module-read=): New.
113
bf81237e
GA
1142021-02-18 H.J. Lu <hjl.tools@gmail.com>
115
116 PR target/99113
117 * c-attribs.c (c_common_attribute_table): Add the "retain"
118 attribute.
119 (handle_retain_attribute): New function.
120
0e804ce3
GA
1212021-02-16 Marek Polacek <polacek@redhat.com>
122
123 PR c++/99062
124 * c-attribs.c (handle_assume_aligned_attribute): Check that the
125 alignment argument is non-negative. Tweak a warning message.
126
fab095da
GA
1272021-02-12 Martin Sebor <msebor@redhat.com>
128
129 PR c/99055
130 * c-warn.c (warn_parm_array_mismatch): Free strings returned from
131 print_generic_expr_to_str.
132
4b37c3ea
GA
1332021-02-10 Richard Biener <rguenther@suse.de>
134
135 * c-common.c (parse_optimize_options): Free decoded_options.
136
a19dd5e6
GA
1372021-02-04 emsr <3dw4rd@verizon.net>
138
139 * c-cppbuiltin.c (c_cpp_builtins): __cpp_size_t_suffix=202011L.
140
9faaa807
GA
1412021-02-03 Ed Smith-Rowland <3dw4rd@verizon.net>
142
143 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_size_t_suffix.
144 * c-lex.c (interpret_integer): Set node type for size literal.
145
85d04a2e
GA
1462021-01-28 Jakub Jelinek <jakub@redhat.com>
147
148 * c.opt (-std=c++2a, -std=c++20, -std=gnu++2a, -std=gnu++20): Remove
149 draft from description.
150 (-std=c++2b): Fix a pasto, 2020 -> 2023.
151
e62bb7f0
GA
1522021-01-26 Paul Fee <paul.f.fee@gmail.com>
153
154 * c-common.h (cxx_dialect): Add cxx23 as a dialect.
155 * c.opt: Add options for -std=c++23, std=c++2b, -std=gnu++23
156 and -std=gnu++2b
157 * c-opts.c (set_std_cxx23): New.
158 (c_common_handle_option): Set options when -std=c++23 is enabled.
159 (c_common_post_options): Adjust comments.
160 (set_std_cxx20): Likewise.
161
161e4c08
GA
1622021-01-25 Martin Sebor <msebor@redhat.com>
163
164 PR c++/98646
165 * c-common.c (check_nonnull_arg): Adjust warning text.
166
4c9bcd5c
GA
1672021-01-17 Martin Sebor <msebor@redhat.com>
168
169 * c-pretty-print.c (c_pretty_printer::primary_expression): Don't
170 assume SSA_NAME_IDENTIFIER evaluates to nonzero.
171
59cf67d1
GA
1722021-01-16 Kwok Cheung Yeung <kcy@codesourcery.com>
173
174 * c-pragma.h (pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_DETACH.
175 Redefine PRAGMA_OACC_CLAUSE_DETACH.
176
2f7f0d32
GA
1772021-01-15 Jakub Jelinek <jakub@redhat.com>
178
179 PR tree-optimization/98597
180 * c-pretty-print.c: Include options.h.
181 (c_fold_indirect_ref_for_warn): New function.
182 (print_mem_ref): Use it. If it returns something that has compatible
183 type and is TBAA compatible with zero offset, print it and return,
184 otherwise print it using offsetof syntax or array ref syntax. Fix up
185 printing if MEM_REFs first operand is ADDR_EXPR, or when the first
186 argument has pointer to array type. Print pointers using the standard
187 formatting.
188
6851dda2
GA
1892021-01-12 Martin Sebor <msebor@redhat.com>
190
191 PR c/98597
192 PR c/98592
193 * c-pretty-print.c (print_mem_ref): Avoid assuming MEM_REF operand
194 has pointer type. Remove redundant code. Avoid calling
195 gimple_canonical_types_compatible_p.
196
7d187e4f
GA
1972021-01-07 Martin Sebor <msebor@redhat.com>
198
199 PR middle-end/98578
200 * c-pretty-print.c (print_mem_ref): Strip array from access type.
201 Avoid assuming acces type's size is constant. Correct condition
202 guarding the printing of a parenthesis.
203
942ae5be
GA
2042021-01-06 Martin Sebor <msebor@redhat.com>
205
206 PR c++/95768
207 * c-pretty-print.c (c_pretty_printer::primary_expression): For
208 SSA_NAMEs print VLA names and GIMPLE defining statements.
209 (print_mem_ref): New function.
210 (c_pretty_printer::unary_expression): Call it.
211
2122021-01-06 Richard Biener <rguenther@suse.de>
213
214 PR tree-optimization/95582
215 * c-attribs.c (c_common_attribute_table): Add entry for
216 signed_bool_precision.
217 (handle_signed_bool_precision_attribute): New.
218
8daa719b
GA
2192020-12-24 Iain Sandoe <iain@sandoe.co.uk>
220
221 * c.opt: Add -stdlib= option and enumerations for
222 libstdc++ and libc++.
223
eefe499f
GA
2242020-12-16 Martin Liska <mliska@suse.cz>
225
226 * c.opt: Remove usage of Report.
227
d52945ce
GA
2282020-12-14 Martin Sebor <msebor@redhat.com>
229
230 PR middle-end/98166
231 PR c++/57111
232 PR middle-end/98160
233 * c-attribs.c (maybe_add_noinline): New function.
234 (handle_malloc_attribute): Call it. Use ATTR_FLAG_INTERNAL.
235 Implicitly add attribute noinline to functions not declared inline
236 and warn on those.
237
ca2bd949
GA
2382020-12-09 Tobias Burnus <tobias@codesourcery.com>
239
240 * c-pragma.c (omp_pragmas): Add 'allocate'.
241 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_ALLOCATE.
242
f6e8e279
GA
2432020-12-08 Jakub Jelinek <jakub@redhat.com>
244
245 PR c++/98187
246 * c-pragma.c (omp_pragmas): Remove "master".
247 (omp_pragmas_simd): Add "master".
248
bc8a7013
GA
2492020-12-07 Marek Polacek <polacek@redhat.com>
250
251 PR c++/98126
252 * c-common.c (verify_tree_lim_r): New function.
253 (verify_sequence_points): Use it. Use nullptr instead of 0.
254
b8dd0ef7
GA
2552020-12-03 Martin Sebor <msebor@redhat.com>
256
257 PR c++/90629
258 PR middle-end/94527
259 * c-attribs.c (handle_dealloc_attribute): New function.
260 (handle_malloc_attribute): Handle argument forms of attribute.
261 * c.opt (-Wmismatched-dealloc): New option.
262 (-Wmismatched-new-delete): New option.
263
2642020-12-03 Jakub Jelinek <jakub@redhat.com>
265
266 PR libstdc++/93121
267 * c-common.h (enum rid): Add RID_BUILTIN_BIT_CAST.
268 * c-common.c (c_common_reswords): Add __builtin_bit_cast.
269
e0f5e792
GA
2702020-12-01 JeanHeyd Meneide <phdofthehouse@gmail.com>
271
272 * c-cppbuiltin.c (c_cpp_builtins): Add predefined
273 {__GNUC_EXECUTION_CHARSET_NAME} and
274 _WIDE_EXECUTION_CHARSET_NAME} macros.
275
2762020-12-01 Nathan Sidwell <nathan@acm.org>
277
278 * c-common.c (module, import, export): New internal tokens (with
279 trailing space).
280 * c-common.h (RID__MODULE, RID__IMPORT & RID__EXPORT): Enumerate
281 them.
282 (D_CXX_MODULES, D_CXX_MODULES_FLAGS): Enable them.
283 * c-cppbuiltin.c (c_cpp_builtins): Feature macro.
284
2852020-12-01 Nathan Sidwell <nathan@acm.org>
286
287 * c-opts.c (c_common_init_options): Ask for module dependencies.
288 (c_common_handle_option): Handle -Mmodules -Mno-modules.
289 * c-pch.c (c_common_valid_pch): ... does not play with C++
290 modules.
291 * c.opt (Mmodules, Mno-modules): New preprocessor dependency
292 options.
293 (fmodules-ts, fmodule-header, fmodule-implicit-inline)
294 (fmodule-only, fmodule-mapper, fmodule-lazy)
295 (fmodule-version-ignore, Winvalid-imported-macros)
296 (flang-info-include-translate, flang-info-include-translate-not):
297 New options
298
5fbf0ecb
GA
2992020-11-28 Eric Botcazou <ebotcazou@adacore.com>
300
301 * c-ada-spec.c (dump_nested_type) <RECORD_TYPE>: Remove obsolete code.
302 (dump_ada_structure): Also deal with convention, unchecked union and
303 bit-field for nested types. In the latter case, print an Alignment
304 aspect along with the Pack aspect.
305
360258da
GA
3062020-11-25 Martin Sebor <msebor@redhat.com>
307
308 PR bootstrap/94982
309 * c-attribs.c (handle_patchable_function_entry_attribute): Avoid
310 -Wformat-diag.
311
1e2c9a27
GA
3122020-11-24 Martin Sebor <msebor@redhat.com>
313
314 * c-warn.c (warn_parm_array_mismatch): Avoid invalid redeclarations.
315
8e6198d0
GA
3162020-11-23 Jozef Lawrynowicz <jozef.l@mittosystems.com>
317
318 * c-attribs.c (handle_special_var_sec_attribute): New.
319 (handle_noinit_attribute): Remove.
320 (attr_noinit_exclusions): Rename to...
321 (attr_section_exclusions): ...this, and add "persistent" attribute
322 exclusion.
323 (c_common_attribute_table): Add "persistent" attribute.
324
7a97e2fc
GA
3252020-11-21 Aaron Sawdey <acsawdey@linux.ibm.com>
326
327 * c-pretty-print.c (c_pretty_printer::simple_type_specifier):
328 Treat opaque types like other types.
329 (c_pretty_printer::direct_abstract_declarator): Opaque types are
330 supported types.
331
82e5048e
GA
3322020-11-20 Martin Sebor <msebor@redhat.com>
333
334 * c-warn.c (warn_parm_array_mismatch): Bail on invalid redeclarations
335 with fewer arguments.
336
3372020-11-20 Martin Sebor <msebor@redhat.com>
338
339 PR middle-end/97879
340 * c-attribs.c (handle_access_attribute): Handle ATTR_FLAG_INTERNAL.
341 Error out on invalid modes.
342
3432020-11-20 Jakub Jelinek <jakub@redhat.com>
344
345 PR libstdc++/88101
346 * c-common.c (check_builtin_function_arguments): Handle
347 BUILT_IN_CLEAR_PADDING.
348
25bb75f8
GA
3492020-11-18 Nathan Sidwell <nathan@acm.org>
350
351 * c-lex.c (c_lex_with_flags): CPP_HEADER_NAMEs can now be seen.
352
4dabb037
GA
3532020-11-17 Nathan Sidwell <nathan@acm.org>
354
355 * c-common.h (enum c_tree_index): Reorder to place lazy fields
356 after newly-added CTI_MODULE_HWM.
357
3582020-11-17 Joseph Myers <joseph@codesourcery.com>
359
360 * c-cppbuiltin.c (builtin_define_float_constants): Define
361 "*_IS_IEC_60559__" macros.
362
3632020-11-17 Nathan Sidwell <nathan@acm.org>
364
365 * c-lex.c: #include "langhooks.h".
366 (cb_undef): Maybe call preprocess_undef lang hook.
367 * c-opts.c (c_common_post_options): Maybe call preprocess_options
368 lang hook.
369 (push_command_line_include): Maybe call preprocess_main_file lang
370 hook.
371 (cb_file_change): Likewise.
372 * c-ppoutput.c: #include "langhooks.h.
373 (scan_translation_unit): Maybe call preprocess_token lang hook.
374 (class do_streamer): New, derive from token_streamer.
375 (directives_only_cb): Data pointer is do_streamer, call
376 preprocess_token lang hook.
377 (scan_translation_unit_directives_only): Use do_streamer.
378 (print_line_1): Move src_line recording to after string output.
379 (cb_undef): Maybe call preprocess_undef lang hook.
380
3812020-11-17 Nathan Sidwell <nathan@acm.org>
382
383 * c-ppoutput.c (scan_translation_unit): Use token_streamer, remove
384 code duplicating that functionality.
385
3862020-11-17 Jakub Jelinek <jakub@redhat.com>
387
388 PR c/90628
389 * c-common.c (check_builtin_function_arguments)
390 <case BUILT_IN_ADD_OVERFLOW>: Diagnose when last argument is pointer
391 to _Atomic. For the TYPE_READONLY case, adjust message to be usable
392 for more builtins and argument positions.
393
29c5d9ce
GA
3942020-11-16 Iain Sandoe <iain@sandoe.co.uk>
395
396 PR objc/97854
397 * stub-objc.c: Include c-common.h to declare enum rid.
398
77f67db2
GA
3992020-11-13 Jakub Jelinek <jakub@redhat.com>
400
401 PR c++/63287
402 * c-cppbuiltin.c: Include configargs.h.
403 (c_cpp_builtins): For C++11 and later if THREAD_MODEL_SPEC is not
404 defined, predefine __STDCPP_THREADS__ to 1 unless thread_model is
405 "single".
406
4072020-11-13 Gergö Barany <gergo@codesourcery.com>
408 Thomas Schwinge <thomas@codesourcery.com>
409
410 * c.opt (fopenacc-kernels): Add.
411
4122020-11-13 Jason Merrill <jason@redhat.com>
413
414 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_using_enum.
415
4162020-11-13 Piotr H. Dabrowski <phd@phd.re>
417
418 PR c++/91318
419 * c-cppbuiltin.c: c_cpp_builtins_optimize_pragma(): use cpp_define_unused()
420
4212020-11-13 Martin Liska <mliska@suse.cz>
422
423 * c-attribs.c (build_attr_access_from_parms): Format properly.
424
4252020-11-13 Iain Sandoe <iain@sandoe.co.uk>
426
427 PR objc/90707
428 * c-common.c (c_common_reswords): null_unspecified, nullable,
429 nonnull, null_resettable: New keywords.
430 * c-common.h (enum rid): RID_NULL_UNSPECIFIED, RID_NULLABLE,
431 RID_NONNULL, RID_NULL_RESETTABLE: New.
432 (OBJC_IS_PATTR_KEYWORD): Include nullability keywords in the
433 ranges accepted for property attributes.
434 * c-attribs.c (handle_objc_nullability_attribute): New.
435 * c-objc.h (enum objc_property_attribute_group): Add
436 OBJC_PROPATTR_GROUP_NULLABLE.
437 (enum objc_property_attribute_kind):Add
438 OBJC_PROPERTY_ATTR_NULL_UNSPECIFIED, OBJC_PROPERTY_ATTR_NULLABLE,
439 OBJC_PROPERTY_ATTR_NONNULL, OBJC_PROPERTY_ATTR_NULL_RESETTABLE.
440
4412020-11-13 Iain Sandoe <iain@sandoe.co.uk>
442
443 PR objc/77404
444 * c-attribs.c (handle_objc_root_class_attribute): New
445 * c-objc.h (objc_start_class_interface): Add a location
446 value for the position of the class name.
447 * c.opt: Add Wobjc-root-class.
448 * stub-objc.c (objc_start_class_interface): Add a location
449 value for the position of the class name.
450
a5a11525
GA
4512020-11-12 Joseph Myers <joseph@codesourcery.com>
452
453 * c-lex.c (c_common_has_attribute): Take argument std_syntax.
454 Allow scope for C. Handle standard attributes for C. Do not
455 accept unscoped attributes if std_syntax and not handled as
456 standard attributes.
457 * c-common.h (c_common_has_attribute): Update prototype.
458
4592020-11-12 Nicholas Guriev <guriev-ns@ya.ru>
460
461 PR pch/86674
462 * c-pch.c (c_common_valid_pch): Use cpp_warning with CPP_W_INVALID_PCH
463 reason to fix -Werror=invalid-pch and -Wno-error=invalid-pch switches.
464
0f5f9ed5
GA
4652020-11-11 Patrick Palka <ppalka@redhat.com>
466
467 PR c++/88115
468 * c-opts.c (c_common_post_options): Update latest_abi_version.
469
bb622641
GA
4702020-11-10 Jakub Jelinek <jakub@redhat.com>
471
472 PR c/97748
473 * c-common.h (warn_if_unused_value): Add quiet argument defaulted
474 to false.
475 * c-warn.c (warn_if_unused_value): Likewise. Pass it down
476 recursively and just return true instead of warning if it is true.
477 Handle COMPLEX_EXPR.
478
4792020-11-10 Chung-Lin Tang <cltang@codesourcery.com>
480
481 * c-common.h (c_omp_adjust_map_clauses): New declaration.
482 * c-omp.c (struct map_clause): Helper type for c_omp_adjust_map_clauses.
483 (c_omp_adjust_map_clauses): New function.
484
2bee28dd
GA
4852020-11-09 Marek Polacek <polacek@redhat.com>
486
487 DR 1914
488 * c-common.c (attribute_fallthrough_p): Tweak the warning
489 message.
490
4912020-11-09 Patrick Palka <ppalka@redhat.com>
492
493 * c-pragma.c (handle_pragma_diagnostic): Split the
494 unknown-option -Wpragmas diagnostic into a warning and a
495 subsequent note containing a spelling suggestion. Avoid
496 computing the suggestion if -Wpragmas warnings are being
497 suppressed.
498
4992020-11-09 Patrick Palka <ppalka@redhat.com>
500
501 PR testsuite/97117
502 * c-indentation.c (get_visual_column): Remove location_t
503 parameter. Move the column-tracking diagnostic code from here
504 to ...
505 (should_warn_for_misleading_indentation): ... here, before the
506 early exit for when the loci are not all distinct. Don't pass a
507 location_t argument to get_visual_column.
508 (assert_get_visual_column_succeeds): Don't pass a location_t
509 argument to get_visual_column.
510 (assert_get_visual_column_fails): Likewise.
511
fb95de7a
GA
5122020-11-08 Iain Sandoe <iain@sandoe.co.uk>
513
514 * c-common.h (OBJC_IS_PATTR_KEYWORD): Add class to the list
515 of keywords accepted in @property attribute contexts.
516 * c-objc.h (enum objc_property_attribute_group): Add
517 OBJC_PROPATTR_GROUP_CLASS.
518 (enum objc_property_attribute_kind): Add
519 OBJC_PROPERTY_ATTR_CLASS.
520
2da7ee05
GA
5212020-11-07 Iain Sandoe <iain@sandoe.co.uk>
522
523 * c-common.c (c_common_reswords): Add 'atomic' property
524 attribute.
525 * c-common.h (enum rid): Add RID_PROPATOMIC for atomic
526 property attributes.
527
5282020-11-07 Iain Sandoe <iain@sandoe.co.uk>
529
530 * c-attribs.c (handle_nsobject_attribute): New.
531 * c.opt: Add WNSObject-attribute.
532
44cab2d8
GA
5332020-11-06 Iain Sandoe <iain@sandoe.co.uk>
534
535 * c-objc.h (enum objc_property_attribute_group): New
536 (enum objc_property_attribute_kind): New.
537 (OBJC_PROPATTR_GROUP_MASK): New.
538 (struct property_attribute_info): Small class encapsulating
539 parser output from property attributes.
540 (objc_prop_attr_kind_for_rid): New
541 (objc_add_property_declaration): Simplify interface.
542 * stub-objc.c (enum rid): Dummy type.
543 (objc_add_property_declaration): Simplify interface.
544 (objc_prop_attr_kind_for_rid): New.
545
5462020-11-06 Nathan Sidwell <nathan@acm.org>
547
548 * c-ada-spec.c (collect_ada_nodes): Rename
549 DECL_IS_BUILTIN->DECL_IS_UNDECLARED_BUILTIN.
550 (collect_ada_node): Likewise.
551 (dump_forward_type): Likewise.
552 * c-common.c (set_underlying_type): Rename
553 DECL_IS_BUILTIN->DECL_IS_UNDECLARED_BUILTIN.
554 (user_facing_original_type, c_common_finalize_early_debug): Likewise.
555
5562020-11-06 Jakub Jelinek <jakub@redhat.com>
557
558 * c-common.c (verify_sequence_points): Remove DEBUG_FUNCTION.
559
0cfd9109
GA
5602020-11-05 Marek Polacek <polacek@redhat.com>
561
562 PR c++/97675
563 * c.opt (Wexceptions): New option.
564
5652020-11-05 Marek Polacek <polacek@redhat.com>
566
567 PR c++/25814
568 * c.opt (Wvexing-parse): New option.
569
35c125cb
GA
5702020-11-04 Jakub Jelinek <jakub@redhat.com>
571
572 PR c++/97670
573 * c-omp.c (c_omp_split_clauses): Look through array reductions to find
574 underlying decl to clear in the allocate_head bitmap.
575
5762020-11-04 Iain Sandoe <iain@sandoe.co.uk>
577
578 * c-objc.h (objc_non_constant_expr_p): New.
579 * stub-objc.c (objc_non_constant_expr_p): New.
580
fd2325ea
GA
5812020-11-03 Nathan Sidwell <nathan@acm.org>
582
583 * c.opt (MQ,MT): Reword description to be make-agnostic.
584
88ce3d5f
GA
5852020-11-02 Nathan Sidwell <nathan@acm.org>
586
587 * c-opts.c (c_common_post_options): Move var decl to its
588 initialization point.
589
5902020-11-01 Iain Sandoe <iain@sandoe.co.uk>
591
592 * c-lex.c (c_lex_with_flags): When combining '@' with a
593 keyword for Objective-C, combine the location ranges too.
594
5952020-10-30 Qing Zhao <qing.zhao@oracle.com>
596 H.J.Lu <hjl.tools@gmail.com>
597
598 * c-attribs.c (c_common_attribute_table): Add new attribute
599 zero_call_used_regs.
600 (handle_zero_call_used_regs_attribute): New function.
601
e93aae4a
GA
6022020-10-28 Marek Polacek <polacek@redhat.com>
603
604 PR c++/97573
605 * c-opts.c (c_common_post_options): In C++20, turn on
606 -Wdeprecated-enum-enum-conversion and
607 -Wdeprecated-enum-float-conversion.
608 * c.opt (Wdeprecated-enum-enum-conversion,
609 Wdeprecated-enum-float-conversion): New options.
610 (Wenum-conversion): Allow for C++ too.
611
6122020-10-28 Jakub Jelinek <jakub@redhat.com>
613
614 * c-pragma.h (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_ALLOCATE.
615 * c-omp.c: Include bitmap.h.
616 (c_omp_split_clauses): Handle OMP_CLAUSE_ALLOCATE.
617
f19e7c8d
GA
6182020-10-26 Ville Voutilainen <ville.voutilainen@gmail.com>
619
620 * c-common.c (__is_nothrow_assignable): New.
621 (__is_nothrow_constructible): Likewise.
622 * c-common.h (RID_IS_NOTHROW_ASSIGNABLE): New.
623 (RID_IS_NOTHROW_CONSTRUCTIBLE): Likewise.
624
efe71fcc
GA
6252020-10-23 Jan Hubicka <hubicka@ucw.cz>
626
627 * c-common.c (c_common_finalize_early_debug): Update for new thunk api.
628
6292020-10-23 Marek Polacek <polacek@redhat.com>
630
631 PR c++/91741
632 * c-common.c (verify_tree): Handle PAREN_SIZEOF_EXPR.
633 (c_common_init_ts): Likewise.
634 * c-common.def (PAREN_SIZEOF_EXPR): New tree code.
635 * c-common.h (maybe_warn_sizeof_array_div): Declare.
636 * c-warn.c (sizeof_pointer_memaccess_warning): Unwrap NOP_EXPRs.
637 (maybe_warn_sizeof_array_div): New function.
638 * c.opt (Wsizeof-array-div): New option.
639
6402020-10-23 Martin Sebor <msebor@redhat.com>
641
642 PR c/97463
643 * c-warn.c (warn_parm_ptrarray_mismatch): Move null test earlier.
644
56ddd5e2
GA
6452020-10-22 Martin Liska <mliska@suse.cz>
646
647 PR c/94722
648 * c-attribs.c (handle_no_stack_protect_function_attribute): New.
649 (handle_stack_protect_attribute): Add error message for a
650 no_stack_protector function.
651
6522020-10-22 Martin Liska <mliska@suse.cz>
653
654 * c-cppbuiltin.c (c_cpp_builtins): Use the stack_protector enum.
655
6562020-10-22 Jan Hubicka <hubicka@ucw.cz>
657
658 * c-gimplify.c: Include tree-nested.h
659 (c_genericize): Update for new nested function info.
660
b2698c21
GA
6612020-10-14 Martin Sebor <msebor@redhat.com>
662
663 PR c/97413
664 * c-attribs.c (build_attr_access_from_parms): Wrap chain of VLA
665 bounds in an extra list.
666
7e9282ae
GA
6672020-10-05 Richard Biener <rguenther@suse.de>
668 Jakub Jelinek <jakub@redhat.com>
669
670 PR c++/97197
671 * c-pretty-print.c: Include langhooks.h.
672 (c_pretty_printer::postfix_expression): Handle TARGET_MEM_REF as
673 expression.
674 (c_pretty_printer::expression): Handle TARGET_MEM_REF as
675 unary_expression.
676 (c_pretty_printer::unary_expression): Handle TARGET_MEM_REF.
677
660bfe61
GA
6782020-09-30 Martin Sebor <msebor@redhat.com>
679
680 PR middle-end/97189
681 * c-attribs.c (append_access_attr): Use the function declaration
682 location for a warning about an attribute access argument.
683
93bca37c
GA
6842020-09-29 Marek Polacek <polacek@redhat.com>
685
686 PR c++/94695
687 * c.opt (Wrange-loop-construct): New option.
688
82b77dee
GA
6892020-09-23 Martin Sebor <msebor@redhat.com>
690
691 PR c/97131
692 * c-warn.c (warn_parm_ptrarray_mismatch): Handle more invalid input.
693
6942020-09-23 Marek Polacek <polacek@redhat.com>
695
696 PR c/97125
697 * c-gimplify.c (c_genericize): Only call do_warn_duplicated_branches_r
698 after loops and other structured control constructs have been lowered.
699
521d2711
GA
7002020-09-22 Jakub Jelinek <jakub@redhat.com>
701
702 * c.opt (Wbuiltin-declaration-mismatch): Fix typo in variable name:
703 warn_builtin_declaraion_mismatch -> warn_builtin_declaration_mismatch.
704
44135373
GA
7052020-09-21 Marek Polacek <polacek@redhat.com>
706
707 * c.opt (Wctad-maybe-unsupported): New option.
708
2fe5b7d1
GA
7092020-09-19 Martin Sebor <msebor@redhat.com>
710
711 PR c/50584
712 * c-common.h (warn_parm_array_mismatch): Declare new function.
713 (has_attribute): Move declaration of an existing function.
714 (build_attr_access_from_parms): Declare new function.
715 * c-warn.c (parm_array_as_string): Define new function.
716 (plus_one): Define new function.
717 (warn_parm_ptrarray_mismatch): Define new function.
718 (warn_parm_array_mismatch): Define new function.
719 (vla_bound_parm_decl): New function.
720 * c.opt (-Warray-parameter, -Wvla-parameter): New options.
721 * c-pretty-print.c (pp_c_type_qualifier_list): Don't print array type
722 qualifiers here...
723 (c_pretty_printer::direct_abstract_declarator): ...but instead print
724 them in brackets here. Also print [static]. Strip extraneous
725 expressions from VLA bounds.
726
7272020-09-19 Martin Sebor <msebor@redhat.com>
728
729 PR c/50584
730 * c-attribs.c (c_common_attribute_table): Add "arg spec" attribute.
731 (handle_argspec_attribute): New function.
732 (get_argument, get_argument_type): New functions.
733 (append_access_attrs): Add overload. Handle internal attribute
734 representation in addition to external.
735 (handle_access_attribute): Handle internal attribute representation
736 in addition to external.
737 (build_attr_access_from_parms): New function.
738
7392020-09-19 Sandra Loosemore <sandra@codesourcery.com>
740
741 * c-gimplify.c (genericize_c_loop): Rewrite to match
742 c_finish_loop in c-typeck.c.
743
7442020-09-19 Sandra Loosemore <sandra@codesourcery.com>
745
746 * c-common.c (c_block_may_fallthrough): New, split from
747 cxx_block_may_fallthrough in the cp front end.
748 (c_common_init_ts): Move handling of loop and switch-related
749 statements here from the cp front end.
750 * c-common.def (FOR_STMT, WHILE_STMT, DO_STMT): Move here from
751 cp front end.
752 (BREAK_STMT, CONTINUE_STMT, SWITCH_STMT): Likewise.
753 * c-common.h (c_block_may_fallthru): Declare.
754 (bc_state_t): Move here from cp front end.
755 (save_bc_state, restore_bc_state): Declare.
756 (c_genericize_control_stmt): Declare.
757 (WHILE_COND, WHILE_BODY): Likewise.
758 (DO_COND, DO_BODY): Likewise.
759 (FOR_INIT_STMT, FOR_COND, FOR_EXPR, FOR_BODY, FOR_SCOPE): Likewise.
760 (SWITCH_STMT_COND, SWITCH_STMT_BODY): Likewise.
761 (SWITCH_STMT_TYPE, SWITCH_STMT_SCOPE): Likewise.
762 (SWITCH_STMT_ALL_CASES_P, SWITCH_STMT_NO_BREAK_P): Likewise.
763 (LABEL_DECL_BREAK, LABEL_DECL_CONTINUE): Likewise.
764 * c-dump.c (dump_stmt): Copy from cp front end.
765 (c_dump_tree): Move code to handle structured loop and switch
766 tree nodes here from cp front end.
767 * c-gimplify.c: Adjust includes.
768 (enum bc_t, bc_label, begin_bc_block, finish_bc_block): Move from
769 cp front end.
770 (save_bc_state, restore_bc_state): New functions using old code
771 from cp front end.
772 (get_bc_label, expr_loc_or_loc): Move from cp front end.
773 (genericize_c_loop): Move from cp front end.
774 (genericize_for_stmt, genericize_while_stmt): Likewise.
775 (genericize_do_stmt, genericize_switch_stmt): Likewise.
776 (genericize_continue_stmt, genericize_break_stmt): Likewise.
777 (genericize_omp_for_stmt): Likewise.
778 (c_genericize_control_stmt): New function using code split from
779 cp front end.
780 (c_genericize_control_r): New.
781 (c_genericize): Call walk_tree with c_genericize_control_r.
782 * c-pretty-print.c (c_pretty_printer::statement): Move code to handle
783 structured loop and switch tree nodes here from cp front end.
784
2aad20c0
GA
7852020-09-17 Patrick Palka <ppalka@redhat.com>
786
787 PR c/80076
788 * c-indentation.c (should_warn_for_misleading_indentation): Move
789 declarations of local variables closer to their first use.
790 Handle virtual token locations by resolving them to their
791 respective macro expansion points. If all three tokens are
792 produced from the same macro expansion, then instead use their
793 loci within the macro definition.
794
ecde1b0a
GA
7952020-09-16 Martin Sebor <msebor@redhat.com>
796
797 PR c/78666
798 PR c/96126
799 * c-attribs.c (validate_attr_args): New function.
800 (validate_attr_arg): Same.
801 (handle_section_attribute): Call it. Introduce a local variable.
802 (handle_alloc_size_attribute): Same.
803 (handle_alloc_align_attribute): Same.
804
50a71cd0
GA
8052020-09-14 Jakub Jelinek <jakub@redhat.com>
806
807 * c-attribs.c (handle_optimize_attribute): Adjust
808 cl_optimization_save, cl_optimization_restore and
809 build_optimization_node callers.
810 * c-pragma.c (handle_pragma_optimize): Adjust
811 build_optimization_node caller.
812 (handle_pragma_push_options): Adjust
813 build_optimization_node and build_target_option_node callers.
814 (handle_pragma_pop_options, handle_pragma_reset_options):
815 Adjust cl_optimization_restore callers.
816
8f7ea26a
GA
8172020-08-28 Martin Sebor <msebor@redhat.com>
818
819 * c.opt (Wstringop-overread): New option.
820
a6493809
GA
8212020-08-11 Jakub Jelinek <jakub@redhat.com>
822
823 PR c/96545
824 * c-common.c (get_atomic_generic_size): Require that first argument's
825 type points to a complete type and use tree_fits_uhwi_p instead of
826 just INTEGER_CST TREE_CODE check for the TYPE_SIZE_UNIT.
827
48cc2e46
GA
8282020-07-31 Martin Sebor <msebor@redhat.com>
829
830 PR c++/96003
831 * c-common.c (check_function_arguments_recurse): Return early when
832 no-warning bit is set.
833
8342020-07-31 Richard Biener <rguenther@suse.de>
835
836 PR debug/96383
837 * c-common.h (c_common_finalize_early_debug): Declare.
838 * c-common.c: Include debug.h.
839 (c_common_finalize_early_debug): finalize_early_debug langhook
840 implementation generating debug for extern declarations.
841
e71dab87
GA
8422020-07-27 Nathan Sidwell <nathan@acm.org>
843
844 * c-common.c (try_to_locate_new_include_insertion_point): Use
845 strcmp, not pointer equality.
846
ae2e0bc1
GA
8472020-07-25 Martin Sebor <msebor@redhat.com>
848
849 PR c++/96310
850 * c-common.c (check_nonnull_arg): Print note only when warning was
851 issued.
852
3ea9abca
GA
8532020-07-22 Tobias Burnus <tobias@codesourcery.com>
854
855 * c-omp.c (c_finish_omp_critical): Check for no name but
856 nonzero hint provided.
857
0933f508
GA
8582020-07-20 Jason Merrill <jason@redhat.com>
859
860 * c-cppbuiltin.c (c_cpp_builtins): Update
861 __cpp_nontype_template_args for C++20.
862
8632020-07-20 Martin Sebor <msebor@redhat.com>
864
865 PR c/96249
866 * c.opt: Remove stray text.
867
8ca07a30
GA
8682020-07-14 Lewis Hyatt <lhyatt@gmail.com>
869
870 PR other/86904
871 * c-indentation.c (should_warn_for_misleading_indentation): Get
872 global tabstop from the new source.
873 * c-opts.c (c_common_handle_option): Remove handling of -ftabstop, which
874 is now a common option.
875 * c.opt: Likewise.
876
a82c4c4c 8772020-07-08 Eric Botcazou <ebotcazou@adacore.com>
50873cc5
GA
878
879 * c.opt (Wscalar-storage-order): Add explicit variable.
880
f60ee68d
GA
8812020-07-07 Nathan Sidwell <nathan@acm.org>
882
883 * c-opts.c (c_common_post_options): Add 'injecting' arg to
884 cpp_read_main_file.
885 (c_finish_options): Add linemap_line_start calls for builtin and cmd
886 maps. Force token position to line_table's highest line.
887 * c-ppoutput.c (print_line_1): Refactor, print line zero.
888 (cb_define): Always increment source line.
889
4077d74c
GA
8902020-07-06 Martin Sebor <msebor@redhat.com>
891
892 PR c++/95984
893 * c-common.c (check_function_nonnull): Avoid checking syntesized calls
894 to stub lambda objects with null this pointer.
895 (check_nonnull_arg): Handle C++ nullptr.
896
b5f24739
GA
8972020-07-02 Jason Merrill <jason@redhat.com>
898 Jakub Jelinek <jakub@redhat.com>
899
900 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_consteval.
901
46fbb6c6
GA
9022020-06-30 Jakub Jelinek <jakub@redhat.com>
903
904 PR c++/95963
905 * c-common.c (check_function_arguments_recurse): Don't crash on
906 calls to internal functions.
907
69273534
GA
9082020-06-28 Martin Sebor <msebor@redhat.com>
909
910 PR c++/86568
911 * c-common.c (struct nonnull_arg_ctx): Add members.
912 (check_function_nonnull): Use nonnull_arg_ctx as argument. Handle
913 C++ member functions specially. Consider the this pointer implicitly
914 nonnull.
915 (check_nonnull_arg): Use location of argument when available.
916 (check_function_arguments): Use nonnull_arg_ctx as argument.
917
9a33c41f
GA
9182020-06-27 Jakub Jelinek <jakub@redhat.com>
919
920 PR middle-end/95903
921 * c-common.c (pointer_int_sum): Use TYPE_OVERFLOW_UNDEFINED instead of
922 !TYPE_UNSIGNED check to see if we can apply distributive law and handle
923 smaller precision intop operands separately.
924
c9c05f73
GA
9252020-06-26 Marek Polacek <polacek@redhat.com>
926
927 * c-opts.c (c_common_init_options): Default to gnu++17.
928
aff95ee7
GA
9292020-06-17 Jonathan Wakely <jwakely@redhat.com>
930
bd0a89dc 931 PR c/95378
aff95ee7
GA
932 * c-common.c (get_atomic_generic_size): Check cv-qualifiers in
933 pointer arguments.
934
56638b9b
GA
9352020-06-16 Jakub Jelinek <jakub@redhat.com>
936
937 * c-common.h (c_omp_check_loop_iv_exprs): Add an int argument.
938 * c-omp.c (struct c_omp_check_loop_iv_data): Add maybe_nonrect and
939 idx members.
940 (c_omp_is_loop_iterator): New function.
941 (c_omp_check_loop_iv_r): Use it. Add support for silent scanning
942 if outer loop iterator is present. Perform duplicate checking through
943 hash_set in the function rather than expecting caller to do that.
944 Pass NULL instead of d->ppset to walk_tree_1.
945 (c_omp_check_nonrect_loop_iv): New function.
946 (c_omp_check_loop_iv): Use it. Fill in new members, allow
947 non-rectangular loop forms, diagnose multiple associated loops with
948 the same iterator. Pass NULL instead of &pset to walk_tree_1.
949 (c_omp_check_loop_iv_exprs): Likewise.
950
ec6ffbb9
GA
9512020-06-10 Martin Liska <mliska@suse.cz>
952
953 PR tree-optimization/92860
954 * c-attribs.c (handle_optimize_attribute):
955 Save global options and compare it after parsing of function
956 attribute.
957 * c-pragma.c (opt_stack::saved_global_options): New field.
958 (handle_pragma_push_options): Save global_options.
959 (handle_pragma_pop_options): Compare them after pop.
960
b952c2cf
GA
9612020-06-09 Jakub Jelinek <jakub@redhat.com>
962
963 PR c/95580
964 * c-pretty-print.c (c_pretty_printer::unary_expression): Handle the
965 case when MEM_REF's first argument has type pointer to incomplete type.
966
1a59f3db
GA
9672020-06-05 Jason Merrill <jason@redhat.com>
968
969 * c-pretty-print.c (pp_c_additive_expression): Handle negative
970 operand to POINTER_PLUS_EXPR.
971
3add3425
GA
9722020-06-04 Martin Sebor <msebor@redhat.com>
973
974 PR middle-end/10138
975 PR middle-end/95136
976 * c-attribs.c (append_access_attrs): Handle attr_access::none.
977 (handle_access_attribute): Same.
978
9a5b7438
GA
9792020-06-03 Mark Wielaard <mark@klomp.org>
980
981 * known-headers.cc (get_cp_stdlib_header_for_string_macro_name):
982 New function.
983 * known-headers.h (get_cp_stdlib_header_for_string_macro_name):
984 New function declaration.
985
9862020-06-03 Mark Wielaard <mark@klomp.org>
987
988 * known-headers.cc (get_string_macro_hint): New function.
989 (get_stdlib_header_for_name): Use get_string_macro_hint.
990 (get_c_stdlib_header_for_string_macro_name): New function.
991 * known-headers.h (get_c_stdlib_header_for_string_macro_name):
992 New function declaration.
993
9942020-06-03 Tobias Burnus <tobias@codesourcery.com>
995
996 * c-common.h (c_omp_predetermined_mapping): Declare.
997 * c-omp.c (c_omp_predetermined_mapping): New.
998
af114c38
MW
9992020-05-22 Mark Wielaard <mark@klomp.org>
1000
1001 * known-headers.cc (get_stdlib_header_for_name): Add a new
1002 stdlib_hint array for stdbool and stdint.
1003
45c50b6a
MW
10042020-05-22 Mark Wielaard <mark@klomp.org>
1005
1006 * known-headers.cc (get_stdlib_header_for_name): Return
1007 "<stdbool.h>" for "bool", "true" or "false" when STDLIB_C and
1008 flag_isoc99.
1009
c22027a0
NS
10102020-05-20 Nathan Sidwell <nathan@acm.org>
1011
38a4db21
NS
1012 * c-common.c (try_to_locate_new_include_insertion_point): Revert change.
1013
c22027a0
NS
1014 * c-common.c (try_to_locate_new_include_insertion_point): Use
1015 strcmp to compare filenames.
1016 * c-lex.c (init_c_lex): Move declaration to initialization.
1017 * c-opts.c (handle_deferred_opts): Move cpp_get_deps call into
1018 deferred count loop.
1019
29f0e90d
JM
10202020-05-15 Jason Merrill <jason@redhat.com>
1021
1022 * c-opts.c (set_std_cxx20): Set flag_coroutines.
1023
b04445d4
JM
10242020-05-13 Jason Merrill <jason@redhat.com>
1025
1026 * c.opt (std=c++20): Make c++2a the alias.
1027 (std=gnu++20): Likewise.
1028 * c-common.h (cxx_dialect): Change cxx2a to cxx20.
1029 * c-opts.c: Adjust.
1030 * c-cppbuiltin.c: Adjust.
1031 * c-ubsan.c: Adjust.
1032 * c-warn.c: Adjust.
1033
11dd3be5
EB
10342020-05-12 Eric Botcazou <ebotcazou@adacore.com>
1035
1036 * c-ada-spec.c (dump_ads): Output pragma Warnings ("U"); on entry.
1037
b224c376
NS
10382020-05-08 Nathan Sidwell <nathan@acm.org>
1039
1040 Reimplement directives only processing.
1041 * c-ppoutput.c (token_streamer): Ne.
1042 (directives_only_cb): New. Swallow ...
1043 (print_lines_directives_only): ... this.
1044 (scan_translation_unit_directives_only): Reimplment using the
1045 published interface.
1046
f1d94677
MP
10472020-05-07 Marek Polacek <polacek@redhat.com>
1048
1049 * c-format.c (badwords): Add "nonstatic".
1050
9b95bb52
JJ
1051202-05-07 Jakub Jelinek <jakub@redhat.com>
1052
1053 PR c/94968
1054 * c-common.c (speculation_safe_value_resolve_params): Return false if
1055 error_operand_p (val2).
1056 (resolve_overloaded_builtin) <case BUILT_IN_SPECULATION_SAFE_VALUE_N>:
1057 Remove extraneous semicolon.
1058
530b4409 10592020-05-06 qing zhao <qing.zhao@oracle.com>
1060
1061 PR c/94230
1062 * c-indentation.c (get_visual_column): Add a hint to use the new
1063 -flarge-source-files option.
1064
b776bdca
SSF
10652020-05-05 Stefan Schulze Frielinghaus <stefansf@linux.ibm.com>
1066
1067 * c-attribs.c (handle_vector_size_attribute): Add attribute
1068 nonnull for argument args in order to silence warning of
1069 uninitialized variable usage. Since this is local to the
1070 compilation unit and thus cannot be checked at call sides by the
1071 compiler, added an assert statement in order to verify this.
1072
6607bdd9
L
10732020-05-01 H.J. Lu <hongjiu.lu@intel.com>
1074
1075 PR target/93492
1076 * c-attribs.c (handle_patchable_function_entry_attribute): Limit
1077 value to USHRT_MAX (65535).
1078
691eeb65
JJ
10792020-04-29 Jakub Jelinek <jakub@redhat.com>
1080
1081 * c-format.c (PP_FORMAT_CHAR_TABLE): Add %{ and %}.
1082
26d76be7
JJ
10832020-04-27 Jakub Jelinek <jakub@redhat.com>
1084
1085 PR c/94755
1086 * c-common.c (resolve_overloaded_builtin): Return error_mark_node for
1087 fncode == BUILT_IN_NONE before initialization of first_param.
1088
7291b2ed
MP
10892020-04-23 Marek Polacek <polacek@redhat.com>
1090
1091 PR c++/94733
1092 * c-attribs.c (find_tm_attribute): Use get_attribute_name instead of
1093 TREE_PURPOSE.
1094
58a29af8
PP
10952020-04-14 Patrick Palka <ppalka@redhat.com>
1096
1097 PR c++/85278
1098 * c-pretty-print.c (pp_c_pointer) <case REFERENCE_TYPE>: Print a double
1099 ampersand if it's an rvalue reference type.
1100
09f04139
MS
11012020-04-13 Martin Sebor <msebor@redhat.com>
1102
1103 PR c/92326
1104 * c-pretty-print.c (c_pretty_printer::direct_abstract_declarator): Avoid
1105 printing array bound for flexible array members.
1106
ee26baf4
IS
11072020-04-13 Iain Sandoe <iain@sandoe.co.uk>
1108
1109 * c-cppbuiltin.c (c_cpp_builtins): Update coroutines builtin
1110 define, per n4861.
1111
75efe9cb
RB
11122020-04-02 Richard Biener <rguenther@suse.de>
1113
1114 PR c/94392
1115 * c-opts.c (c_common_post_options): Enable -ffinite-loops
1116 for -O2 and C++11 or newer.
1117
75defde9
PP
11182020-03-28 Patrick Palka <ppalka@redhat.com>
1119
1120 * c.opt: Add -fconcepts-diagnostics-depth.
1121
52f24a9e
MS
11222020-03-27 Martin Sebor <msebor@redhat.com>
1123
1124 PR c++/94346
1125 * c-attribs.c (handle_copy_attribute): Avoid passing expressions
1126 to decl_attributes. Make handling of different kinds of entities
1127 more robust.
1128
ccacf77b
MS
11292020-03-27 Martin Sebor <msebor@redhat.com>
1130
1131 PR c++/94098
1132 * c-attribs.c (handle_access_attribute): Avoid setting TYPE_ATTRIBUTES
1133 here.
1134
ca6c7225
JJ
11352020-03-23 Jakub Jelinek <jakub@redhat.com>
1136
1137 PR c++/91993
1138 * c-warn.c (warnings_for_convert_and_check): For expr and/or
1139 result being COMPOUND_EXPRs, skip to ultimate rhs.
1140
1aa22b19
RS
11412020-03-20 Richard Sandiford <richard.sandiford@arm.com>
1142
1143 PR middle-end/94072
1144 * c-common.c (c_common_type_for_mode): Before using a registered
1145 built-in type, check that the vectorness of the type matches
1146 the vectorness of the mode.
1147
700d4cb0
JJ
11482020-03-17 Jakub Jelinek <jakub@redhat.com>
1149
1150 * c-common.c (resolve_overloaded_builtin): Fix up duplicated word
1151 issue in a diagnostic message.
1152
b408e010
LH
11532020-03-15 Lewis Hyatt <lhyatt@gmail.com>
1154
1155 * c.opt: Avoid redundancy in the help text.
1156
e78e50d5
MP
11572020-03-02 Marek Polacek <polacek@redhat.com>
1158
1159 PR c++/93958 - add missing -std=gnu++20.
1160 * c.opt: Add -std=gnu++20.
1161
649e1741
MS
11622020-03-01 Martin Sebor <msebor@redhat.com>
1163
1164 PR c++/92721
1165 * c-attribs.c (append_access_attrs): Correctly handle attribute.
1166 (handle_access_attribute): Same.
1167
7b60f3ba
JJ
11682020-02-25 Jakub Jelinek <jakub@redhat.com>
1169
1170 PR c/93858
1171 * c-pragma.c (handle_pragma_diagnostic): Add missing ? after
1172 "did you mean" hint in diagnostics.
1173
fb260504
JM
11742020-02-15 Jason Merrill <jason@redhat.com>
1175
1176 * c.opt: Add -std=c++20.
1177
1d757b09
EB
11782020-02-14 Eric Botcazou <ebotcazou@adacore.com>
1179
1180 * c-ada-spec.c: Include bitmap.h.
1181 (dump_ada_double_name): Rename into...
1182 (dump_anonymous_type_name): ...this. Always use the TYPE_UID.
1183 (dump_ada_array_type): Adjust to above renaming. Robustify.
1184 (dump_nested_types_1): New function copied from... Add dumped_types
1185 parameter and pass it down to dump_nested_type.
1186 (dump_nested_types): ...this. Remove parent parameter. Just call
1187 dump_nested_types_1 on an automatic bitmap.
1188 (dump_nested_type): Add dumped_types parameter.
1189 <ARRAY_TYPE>: Do not dump it if already present in dumped_types.
1190 Adjust recursive calls and adjust to above renaming.
1191 (dump_ada_declaration): Adjust call to dump_nested_types.
1192 Tidy up and adjust to above renaming.
1193 (dump_ada_specs): Initialize and release bitmap obstack.
1194
0cc575e4
MS
11952020-02-10 Martin Sebor <msebor@redhat.com>
1196
1197 PR c/93640
1198 * c-attribs.c (handle_access_attribute): Correct off-by-one mistakes.
1199
a59aa302
JJ
12002020-02-10 Jakub Jelinek <jakub@redhat.com>
1201
1202 PR other/93641
1203 * c-format.c (check_plain): Fix up last argument of strncasecmp.
1204 Remove useless extra test.
1205
e464fc90
TB
12062020-02-03 Julian Brown <julian@codesourcery.com>
1207 Tobias Burnus <tobias@codesourcery.com>
1208
1209 * c-cppbuiltin.c (c_cpp_builtins): Update _OPENACC define to 201711.
1210
e3b6c052
JM
12112020-01-29 Jason Merrill <jason@redhat.com>
1212
1213 PR c++/89357
1214 * c-attribs.c (check_cxx_fundamental_alignment_constraints): Remove.
1215
6d00f052
JM
12162020-01-23 Jason Merrill <jason@redhat.com>
1217
1218 * c-warn.c (conversion_warning): Change -Wsign-conversion handling.
1219
8a990ffa
MS
12202020-01-23 Martin Sebor <msebor@redhat.com>
1221
1222 PR c/84919
1223 * c-common.c (check_function_arguments): Avoid overlap checking
1224 of sprintf functions.
1225
55b7df8b
JM
12262020-01-22 Jason Merrill <jason@redhat.com>
1227
1228 PR testsuite/93391 - PR 40752 test fails with unsigned plain char.
1229 PR c++/40752
1230 * c-warn.c (conversion_warning): Check operands only after checking
1231 the whole expression. Don't check second operand of + for sign.
1232
c77074d0
JM
12332020-01-21 Jason Merrill <jason@redhat.com>
1234 Manuel López-Ibáñez <manu@gcc.gnu.org>
1235
1236 PR c++/40752 - useless -Wconversion with short +=.
1237 * c.opt (-Warith-conversion): New.
1238 * c-warn.c (conversion_warning): Recurse for operands of
1239 operators. Only warn about the whole expression with
1240 -Warith-conversion.
1241
731dbfc3
JM
12422020-01-21 Jason Merrill <jason@redhat.com>
1243
1244 * c-common.c (unsafe_conversion_p): Don't warn, return UNSAFE_SIGN.
1245 * c-warn.c (conversion_warning): Warn about UNSAFE_SIGN.
1246
ad1a3914
NS
12472020-01-20 Nathan Sidwell <nathan@acm.org>
1248
1249 PR preprocessor/80005
1250 * c-cppbuiltins.c (c_cpp_builtins): Don't define __has_include{,_next}.
1251
49789fd0
IS
12522020-01-18 Iain Sandoe <iain@sandoe.co.uk>
1253
1254 * c-common.c (co_await, co_yield, co_return): New.
1255 * c-common.h (RID_CO_AWAIT, RID_CO_YIELD,
1256 RID_CO_RETURN): New enumeration values.
1257 (D_CXX_COROUTINES): Bit to identify coroutines are active.
1258 (D_CXX_COROUTINES_FLAGS): Guard for coroutine keywords.
1259 * c-cppbuiltin.c (__cpp_coroutines): New cpp define.
1260 * c.opt (fcoroutines): New command-line switch.
1261
4bc1899b
DM
12622020-01-10 David Malcolm <dmalcolm@redhat.com>
1263
1264 * c-format.c (local_event_ptr_node): New.
1265 (PP_FORMAT_CHAR_TABLE): Add entry for "%@".
1266 (init_dynamic_diag_info): Initialize local_event_ptr_node.
1267 * c-format.h (T_EVENT_PTR): New define.
1268
f25e33fa
MS
12692020-01-10 Martin Sebor <msebor@redhat.com>
1270
1271 PR c/93132
1272 * c-attribs.c (append_access_attrs): Validate against the translated
1273 access string rather than the human-readable representation.
1274
8d9254fc
JJ
12752020-01-01 Jakub Jelinek <jakub@redhat.com>
1276
1277 Update copyright years.
1278
39292e25
EB
12792019-12-20 Eric Botcazou <ebotcazou@adacore.com>
1280
1281 * c-ada-spec.h (decl_sloc): Delete.
1282 * c-ada-spec.c (decl_sloc): Make static.
1283
519d7496
JB
12842019-12-19 Julian Brown <julian@codesourcery.com>
1285
1286 * c-common.h (c_omp_map_clause_name): Add prototype.
1287 * c-omp.c (c_omp_map_clause_name): New function.
1288 * c-pragma.h (pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_ATTACH and
1289 PRAGMA_OACC_CLAUSE_DETACH.
1290
a6163563
JB
12912019-12-19 Julian Brown <julian@codesourcery.com>
1292 Maciej W. Rozycki <macro@codesourcery.com>
1293 Tobias Burnus <tobias@codesourcery.com>
1294 Thomas Schwinge <thomas@codesourcery.com>
1295
1296 * c-pragma.h (pragma_omp_clause): Add
1297 PRAGMA_OACC_CLAUSE_NO_CREATE.
1298
e8f1ade2
MS
12992019-12-17 Martin Sebor <msebor@redhat.com>
1300
1301 PR c++/61339
1302 * c.opt (-Wmismatched-tags, -Wredundant-tags): New options.
1303
368877a1
DM
13042019-12-11 David Malcolm <dmalcolm@redhat.com>
1305
1306 * c-pretty-print.c (c_pretty_printer::clone): New vfunc
1307 implementation.
1308 * c-pretty-print.h (c_pretty_printer::clone): New vfunc decl.
1309
d68f5d45
DM
13102019-12-09 David Malcolm <dmalcolm@redhat.com>
1311
1312 * c-format.c (range_label_for_format_type_mismatch::get_text):
1313 Replace label_text ctor called with true with label_text::take.
1314
d3e28653
DM
13152019-12-09 David Malcolm <dmalcolm@redhat.com>
1316
1317 * c-format.c (selftest::test_type_mismatch_range_labels): Remove
1318 initial newline from expected outputs.
1319 * c-opts.c (c_diagnostic_finalizer): Add pp_newline call before
1320 call to diagnostic_show_locus.
1321
abd6d8cc
JJ
13222019-12-06 Jakub Jelinek <jakub@redhat.com>
1323
1324 * c-cppbuiltin.c (c_cpp_builtins): Don't define __cpp_consteval for
1325 now.
1326
7906797e
MP
13272019-12-05 Marek Polacek <polacek@redhat.com>
1328 Jakub Jelinek <jakub@redhat.com>
1329
1330 PR c++/91353 - P1331R2: Allow trivial default init in constexpr contexts.
1331 * c-cppbuiltin.c (c_cpp_builtins): Adjust the value of __cpp_constexpr.
1332
5c04da88
MP
13332019-12-05 Marek Polacek <polacek@redhat.com>
1334
1335 PR c++/92271 - make __is_same alias for __is_same_as.
1336 * c-common.c: Add __is_same, an alias for __is_same_as.
1337
43aae289
MP
13382019-12-03 Marek Polacek <polacek@redhat.com>
1339
1340 PR c++/91363 - P0960R3: Parenthesized initialization of aggregates.
1341 * c-cppbuiltin.c (c_cpp_builtins): Predefine
1342 __cpp_aggregate_paren_init=201902 for -std=c++2a.
1343
d7ddfbcb
JH
13442019-11-30 Jan Hubicka <hubicka@ucw.cz>
1345
1346 * c-attribs.c (handle_symver_attribute): New function
1347 (c_common_attributes): Add symver.
1348
65ef05d0
RS
13492019-11-30 Richard Sandiford <richard.sandiford@arm.com>
1350
1351 * c-common.c (pointer_int_sum): Use verify_type_context to check
1352 whether the target allows pointer arithmetic for the types involved.
1353 (c_sizeof_or_alignof_type, c_alignof_expr): Use verify_type_context
1354 to check whether the target allows sizeof and alignof operations
1355 for the types involved.
1356
1a291106
JM
13572019-11-27 Jason Merrill <jason@redhat.com>
1358
1359 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_deduction_guides.
1360
05d6cb1a
JJ
13612019-11-26 Jakub Jelinek <jakub@redhat.com>
1362
1363 PR c++/61414
1364 * c-attribs.c (handle_mode_attribute): Add mode attribute to
1365 ENUMERAL_TYPEs.
1366
5b8d9367
JM
13672019-11-25 Joseph Myers <joseph@codesourcery.com>
1368
1369 PR c/91985
1370 * c-common.c (c_common_type_for_mode): Handle decimal
1371 floating-point types being NULL_TREE.
1372 * c-format.c (get_format_for_type_1): Handle specified types being
1373 NULL_TREE.
1374 * c-lex.c (interpret_float): Give an error for decimal
1375 floating-point constants when decimal floating-point not
1376 supported.
1377
1fbf51cb
JJ
13782019-11-23 Jakub Jelinek <jakub@redhat.com>
1379
1380 PR middle-end/83859
1381 * c-attribs.c (append_access_attrs): Avoid buffer overflow. Avoid
1382 memory leak. Use XNEWVEC macro. Use auto_diagnostic_group to
1383 group warning with inform together.
1384 (handle_access_attribute): Formatting fix.
1385
761df906
JJ
13862019-11-22 Jakub Jelinek <jakub@redhat.com>
1387
bdaf8be1
JJ
1388 PR c/90677
1389 * c-common.h (identifier_global_tag): Declare.
1390 * c-format.c (get_pointer_to_named_type): Renamed to ...
1391 (get_named_type): ... this. Use identifier_global_tag instead of
1392 identifier_global_value, handle the return value being a TYPE_P.
1393 (init_dynamic_diag_info): Adjust get_pointer_to_named_type callers
1394 to call get_named_type instead. Formatting fixes.
1395
c2ecce6d 1396 Implement P1902R1, Missing feature-test macros 2017-2019.
761df906
JJ
1397 * c-cppbuiltin.c (c_cpp_builtins): Bump __cpp_init_captures
1398 and __cpp_generic_lambdas for -std=c++2a. Define
1399 __cpp_designated_initializers, __cpp_constexpr_in_decltype and
1400 __cpp_consteval for -std=c++2a. Remove a FIXME comment about
1401 __cpp_concepts for -std=c++2a.
1402
54aa6b58
MS
14032019-11-22 Martin Sebor <msebor@redhat.com>
1404
1405 PR middle-end/83859
1406 * c-attribs.c (handle_access_attribute): New function.
1407 (c_common_attribute_table): Add new attribute.
1408 (get_argument_type): New function.
1409 (append_access_attrs): New function.
1410 (get_nonnull_operand): Rename...
1411 (get_attribute_operand): ...to this.
1412 * c-common.c (get_nonnull_operand): Rename...
1413 (get_attribute_operand): ...to this.
1414
6c80b1b5
JM
14152019-11-21 Joseph Myers <joseph@codesourcery.com>
1416
1417 * c-attribs.c (handle_fallthrough_attribute): Use pedwarn instead
1418 of warning.
1419
192961ff
JM
14202019-11-19 Joseph Myers <joseph@codesourcery.com>
1421
1422 * c-common.c (attribute_fallthrough_p): In C, use pedwarn not
1423 warning for standard attributes mixed with fallthrough attributes.
1424
f8aea5e3
JM
14252019-11-15 Joseph Myers <joseph@codesourcery.com>
1426
1427 * c-attribs.c (handle_fallthrough_attribute): Remove static.
1428 * c-common.h (handle_fallthrough_attribute): Declare.
1429
2cc94aa8
JM
14302019-11-15 Joseph Myers <joseph@codesourcery.com>
1431
1432 * c-attribs.c (handle_deprecated_attribute): Remove static.
1433 * c-common.h (handle_deprecated_attribute): Declare.
1434
7c5890cc
JM
14352019-11-14 Joseph Myers <joseph@codesourcery.com>
1436
1437 * c-lex.c (lex_charconst): Make CPP_UTF8CHAR constants unsigned
1438 char for C.
1439
b2417b59
JJ
14402019-11-14 Jakub Jelinek <jakub@redhat.com>
1441
d0ec7c93
JJ
1442 * c-omp.c (c_omp_check_context_selector): Add nvidia to the list of
1443 valid vendors.
1444
b2417b59
JJ
1445 * c-omp.c (c_omp_check_context_selector): Handle name lists
1446 containing string literals. Don't diagnose atomic_default_mem_order
1447 with multiple props.
1448
00be2a5f
JM
14492019-11-13 Joseph Myers <joseph@codesourcery.com>
1450
1451 * c-cppbuiltin.c (builtin_define_float_constants): Also define
1452 NORM_MAX constants. Update call to get_max_float.
1453 (LAZY_HEX_FP_VALUES_CNT): Update value to include NORM_MAX
1454 constants.
1455
2dbad62d
EB
14562019-11-13 Eric Botcazou <ebotcazou@adacore.com>
1457
1458 * c-ada-spec.c (get_underlying_decl): Do not look through typedefs.
1459 (dump_forward_type): Do not generate a declaration for function types.
1460 (dump_nested_type) <ARRAY_TYPE>: Do not generate a nested declaration
1461 of the component type if it is declared in another file.
1462
6ed76044
ML
14632019-11-12 Martin Liska <mliska@suse.cz>
1464
1465 * c-opts.c (c_common_post_options):
1466 Use SET_OPTION_IF_UNSET.
1467
62aee289
MR
14682019-11-12 Maciej W. Rozycki <macro@codesourcery.com>
1469 Frederik Harwath <frederik@codesourcery.com>
1470
1471 gcc/c-family/
1472 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_SERIAL enumeration
1473 constant.
1474 * c-pragma.c (oacc_pragmas): Add "serial" entry.
1475
f486280c
RS
14762019-11-08 Richard Sandiford <richard.sandiford@arm.com>
1477
1478 * c-common.h (gnu_vector_type_p): New function.
1479 * c-common.c (c_build_vec_perm_expr): Require __builtin_shuffle
1480 vectors to satisfy gnu_vector_type_p.
1481 (c_build_vec_convert): Likewise __builtin_convertvector.
1482 (convert_vector_to_array_for_subscript): Likewise when applying
1483 implicit vector to array conversion.
1484 (scalar_to_vector): Likewise when converting vector-scalar
1485 operations to vector-vector operations.
1486
017c6491
JM
14872019-11-08 Joseph Myers <joseph@codesourcery.com>
1488
1489 * c.opt (Wold-style-definition): Initialize to -1.
1490 * c-opts.c (c_common_post_options): Set warn_old_style_definition
1491 to flag_isoc2x if not set explicitly.
1492
c01bd174
JM
14932019-11-07 Joseph Myers <joseph@codesourcery.com>
1494
1495 * c-attribs.c (parse_tm_stmt_attr): Handle scoped attributes.
1496
0df65305
JM
14972019-11-05 Jason Merrill <jason@redhat.com>
1498
1499 * c-opts.c (c_common_post_options): -fconcepts-ts implies
1500 -fconcepts.
1501
e0c866dd
KK
15022019-11-04 Kamlesh Kumar <kamleshbhalui@gmail.com>
1503
1504 * c-opts.c (c_common_post_options): Update
1505 latest_abi_version.
1506
f968ef9b
JJ
15072019-11-02 Jakub Jelinek <jakub@redhat.com>
1508
d0c464d2
JJ
1509 * c-common.h (c_omp_get_context_selector): Remove.
1510 * c-omp.c (c_omp_get_context_selector): Moved to omp-general.c
1511 and renamed to omp_get_context_selector.
1512
917dd789
JJ
1513 * c-omp.c (c_omp_mark_declare_variant): Use
1514 omp_context_selector_set_compare.
1515
f968ef9b
JJ
1516 PR c++/88335 - Implement P1073R3: Immediate functions
1517 * c-common.h (enum rid): Add RID_CONSTEVAL.
1518 * c-common.c (c_common_reswords): Add consteval.
1519
5f6705b7
JJ
15202019-11-01 Martin Sebor <msebor@redhat.com>
1521
1522 PR middle-end/91679
1523 PR middle-end/91647
1524 PR middle-end/91463
1525 PR middle-end/92312
1526 * c-pretty-print.c (direct_abstract_declarator): Print
1527 bound in zero-length arrays.
1528 * c.opt (-Wzero-length-bounds): New option.
1529
43f1814c
NS
15302019-10-30 Nathan Sidwell <nathan@acm.org>
1531
1532 * c-cppbuiltin.c (c_cpp_builtins): Add 'L' suffix to feature
1533 macros.
1534
ad1539d5
MS
15352019-10-28 Martin Sebor <msebor@redhat.com>
1536
1537 PR c/66970
1538 * c-common.c (c_common_nodes_and_builtins): Call c_define_builtins
1539 even when only preprocessing.
1540 * c-common.h (names_builtin_p): Declare new function.
1541 * c-lex.c (init_c_lex): Set has_builtin.
1542 (c_common_has_builtin): Define a new function.
1543 * c-ppoutput.c (init_pp_output): Set has_builtin.
1544
135df52c
JJ
15452019-10-24 Jakub Jelinek <jakub@redhat.com>
1546
1547 * c-common.h (c_omp_context_selector_matches): Remove.
1548 * c-omp.c (c_omp_context_selector_matches): Remove.
1549 * c-attribs.c (c_common_attribute_table): Add
1550 "omp declare target {host,nohost,block}" attributes.
1551
8ad0c477
JM
15522019-10-17 JeanHeyd Meneide <phdofthehouse@gmail.com>
1553
1554 * c-lex.c (c_common_has_attribute): Update nodiscard value.
1555
56898e43
RS
15562019-10-14 Richard Sandiford <richard.sandiford@arm.com>
1557
1558 * c-common.h (user_facing_original_type_p): Declare.
1559 * c-common.c: Include c-spellcheck.h.
1560 (user_facing_original_type_p): New function.
1561
20de9568
JJ
15622019-10-12 Jakub Jelinek <jakub@redhat.com>
1563
1564 * c-common.h (c_omp_mark_declare_variant,
1565 c_omp_context_selector_matches): Declare.
1566 * c-omp.c: Include attribs.h, gimplify.h, cgraph.h, symbol-summary.h
1567 and hsa-common.h.
1568 (c_omp_get_context_selector): Support second argument NULL.
1569 (c_omp_mark_declare_variant, c_omp_context_selector_matches): New
1570 functions.
1571 * c-attribs.c (c_common_attribute_table): Remove "omp declare variant"
1572 attribute, add "omp declare variant base" and
1573 "omp declare variant variant" attributes.
1574
175a85b2
JM
15752019-10-11 Joseph Myers <joseph@codesourcery.com>
1576
1577 * c.opt (Wc11-c2x-compat): Add CPP(cpp_warn_c11_c2x_compat)
1578 CppReason(CPP_W_C11_C2X_COMPAT).
1579
fe2bc27c
JM
15802019-10-11 Joseph Myers <joseph@codesourcery.com>
1581
1582 * c-common.c (c_common_reswords): Do not use D_EXT for _Decimal32,
1583 _Decimal64 and _Decimal128.
1584
27dfdc0f
JM
15852019-10-10 Joseph Myers <joseph@codesourcery.com>
1586
1587 * c-cppbuiltin.c (c_cpp_builtins): Do not define macros for DFP
1588 types if DFP not supported.
1589
94e7f906
JJ
15902019-10-10 Jakub Jelinek <jakub@redhat.com>
1591
1592 * c-common.h (c_omp_check_context_selector,
1593 c_omp_get_context_selector): Declare.
1594 * c-omp.c (c_omp_declare_simd_clauses_to_numbers): Fix spelling
1595 in diagnostic message.
1596 (c_omp_check_context_selector, c_omp_get_context_selector): New
1597 functions.
1598 * c-attribs.c (c_common_attribute_table): Add "omp declare variant"
1599 attribute.
1600 (handle_omp_declare_variant_attribute): New function.
1601
a7160771
MS
16022019-10-09 Martin Sebor <msebor@redhat.com>
1603
1604 PR tree-optimization/90879
1605 * c.opt (-Wstring-compare): New option.
1606
cb57504a
JM
16072019-10-08 Andrew Sutton <asutton@lock3software.com>
1608 Jason Merrill <jason@redhat.com>
1609
1610 Update the concepts implementation to conform to the C++20
1611 specification, improve compile times, and generally clean up
1612 the implementation.
1613
1614 * c-cppbuiltin.c (c_cpp_builtins): Use new feature test values for
1615 concepts when -std=c++2a. Bump __cpp_concepts to 201907.
1616 * c.opt: Add -Wconcepts-ts.
1617 * c-opts.c (c_common_post_options): Warn when -fconcepts is used
1618 with -std=c++2a. Disable warning for -fconcepts in C++20 mode.
1619 (set_std_cxx2a): Enable concepts by default.
1620
fbb2a6dc
JM
16212019-10-08 Joseph Myers <joseph@codesourcery.com>
1622
1623 * c-opts.c (c_common_post_options): Set
1624 -fno-fp-int-builtin-inexact for C2X.
1625
8e007055
JJ
16262019-10-05 Jakub Jelinek <jakub@redhat.com>
1627
1628 PR c++/91369 - Implement P0784R7: constexpr new
1629 * c-cppbuiltin.c (c_cpp_builtins): Predefine
1630 __cpp_constexpr_dynamic_alloc=201907 for -std=c++2a.
1631
843f104d
JM
16322019-10-04 Joseph Myers <joseph@codesourcery.com>
1633
1634 PR c/82752
1635 * c-format.c (C_STD_VER): Handle C2x.
1636 (C_STD_NAME): Likewise.
1637 (strftime_flag_specs): Add 'O' modifier with 'p' flag.
1638 (time_char_table): Use separate entry for 'B' and 'b', with 'O'
1639 modifier allowed and 'p' flag.
1640 * c-format.h (enum format_std_version): Add STD_C2X.
1641 (struct format_char_info): Mention 'p' in comment on flags2.
1642
e9c9a142
DM
16432019-10-01 David Malcolm <dmalcolm@redhat.com>
1644
1645 * c-opts.c (c_diagnostic_finalizer): Temporarily clear prefix when
1646 calling diagnostic_show_locus, rather than destroying it afterwards.
1647
7552c36a
JJ
16482019-10-01 Jakub Jelinek <jakub@redhat.com>
1649
1650 PR c++/91925
1651 * c-warn.c (check_alignment_of_packed_member): Ignore FIELD_DECLs
1652 with NULL DECL_FIELD_OFFSET.
1653
8209db25
RS
16542019-10-01 Richard Sandiford <richard.sandiford@arm.com>
1655
1656 * c-pretty-print.c (pp_c_specifier_qualifier_list): If a vector type
1657 has a type name, use it in preference to the __vector syntax.
1658
9343bf99
RS
16592019-09-30 Richard Sandiford <richard.sandiford@arm.com>
1660
1661 * c-pretty-print.c (pp_c_parameter_type_list): Avoid printing
1662 two spaces between a comma and "...".
1663
59bc434a
JJ
16642019-09-27 Jakub Jelinek <jakub@redhat.com>
1665
1666 PR c++/88203
1667 * c-common.h (c_omp_predefined_variable): Declare.
1668 * c-omp.c (c_omp_predefined_variable): New function.
1669 (c_omp_predetermined_sharing): Return OMP_CLAUSE_DEFAULT_SHARED
1670 for predefined variables.
1671
c6447c20
RS
16722019-09-27 Richard Sandiford <richard.sandiford@arm.com>
1673
1674 * c-common.h (build_function_call_vec): Take the original
1675 function decl as an optional final parameter.
1676 (check_builtin_function_arguments): Take the original function decl.
1677 * c-common.c (check_builtin_function_arguments): Likewise.
1678 Handle all built-in functions, not just BUILT_IN_NORMAL ones.
1679 Use targetm.check_builtin_call to check BUILT_IN_MD functions.
1680
c4438114
JM
16812019-09-15 Jason Merrill <jason@redhat.com>
1682
1683 * c-warn.c (warn_logical_operator): Strip location wrappers. Don't
1684 fold_for_warn in "|| mask" warning.
1685
68a57628
ML
16862019-09-10 Martin Liska <mliska@suse.cz>
1687
1688 * c.opt: Use newly added WarnRemoved.
1689
f48ef52e
ML
16902019-09-09 Martin Liska <mliska@suse.cz>
1691
1692 * c.opt: Update comment of removed
1693 options that are preserved only for backward
1694 compatibility.
1695
67f6e649
ML
16962019-09-06 Martin Liska <mliska@suse.cz>
1697
1698 PR c++/91125
1699 * c-common.c: Remove definition of flag_use_repository.
1700 * c-common.h: Likewise.
1701 * c-opts.c (c_common_handle_option):
1702 Do not handle OPT_frepo option.
1703 * c.opt: Mark the option with Deprecated.
1704
db9d2274
MP
17052019-09-04 Marek Polacek <polacek@redhat.com>
1706
1707 * c.opt (fdeduce-init-list): Ignored.
1708
68e2c199
PK
17092019-09-04 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1710
1711 PR c/78736
1712 * c.opt (Wenum-conversion): New option.
1713
7a4418a5
JL
17142019-09-03 Jozef Lawrynowicz <jozef.l@mittosystems.com>
1715
1716 * c-attribs.c (handle_section_attribute): Call the
1717 handle_generic_attribute target hook after performing target
1718 independent processing.
1719 (handle_noinit_attribute): Likewise.
1720
5f76ab15
ILT
17212019-09-03 Ian Lance Taylor <iant@golang.org>
1722
1723 * c-cppbuiltin.c (builtin_define_with_hex_fp_value): Always expand
1724 when using -fgo-dump-spec.
1725
ae0d3f6a
ML
17262019-09-02 Martin Liska <mliska@suse.cz>
1727
1728 PR c++/91155
1729 * c-common.c (fname_as_string): Use cxx_printable_name for
1730 __PRETTY_FUNCTION__ same as was used before r265711.
1731
8a902edb
MP
17322019-08-28 Marek Polacek <polacek@redhat.com>
1733
1734 Implement P1152R4: Deprecating some uses of volatile.
1735 PR c++/91361
1736 * c-opts.c (c_common_post_options): Enable -Wvolatile by
1737 default for C++2a, unless -Wno-deprecated.
1738 * c.opt (Wvolatile): New warning.
1739
4742dbe7
MP
17402019-08-28 Marek Polacek <polacek@redhat.com>
1741
1742 PR c++/91360 - Implement C++20 P1143R2: constinit.
1743 * c-common.c (c_common_reswords): Add constinit and __constinit.
1744 (keyword_is_decl_specifier): Handle RID_CONSTINIT.
1745 * c-common.h (enum rid): Add RID_CONSTINIT, RID_FIRST_CXX20, and
1746 RID_LAST_CXX20.
1747 (D_CXX20): Define.
1748 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_constinit.
1749 * c-format.c (cxx_keywords): Add "constinit".
1750 * c.opt (Wc++2a-compat, Wc++20-compat): New options.
1751
6a074892
JJ
17522019-08-27 Jakub Jelinek <jakub@redhat.com>
1753
1754 PR c++/91415
1755 * c-common.c (verify_tree): For LSHIFT_EXPR, RSHIFT_EXPR,
1756 COMPONENT_REF and ARRAY_REF in cxx_dialect >= cxx17 mode handle it
1757 like COMPOUND_EXPR rather than normal expression.
1758
22f8849d
IS
17592019-08-23 Iain Sandoe <iain@sandoe.co.uk>
1760
1761 PR pch/61250
1762 * c-lex.c (c_lex_with_flags): Don't call
1763 c_common_no_more_pch () from here.
1764
df375b03
JJ
17652019-08-23 Jakub Jelinek <jakub@redhat.com>
1766
1767 PR middle-end/91283
1768 * c-common.c (c_ts18661_flt_eval_method): Use flag_excess_precision
1769 instead of flag_excess_precision_cmdline.
1770 * c-cppbuiltin.c (c_cpp_flt_eval_method_iec_559): Likewise.
1771 * c-opts.c (c_common_post_options): Likewise.
1772
14b7950f
MS
17732019-08-22 Martin Sebor <msebor@redhat.com>
1774
1775 PR middle-end/91490
1776 * c-common.c (braced_list_to_string): Add argument and overload.
1777 Handle flexible length arrays and unions.
1778
8bb2ee59
EB
17792019-08-21 Eric Botcazou <ebotcazou@adacore.com>
1780
1781 * c-ada-spec.c (dump_ada_function_declaration): Be prepared for broken
1782 function declarations where arguments are missing. Rename variables.
1783
21c1e205
RB
17842019-08-15 Richard Biener <rguenther@suse.de>
1785
1786 * c-common.c (c_stddef_cpp_builtins): When the GIMPLE FE is
1787 enabled, define __SIZETYPE__.
1788
f0033821
CL
17892019-08-14 Christophe Lyon <christophe.lyon@linaro.org>
1790
1791 * c-attribs.c (c_common_attribute_table): Add "noinit" entry. Add
1792 exclusion with "section" attribute.
1793 (attr_noinit_exclusions): New table.
1794 (handle_noinit_attribute): New function.
1795
4d732405
RS
17962019-08-13 Richard Sandiford <richard.sandiford@arm.com>
1797
1798 PR middle-end/91421
1799 * c-common.c (resolve_overloaded_builtin): Use
1800 copy_decl_built_in_function.
1801
51ad8481
MS
18022019-08-13 Martin Sebor <msebor@redhat.com>
1803
1804 PR c/80619
1805 * c-format.c (printf_length_specs): Set FMT_LEN_w for "w".
1806 (asm_fprintf_length_spec): Same.
1807 * c-format.h (format_lengths): Add FMT_LEN_w.
1808
77eb117f
JJ
18092019-08-10 Jakub Jelinek <jakub@redhat.com>
1810
1811 * c-pragma.h (enum pragma_omp_clause): Add
1812 PRAGMA_OMP_CLAUSE_DEVICE_TYPE.
1813
398e3feb
JJ
18142019-08-07 Jakub Jelinek <jakub@redhat.com>
1815
1816 * c-pragma.h (enum pragma_omp_clause): Add
1817 PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR. Set PRAGMA_OACC_CLAUSE_USE_DEVICE
1818 equal to PRAGMA_OMP_CLAUSE_USE_DEVICE_PTR instead of being a separate
1819 enumeration value.
1820
ab574db6
MP
18212019-08-05 Marek Polacek <polacek@redhat.com>
1822
1823 PR c++/91338 - Implement P1161R3: Deprecate a[b,c].
1824 * c-opts.c (c_common_post_options): Enable -Wcomma-subscript by
1825 default for C++2a, unless -Wno-deprecated.
1826 * c.opt (Wcomma-subscript): New warning.
1827
554a530f
JJ
18282019-07-20 Jakub Jelinek <jakub@redhat.com>
1829
1830 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_LOOP.
1831 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_BIND.
1832 * c-pragma.c (omp_pragmas_simd): Add PRAGMA_OMP_LOOP entry.
1833 * c-common.h (enum c_omp_clause_split): Add C_OMP_CLAUSE_SPLIT_LOOP.
1834 * c-omp.c (c_omp_split_clauses): Add support for 4 new combined
1835 constructs with the loop construct.
1836
1a888209
JJ
18372019-07-13 Jakub Jelinek <jakub@redhat.com>
1838
1839 PR c/91149
1840 * c-omp.c (c_omp_split_clauses): Fix a pasto in
1841 OMP_CLAUSE_REDUCTION_TASK handling.
1842
1fdd6f04
JJ
18432019-07-12 Jakub Jelinek <jakub@redhat.com>
1844
1845 * c-pragma.h (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_ORDER.
1846 * c-omp.c (c_omp_split_clauses): Handle splitting of OMP_CLAUSE_ORDER.
1847
99b1c316
MS
18482019-07-09 Martin Sebor <msebor@redhat.com>
1849
1850 PR c++/61339
1fdd6f04 1851 * c-opts.c (handle_deferred_opts): Change class-key of PODs to struct
99b1c316
MS
1852 and others to class.
1853 * c-pretty-print.h: Same.
1854
6c1dae73
MS
18552019-07-09 Martin Sebor <msebor@redhat.com>
1856
1857 PR c++/61339
1858 * c-format.c (check_argument_type): Change class-key from class to
1859 struct and vice versa to match convention and avoid -Wclass-is-pod
1860 and -Wstruct-no-pod.
1861 * c-pretty-print.h: Same.
1862
8ba6ea87
ML
18632019-07-03 Martin Liska <mliska@suse.cz>
1864
1865 * c-common.c (try_to_locate_new_include_insertion_point): Remove
1866 dead assignemts.
1867
83eb9522
JJ
18682019-07-03 Jakub Jelinek <jakub@redhat.com>
1869
1870 * c-omp.c (c_omp_split_clauses): Put OMP_CLAUSE_REDUCTION_INSCAN
1871 clauses on OMP_FOR rather than OMP_PARALLEL when OMP_FOR is combined
1872 with OMP_PARALLEL.
1873
1c6ffbab
QZ
18742019-07-02 qing zhao <qing.zhao@oracle.com>
1875
1876 PR preprocessor/90581
1877 * c-opts.c (c_common_handle_option): Handle -fmax-include-depth.
1878 * c.opt: Add new option -fmax-include-depth.
1879
7ffc7de5
JM
18802019-06-26 Jason Merrill <jason@redhat.com>
1881
1882 PR c++/55442 - memory-hog with highly recursive constexpr.
1883 * c.opt (fconstexpr-loop-limit): New.
1884
361af3e4
JJ
18852019-06-25 Jakub Jelinek <jakub@redhat.com>
1886
1887 PR sanitizer/90954
1888 * c-omp.c (c_finish_omp_atomic): Allow tree_invariant_p in addition
1889 to SAVE_EXPR in first operand of a COMPOUND_EXPR.
1890
ab20d992
JJ
18912019-06-25 Jozef Lawrynowicz <jozef.l@mittosystems.com>
1892
1893 * c-common.c (c_common_nodes_and_builtins): Define
1894 alternate "__intN__" name for "__intN" types.
1895
f4af4019
JH
18962019-06-24 Jan Hubicka <jh@suse.cz>
1897
1898 * c-common.c (braced_lists_to_strings): Check that
1899 type is array or integer prior checking string flag.
1900
da9e9b57
MB
19012019-06-21 Matthew Beliveau <mbelivea@redhat.com>
1902
1903 PR c++/90875 - added -Wswitch-outside-range option
1904 * c.opt (Wswitch-outside-range): Added new option.
1905 * c-warn.c (c_do_switch_warnings): Use OPT_Wswitch-outside-range.
1906
3f3d6a6f
MP
19072019-06-21 Marek Polacek <polacek@redhat.com>
1908
1909 PR c++/90953 - ICE with -Wmissing-format-attribute.
1910 * c-common.c (check_function_arguments_recurse): Use
1911 get_attribute_name.
1912 (check_missing_format_attribute): Likewise.
1913
1bf32c11
MP
19142019-06-19 Marek Polacek <polacek@redhat.com>
1915
1916 PR c++/60364 - noreturn after first decl not diagnosed.
1917 * c-attribs.c (handle_noreturn_attribute): No longer static.
1918 * c-common.h (handle_noreturn_attribute, attr_noreturn_exclusions):
1919 Declare.
1920 * c-format.c (check_function_format): Use get_attribute_name.
1921
a04c0734
MS
19222019-06-19 Martin Sebor <msebor@redhat.com>
1923
1924 PR translation/90156
1925 * c-format.c (function_format_info::format_type): Adjust type.
1926 (function_format_info::is_raw): New member.
1927 (decode_format_type): Adjust signature. Handle "raw" diag attributes.
1928 (decode_format_attr): Adjust call to decode_format_type.
1929 Avoid a redundant call to convert_format_name_to_system_name.
1930 Avoid abbreviating the word "arguments" in a diagnostic.
1931 (format_warning_substr): New function.
1932 (avoid_dollar_number): Quote dollar sign in a diagnostic.
1933 (finish_dollar_format_checking): Same.
1934 (check_format_info): Same.
1935 (struct baltoks_t): New.
1936 (c_opers, c_keywords, cxx_keywords, badwords, contrs): New arrays.
1937 (maybe_diag_unbalanced_tokens, check_tokens, check_plain): New
1938 functions.
1939 (check_format_info_main): Call check_plain. Use baltoks_t. Call
1940 maybe_diag_unbalanced_tokens.
1941 (handle_format_attribute): Spell out the word "arguments" in
1942 a diagnostic.
1943
d3786ebb
MB
19442019-06-11 Matthew Beliveau <mbelivea@redhat.com>
1945
1946 PR c++/90449 - add -Winaccessible-base option.
1947 * c.opt (Winaccessible-base): New option.
1948
bf38f7e9
JJ
19492019-06-10 Jakub Jelinek <jakub@redhat.com>
1950
1951 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_SCAN.
1952 * c-pragma.c (omp_pragmas_simd): Add #pragma omp scan.
1953 * c-omp.c (c_omp_split_clauses): Diagnose inscan reductions on
1954 combined/composite constructs where it is not allowed. Copy over
1955 OMP_CLAUSE_REDUCTION_INSCAN.
1956
0ecf545c
MS
19572019-06-05 Martin Sebor <msebor@redhat.com>
1958
1959 * c-attribs.c (handle_mode_attribute): Adjust quoting and hyphenation.
1960 (handle_alias_ifunc_attribute): Same.
1961 (handle_copy_attribute): Same.
1962 (handle_weakref_attribute): Same.
1963 (handle_nonnull_attribute): Same.
1964 * c-warn.c (warn_for_sign_compare): Same.
1965 (warn_for_restrict): Same.
1966 * c.opt: Same.
1967
36b34127
MS
19682019-06-05 Martin Sebor <msebor@redhat.com>
1969
1970 * c-pragma.c (handle_pragma_weak): Adjust quoting in a diagnostic.
1971 * c.opt (-Wformat-diag): Remove a spurious period.
1972
357a352f
JJ
19732019-05-29 Jakub Jelinek <jakub@redhat.com>
1974
1975 PR c/90628
1976 * c-common.c (check_builtin_function_arguments)
1977 <case BUILTIN_*_OVERFLOW>: Diagnose pointer to const qualified integer
1978 as last argument.
1979
2b8235ea
EB
19802019-05-23 Eric Botcazou <ebotcazou@adacore.com>
1981
1982 * c-ada-spec.c (compare_node): Compare the DECL_UIDs as a last resort.
1983
6d86ddc4
ML
19842019-05-22 Martin Liska <mliska@suse.cz>
1985
1986 PR lto/90500
1987 * c-attribs.c (handle_copy_attribute): Do not copy
1988 target_clones attribute.
1989
419ba5b9
EB
19902019-05-21 Eric Botcazou <ebotcazou@adacore.com>
1991
1992 * c-ada-spec.h (enum cpp_operation): Add IS_ASSIGNMENT_OPERATOR.
1993 * c-ada-spec.c (print_assignment_operator): New function.
1994 (dump_ada_declaration) <FUNCTION_DECL>: Call it do dump explicit copy
1995 assignment operators declared as methods and filter out the others.
1996
e03436e7
TS
19972019-05-17 Thomas Schwinge <thomas@codesourcery.com>
1998
1999 PR c/89433
2000 * c-attribs.c (c_common_attribute_table): Set min_len to -1 for
2001 "omp declare target".
2002
a9c697b8
MS
20032019-05-16 Martin Sebor <msebor@redhat.com>
2004
ab20d992
JJ
2005 * c-attribs.c (handle_no_sanitize_attribute): Quote identifiers,
2006 keywords, operators, and types in diagnostics.
2007 (handle_scalar_storage_order_attribute): Same.
2008 (handle_mode_attribute): Same.
2009 (handle_visibility_attribute): Same.
2010 (handle_assume_aligned_attribute): Same.
2011 (handle_no_split_stack_attribute): Same.
2012 * c-common.c (shorten_compare): Same.
2013 (c_common_truthvalue_conversion): Same.
2014 (cb_get_source_date_epoch): Same.
2015 * c-lex.c (cb_def_pragma): Quote keywords, operators, and types
2016 in diagnostics.
2017 (interpret_float): Same.
2018 * c-omp.c (c_finish_omp_for): Same.
2019 * c-opts.c (c_common_post_options): Same.
2020 * c-pch.c (c_common_pch_pragma): Same.
2021 * c-pragma.c (pop_alignment): Same.
2022 (handle_pragma_pack): Same.
2023 (apply_pragma_weak): Same.
2024 (handle_pragma_weak): Same.
2025 (handle_pragma_scalar_storage_order): Same.
2026 (handle_pragma_redefine_extname): Same.
2027 (add_to_renaming_pragma_list): Same.
2028 (maybe_apply_renaming_pragma): Same.
2029 (push_visibility): Same.
2030 (handle_pragma_visibility): Same.
2031 (handle_pragma_optimize): Same.
2032 (handle_pragma_message): Same.
2033 * c-warn.c (warn_for_omitted_condop): Same.
2034 (lvalue_error): Same.
a9c697b8 2035
6b943512
RB
20362019-05-15 Richard Biener <rguenther@suse.de>
2037
2038 PR c/90474
2039 * c-common.c (c_common_mark_addressable_vec): Also mark
2040 a COMPOUND_LITERAL_EXPR_DECL addressable similar to
2041 c_mark_addressable.
ab20d992 2042
b744fc85
NS
20432019-05-06 Nathan Sidwell <nathan@acm.org>
2044
2045 * c-opts.c (handle_defered_opts): Rename struct deps to struc mkdeps.
2046
598f50d7
NS
20472019-04-30 Nathan Sidwell <nathan@acm.org>
2048
2049 * c-common.c (c_common_init_ts): Use MARK_TS_EXP. Mark SIZEOF_EXPR.
2050
5bcc5a3b
ML
20512019-04-30 Martin Liska <mliska@suse.cz>
2052
2053 * c-pragma.c (handle_pragma_diagnostic): Provide hints
2054 for unknown options.
2055
e78a87f7
RS
20562019-04-26 Richard Sandiford <richard.sandiford@arm.com>
2057
2058 * c-warn.c (strict_aliasing_warning): Apply COMPLETE_TYPE_P to
2059 the pointer target rather than the pointer itself.
2060
c280b7ee
JJ
20612019-04-19 Jakub Jelinek <jakub@redhat.com>
2062
2063 PR c/89888
2064 * c-common.h (c_add_case_label): Remove orig_type and outside_range_p
2065 arguments.
2066 (c_do_switch_warnings): Remove outside_range_p argument.
2067 * c-common.c (check_case_bounds): Removed.
2068 (c_add_case_label): Remove orig_type and outside_range_p arguments.
2069 Don't call check_case_bounds. Fold low_value as well as high_value.
2070 * c-warn.c (c_do_switch_warnings): Remove outside_range_p argument.
2071 Check for case labels outside of range of original type here and
2072 adjust them.
2073
8e8225e6
JJ
20742019-04-12 Jakub Jelinek <jakub@redhat.com>
2075
63b8a166
JJ
2076 PR translation/90041
2077 * c.opt (-fhandle-exceptions): Use %< and %> around option names
2078 in the Warn diagnostics.
2079
8e8225e6
JJ
2080 PR c/89946
2081 * c-attribs.c (handle_patchable_function_entry_attribute): Add
2082 function comment. Warn if arguments of the attribute are not positive
2083 integer constants.
2084
53a3f614
EB
20852019-04-09 Eric Botcazou <ebotcazou@adacore.com>
2086
2087 * c-ada-spec.c (print_destructor): Deal with deleting destructors.
2088 (dump_ada_declaration) <FUNCTION_DECL>: Likewise.
2089
22be5873
EB
20902019-04-07 Eric Botcazou <ebotcazou@adacore.com>
2091
2092 * c-ada-spec.c (is_float128): New predicate extracted from...
2093 (dump_ada_node) <COMPLEX_TYPE>: Use it to recognize __cfloat128.
2094 <REAL_TYPE>: ...here. Call it.
2095
34facf20
DM
20962019-04-05 David Malcolm <dmalcolm@redhat.com>
2097
2098 PR c/89985
2099 * c-warn.c (check_address_or_pointer_of_packed_member): Add
2100 auto_diagnostic_group. Guard inform calls by result of
2101 warning_at call.
2102
05564120
MP
21032019-04-05 Marek Polacek <polacek@redhat.com>
2104
ab20d992 2105 PR c++/89973 - -Waddress-of-packed-member ICE with invalid conversion.
05564120
MP
2106 * c-warn.c (check_address_or_pointer_of_packed_member): Check the type
2107 of RHS.
2108
7a506c3c
JM
21092019-04-03 Jason Merrill <jason@redhat.com>
2110
2111 PR c++/86586 - -fcompare-debug=-Wsign-compare.
2112 * c-warn.c (warn_for_sign_compare): Call fold_for_warn.
2113
ddeae8c8
MS
21142019-04-01 Martin Sebor <msebor@redhat.com>
2115
2116 PR c/89685
2117 * c-attribs.c (handle_copy_attribute): Handle references and
2118 non-constant expressions.
2119
a15ffa22
JJ
21202019-03-22 Jakub Jelinek <jakub@redhat.com>
2121
2122 PR c++/87481
2123 * c.opt (-fconstexpr-ops-limit=): New option.
2124
36a3a7a3
JJ
21252019-03-21 Jakub Jelinek <jakub@redhat.com>
2126
2127 * c-common.c (per_file_includes_t): Use false as Lazy in hash_set
2128 template param.
2129
bec1da64
MS
21302019-03-19 Martin Sebor <msebor@redhat.com>
2131
2132 PR tree-optimization/89688
2133 * c-common.c (braced_list_to_string): Make static.
2134 (braced_lists_to_strings): Define new function.
2135 * c-common.h (braced_list_to_string): Remove.
2136 (braced_lists_to_strings): Declare.
2137
1fe61adf
ML
21382019-03-12 Martin Liska <mliska@suse.cz>
2139
2140 * c-opts.c (c_common_handle_option): Wrap option with %< and %>.
2141
93964ebd
ML
21422019-03-11 Martin Liska <mliska@suse.cz>
2143
2144 * c-opts.c (c_common_post_options): Wrap apostrophes
2145 in gcc internal format with %'.
2146
a3f9f006
ML
21472019-03-11 Martin Liska <mliska@suse.cz>
2148
2149 * c-attribs.c (handle_nocf_check_attribute): Wrap an option name
2150 in a string format message and fix GNU coding style.
2151 * c-common.c (vector_types_convertible_p): Likewise.
2152 (c_build_vec_perm_expr): Likewise.
2153 * c-indentation.c (get_visual_column): Likewise.
2154 * c-opts.c (c_common_handle_option): Likewise.
2155 (c_common_post_options): Likewise.
2156 (sanitize_cpp_opts): Likewise.
2157 * c-pch.c (c_common_pch_pragma): Likewise.
2158 * c-pragma.c (handle_pragma_pack): Likewise.
2159
1db01ff9
JJ
21602019-03-08 Jakub Jelinek <jakub@redhat.com>
2161
2162 PR tree-optimization/89550
2163 * c-common.c (c_common_truthvalue_conversion): Only set
2164 TREE_NO_WARNING if warning_at returned true.
2165 * c-warn.c (overflow_warning, warn_logical_operator): Likewise.
2166
ba790e6f
JJ
21672019-02-25 Sandra Loosemore <sandra@codesourcery.com>
2168 Martin Sebor <msebor@gmail.com>
2169
2170 * c.opt (Wmissing-attributes): Clean up doc string.
2171
7da73ba7
JJ
21722019-02-25 Jakub Jelinek <jakub@redhat.com>
2173
2174 PR c/89495
2175 * c-format.c (maybe_read_dollar_number): Compute nargnum in
2176 HOST_WIDE_INT type to avoid overflows and change overflow_flag
2177 checking.
2178
921bb9d1
RB
21792019-02-22 Richard Biener <rguenther@suse.de>
2180
2181 * c-pch.c (no_checksum): Remove.
2182 (pch_init): Remove assertion that executable_checksum is not
2183 all zero.
2184 (c_common_valid_pch): Likewise.
2185
e2ebb05c
MS
21862019-02-18 Martin Sebor <msebor@redhat.com>
2187
2188 PR middle-end/89294
2189 * c-common.c (invalid_array_size_error): Handle cst_size_not_constant.
2190
3fe53000
DM
21912019-02-16 David Malcolm <dmalcolm@redhat.com>
2192
2193 PR c++/88680
2194 * c-common.c (shorten_compare): Call fold_for_warn on op0 when
2195 implementing -Wtype-limits.
2196
28a8cef1
MS
21972019-02-11 Martin Sebor <msebor@redhat.com>
2198
2199 PR c++/87996
2200 * c-common.c (invalid_array_size_error): New function.
2201 (valid_array_size_p): Call it. Handle size as well as type.
2202 * c-common.h (valid_constant_size_p): New function.
2203 (enum cst_size_error): New type.
2204
ec2be203
DM
22052019-01-31 David Malcolm <dmalcolm@redhat.com>
2206
2207 PR c/89122
2208 * known-headers.cc (get_stdlib_header_for_name): Add
2209 {FLT|DBL|LDBL}_{MAX|MIN} to "hints" array.
2210
8936f047
JJ
22112019-01-31 Jakub Jelinek <jakub@redhat.com>
2212
2213 PR libstdc++/88170
2214 * c-pretty-print.c (pp_c_enumeration_constant): Print always as
2215 a C cast in pp_c_flag_gnu_v3 mode.
2216
6a335b96
JJ
22172019-01-29 Jakub Jelinek <jakub@redhat.com>
2218
2219 PR c/86125
2220 * c-common.c (c_common_nodes_and_builtins): Build type variants for
2221 builtin_structptr_types types even for C.
2222
2a06eba5
BE
22232019-01-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
2224
2225 * c-warn.c (check_address_or_pointer_of_packed_member): Handle the case
2226 when rhs is of array type correctly. Fix handling of nested structures.
2227 Fix handling of indirect_ref together with nop_expr and/or addr_expr.
2228 (check_and_warn_address_or_pointer_of_packed_member): Fix handling of
2229 type casts within nested compound expressions.
2230
18a23298
JJ
22312019-01-22 Jakub Jelinek <jakub@redhat.com>
2232
2233 PR middle-end/88968
2234 * c-omp.c (c_finish_omp_atomic): For bitfield atomics, update type
2235 variable after using BIT_FIELD_REF.
2236
420183d9
L
22372019-01-18 H.J. Lu <hongjiu.lu@intel.com>
2238
2239 PR c/51628
2240 PR c/88664
2241 * c-common.h (warn_for_address_or_pointer_of_packed_member):
2242 Remove the boolean argument.
2243 * c-warn.c (check_address_of_packed_member): Renamed to ...
2244 (check_address_or_pointer_of_packed_member): This. Also
2245 warn pointer conversion.
2246 (check_and_warn_address_of_packed_member): Renamed to ...
2247 (check_and_warn_address_or_pointer_of_packed_member): This.
2248 Also warn pointer conversion.
2249 (warn_for_address_or_pointer_of_packed_member): Remove the
2250 boolean argument. Don't check pointer conversion here.
2251
99063eee
RS
22522019-01-15 Richard Sandiford <richard.sandiford@arm.com>
2253
2254 PR inline-asm/52813
2255 * c.opt (Wdeprecated): Move documentation and variable to common.opt.
2256
a30d0196
JJ
22572019-01-14 Jakub Jelinek <jakub@redhat.com>
2258
2259 * c-cppbuiltin.c (c_cpp_builtin): Define __cpp_guaranteed_copy_elision
2260 and __cpp_nontype_template_parameter_auto. Add a comment that
2261 __cpp_template_auto is deprecated.
2262
2d91f79d
TH
22632019-01-14 Tom Honermann <tom@honermann.net>
2264
2265 Implement P0482R5, char8_t: A type for UTF-8 characters and strings
2266 * c-common.c (c_common_reswords): Add char8_t.
2267 (fix_string_type): Use char8_t for the type of u8 string literals.
2268 (c_common_get_alias_set): char8_t doesn't alias.
2269 (c_common_nodes_and_builtins): Define char8_t as a builtin type in
2270 C++.
2271 (c_stddef_cpp_builtins): Add __CHAR8_TYPE__.
2272 (keyword_begins_type_specifier): Add RID_CHAR8.
2273 * c-common.h (rid): Add RID_CHAR8.
2274 (c_tree_index): Add CTI_CHAR8_TYPE and CTI_CHAR8_ARRAY_TYPE.
2275 Define D_CXX_CHAR8_T and D_CXX_CHAR8_T_FLAGS.
2276 Define char8_type_node and char8_array_type_node.
2277 * c-cppbuiltin.c (cpp_atomic_builtins): Predefine
2278 __GCC_ATOMIC_CHAR8_T_LOCK_FREE.
2279 (c_cpp_builtins): Predefine __cpp_char8_t.
2280 * c-lex.c (lex_string): Use char8_array_type_node as the type of
2281 CPP_UTF8STRING.
2282 (lex_charconst): Use char8_type_node as the type of CPP_UTF8CHAR.
2283 * c-opts.c: If not otherwise specified, enable -fchar8_t when
2284 targeting C++2a.
2285 * c.opt: Add the -fchar8_t command line option.
2286
23db6ced
MS
22872019-01-14 Martin Sebor <msebor@redhat.com>
2288
2289 PR target/88638
2290 * c-attribs.c (positional_argument): Call valid_format_string_type_p
2291 and issue errors if it fails.
2292 * c-common.h (valid_format_string_type_p): Declare.
2293 * c-format.c (valid_stringptr_type_p): Rename...
2294 (valid_format_string_type_p): ...to this and make extern.
2295 (handle_format_arg_attribute): Adjust to new name.
2296 (check_format_string): Same.
2297
234c3818
L
22982019-01-13 H.J. Lu <hongjiu.lu@intel.com>
2299
2300 * c-warn.c (warn_for_address_or_pointer_of_packed_member):
2301 Replace "may may" with "may" in warning message.
2302
d8fcab68
JJ
23032019-01-07 Jakub Jelinek <jakub@redhat.com>
2304
2305 PR c++/85052
2306 * c-common.h (enum rid): Add RID_BUILTIN_CONVERTVECTOR.
2307 (c_build_vec_convert): Declare.
2308 * c-common.c (c_build_vec_convert): New function.
2309
29d24852
MS
23102019-01-04 Martin Sebor <msebor@redhat.com>
2311
2312 PR c/88546
2313 * c-attribs.c (handle_copy_attribute): Avoid copying attribute leaf.
2314 Handle C++ empty throw specification and C11 _Noreturn.
2315 (has_attribute): Also handle C11 _Noreturn.
2316
9069a4c9
MS
23172019-01-04 Martin Sebor <msebor@redhat.com>
2318
2319 PR c/88363
2320 * c-attribs.c (positional_argument): Also accept enumerated types.
2321
a5544970
JJ
23222019-01-01 Jakub Jelinek <jakub@redhat.com>
2323
2324 Update copyright years.
2325
da77eace
L
23262018-12-20 H.J. Lu <hongjiu.lu@intel.com>
2327
2328 PR c/51628
2329 * c-common.h (warn_for_address_or_pointer_of_packed_member): New.
2330 * c-warn.c (check_alignment_of_packed_member): New function.
2331 (check_address_of_packed_member): Likewise.
2332 (check_and_warn_address_of_packed_member): Likewise.
2333 (warn_for_address_or_pointer_of_packed_member): Likewise.
2334 * c.opt: Add -Wno-address-of-packed-member.
2335
573767d4
DM
23362018-12-20 David Malcolm <dmalcolm@redhat.com>
2337
2338 PR c++/87504
2339 * c-warn.c (get_outermost_macro_expansion): New function.
2340 (spelled_the_same_p): Use it to unwind the macro expansions, and
2341 compare the outermost macro in each nested expansion, rather than
2342 the innermost.
2343
a14feb3c
DM
23442018-12-19 David Malcolm <dmalcolm@redhat.com>
2345
2346 PR c++/87504
2347 * c-common.h (warn_tautological_cmp): Convert 1st param from
2348 location_t to const op_location_t &.
2349 * c-warn.c (find_array_ref_with_const_idx_r): Call fold_for_warn
2350 when testing for INTEGER_CST.
2351 (warn_tautological_bitwise_comparison): Convert 1st param from
2352 location_t to const op_location_t &; use it to build a
2353 binary_op_rich_location, and use this.
2354 (spelled_the_same_p): New function.
2355 (warn_tautological_cmp): Convert 1st param from location_t to
2356 const op_location_t &. Warn for macro expansions if
2357 spelled_the_same_p. Use binary_op_rich_location.
2358
dfd7fdca
DM
23592018-12-19 David Malcolm <dmalcolm@redhat.com>
2360
2361 PR c++/43064
2362 PR c++/43486
2363 * c-common.c (unsafe_conversion_p): Fold any location wrapper.
2364 (verify_tree): Handle location wrappers.
2365 (c_common_truthvalue_conversion): Strip any location wrapper.
2366 Handle CONST_DECL.
2367 (fold_offsetof): Strip any location wrapper.
2368 (complete_array_type): Likewise for initial_value.
2369 (convert_vector_to_array_for_subscript): Call fold_for_warn on the
2370 index before checking for INTEGER_CST.
2371 * c-pretty-print.c (c_pretty_printer::primary_expression): Don't
2372 print parentheses around location wrappers.
2373 * c-warn.c (warn_logical_operator): Call fold_for_warn on op_right
2374 before checking for INTEGER_CST.
2375 (warn_tautological_bitwise_comparison): Call
2376 tree_strip_any_location_wrapper on lhs, rhs, and bitop's operand
2377 before checking for INTEGER_CST.
2378 (readonly_error): Strip any location wrapper.
2379 (warn_array_subscript_with_type_char): Strip location wrappers
2380 before checking for INTEGER_CST. Use the location of the index if
2381 available.
2382
5c8b3702
JM
23832018-12-06 Jason Merrill <jason@redhat.com>
2384
2385 PR c++/88136 - -Wdeprecated-copy false positives
2386 * c.opt (Wdeprecated-copy-dtor): New.
2387 (Wdeprecated-copy): Move to -Wextra.
2388
673670da
MS
23892018-11-29 Martin Sebor <msebor@redhat.com>
2390
2391 PR c/88172
2392 PR testsuite/88208
2393 * c-attribs.c (common_handle_aligned_attribute): Silently avoid setting
2394 alignments to values less than the target requires.
2395 (has_attribute): For attribute aligned consider both the attribute
2396 and the alignment bits.
2397 * c-common.c (c_init_attributes): Optionally issue a warning for
2398 zero alignment.
2399
04864ec8
MS
24002018-11-28 Martin Sebor <msebor@redhat.com>
2401
2402 PR c/88065
2403 PR c/87297
2404 * c-warn.c (sizeof_pointer_memaccess_warning): Bail if source
2405 or destination is an error.
2406
ace83db0
JJ
24072018-11-28 Jakub Jelinek <jakub@redhat.com>
2408
2409 PR c++/88215
2410 * c-ubsan.c: Include langhooks.h.
2411 (ubsan_instrument_division): Change gcc_assert that main variants
2412 of op0 and op1 types are equal to gcc_checking_assert that the
2413 main variants are compatible types.
2414
da193a27
EB
24152018-11-27 Eric Botcazou <ebotcazou@adacore.com>
2416
2417 * c-ada-spec.c: Include stringpool.h.
2418 (has_static_fields): Return false for incomplete types.
2419 (is_tagged_type): Likewise.
2420 (has_nontrivial_methods): Likewise.
2421 (dump_ada_node) <INTEGER_TYPE>: Deal specifically with __int128.
2422 (struct overloaded_name_hash): New structure.
2423 (struct overloaded_name_hasher): Likewise.
2424 (overloaded_names): New global variable.
2425 (init_overloaded_names): New static function.
2426 (overloaded_name_p): New predicate.
2427 (dump_ada_declaration) <TYPE_DECL>: Tidy up and set TREE_VISITED
2428 on the TYPE_STUB_DECL of the original type of a typedef, if any.
2429 <FUNCTION_DECL>: Bail out for an unsupported overloaded name.
2430 Remove always-true condition and dump forward types.
2431 (dump_ada_specs): Delete overloaded_names.
2432
98f08eb8
MS
24332018-11-20 Martin Sebor <msebor@redhat.com>
2434
2435 * c-attribs.c (type_for_vector_size): New function.
2436 (type_valid_for_vector_size): Same.
2437 (handle_vector_size_attribute): Move code to the functions above
2438 and call them.
2439 (validate_attribute, has_attribute): New functions.
2440 * c-common.h (has_attribute): Declare.
2441 (rid): Add RID_HAS_ATTRIBUTE_EXPRESSION.
2442 * c-common.c (c_common_resword): Same.
2443
2674fa47
JM
24442018-11-16 Jason Merrill <jason@redhat.com>
2445
2446 * c-lex.c (c_common_has_attribute): Handle likely/unlikely.
2447 * c-attribs.c (attr_cold_hot_exclusions): Make public.
2448
258b3854
JJ
24492018-11-16 Jakub Jelinek <jakub@redhat.com>
2450
2451 PR middle-end/87854
2452 * c-common.c (fix_string_type): Reject string literals larger than
2453 TYPE_MAX_VALUE (ssizetype) bytes.
2454
1d249509
MS
24552018-11-15 Martin Sebor <msebor@redhat.com>
2456
2457 PR c++/87541
2458 PR c++/87542
2459 * c-attribs.c (positional_argument): New function.
2460 (handle_alloc_size_attribute): Use it and simplify.
2461 (handle_alloc_align_attribute): Same.
2462 (handle_assume_aligned_attribute): Same.
2463 (handle_nonnull_attribute): Same.
2464 * c-common.c (check_function_arguments): Pass fntype to
2465 check_function_format.
2466 * c-common.h (check_function_format): Add an argument.
2467 (PosArgFlags, positional_argument): Declare new type and function.
2468 * c-format.c (decode_format_attr): Add arguments.
2469 (check_format_string, get_constant): Same.
2470 (convert_format_name_to_system_name): Adjust.
2471
478dd60d
DM
24722018-11-15 David Malcolm <dmalcolm@redhat.com>
2473
2474 PR other/19165
2475 * c-opts.c (c_diagnostic_finalizer): Add diagnostic_t param.
2476
8cca0163
JJ
24772018-11-14 Jakub Jelinek <jakub@redhat.com>
2478
8ee09943
JJ
2479 P1236R1 - Signed integers are two's complement
2480 * c-warn.c (maybe_warn_shift_overflow): Don't warn for c++2a.
2481 * c-ubsan.c (ubsan_instrument_shift): Make signed shifts
2482 with in-range second operand well defined for -std=c++2a.
2483
8cca0163
JJ
2484 PR other/88007
2485 * c-common.c (parse_optimize_options): Allocate option string from
2486 opts_obstack rather than as GC memory. Move the allocation after
2487 warning for invalid option.
2488
620e594b
DM
24892018-11-13 David Malcolm <dmalcolm@redhat.com>
2490
2491 * c-common.c (c_get_substring_location): Update for renaming of
2492 get_source_location_for_substring to get_location_within_string.
2493 * c-lex.c: Replace "source_location" with "location_t".
2494 * c-opts.c: Likewise.
2495 * c-ppoutput.c: Likewise.
2496
f9731de3
MS
24972018-11-13 Martin Sebor <msebor@redhat.com>
2498
2499 PR middle-end/81824
2500 * c-attribs.c (handle_copy_attribute): Exclude inlining attributes.
2501 (handle_tls_model_attribute): Improve diagnostics.
2502
e4bd6d5e
JM
25032018-11-12 Jason Merrill <jason@redhat.com>
2504
a6bb6b07
JM
2505 * c-cppbuiltin.c (c_cpp_builtins): Define
2506 __cpp_impl_destroying_delete.
2507
e4bd6d5e
JM
2508 * c-cppbuiltin.c (c_cpp_builtins): Change __cpp_explicit_bool to
2509 __cpp_conditional_explicit.
2510
79a2c428
MS
25112018-11-09 Martin Sebor <msebor@redhat.com>
2512
2513 PR middle-end/81824
2514 * c-attribs.c (handle_copy_attribute): New function.
2515
4c7bd361
MS
25162018-11-09 Martin Sebor <msebor@redhat.com>
2517
2518 PR c/87795
2519 * c-common.c (check_user_alignment): Use MAX_OFILE_ALIGNMENT.
2520
28567c40
JJ
25212018-11-08 Jakub Jelinek <jakub@redhat.com>
2522
2523 * c-common.h (c_finish_omp_taskgroup): Add CLAUSES argument.
2524 (c_finish_omp_atomic): Replace bool SEQ_CST argument with
2525 enum omp_memory_order MEMORY_ORDER.
2526 (c_finish_omp_flush): Add MO argument.
2527 (c_omp_depend_t_p, c_finish_omp_depobj): Declare.
2528 (c_finish_omp_for): Add FINAL_P argument.
2529 * c-omp.c: Include memmodel.h.
2530 (c_finish_omp_taskgroup): Add CLAUSES argument. Set
2531 OMP_TASKGROUP_CLAUSES to it.
2532 (c_finish_omp_atomic): Replace bool SEQ_CST argument with
2533 enum omp_memory_order MEMORY_ORDER. Set OMP_ATOMIC_MEMORY_ORDER
2534 instead of OMP_ATOMIC_SEQ_CST.
2535 (c_omp_depend_t_p, c_finish_omp_depobj): New functions.
2536 (c_finish_omp_flush): Add MO argument, if not MEMMODEL_LAST, emit
2537 __atomic_thread_fence call with the given value.
2538 (check_omp_for_incr_expr): Formatting fixes.
2539 (c_finish_omp_for): Add FINAL_P argument. Allow NE_EXPR
2540 even in OpenMP loops, diagnose if NE_EXPR and incr expression
2541 is not constant expression 1 or -1. Transform NE_EXPR loops
2542 with iterators pointers to VLA into LT_EXPR or GT_EXPR loops.
2543 (c_omp_check_loop_iv_r): Look for orig decl of C++ range for
2544 loops too.
2545 (c_omp_split_clauses): Add support for combined
2546 #pragma omp parallel master and
2547 #pragma omp {,parallel }master taskloop{, simd} constructs.
2548 Handle OMP_CLAUSE_IN_REDUCTION. Handle OMP_CLAUSE_REDUCTION_TASK.
2549 Handle OMP_CLAUSE_NONTEMPORAL. Handle splitting OMP_CLAUSE_IF
2550 also to OMP_SIMD. Copy OMP_CLAUSE_LASTPRIVATE_CONDITIONAL.
2551 (c_omp_predetermined_sharing): Don't return
2552 OMP_CLAUSE_DEFAULT_SHARED for const qualified decls.
2553 * c-pragma.c (omp_pragmas): Add PRAGMA_OMP_DEPOBJ and
2554 PRAGMA_OMP_REQUIRES.
2555 * c-pragma.h (enum pragma_kind): Likewise.
2556 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_NONTEMPORAL
2557 and PRAGMA_OMP_CLAUSE_{IN,TASK}_REDUCTION.
2558
204839e7
DM
25592018-11-08 David Malcolm <dmalcolm@redhat.com>
2560
2561 * c-format.c (gcc_dump_printf_char_table): Add entry for %f.
2562
d8010ee4
DM
25632018-11-08 David Malcolm <dmalcolm@redhat.com>
2564
2565 * c-format.c (local_cgraph_node_ptr_node): New variable.
2566 (gcc_dump_printf_char_table): Add entry for %C.
2567 (get_pointer_to_named_type): New function, taken from the handling
2568 code for "gimple *" from...
2569 (init_dynamic_diag_info): ...here. Add handling for
2570 "cgraph_node *".
2571 * c-format.h (T_CGRAPH_NODE): New.
2572
4be5c72c
JM
25732018-10-19 Jason Merrill <jason@redhat.com>
2574
2575 * c-cppbuiltin.c (c_cpp_builtins): Add
2576 __cpp_nontype_template_parameter_class.
2577
f3f6029d
NS
25782018-10-31 Nathan Sidwell <nathan@acm.org>
2579
ab5324fb
NS
2580 * c-opts.c (c_finish_options): Force command line macro
2581 location. Refactor to avoid repeating main debug hook.
2582 (push_command_line_include): Clarify comment.
2583
f3f6029d
NS
2584 * c-opts.c (c_finish_options): Adjust cpp_force_token_locations call.
2585
91e3ec29
MS
25862018-10-30 Martin Sebor <msebor@redhat.com>
2587
2588 PR middle-end/87041
2589 * c-format.c (check_format_types): Avoid diagnosing null pointer
2590 arguments to printf-family of functions.
2591
b5ff4f5c
MP
25922018-10-30 Marek Polacek <polacek@redhat.com>
2593
2594 Implement P0892R2, explicit(bool).
2595 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_explicit_bool.
2596
7e2de6df
DM
25972018-10-29 David Malcolm <dmalcolm@redhat.com>
2598
2599 * name-hint.h (name_hint::take_deferred): New member function.
2600
b2bf438c
DM
26012018-10-29 David Malcolm <dmalcolm@redhat.com>
2602
2603 PR c++/56856
2604 * c-common.c (check_function_sentinel): Call fold_for_warn on the
2605 argument.
2606 (check_function_restrict): Rename param "argarray" to
2607 "unfolded_argarray", and make a copy named "argarray", calling
2608 fold_for_warn on each argument.
2609 (check_function_arguments): Add note about responsibility for
2610 folding the arguments.
2611
9f936c86
JM
26122018-10-17 Joseph Myers <joseph@codesourcery.com>
2613
2614 * c-common.c (flag_isoc2x): New variable.
2615 * c-common.h (clk_c): Update comment to reference C2X.
2616 (flag_isoc99, flag_isoc11): Update comments to reference future
2617 standard versions in general.
2618 (flag_isoc2x): Declare.
2619 * c-opts.c (set_std_c2x): New function.
2620 (c_common_handle_option): Handle -std=c2x and -std=gnu2x.
2621 (set_std_c89, set_std_c99, set_std_c11, set_std_c17): Set
2622 flag_isoc2x to 0.
2623 * c.opt (Wc11-c2x-compat, std=c2x, std=gnu2x): New options.
2624
7a8a92c4
JM
26252018-10-17 Joseph Myers <joseph@codesourcery.com>
2626
2627 * c.opt (std=c17, std=c18, std=gnu17, std=gnu18, std=iso9899:2017)
2628 (std=iso9899:2018): Document C17 as published in 2018.
2629
4dc003ff
CL
26302018-10-12 Christophe Lyon <christophe.lyon@linaro.org>
2631
2632 PR c++/87364
2633 * c-pretty-print.c (c_pretty_printer::constant): Fix typo.
2634
79371671
WW
26352018-10-11 Will Wray <wjwray@gmail.com>
2636
2637 PR c++/87364
2638 * c-pretty-print.h (pp_c_type_cast): Prototype.
2639 (pp_c_integer_constant): Likewise.
2640 * c-pretty-print.c (pp_c_type_cast): No longer static.
2641 (pp_c_integer_constant): Likewise.
2642 (pp_c_enumeration_constant): Fix loop termination when finding
2643 name of constant. No longer returns a value. Call
2644 pp_c_integer_constant.
2645 (c_pretty_printer::constant): Update for changes to
2646 pp_c_enumeration_constant.
2647
46c62690
JJ
26482018-10-11 Jakub Jelinek <jakub@redhat.com>
2649
2650 * c-lex.c (c_common_has_attribute): Return 201803 instead of 20180312
2651 for no_unique_address.
2652
c24300ba
DM
26532018-10-09 David Malcolm <dmalcolm@redhat.com>
2654
2655 * c-common.c (c_option_controlling_cpp_error): Rename to...
2656 (c_option_controlling_cpp_diagnostic): ...this, and convert
2657 "reason" from int to enum.
2658 (c_cpp_error): Rename to...
2659 (c_cpp_diagnostic): ...this, converting level and reason to enums.
2660 * c-common.h (c_cpp_error): Rename to...
2661 (c_cpp_diagnostic): ...this, converting level and reason to enums.
2662 * c-opts.c (c_common_init_options): Update for renaming.
2663
8656dafa
RS
26642018-10-08 Richard Sandiford <richard.sandiford@arm.com>
2665
2666 PR c/87286
2667 * c-common.c (vector_types_compatible_elements_p): Use
2668 INTEGRAL_TYPE_P instead of checking only for INTEGER_TYPE.
2669
8cff0652
VK
26702018-10-04 Vinay Kumar <vinay.kumar@blackfigtech.com>
2671
2672 * c-attribs.c (get_priority): Add a warning flag warn_prio_ctor_dtor
2673 to generate constructor destructor priority warning.
2674 * c.opt (-Wprio-ctor-dtor): New option.
2675
bedf03a2
JM
26762018-10-01 Jason Merrill <jason@redhat.com>
2677
2678 * c-lex.c (c_common_has_attribute): Add no_unique_address.
2679
6cc430c1
EB
26802018-10-01 Eric Botcazou <ebotcazou@adacore.com>
2681
2682 * c-ada-spec.c (get_underlying_decl): Get to the main type variant.
2683 (dump_ada_node): Add const keyword.
2684
87677ac7
ML
26852018-09-25 Martin Liska <mliska@suse.cz>
2686
2687 * c-common.c (c_common_truthvalue_conversion):
2688 Remove Pascal from documentation.
2689
518196cb
EB
26902018-09-21 Eric Botcazou <ebotcazou@adacore.com>
2691
2692 * c-ada-spec.c: Include diagnostic.h.
2693 (dump_ada_declaration) <RECORD_TYPE>: Issue a warning on packed layout.
2694
a599af84
MP
26952018-09-19 Marek Polacek <polacek@redhat.com>
2696
2697 * c.opt (Wclass-conversion): New.
2698
9c4a4b3c
DM
26992018-09-17 David Malcolm <dmalcolm@redhat.com>
2700
2701 * c-format.c (range_label_for_format_type_mismatch::get_text):
2702 Update for new param.
2703
c896ecfe
DM
27042018-09-17 David Malcolm <dmalcolm@redhat.com>
2705
2706 * c-format.c (format_warning_at_char): Update for introduction of
2707 format_string_diagnostic_t.
2708 (format_type_warning): Likewise.
2709
80c6d1f4
MJ
27102018-09-17 Martin Jambor <mjambor@suse.cz>
2711
2712 PR c/63886
2713 * c.opt (Wabsolute-value): New.
2714
6d900107
BE
27152018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
2716
2717 * c-common.c (complete_flexible_array_elts): New helper function.
2718 * c-common.h (complete_flexible_array_elts): Declare.
2719
b5764229
BE
27202018-09-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
2721
2722 * c-common.c (braced_list_to_string): Remove eval parameter.
2723 Add some more checks. Always create zero-terminated STRING_CST.
2724 * c-common.h (braced_list_to_string): Adjust prototype.
2725
85204e23
DM
27262018-08-27 David Malcolm <dmalcolm@redhat.com>
2727
2728 PR 87091
2729 * c-common.c (c_cpp_error): Update for conversion of show_caret_p
2730 to a tri-state.
2731 (maybe_suggest_missing_token_insertion): Likewise.
2732 (maybe_add_include_fixit): Add param "override_location". If set,
2733 and source-printing is enabled, then override the rich_location's
2734 primary location with that of the insertion point for the fix-it
2735 hint, marking it with SHOW_LINES_WITHOUT_RANGE.
2736 * c-common.h (extern void maybe_add_include_fixit): Add bool
2737 param.
2738 * c-format.c (selftest::test_type_mismatch_range_labels): Update
2739 for conversion of show_caret_p to a tri-state.
2740 * c-warn.c (warn_for_restrict): Likewise.
2741 * known-headers.cc
2742 (suggest_missing_header::~suggest_missing_header): Update call to
2743 maybe_add_include_fixit to suggest overriding the location, as it
2744 is for a note.
2745
3d78e008
ML
27462018-08-27 Martin Liska <mliska@suse.cz>
2747
2748 * c-common.c (check_function_restrict): Use new function
92a285c1
ML
2749 fndecl_built_in_p and remove check for FUNCTION_DECL if
2750 possible.
3d78e008
ML
2751 (check_builtin_function_arguments): Likewise.
2752 (reject_gcc_builtin): Likewise.
2753 * c-warn.c (sizeof_pointer_memaccess_warning): Likewise.
2754
b5be6d0c
MP
27552018-08-26 Marek Polacek <polacek@redhat.com>
2756
2757 PR c++/87029, Implement -Wredundant-move.
2758 * c.opt (Wredundant-move): New option.
2759
79ca9c35
MP
27602018-08-21 Marek Polacek <polacek@redhat.com>
2761
2762 PR c++/86981, Implement -Wpessimizing-move.
2763 * c.opt (Wpessimizing-move): New option.
2764
097f82ec
DM
27652018-08-20 David Malcolm <dmalcolm@redhat.com>
2766
2767 PR other/84889
2768 * c-attribs.c (common_handle_aligned_attribute): Add
2769 auto_diagnostic_group instance.
2770 * c-indentation.c (warn_for_misleading_indentation): Likewise.
2771 * c-opts.c (c_common_post_options): Likewise.
2772 * c-warn.c (warn_logical_not_parentheses): Likewise.
2773 (warn_duplicated_cond_add_or_warn): Likewise.
2774 (warn_for_multistatement_macros): Likewise.
2775
3fb558b1
NS
27762018-08-20 Nathan Sidwell <nathan@acm.org>
2777
2778 * c-ada-spec.c (macro_length, dump_ada_macros): Adjust macro parm
2779 access.
2780
800c0e98
NS
27812018-08-17 Nathan Sidwell <nathan@acm.org>
2782
2783 * c-cppbuiltin.c (struct lazy_hex_fp_value_struct): Remove macro
2784 field.
2785 (laxy_hex_fp_value_count): Make unsigned.
2786 (lazy_hex_fp_value): Provided with macro & lazy number. Directly
2787 manipulate the macro.
2788 (builtin_defin_with_hex_fp_value): Adjust callback name, use
2789 cpp_define_lazily.
2790
6f795a92
DM
27912018-08-17 David Malcolm <dmalcolm@redhat.com>
2792
2793 * c-format.c (enum format_type): Add gcc_dump_printf_format_type.
2794 (gcc_dump_printf_length_specs): New.
2795 (gcc_dump_printf_flag_pairs): New.
2796 (gcc_dump_printf_flag_specs): New.
2797 (gcc_dump_printf_char_table): New.
2798 (format_types_orig): Add entry for "gcc_dump_printf".
2799 (init_dynamic_diag_info): Set up length_char_specs and
2800 conversion_specs for gcc_dump_printf_format_type.
2801 (handle_format_attribute): Handle gcc_dump_printf_format_type.
2802
c5d725c0
NS
28032018-08-17 Nathan Sidwell <nathan@acm.org>
2804
10f04917
NS
2805 * c-ada-spec.c (macro_length, dump_ada_macros): Constify.
2806
c5d725c0
NS
2807 * c-ada-spec.c: Don't #include "cpp-id-data.h"
2808 * c-cppbuiltin.c: Likewise.
2809
c0c12356
ML
28102018-08-17 Martin Liska <mliska@suse.cz>
2811
2812 * c.opt: Remove Warn, Init and Report for options with
92a285c1
ML
2813 Ignore/Deprecated flag. Warning is done automatically for
2814 Deprecated flags.
c0c12356 2815
10fcc142
DM
28162018-08-16 David Malcolm <dmalcolm@redhat.com>
2817
2818 PR c++/70693
2819 * c-common.c (selftest::c_family_tests): Call
2820 selftest::c_indentation_c_tests.
2821 * c-common.h (selftest::c_indentation_c_tests): New decl.
2822 * c-indentation.c: Include "selftest.h".
2823 (next_tab_stop): Add "tab_width" param, rather than accessing
2824 cpp_opts.
2825 (get_visual_column): Likewise. Clarify comment. Bulletproof
2826 against reading past the end of the line.
2827 (get_first_nws_vis_column): Add "tab_width" param.
2828 (detect_intervening_unindent): Likewise.
2829 (should_warn_for_misleading_indentation): Read tab width from
2830 cpp_opts and pass around.
2831 (selftest::test_next_tab_stop): New test.
2832 (selftest::assert_get_visual_column_succeeds): New function.
2833 (ASSERT_GET_VISUAL_COLUMN_SUCCEEDS): New macro.
2834 (selftest::assert_get_visual_column_fails): New function.
2835 (ASSERT_GET_VISUAL_COLUMN_FAILS): New macro.
2836 (selftest::test_get_visual_column): New test.
2837 (selftest::c_indentation_c_tests): New function.
2838
3f6677f4
NS
28392018-08-16 Nathan Sidwell <nathan@acm.org>
2840
2841 * c-ada-spec.c (count_ada_macro): Use cpp_user_macro_p.
2842 (store_ada_macro): Likewise.
2843 * c-ppoutput.c (cb_used_define, dump_macro): Likewise.
2844 * c-spellcheck.cc (should-suggest_as_macro_p): Likewise,
2845
96e6ae57
DM
28462018-08-15 David Malcolm <dmalcolm@redhat.com>
2847
2848 * c-format.c: Include "selftest-diagnostic.h" and
2849 "gcc-rich-location.h".
2850 (format_warning_at_char): Pass NULL for new label params of
2851 format_warning_va.
2852 (class indirection_suffix): New class.
2853 (class range_label_for_format_type_mismatch): New class.
2854 (format_type_warning): Move logic for generating "*" suffix to
2855 class indirection_suffix. Create "fmt_label" and "param_label"
2856 to show their types, and pass them to the
2857 format_warning_at_substring calls.
2858 (selftest::test_type_mismatch_range_labels): New test.
2859 (selftest::c_format_c_tests): Call it.
2860
23aa9f7c
MS
28612018-08-13 Martin Sebor <msebor@redhat.com>
2862
2863 PR tree-optimization/71625
2864 * c-common.c (braced_list_to_string): New function.
2865 * c-common.h (braced_list_to_string): Declare it.
2866
f10a9135
NS
28672018-08-08 Nathan Sidwell <nathan@acm.org>
2868
2869 * c-common.c (try_to_locate_new_include_inertion_point): Use
2870 linemap_included_from_linemap.
2871 * c-lex.c (fe_file_change): Use linemap_included_from.
2872 * c-ppoutput.c (pp_file_change): Likewise.
2873
8a45b051
MS
28742018-08-01 Martin Sebor <msebor@redhat.com>
2875
2876 PR tree-optimization/86650
ab20d992 2877 * c-format.c (gcc_tdiag_char_table): Update comment for "%G".
8a45b051
MS
2878 (gcc_cdiag_char_table, gcc_cxxdiag_char_table): Same.
2879 (init_dynamic_diag_info): Update from "gcall *" to "gimple *".
2880 * c-format.h (T89_G): Update to be "gimple *" rather than
2881 "gcall *".
2882 (local_gcall_ptr_node): Rename...
2883 (local_gimple_ptr_node): ...to this.
2884
e540ccc0
DM
28852018-07-31 David Malcolm <dmalcolm@redhat.com>
2886
2887 * c-format.c (PP_FORMAT_CHAR_TABLE): New macro, based on existing
2888 table entries for gcc_diag_char_table, and the 'Z' entry from
2889 gcc_tdiag_char_table, changing the "chain" entry for 'Z' from
2890 &gcc_tdiag_char_table[0] to &gcc_diag_char_table[0].
2891 (gcc_diag_char_table): Use PP_FORMAT_CHAR_TABLE, implicitly
2892 adding missing "Z" for this table. Remove erroneous "G" and "K"
2893 entries.
2894 (gcc_tdiag_char_table): Use PP_FORMAT_CHAR_TABLE. Remove "v".
2895 (gcc_cdiag_char_table): Use PP_FORMAT_CHAR_TABLE.
2896 (gcc_cxxdiag_char_table): Use PP_FORMAT_CHAR_TABLE. Remove "v".
2897
425fc685
RE
28982018-07-31 Richard Earnshaw <rearnsha@arm.com>
2899
2900 * c-common.c (speculation_safe_resolve_call): New function.
2901 (speculation_safe_resolve_params): New function.
2902 (speculation_safe_resolve_return): New function.
2903 (resolve_overloaded_builtin): Handle __builtin_speculation_safe_value.
2904 * c-cppbuiltin.c (c_cpp_builtins): Add pre-define for
2905 __HAVE_SPECULATION_SAFE_VALUE.
2906
181463c2
DM
29072018-07-20 David Malcolm <dmalcolm@redhat.com>
2908
2909 * c-common.c (c_cpp_error): Remove redundant "line_table"
2910 parameter from call to rich_location::set_range.
2911 (maybe_suggest_missing_token_insertion): Likewise.
2912
0d7f9065
MS
29132018-07-20 Martin Sebor <msebor@redhat.com>
2914
2915 PR middle-end/82063
ab20d992 2916 * c.opt (-Warray-bounds): Remove redundant -Wall.
0d7f9065 2917
00abf86c
MS
29182018-07-20 Martin Sebor <msebor@redhat.com>
2919
2920 PR middle-end/82063
2921 * c-common.h (c_common_handle_option): Change function argument
2922 to HOST_WIDE_INT.
2923 * c-opts.c (c_common_init_options): Same.
2924 (c_common_handle_option): Same. Remove special handling of
2925 OPT_Walloca_larger_than_ and OPT_Wvla_larger_than_.
2926 * c.opt (-Walloc-size-larger-than, -Walloca-larger-than): Change
2927 options to take a HOST_WIDE_INT argument and accept a byte-size
2928 suffix. Initialize.
2929 (-Wvla-larger-than): Same.
2930 (-Wno-alloc-size-larger-than, -Wno-alloca-larger-than): New.
2931 (-Wno-vla-larger-than): Same.
2932
9b452033
JJ
29332018-07-12 Jakub Jelinek <jakub@redhat.com>
2934
2935 * c-attribs.c (c_common_attribute_table): Add
2936 "omp declare target implicit" attribute.
2937
cd0762f3
RB
29382018-07-12 Richard Biener <rguenther@suse.de>
2939
2940 PR c/86453
2941 * c-attribs.c (handle_packed_attribute): Do not build a variant
2942 type with TYPE_PACKED, instead ignore the attribute if we may
2943 not apply to the original type.
2944
0b27c3ed
JJ
29452018-07-10 Jakub Jelinek <jakub@redhat.com>
2946
2947 PR c++/86443
2948 * c-omp.c (c_omp_check_loop_iv_r, c_omp_check_loop_iv): Allow declv
2949 to contain TREE_LIST for both the original class iterator and the
2950 "last" helper var.
2951
e730a0ef
EB
29522018-07-07 Eric Botcazou <ebotcazou@adacore.com>
2953
2954 * c-ada-spec.c (to_ada_name): Remove index parameter.
2955 (pp_ada_tree_identifier): Likewise.
2956 (dump_ada_macros): Adjust call to to_ada_name.
2957 (struct overloaded_name_hash): Delete.
2958 (struct overloaded_name_hasher): Likewise.
2959 (overloaded_names): Likewise.
2960 (compute_overloading_index): Likewise.
2961 (dump_ada_decl_name): Do not call compute_overloading_index and
2962 adjust calls to pp_ada_tree_identifier.
2963 (dump_ada_double_name): Adjust calls to pp_ada_tree_identifier.
2964 (dump_ada_import): Add spc parameter and switch to aspect syntax.
2965 (dump_ada_function_declaration): Adjust call to pp_ada_tree_identifier.
2966 (dump_ada_enum_type): Remove type and display_convention parameters.
2967 Adjust calls to pp_ada_tree_identifier.
2968 (dump_ada_node): Likewise and for dump_ada_structure.
2969 (dump_nested_type) <ENUMERAL_TYPE>: Adjust call to dump_ada_enum_type
2970 and tidy up.
2971 <RECORD_TYPE>: Adjust call to dump_ada_structure and switch to aspect
2972 syntax.
2973 (print_constructor): Adjust call to pp_ada_tree_identifier.
2974 (print_destructor): Likewise.
2975 (dump_ada_declaration): Switch to aspect syntax.
2976 (dump_ada_structure): Likewise and tidy up. Replace display_convention
2977 parameter with nested parameter.
2978 (dump_ads): Emit pragma Ada_2012 in lieu of pragma Ada_2005.
2979 (dump_ada_specs): Do not delete overloaded_names table.
2980
8de583fc
PB
29812018-07-06 Peter Bergner <bergner@linux.ibm.com>
2982
2983 PR target/86324
e730a0ef 2984 * c-attribs.c (handle_mode_attribute): Call translate_mode_attribute
8de583fc
PB
2985 target hook.
2986
09cff37b
NS
29872018-07-05 Nathan Sidwell <nathan@acm.org>
2988
2989 * c-lex.c (fe_file_change): Check SYSTEM_IMPLICIT_EXTERN_C not
2990 NO_IMPLICIT_EXTERN_C.
2991
98086b2b
ML
29922018-06-28 Martin Liska <mliska@suse.cz>
2993
2994 * cppspec.c: Include opt-suggestions.h.
2995
ab20d992
JJ
29962018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
2997 Thomas Schwinge <thomas@codesourcery.com>
829c6349
CLT
2998 Cesar Philippidis <cesar@codesourcery.com>
2999
3000 * c-pragma.h (enum pragma_omp_clause): Add
3001 PRAGMA_OACC_CLAUSE_{FINALIZE,IF_PRESENT}. Remove
3002 PRAGMA_OACC_CLAUSE_PRESENT_OR_{COPY,COPYIN,COPYOUT,CREATE}.
3003
f41b7612
JJ
30042018-06-20 Jakub Jelinek <jakub@redhat.com>
3005
3006 PR c++/86210
3007 * c-common.c (check_nonnull_arg): Use fold_for_warn. Adjust obsolete
3008 comment.
3009
4252ccd7
MS
30102018-06-18 Martin Sebor <msebor@redhat.com>
3011
3012 PR middle-end/85602
3013 * c-warn.c (sizeof_pointer_memaccess_warning): Check for attribute
3014 nonstring.
3015
e197e64e
KV
30162018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
3017
3018 * c-common.c (c_common_truthvalue_conversion): Handle ABSU_EXPR.
3019
34a7a230
JM
30202018-06-13 Jason Merrill <jason@redhat.com>
3021
5cef3733
JM
3022 * c-opts.c (c_common_post_options): Warn about useless -Wabi.
3023 (c_common_handle_option) [OPT_Wabi_]: Remove flag_abi_compat_version
3024 handling.
3025
34a7a230
JM
3026 PR c++/86094 - wrong code with defaulted move ctor.
3027 * c-opts.c (c_common_post_options): Bump the current ABI version to
3028 13. Set warn_abi_version and flag_abi_compat_version to the current
3029 version rather than 0. Fix defaulting flag_abi_compat_version from
3030 warn_abi_version.
3031
bb0f14ae
MS
30322018-06-12 Martin Sebor <msebor@redhat.com>
3033
3034 PR c/85931
3035 * c-warn.c (sizeof_pointer_memaccess_warning): Avoid warning when
3036 sizeof source and destination yields the same value.
3037
3713f2e2
ML
30382018-06-12 Martin Liska <mliska@suse.cz>
3039
3040 * c.opt: Make MPX-related options as Deprecated.
3041
4af78ef8
DM
30422018-06-08 David Malcolm <dmalcolm@redhat.com>
3043
3044 * c-pretty-print.c (c_pretty_printer::statement): Use TDF_NONE
3045 rather than 0.
3046
31db0fe0
ML
30472018-06-08 Martin Liska <mliska@suse.cz>
3048
3049 * c-attribs.c (handle_bnd_variable_size_attribute): Remove support
3050 for MPX (macros, related functions, fields in cgraph_node, ...).
3051 (handle_bnd_legacy): Likewise.
3052 (handle_bnd_instrument): Likewise.
3053 * c.opt: Likewise.
3054
fe16acf2
JJ
30552018-06-06 Jakub Jelinek <jakub@redhat.com>
3056
3057 PR c++/86068
3058 * c-cppbuiltin.c (c_cpp_builtins): Fix a typo, set
3059 __cpp_transactional_memory to 201500 instead of 210500.
3060
4dbdb49b
JM
30612018-06-06 Jason Merrill <jason@redhat.com>
3062
3063 PR c++/85710 - ICE with -Wmemset-elt-size.
3064 * c-warn.c (warn_for_memset): Don't crash on incomplete element type.
3065
f8ad043f
JM
30662018-06-01 Jason Merrill <jason@redhat.com>
3067
3068 * c-cppbuiltin.c (c_cpp_builtins): Bump __cpp_deduction_guides to
3069 201703.
3070
abc24d93
EB
30712018-06-01 Eric Botcazou <ebotcazou@adacore.com>
3072
3073 * c-ada-spec.c (dump_ada_declaration) <TYPE_DECL>: Generate a forward
3074 declaration for a typedef independently of whether the declaration of
3075 the subtype is generated.
3076
d258f4aa
MS
30772018-05-31 Martin Sebor <msebor@redhat.com>
3078
3079 PR c/82063
3080 * c.opt (-Wno-alloc-size-larger-than): New option.
3081
b67b9225
DP
30822018-04-22 David Pagan <dave.pagan@oracle.com>
3083
3084 PR c/55976
3085 * c-opts.c (c_common_post_options): Set default for warn_return_type
ab20d992 3086 for C++/C++ with ObjC extensions only. For C, makes it possible to
b67b9225
DP
3087 differentiate between default (no option), -Wreturn-type, and
3088 -Wno-return-type.
3089
04eb9c55
JM
30902018-05-29 Jason Merrill <jason@redhat.com>
3091
3092 * c.opt (Winit-list-lifetime): New flag.
3093
b0c31bc6
BE
30942018-05-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
3095
3096 * c-lex.c (get_fileinfo): Use splay_tree_compare_strings and
3097 splay_tree_delete_pointers.
3098
44284983
JJ
30992018-05-26 Jakub Jelinek <jakub@redhat.com>
3100
3101 PR bootstrap/85921
3102 * c-warn.c (diagnose_mismatched_attributes): Remove unnecessary
3103 noinline variable to workaround broken kernel headers.
3104
b46b715d
JM
31052018-05-18 Jason Merrill <jason@redhat.com>
3106
3107 * c.opt (Wdeprecated-copy): New flag.
3108
40659769
ML
31092018-05-17 Martin Liska <mliska@suse.cz>
3110
3111 * c-warn.c (overflow_warning): Do not use
3112 space in between 'G_' and '('.
3113
403962ea
JM
31142018-05-09 Jason Merrill <jason@redhat.com>
3115
3116 * c-common.c (valid_array_size_p): Add complain parameter.
3117 * c-common.h: ...which defaults to true.
3118
1c9ee609
JJ
31192018-05-11 Jakub Jelinek <jakub@redhat.com>
3120
3121 PR c/85696
3122 * c-omp.c (c_omp_predetermined_sharing): Return
3123 OMP_CLAUSE_DEFAULT_SHARED for artificial vars with integral type.
3124
19916065
ML
31252018-05-11 Martin Liska <mliska@suse.cz>
3126
92a285c1 3127 PR sanitizer/85556
19916065
ML
3128 * c-attribs.c (handle_no_sanitize_attribute): Iterate all
3129 TREE_LIST values.
3130
79e7b1fe
JJ
31312018-05-10 Jakub Jelinek <jakub@redhat.com>
3132
3133 PR c++/85662
3134 * c-common.h (fold_offsetof_1): Removed.
3135 (fold_offsetof): Add TYPE argument defaulted to size_type_node and
3136 CTX argument defaulted to ERROR_MARK.
3137 * c-common.c (fold_offsetof_1): Renamed to ...
3138 (fold_offsetof): ... this. Remove wrapper function. Add TYPE
3139 argument, convert the pointer constant to TYPE and use size_binop
3140 with PLUS_EXPR instead of fold_build_pointer_plus if type is not
3141 a pointer type. Adjust recursive calls.
3142
86c12f76
EB
31432018-05-10 Eric Botcazou <ebotcazou@adacore.com>
3144
3145 PR c++/85400
3146 * c-attribs.c (handle_visibility_attribute): Do not set no_add_attrs.
3147
ee336e84
NS
31482018-05-07 Nathan Sidwell <nathan@acm.org>
3149
3150 * c.opt (ffor-scope): Remove functionality, issue warning.
3151
6c072e21
NS
31522018-05-03 Nathan Sidwell <nathan@acm.org>
3153
3154 * c.opt (ffriend-injection): Remove functionality, issue warning.
3155
2cc7d3a7
DM
31562018-05-01 David Malcolm <dmalcolm@redhat.com>
3157
3158 PR c/84258
3159 * c-format.c (struct format_check_results): Add field
3160 "number_non_char".
3161 (check_format_info): Initialize it, and warn if encountered.
3162 (check_format_arg): Distinguish between wide char and
3163 everything else when detecting arrays of non-char.
3164
7761dfbe
DM
31652018-04-30 David Malcolm <dmalcolm@redhat.com>
3166
3167 * c-format.c (get_corrected_substring): Update for
3168 location_get_source_line returning a char_span. Use a char_span
3169 when handling the prefix of the correction.
3170 * c-indentation.c (get_visual_column): Update for
3171 location_get_source_line returning a char_span.
3172 (get_first_nws_vis_column): Likewise.
3173
62e98ef1
DM
31742018-03-29 David Malcolm <dmalcolm@redhat.com>
3175
3176 PR c++/84269
3177 * known-headers.cc (get_stdlib_header_for_name): Add various names
3178 from <assert.h>, <string.h>, and <memory.h>; add more names from
3179 <stdio.h>.
3180
a7dea617
JJ
31812018-03-27 Jakub Jelinek <jakub@redhat.com>
3182
3183 PR c++/85061
3184 * c-common.c (fold_offsetof_1) <case COMPOUND_EXPR>: Assert that
3185 get_base_address of the second operand is a VAR_P, rather than the
3186 operand itself, and use gcc_checking_assert instead of gcc_assert.
3187
889a3a30
MP
31882018-03-23 Marek Polacek <polacek@redhat.com>
3189
3190 PR c++/85045
3191 * c-pretty-print.c (c_pretty_printer::multiplicative_expression)
3192 <case RDIV_EXPR>: Tweak condition.
3193
452154b9
EB
31942018-03-20 Eric Botcazou <ebotcazou@adacore.com>
3195
3196 * c-ada-spec.c (pp_ada_tree_identifier): Deal specifically with _Bool.
3197
63ecb626
JJ
31982018-03-16 Jakub Jelinek <jakub@redhat.com>
3199
ce811fc4
JJ
3200 PR c/84909
3201 * c-warn.c (conversion_warning): Replace "to to" with "to" in
3202 diagnostics.
3203
63ecb626
JJ
3204 PR c/84910
3205 * c-warn.c (diagnose_mismatched_attributes): Remove trailing space from
3206 diagnostics.
3207
a1295eec
RB
32082018-03-16 Richard Biener <rguenther@suse.de>
3209
3210 PR c/84873
3211 * c-gimplify.c (c_gimplify_expr): Revert previous change. Instead
3212 unshare the possibly folded expression.
3213
919674fb
RB
32142018-03-15 Richard Biener <rguenther@suse.de>
3215
3216 PR c/84873
3217 * c-gimplify.c (c_gimplify_expr): Do not fold expressions.
3218
f99309b2
MS
32192018-03-13 Martin Sebor <msebor@redhat.com>
3220
3221 PR tree-optimization/84725
3222 * c-attribs.c (handle_nonstring_attribute): Allow attribute nonstring
3223 with all three narrow character types, including their qualified forms.
3224
e9b9fa4c
MS
32252018-03-12 Martin Sebor <msebor@redhat.com>
3226
3227 PR tree-optimization/83456
ab20d992 3228 * c-common.c (check_function_restrict): Return bool.
e9b9fa4c
MS
3229 Restore checking of bounded built-in functions.
3230 (check_function_arguments): Also return the result
3231 of warn_for_restrict.
ab20d992
JJ
3232 * c-common.c (check_function_restrict): Return bool.
3233 * c-warn.c (warn_for_restrict): Return bool.
e9b9fa4c 3234
0805d020
MP
32352018-03-02 Marek Polacek <polacek@redhat.com>
3236
3237 PR c++/84171
3238 * c-warn.c (warn_for_sign_compare): Bail out if any of the operands
3239 is erroneous.
3240
ed2a2f08
TS
32412018-03-02 Thomas Schwinge <thomas@codesourcery.com>
3242
3243 * c-attribs.c (c_common_attribute_table): Remove "cilk simd
3244 function".
3245
90abdde0
MP
32462018-03-01 Marek Polacek <polacek@redhat.com>
3247
3248 PR c++/84639
3249 * c-attribs.c (common_handle_aligned_attribute): Don't use invalid
3250 alignment in computation.
3251
c6db43fa
EB
32522018-02-28 Eric Botcazou <ebotcazou@adacore.com>
3253
3254 * c-ada-spec.c (dump_ada_node) <NULLPTR_TYPE>: New case.
3255 <REAL_TYPE>: Deal specifically with _Float128/__float128.
3256
9e25c7ed
EB
32572018-02-28 Eric Botcazou <ebotcazou@adacore.com>
3258
3259 * c-ada-spec.c (dump_ada_double_name) <ENUMERAL_TYPE>: New case.
3260 (is_char_array): Take a type instead of a declaration.
3261 (dump_ada_array_type): Likewise.
3262 (is_simple_enum): Minor tweak.
3263 (dump_ada_enum_type): New function extracted from...
3264 (dump_ada_node) <ENUMERAL_TYPE>: ...here. Invoke it.
3265 <INTEGER_TYPE>: Remove unreachable code.
3266 <RECORD_TYPE>: Likewise. Minor tweaks.
3267 (dump_nested_type) <ARRAY_TYPE>: Adjust to above changes.
3268 <ENUMERAL_TYPE>: New case.
3269 <RECORD_TYPE>: Factor out common code.
3270 (dump_ada_declaration) <ARRAY_TYPE>: Adjust to above changes.
3271 Minor tweaks. Deal with enumeral types.
3272 (dump_ada_structure): Minor tweaks.
3273
09de3550
EB
32742018-02-28 Eric Botcazou <ebotcazou@adacore.com>
3275
3276 * c-ada-spec.c (dump_ada_node) <POINTER_TYPE>: Do not use generic
3277 address for incomplete structures.
3278 (dump_forward_type): Do not bail out for incomplete structures.
3279 (dump_ada_declaration): Do not special-case incomplete structures
3280 for subtypes. Dump them as null records for types.
3281
095d8d4b
EB
32822018-02-28 Eric Botcazou <ebotcazou@adacore.com>
3283
3284 * c-ada-spec.c (dump_ada_import): Use boolean and fix formatting.
3285 (is_char_array): Fix formatting.
3286 (dump_template_types): Likewise.
3287 (dump_generic_ada_node): Rename into...
3288 (dump_ada_node): ...this.
3289 <POINTER_TYPE>: Remove superfluous space. Use generic address for
3290 incomplete structures and not for empty structures. Do not use it
3291 when forward declarations are needed.
3292 (dump_forward_type): New function.
3293 (dump_nested_types): Remove FORWARD parameter. Do not consider
3294 TREE_VISITED and do not generate a forward declaration. Only dump
3295 original nested types for nested declaration.
3296 (dump_nested_type) <POINTER_TYPE>: Call dump_forward_type.
3297 <ARRAY_TYPE>: Likewise if the component type is an anonymous pointer.
3298 <RECORD_TYPE>: Do not consider TREE_VISITED.
3299 (dump_ada_declaration): Use booleans and fix formatting throughout.
3300 <TYPE_DECL>: Skip incomplete structures and not empty structures.
3301 Call dump_forward_type instead of dump_nested_types for a typedef.
3302 Remove superfluous check and adjust call to dump_nested_types.
3303 <POINTER_TYPE>: Call dump_forward_type and fall through.
3304 (dump_ada_struct_decl): Rename into...
3305 (dump_ada_structure): ...this. Do not special-case empty structures.
3306
d4cfd486
MS
33072018-02-27 Martin Sebor <msebor@redhat.com>
3308
3309 PR c++/83871
3310 * c.opt (-Wmissing-attributes): New option.
3311
b22dbd03
ML
33122018-02-21 Martin Liska <mliska@suse.cz>
3313
3314 * c.opt (Wcatch-value=): Add IntegerRange.
3315
883dfe2a
JM
33162018-02-15 Jason Merrill <jason@redhat.com>
3317
3318 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_deduction_guides.
3319
0444aa9c
NS
33202018-02-09 Nathan Sidwell <nathan@acm.org>
3321
3322 PR c/84293
3323 * c-common.h (strict_aliasing_warning): Drop OTYPE arg, insert LOC
3324 arg.
3325 * c-warn.c (strict_aliasing_warning): Drop OTYPE arg, require LOC
3326 arg. Adjust.
3327
cea71f0a
MS
33282018-02-09 Martin Sebor <msebor@redhat.com>
3329
3330 PR lto/84212
3331 * c.opt (-Wstringop-overflow, -Warray-bounds): Add LTO.
3332 (-Walloc-size-larger-than, -Wformat-truncation=): Same.
3333 (-Wmaybe-uninitialized, -Wnonnull, -Wrestrict): Same.
3334 (-Wstrict-overflow, -Wsuggest-attribute): Same.
3335 (-Wuninitialized): Same.
3336
8c8b7be5
EB
33372018-02-09 Eric Botcazou <ebotcazou@adacore.com>
3338
3339 * c-ada-spec.c (dump_ada_declaration): Do not generate the 'constant'
3340 keyword for components.
3341
7c30b12a
PC
33422018-02-02 Paolo Carlini <paolo.carlini@oracle.com>
3343
3344 * c-common.h (DECL_UNNAMED_BIT_FIELD): New.
3345
eece7fe5
JK
33462018-02-02 Julia Koval <julia.koval@intel.com>
3347
3348 * c-common.h (omp_clause_mask): Move to wide_int_bitmask.h.
3349
7d07a93a
MP
33502018-01-29 Marek Polacek <polacek@redhat.com>
3351
3352 PR c/83966
3353 * c-format.c (check_function_format): Check current_function_decl.
3354
53723269
JJ
33552018-01-27 Jakub Jelinek <jakub@redhat.com>
3356
3357 * c-cppbuiltin.c (c_cpp_builtins): Use ggc_strdup for the fp_suffix
3358 argument.
3359 (LAZY_HEX_FP_VALUES_CNT): Define.
3360 (lazy_hex_fp_values): Allow up to LAZY_HEX_FP_VALUES_CNT lazy hex fp
3361 values rather than just 12.
3362 (builtin_define_with_hex_fp_value): Likewise.
3363
7365279f
BK
33642018-01-18 Boris Kolpackov <boris@codesynthesis.com>
3365
92a285c1
ML
3366 PR other/70268
3367 * c.opt (-fmacro-prefix-map): New option.
3368 * c-opts.c (c_common_handle_option): Handle it.
3369 * c-lex.c (init_c_lex): Set remap_filename cpp callback.
3370 * c-ppoutput.c (init_pp_output): Likewise.
7365279f 3371
bb9869d5
DM
33722018-01-17 David Malcolm <dmalcolm@redhat.com>
3373
3374 PR c++/83814
3375 * c-common.c (fold_for_warn): Move to c/c-fold.c and cp/expr.c.
3376
68dc87c3
EB
33772018-01-10 Eric Botcazou <ebotcazou@adacore.com>
3378
3379 * c-ada-spec.c (dump_number): Add FLOAT_P parameter.
3380 Skip 'f' and 'F' characters if it is true.
3381 (store_ada_macro): Minor tweak.
3382 (dump_ada_macros) <CPP_COMMENT>: Likewise.
3383 <CPP_WSTRING>: Likewise.
3384 <CPP_STRING>: Output '&' in the buffer if not the first string.
3385 <CPP_NUMBER>: Adjust calls to dump_number.
3386
9a004410
DM
33872018-01-10 David Malcolm <dmalcolm@redhat.com>
3388
3389 PR c++/43486
3390 * c-common.c: Include "selftest.h".
3391 (get_atomic_generic_size): Perform the test for integral type
3392 before the range test for any integer constant, fixing indentation
3393 of braces. Call fold_for_warn before testing for an INTEGER_CST.
3394 (reject_gcc_builtin): Strip any location wrapper from EXPR.
3395 (selftest::test_fold_for_warn): New function.
3396 (selftest::c_common_c_tests): New function.
3397 (selftest::c_family_tests): Call it, and
3398 selftest::c_pretty_print_c_tests.
3399 * c-common.h (selftest::c_pretty_print_c_tests): New decl.
3400 * c-format.c (check_format_arg): Convert VAR_P check to a
3401 fold_for_warn.
3402 * c-pretty-print.c: Include "selftest.h".
3403 (pp_c_cast_expression): Don't print casts for location wrappers.
3404 (selftest::assert_c_pretty_printer_output): New function.
3405 (ASSERT_C_PRETTY_PRINTER_OUTPUT): New macro.
3406 (selftest::test_location_wrappers): New function.
3407 (selftest::c_pretty_print_c_tests): New function.
3408 * c-warn.c (warn_for_memset): Call fold_for_warn on the arguments.
3409
5c0caeb3
RS
34102018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
3411 Alan Hayward <alan.hayward@arm.com>
3412 David Sherwood <david.sherwood@arm.com>
3413
3414 * c-common.c (c_common_type_for_mode): Handle MODE_VECTOR_BOOL.
3415
73a699ae
RS
34162018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
3417 Alan Hayward <alan.hayward@arm.com>
3418 David Sherwood <david.sherwood@arm.com>
3419
3420 * c-ubsan.c (ubsan_instrument_shift): Treat GET_MODE_BITSIZE
3421 as polynomial.
3422
928686b1
RS
34232018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
3424 Alan Hayward <alan.hayward@arm.com>
3425 David Sherwood <david.sherwood@arm.com>
3426
3427 * c-common.c (vector_types_convertible_p, c_build_vec_perm_expr)
3428 (convert_vector_to_array_for_subscript): Handle polynomial
3429 TYPE_VECTOR_SUBPARTS.
3430 (c_common_type_for_mode): Check valid_vector_subparts_p.
3431 * c-pretty-print.c (pp_c_initializer_list): Handle polynomial
3432 VECTOR_CST_NELTS.
3433
85ec4feb
JJ
34342018-01-03 Jakub Jelinek <jakub@redhat.com>
3435
3436 Update copyright years.
3437
170a8bd6 34382017-12-22 Mike Stump <mikestump@comcast.net>
92a285c1 3439 Eric Botcazou <ebotcazou@adacore.com>
170a8bd6
EB
3440
3441 * c-pragma.c (init_pragma): Register pragma GCC unroll.
3442 * c-pragma.h (enum pragma_kind): Add PRAGMA_UNROLL.
3443
ab20d992 34442017-12-22 Alexandre Oliva <aoliva@redhat.com>
18408e96
AO
3445
3446 PR debug/83527
3447 PR debug/83419
3448 * c-semantics.c (only_debug_stmts_after_p): New.
3449 (pop_stmt_list): Clear side effects in debug-only stmt list.
3450 Check for single nondebug stmt followed by debug stmts only.
3451
c12d20d4
AO
34522017-12-21 Alexandre Oliva <aoliva@redhat.com>
3453
3454 PR debug/83419
3455 * c-semantics.c (pop_stmt_list): Propagate side effects from
3456 single nondebug stmt to container list.
3457
01512446
JJ
34582017-12-19 Jakub Jelinek <jakub@redhat.com>
3459
3460 * known-headers.cc (get_stdlib_header_for_name): Replace Yoda
3461 conditions with typical order conditions.
3462
82cfbd01
MP
34632017-12-18 Marek Polacek <polacek@redhat.com>
3464
3465 * c-warn.c (warn_logical_operator): Return early if -Wlogical-op is
3466 not in effect.
3467
99da11ec
MS
34682017-12-17 Martin Sebor <msebor@redhat.com>
3469
3470 * c-attribs.c (common_handle_aligned_attribute): Avoid issuing
3471 an error for attribute warn_if_not_aligned.
3472
cc8bea0a
MS
34732017-12-16 Martin Sebor <msebor@redhat.com>
3474
3475 PR tree-optimization/78918
3476 * c-common.c (check_function_restrict): Avoid checking built-ins.
3477 * c.opt (-Wrestrict): Include in -Wall.
3478
4849deb1
JJ
34792017-12-15 Jakub Jelinek <jakub@redhat.com>
3480
3481 * c-attribs.c (c_common_attribute_table,
3482 c_common_format_attribute_table): Swap affects_type_identity
3483 and handler fields, adjust comments.
3484
c65e18d3
BE
34852017-12-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
3486
3487 * c.opt (Wcast-function-type): New warning option.
3488 * c-lex.c (get_fileinfo): Avoid warning.
3489 * c-ppoutput.c (scan_translation_unit_directives_only): Remove cast.
3490
2004617a
QZ
34912017-12-14 Qing Zhao <qing.zhao@oracle.com>
3492
7365279f 3493 PR middle_end/79538
2004617a
QZ
3494 * c-cppbuiltin.c (builtin_define_with_hex_fp_value):
3495 Adjust the size of buf1 and buf2, add a new buf to avoid
3496 format-overflow warning.
3497
ab20d992 34982017-12-12 Alexandre Oliva <aoliva@redhat.com>
96a95ac1
AO
3499
3500 * c-semantics.c (pop_stmt_list): Move begin stmt marker into
3501 subsequent statement list.
3502
5d9ae53d
MS
35032017-12-07 Martin Sebor <msebor@redhat.com>
3504
3505 PR c/81544
3506 PR c/81566
3507 * c-attribs.c (attr_aligned_exclusions): New array.
3508 (attr_alloc_exclusions, attr_cold_hot_exclusions): Same.
3509 (attr_common_exclusions, attr_const_pure_exclusions): Same.
3510 (attr_gnu_inline_exclusions, attr_inline_exclusions): Same.
3511 (attr_noreturn_exclusions, attr_returns_twice_exclusions): Same.
3512 (attr_warn_unused_result_exclusions): Same.
3513 (handle_hot_attribute, handle_cold_attribute): Simplify.
3514 (handle_const_attribute): Warn on function returning void.
3515 (handle_pure_attribute): Same.
3516 (handle_aligned_attribute): Diagnose conflicting attribute
3517 specifications.
3518 * c-warn.c (diagnose_mismatched_attributes): Simplify.
3519
c79144f8
DM
35202017-12-06 David Malcolm <dmalcolm@redhat.com>
3521
3522 PR c/83236
3523 * c-common.c (selftest::c_family_tests): Call
3524 selftest::c_spellcheck_cc_tests.
3525 * c-common.h (selftest::c_spellcheck_cc_tests): New decl.
3526 * c-spellcheck.cc: Include "selftest.h".
3527 (name_reserved_for_implementation_p): New function.
3528 (should_suggest_as_macro_p): New function.
3529 (find_closest_macro_cpp_cb): Move the check for NT_MACRO to
3530 should_suggest_as_macro_p and call it.
3531 (selftest::test_name_reserved_for_implementation_p): New function.
3532 (selftest::c_spellcheck_cc_tests): New function.
3533 * c-spellcheck.h (name_reserved_for_implementation_p): New decl.
3534
613bc14f
DM
35352017-12-06 David Malcolm <dmalcolm@redhat.com>
3536
3537 * c-spellcheck.cc: New file, taken from macro-handling code in
3538 spellcheck-tree.c.
3539 * c-spellcheck.h: New file, taken from macro-handling code in
3540 spellcheck-tree.h.
3541
e76c7157
JJ
35422017-12-01 Jakub Jelinek <jakub@redhat.com>
3543
3544 * c-attribs.c (c_common_attribute_table): Remove "cilk simd function"
3545 attribute.
3546 (handle_simd_attribute): Don't check for "cilk simd function"
3547 attribute. Reindent, formatting changes.
3548
b0da4034
JK
35492017-11-30 Julia Koval <julia.koval@intel.com>
3550
3551 * c-common.h (inv_list): Remove.
3552
058f0b9e
JJ
35532017-11-28 Jakub Jelinek <jakub@redhat.com>
3554
3555 PR sanitizer/81275
3556 * c-common.c (c_switch_covers_all_cases_p_1,
3557 c_switch_covers_all_cases_p): New functions.
3558 * c-common.h (c_switch_covers_all_cases_p): Declare.
3559
5e9d6aa4 35602017-11-28 Julia Koval <julia.koval@intel.com>
92a285c1 3561 Sebastian Peryt <sebastian.peryt@intel.com>
5e9d6aa4
JK
3562
3563 * array-notation-common.c: Delete.
3564 * c-cilkplus.c: Ditto.
3565 * c-common.c (_Cilk_spawn, _Cilk_sync, _Cilk_for): Remove.
3566 * c-common.def (ARRAY_NOTATION_REF): Remove.
3567 * c-common.h (RID_CILK_SPAWN, build_array_notation_expr,
3568 build_array_notation_ref, C_ORT_CILK, c_check_cilk_loop,
3569 c_validate_cilk_plus_loop, cilkplus_an_parts,
3570 cilk_ignorable_spawn_rhs_op,
3571 cilk_recognize_spawn): Remove.
3572 * c-gimplify.c (CILK_SPAWN_STMT): Remove.
3573 * c-omp.c: Remove CILK_SIMD check.
3574 * c-pragma.c: Ditto.
3575 * c-pragma.h: Remove CILK related pragmas.
3576 * c-pretty-print.c (c_pretty_printer::postfix_expression): Remove
3577 ARRAY_NOTATION_REF condition.
3578 (c_pretty_printer::expression): Ditto.
3579 * c.opt (fcilkplus): Remove.
3580 * cilk.c: Delete.
3581
1af4ebf5
MG
35822017-11-21 Marc Glisse <marc.glisse@inria.fr>
3583
3584 * c-pretty-print.c (pp_c_additive_expression,
3585 c_pretty_printer::expression): Handle POINTER_DIFF_EXPR.
3586
d44ed508
JJ
35872017-11-21 Jakub Jelinek <jakub@redhat.com>
3588
7d2f0f9b
JJ
3589 * c-common.c (get_nonnull_operand): Use tree_to_uhwi.
3590
d44ed508
JJ
3591 PR c++/83059
3592 * c-common.c (get_atomic_generic_size): Use TREE_INT_CST_LOW
3593 instead of tree_to_uhwi, formatting fix.
3594
26edace6
DM
35952017-11-20 David Malcolm <dmalcolm@redhat.com>
3596
3597 PR c/81404
3598 * known-headers.cc: New file, based on material from c/c-decl.c.
3599 (suggest_missing_header): Copied as-is.
3600 (get_stdlib_header_for_name): New, based on get_c_name_hint but
3601 heavily edited to add C++ support. Add some knowledge about
3602 <limits.h>, <stdint.h>, and <wchar.h>.
3603 * known-headers.h: Likewise.
3604
6c7a259b
DM
36052017-11-20 David Malcolm <dmalcolm@redhat.com>
3606
3607 * c-common.h (enum lookup_name_fuzzy_kind): Move to name-hint.h.
3608 (lookup_name_fuzzy): Likewise. Convert return type from
3609 const char * to name_hint. Add location_t param.
3610 * name-hint.h: New header.
3611
f9c59f7e
JJ
36122017-11-19 Jakub Jelinek <jakub@redhat.com>
3613
3614 PR c/66618
3615 PR c/69960
3616 * c-common.h (c_fully_fold): Add LVAL argument defaulted to false.
3617
1e39313a
JM
36182017-11-16 Joseph Myers <joseph@codesourcery.com>
3619
3620 * c.opt (-std=c17, std=gnu17, -std=iso9899:2017): Refer to 2018
3621 expected publication date of C17.
3622 (-std=c18, -std=gnu18, -std=iso9899:2018): New option aliases.
3623
3ca0dc60
JM
36242017-11-15 Joseph Myers <joseph@codesourcery.com>
3625
3626 PR c/81156
3627 * c-common.c (c_common_reswords): Add __builtin_tgmath.
3628 * c-common.h (enum rid): Add RID_BUILTIN_TGMATH.
3629
025d57f0
MS
36302017-11-10 Martin Sebor <msebor@redhat.com>
3631
3632 PR c/81117
3633 * c-common.c (catenate_strings): Use memcpy instead of strncpy.
3634 * c-warn.c (sizeof_pointer_memaccess_warning): Handle arrays.
3635 * c.opt (-Wstringop-truncation): New option.
3636
1b6fa695
ML
36372017-11-06 Martin Liska <mliska@suse.cz>
3638
3639 PR middle-end/82404
3640 * c-opts.c (c_common_post_options): Set -Wreturn-type for C++
3641 FE.
3642 * c.opt: Set default value of warn_return_type.
3643
64a5912c
DM
36442017-10-31 David Malcolm <dmalcolm@redhat.com>
3645
3646 * c-common.c (binary_op_error): Update for renaming of
3647 error_at_rich_loc.
3648 (c_parse_error): Likewise.
3649 * c-warn.c (warn_logical_not_parentheses): Likewise for
3650 renaming of inform_at_rich_loc.
3651 (warn_for_restrict): Likewise for renaming of
3652 warning_at_rich_loc_n.
3653
c76dc9c3
JM
36542017-10-30 Joseph Myers <joseph@codesourcery.com>
3655
3656 * c.opt (std=c17, std=gnu17, std=iso9899:2017): New options.
3657 * c-opts.c (set_std_c17): New function.
3658 (c_common_init_options): Use gnu17 as default C version.
3659 (c_common_handle_option): Handle -std=c17 and -std=gnu17.
3660
ee5fd23a
MM
36612017-10-27 Michael Meissner <meissner@linux.vnet.ibm.com>
3662
3663 * c-cppbuiltin.c (mode_has_fma): Add support for PowerPC KFmode.
3664 (c_cpp_builtins): If a machine has a fast fma _Float<N> and
3665 _Float<N>X variant, define __FP_FAST_FMA<N> and/or
3666 __FP_FAST_FMA<N>X.
3667
d1047465
MP
36682017-10-23 Marek Polacek <polacek@redhat.com>
3669
3670 PR c/82681
3671 * c-warn.c (warnings_for_convert_and_check): Fix typos.
3672
9e878cf1
EB
36732017-10-19 Eric Botcazou <ebotcazou@adacore.com>
3674
3675 * c-common.c (check_builtin_function_arguments): Also check arguments
3676 of __builtin_alloca_with_align_and_max.
3677
89b6abbb
DM
36782017-10-17 David Malcolm <dmalcolm@redhat.com>
3679
3680 * c-format.c (format_warning_at_char): Pass UNKNOWN_LOCATION
3681 rather than NULL to format_warning_va.
3682 (check_format_types): Likewise when calling format_type_warning.
3683 Remove code to extract source_ranges and source_range * in favor
3684 of just a location_t.
3685 (format_type_warning): Convert source_range * param to a
3686 location_t.
3687
39382c09
JJ
36882017-10-13 Jakub Jelinek <jakub@redhat.com>
3689
3690 * c-gimplify.c (c_gimplify_expr): Handle [LR]ROTATE_EXPR like
3691 [LR]SHIFT_EXPR.
3692
62e1c678
DM
36932017-10-12 David Malcolm <dmalcolm@redhat.com>
3694
3695 * c-common.c (enum missing_token_insertion_kind): New enum.
3696 (get_missing_token_insertion_kind): New function.
3697 (maybe_suggest_missing_token_insertion): New function.
3698 * c-common.h (maybe_suggest_missing_token_insertion): New decl.
3699
b90c9338
NS
37002017-10-11 Nathan Sidwell <nathan@acm.org>
3701
3702 * c-opts.c (add_prefixed_path): Change chain to incpath_kind.
3703 (c_common_handle_option): Update incpath_kind names.
3704
3a266bcd
ML
37052017-10-11 Martin Liska <mliska@suse.cz>
3706
3707 PR sanitizer/82490
3708 * c-attribs.c (handle_no_sanitize_attribute): Report directly
3709 Wattributes warning.
3710
8e6cdc90
RS
37112017-10-10 Richard Sandiford <richard.sandiford@linaro.org>
3712
3713 * c-ada-spec.c (dump_generic_ada_node): Use wi::to_wide when
3714 operating on trees as wide_ints.
3715 * c-common.c (pointer_int_sum): Likewise.
3716 * c-pretty-print.c (pp_c_integer_constant): Likewise.
3717 * c-warn.c (match_case_to_enum_1): Likewise.
3718 (c_do_switch_warnings): Likewise.
3719 (maybe_warn_shift_overflow): Likewise.
3720
802b38c9
JJ
37212017-10-10 Jakub Jelinek <jakub@redhat.com>
3722
3723 PR c/82437
3724 * c-warn.c (warn_tautological_bitwise_comparison): Use wi::to_wide
3725 instead of wide_int::from.
3726
4e34b338
JJ
37272017-10-06 Jakub Jelinek <jakub@redhat.com>
3728
3729 PR c/82437
3730 * c-warn.c (warn_tautological_bitwise_comparison): Instead of
3731 using to_widest use wide_int with the larger of the two precisions.
3732
4bc4b2b4
BE
37332017-10-05 Bernd Edlinger <bernd.edlinger@hotmail.de>
3734
3735 * c-pretty-print.c (pp_c_parameter_type_list): Print ... for variadic
3736 functions.
3737
a1488398
RS
37382017-10-02 Richard Sandiford <richard.sandiford@linaro.org>
3739
3740 * c-warn.c (warn_tautological_bitwise_comparison): Use wi::to_widest
3741 when combining the original unconverted comparison operands.
3742
01c9fb68
JJ
37432017-09-29 Jakub Jelinek <jakub@redhat.com>
3744
3745 * c-attribs.c (handle_noipa_attribute): Don't add "stack_protect"
3746 attribute.
3747
6e3e8419
EB
37482017-09-29 Eric Botcazou <ebotcazou@adacore.com>
3749
3750 * c-ada-spec.c (to_ada_name): Add index parameter.
3751 (pp_ada_tree_identifier): Likewise.
3752 (dump_ada_macros): Adjust call to to_ada_name.
3753 (struct overloaded_name_hash): New type.
3754 (struct overloaded_name_hasher): Likewise.
3755 (overloaded_names): New hash table.
3756 (compute_overloading_index): New function.
3757 (dump_ada_decl_name): Call it and pass the result to
3758 pp_ada_tree_identifier.
3759 (dump_ada_double_name): Adjust calls to pp_ada_tree_identifier.
3760 (dump_ada_function_declaration): Likewise.
3761 (dump_generic_ada_node): Likewise.
3762 (print_constructor): Likewise.
3763 (print_destructor): Likewise.
3764 (dump_ada_specs): Delete overloaded_names table.
3765
79310774
EB
37662017-09-29 Eric Botcazou <ebotcazou@adacore.com>
3767
3768 * c-ada-spec.c (max_ada_macros): Move around.
3769 (store_ada_macro_index): Likewise.
3770 (source_file): Rename into...
3771 (macro_source_file): ...this.
3772 (count_ada_macro): Move around.
3773 (store_ada_macro): Likewise.
3774 (compare_macro): Likewise.
3775 (print_ada_macros): Merge in...
3776 (dump_ada_macros): ...this.
3777 (source_file_base): Rename into...
3778 (current_source_file): ...this.
3779 (print_comment): Move around.
3780 (dump_ada_nodes): Call dump_ada_declaration directly.
3781 (struct with): Change type of limited field to bool.
3782 (append_withs): Change type of limited_access parameter to bool.
3783 (pp_ada_tree_identifie): Likewise.
3784 (dump_ada_decl_nam): Likewise.
3785 (dump_generic_ada_node): Likewise. Do not print the return type.
3786 (to_ada_name): Change type of space_found parameter to bool.
3787 (dump_ada_function_declaration): Return void and change type of
3788 parameters to bool. Also print the return type for a function.
3789 (print_ada_methods): Rename into...
3790 (dump_ada_methods): ...this.
3791 (print_ada_declaration): Rename into ...
3792 (dump_ada_declaration): ...this. Do not print the return type.
3793 (print_ada_struct_decl): Rename into...
3794 (dump_ada_struct_decl): ...this.
3795
7d386d45
JJ
37962017-09-29 Jakub Jelinek <jakub@redhat.com>
3797
3798 * c-attribs.c (handle_packed_attribute): Test DECL_C_BIT_FIELD
3799 rather than DECL_INITIAL.
3800 (common_handle_aligned_attribute): Likewise.
3801
ab20d992 38022017-09-20 Alexandre Oliva <aoliva@redhat.com>
9ed32e27
AO
3803
3804 * c.opt (gen-decls): Add RejectNegative.
3805
026a79f7
AS
38062017-09-15 Andrew Sutton <andrew.n.sutton@gmail.com>
3807 Jakub Jelinek <jakub@redhat.com>
3808
3809 Add support for -std=c++2a.
3810 * c-common.h (cxx_dialect): Add cxx2a as a dialect.
3811 * opt.c: Add options for -std=c++2a and -std=gnu++2a.
3812 * c-opts.c (set_std_cxx2a): New.
3813 (c_common_handle_option): Set options when -std=c++2a is enabled.
3814 (c_common_post_options): Adjust comments.
3815 (set_std_cxx14, set_std_cxx17): Likewise.
3816
4a8ca690
EB
38172017-09-15 Eric Botcazou <ebotcazou@adacore.com>
3818
3819 * c-pragma.c (handle_pragma_scalar_storage_order): Expand on error
3820 message for non-uniform endianness and issue a warning in C++.
3821
7b936140
JJ
38222017-09-15 Jakub Jelinek <jakub@redhat.com>
3823
3824 * c.opt (Wc++1z-compat): Change from option to undocumented alias.
3825 (Wc++17-compat): Change from undocumented alias to option.
3826 (Wnoexcept-type): Enable by Wc++17-compat instead of Wc++1z-compat,
3827 change C++1z to C++17 in description.
3828 (std=c++1z, std=gnu++1z): Change from option to undocumented
3829 deprecated alias.
3830 (std=c++17, std=gnu++17): Change from undocumented alias to option.
3831 Adjust description.
3832 * c-common.h (enum cxx_dialect): Rename cxx1z to cxx17.
3833 * c-opts.c (set_std_cxx1z): Rename to ...
3834 (set_std_cxx17): ... this.
3835 (c_common_handle_option): Rename OPT_std_c__1z to OPT_std_c__17
3836 and OPT_std_gnu__1z to OPT_std_gnu__17. Adjust set_std_cxx1z
7365279f 3837 caller.
7b936140
JJ
3838 (c_common_post_options): Use cxx17 instead of cxx1z. Adjust
3839 comments.
3840
12263f13
L
38412017-09-12 H.J. Lu <hongjiu.lu@intel.com>
3842
3843 * c-attribs.c (common_handle_aligned_attribute): Don't warn
3844 function alignment if warn_if_not_aligned_p is true.
3845
6836632e
NS
38462017-09-12 Nathan Sidwell <nathan@acm.org>
3847
3848 * c-common.c (field_decl_cmp, resort_data, resort_field_decl_cmp,
3849 resort_sorted_fields): Move to c/c-decl.c.
3850 * c-common.h (field_decl_cmp, resort_sorted_fields): Delete.
3851 (struct sorted_fields_type): Move to c/c-lang.h.
3852
019bf9ad
JW
38532017-09-09 Jonathan Wakely <jwakely@redhat.com>
3854
3855 PR c++/81852
3856 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_threadsafe_static_init.
3857
bc7fe952
MP
38582017-09-04 Marek Polacek <polacek@redhat.com>
3859
3860 PR c/81783
3861 * c-warn.c (warn_tautological_bitwise_comparison): New function.
3862 (warn_tautological_cmp): Call it.
3863
ab20d992 38642017-09-01 Boris Kolpackov <boris@codesynthesis.com>
de7c2c6a
BK
3865
3866 * c-opts.c (c_common_finish): Write dependency information even if
3867 there are errors.
3868
d2e05fcb
JJ
38692017-09-01 Jakub Jelinek <jakub@redhat.com>
3870
3871 PR c/81887
3872 * c-pragma.c (omp_pragmas): Move "ordered" entry from here to ...
3873 (omp_pragmas_simd): ... here.
3874 * c-omp.c (c_finish_omp_ordered): If clauses isn't simd clause alone,
3875 create new clauses list containing just simd clause.
3876
18e2a8b8
RS
38772017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
3878 Alan Hayward <alan.hayward@arm.com>
3879 David Sherwood <david.sherwood@arm.com>
3880
3881 * c-attribs.c (vector_mode_valid_p) Fold GET_MODE_INNER call
3882 into scalar_mode_supported_p call.
3883 (handle_mode_attribute): Update call to scalar_mode_supported_p.
3884
16d22000
RS
38852017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
3886 Alan Hayward <alan.hayward@arm.com>
3887 David Sherwood <david.sherwood@arm.com>
3888
3889 * c-common.c (c_common_fixed_point_type_for_size): Use opt_scalar_mode
3890 for the mode iterator.
3891
b397965c
RS
38922017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
3893 Alan Hayward <alan.hayward@arm.com>
3894 David Sherwood <david.sherwood@arm.com>
3895
3896 * c-lex.c (interpret_fixed): Use SCALAR_TYPE_MODE.
3897 * c-common.c (c_build_vec_perm_expr): Likewise.
3898
357b7604
RS
38992017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
3900 Alan Hayward <alan.hayward@arm.com>
3901 David Sherwood <david.sherwood@arm.com>
3902
3903 * c-common.c (c_common_type_for_mode): Use as_a <scalar_int_mode>.
3904
e05c94ba
RS
39052017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
3906 Alan Hayward <alan.hayward@arm.com>
3907 David Sherwood <david.sherwood@arm.com>
3908
3909 * c-attribs.c (handle_mode_attribute): Check for a scalar_int_mode
3910 before calling targetm.addr_space.valid_pointer_mode.
3911
5c20c4af
RS
39122017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
3913 Alan Hayward <alan.hayward@arm.com>
3914 David Sherwood <david.sherwood@arm.com>
3915
3916 * c-cppbuiltin.c (c_cpp_builtins): Use opt_scalar_float_mode.
3917
c94843d2 39182017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
92a285c1
ML
3919 Alan Hayward <alan.hayward@arm.com>
3920 David Sherwood <david.sherwood@arm.com>
c94843d2
RS
3921
3922 * c-common.c (c_common_fixed_point_type_for_size): Use new mode
3923 iterators.
3924 * c-cppbuiltin.c (c_cpp_builtins): Likewise.
3925
4e10a5a7
RS
39262017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
3927 Alan Hayward <alan.hayward@arm.com>
3928 David Sherwood <david.sherwood@arm.com>
3929
3930 * c-cppbuiltin.c (mode_has_fma): Prefix mode names with E_ in
3931 case statements.
3932
130fcab0
ML
39332017-08-29 Martin Liska <mliska@suse.cz>
3934
3935 PR other/39851
3936 * c-common.c (parse_optimize_options): Add argument to function
3937 call.
3938 * c-pragma.c (handle_pragma_diagnostic): Likewise.
3939
14e18d71
DM
39402017-08-24 David Malcolm <dmalcolm@redhat.com>
3941
3942 * c-lex.c (interpret_float): Use token location
3943 when building an EXCESS_PRECISION_EXPR.
3944
2f687306
DM
39452017-08-21 David Malcolm <dmalcolm@redhat.com>
3946
3947 * c-common.c (check_function_arguments): Add "arglogs" param; pass
3948 it to check_function_format.
3949 * c-common.h (check_function_arguments): Add vec<location_t> *
3950 param.
3951 (check_function_format): Likewise.
3952 * c-format.c (struct format_check_context): Add field "arglocs".
3953 (check_function_format): Add param "arglocs"; pass it to
3954 check_format_info.
ab20d992 3955 (check_format_info): Add param "arglocs"; use it to initialize
2f687306
DM
3956 new field of format_ctx.
3957 (check_format_arg): Pass format_ctx->arglocs to new param of
3958 check_format_info_main.
3959 (class argument_parser): New field "arglocs".
3960 (argument_parser::argument_parser): Add "arglocs_" param and use
3961 it to initialize new field.
3962 (argument_parser::check_argument_type): Pass new arglocs field to
3963 check_format_types.
3964 (check_format_info_main): Add param "arglocs", and use it when
3965 constructing arg_parser.
3966 (check_format_types): Add param "arglocs"; use it if non-NULL when
3967 !EXPR_HAS_LOCATION (cur_param) to get at location information.
3968
00aa1fa2
L
39692017-08-18 H.J. Lu <hongjiu.lu@intel.com>
3970
3971 PR c/53037
3972 * c-attribs.c (handle_warn_if_not_aligned_attribute): New.
3973 (c_common_attribute_table): Add warn_if_not_aligned.
3974 (handle_aligned_attribute): Renamed to ...
3975 (common_handle_aligned_attribute): Remove argument, name, and add
3976 argument, warn_if_not_aligned. Handle warn_if_not_aligned.
3977 (handle_aligned_attribute): New.
3978 * c.opt: Add -Wif-not-aligned and -Wpacked-not-aligned.
3979
27be025d
MS
39802017-08-14 Martin Sebor <msebor@redhat.com>
3981
3982 PR c/81117
3983 * c-attribs.c (c_common_attribute_table): Add nonstring entry.
3984 (handle_nonstring_attribute): New function.
3985
da67acb9
MS
39862017-08-14 Martin Sebor <msebor@redhat.com>
3987
3988 PR c/81117
3989 * c-format.h (T89_G): New macro.
3990 * c-format.c (local_gcall_ptr_node): New variable.
3991 (init_dynamic_diag_info): Initialize it.
3992
a8b522b4
ML
39932017-08-11 Martin Liska <mliska@suse.cz>
3994
3995 * c-opts.c (c_common_post_options): Replace ASM_OUTPUT_DEF with
3996 TARGET_SUPPORTS_ALIASES.
3997
32129a17
DM
39982017-08-10 David Malcolm <dmalcolm@redhat.com>
3999
4000 * c-common.c (c_parse_error): Add rich_location * param, using it
4001 rather implicitly using input_location.
4002 * c-common.h (c_parse_error): Add rich_location * param.
4003
30af3a2b
MP
40042017-08-09 Marek Polacek <polacek@redhat.com>
4005
4006 * c-common.c (pointer_int_sum): Use true/false instead of 1/0.
4007 (c_common_truthvalue_conversion): Likewise.
4008 * c-omp.c (c_finish_omp_atomic): Likewise.
4009 * c-common.h (build_binary_op): Update declaration.
4010
314e6352
ML
40112017-08-08 Martin Liska <mliska@suse.cz>
4012
4013 * c-ada-spec.c: Include header files.
4014 * c-ubsan.c: Likewise.
4015 * c-warn.c: Likewise.
4016
56b5041c
JJ
40172017-08-07 Jakub Jelinek <jakub@redhat.com>
4018
4019 PR c/69389
4020 * c-omp.c (c_finish_omp_atomic): Handle atomics on bitfields.
4021
db440138
EB
40222017-08-07 Eric Botcazou <ebotcazou@adacore.com>
4023
4024 * c-ada-spec.c (has_nontrivial_methods): Test for FUNCTION_DECL.
4025 (print_ada_methods): Likewise.
4026 (print_ada_declaration): Likewise.
4027
577eec56
ML
40282017-08-07 Martin Liska <mliska@suse.cz>
4029
4030 * array-notation-common.c: Add new includes.
4031 * c-format.c( handle_format_attribute): Canonicalize a format
4032 function name.
4033 * c-lex.c (c_common_has_attribute): Canonicalize name of an
4034 attribute.
4035 * c-pretty-print.c: Add new include.
4036
b854df3c
EB
40372017-08-05 Eric Botcazou <ebotcazou@adacore.com>
4038
4039 * c-ada-spec.c (has_static_fields): Look only into variables.
4040 (print_constructor): Add TYPE parameter and use it for the name.
4041 (print_destructor): Likewise.
4042 (print_ada_declaration): Adjust to new constructor/destructor names.
4043 Adjust calls to print_constructor and print_destructor.
4044 (print_ada_struct_decl): Do not test TREE_STATIC on FIELD_DECL.
4045 Look only into variables in the final loop.
4046
9f2cb25e
EB
40472017-08-01 Eric Botcazou <ebotcazou@adacore.com>
4048
4049 * c-ada-spec.c (has_static_fields): Look only into fields.
4050 (dump_generic_ada_node): Small tweak.
4051 (dump_nested_types): Look only into fields.
4052 (print_ada_declaration): Look only into methods. Small tweak.
4053 (print_ada_struct_decl): Look only into fields. Use DECL_VIRTUAL_P.
4054
f4bcd9eb
EB
40552017-08-01 Eric Botcazou <ebotcazou@adacore.com>
4056
4057 * c-ada-spec.c (print_generic_ada_decl): Pass correctly-typed constant.
4058 (dump_ada_function_declaration): Likewise.
4059 (dump_generic_ada_node): Likewise.
4060 (print_ada_declaration): Add support for const-qualified variables.
4061
f34ebeb2
ML
40622017-07-31 Martin Liska <mliska@suse.cz>
4063
4064 PR sanitize/81530
4065 * c-ubsan.c (ubsan_maybe_instrument_array_ref):
4066 Guard condition with flag_sanitize_p also with current_function_decl
4067 non-null equality.
4068 (ubsan_maybe_instrument_reference_or_call): Likewise.
4069
218e5d04
UB
40702017-07-30 Uros Bizjak <ubizjak@gmail.com>
4071
4072 * c-format.c (asm_fprintf_char_table): Add 'z' to format_chars.
4073
942047f2
EB
40742017-07-29 Eric Botcazou <ebotcazou@adacore.com>
4075
4076 * c-ada-spec.c (dump_generic_ada_node): Take into account signedness
4077 for enumeral types.
4078 (print_ada_declaration): Add missing guard for record types.
4079
a40ff0ae
JJ
40802017-07-27 Jakub Jelinek <jakub@redhat.com>
4081
4082 PR c/45784
4083 * c-omp.c (c_finish_omp_for): If the condition is wrapped in
4084 rhs of COMPOUND_EXPR(s), skip them and readd their lhs into
4085 new COMPOUND_EXPRs around the rhs of the comparison.
4086
06bd22f6
MP
40872017-07-27 Marek Polacek <polacek@redhat.com>
4088
4089 PR c/81417
4090 * c-warn.c (warn_for_sign_compare): Tweak the warning message. Print
4091 the types.
4092
036ea399
JJ
40932017-07-27 Jakub Jelinek <jakub@redhat.com>
4094
4095 * c-attribs.c (c_common_attribute_table): Add noipa attribute.
4096 (handle_noipa_attribute): New function.
4097
417ca011
TD
40982017-07-07 Torsten Duwe <duwe@suse.de>
4099
4100 * c-attribs.c (c_common_attribute_table): Add entry for
4101 "patchable_function_entry".
4102
5aaa8fb4
NS
41032017-07-20 Nathan Sidwell <nathan@acm.org>
4104
4105 Remove TYPE_METHODS.
4106 * c-ada-spec.c (is_tagged_type, has_nontrivial_methods,
4107 dump_ada_template, print_ada_methods,
4108 print_ada_declaration): Member fns are on TYPE_FIELDS.
4109
ff22eb12
NS
41102017-07-18 Nathan Sidwell <nathan@acm.org>
4111
4112 * c-warn.c (warn_for_memset): Use TYPE_{MIN,MAX}_VALUE.
4113
eea77d1f
DM
41142017-07-14 David Malcolm <dmalcolm@redhat.com>
4115
4116 * c-common.c (try_to_locate_new_include_insertion_point): New
4117 function.
4118 (per_file_includes_t): New typedef.
4119 (added_includes_t): New typedef.
4120 (added_includes): New variable.
4121 (maybe_add_include_fixit): New function.
4122 * c-common.h (maybe_add_include_fixit): New decl.
4123
281ac396
MS
41242017-07-10 Martin Sebor <msebor@redhat.com>
4125
4126 PR other/81345
4127 * c.opt (-Wstringop-overflow): Set defaults in LangEnabledBy.
4128
b6f43128
DM
41292017-07-06 David Malcolm <dmalcolm@redhat.com>
4130
4131 * c-common.c (selftest::c_family_tests): New.
4132 * c-common.h (selftest::run_c_tests): Move decl to c/c-lang.h.
4133 (selftest::c_family_tests): New decl.
4134
efbf55b0
MP
41352017-07-04 Marek Polacek <polacek@redhat.com>
4136
4137 PR c/81231
4138 * c-common.c (sync_resolve_size): Give error for pointers to incomplete
4139 types.
4140
6c86bd88
MP
41412017-07-04 Marek Polacek <polacek@redhat.com>
4142
4143 * c-warn.c (warn_if_unused_value): Remove WITH_CLEANUP_EXPR handling.
4144
17a7218b
ML
41452017-06-28 Martin Liska <mliska@suse.cz>
4146
4147 PR ipa/81128
4148 * c-attribs.c (handle_alias_ifunc_attribute): Append ifunc alias
4149 to a function declaration.
4150
63010089
ML
41512017-06-28 Martin Liska <mliska@suse.cz>
4152
4153 PR driver/79659
4154 * c.opt: Add IntegerRange to various options.
4155
3e2becc4
MP
41562017-06-26 Marek Polacek <polacek@redhat.com>
4157
4158 PR c/80116
4159 * c-common.h (warn_for_multistatement_macros): Declare.
4160 * c-warn.c: Include "c-family/c-indentation.h".
4161 (warn_for_multistatement_macros): New function.
4162 * c.opt (Wmultistatement-macros): New option.
4163 * c-indentation.c (guard_tinfo_to_string): No longer static.
4164 Change the parameter type to "enum rid". Handle RID_SWITCH.
4165 * c-indentation.h (guard_tinfo_to_string): Declare.
4166
2db9b7cd
MG
41672017-06-23 Marc Glisse <marc.glisse@inria.fr>
4168
4169 * c-common.c (c_common_nodes_and_builtins): Use builtin_structptr_types.
4170
c3684b7b
MS
41712017-06-15 Martin Sebor <msebor@redhat.com>
4172
4173 PR c++/80560
4174 * c.opt (-Wclass-memaccess): New option.
4175
e72c4afd
BK
41762017-06-14 Boris Kolpackov <boris@codesynthesis.com>
4177
4178 * c-opts.c (c_common_finish): Handle '-' special value to -MF.
4179
8a516588
MP
41802017-06-13 Marek Polacek <polacek@redhat.com>
4181
4182 PR objc/80949
4183 * c-warn.c (do_warn_duplicated_branches): Return if any of the
4184 branches is null.
4185
45b2222a
ML
41862017-06-13 Martin Liska <mliska@suse.cz>
4187
4188 PR sanitize/78204
4189 * c-attribs.c (add_no_sanitize_value): New function.
4190 (handle_no_sanitize_attribute): Likewise.
4191 (handle_no_sanitize_address_attribute): Use the function.
4192 (handle_no_sanitize_thread_attribute): New function.
4193 (handle_no_address_safety_analysis_attribute): Use
4194 add_no_sanitize_value.
4195 (handle_no_sanitize_undefined_attribute): Likewise.
4196 * c-common.h: Declare new functions.
4197 * c-ubsan.c (ubsan_instrument_division): Use sanitize_flags_p.
4198 (ubsan_instrument_shift): Likewise.
4199 (ubsan_instrument_bounds): Likewise.
4200 (ubsan_maybe_instrument_array_ref): Likewise.
4201 (ubsan_maybe_instrument_reference_or_call): Likewise.
4202
a01f151f
JM
42032017-06-11 Jason Merrill <jason@redhat.com>
4204
4205 * c-ada-spec.c, c-pragma.c: Use id_equal.
4206
3de4ac6d
MP
42072017-06-04 Marek Polacek <polacek@redhat.com>
4208
4209 PR c/80919
4210 * c-format.c (matching_type_p): Return false if any of the types
4211 requires structural equality.
4212
2474f48f
MS
42132017-06-02 Martin Sebor <msebor@redhat.com>
4214
4215 PR c/80892
4216 * c-warn.c (conversion_warning): Use -Wconversion for integer
4217 conversion and -Wfloat-conversion for floating one.
4218
40ffd95f
BE
42192017-06-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
4220
4221 * c.opt (Wsizeof-pointer-div): New warning option.
4222
3fa4634c
VR
42232017-06-01 Volker Reichelt <v.reichelt@netcologne.de>
4224
4225 * c.opt (Wcatch-value): New shortcut for Wcatch-value=1.
4226 (Wcatch-value=1): Enable by -Wall.
4227
f012c8ef
DM
42282017-05-30 David Malcolm <dmalcolm@redhat.com>
4229
4230 * c-format.c (gcc_cxxdiag_char_table): Add 'H' and 'I' to
4231 format_chars.
4232 * c.opt (fdiagnostics-show-template-tree): New option.
4233 (felide-type): New option.
4234
63dbcd13
VR
42352017-05-25 Volker Reichelt <v.reichelt@netcologne.de>
4236
4237 * c.opt (Wcatch-value=): New C++ warning flag.
4238
be136b5c
NS
42392017-05-24 Nathan Sidwell <nathan@acm.org>
4240
4241 * c=common.c (field_decl_cmp, resort_field_decl_cmp): Adjust T
4242 const casts to avoid warning.
4243
3cd211af
MS
42442017-05-24 Martin Sebor <msebor@redhat.com>
4245
4246 PR c/80731
4247 * c-common.h (unsafe_conversion_p): Add a function argument.
4248 * c-common.c (unsafe_conversion_p): Same.
4249 Add type names and values to diagnostics.
4250 (scalar_to_vector): Adjust.
4251 * c-warn.c (constant_expression_error): Add a function argument.
4252 Add type names and values to diagnostics.
4253 (conversion_warning): Add a function argument.
4254 Add type names and values to diagnostics.
4255 (warnings_for_convert_and_check): Same.
4256
1ff7be5a
JM
42572017-05-19 Jason Merrill <jason@redhat.com>
4258
4259 * c-warn.c (match_case_to_enum_1): Don't warn about enums with no
4260 enumerators.
4261
ff502317
BE
42622017-05-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
4263
4264 * c-format.c (locus): Move out of function scope,
4265 add GTY attribute.
4266
2a8a8d7b
NS
42672017-05-19 Nathan Sidwell <nathan@acm.org>
4268
4269 * c-opts.c (class_dump_file, class_dump_flags): Delete.
4270 (c_common_parse_file): Remove class dump handling.
4271 (get_dump_info): Likewise.
4272
39aac208
RB
42732017-05-19 Richard Biener <rguenther@suse.de>
4274
4275 PR c++/80593
4276 * c-warn.c (strict_aliasing_warning): Do not warn for accesses
4277 to alias-set zero memory.
4278
6ecd2339
BE
42792017-05-18 Bernd Edlinger <bernd.edlinger@hotmail.de>
4280
4281 * c-format.c (local_tree_type_node): Add GTY attribute.
4282
6574d78e
MP
42832017-05-18 Marek Polacek <polacek@redhat.com>
4284
4285 * c-common.c (c_common_type_for_size): Use NULL_TREE instead of 0.
4286 (c_common_fixed_point_type_for_size): Likewise.
4287 (c_common_type_for_mode): Likewise.
4288 (shorten_compare): Likewise.
4289 (c_promoting_integer_type_p): Use false/true instead of 0/1.
4290 * c-pragma.c (maybe_apply_renaming_pragma): Use NULL_TREE instead of 0.
4291
e3455240
MP
42922017-05-18 Marek Polacek <polacek@redhat.com>
4293
4294 * c-common.c (self_promoting_args_p): Change the return type to bool.
4295 Use false/true instead of 0/1.
4296 * c-common.h (self_promoting_args_p): Update.
4297
3fa8871b
MP
42982017-05-17 Marek Polacek <polacek@redhat.com>
4299
4300 * c-common.c: Use NULL_TREE instead of 0 where appropriate.
4301 * c-warn.c: Likewise.
4302
b42cc3ca
VV
43032017-05-17 Ville Voutilainen <ville.voutilainen@gmail.com>
4304
4305 Implement new C++ intrinsics __is_assignable and __is_constructible.
4306 * c-common.c (__is_assignable, __is_constructible): New.
4307 * c-common.h (RID_IS_ASSIGNABLE, RID_IS_CONSTRUCTIBLE): Likewise.
4308
1a817418
ML
43092017-05-17 Martin Liska <mliska@suse.cz>
4310
4311 * c-common.h: Introduce dump_flags_t type and
4312 use it instead of int type.
4313 * c-gimplify.c (c_genericize): Likewise.
4314 * c-opts.c: Likewise.
4315
b2fa0a8b
MP
43162017-05-17 Marek Polacek <polacek@redhat.com>
4317
4318 * c-common.c (c_save_expr): Remove.
4319 (c_common_truthvalue_conversion): Remove a call to c_save_expr.
4320 * c-common.h (c_save_expr): Remove declaration.
4321
31c2d57d
VR
43222017-05-09 Volker Reichelt <v.reichelt@netcologne.de>
4323
4324 PR c/35441
4325 * c-pretty-print.c (c_pretty_printer::expression): Handle MAX_EXPR,
4326 MIN_EXPR, EXACT_DIV_EXPR, RDIV_EXPR, LROTATE_EXPR, RROTATE_EXPR.
4327 (c_pretty_printer::postfix_expression): Handle MAX_EXPR, MIN_EXPR.
4328 (c_pretty_printer::multiplicative_expression): Handle EXACT_DIV_EXPR,
4329 RDIV_EXPR.
4330 (pp_c_shift_expression): Handle LROTATE_EXPR, RROTATE_EXPR.
4331
684f84de
MP
43322017-05-09 Marek Polacek <polacek@redhat.com>
4333
4334 PR c/80525
4335 * c-warn.c (unwrap_c_maybe_const): New.
4336 (warn_logical_operator): Call it.
4337
641da50a
NS
43382017-05-09 Nathan Sidwell <nathan@acm.org>
4339
4340 * c-common.c (c_register_builtin_type): Use pushdecl lang_hook.
4341 * c-common.h (pushdecl_top_level, pushdecl): Don't declare here.
4342
631238ac
MS
43432017-05-08 Martin Sebor <msebor@redhat.com>
4344
4345 PR translation/80280
4346 * c-format.h (struct format_flag_spec): Add new member.
4347 (T89_T): New macro.
4348 * c-format.c (local_tree_type_node): New global.
4349 (printf_flag_specs, asm_fprintf_flag_spec): Initialize new data.
4350 (gcc_diag_flag_specs, scanf_flag_specs, strftime_flag_specs): Ditto.
4351 (strfmon_flag_specs): Likewise.
4352 (gcc_diag_char_table, gcc_cdiag_char_table): Split up specifiers
4353 with distinct quoting properties.
4354 (gcc_tdiag_char_table, gcc_cxxdiag_char_table): Same.
4355 (flag_chars_t::validate): Add argument and handle bad quoting.
4356 (check_format_info_main): Handle quoting problems.
4357 (init_dynamic_diag_info): Simplify.
4358
49f0c04c
JM
43592017-05-08 Jason Merrill <jason@redhat.com>
4360
4361 * c-opts.c (c_common_post_options): Update defaults for
4362 flag_abi_version and flag_abi_compat_version.
4363
56d35585
DM
43642017-05-05 David Malcolm <dmalcolm@redhat.com>
4365
4366 * c-common.c (c_cpp_error): Replace report_diagnostic
4367 with diagnostic_report_diagnostic.
4368
0f2c4a8f
MS
43692017-05-04 Martin Sebor <msebor@redhat.com>
4370
4371 PR translation/80280
4372 * c-attribs.c (handle_alias_ifunc_attribute): Quote a %D directive.
4373 (handle_weakref_attribute): Same.
4374
6fe63fb4
NS
43752017-05-03 Nathan Sidwell <nathan@acm.org>
4376
4377 Canonicalize canonical type hashing
4378 * c-common.c (complete_array_type): Use type_hash_canon.
4379
815d9cc6
XR
43802017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn>
4381
92a285c1 4382 PR c++/80038
815d9cc6
XR
4383 * c-common.h (cilk_gimplify_call_params_in_spawned_fn): Remove
4384 prototype.
4385 (cilk_install_body_pedigree_operations): Likewise.
4386 * cilk.c (cilk_set_spawn_marker): Mark functions that should be
4387 detatched.
4388 (cilk_gimplify_call_params_in_spawned_fn): Remove.
4389 (cilk_install_body_pedigree_operations): Likewise.
4390 (gimplify_cilk_spawn): Add EXPR_STMT and CLEANUP_POINT_EXPR
4391 unwrapping.
4392
f8a36447
JJ
43932017-04-27 Jakub Jelinek <jakub@redhat.com>
4394
4395 PR c++/80534
4396 * c-common.c (complete_array_type): Only hash TYPE_TYPELESS_STORAGE
4397 flag on non-aggregate element types.
4398
7c145456
BE
43992017-04-25 Bernd Edlinger <bernd.edlinger@hotmail.de>
4400
4401 * c-common.c (c_type_hasher, type_hash_table): Remove.
4402 (c_common_get_alias_set): Remove unreachable code.
4403 * c-opts.c (c_common_post_options): Make sure cc1 takes only one file.
4404
c3cbcd45
VR
44052017-04-20 Volker Reichelt <v.reichelt@netcologne.de>
4406
4407 * c.opt (Wextra-semi): New C++ warning flag.
4408
8a59d466
JJ
44092017-04-20 Jakub Jelinek <jakub@redhat.com>
4410
4411 PR middle-end/80423
4412 * c-common.c (complete_array_type): Preserve TYPE_TYPELESS_STORAGE.
4413
8487c9a5
JJ
44142017-04-18 Jakub Jelinek <jakub@redhat.com>
4415
4416 PR middle-end/79788
4417 PR middle-end/80375
4418 * c-common.c (c_common_type_for_mode): Don't handle
4419 widest_*_literal_type_node here.
4420 c_common_signed_or_unsigned_type): Likewise.
4421 (c_common_nodes_and_builtins): Set widest_*_literal_type_node
4422 to *intTI_type_node or *intDI_type_node depending on whether
4423 TImode is supported by the target or not.
4424
3ee0fb02
ML
44252017-04-10 Martin Liska <mliska@suse.cz>
4426
4427 PR sanitizer/80350
4428 * c-ubsan.c (ubsan_instrument_shift): Evaluate RHS before
4429 doing an UBSAN check.
4430
5764ee3c
JW
44312017-04-03 Jonathan Wakely <jwakely@redhat.com>
4432
4433 * c-warn.c (do_warn_double_promotion): Fix typo in comment.
4434
6f3af356
JJ
44352017-03-31 Jakub Jelinek <jakub@redhat.com>
4436
4437 PR c++/79572
4438 * c-ubsan.h (ubsan_maybe_instrument_reference): Change argument to
4439 tree *.
4440 * c-ubsan.c (ubsan_maybe_instrument_reference): Likewise. Handle
4441 not just NOP_EXPR to REFERENCE_TYPE, but also INTEGER_CST with
4442 REFERENCE_TYPE.
4443
f6a7a9d5
DM
44442017-03-31 David Malcolm <dmalcolm@redhat.com>
4445
4446 PR documentation/78732
4447 * c.opt (Wendif-labels): Fix description to refer to
4448 #else rather than #elif.
4449
af88f557
JJ
44502017-03-31 Jakub Jelinek <jakub@redhat.com>
4451
4452 PR libstdc++/80251
4453 * c-common.h (enum rid): Add RID_IS_AGGREGATE.
4454 * c-common.c (c_common_reswords): Add __is_aggregate trait.
4455
a9e4a1a5
JJ
44562017-03-27 Jakub Jelinek <jakub@redhat.com>
4457
4458 PR middle-end/80162
4459 * c-common.c (c_common_mark_addressable_vec): Don't set
4460 TREE_ADDRESSABLE on DECL_HARD_REGISTER.
4461
3f01b620
MS
44622017-03-21 Martin Sebor <msebor@redhat.com>
4463
4464 PR c++/79548
4465 * c-common.c (set_underlying_type): Mark type used only when
4466 original del is declared unused.
4467
2f6f187a
DM
44682017-03-10 David Malcolm <dmalcolm@redhat.com>
4469
4470 PR translation/79848
4471 * c-format.c (check_format_string): Simplify uses of "%<%s%>" to
4472 "%qs".
4473
a02fa805
DM
44742017-03-10 David Malcolm <dmalcolm@redhat.com>
4475
4476 PR c/79921
4477 * c-indentation.c (warn_for_misleading_indentation): Remove parens
4478 from inform's message, so that xgettext can locate it.
4479
822a132c
MP
44802017-03-09 Marek Polacek <polacek@redhat.com>
4481
4482 PR c++/79962
4483 PR c++/79984
4484 * c-attribs.c (handle_nonnull_attribute): Save the result of default
4485 conversion to the attribute list.
4486
bba81f1c
ML
44872017-03-09 Martin Liska <mliska@suse.cz>
4488
4489 * c-ada-spec.c (macro_length): Increment value instead of a pointer.
4490
108154ff
JM
44912017-03-03 Jason Merrill <jason@redhat.com>
4492
4493 * c.opt (Wnoexcept-type): New.
4494
eb0e7c34
RB
44952017-03-02 Richard Biener <rguenther@suse.de>
4496
4497 PR c/79756
4498 * c-common.c (c_common_mark_addressable_vec): Look through
4499 C_MAYBE_CONST_EXPR.
4500
9453ba0a
ML
45012017-02-28 Martin Liska <mliska@suse.cz>
4502
4503 * c.opt: Replace space with tabular for options of <number>
4504 type.
4505
6a825afe
ML
45062017-02-28 Martin Liska <mliska@suse.cz>
4507
4508 * c.opt: Fix --help=option -Q for options which are of
4509 an enum type.
4510
4227c9ad
JJ
45112017-02-24 Jakub Jelinek <jakub@redhat.com>
4512
4513 PR c++/79588
4514 * c-common.c (check_function_restrict): New function.
4515 (check_function_arguments): Add FNDECL argument. Call
4516 check_function_restrict if -Wrestrict.
4517 * c-warn.c (warn_for_restrict): Remove ARGS argument, add ARGARRAY
4518 and NARGS. Use auto_vec for ARG_POSITIONS, simplify.
4519 * c-common.h (check_function_arguments): Add FNDECL argument.
4520 (warn_for_restrict): Remove ARGS argument, add ARGARRAY and NARGS.
4521
59909673
EB
45222017-02-24 Eric Botcazou <ebotcazou@adacore.com>
4523
4524 * c-ada-spec.c (dump_ada_function_declaration): Add comment about the
4525 treatment of parameters with pointer-to-tagged type and tidy up.
4526 (print_ada_methods): Remove the special treatment of C++ static member
4527 functions.
4528
54dcd526
ML
45292017-02-22 Martin Liska <mliska@suse.cz>
4530
4531 * c.opt: Replace inequality signs with square brackets
4532 for -Wnornalized.
4533
00bc9de3
JJ
45342017-02-21 Jakub Jelinek <jakub@redhat.com>
4535
4536 PR c++/79641
4537 * c-attribs.c (handle_mode_attribute): Use build_qualified_type to
4538 preserve quals.
4539
97fcf744
JM
45402017-02-17 Joseph Myers <joseph@codesourcery.com>
4541
4542 * c-cppbuiltin.c (builtin_define_float_constants): Define
4543 __DECIMAL_DIG__ to the value for long double.
4544
c7545f1c
MP
45452017-02-15 Marek Polacek <polacek@redhat.com>
4546
4547 PR c/79515
4548 * c-warn.c (do_warn_double_promotion): Don't warn if an invalid
4549 conversion has occured.
4550
c2e84327
DM
45512017-01-24 David Malcolm <dmalcolm@redhat.com>
4552
4553 * c-common.c (c_common_reswords): Add "__RTL".
4554 * c-common.h (enum rid): Add RID_RTL.
4555
2ebd93e1
MP
45562017-01-20 Marek Polacek <polacek@redhat.com>
4557
4558 PR c/64279
4559 * c-common.h (do_warn_duplicated_branches_r): Declare.
4560 * c-gimplify.c (c_genericize): Walk the function tree calling
4561 do_warn_duplicated_branches_r.
4562 * c-warn.c (expr_from_macro_expansion_r): New.
4563 (do_warn_duplicated_branches): New.
4564 (do_warn_duplicated_branches_r): New.
4565 * c.opt (Wduplicated-branches): New option.
4566
0d80ab91
DM
45672017-01-17 David Malcolm <dmalcolm@redhat.com>
4568
4569 PR c++/71497
4570 * c-indentation.c (warn_for_misleading_indentation): Use the past
4571 subjunctive in the note.
4572
7f991c36
AH
45732017-01-17 Aldy Hernandez <aldyh@redhat.com>
4574
4575 PR c/79116
4576 * array-notation-common.c (cilkplus_extract_an_triplets): Convert
4577 start type to integer_type.
4578
1c70261c
JJ
45792017-01-16 Jakub Jelinek <jakub@redhat.com>
4580
4581 PR driver/49726
4582 * c.opt (gen-decls): Add Driver flag.
4583
1ddca3f3
PC
45842017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
4585
4586 Revert:
4587 2017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
4588
4589 PR c++/71737
4590 * c-common.c (set_underlying_type): Always set DECL_ORIGINAL_TYPE.
4591
7d2f3f1d
PC
45922017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
4593
4594 PR c++/71737
4595 * c-common.c (set_underlying_type): Always set DECL_ORIGINAL_TYPE.
4596
bce6f760
MS
45972017-01-12 Martin Sebor <msebor@redhat.com>
4598
4599 (-Wformat-overflow): ...to this.
4600
bf5fbf46
MS
46012017-01-11 Martin Sebor <msebor@redhat.com>
4602
4603 PR c/78768
4604 * c.opt (-Walloca-larger-than, -Wformat-length, -Wformat-truncation):
4605 Also enable for LTO.
4606
e363df3f
JM
46072017-01-10 Jason Merrill <jason@redhat.com>
4608
4609 Implement P0195R2, C++17 variadic using.
4610 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_variadic_using.
4611
bd2c6270
JJ
46122017-01-09 Jakub Jelinek <jakub@redhat.com>
4613
4614 PR translation/79019
4615 PR translation/79020
4616 * c.opt (Wnormalized=): Fix typo in description.
4617
efcc8d38
MS
46182017-01-08 Martin Sebor <msebor@redhat.com>
4619
4620 PR middle-end/77708
4621 * c.opt (-Wformat-truncation): New option.
4622
ab20d992 46232017-01-06 Alexandre Oliva <aoliva@redhat.com>
435f3f7a
AO
4624
4625 * c-pretty-print.c (pp_c_tree_decl_identifier): Convert 16-bit
4626 value to unsigned short to fit in 4 hex digits without
4627 warnings.
4628
4e89adf9
EB
46292017-01-05 Eric Botcazou <ebotcazou@adacore.com>
4630
4631 * c.opt (fsso-struct): Add 'native' value.
4632
cd445b54
ML
46332017-01-05 Martin Liska <mliska@suse.cz>
4634
4635 PR pch/78970
4636 * c-opts.c (c_common_post_options): Reject '-' filename for a precompiled
4637 header.
4638
a9342885
MP
46392017-01-04 Marek Polacek <polacek@redhat.com>
4640
4641 PR c++/64767
4642 * c.opt (Wpointer-compare): New option.
4643
fc73e60c
JJ
46442017-01-04 Jakub Jelinek <jakub@redhat.com>
4645
4646 PR driver/78957
4647 * c.opt (fsso-struct=): Add RejectNegative.
4648
cbe34bb5
JJ
46492017-01-01 Jakub Jelinek <jakub@redhat.com>
4650
4651 Update copyright years.
4652
d4a6c0ea
ML
46532016-12-29 Martin Liska <mliska@suse.cz>
4654
4655 PR c/78933
4656 * c.opt (strong-eval-order): Add RejectNegative keyword.
4657
67a5ad7c
JM
46582016-12-22 Jason Merrill <jason@redhat.com>
4659
4660 Implement P0522R0, matching of template template arguments.
4661 * c-cppbuiltin.c (c_cpp_builtins): Define
4662 __cpp_template_template_args.
4663
0dba7960
JJ
46642016-12-21 Jakub Jelinek <jakub@redhat.com>
4665
4666 PR bootstrap/78817
4667 * c-common.c (struct nonnull_arg_ctx): New type.
4668 (check_function_nonnull): Return bool instead of void. Use
4669 nonnull_arg_ctx as context rather than just location_t.
4670 (check_nonnull_arg): Adjust for the new context type, set
4671 warned_p to true if a warning has been diagnosed.
4672 (check_function_arguments): Return bool instead of void.
4673 * c-common.h (check_function_arguments): Adjust prototype.
4674
31bfc9b9
JM
46752016-12-21 Jason Merrill <jason@redhat.com>
4676
4677 * c.opt (-fnew-ttp-matching): New flag.
4678 * c-opts.c (c_common_post_options): Default on if -std=c++1z.
4679
629b3d75
MJ
46802016-12-14 Martin Jambor <mjambor@suse.cz>
4681
4682 * c-omp.c: Include omp-general.h instead of omp-low.h.
4683 (c_finish_oacc_wait): Adjusted call to find_omp_clause to use its new
4684 name.
4685
474da67e
MS
46862016-12-14 Martin Sebor <msebor@redhat.com>
4687
4688 PR c/17308
4689 * c-common.c (check_nonnull_arg): Disable when optimization
4690 is enabled.
4691
fe366b87
MP
46922016-12-12 Marek Polacek <polacek@redhat.com>
4693
4694 PR c++/78647
4695 * c-common.c (attribute_fallthrough_p): Return false for
4696 error_mark_node.
4697
8bd9f164
MS
46982016-12-08 Martin Sebor <msebor@redhat.com>
4699
4700 PR c/78284
4701 * c.opt (-Walloc-zero, -Walloc-size-larger-than): New options.
4702
060162e0
MS
47032016-12-08 Martin Sebor <msebor@redhat.com>
4704
4705 PR c/78165
92a285c1
ML
4706 * c-pretty-print (pp_c_integer_constant): Avoid formatting type
4707 suffix.
060162e0 4708
ee92e7ba
MS
47092016-12-07 Martin Sebor <msebor@redhat.com>
4710
4711 PR c/53562
4712 PR middle-end/77784
4713 PR middle-end/78149
4714 PR middle-end/78138
4715 * c.opt (-Wstringop-overflow): New option.
4716
84b0769e
MO
47172016-12-02 Maxim Ostapenko <m.ostapenko@samsung.com>
4718
4719 * c-attribs.c (asan odr indicator): New attribute.
4720 (handle_asan_odr_indicator_attribute): New function.
4721
7fa6a965
PK
47222016-11-26 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
4723
4724 * c-common.c (c_common_nodes_and_builtins): Remove initialization of
4725 ptrdiff_type_node;
4726
56d8ffc1
JG
47272016-11-23 James Greenhalgh <james.greenhalgh@arm.com>
4728
4729 * c-common.c (excess_precision_mode_join): New.
4730 (c_ts18661_flt_eval_method): New.
4731 (c_c11_flt_eval_method): Likewise.
4732 (c_flt_eval_method): Likewise.
4733 * c-common.h (excess_precision_mode_join): New.
4734 (c_flt_eval_method): Likewise.
4735 * c-cppbuiltin.c (c_cpp_flt_eval_method_iec_559): New.
4736 (cpp_iec_559_value): Call it.
4737 (c_cpp_builtins): Modify logic for __LIBGCC_*_EXCESS_PRECISION__,
4738 call c_flt_eval_method to set __FLT_EVAL_METHOD__ and
4739 __FLT_EVAL_METHOD_TS_18661_3__.
4740
04f0fcf7
JG
47412016-11-23 James Greenhalgh <james.greenhalgh@arm.com>
4742
4743 * c-opts.c (c_common_post_options): Add logic to handle the default
4744 case for -fpermitted-flt-eval-methods.
4745
fb2675cb
PB
47462016-11-23 Paolo Bonzini <bonzini@gnu.org>
4747
4748 * c.opt (Wexpansion-to-defined): New.
4749
ec1c5694
JJ
47502016-11-23 Jakub Jelinek <jakub@redhat.com>
4751
4752 PR target/78451
4753 * c-pragma.c (handle_pragma_target): Don't replace
4754 current_target_pragma, but chainon the new args to the current one.
4755
730c9e75
NS
47562016-11-22 Nathan Sidwell <nathan@acm.org>
4757
4758 * array-notation-common.c (cilkplus_extract_an_trplets): Fix
cacd29be 4759 indentation and formatting.
730c9e75 4760
89990732
MS
47612016-11-21 Martin Sebor <msebor@redhat.com>
4762
4763 * c.opt (-fprintf-return-value): Enable by default.
4764
48330c93
BE
47652016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
4766
4767 PR c++/71973
4768 * c.opt (-Wbuiltin-declaration-mismatch): New warning.
4769 * c-common.c (c_common_nodes_and_builtins): Initialize
4770 const_tm_ptr_type_node.
4771
0d939c95
MP
47722016-11-16 Marek Polacek <polacek@redhat.com>
4773
4774 PR c/78285
4775 * c-common.c (c_add_case_label): Turn error_at calls into inform.
4776
8e745a17
JJ
47772016-11-14 Jakub Jelinek <jakub@redhat.com>
4778
4779 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_structured_bindings.
4780
1ee62b92 47812016-11-14 Prasad Ghangal <prasad.ghangal@gmail.com>
8e745a17
JJ
4782 Richard Biener <rguenther@suse.de>
4783
4784 * c-common.h (c_common_resword): Add RID_GIMPLE, RID_PHI types.
4785 * c-common.h (enum rid): Add RID_GIMPLE, RID_PHI.
4786 * c.opt (fgimple): New option.
1ee62b92 4787
22b15758
UB
47882016-11-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
4789
4790 PR c/35503
4791 * c-common.h (warn_for_restrict): Declare.
4792 * c-warn.c: Include gcc-rich-location.h.
4793 (warn_for_restrict): New function.
4794 * c-format.c (gcc_tdiag_char_table): Add entry for "Z" specifier.
4795 (gcc_cdiag_char_table): Likewise.
4796 (gcc_cxxdiag_char_table): Likewise.
4797 * c.opt (Wrestrict): New option.
4798
4be719cd
EB
47992016-11-13 Eric Botcazou <ebotcazou@adacore.com>
4800
4801 * c-ada-spec.c (print_ada_declaration): For typedef declarations, look
4802 for nested types only if the type is a record or union and dump SLOC.
4803
4a826ca6
JM
48042016-11-09 Jason Merrill <jason@redhat.com>
4805
4806 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_template_auto.
4807
2e955d50
JJ
48082016-11-09 Jakub Jelinek <jakub@redhat.com>
4809
4810 * c-ubsan.c (ubsan_instrument_shift): Handle split
4811 -fsanitize=shift-base and -fsanitize=shift-exponent.
4812
51dc6603
JM
48132016-11-07 Jason Merrill <jason@redhat.com>
4814
4815 * c.opt (Wc++1z-compat): New.
4816 * c-cppbuiltin.c (c_cpp_builtins): Add __cpp_noexcept_function_type.
4817
6dc4a604
ML
48182016-11-07 Martin Liska <mliska@suse.cz>
4819
4820 * c-warn.c (warn_for_unused_label): Save all labels used
4821 in goto or in &label.
4822
b302001e
JM
48232016-11-03 Jason Merrill <jason@redhat.com>
4824
4825 * c-cppbuiltin.c (c_cpp_builtins): Correct
4826 __cpp_inheriting_constructors.
4827
31f7f784
JM
48282016-11-01 Jason Merrill <jason@redhat.com>
4829
2bc78e3c
JM
4830 * c-cppbuiltin.c (c_cpp_builtins): Update
4831 __cpp_inheriting_constructors.
4832
31f7f784
JM
4833 * c.opt (-fnew-inheriting-ctors): New.
4834 * c-opts.c: Default to on for ABI 11+.
4835
dcb466ec
JJ
48362016-10-31 Jakub Jelinek <jakub@redhat.com>
4837
4838 PR c++/77948
4839 * c.opt (fext-numeric-literals): Add Var and Init.
4840 * c-opts.c (c_common_handle_option): Don't clear
4841 cpp_opts->ext_numeric_literals for -std=c++{11,14,1z}.
4842 (c_common_post_options): Clear it here if not set
4843 explicitly.
4844
52e1b91e
AH
48452016-10-28 Aldy Hernandez <aldyh@redhat.com>
4846
4847 PR debug/77773
4848 * c-pretty-print.c (simple_type_specifier): Do not dereference `t'
4849 if NULL.
4850
e16f1cc7
JJ
48512016-10-25 Jakub Jelinek <jakub@redhat.com>
4852
4853 * c-common.h (enum rid): Add RID_BUILTIN_LAUNDER.
4854 * c-common.c (c_common_reswords): Add __builtin_launder.
4855
f8348061
BE
48562016-10-24 Bernd Edlinger <bernd.edlinger@hotmail.de>
4857
4858 * c-common.c (c_common_truthvalue_conversion): Warn for
4859 multiplications in boolean context. Fix the quoting of '<<' and '<'
4860 in the shift warning.
4861
eff89e01
BE
48622016-10-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
4863
4864 * c-common.c (c_common_truthvalue_conversion): Fix the comment.
4865
24bc7bf4
JM
48662016-10-20 Jason Merrill <jason@redhat.com>
4867
4868 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_concepts value.
4869
4c712374
BE
48702016-10-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
4871
4872 * c-common.c (c_common_truthvalue_conversion): Warn only for signed
4873 integer shift ops in boolean context.
4874
48752016-10-18 Aldy Hernandez <aldyh@redhat.com>
adc577c5
AH
4876
4877 * c.opt (Walloca): New.
4878 (Walloca-larger-than=): New.
4879 (Wvla-larger-than=): New.
4880
8fa18c06
MP
48812016-10-17 Marek Polacek <polacek@redhat.com>
4882
4883 * c-warn.c (find_array_ref_with_const_idx_r): Remove parameter names.
4884 Return immediately when finding a match.
4885 (warn_tautological_cmp): Remove a boolean variable that is no longer
4886 needed.
4887
b12b1915
MP
48882016-10-17 Marek Polacek <polacek@redhat.com>
4889
4890 * c-attribs.c: New file.
4891 * c-common.c: Move attributes handling to c-attribs.c.
4892 (get_nonnull_operand): No longer static.
4893 * c-common.h: Move the declarations from c-attribs.c to its own section.
4894
2045acd9
JM
48952016-10-14 Jason Merrill <jason@redhat.com>
4896
4897 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_aggregate_bases
4898 and __cpp_deduction_guides.
4899
14a2c9aa
JM
49002016-10-13 Jason Merrill <jason@redhat.com>
4901
4902 * c-cppbuiltin.c (c_cpp_builtins): Add __cpp_inline_variables.
4903
4d0cdd0c
TP
49042016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
4905
4906 * c-cppbuiltin.c: Include memmodel.h.
4907 * c-opts.c: Likewise.
4908 * c-pragma.c: Likewise.
4909 * c-warn.c: Likewise.
4910
70f6d5e1
JJ
49112016-10-12 Jakub Jelinek <jakub@redhat.com>
4912
4913 * c.opt (Wextra): Add as C/C++/ObjC/ObjC++ option.
4914 (Wimplicit-fallthrough=): Enable for these languages by -Wextra.
4915 * c-opts.c (sanitize_cpp_opts): Initialize
4916 cpp_opts->cpp_warn_implicit_fallthrough.
4917
78f61294
MP
49182016-10-11 Marek Polacek <polacek@redhat.com>
4919
4920 * c-common.c (warning_candidate_p): Change the return type to bool
4921 and return true/false instead of 1/0.
4922 (vector_mode_valid_p): Likewise.
4923
038b5cc0
MP
49242016-10-11 Marek Polacek <polacek@redhat.com>
4925
4926 * c-common.c (fold_for_warn): No longer static.
4927 (bool_promoted_to_int_p): Likewise.
4928 (c_common_get_narrower): Likewise.
4929 (constant_expression_warning): Move to c-warn.c.
4930 (constant_expression_error): Likewise.
4931 (overflow_warning): Likewise.
4932 (warn_logical_operator): Likewise.
4933 (find_array_ref_with_const_idx_r): Likewise.
4934 (warn_tautological_cmp): Likewise.
4935 (expr_has_boolean_operands_p): Likewise.
4936 (warn_logical_not_parentheses): Likewise.
4937 (warn_if_unused_value): Likewise.
4938 (strict_aliasing_warning): Likewise.
4939 (sizeof_pointer_memaccess_warning): Likewise.
4940 (check_main_parameter_types): Likewise.
4941 (conversion_warning): Likewise.
4942 (warnings_for_convert_and_check): Likewise.
4943 (match_case_to_enum_1): Likewise.
4944 (match_case_to_enum): Likewise.
4945 (c_do_switch_warnings): Likewise.
4946 (warn_for_omitted_condop): Likewise.
4947 (readonly_error): Likewise.
4948 (lvalue_error): Likewise.
4949 (invalid_indirection_error): Likewise.
4950 (warn_array_subscript_with_type_char): Likewise.
4951 (warn_about_parentheses): Likewise.
4952 (warn_for_unused_label): Likewise.
4953 (warn_for_div_by_zero): Likewise.
4954 (warn_for_memset): Likewise.
4955 (warn_for_sign_compare): Likewise.
4956 (do_warn_double_promotion): Likewise.
4957 (do_warn_unused_parameter): Likewise.
4958 (record_locally_defined_typedef): Likewise.
4959 (maybe_record_typedef_use): Likewise.
4960 (maybe_warn_unused_local_typedefs): Likewise.
4961 (maybe_warn_bool_compare): Likewise.
4962 (maybe_warn_shift_overflow): Likewise.
4963 (warn_duplicated_cond_add_or_warn): Likewise.
4964 (diagnose_mismatched_attributes): Likewise.
4965 * c-common.h: Move the declarations from c-warn.c to its own section.
4966 * c-warn.c: New file.
4967
627be19f
JM
49682016-10-08 Jason Merrill <jason@redhat.com>
4969
4970 * c-common.c (c_common_truthvalue_conversion): Don't distribute
4971 into COND_EXPR in C++.
4972
7bad794a
JJ
49732016-10-08 Jakub Jelinek <jakub@redhat.com>
4974
4975 * c-lex.c (c_lex_with_flags) <case CPP_COMMENT>: For CPP_COMMENT
4976 token with PREV_FALLTHROUGH, skip all following CPP_PADDING and
4977 CPP_COMMENT tokens and set add_flags to PREV_FALLTHROUGH afterwards.
4978
be845b04
JJ
49792016-10-07 Jakub Jelinek <jakub@redhat.com>
4980
4981 Implement LWG2296 helper intrinsic
4982 * c-common.h (enum rid): Add RID_ADDRESSOF.
4983 * c-common.c (c_common_reswords): Add __builtin_addressof.
4984
c09c4992
BE
49852016-10-07 Bernd Edlinger <bernd.edlinger@hotmail.de>
4986
4987 PR c++/77700
4988 * c-common.c (c_common_truthvalue_conversion): Warn also for
4989 suspicious enum values in boolean context.
4990
342cfb3e
JJ
49912016-10-06 Jakub Jelinek <jakub@redhat.com>
4992
4993 Implement P0258R2 - helper for C++17
4994 std::has_unique_object_representations trait
4995 * c-common.h (enum rid): Add RID_HAS_UNIQUE_OBJ_REPRESENTATIONS.
4996 * c-common.c (c_common_reswords): Add
4997 __has_unique_object_representations.
4998
2e69f143
JJ
49992016-10-05 Jakub Jelinek <jakub@redhat.com>
5000
5001 PR sanitizer/66343
5002 * c-ubsan.c (ubsan_instrument_return): Don't call
5003 initialize_sanitizer_builtins here.
5004
700fff34
BE
50052016-10-05 Bernd Edlinger <bernd.edlinger@hotmail.de>
5006
5007 * c-common.c (c_common_truthvalue_conversion): Warn also for suspicious
5008 conditional expression in boolean context when only one arm is
5009 non-boolean.
5010
9563bfcd
JJ
50112016-10-05 Jakub Jelinek <jakub@redhat.com>
5012
04a32443
JJ
5013 PR sanitizer/77823
5014 * c-ubsan.c (ubsan_instrument_shift): Return NULL_TREE if type0
5015 is not integral.
5016
9563bfcd
JJ
5017 * c-common.c (c_common_reswords): Update comment for C++11.
5018
f1644724
JM
50192016-10-04 Jason Merrill <jason@redhat.com>
5020
5021 * c-common.c (make_tree_vector_from_ctor): New.
5022 * c-common.h: Declare it.
5023
5a79befb
JJ
50242016-10-04 Jakub Jelinek <jakub@redhat.com>
5025
5026 * c-cppbuiltin.c (c_cpp_builtins): Don't define
5027 __LIBGCC_JCR_SECTION_NAME__.
5028
1633d3b9
BE
50292016-10-03 Bernd Edlinger <bernd.edlinger@hotmail.de>
5030
5031 * c-common.c (c_common_truthvalue_conversion): Warn for suspicious
5032 left shift in boolean context.
5033
a2c6e7f2
JJ
50342016-09-29 Jakub Jelinek <jakub@redhat.com>
5035
5036 Implement P0001R1 - C++17 removal of register storage class specifier
5037 * c.opt (Wregister): New warning.
5038 * c-opts.c (c_common_post_options): Enable -Wregister by
5039 default for C++17.
5040
75304c87
JG
50412016-09-29 James Greenhalgh <james.greenhalgh@arm.com>
5042
5043 * c-opts.c (c_common_post_options): Remove special case for
5044 TARGET_FLT_EVAL_METHOD_NON_DEFAULT with -fexcess-precision=standard
5045 in C++.
5046
bbfac6da
JJ
50472016-09-27 Jakub Jelinek <jakub@redhat.com>
5048
6e39060a
JJ
5049 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_capture_star_this for
5050 -std=c++1z.
5051
bbfac6da
JJ
5052 * c-ada-spec.c (print_ada_declaration): Remove break after return.
5053
e73cf9a2
TP
50542016-09-26 Thomas Preud'homme <thomas.preudhomme@arm.com>
5055
5056 * c-common.c: Include memmodel.h.
5057
c6147dc4
MP
50582016-09-26 Marek Polacek <polacek@redhat.com>
5059
5060 * c-lex.c (c_common_has_attribute): Handle attribute fallthrough.
5061
81fea426
MP
50622016-09-26 Marek Polacek <polacek@redhat.com>
5063
5064 PR c/7652
5065 * c-common.c (c_common_attribute_table): Add fallthrough attribute.
5066 (handle_fallthrough_attribute): New function.
5067 (attribute_fallthrough_p): New function.
5068 * c-common.h (attribute_fallthrough_p): Declare.
5069
9a2300e9
MP
50702016-09-24 Marek Polacek <polacek@redhat.com>
5071
5072 PR c/77490
5073 * c.opt (Wbool-operation): New.
5074
a09e9e35
BE
50752016-09-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
5076
5077 * c-common.c (c_common_truthvalue_conversion): Inhibit
5078 Wint-in-bool-context warning with from_macro_definition_at.
5079 Mention the expression will always evaluate to true.
5080
d43b4ccc
MS
50812016-09-21 Martin Sebor <msebor@redhat.com>
5082
5083 PR bootstrap/77676
5084 * c.opt (fprintf-return-value): Temporarily initialize to zero
5085 to unblock bootstrap failures.
5086
2e1c20b1
JJ
50872016-09-21 Jakub Jelinek <jakub@redhat.com>
5088
5089 PR c++/77651
5090 * c.opt (Waligned-new=): Add RejectNegative.
5091 (faligned-new=): Likewise. Spelling fix - change
5092 aligned_new_threshhold to aligned_new_threshold.
5093 * c-cppbuiltin.c (c_cpp_builtins): Change aligned_new_threshhold
5094 to aligned_new_threshold.
5095
88d0c3f0
MS
50962016-09-20 Martin Sebor <msebor@redhat.com>
5097
5098 PR middle-end/49905
5099 * c.opt: Add -Wformat-length and -fprintf-return-value.
5100
144a96e4
BE
51012016-09-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
5102
5103 PR c++/77434
5104 * c.opt (Wint-in-bool-context): New warning.
5105 * c-common.c (c_common_truthvalue_conversion): Warn on integer
5106 constants in boolean context.
5107
63012d9a
JM
51082016-09-19 Joseph Myers <joseph@codesourcery.com>
5109
5110 * c-common.c (max_align_t_align): Also consider alignment of
5111 float128_type_node.
5112
931388ce
JM
51132016-09-15 Jason Merrill <jason@redhat.com>
5114
5115 * c-common.c (check_cxx_fundamental_alignment_constraints): Check
5116 DECL_EXTERNAL.
5117
38711381
JM
51182016-09-14 Jason Merrill <jason@redhat.com>
5119
5120 * c-common.c (check_cxx_fundamental_alignment_constraints): Don't
5121 limit FIELD_DECL, either.
5122
e51fbec3
MP
51232016-09-14 Marek Polacek <polacek@redhat.com>
5124
5125 * c-common.c (c_common_truthvalue_conversion): Use false instead of 0.
5126 * c-common.h (build_unary_op): Change nonconvert parameter type to bool.
5127 * c-omp.c (c_finish_omp_atomic): Use false instead of 0.
5128
254830ba
DM
51292016-09-13 David Malcolm <dmalcolm@redhat.com>
5130
5131 * c-common.c (warn_logical_not_parentheses): Replace
5132 rich_location::add_fixit_insert calls with add_fixit_insert_before
5133 and add_fixit_insert_after, eliminating the "next_loc" calculation.
5134
42763690
JM
51352016-09-13 Jason Merrill <jason@redhat.com>
5136 Tom de Vries <tom@codesourcery.com>
5137
5138 PR c++/77427
5139 * c-common.c (set_underlying_type): Don't treat array as builtin type.
5140
9453eee9
JM
51412016-09-13 Jason Merrill <jason@redhat.com>
5142
5143 * c-common.c (check_cxx_fundamental_alignment_constraints): Don't
5144 limit types at all.
5145
e96809e3
JM
51462016-09-12 Jason Merrill <jason@redhat.com>
5147
5148 * c-common.c (check_cxx_fundamental_alignment_constraints): Fix
5149 bit/byte confusion, allow large alignment for types.
5150
54dcdb88
BE
51512016-09-12 Bernd Edlinger <bernd.edlinger@hotmail.de>
5152
5153 PR c++/77496
5154 * c-common.c (warn_for_omitted_condop): Also warn for boolean data.
5155
d1463eb9
DM
51562016-09-12 David Malcolm <dmalcolm@redhat.com>
5157
5158 PR c/72858
5159 * c-format.c (argument_parser::check_argument_type): Add params
5160 "type_start" and "conversion_char". Use the former to generate
5161 offset_to_type_start and pass it and conversion_char to
5162 check_format_types.
5163 (check_format_info_main): Capture the start of the type
5164 information as "type_start", and pass it an format_char
5165 to arg_parser.check_argument_type.
5166 (check_format_types): Provide an example in the leading comment.
5167 Add params "offset_to_type_start" and "conversion_char"; pass
5168 them to format_type_warning calls.
5169 (test_get_modifier_for_format_len): Likewise.
5170 (matching_type_p): New function.
5171 (get_format_for_type): Add param "conversion_char" and move
5172 implementation into...
5173 (get_format_for_type_1): ...new function, called twice.
5174 Use new function matching_type_p rather than checking for
5175 TYPE_CANONICAL equality.
5176 (get_corrected_substring): New function.
5177 (format_type_warning): Provide an example in the leading comment.
5178 Add params "offset_to_type_start" and "conversion_char". Replace
5179 call to get_format_for_type with call to get_corrected_substring
5180 and move rejection of hints for widths/precisions there.
5181 (assert_format_for_type_streq): Add param "conversion_char".
5182 (ASSERT_FORMAT_FOR_TYPE_STREQ): Add param CONVERSION_CHAR.
5183 (test_get_format_for_type_printf): Add conversion chars to the
5184 tests, adding coverage for various combinations of integer
5185 vs double conversions, and for preserving octal and hexadecimal
5186 conversions.
5187 (test_get_format_for_type_scanf): Add conversion chars to the
5188 tests.
5189
5b28efbb
TV
51902016-09-10 Tom de Vries <tom@codesourcery.com>
5191
5192 PR C/71602
5193 * c-common.c (build_va_arg): Handle more strict
5194 targetm.canonical_va_list_type. Replace first argument type error with
5195 assert.
5196
3f0177e7
MS
51972016-09-09 Martin Sebor <msebor@redhat.com>
5198
5199 PR c/77520
5200 PR c/77521
5201 * c-format.c (argument_parser::find_format_char_info): Use %qc
5202 format directive unconditionally.
5203
af63ba4b
JM
52042016-09-09 Jason Merrill <jason@redhat.com>
5205
5206 Implement C++17 new of over-aligned types.
5207 * c.opt: Add -faligned-new and -Waligned-new.
5208 * c-common.c (max_align_t_align): Split out from...
5209 (cxx_fundamental_alignment_p): ...here.
5210 * c-common.h: Declare it.
5211 * c-cppbuiltin.c (c_cpp_builtins): Handle aligned new.
5212
c65248cb
JM
52132016-09-09 Joseph Myers <joseph@codesourcery.com>
5214
5215 * c-cppbuiltin.c (builtin_define_type_width): New function.
5216 (builtin_define_stdint_macros, c_cpp_builtins): Define type width
5217 macros.
5218
e5106e27
DM
52192016-09-07 David Malcolm <dmalcolm@redhat.com>
5220
5221 * c-common.c (get_cpp_ttype_from_string_type): Handle being passed
5222 a POINTER_TYPE.
5223 (substring_loc::get_location): Move to substring-locations.c,
5224 keeping implementation as...
5225 (c_get_substring_location): New function, from the above, reworked
5226 to use accessors rather than member lookup.
5227 * c-common.h (class substring_loc): Move to substring-locations.h,
5228 replacing with a forward decl.
5229 (c_get_substring_location): New decl.
5230 * c-format.c: Include "substring-locations.h".
5231 (format_warning_va): Move to substring-locations.c.
5232 (format_warning_at_substring): Likewise.
5233
ab20d992 52342016-09-06 Martin Sebor <msebor@redhat.com>
a42e7952
MS
5235
5236 PR c/77336
5237 * c-format.c (check_function_format): Avoid issuing warnings for
5238 functions unless they call format functions with non-constant
5239 format strings.
5240
b772a565
RB
52412016-09-06 Richard Biener <rguenther@suse.de>
5242
5243 PR c/77450
5244 * c-common.c (c_common_mark_addressable_vec): Handle
5245 COMPOUND_LITERAL_EXPR.
5246
25ff5dd3
MP
52472016-09-05 Marek Polacek <polacek@redhat.com>
5248
5249 PR c/77423
5250 * c-common.c (bool_promoted_to_int_p): New function.
5251 (expr_has_boolean_operands_p): New function.
5252 (warn_logical_not_parentheses): Return if expr_has_boolean_operands_p.
5253 (maybe_warn_bool_compare): Use bool_promoted_to_int_p.
5254
21234eb5
TV
52552016-09-04 Tom de Vries <tom@codesourcery.com>
5256
5257 revert:
5258 2016-08-29 Tom de Vries <tom@codesourcery.com>
5259
5260 * c-common.c (build_va_arg): Replace first argument type error
5261 with assert.
5262
9dc5773f
JJ
52632016-09-02 Jakub Jelinek <jakub@redhat.com>
5264
5265 PR c/65467
5266 * c-omp.c (c_finish_omp_atomic): Reject _Atomic qualified expressions.
5267 (c_finish_omp_for): Reject _Atomic qualified iterators.
5268
52692016-09-01 Martin Sebor <msebor@redhat.com>
3d7b83b6
MS
5270
5271 * c-ada-spec.c (dump_ada_function_declaration): Increase buffer
5272 size to guarantee it fits the output of the formatted function
5273 regardless of its arguments.
5274
295844f6
MP
52752016-09-01 Marek Polacek <polacek@redhat.com>
5276
5277 PR c/7652
5278 * c-common.c (resolve_overloaded_builtin): Fix formatting. Add
5279 FALLTHRU comments.
5280
3d06b6f2
MP
52812016-08-29 Marek Polacek <polacek@redhat.com>
5282
5283 PR c/77292
5284 * c-common.c (warn_logical_not_parentheses): Don't warn for
5285 a comparison or a logical operator.
5286
34cedad5
TV
52872016-08-29 Tom de Vries <tom@codesourcery.com>
5288
5289 * c-common.c (build_va_arg): Fix type comparison assert.
5290
f162d717
TV
52912016-08-29 Tom de Vries <tom@codesourcery.com>
5292
5293 * c-common.c (build_va_arg): Replace first argument type error
5294 with assert.
5295
ba9bbd6f
TV
52962016-08-29 Tom de Vries <tom@codesourcery.com>
5297
5298 PR c/77398
5299 * c-common.c (build_va_arg): Add first argument error. Build va_arg
5300 with error_mark_node as va_list instead of with illegal va_list.
5301
ebef225f
MP
53022016-08-25 Marek Polacek <polacek@redhat.com>
5303 David Malcolm <dmalcolm@redhat.com>
5304
5305 * c-common.c (warn_logical_not_parentheses): Print fixit hints.
5306 * c-common.h (warn_logical_not_parentheses): Update declaration.
5307
b00e6e75
MP
53082016-08-22 Marek Polacek <polacek@redhat.com>
5309
5310 PR c++/77321
5311 * c-common.c (warn_for_memset): Check type for null.
5312
6dc198e3
JM
53132016-08-22 Joseph Myers <joseph@codesourcery.com>
5314
14ec014e 5315 * c-cppbuiltin.c (c_cpp_builtins): Check _FloatN and
6dc198e3
JM
5316 _FloatNx types for suffixes for built-in functions.
5317
c65699ef
JM
53182016-08-19 Joseph Myers <joseph@codesourcery.com>
5319
5320 PR c/32187
5321 * c-common.h (RID_FLOAT16, RID_FLOATN_NX_FIRST, RID_FLOAT32)
5322 (RID_FLOAT64, RID_FLOAT128, RID_FLOAT32X, RID_FLOAT64X)
5323 (RID_FLOAT128X): New enum rid values.
5324 (CASE_RID_FLOATN_NX): New macro.
5325 * c-common.c (c_common_reswords): Add _FloatN and _FloatNx
5326 keywords.
5327 (c_common_type_for_mode): Check for _FloatN and _FloatNx and
5328 corresponding complex types.
5329 (c_common_nodes_and_builtins): For non-C++, register _FloatN and
5330 _FloatNx and corresponding complex types.
5331 (keyword_begins_type_specifier): Use CASE_RID_FLOATN_NX.
5332 * c-cppbuiltin.c (builtin_define_float_constants): Check _FloatN
5333 and _FloatNx types for the widest type for determining
5334 DECIMAL_DIG. Define __LDBL_DECIMAL_DIG__ as well as
5335 __DECIMAL_DIG__ for long double. Handle FMA_SUFFIX being NULL.
5336 (c_cpp_builtins): Call builtin_define_float_constants for _FloatN
5337 and _FloatNx types.
5338 * c-lex.c (interpret_float): Handle _FloatN and _FloatNx
5339 constants.
5340 * c-pretty-print.c (pp_c_floating_constant): Handle _FloatN and
5341 _FloatNx types.
5342
cc015f3a
DM
53432016-08-18 David Malcolm <dmalcolm@redhat.com>
5344
5345 * c-opts.c (c_diagnostic_finalizer): Update for change to
5346 diagnostic_show_locus.
5347
cb18fd07
DM
53482016-08-18 David Malcolm <dmalcolm@redhat.com>
5349
5350 * c-common.c: Include "spellcheck.h".
5351 (cb_get_suggestion): New function.
5352 * c-common.h (cb_get_suggestion): New decl.
5353 * c-lex.c (init_c_lex): Initialize cb->get_suggestion to
5354 cb_get_suggestion.
5355
a76989dc
MP
53562016-08-18 Marek Polacek <polacek@redhat.com>
5357
5358 PR c/71514
5359 * c-common.c (get_atomic_generic_size): Disallow pointer-to-function
5360 and pointer-to-VLA.
5361
65e736c0
DM
53622016-08-16 David Malcolm <dmalcolm@redhat.com>
5363
5364 PR c/72857
5365 * c-common.c (substring_loc::get_range): Rename to...
5366 (substring_loc::get_location): ...this, converting param from a
5367 source_range * to a location_t *. Call
5368 get_source_location_for_substring rather than
5369 get_source_range_for_substring, and pass in m_caret_idx.
5370 * c-common.h (substring_loc::substring_loc): Add param "caret_idx".
5371 (substring_loc::get_range): Replace with...
5372 (substring_loc::get_location): ...this.
5373 (substring_loc::set_caret_index): New method.
5374 (substring_loc): Add field m_caret_idx.
5375 * c-format.c (format_warning_va): Update for above changes.
5376 Rename local "substring_loc" to "fmt_substring_loc" to avoid
5377 clashing with type name.
5378 (format_warning_at_char): Add caret_idx param to substring_loc ctor.
5379 (check_argument_type): Likewise.
5380 (format_type_warning): Rename param "fmt_loc" to "whole_fmt_loc"
5381 Use a copy when emitting warnings, setting the caret index from TYPE.
5382
7e1dde14 53832016-08-16 Eric Botcazou <ebotcazou@adacore.com>
8e745a17 5384 Arnaud Charlet <charlet@adacore.com>
7e1dde14
EB
5385
5386 * c-ada-spec.c (dump_number): New function.
5387 (handle_escape_character): Likewise.
5388 (print_ada_macros): Add handling of constant integers and strings.
5389
191816a3
MP
53902016-08-12 Marek Polacek <polacek@redhat.com>
5391
5392 PR c/7652
5393 * c-common.c (scalar_to_vector): Adjust fall through comment.
5394 * c-opts.c (c_common_handle_option): Likewise.
5395 * c-pragma.c (handle_pragma_pack): Add FALLTHRU.
5396 * c-pretty-print.c (c_pretty_printer::postfix_expression): Adjust
5397 fall through comment.
5398 * cilk.c (extract_free_variables): Add FALLTHRU.
5399
452df4a4
JM
54002016-08-10 Jason Merrill <jason@redhat.com>
5401
5402 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_if_constexpr.
5403
f3365c12
JM
54042016-08-09 Jason Merrill <jason@redhat.com>
5405
5406 * c-common.c (c_common_attribute_table): vector_size affects type
5407 identity.
5408
f0bc3323
MP
54092016-08-09 Marek Polacek <polacek@redhat.com>
5410
5411 PR c/7652
5412 * c-ada-spec.c (dump_generic_ada_node): Add return.
5413
98e5a19a
JM
54142016-08-09 Jason Merrill <jason@redhat.com>
5415
5416 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_constexpr for
5417 C++17 constexpr lambdas.
5418
895aa8e1
DM
54192016-08-08 David Malcolm <dmalcolm@redhat.com>
5420
5421 PR c/64955
5422 * c-common.h (selftest::c_format_c_tests): New declaration.
5423 (selftest::run_c_tests): New declaration.
5424 * c-format.c: Include "selftest.h.
5425 (format_warning_va): Add param "corrected_substring" and use
5426 it to add a replacement fix-it hint.
5427 (format_warning_at_substring): Likewise.
5428 (format_warning_at_char): Update for new param of
5429 format_warning_va.
5430 (argument_parser::check_argument_type): Pass "fki" to
5431 check_format_types.
5432 (check_format_types): Add param "fki" and pass it to
5433 format_type_warning.
5434 (deref_n_times): New function.
5435 (get_modifier_for_format_len): New function.
5436 (selftest::test_get_modifier_for_format_len): New function.
5437 (get_format_for_type): New function.
5438 (format_type_warning): Add param "fki" and use it to attempt
5439 to provide hints for argument types when calling
5440 format_warning_at_substring.
5441 (selftest::get_info): New function.
5442 (selftest::assert_format_for_type_streq): New function.
5443 (ASSERT_FORMAT_FOR_TYPE_STREQ): New macro.
5444 (selftest::test_get_format_for_type_printf): New function.
5445 (selftest::test_get_format_for_type_scanf): New function.
5446 (selftest::c_format_c_tests): New function.
5447
e52ed3fe
DM
54482016-08-08 David Malcolm <dmalcolm@redhat.com>
5449
5450 PR c/52952
5451 * c-format.c: Include "diagnostic.h".
5452 (location_column_from_byte_offset): Delete.
5453 (location_from_offset): Delete.
5454 (format_warning_va): New function.
5455 (format_warning_at_substring): New function.
5456 (format_warning_at_char): New function.
5457 (check_format_arg): Capture location of format_tree and pass to
5458 check_format_info_main.
5459 (argument_parser): Add fields "start_of_this_format" and
5460 "format_string_cst".
5461 (flag_chars_t::validate): Add param "format_string_cst". Convert
5462 warning_at call using location_from_offset to call to
5463 format_warning_at_char.
5464 (argument_parser::argument_parser): Add param "format_string_cst_"
5465 and use use it to initialize field "format_string_cst".
5466 Initialize new field "start_of_this_format".
5467 (argument_parser::read_format_flags): Convert warning_at call
5468 using location_from_offset to a call to format_warning_at_char.
5469 (argument_parser::read_any_format_left_precision): Likewise.
5470 (argument_parser::read_any_format_precision): Likewise.
5471 (argument_parser::read_any_other_modifier): Likewise.
5472 (argument_parser::find_format_char_info): Likewise, in three places.
5473 (argument_parser::parse_any_scan_set): Likewise, in one place.
5474 (argument_parser::handle_conversions): Likewise, in two places.
5475 (argument_parser::check_argument_type): Add param "fmt_param_loc"
5476 and use it to make a substring_loc. Pass the latter to
5477 check_format_types.
5478 (check_format_info_main): Add params "fmt_param_loc" and
5479 "format_string_cst". Convert warning_at calls using
5480 location_from_offset to calls to format_warning_at_char. Pass the
5481 new params to the arg_parser ctor. Pass "format_string_cst" to
5482 flag_chars.validate. Pass "fmt_param_loc" to
5483 arg_parser.check_argument_type.
5484 (check_format_types): Convert first param from a location_t
5485 to a const substring_loc & and rename to "fmt_loc". Attempt
5486 to extract the range of the relevant parameter and pass it
5487 to format_type_warning.
5488 (format_type_warning): Convert first param from a location_t
5489 to a const substring_loc & and rename to "fmt_loc". Add
5490 params "param_range" and "type". Replace calls to warning_at
5491 with calls to format_warning_at_substring.
5492
1c4d457e
DM
54932016-08-08 David Malcolm <dmalcolm@redhat.com>
5494
5495 * c-format.c (class flag_chars_t): New class.
5496 (struct length_modifier): New struct.
5497 (class argument_parser): New class.
5498 (flag_chars_t::flag_chars_t): New ctor.
5499 (flag_chars_t::has_char_p): New method.
5500 (flag_chars_t::add_char): New method.
5501 (flag_chars_t::validate): New method.
5502 (flag_chars_t::get_alloc_flag): New method.
5503 (flag_chars_t::assignment_suppression_p): New method.
5504 (argument_parser::argument_parser): New ctor.
5505 (argument_parser::read_any_dollar): New method.
5506 (argument_parser::read_format_flags): New method.
5507 (argument_parser::read_any_format_width): New method.
5508 (argument_parser::read_any_format_left_precision): New method.
5509 (argument_parser::read_any_format_precision): New method.
5510 (argument_parser::handle_alloc_chars): New method.
5511 (argument_parser::read_any_length_modifier): New method.
5512 (argument_parser::read_any_other_modifier): New method.
5513 (argument_parser::find_format_char_info): New method.
5514 (argument_parser::validate_flag_pairs): New method.
5515 (argument_parser::give_y2k_warnings): New method.
5516 (argument_parser::parse_any_scan_set): New method.
5517 (argument_parser::handle_conversions): New method.
5518 (argument_parser::check_argument_type): New method.
5519 (check_format_info_main): Introduce classes argument_parser
5520 and flag_chars_t, moving the code within the loop into methods
5521 of these classes. Make various locals "const".
5522
88fa5555
DM
55232016-08-05 David Malcolm <dmalcolm@redhat.com>
5524
5525 * c-common.c: Include "substring-locations.h".
5526 (get_cpp_ttype_from_string_type): New function.
5527 (g_string_concat_db): New global.
5528 (substring_loc::get_range): New method.
5529 * c-common.h (g_string_concat_db): New declaration.
5530 (class substring_loc): New class.
5531 * c-lex.c (lex_string): When concatenating strings, capture the
5532 locations of all tokens using a new obstack, and record the
5533 concatenation locations within g_string_concat_db.
5534 * c-opts.c (c_common_init_options): Construct g_string_concat_db
5535 on the ggc-heap.
5536
78169471
MP
55372016-07-29 Marek Polacek <polacek@redhat.com>
5538
638fc14f
MP
5539 PR c/71926
5540 * c-common.c (c_common_truthvalue_conversion): Use LOCATION for the
5541 parentheses warning.
5542
78169471
MP
5543 PR c/71574
5544 * c-common.c (handle_alloc_align_attribute): Also check FUNCTION_DECL.
5545
1225d6b1
ML
55462016-07-28 Martin Liska <mliska@suse.cz>
5547
5548 PR gcov-profile/68025
5549 * c-common.c (handle_no_profile_instrument_function_attribute):
5550
ec1e2a40
BE
55512016-07-27 Bernd Edlinger <bernd.edlinger@hotmail.de>
5552
5553 * c-common.c (check_user_alignment): Use LOG2_BITS_PER_UNIT instead of
5554 BITS_PER_UNIT_LOG.
5555
5ec2cd9f
JM
55562016-07-25 Jason Merrill <jason@redhat.com>
5557
5558 PR c++/65970
5559 * c.opt (fconstexpr-loop-limit): New.
5560
9dc5773f 55612016-07-22 Martin Sebor <msebor@redhat.com>
2e6b45af
MS
5562
5563 PR c++/71675
5564 * c-common.c (resolve_overloaded_builtin): Avoid converting
5565 __atomic_compare_exchange_n return type to that of what its
5566 first argument points to.
5567
e3fe09c1
UB
55682016-07-22 Uros Bizjak <ubizjak@gmail.com>
5569
5570 * c-common.c: Use HOST_WIDE_INT_M1U instead of
5571 ~(unsigned HOST_WIDE_INT) 0.
5572
bc91c436
ML
55732016-07-22 Martin Liska <mliska@suse.cz>
5574
5575 PR gcov-profile/69028
5576 PR gcov-profile/62047
5577 * cilk.c (create_cilk_helper_decl): Set location of a new decl
5578 to the current_function_decl.
5579
451dcc66
JM
55802016-07-21 Jason Merrill <jason@redhat.com>
5581
5582 PR c++/65168
5583 * c-common.c (c_common_truthvalue_conversion): Check
5584 c_inhibit_evaluation_warnings for warning about address of
5585 reference.
5586
de6a69ee
DM
55872016-07-20 David Malcolm <dmalcolm@redhat.com>
5588
5589 * c-common.h (lookup_name_fuzzy): Convert return type from tree to
5590 const char *.
5591
d022c55a
JM
55922016-07-15 Jason Merrill <jason@redhat.com>
5593
5594 * c-opts.c (c_common_post_options): Update -fabi-version default to 11.
5595
ddbbcb19
JJ
55962016-07-15 Jakub Jelinek <jakub@redhat.com>
5597
5598 PR c/71858
5599 * c-common.h (enum lookup_name_fuzzy_kind): Add
5600 FUZZY_LOOKUP_FUNCTION_NAME.
5601
d0cf395a
JM
56022016-07-08 Jason Merrill <jason@redhat.com>
5603
5604 P0145: Refining Expression Order for C++.
5605 * c.opts (-fargs-in-order): Rename to -fstrong-eval-order.
5606 * c-opts.c: Adjust.
5607
98d44e93
MT
56082016-07-05 Markus Trippelsdorf <markus@trippelsdorf.de>
5609
5610 PR c++/71214
5611 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_rvalue_references.
5612
f9d8d994
TS
56132016-06-29 Thomas Schwinge <thomas@codesourcery.com>
5614
5615 * c-pragma.h (enum pragma_kind): Rename
5616 PRAGMA_OMP_DECLARE_REDUCTION to PRAGMA_OMP_DECLARE. Adjust all
5617 users.
5618
4aa83879
RB
56192016-06-29 Richard Biener <rguenther@suse.de>
5620
5621 PR middle-end/71002
5622 * c-common.c (c_common_get_alias_set): Remove union type punning case.
5623
a25bd9e6
JM
56242016-06-24 Jason Merrill <jason@redhat.com>
5625
5626 P0145R2: Refining Expression Order for C++.
5627 * c-common.c (verify_tree) [COMPOUND_EXPR]: Fix handling on LHS of
5628 MODIFY_EXPR.
5629
a86451b9
JJ
56302016-06-24 Jakub Jelinek <jakub@redhat.com>
5631
5632 * c-common.c (check_builtin_function_arguments): Require last
5633 argument of BUILT_IN_*_OVERFLOW_P to have INTEGER_TYPE type.
5634 Adjust wording of diagnostics for BUILT_IN_*_OVERLFLOW
5635 if the last argument is pointer to enumerated or boolean type.
5636
1a4f11c8
DM
56372016-06-22 David Malcolm <dmalcolm@redhat.com>
5638
5639 PR c/70339
5640 * c-common.h (enum lookup_name_fuzzy_kind): New enum.
5641 (lookup_name_fuzzy): New prototype.
5642
fe55692c
JDA
56432016-06-21 John David Anglin <danglin@gcc.gnu.org>
5644
5645 * c-common.c (get_source_date_epoch): Use int64_t instead of long long.
5646
4eb24e01
JM
56472016-06-14 Jason Merrill <jason@redhat.com>
5648
5649 P0145R2: Refining Expression Order for C++.
5650 * c.opt (fargs-in-order): New.
5651 * c-opts.c (c_common_post_options): Adjust flag_args_in_order.
5652
ef7cf206
JJ
56532016-06-13 Jakub Jelinek <jakub@redhat.com>
5654
0dda258b
JJ
5655 PR sanitizer/71498
5656 * c-gimplify.c (ubsan_walk_array_refs_r): Set *walk_subtrees = 0 on
5657 all BIND_EXPRs, and on all BIND_EXPRs recurse also on BIND_EXPR_BODY.
5658
ef7cf206
JJ
5659 PR preprocessor/71183
5660 * c-ppoutput.c (init_pp_output): Set cb->get_source_date_epoch
5661 to cb_get_source_date_epoch.
5662
50b15873
JJ
56632016-06-10 Jakub Jelinek <jakub@redhat.com>
5664
5665 PR c/68657
5666 * c.opt (Wpsabi): Add Warning flag.
5667
4d926e34
MS
56682016-06-10 Martin Sebor <msebor@redhat.com>
5669
5670 PR c/71392
14ec014e 5671 * c-common.c (handle_nonnull_attribute): Accept
4d926e34
MS
5672 the nonnull attribute in type-generic builtins.
5673
e01b4e16
MS
56742016-06-09 Martin Sebor <msebor@redhat.com>
5675
5676 PR c/70883
5677 * c-common.c (builtin_function_validate_nargs): Make text of error
5678 message consistent with others like it.
5679
44a845ca
MS
56802016-06-08 Martin Sebor <msebor@redhat.com>
5681 Jakub Jelinek <jakub@redhat.com>
5682
5683 PR c++/70507
5684 PR c/68120
5685 * c-common.c (check_builtin_function_arguments): Handle
5686 BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
5687
a80a7051
RB
56882016-06-08 Richard Biener <rguenther@suse.de>
5689
5690 * c-common.c (parse_optimize_options): Improve diagnostic messages.
5691
bfd67b47
RB
56922016-06-07 Richard Biener <rguenther@suse.de>
5693
5694 PR c/61564
5695 * c-common.c (parse_optimize_options): Only apply CL_OPTIMIZATION
5696 options and warn about others.
5697
15c98b2e
ES
56982016-06-01 Eduard Sanou <dhole@openmailbox.org>
5699
5700 * c-common.c (get_source_date_epoch): Rename to
5701 cb_get_source_date_epoch.
5702 * c-common.c (cb_get_source_date_epoch): Use a single generic erorr
5703 message when the parsing fails. Use error_at instead of fatal_error.
5704 * c-common.h (get_source_date_epoch): Rename to
5705 cb_get_source_date_epoch.
5706 * c-common.h (cb_get_source_date_epoch): Prototype.
5707 * c-common.h (MAX_SOURCE_DATE_EPOCH): Define.
5708 * c-common.h (c_omp_region_type): Remove trailing comma.
5709 * c-lex.c (init_c_lex): Set cb->get_source_date_epoch callback.
5710 * c-lex.c (c_lex_with_flags): Remove initialization of
5711 pfile->source_date_epoch.
5712
00631022
JJ
57132016-05-30 Jakub Jelinek <jakub@redhat.com>
5714
5715 PR c++/71349
5716 * c-omp.c (c_omp_split_clauses): Put OMP_CLAUSE_DEPEND to
5717 C_OMP_CLAUSE_SPLIT_TARGET. Put OMP_CLAUSE_NOWAIT to
5718 C_OMP_CLAUSE_SPLIT_TARGET if combined with target construct,
5719 instead of C_OMP_CLAUSE_SPLIT_FOR.
5720
f17a223d
RB
57212016-05-24 Richard Biener <rguenther@suse.de>
5722
5723 PR middle-end/70434
5724 PR c/69504
5725 * c-common.h (convert_vector_to_pointer_for_subscript): Rename to ...
5726 (convert_vector_to_array_for_subscript): ... this.
5727 * c-common.c (convert_vector_to_pointer_for_subscript): Use a
5728 VIEW_CONVERT_EXPR to an array type. Rename to ...
5729 (convert_vector_to_array_for_subscript): ... this.
5730
4f2e1536
MP
57312016-05-12 Marek Polacek <polacek@redhat.com>
5732
5733 PR c/70756
5734 * c-common.c (pointer_int_sum): Call size_in_bytes_loc instead of
5735 size_in_bytes and pass LOC to it.
5736
d6e83a8d
MM
57372016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
5738
5739 PR c/43651
5740 * c.opt (Wduplicate-decl-specifier): New option.
5741
5c3a10fb
MP
57422016-05-11 Marek Polacek <polacek@redhat.com>
5743
5744 PR c++/71024
5745 * c-common.c (diagnose_mismatched_attributes): New function.
5746 * c-common.h (diagnose_mismatched_attributes): Declare.
5747
deef7113
MP
57482016-05-04 Marek Polacek <polacek@redhat.com>
5749
5750 * c.opt (Wdangling-else): New option.
5751
79ce98bc
MP
57522016-05-03 Marek Polacek <polacek@redhat.com>
5753
5754 PR c/70859
5755 * c-common.c (builtin_function_validate_nargs): Add location
5756 parameter. Use it.
5757 (check_builtin_function_arguments): Add location and arguments
5758 parameters. Use them.
5759 * c-common.h (check_builtin_function_arguments): Update declaration.
5760
381cdae4
RB
57612016-05-03 Richard Biener <rguenther@suse.de>
5762
5763 * cilk.c (cilk_gimplify_call_params_in_spawned_fn): Do not
5764 allow call args to gimplify to SSA names.
5765
1d793c34
MP
57662016-05-03 Marek Polacek <polacek@redhat.com>
5767
5768 * c-common.h (enum c_omp_region_type): Remove stray comma.
5769
77886428
CP
57702016-05-02 Cesar Philippidis <cesar@codesourcery.com>
5771
5772 * c-common.h (enum c_omp_region_type): Define.
5773
697e0b28
RS
57742016-05-02 Richard Sandiford <richard.sandiford@arm.com>
5775
5776 * c-common.c (shorten_compare): Use wi::to_wide.
5777
e7ff0319
CP
57782016-04-29 Cesar Philippidis <cesar@codesourcery.com>
5779
5780 PR middle-end/70626
5781 * c-common.h (c_oacc_split_loop_clauses): Add boolean argument.
5782 * c-omp.c (c_oacc_split_loop_clauses): Use it to duplicate
5783 reduction clauses in acc parallel loops.
5784
2fff3db8
MP
57852016-04-29 Marek Polacek <polacek@redhat.com>
5786
5787 PR c/70852
5788 * c-common.c (warn_for_memset): Check domain before accessing it.
5789
509063eb
DV
57902016-04-29 Dominik Vogt <vogt@linux.vnet.ibm.com>
5791
5792 PR/69089
5793 * c-common.c (handle_aligned_attribute): Allow 0 as an argument to the
5794 "aligned" attribute.
5795
b632761d
JM
57962016-04-28 Jason Merrill <jason@redhat.com>
5797
5798 * c-lex.c (c_common_has_attribute): Handle nodiscard.
5799
174f6622
ES
58002016-04-28 Eduard Sanou <dhole@openmailbox.org>
5801 Matthias Klose <doko@debian.org>
5802
5803 * c-common.c (get_source_date_epoch): New function, gets the environment
7365279f 5804 variable SOURCE_DATE_EPOCH and parses it as long long with error
174f6622
ES
5805 handling.
5806 * c-common.h (get_source_date_epoch): Prototype.
5807 * c-lex.c (c_lex_with_flags): set parse_in->source_date_epoch.
5808
6bc2bb18
RB
58092015-04-27 Ryan Burn <contact@rnburn.com>
5810
5811 PR c++/69024
5812 PR c++/68997
5813 * cilk.c (cilk_ignorable_spawn_rhs_op): Change to external linkage.
5814 (cilk_recognize_spawn): Renamed from recognize_spawn and change to
5815 external linkage.
5816 (cilk_detect_and_unwrap): Corresponding changes.
5817 (extract_free_variables): Don't extract free variables from
5818 AGGR_INIT_EXPR slot.
5819 * c-common.h (cilk_ignorable_spawn_rhs_op): Prototype.
5820 (cilk_recognize_spawn): Likewise.
5821
c1e1f433
BS
58222016-04-27 Bernd Schmidt <bschmidt@redhat.com>
5823
5824 * c.opt (Wmemset-elt-size): New option.
5825 * c-common.c (warn_for_memset): New function.
5826 * c-common.h (warn_for_memset): Declare.
5827
d067e05f
JM
58282016-04-25 Jason Merrill <jason@redhat.com>
5829
5830 * c-common.c (handle_unused_attribute): Accept CONST_DECL.
5831 No longer static.
5832 * c-common.h: Declare it.
5833 * c-lex.c (c_common_has_attribute): Add maybe_unused.
5834
9aa36ae5
JM
58352016-04-22 Jason Merrill <jason@redhat.com>
5836
5837 * c-cppbuiltin.c (c_cpp_builtins): Fix __cpp_range_based_for.
5838
477d4906
IV
58392016-04-20 Ilya Verbin <ilya.verbin@intel.com>
5840
5841 PR c++/69363
5842 * c-cilkplus.c (c_finish_cilk_clauses): Remove function.
5843 * c-common.h (c_finish_cilk_clauses): Remove declaration.
5844
fe37c7af
MM
58452016-04-18 Michael Matz <matz@suse.de>
5846
5847 * c-common.c (handle_aligned_attribute): Use SET_TYPE_ALIGN
5848 and SET_DECL_ALIGN.
5849
23f2660f
EB
58502016-04-17 Eric Botcazou <ebotcazou@adacore.com>
5851
5852 * c-ada-spec.c (get_underlying_decl): Return the typedef, if any.
5853 (dump_generic_ada_node) <POINTER_TYPE>: Clean up handling of access
5854 to incomplete types.
5855 (dump_nested_type): Remove redundant tests and tidy up.
5856 (print_ada_declaration): Also set TREE_VISITED on the declaration of
5857 a type which is the typedef of an original type.
5858
1e77281b
MP
58592016-04-15 Marek Polacek <polacek@redhat.com>
5860
5861 PR c/70651
5862 * c-common.c (build_va_arg): Change two asserts into errors and return
5863 error_mark_node.
5864
b3a77f21
MP
58652016-04-13 Marek Polacek <polacek@redhat.com>
5866
5867 PR c++/70639
5868 * c-indentation.c (should_warn_for_misleading_indentation): Bail out
5869 for switch statements, too.
5870
322b8466
JM
58712016-03-28 Jason Merrill <jason@redhat.com>
5872
5873 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_range_based_for.
5874
fbdb6baf
MP
58752016-03-23 Marek Polacek <polacek@redhat.com>
5876
5877 PR c++/69884
5878 * c.opt (Wignored-attributes): New option.
5879
5c240f4d
DM
58802016-03-22 David Malcolm <dmalcolm@redhat.com>
5881
5882 PR c/69993
5883 * c-indentation.c (warn_for_misleading_indentation): Rewrite the
5884 diagnostic text, reversing the order of the warning and note so
5885 that they appear in source order.
5886
14ba7b28
MP
58872016-03-17 Marek Polacek <polacek@redhat.com>
5888
5889 PR c/69407
5890 * c-common.c (resolve_overloaded_builtin): Set TREE_USED for the fetch
5891 operations.
5892
08a1cadc
JM
58932016-03-14 Jason Merrill <jason@redhat.com>
5894
2aaeea19
JM
5895 * c-cppbuiltin.c (c_cpp_builtins): Set __cpp_hex_float.
5896
08a1cadc
JM
5897 * c-cppbuiltin.c (c_cpp_builtins): Bump __cpp_range_based_for.
5898
c06d25bb
RB
58992016-03-09 Richard Biener <rguenther@suse.de>
5900
5901 PR c/70143
5902 * c-common.c (strict_aliasing_warning): Add back
5903 alias_sets_conflict_p check.
5904
80aac5c8
JM
59052016-03-08 Jason Merrill <jason@redhat.com>
5906
5907 * c-opts.c (set_std_cxx1z): Don't enable concepts.
5908
64b23c13
DM
59092016-03-04 David Malcolm <dmalcolm@redhat.com>
5910
5911 PR c/68187
5912 * c-indentation.c (get_visual_column): Move code to determine next
5913 tab stop to...
5914 (next_tab_stop): ...this new function.
5915 (line_contains_hash_if): Delete function.
5916 (detect_preprocessor_logic): Delete function.
5917 (get_first_nws_vis_column): New function.
5918 (detect_intervening_unindent): New function.
5919 (should_warn_for_misleading_indentation): Replace call to
5920 detect_preprocessor_logic with a call to
5921 detect_intervening_unindent.
5922
729526f5
DM
59232016-03-04 David Malcolm <dmalcolm@redhat.com>
5924
5925 PR c/68187
5926 * c-indentation.c (should_warn_for_misleading_indentation): When
5927 suppressing warnings about cases where the guard and body are on
5928 the same column, only use the first non-whitespace column in place
5929 of the guard token column when dealing with "else" clauses.
5930 When rejecting aligned BODY and NEXT, loosen the requirement
5931 from equality with the first non-whitespace of guard to simply
5932 that they not be indented relative to it.
5933
e9a35493
RB
59342016-03-04 Richard Biener <rguenther@suse.de>
5935
5936 PR c++/70054
5937 * c-common.c (strict_aliasing_warning): Use alias_set_subset_of
5938 instead of alias_sets_conflict_p.
5939
1be56bc5
MP
59402016-03-01 Marek Polacek <polacek@redhat.com>
5941
5942 PR c++/69795
5943 * c-common.c (reject_gcc_builtin): Check for FUNCTION_DECL rather than
5944 any DECL.
5945
35886f0b
MS
59462016-02-22 Martin Sebor <msebor@redhat.com>
5947
5948 PR middle-end/69780
5949 * c-common.c (check_builtin_function_arguments): Validate and
5950 reject invalid arguments to __builtin_alloca_with_align.
5951
4246c8da
MW
59522016-02-20 Mark Wielaard <mjw@redhat.com>
5953
5954 PR c/28901
5955 * c.opt (Wunused-const-variable): Turn into Alias for...
5956 (Wunused-const-variable=): New option.
5957
268be88c
BE
59582016-02-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
5959
5960 PR c++/69865
5961 * c-opts.c (c_common_post_options): Move call to set_std_cxx14 from
5962 here...
5963 (c_common_init_options): ...to here.
5964 (set_std_cxx98): Initialize flag_isoc94 and flag_isoc99.
5965
871b3f47
JJ
59662016-02-19 Jakub Jelinek <jakub@redhat.com>
5967
5968 PR c++/69826
5969 * c-pragma.c (c_pp_lookup_pragma): Handle PRAGMA_CILK_GRAINSIZE.
5970 (init_pragma): Register PRAGMA_CILK_GRAINSIZE even for
5971 flag_preprocess_only.
5972
bf14eba2
JJ
59732016-02-16 Jakub Jelinek <jakub@redhat.com>
5974
5975 PR c/69835
5976 * c.opt (Wnonnull-compare): Enable for -Wall.
5977
ba6b3795
JJ
59782016-02-15 Jakub Jelinek <jakub@redhat.com>
5979
5980 PR c++/69797
5981 * c-common.c (sync_resolve_size): Diagnose too few arguments
5982 even when params is non-NULL empty vector.
5983
a011cd92
BS
59842016-02-08 Bernd Schmidt <bschmidt@redhat.com>
5985
5986 PR target/60410
5987 * c.opt (fshort-double): Remove.
5988
46cb9332
MS
59892016-02-05 Martin Sebor <msebor@redhat.com>
5990
5991 PR c++/69662
5992 * c.opt (Warning options): Update -Wplacement-new to take
5993 an optional argument.
5994
e1b81f2b
JJ
59952016-02-01 Jakub Jelinek <jakub@redhat.com>
5996
5997 PR preprocessor/69543
5998 PR c/69558
5999 * c-pragma.c (handle_pragma_diagnostic): Pass input_location
6000 instead of loc to control_warning_option.
6001
b6adbb9f
NS
60022016-02-01 Nathan Sidwell <nathan@codesourcery.com>
6003
6004 * c.opt (fopenacc-dim=): New option.
6005
5d70666e
RB
60062016-01-27 Ryan Burn <contact@rnburn.com>
6007
6008 PR cilkplus/69267
6009 * cilk.c (cilk_gimplify_call_params_in_spawned_fn): Change to use
6010 gimplify_arg. Removed superfluous post_p argument.
6011 * c-family.h (cilk_gimplify_call_params_in_spawned_fn): Removed
6012 superfluous post_p argument.
6013 * c-gimplify.c (c_gimplify_expr): Likewise.
6014
01e1dea3
DM
60152016-01-26 David Malcolm <dmalcolm@redhat.com>
6016
6017 PR other/69006
6018 * c-opts.c (c_diagnostic_finalizer): Replace invocation of
6019 pp_newline_and_flush with pp_flush.
6020
9f04a53e
MS
60212016-01-20 Martin Sebor <msebor@redhat.com>
6022
6023 PR c/69405
6024 * c-common.c (sync_resolve_size): Avoid printing diagnostic about
6025 an incompatible argument when the argument isn't a valid tree node.
6026
7f26f7df
JM
60272016-01-18 Jason Merrill <jason@redhat.com>
6028
6029 PR c++/68767
6030 * c-common.c (check_function_arguments_recurse): Fold the whole
6031 COND_EXPR, not just the condition.
6032
f62bf092
TV
60332016-01-18 Tom de Vries <tom@codesourcery.com>
6034
6035 * c-omp.c (c_oacc_split_loop_clauses): Don't copy OMP_CLAUSE_REDUCTION,
6036 classify as loop clause.
6037
e0a575ff
JJ
60382016-01-15 Jakub Jelinek <jakub@redhat.com>
6039
6040 PR bootstrap/68271
6041 * c-pragma.c (c_register_pragma_1): Adjust comment to note that
6042 C++ FE no longer has limit on number of pragmas.
6043
60442015-01-14 Ryan Burn <contact@rnburn.com>
b6e3db06
RB
6045
6046 PR c++/69048
6047 * cilk.c (create_cilk_wrapper_body): Call fold_build_cleanup_point_expr
c47eaca6 6048 to add missing cleanup point.
b6e3db06 6049
c7df95d8
DM
60502016-01-14 David Malcolm <dmalcolm@redhat.com>
6051
6052 PR c++/68819
6053 * c-indentation.c (get_visual_column): Add location_t param.
6054 Handle the column number being zero by effectively disabling the
6055 warning, with an "inform".
6056 (should_warn_for_misleading_indentation): Add location_t argument
6057 for all uses of get_visual_column.
6058
21efdd80
PP
60592016-01-10 Patrick Palka <ppalka@gcc.gnu.org>
6060
6061 PR c++/69029
6062 * c-indentation.c (should_warn_for_misleading_indentation):
6063 Don't warn about do-while statements.
6064
7a127fa7
MS
60652016-01-07 Martin Sebor <msebor@redhat.com>
6066
6067 PR c/68966
6068 * c-common.c (sync_resolve_size): Reject first argument when it's
6069 a pointer to _Bool.
6070
c589e975
DM
60712016-01-05 David Malcolm <dmalcolm@redhat.com>
6072
6073 PR c/69122
6074 * c-indentation.c (get_visual_column): Remove default argument.
6075 (should_warn_for_misleading_indentation): For the multiline case,
6076 update call to get_visual_column for next_stmt_exploc so that it
6077 captures the location of the first non-whitespace character in the
6078 relevant line. Don't issue warnings if there is non-whitespace
6079 before the next statement.
6080
818ab71a
JJ
60812016-01-04 Jakub Jelinek <jakub@redhat.com>
6082
6083 Update copyright years.
6084
745e411d
DM
60852015-12-21 David Malcolm <dmalcolm@redhat.com>
6086
6087 * c-common.c (binary_op_error): Convert first param from
6088 location_t to rich_location * and use it when emitting an error.
6089 * c-common.h (binary_op_error): Convert first param from
6090 location_t to rich_location *.
6091
de67c4c3
DM
60922015-12-16 David Malcolm <dmalcolm@redhat.com>
6093
6094 * c-common.h (conflict_marker_get_final_tok_kind): New prototype.
6095 * c-lex.c (conflict_marker_get_final_tok_kind): New function.
6096
4a38b02b
IV
60972015-12-15 Ilya Verbin <ilya.verbin@intel.com>
6098
6099 * c-common.c (c_common_attribute_table): Handle "omp declare target
6100 link" attribute.
6101
54d62f51
JJ
61022015-12-14 Jakub Jelinek <jakub@redhat.com>
6103
6104 PR c/68833
6105 * c.opt (Wmissing-format-attribute, Wnormalized): Add Warning option.
6106
8d4227c8
TB
61072014-12-12 Tobias Burnus <burnus@net-b.de>
6108
6109 PR fortran/68815
6110 * c-format.c (gcc_gfc_char_table): Add 'q' flag to remaining
6111 specifiers (%d, %i,%u and %c).
6112
f6069ccc
DM
61132015-12-10 David Malcolm <dmalcolm@redhat.com>
6114
6115 * c.opt (Wmisleading-indentation): Add to -Wall for C and C++.
6116
63bbf46d
JJ
61172015-12-08 Jakub Jelinek <jakub@redhat.com>
6118
6119 PR c/48088
6120 PR c/68657
6121 * c.opt (Wfloat-conversion, Wsign-conversion): Add Warning.
6122 * c-pragma.c (handle_pragma_diagnostic): Adjust
6123 control_warning_option caller.
6124
f79520bb
DM
61252015-12-07 David Malcolm <dmalcolm@redhat.com>
6126
6127 * c-common.c (c_cpp_error): Update for change to
6128 rich_location::set_range.
6129
b3d5bc62
JJ
61302015-12-04 Paolo Bonzini <bonzini@gnu.org>
6131
6132 * c-common.c (maybe_warn_shift_overflow): Warn on all overflows if
6133 shifting 1 out of the sign bit.
6134
61352015-12-04 Kirill Yukhin <kirill.yukhin@intel.com>
6136
6137 * c-common.c (c_common_attribute_table[]): Update max arguments
6138 count for "simd" attribute.
6139 (handle_simd_attribute): Parse "notinbranch" and "inbranch" arguments.
6140
6eb4a537
JJ
61412015-12-03 Jakub Jelinek <jakub@redhat.com>
6142
6143 PR preprocessor/57580
6144 * c-ppoutput.c (print): Change printed field to bool.
6145 Move src_file last for smaller padding.
6146 (init_pp_output): Set print.printed to false instead of 0.
6147 (scan_translation_unit): Fix up formatting. Set print.printed
6148 to true after printing something other than newline.
6149 (scan_translation_unit_trad): Set print.printed to true instead of 1.
6150 (maybe_print_line_1): Set print.printed to false instead of 0.
6151 (print_line_1): Likewise.
6152 (do_line_change): Set print.printed to true instead of 1.
6153 (cb_define, dump_queued_macros, cb_include, cb_def_pragma,
6154 dump_macro): Set print.printed to false after printing newline.
6155
4250754e
JM
61562015-12-02 Jason Merrill <jason@redhat.com>
6157
f479b43d
JM
6158 * c-common.c (fold_for_warn): New.
6159 (warn_logical_operator, warn_tautological_cmp)
6160 (check_function_arguments_recurse, maybe_warn_bool_compare): Use it.
6161
4250754e
JM
6162 * c-common.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
6163 (c_fully_fold_internal, decl_constant_value_for_optimization):
6164 Move to c/c-fold.c.
6165 * c-common.h: Don't declare decl_constant_value_for_optimization.
6166
e9e32ee6
JM
61672015-12-02 Joseph Myers <joseph@codesourcery.com>
6168
6169 PR c/68162
6170 * c-common.h (c_build_qualified_type): Add extra default
6171 arguments.
6172
37d5ad46
JB
61732015-12-01 Julian Brown <julian@codesourcery.com>
6174 Cesar Philippidis <cesar@codesourcery.com>
6175 James Norris <James_Norris@mentor.com>
6176
6177 * c-pragma.c (oacc_pragmas): Add PRAGMA_OACC_HOST_DATA.
6178 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_HOST_DATA.
6179 (pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_USE_DEVICE.
6180
f07862c7
EB
61812015-11-30 Eric Botcazou <ebotcazou@adacore.com>
6182
6183 * c-ada-spec.c (print_ada_macros): Remove redundant blank line.
6184 (decl_sloc_common): Delete and move bulk of processing to...
6185 (decl_sloc): ...here.
6186 (pp_ada_tree_identifier): Remove reference to QUAL_UNION_TYPE.
6187 (dump_ada_double_name): Remove S parameter and compute the suffix.
6188 (dump_ada_array_type): Add PARENT parameter. Simplify computation of
6189 element type and deal with an anonymous one.
6190 (dump_ada_template): Use RECORD_OR_UNION_TYPE_P macro.
6191 (dump_generic_ada_node): Tweak. Adjust call to dump_ada_array_type
6192 and remove reference to QUAL_UNION_TYPE.
6193 (dump_nested_types): Make 2 passes on the fields and move bulk to...
6194 (dump_nested_type): ...here. New function extracted from above.
6195 Generate a full declaration for anonymous element type of arrays.
6196 (print_ada_declaration): Really skip anonymous declarations. Remove
6197 references to QUAL_UNION_TYPE. Adjust call to dump_ada_array_type.
6198 Clean up processing of declarations of array types and objects.
6199 (print_ada_struct_decl): Remove reference to QUAL_UNION_TYPE.
6200 Remove obsolete code and tidy up.
6201
75c8aac3
JH
62022015-11-29 Jan Hubicka <hubicka@ucw.cz>
6203
6204 PR c/67581
6205 * c-common.c (handle_transparent_union_attribute): Update
6206 also type variants.
6207
b58d3df2
ML
62082015-11-27 Martin Liska <mliska@suse.cz>
6209
6210 PR c++/68312
6211 * array-notation-common.c (cilkplus_extract_an_triplets):
6212 Release vector of vectors.
6213 * cilk.c (gimplify_cilk_spawn): Free allocated memory.
6214
89a01fcf
EB
62152015-11-26 Eric Botcazou <ebotcazou@adacore.com>
6216
6217 PR c++/68527
6218 * c-ada-spec.c (dump_nested_types): Add guard for error_mark_node.
6219 (print_ada_struct_decl): Likewise.
6220
cc5c5226
IZ
62212015-11-23 Igor Zamyatin <igor.zamyatin@intel.com>
6222
6223 PR c++/68001
6224 * c-gimplify.c (c_gimplify_expr): Stop the process if see an error.
6225 * cilk.c (recognize_spawn): Determine location in a more precise
6226 way.
6227
269adb9d
JM
62282015-11-19 Jason Merrill <jason@redhat.com>
6229
6230 * c-common.c (shorten_compare): But look through macros from
6231 system headers.
6232
d0eccfcd
JM
62332015-11-18 Jason Merrill <jason@redhat.com>
6234
6235 * c-common.c (shorten_compare): Don't -Wtype-limits if the
6236 non-constant operand comes from a macro.
6237
3e44547c
JM
62382015-11-17 Jason Merrill <jason@redhat.com>
6239
6240 PR bootstrap/68346
6241 * c-common.c (warn_tautological_cmp): Fold before checking for
6242 constants.
6243
0f62c7a0
MP
62442015-11-16 Marek Polacek <polacek@redhat.com>
6245
6246 PR c++/68362
6247 * c-common.c (check_case_bounds): Fold low and high cases.
6248
a868811e
MP
62492015-11-16 Marek Polacek <polacek@redhat.com>
6250
6251 * c-ada-spec.c (dump_ada_template): Use RECORD_OR_UNION_TYPE_P.
6252 * c-common.c (c_common_get_alias_set): Likewise.
6253 (handle_visibility_attribute): Likewise.
6254
fff77217
KY
62552015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
6256
6257 * c-common.c (handle_simd_attribute): New.
6258 (struct attribute_spec): Add entry for "simd".
6259 (handle_simd_attribute): New.
6260
269e63b7
KT
62612015-11-13 Kai Tietz <ktietz70@googlemail.com>
6262
6263 * c-lex.c (interpret_float): Use fold_convert.
6264
ebedc9a3
DM
62652015-11-13 David Malcolm <dmalcolm@redhat.com>
6266
6267 * c-common.c (c_fully_fold_internal): Capture existing souce_range,
6268 and store it on the result.
6269 * c-opts.c (c_common_init_options): Set
6270 global_dc->colorize_source_p.
6271
6e232ba4
JN
62722015-11-12 James Norris <jnorris@codesourcery.com>
6273 Joseph Myers <joseph@codesourcery.com>
6274
7365279f 6275 * c-pragma.c (oacc_pragmas): Add entry for declare directive.
6e232ba4
JN
6276 * c-pragma.h (enum pragma_kind): Add PRAGMA_OACC_DECLARE.
6277 (enum pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT and
6278 PRAGMA_OACC_CLAUSE_LINK.
6279
e78bede6
MP
62802015-11-11 Marek Polacek <polacek@redhat.com>
6281
6282 PR c/68107
6283 PR c++/68266
6284 * c-common.c (valid_array_size_p): New function.
6285 * c-common.h (valid_array_size_p): Declare.
6286
3f8257db 62872015-11-11 Dominique d'Humieres <dominiq@lps.ens.fr>
4ac93c7c
DH
6288
6289 PR bootstrap/68271
6290 * c-pragma.c (c_register_pragma_1): Update the gcc_assert to 256.
6291
69f293c9
AM
62922015-11-11 Andrew MacLeod <amacleod@redhat.com>
6293
6294 * array-notation-common.c: Remove unused header files.
6295 * c-ada-spec.c: Likewise.
6296 * c-cilkplus.c: Likewise.
6297 * c-common.c: Likewise.
6298 * c-cppbuiltin.c: Likewise.
6299 * c-dump.c: Likewise.
6300 * c-format.c: Likewise.
6301 * c-gimplify.c: Likewise.
6302 * c-indentation.c: Likewise.
6303 * c-lex.c: Likewise.
6304 * c-omp.c: Likewise.
6305 * c-opts.c: Likewise.
6306 * c-pch.c: Likewise.
6307 * c-ppoutput.c: Likewise.
6308 * c-pragma.c: Likewise.
6309 * c-pretty-print.c: Likewise.
6310 * c-semantics.c: Likewise.
6311 * c-ubsan.c: Likewise.
6312 * cilk.c: Likewise.
6313 * stub-objc.c: Likewise.
6314
3a40d81d
NS
63152015-11-09 Thomas Schwinge <thomas@codesourcery.com>
6316 Cesar Philippidis <cesar@codesourcery.com>
6317 James Norris <jnorris@codesourcery.com>
6318 Julian Brown <julian@codesourcery.com>
6319 Nathan Sidwell <nathan@codesourcery.com>
6320
6321 * c-pragma.c (oacc_pragmas): Add "routine".
6322 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_ROUTINE.
6323
ee45a32d
EB
63242015-11-08 Eric Botcazou <ebotcazou@adacore.com>
6325
6326 * c-common.c (c_common_attributes): Add scalar_storage_order.
6327 (handle_scalar_storage_order_attribute): New function.
6328 * c-pragma.c (global_sso): New variable.
6329 (maybe_apply_pragma_scalar_storage_order): New function.
6330 (handle_pragma_scalar_storage_order): Likewise.
6331 (init_pragma): Register scalar_storage_order.
6332 * c-pragma.h (maybe_apply_pragma_scalar_storage_order): Declare.
6333 * c.opt (Wscalar-storage-order): New warning.
6334 (fsso-struct=): New option.
6335
eb11eb15
MS
63362015-11-08 Martin Sebor <msebor@redhat.com>
6337
6338 * c.opt (Wplacement-new): Add a period to the end of a sentence.
6339
0aad0198
RS
63402015-11-07 Richard Sandiford <richard.sandiford@arm.com>
6341
6342 * c-common.c: Don't undef DEF_BUILTIN.
6343
8a645150
DM
63442015-11-06 David Malcolm <dmalcolm@redhat.com>
6345
6346 * c-common.c (c_cpp_error): Convert parameter from location_t to
6347 rich_location *. Eliminate the "column_override" parameter and
6348 the call to diagnostic_override_column.
6349 Update the "done_lexing" clause to set range 0
6350 on the rich_location, rather than overwriting a location_t.
6351 * c-common.h (c_cpp_error): Convert parameter from location_t to
6352 rich_location *. Eliminate the "column_override" parameter.
6353
7a5e4956
CP
63542015-11-05 Cesar Philippidis <cesar@codesourcery.com>
6355 Thomas Schwinge <thomas@codesourcery.com>
6356 James Norris <jnorris@codesourcery.com>
6357
6358 * c-omp.c (c_oacc_split_loop_clauses): Make TILE, GANG, WORKER, VECTOR,
6359 AUTO, SEQ, INDEPENDENT and PRIVATE loop clauses. Associate REDUCTION
6360 clauses with parallel and kernels and loops.
6361 * c-pragma.h (enum pragma_omp_clause): Add entries for
6362 PRAGMA_OACC_CLAUSE_{INDEPENDENT,TILE,DEFAULT}.
6363 * pt.c (tsubst_omp_clauses): Add support for OMP_CLAUSE_{NUM_GANGS,
6364 NUM_WORKERS,VECTOR_LENGTH,GANG,WORKER,VECTOR,ASYNC,WAIT,TILE,AUTO,
6365 INDEPENDENT,SEQ}.
6366 (tsubst_expr): Add support for OMP_CLAUSE_{KERNELS,PARALLEL,LOOP}.
6367
e2f5cc96
MS
63682015-11-05 Martin Sebor <msebor@redhat.com>
6369
6370 PR c++/67942
6371 * c.opt (-Wplacement-new): New option.
6372
e01d41e5
JJ
63732015-11-05 Jakub Jelinek <jakub@redhat.com>
6374
6375 * c-common.h (c_finish_omp_atomic): Add TEST argument.
6376 (c_omp_check_loop_iv, c_omp_check_loop_iv_exprs): New prototypes.
6377 * c-omp.c (c_finish_omp_atomic): Add TEST argument. Don't call
6378 save_expr or create_tmp_var* if TEST is true.
6379 (c_finish_omp_for): Store OMP_FOR_ORIG_DECLS always.
6380 Don't call add_stmt here.
6381 (struct c_omp_check_loop_iv_data): New type.
6382 (c_omp_check_loop_iv_r, c_omp_check_loop_iv,
6383 c_omp_check_loop_iv_exprs): New functions.
6384 (c_omp_split_clauses): Adjust for lastprivate being allowed on
6385 distribute.
6386 (c_omp_declare_simd_clauses_to_numbers): Change
6387 OMP_CLAUSE_LINEAR_VARIABLE_STRIDE OMP_CLAUSE_LINEAR_STEP into numbers.
6388 (c_omp_declare_simd_clauses_to_decls): Similarly change those
6389 from numbers to PARM_DECLs.
6390
595278be
MM
63912015-11-04 Mikhail Maltsev <maltsevm@gmail.com>
6392
6393 * c-omp.c (c_omp_split_clauses): Remove conditional compilation. Use
6394 flag_checking.
6395
3f8257db 63962015-11-03 Bernd Schmidt <bschmidt@redhat.com>
c85158de
MS
6397
6398 PR c++-common/67882
b3d5bc62
JJ
6399 * c-common.h (fold_offsetof_1): Add argument.
6400 * c-common.c (fold_offsetof_1): Diagnose more invalid
c85158de
MS
6401 offsetof expressions that reference elements past the end of
6402 an array.
6403
4bf9e5a8
TS
64042015-11-03 Thomas Schwinge <thomas@codesourcery.com>
6405 Chung-Lin Tang <cltang@codesourcery.com>
6406
6407 * c-pragma.c (oacc_pragmas): Add "atomic".
6408 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_ATOMIC.
6409
3b1661a9
ES
64102015-10-30 Evgeny Stupachenko <evstupac@gmail.com>
6411
6412 * c-common.c (handle_target_clones_attribute): New.
6413 (c_common_attribute_table): Add handle_target_clones_attribute.
6414 (handle_always_inline_attribute): Add check on target_clones attribute.
6415 (handle_target_attribute): Ditto.
6416
2adfab87
AM
64172015-10-29 Andrew MacLeod <amacleod@redhat.com>
6418
6419 * array-notation-common.c: Reorder #include's and remove duplicates.
6420 * c-ada-spec.c: Likewise.
6421 * c-cilkplus.c: Likewise.
6422 * c-common.c: Likewise.
6423 * c-cppbuiltin.c: Likewise.
6424 * c-dump.c: Likewise.
6425 * c-format.c: Likewise.
6426 * c-gimplify.c: Likewise.
6427 * c-indentation.c: Likewise.
6428 * c-lex.c: Likewise.
6429 * c-omp.c: Likewise.
6430 * c-opts.c: Likewise.
6431 * c-pch.c: Likewise.
6432 * c-ppoutput.c: Likewise.
6433 * c-pragma.c: Likewise.
6434 * c-pretty-print.c: Likewise.
6435 * c-semantics.c: Likewise.
6436 * c-ubsan.c: Likewise.
6437 * cilk.c: Likewise.
6438 * stub-objc.c: Likewise.
6439
d90ec4f2
JM
64402015-10-28 Jason Merrill <jason@redhat.com>
6441
6442 * c-common.c (pointer_int_sum): Fold the MULT_EXPR.
6443
88bae6f4
TS
64442015-10-27 Thomas Schwinge <thomas@codesourcery.com>
6445 James Norris <jnorris@codesourcery.com>
6446 Cesar Philippidis <cesar@codesourcery.com>
6447
6448 PR c/64765
6449 PR c/64880
6450 * c-common.h (c_oacc_split_loop_clauses): Declare function.
6451 * c-omp.c (c_oacc_split_loop_clauses): New function.
6452
b1726d6c
MS
64532015-10-21 Martin Sebor <msebor@redhat.com>
6454
6455 PR driver/68043
6456 * c.opt: End each sentence that describes an option with a period.
6457
fa60eeb9
MP
64582015-10-20 Marek Polacek <polacek@redhat.com>
6459
6460 * array-notation-common.c (is_cilkplus_vector_p): Define.
6461 * c-common.h (is_cilkplus_vector_p): Declare.
6462
95979049
MP
64632015-10-20 Marek Polacek <polacek@redhat.com>
6464
6465 * c.opt (std=gnu++11): Do not describe as experimental.
6466 (std=gnu++14): Likewise.
6467
2a9fb712
JM
64682015-10-19 Jason Merrill <jason@redhat.com>
6469
6470 * c-cppbuiltin.c (c_cpp_builtins): Define
6471 __cpp_nontype_template_args.
6472
13b380a3
JM
64732015-10-19 Jason Merrill <jason@redhat.com>
6474
6475 * c-cppbuiltin.c (c_cpp_builtins): Define
6476 __cpp_enumerator_attributes, __cpp_fold_expressions,
6477 __cpp_unicode_characters.
6478
d9a6bd32
JJ
64792015-10-13 Jakub Jelinek <jakub@redhat.com>
6480 Aldy Hernandez <aldyh@redhat.com>
6481
6482 * c-common.c (enum c_builtin_type): Define DEF_FUNCTION_TYPE_9,
6483 DEF_FUNCTION_TYPE_10 and DEF_FUNCTION_TYPE_11.
6484 (c_define_builtins): Likewise.
6485 * c-common.h (enum c_omp_clause_split): Add
6486 C_OMP_CLAUSE_SPLIT_TASKLOOP.
6487 (c_finish_omp_critical, c_finish_omp_ordered): Add CLAUSES argument.
6488 (c_finish_omp_for): Add ORIG_DECLV argument.
6489 * c-cppbuiltin.c (c_cpp_builtins): Predefine _OPENMP as
6490 201511 instead of 201307.
6491 * c-omp.c (c_finish_omp_critical): Add CLAUSES argument, set
6492 OMP_CRITICAL_CLAUSES to it.
6493 (c_finish_omp_ordered): Add CLAUSES argument, set
6494 OMP_ORDERED_CLAUSES to it.
6495 (c_finish_omp_for): Add ORIG_DECLV argument, set OMP_FOR_ORIG_DECLS
6496 to it if OMP_FOR. Clear DECL_INITIAL on the IVs.
6497 (c_omp_split_clauses): Handle OpenMP 4.5 combined/composite
6498 constructs and new OpenMP 4.5 clauses. Clear
6499 OMP_CLAUSE_SCHEDULE_SIMD if not combined with OMP_SIMD. Add
6500 verification code.
6501 * c-pragma.c (omp_pragmas_simd): Add taskloop.
6502 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_TASKLOOP.
6503 (enum pragma_omp_clause): Add
6504 PRAGMA_OMP_CLAUSE_{DEFAULTMAP,GRAINSIZE,HINT,{IS,USE}_DEVICE_PTR}
6505 and PRAGMA_OMP_CLAUSE_{LINK,NOGROUP,NUM_TASKS,PRIORITY,SIMD,THREADS}.
6506
624d31fe
RS
65072015-10-05 Richard Sandiford <richard.sandiford@arm.com>
6508
6509 * c-lex.c (interpret_float): Use real_equal instead of
6510 REAL_VALUES_EQUAL.
6511
b8fd7909
JM
65122015-10-04 Jason Merrill <jason@redhat.com>
6513
6514 Implement N4514, C++ Extensions for Transactional Memory.
6515 * c-common.c (c_common_reswords): Add C++ TM TS keywords.
6516 (c_common_attribute_table): Add transaction_safe_dynamic.
6517 transaction_safe now affects type identity.
6518 (handle_tm_attribute): Handle transaction_safe_dynamic.
6519 * c-common.h (enum rid): Add RID_ATOMIC_NOEXCEPT,
6520 RID_ATOMIC_CANCEL, RID_SYNCHRONIZED.
6521 (OBJC_IS_CXX_KEYWORD): Add RID_SYNCHRONIZED.
6522 (D_TRANSMEM): New.
6523 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_transactional_memory.
6524 * c-pretty-print.c (pp_c_attributes_display): Don't print
6525 transaction_safe in C++.
6526
12651878
MP
65272015-10-02 Marek Polacek <polacek@redhat.com>
6528
6529 * c.opt (Wduplicated-cond): Don't enable by -Wall anymore.
6530
3e3b8d63
MP
65312015-10-02 Marek Polacek <polacek@redhat.com>
6532
6533 PR c/64249
6534 * c-common.c (warn_duplicated_cond_add_or_warn): New function.
6535 * c-common.h (warn_duplicated_cond_add_or_warn): Declare.
6536 * c.opt (Wduplicated-cond): New option.
6537
0d1a8f75
JM
65382015-10-01 Joseph Myers <joseph@codesourcery.com>
6539
6540 * c.opt (std=c11): Do not describe as experimental.
6541 (std=gnu11): Likewise.
6542 (std=iso9899:2011): Likewise.
6543
3e32ee19
NS
65442015-09-28 Nathan Sidwell <nathan@codesourcery.com>
6545
6546 * c-common.c (DEF_FUNCTION_TYPE_VAR_6): New.
6547 (DEF_FUNCTION_TYPE_VAR_11): Delete.
6548
974348ee
MP
65492015-09-25 Marek Polacek <polacek@redhat.com>
6550
6551 * c-ubsan.c (ubsan_instrument_division): Remove unnecessary code.
6552 (ubsan_instrument_shift): Likewise.
6553
15dbc1a6
MP
65542015-09-25 Marek Polacek <polacek@redhat.com>
6555
6556 PR sanitizer/64906
6557 * c-ubsan.c (ubsan_instrument_division): Also pre-evaluate OP1.
6558
6b95d7cc
PP
65592015-09-24 Patrick Palka <ppalka@gcc.gnu.org>
6560
6561 * c-indentation.c (should_warn_for_misleading_indentation):
6562 Compare next_stmt_vis_column with guard_line_first_nws instead
6563 of with guard_line_vis_column.
6564
c1822f9c
MLI
65652015-09-23 Manuel López-Ibáñez <manu@gcc.gnu.org>
6566
6567 PR c/49654
6568 PR c/49655
6569 * c-pragma.c (handle_pragma_diagnostic): Detect non-warning
6570 options and options not valid for the current language.
6571
d5398058
PP
65722015-09-22 Patrick Palka <ppalka@gcc.gnu.org>
6573
6574 * c-indentation.c (should_warn_for_misleading_indentation):
6575 Float out and consolidate the calls to get_visual_column that
6576 are passed guard_exploc as an argument. Compare
6577 next_stmt_vis_column with guard_line_first_nws instead of with
6578 body_line_first_nws.
6579
6b333269
NS
65802015-09-22 Nathan Sidwell <nathan@codesourcery.com>
6581
6582 * c.opt (Wmultiple-inheritance, Wvirtual-inheritance, Wtemplates,
6583 Wnamespaces): New C++ warnings.
6584
a75f1574
JM
65852015-09-22 Jason Merrill <jason@redhat.com>
6586
6587 * c-common.h (abi_compat_version_crosses): New.
6588 (warn_abi_version): Declare.
6589 * c-common.c: Define it.
6590 * c-opts.c (c_common_post_options): Handle it.
6591 flag_abi_compat_version defaults to 8.
6592
bdaaa8b7
VV
65932015-09-21 Ville Voutilainen <ville.voutilainen@gmail.com>
6594
6595 Complete the implementation of N4230, Nested namespace definition.
6596 * c-cppbuiltin.c: Add __cpp_namespace_attributes and
6597 __cpp_nested_namespace_definitions.
6598
eaa797e8
MLI
65992015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
6600
6601 * c-pragma.c (handle_pragma_diagnostic): Fix wrong return.
6602
c4914de6
MLI
66032015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
6604
6605 * c-pragma.c (handle_pragma_diagnostic): Use explicit location
6606 when warning.
6607 * c-pragma.h (pragma_lex): Add optional loc argument.
6608
fcb87c50
MM
66092015-09-16 Mikhail Maltsev <maltsevm@gmail.com>
6610
6611 * c-format.c (check_format_arg): Adjust to use common block size in all
6612 object pools.
6613
31bdd08a
DM
66142015-09-15 David Malcolm <dmalcolm@redhat.com>
6615
6616 * c-format.c (location_from_offset): Update for change in
6617 signature of location_get_source_line.
6618 * c-indentation.c (get_visual_column): Likewise.
6619 (line_contains_hash_if): Likewise.
6620
aa9f4b4c
MP
66212015-09-14 Marek Polacek <polacek@redhat.com>
6622
6623 * c-opts.c (c_common_post_options): Set C++ standard earlier, before
6624 setting various warnings.
6625
aa256c4a
MP
66262015-09-14 Marek Polacek <polacek@redhat.com>
6627
6628 * c-common.c (warn_for_sign_compare): Cast to unsigned when shifting
6629 a negative value.
6630
0f876f22
MW
66312015-09-11 Mark Wielaard <mjw@redhat.com>
6632
6633 PR c/28901
6634 * c.opt (Wunused-variable): Option from common.opt.
6635 (Wunused-const-variable): New option.
6636
273aa49e
PC
66372015-09-09 Paolo Carlini <paolo.carlini@oracle.com>
6638
6639 PR c++/53184
6640 * c.opt ([Wsubobject-linkage]): Add.
6641
1807ffc1
MS
66422015-09-03 Martin Sebor <msebor@redhat.com>
6643
6644 PR c/66516
6645 * c-common.h (c_decl_implicit, reject_gcc_builtin): Declare new
6646 functions.
6647 * c-common.c (reject_gcc_builtin): Define.
6648
38942840
BI
66492015-09-02 Balaji V. Iyer <balaji.v.iyer@intel.com>
6650
6651 PR middle-end/60586
6652 * c-common.h (cilk_gimplify_call_params_in_spawned_fn): New
6653 prototype.
6654 * c-gimplify.c (c_gimplify_expr): Added a call to the function
6655 cilk_gimplify_call_params_in_spawned_fn.
6656 * cilk.c (cilk_gimplify_call_params_in_spawned_fn): New function.
6657 (gimplify_cilk_spawn): Removed EXPR_STMT and CLEANUP_POINT_EXPR
6658 unwrapping.
6659
c316b5e4
MP
66602015-08-25 Marek Polacek <polacek@redhat.com>
6661
6662 PR middle-end/67330
6663 * c-common.c (handle_weak_attribute): Don't check whether the
6664 visibility can be changed here.
6665
584a7c46
MLI
66662015-08-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
6667
6668 * c-lex.c (c_lex_with_flags): Use explicit locations.
6669
a79683d5
TS
66702015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
6671
6672 * c-ada-spec.h, c-common.c, c-common.h, c-format.c, c-format.h,
6673 c-objc.h, c-ppoutput.c, c-pragma.c, c-pragma.h: Remove useless
6674
61717a45
FXC
66752015-08-18 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
6676
6677 PR middle-end/36757
6678 * c-common.c (check_builtin_function_arguments): Add check
6679 for BUILT_IN_SIGNBIT argument.
6680
329524f5
PC
66812015-08-18 Paolo Carlini <paolo.carlini@oracle.com>
6682
6683 PR c++/67160
6684 * c-cppbuiltin.c (c_cpp_builtins): Fix __cpp_static_assert value
6685 in c++1z mode.
6686
4ee55665
MP
66872015-08-17 Marek Polacek <polacek@redhat.com>
6688
6689 * c-pretty-print.c (pp_c_cv_qualifiers): Remove code dealing
6690 with whitespaces before qualifier names.
6691
b893e375
MP
66922015-08-12 Marek Polacek <polacek@redhat.com>
6693
6694 PR c++/55095
6695 * c-common.c (maybe_warn_shift_overflow): Properly handle
6696 left-shifting 1 into the sign bit.
6697
c2d89095
MLI
66982015-08-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
6699
6700 * c.opt (Wchkp): Use LangEnabledBy instead of EnabledBy.
6701
971e17ff
AS
67022015-08-06 Andrew Sutton <andrew.n.sutton@gmail.com>
6703 Braden Obrzut <admin@maniacsvault.net>
6704 Jason Merrill <jason@redhat.com>
6705
6706 Add C++ Concepts TS support.
6707 * c-common.c (c_common_reswords): Add __is_same_as, concept, requires.
6708 * c-common.h (enum rid): Add RID_IS_SAME_AS, RID_CONCEPT, RID_REQUIRES.
6709 (D_CXX_CONCEPTS, D_CXX_CONCEPTS_FLAGS): New.
6710 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_concepts.
6711 * c-opts.c (set_std_cxx1z): Set flag_concepts.
6712 * c.opt (fconcepts): New.
6713
b3d5bc62
JJ
67142015-08-02 Martin Sebor <msebor@redhat.com>
6715
6716 * c.opt (-Wframe-address): New warning option.
6717
8ebca419
PP
67182015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
6719
6720 * c-indentation.c (should_warn_for_misleading_indentation):
6721 Improve heuristics.
6722
1a1e101f
PP
67232015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
6724
6725 * c-indentation.c (get_visual_column): Add parameter first_nws,
6726 use it. Update comment documenting the function.
6727 (is_first_nonwhitespace_on_line): Remove.
6728 (should_warn_for_misleading_indentation): Replace usage of
6729 of is_first_nonwhitespace_on_line with get_visual_column.
6730
992118a1
PP
67312015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
6732
6733 * c-indentation.h (struct token_indent_info): Define.
6734 (get_token_indent_info): Define.
6735 (warn_for_misleading_information): Declare.
6736 * c-common.h (warn_for_misleading_information): Remove.
6737 * c-identation.c (warn_for_misleading_indentation):
6738 Change declaration to take three token_indent_infos. Adjust
6739 accordingly.
6740 * c-identation.c (should_warn_for_misleading_indentation):
6741 Likewise. Bail out early if the body is a compound statement.
6742 (guard_tinfo_to_string): Define.
6743
e8fa3817
JM
67442015-07-30 Jason Merrill <jason@redhat.com>
6745
6746 * c-pretty-print.c (unary_expression) [INDIRECT_REF]: Don't print
6747 '*' for reference decay.
6748
173864e8
MP
67492015-07-30 Marek Polacek <polacek@redhat.com>
6750
6751 * c-common.c (warn_tautological_cmp): Bail for float types.
6752
f2afe6dd
MP
67532015-07-27 Marek Polacek <polacek@redhat.com>
6754
6755 PR bootstrap/67030
6756 * c-common.c (warn_tautological_cmp): Don't warn for macro expansion.
6757
05b28fd6
MP
67582015-07-27 Marek Polacek <polacek@redhat.com>
6759
6760 PR c++/66555
6761 PR c/54979
6762 * c-common.c (find_array_ref_with_const_idx_r): New function.
6763 (warn_tautological_cmp): New function.
6764 * c-common.h (warn_tautological_cmp): Declare.
6765 * c.opt (Wtautological-compare): New option.
6766
5a5062b8
MP
67672015-07-23 Marek Polacek <polacek@redhat.com>
6768
6769 * c-ubsan.c (ubsan_instrument_division): Use unshare_expr throughout.
6770 (ubsan_instrument_shift): Likewise.
6771
dc891fe7
MP
67722015-07-23 Marek Polacek <polacek@redhat.com>
6773
6774 PR sanitizer/66908
6775 * c-ubsan.c: Include gimplify.h.
6776 (ubsan_instrument_division): Unshare OP0 and OP1.
6777 (ubsan_instrument_shift): Likewise.
6778
451b5e48
MP
67792015-07-20 Marek Polacek <polacek@redhat.com>
6780 Richard Sandiford <richard.sandiford@arm.com>
6781
6782 PR c++/55095
6783 * c-common.c (c_fully_fold_internal): Warn about left shift overflows.
6784 Use EXPR_LOC_OR_LOC.
6785 (maybe_warn_shift_overflow): New function.
6786 * c-common.h (maybe_warn_shift_overflow): Declare.
6787 * c-opts.c (c_common_post_options): Set warn_shift_overflow.
6788 * c.opt (Wshift-overflow): New option.
6789
fb0b2914
ML
67902015-07-16 Martin Liska <mliska@suse.cz>
6791
6792 * c-format.c (static void check_format_info_main): Use
6793 object_allocator instead of pool_allocator.
6794 (check_format_arg): Likewise.
6795 (check_format_info_main): Likewise.
6796
903f5c23
AM
67972015-07-15 Andrew MacLeod <amacleod@redhat.com>
6798
6799 * c-opts.c: Remove multiline #include comment.
6800
026c3cfd
AH
68012015-07-12 Aldy Hernandez <aldyh@redhat.com>
6802
6803 * c-common.c: Fix double word typos.
6804
bb49ee66
EB
68052015-07-10 Eric Botcazou <ebotcazou@adacore.com>
6806
6807 * c-ada-spec.h (cpp_operation): Revert latest change.
6808 * c-ada-spec.c (print_ada_declaration): Likewise. Skip implicit
6809 constructors and destructors.
6810
1916bcb5
AM
68112015-07-09 Andrew MacLeod <amacleod@redhat.com>
6812
6813 * c-common.h: Adjust includes for flags.h changes.
6814 * stub-objc.c: Likewise.
026c3cfd 6815
a9dcd529
EB
68162015-07-08 Eric Botcazou <ebotcazou@adacore.com>
6817
6818 * c-ada-spec.h (cpp_operation): Add IS_CONSTEXPR.
6819 * c-ada-spec.c (print_ada_declaration): Skip constexpr constructors.
6820
b03b462f
JJ
68212015-07-08 Jakub Jelinek <jakub@redhat.com>
6822
6823 * c-omp.c (c_omp_declare_simd_clauses_to_numbers): If all clauses
6824 are to be removed, return NULL rather than original clauses list.
6825
c7131fb2
AM
68262015-07-07 Andrew MacLeod <amacleod@redhat.com>
6827
6828 * array-notation-common.c: Adjust includes.
6829 * c-ada-spec.c: Likewise.
6830 * c-cilkplus.c: Likewise.
6831 * c-common.h: Likewise.
6832 * c-cppbuiltin.c: Likewise.
6833 * c-dump.c: Likewise.
6834 * c-format.c: Likewise.
6835 * c-gimplify.c: Likewise.
6836 * c-indentation.c: Likewise.
6837 * c-lex.c: Likewise.
6838 * c-omp.c: Likewise.
6839 * c-opts.c: Likewise.
6840 * c-pch.c: Likewise.
6841 * c-ppoutput.c: Likewise.
6842 * c-pragma.c: Likewise.
6843 * c-pretty-print.c: Likewise.
6844 * c-semantics.c: Likewise.
6845 * c-ubsan.c: Likewise.
6846 * cilk.c: Likewise.
6847 * stub-objc.c: Likewise.
6848
2a7fb83f
EB
68492015-07-07 Eric Botcazou <ebotcazou@adacore.com>
6850
6851 * c-ada-spec.h (cpp_operation): Add IS_MOVE_CONSTRUCTOR.
6852 * c-ada-spec.c (print_ada_declaration): Skip move constructors.
6853
a03c9bf1
JM
68542015-07-01 Jason Merrill <jason@redhat.com>
6855
36a85135
JM
6856 * c-common.h (D_CXX11): Rename from D_CXX0X.
6857 (RID_FIRST_CXX11, RID_LAST_CXX11): Rename from *_CXX0X.
6858 * c-common.c: Adjust.
6859
e7fa68d5
JM
6860 * c-opts.c (c_common_post_options): Default to C++14.
6861
a03c9bf1
JM
6862 * c-opts.c (c_common_post_options): Highest ABI level is now 10.
6863
fe95b036
ESR
68642015-06-30 Edward Smith-Rowland <3dw4rd@verizon.net>
6865
6866 Implement N4197 - Adding u8 character literals
b3d5bc62 6867 * c-ada-spec.c (print_ada_macros): Treat CPP_UTF8CHAR like
a64be36b 6868 CPP_CHAR.
b3d5bc62 6869 * c-common.c (c_parse_error): Print CPP_UTF8CHAR and
a64be36b 6870 CPP_UTF8CHAR_USERDEF tokens.
b3d5bc62 6871 * c-lex.c (c_lex_with_flags): Treat CPP_UTF8CHAR_USERDEF
a64be36b
EB
6872 and CPP_UTF8CHAR tokens.
6873 (lex_charconst): Treat CPP_UTF8CHAR token.
fe95b036 6874
da2e71c9
MLI
68752015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
6876
6877 PR fortran/66605
6878 * c-common.c (do_warn_unused_parameter): Move here.
6879 * c-common.h (do_warn_unused_parameter): Declare.
6880
b155cfd9
MP
68812015-06-29 Marek Polacek <polacek@redhat.com>
6882
6883 PR c/66322
6884 * c-common.c (check_case_bounds): Add bool * parameter. Set
6885 OUTSIDE_RANGE_P.
6886 (c_add_case_label): Add bool * parameter. Pass it down to
6887 check_case_bounds.
6888 (c_do_switch_warnings): Add bool parameters. Implement -Wswitch-bool
6889 warning here.
6890 * c-common.h (c_add_case_label, c_do_switch_warnings): Update
6891 declarations.
6892
31521951
MP
68932015-06-27 Marek Polacek <polacek@redhat.com>
6894
6895 * c-common.c (check_main_parameter_types): Use VECTOR_TYPE_P
6896 or VECTOR_INTEGER_TYPE_P throughout.
6897 * c-gimplify.c: Likewise.
6898
22d03525
MP
68992015-06-26 Marek Polacek <polacek@redhat.com>
6900
6901 * array-notation-common.c (find_rank): Use INDIRECT_REF_P.
6902 * c-common.c (c_fully_fold_internal): Likewise.
6903 (c_alignof_expr): Likewise.
6904 * c-pretty-print.c (c_pretty_printer::postfix_expression): Likewise.
6905 * c-ubsan.c (ubsan_instrument_bounds): Likewise.
b1726d6c 6906 * cilk.c (create_parm_list): Likewise.
22d03525 6907
af05e6e5
MP
69082015-06-26 Marek Polacek <polacek@redhat.com>
6909
6910 * c-common.c (handle_unused_attribute): Use VAR_OR_FUNCTION_DECL_P.
6911
f0889939
AM
69122015-06-25 Andrew MacLeod <amacleod@redhat.com>
6913
6914 * c-common.c: Remove ipa-ref.h and plugin-api.h from include list.
6915 * c-gimplify.c: Likewise.
6916 * c-pragma.c: Likewise.
6917 * c-ubsan.c: Likewise.
6918 * cilk.c: Likewise.
6919
ca752f39
RS
69202015-06-25 Richard Sandiford <richard.sandiford@arm.com>
6921
6922 * c-common.c (c_type_hasher): Inherit from ggc_ptr_hash rather than
6923 ggc_hasher.
6924
16a16ec7
AM
69252015-06-25 Andrew MacLeod <amacleod@redhat.com>
6926
6927 * cilk.c: Move calls.h after tm.h in the include chain.
6928
0ae9bd27
MP
69292015-06-25 Marek Polacek <polacek@redhat.com>
6930
6931 * array-notation-common.c: Use VAR_P throughout.
6932 * c-ada-spec.c: Likewise.
6933 * c-common.c: Likewise.
6934 * c-format.c: Likewise.
6935 * c-gimplify.c: Likewise.
6936 * c-omp.c: Likewise.
6937 * c-pragma.c: Likewise.
6938 * c-pretty-print.c: Likewise.
6939 * cilk.c: Likewise.
6940
62f9079a
MP
69412015-06-25 Marek Polacek <polacek@redhat.com>
6942
6943 * cilk.c (extract_free_variables): Use is_global_var.
6944
0fa16060
RS
69452015-06-23 Richard Sandiford <richard.sandiford@arm.com>
6946
6947 * c-common.c: Don't include target-def.h.
6948
a68ae2e1
MP
69492015-06-23 Marek Polacek <polacek@redhat.com>
6950
6951 * c-common.c (warn_logical_operator): Use tree_int_cst_equal
6952 when comparing INTEGER_CSTs.
6953
c6a2f2d9
PMR
69542015-06-22 Pierre-Marie de Rodat <derodat@adacore.com>
6955
6956 * c-ada-spec.h (cpp_operation): Add HAS_DEPENDENT_TEMPLATE_ARGS.
6957 * c-ada-spec.c (collect_ada_nodes): Skip NAMESPACE_DECL
6958 (dump_ada_template): Skip partially specialized types.
6959
6b4db501
MM
69602015-06-22 Mikhail Maltsev <maltsevm@gmail.com>
6961
6962 * c-common.c (scalar_to_vector): Use std::swap instead of manually
6963 swapping.
6964
abb226c9
AM
69652015-06-17 Andrew MacLeod <amacleod@redhat.com>
6966
6967 * array-notation-common.c: Do not include input.h, line-map.h or is-a.h.
6968 * c-ada-spec.c: Likewise.
6969 * c-cilkplus.c: Likewise.
6970 * c-common.c: Likewise.
6971 * c-common.h: Likewise.
6972 * c-cppbuiltin.c: Likewise.
6973 * c-dump.c: Likewise.
6974 * c-format.c: Likewise.
6975 * c-gimplify.c: Likewise.
6976 * c-indentation.c: Likewise.
6977 * c-lex.c: Likewise.
6978 * c-omp.c: Likewise.
6979 * c-opts.c: Likewise.
6980 * c-pch.c: Likewise.
6981 * c-ppoutput.c: Likewise.
6982 * c-pragma.c: Likewise.
6983 * c-pretty-print.c: Likewise.
6984 * c-semantics.c: Likewise.
6985 * c-ubsan.c: Likewise.
6986 * cilk.c: Likewise.
6987 * stub-objc.c: Likewise.
6988
076fecad
PP
69892015-06-13 Patrick Palka <ppalka@gcc.gnu.org>
6990
6991 PR c++/65168
6992 * c-common.c (c_common_truthvalue_conversion): Warn when
6993 converting an address of a reference to a truth value.
6994
13fdf2e2
AM
69952015-06-08 Andrew MacLeod <amacleod@redhat.com>
6996
6997 * array-notation-common.c : Adjust include files.
6998 * c-ada-spec.c : Likewise.
6999 * c-cilkplus.c : Likewise.
7000 * c-common.c : Likewise.
7001 * c-common.h : Likewise.
7002 * c-cppbuiltin.c : Likewise.
7003 * c-dump.c : Likewise.
7004 * c-format.c : Likewise.
7005 * c-gimplify.c : Likewise.
7006 * c-indentation.c : Likewise.
7007 * c-lex.c : Likewise.
7008 * c-omp.c : Likewise.
7009 * c-opts.c : Likewise.
7010 * c-pch.c : Likewise.
7011 * c-ppoutput.c : Likewise.
7012 * c-pragma.c : Likewise.
7013 * c-pretty-print.c : Likewise.
7014 * c-semantics.c : Likewise.
7015 * c-ubsan.c : Likewise.
7016 * cilk.c : Likewise.
7017 * stub-objc.c : Likewise.
7018
a1661b90
MP
70192015-06-08 Marek Polacek <polacek@redhat.com>
7020
7021 PR c/66415
7022 * c-format.c (location_from_offset): Return LOC if LINE is null.
7023
d7438551
AH
70242015-06-05 Aldy Hernandez <aldyh@redhat.com>
7025
7026 * c-common.h (c_parse_final_cleanups): New prototype.
7027 * c-opts.c (c_common_parse_file): Call c_parse_final_cleanups.
7028
b3d5bc62
JJ
70292015-06-04 Sriraman Tallam <tmsriram@google.com>
7030
7031 * c-common.c (noplt): New attribute.
7032 (handle_noplt_attribute): New handler.
7033
ecb9f223
AM
70342015-06-04 Andrew MacLeod <amacleod@redhat.com>
7035
7036 * array-notation-common.c: Adjust includes for restructured coretypes.h.
7037 * c-ada-spec.c: Likewise.
7038 * c-cilkplus.c: Likewise.
7039 * c-common.c: Likewise.
7040 * c-common.h: Likewise.
7041 * c-cppbuiltin.c: Likewise.
7042 * c-dump.c: Likewise.
7043 * c-format.c: Likewise.
7044 * c-gimplify.c: Likewise.
7045 * c-indentation.c: Likewise.
7046 * c-lex.c: Likewise.
7047 * c-omp.c: Likewise.
7048 * c-opts.c: Likewise.
7049 * c-pch.c: Likewise.
7050 * c-ppoutput.c: Likewise.
7051 * c-pragma.c: Likewise.
7052 * c-pretty-print.c: Likewise.
7053 * c-semantics.c: Likewise.
7054 * c-ubsan.c: Likewise.
7055 * cilk.c: Likewise.
7056 * stub-objc.c: Likewise.
7057
6ac48155
DM
70582015-06-02 David Malcolm <dmalcolm@redhat.com>
7059
7060 PR c/66220:
7061 * c-indentation.c (should_warn_for_misleading_indentation): Use
7062 expand_location rather than expand_location_to_spelling_point.
7063 Don't warn if the guarding statement is more indented than the
7064 next/body stmts.
7065
773ce42e
DM
70662015-06-02 David Malcolm <dmalcolm@redhat.com>
7067
7068 * c-indentation.c (warn_for_misleading_indentation): Bail out
7069 immediately if -Wmisleading-indentation isn't enabled.
7070
4fef8379
ML
70712015-06-01 Martin Liska <mliska@suse.cz>
7072
7073 * c-format.c (check_format_arg):Use new type-based pool allocator.
7074 (check_format_info_main) Likewise.
7075
1edfb384
EB
70762015-05-31 Eric Botcazou <ebotcazou@adacore.com>
7077
7078 * c-ada-spec.c (is_tagged_type): Test for TYPE_METHODS on main variant.
7079 (has_nontrivial_methods): Likewise.
7080
9677ef52
MP
70812015-05-25 Marek Polacek <polacek@redhat.com>
7082
7083 * c-ubsan.c (ubsan_instrument_shift): Use type0.
7084
fd5c817a
MP
70852015-05-22 Marek Polacek <polacek@redhat.com>
7086
7087 PR c/47043
7088 * c-common.c (handle_deprecated_attribute): Allow CONST_DECL.
7089
a2f45fe6 70902015-05-21 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
581edfa3
TS
7091
7092 * c-cppbuiltin.c (c_cpp_builtins): Use if instead of #if with
7093 STACK_GROWS_DOWNWARD.
7094
a2f45fe6 70952015-05-21 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
62f9f30b
TS
7096
7097 * c-cppbuiltin.c (c_cpp_builtins): Check the value of
7098 STACK_GROWS_DOWNWARD rather than if it is defined.
7099
0fee2ac2 71002015-05-21 Manuel López-Ibáñez <manu@gcc.gnu.org>
b1726d6c 7101
0fee2ac2
MLI
7102 PR c/52952
7103 * c-format.c (location_column_from_byte_offset): New.
7104 (location_from_offset): New.
7105 (struct format_wanted_type): Add offset_loc field.
7106 (check_format_info): Move handling of location for extra arguments
7107 closer to the point of warning.
7108 (check_format_info_main): Pass the result of location_from_offset
7109 to warning_at.
7110 (format_type_warning): Pass the result of location_from_offset
7111 to warning_at.
7112
cf4ef6f7
MP
71132015-05-20 Marek Polacek <polacek@redhat.com>
7114
7115 * c-omp.c (check_omp_for_incr_expr): Use BINARY_CLASS_P.
7116
3a65ee74
MP
71172015-05-20 Marek Polacek <polacek@redhat.com>
7118
7119 * c-ada-spec.c (dump_sloc): Use DECL_P.
7120
21b634ae
MP
71212015-05-20 Marek Polacek <polacek@redhat.com>
7122
7123 * c-pragma.c: Use VAR_OR_FUNCTION_DECL_P throughout.
7124 * c-common.c: Likewise.
7125
0e50b624
DM
71262015-05-19 David Malcolm <dmalcolm@redhat.com>
7127
7128 * c-common.h (fe_file_change): Strengthen param from
7129 const line_map * to const line_map_ordinary *.
7130 (pp_file_change): Likewise.
7131 * c-lex.c (fe_file_change): Likewise.
7132 (cb_define): Use linemap_check_ordinary when invoking
7133 SOURCE_LINE.
7134 (cb_undef): Likewise.
7135 * c-opts.c (c_finish_options): Use linemap_check_ordinary when
7136 invoking cb_file_change.
7137 (c_finish_options): Likewise.
7138 (push_command_line_include): Likewise.
7139 (cb_file_change): Strengthen param "new_map" from
7140 const line_map * to const line_map_ordinary *.
7141 * c-ppoutput.c (cb_define): Likewise for local "map".
7142 (pp_file_change): Likewise for param "map" and local "from".
7143
fab27f52
MM
71442015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
7145
7146 * c-common.c (shorten_compare): Use std::swap instead of explicit swaps.
7147
2fe1d762
TV
71482015-05-18 Tom de Vries <tom@codesourcery.com>
7149
7150 * c-common.c (build_va_arg_1): New function.
7151 (build_va_arg): Add address operator to va_list operand if necessary.
7152
7a37fa90
MM
71532015-05-15 Mikhail Maltsev <maltsevm@gmail.com>
7154
7155 PR c/48956
7156 * c-common.c (int_safely_convertible_to_real_p): Define.
7157 (unsafe_conversion_p): Check conversions involving complex types.
7158 (conversion_warning): Add new warning message for conversions which
7159 discard imaginary component.
7160 * c-common.h: (enum conversion_safety): Add new enumerator for such
7161 conversions.
7162
3aa3c9fc
MP
71632015-05-14 Marek Polacek <polacek@redhat.com>
7164
7165 PR c/66066
7166 PR c/66127
7167 * c-common.c (c_fully_fold): Pass false down to c_fully_fold_internal.
7168 (c_fully_fold_internal): Fold C_MAYBE_CONST_EXPRs with
7169 C_MAYBE_CONST_EXPR_INT_OPERANDS set. Add FOR_INT_CONST argument and
7170 use it. If FOR_INT_CONST, require that all evaluated operands be
7171 INTEGER_CSTs.
7172
c3388e62
DM
71732015-05-12 David Malcolm <dmalcolm@redhat.com>
7174
7175 * c-common.h (warn_for_misleading_indentation): New prototype.
7176 * c-indentation.c: New file.
7177 * c.opt (Wmisleading-indentation): New option.
7178
c7b38fd5
TV
71792015-05-12 Tom de Vries <tom@codesourcery.com>
7180
7181 PR tree-optimization/66010
7182 * c-common.c (build_va_arg): Don't mark ap addressable unless necessary.
7183
381bf11e
JM
71842015-05-09 Jason Merrill <jason@redhat.com>
7185
edff0c06
JM
7186 * c-opts.c (c_common_post_options): Also clear
7187 cpp_opts->cpp_warn_cxx11_compat.
7188
129211bc
JM
7189 * c-common.h (enum cxx_dialect): Add cxx_unset.
7190 * c-common.c (cxx_dialect): Initialize to cxx_unset.
7191 * c-opts.c (c_common_post_options): Set C++ dialect to C++98 if unset.
7192
381bf11e
JM
7193 * c.opt (std=c++14): Remove Undocumented flag and experimental warning.
7194 (std=gnu++0x): Mark as Undocumented.
7195 (std=gnu++1y): Add deprecated message.
7196
fe191308
JM
71972015-05-08 Jason Merrill <jason@redhat.com>
7198
765189ff
JM
7199 * c.opt (Wc++11-compat): Make primary. Rename var warn_cxx11_compat.
7200 * c-opts.c: Adjust.
7201
fe191308
JM
7202 * c.opt (Wc++0x-compat): Also set cpp_warn_cxx11_compat.
7203
755e528f
MP
72042015-05-08 Marek Polacek <polacek@redhat.com>
7205
7206 PR c/64918
7207 * c.opt (Woverride-init-side-effects): New option.
7208
0173bd2a
MP
72092015-05-07 Marek Polacek <polacek@redhat.com>
7210
7211 PR c/65179
7212 * c-common.c (c_fully_fold_internal): Warn when left shifting a
7213 negative value.
7214 * c.opt (Wshift-negative-value): New option.
7215 * c-opts.c (c_common_post_options): Set warn_shift_negative_value
7216 when -Wextra and C99/C++11 mode.
7217
e0f0d3b9
MP
72182015-05-07 Marek Polacek <polacek@redhat.com>
7219 Martin Uecker <uecker@eecs.berkeley.edu>
7220
7221 * c-ubsan.c (ubsan_instrument_bounds): Don't skip instrumenting
7222 flexible member array-like members if SANITIZE_BOUNDS_STRICT.
7223
8243e2a9
JM
72242015-05-05 Jason Merrill <jason@redhat.com>
7225
7226 * c.opt (Wterminate): New.
7227
577cd070
MP
72282015-04-30 Marek Polacek <polacek@redhat.com>
7229
7230 * c-common.c (maybe_warn_bool_compare): When comparing with 0/1,
7231 require that the non-constant be of a boolean type.
7232
0373796b
JT
72332015-04-29 Josh Triplett <josh@joshtriplett.org>
7234
e0f0d3b9
MP
7235 * c-common.c (handle_section_attribute): Refactor to reduce
7236 nesting and distinguish between error cases.
0373796b 7237
716c0ba6
MP
72382015-04-29 Marek Polacek <polacek@redhat.com>
7239
7240 PR c/64610
7241 * c-common.c (maybe_warn_bool_compare): Warn when comparing a boolean
7242 with 0/1.
7243
8848828b
JJ
72442015-04-29 Jakub Jelinek <jakub@redhat.com>
7245
7246 * c-common.h (omp_clause_mask): Unconditionally define as a class.
7247 Use uint64_t instead of unsigned HOST_WIDE_INT and 64 instead of
7248 HOST_BITS_PER_WIDE_INT.
7249
ecd0e562
TV
72502015-04-28 Tom de Vries <tom@codesourcery.com>
7251
7252 PR tree-optimization/65887
7253 * c-common.c (build_va_arg): Mark va_arg ap argument as addressable.
7254
2a877204 72552015-04-28 Eric Botcazou <ebotcazou@adacore.com>
e0f0d3b9 7256 Pierre-Marie de Rodat <derodat@adacore.com>
2a877204
EB
7257
7258 * c-ada-spec.c (in_function): Delete.
7259 (dump_generic_ada_node): Do not change in_function and remove the
7260 redundant code dealing with it.
7261 (print_ada_declaration): Do not change in_function. Use INDENT_INCR.
7262 (print_ada_methods): Output the static member functions in a nested
7263 package after the regular methods as well as associated renamings.
7264
4853031e
MP
72652015-04-24 Marek Polacek <polacek@redhat.com>
7266
7267 PR c/65830
7268 * c-common.c (c_fully_fold_internal): Use OPT_Wshift_count_negative
7269 and OPT_Wshift_count_overflow.
7270
8c2b7f79
MP
7271 PR c/63357
7272 * c-common.c (warn_logical_operator): Warn if the operands have the
7273 same expressions.
7274
b8787813
MP
72752015-04-24 Marek Polacek <polacek@redhat.com>
7276
7277 PR c/61534
7278 * c-common.c (warn_logical_operator): Bail if either operand comes
7279 from a macro expansion.
7280
8fba1830
BRF
72812015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
7282
7283 PR target/55143
7284 * c-common.c (c_default_pointer_mode): Add definition.
7285 * c-common.h (c_default_pointer_mode): Add declaration.
7286
17958621
JJ
72872015-03-11 Jakub Jelinek <jakub@redhat.com>
7288
7289 * c-common.c (c_common_nodes_and_builtins): Don't call xstrdup
7290 on record_builtin_type argument.
7291
7ccb1a11
JJ
72922015-03-10 Jakub Jelinek <jakub@redhat.com>
7293
7294 PR c/65120
7295 * c-common.c (warn_logical_not_parentheses): Don't warn for
7296 !x == 0 or !x != 0.
7297
04fd785e
MP
72982015-03-07 Marek Polacek <polacek@redhat.com>
7299
7300 PR sanitizer/65280
7301 * c-ubsan.c (ubsan_instrument_bounds): Check for COMPONENT_REF
7302 before trying to figure out whether we have a flexible array member.
7303
a4e26206 73042015-03-06 Eric Botcazou <ebotcazou@adacore.com>
8e745a17 7305 Jonathan Wakely <jwakely.gcc@gmail.com>
a4e26206
EB
7306
7307 * c-ada-spec.c (dump_ada_double_name): Fix pasto.
7308
0d2489f4
EB
73092015-03-05 Eric Botcazou <ebotcazou@adacore.com>
7310
7311 PR ada/65319
7312 * c-ada-spec.c (print_destructor): Remove obsolete code.
7313
83ed54d7
EB
73142015-03-01 Eric Botcazou <ebotcazou@adacore.com>
7315
7316 * c-ada-spec.c (is_tagged_type): Add guard for DECL_VINDEX.
7317 (dump_template_types): Adjust DECL_TEMPLATE_INSTANTIATIONS and
7318 DECL_TEMPLATE_RESULT emulations.
7319 (dump_ada_template)): Add guard for TYPE_METHODS.
7320
7631f0e2
MP
73212015-02-27 Marek Polacek <polacek@redhat.com>
7322
7323 PR c/65040
7324 * c.opt (Wformat-signedness): Don't enable by -Wformat=2.
7325
d1783ae5
KT
73262015-02-27 Kai Tietz <ktietz@redhat.com>
7327
7328 PR c/35330
7329 * c-pragma.c (handle_pragma_weak): Do not try to create
7330 weak/alias of declarations not being function, or variable
7331 declarations.
7332
56a9f6bc
TS
73332015-02-24 Thomas Schwinge <thomas@codesourcery.com>
7334
7335 PR libgomp/64625
7336 * c-common.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
7337 Remove macros.
7338 (DEF_FUNCTION_TYPE_VAR_7, DEF_FUNCTION_TYPE_VAR_11): New macros.
7339
3d5cb23d
MP
73402015-02-16 Marek Polacek <polacek@redhat.com>
7341
7342 PR c/65066
7343 * c-format.c (check_format_types): Handle null param.
7344
fa008882
MP
73452015-02-13 Marek Polacek <polacek@redhat.com>
7346
7347 PR c/65040
7348 * c-format.c (check_format_types): Don't warn about different
7349 signedness if the original value is in the range of WANTED_TYPE.
7350
785f21af
JM
73512015-02-12 Jason Merrill <jason@redhat.com>
7352
7353 PR c++/64956
7354 * c-opts.c (c_common_post_options): Change flag_abi_version from 0
7355 to the current highest version.
7356 * c-cppbuiltin.c (c_cpp_builtins): Assert that it isn't 0.
7357
4886ec8e
JJ
73582015-02-04 Jakub Jelinek <jakub@redhat.com>
7359
7360 PR c/64824
7361 PR c/64868
7362 * c-omp.c (c_finish_omp_atomic): Use TRUNC_DIV_EXPR
7363 instead of RDIV_EXPR. Use build_binary_op instead of
7364 build2_loc.
7365
40fecdd6
JM
73662015-01-30 Joseph Myers <joseph@codesourcery.com>
7367
7368 * c-opts.c, c-pch.c, cppspec.c: All callers of fatal_error changed
7369 to pass input_location as first argument.
7370
a0c88d06
TV
73712015-01-23 Tom de Vries <tom@codesourcery.com>
7372
7373 PR libgomp/64672
7374 * c.opt (fopenacc): Mark as LTO option.
7375
1506ae0e
TV
73762015-01-23 Tom de Vries <tom@codesourcery.com>
7377
7378 PR libgomp/64707
7379 * c.opt (fopenmp): Mark as LTO option.
7380
31be63ab
JJ
73812015-01-21 Jakub Jelinek <jakub@redhat.com>
7382
7383 PR c/63307
b1726d6c 7384 * cilk.c (fill_decls_vec): Only put decls into vector v.
31be63ab
JJ
7385 (compare_decls): Fix up formatting.
7386
73872015-01-21 Igor Zamyatin <igor.zamyatin@intel.com>
7388
7389 PR c/63307
7390 * cilk.c: Include vec.h.
7391 (struct cilk_decls): New structure.
7392 (wrapper_parm_cb): Split this function to...
7393 (fill_decls_vec): ...this...
7394 (create_parm_list): ...and this.
7395 (compare_decls): New function.
7396 (for_local_cb): Remove.
7397 (wrapper_local_cb): Ditto.
7398 (build_wrapper_type): For now first traverse and fill vector of
7399 declarations then sort it and then deal with sorted vector.
7400 (cilk_outline): Ditto.
7401 (declare_one_free_variable): Ditto.
7402
6875457f
JM
74032015-01-21 Jason Merrill <jason@redhat.com>
7404
7405 PR c++/64629
7406 * c-format.c (check_format_arg): Call decl_constant_value.
7407
185c9e56
ML
74082015-01-19 Martin Liska <mliska@suse.cz>
7409
7410 * c-common.c (handle_noicf_attribute): New function.
7411
41dbbb37
TS
74122015-01-15 Thomas Schwinge <thomas@codesourcery.com>
7413 Bernd Schmidt <bernds@codesourcery.com>
7414 James Norris <jnorris@codesourcery.com>
7415 Cesar Philippidis <cesar@codesourcery.com>
7416 Ilmir Usmanov <i.usmanov@samsung.com>
7417 Jakub Jelinek <jakub@redhat.com>
7418
7419 * c.opt (fopenacc): New option.
7420 * c-cppbuiltin.c (c_cpp_builtins): Conditionally define _OPENACC.
7421 * c-common.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
7422 New macros.
7423 * c-common.h (c_finish_oacc_wait): New prototype.
7424 * c-omp.c: Include "omp-low.h" and "gomp-constants.h".
7425 (c_finish_oacc_wait): New function.
7426 * c-pragma.c (oacc_pragmas): New variable.
7427 (c_pp_lookup_pragma, init_pragma): Handle it.
7428 * c-pragma.h (enum pragma_kind): Add PRAGMA_OACC_CACHE,
7429 PRAGMA_OACC_DATA, PRAGMA_OACC_ENTER_DATA, PRAGMA_OACC_EXIT_DATA,
7430 PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP, PRAGMA_OACC_PARALLEL,
7431 PRAGMA_OACC_UPDATE, PRAGMA_OACC_WAIT.
7432 (enum pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_ASYNC,
7433 PRAGMA_OACC_CLAUSE_AUTO, PRAGMA_OACC_CLAUSE_COLLAPSE,
7434 PRAGMA_OACC_CLAUSE_COPY, PRAGMA_OACC_CLAUSE_COPYIN,
7435 PRAGMA_OACC_CLAUSE_COPYOUT, PRAGMA_OACC_CLAUSE_CREATE,
7436 PRAGMA_OACC_CLAUSE_DELETE, PRAGMA_OACC_CLAUSE_DEVICE,
7437 PRAGMA_OACC_CLAUSE_DEVICEPTR, PRAGMA_OACC_CLAUSE_FIRSTPRIVATE,
7438 PRAGMA_OACC_CLAUSE_GANG, PRAGMA_OACC_CLAUSE_HOST,
7439 PRAGMA_OACC_CLAUSE_IF, PRAGMA_OACC_CLAUSE_NUM_GANGS,
7440 PRAGMA_OACC_CLAUSE_NUM_WORKERS, PRAGMA_OACC_CLAUSE_PRESENT,
7441 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPY,
7442 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPYIN,
7443 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPYOUT,
7444 PRAGMA_OACC_CLAUSE_PRESENT_OR_CREATE, PRAGMA_OACC_CLAUSE_PRIVATE,
7445 PRAGMA_OACC_CLAUSE_REDUCTION, PRAGMA_OACC_CLAUSE_SELF,
7446 PRAGMA_OACC_CLAUSE_SEQ, PRAGMA_OACC_CLAUSE_VECTOR,
7447 PRAGMA_OACC_CLAUSE_VECTOR_LENGTH, PRAGMA_OACC_CLAUSE_WAIT,
7448 PRAGMA_OACC_CLAUSE_WORKER.
7449
3f8257db 74502015-01-14 Marcos Diaz <marcos.diaz@tallertechnologies.com>
5434dc07
MD
7451
7452 * c-cppbuiltin.c (c_cpp_builtins): New cpp define __SSP_EXPLICIT__
7453 for the new option fstack-protector_explicit.
7454 * c-common.c (c_common_attribute_table): Add stack_protect attribute.
7455 (handle_stack_protect_attribute): New function.
7456
3f8257db 74572015-01-13 Martin Uecker <uecker@eecs.berkeley.edu>
de1b5c17
MU
7458
7459 * c.opt: New option -Warray-bounds=.
7460
adfac8df
JJ
74612015-01-09 Michael Collison <michael.collison@linaro.org>
7462
7463 * array-notation-common.c: Include hash-set.h, machmode.h,
7464 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
7465 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
7466 * c-ada-spec.c: Ditto.
7467 * c-cilkplus.c: Ditto.
7468 * c-common.c: Include input.h due to flattening of tree.h.
7469 Define macro GCC_C_COMMON_C.
7470 * c-common.h: Flatten tree.h header files into c-common.h.
7471 Remove include of tree-core.h.
7472 * c-cppbuiltin.c: Include hash-set.h, machmode.h,
7473 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
7474 fold-const.h, wide-int.h, and inchash.h due to
7475 flattening of tree.h.
7476 * c-dump.c: Ditto.
7477 * c-format.c: Flatten tree.h header files into c-common.h.
7478 * c-cppbuiltin.c: Include hash-set.h, machmode.h,
7479 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
7480 fold-const.h, wide-int.h, and inchash.h due to
7481 flattening of tree.h.
7482 * c-dump.c: Include hash-set.h, machmode.h,
7483 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
7484 fold-const.h, wide-int.h, and inchash.h due to
7485 flattening of tree.h.
7486 * c-format.c: Include hash-set.h, machmode.h,
7487 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
7488 fold-const.h, wide-int.h, inchash.h and real.h due to
7489 flattening of tree.h.
7490 * c-gimplify.c: Include hash-set.h, machmode.h,
7491 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
7492 fold-const.h, wide-int.h, and inchash.h due to
7493 flattening of tree.h.
7494 * cilk.c: Ditto.
7495 * c-lex.c: Ditto.
7496 * c-omp.c: Ditto.
7497 * c-opts.c: Ditto.
7498 * c-pch.c: Ditto.
7499 * c-ppoutput.c: Ditto.
7500 * c-pragma.c: Ditto.
7501 * c-pretty-print.c: Ditto.
7502 * c-semantics.c: Ditto.
7503 * c-ubsan.c: Ditto.
7504 * stub-objc.c: Ditto.
7505
f5481fc4
JM
75062015-01-08 Jason Merrill <jason@redhat.com>
7507
7508 * c-ubsan.c (ubsan_maybe_instrument_array_ref): Use
7509 do_ubsan_in_current_function.
7510 (ubsan_maybe_instrument_reference_or_call): Likewise.
7511 * c-ubsan.h: Declare it.
7512
de35aa66
MS
75132015-01-08 Mike Stump <mikestump@comcast.net>
7514
7515 * c-common.c (c_common_attribute_table): Add no_sanitize_thread.
7516
4a9a42ab
MP
75172015-01-07 Marek Polacek <polacek@redhat.com>
7518
7519 PR c/64440
7520 * c-common.c (c_fully_fold_internal): Warn for division and modulo
7521 if orig_op1 isn't INTEGER_CST, op1 is INTEGER_CST and is zero.
7522
2f42e5de
TS
75232015-01-05 Trevor Saunders <tsaunders@mozilla.com>
7524
7525 PR c++/31397
7526 * c.opt (Wsuggest-override): New option.
7527
5624e564
JJ
75282015-01-05 Jakub Jelinek <jakub@redhat.com>
7529
7530 Update copyright years.
7531
5bd012f8
MP
75322015-01-05 Marek Polacek <polacek@redhat.com>
7533
7534 PR c/64423
7535 * c-common.c (warn_array_subscript_with_type_char): Add location_t
7536 parameter. Use it.
7537 * c-common.h (warn_array_subscript_with_type_char): Update
7538 declaration.
7539
a7fa8d18
ESR
75402014-12-20 Edward Smith-Rowland <3dw4rd@verizon.net>
7541
7542 * c-cppbuiltin.c (__cpp_sized_deallocation): Uncomment and move macro.
7543 Control macro with flag_sized_deallocation.
7544
3f8257db 75452014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
768952be
MU
7546
7547 * c.opt (Wdiscarded-array-qualifiers): New option.
7548
1f8d3e84
JJ
75492014-12-19 Jakub Jelinek <jakub@redhat.com>
7550
7551 PR preprocessor/63831
7552 * c-cppbuiltin.c (c_cpp_builtins): Don't define __has_attribute
7553 and __has_cpp_attribute here.
7554 * c-ppoutput.c (init_pp_output): Set cb->has_attribute to
7555 c_common_has_attribute.
7556 * c-common.h (c_common_has_attribute): New prototype.
7557 * c-lex.c (init_c_lex): Set cb->has_attribute to
7558 c_common_has_attribute instead of cb_has_attribute.
7559 (get_token_no_padding): New function.
7560 (cb_has_attribute): Renamed to ...
7561 (c_common_has_attribute): ... this. No longer static. Use
7562 get_token_no_padding, require ()s, don't build TREE_LIST
7563 unnecessarily, fix up formatting, adjust diagnostics, call
7564 init_attributes.
7565
20b06add
JM
75662014-12-15 Jason Merrill <jason@redhat.com>
7567
7568 * c.opt (-fsized-deallocation, -Wc++14-compat): New.
7569 (-Wsized-deallocation): New.
7570 * c-opts.c (c_common_post_options): -fsized-deallocation defaults
7571 to on in C++14 and up.
7572
94a073b2
JM
75732014-12-11 Jason Merrill <jason@redhat.com>
7574
acaa5911
JM
7575 * c-cppbuiltin.c (c_cpp_builtins): Enable C++14 __cpp_constexpr.
7576
94a073b2
JM
7577 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_runtime_arrays if
7578 we aren't complaining about VLAs.
7579
7fb66c15
MP
75802014-12-06 Marek Polacek <polacek@redhat.com>
7581
7582 PR tree-optimization/64183
7583 * c-gimplify.c (c_gimplify_expr): Don't convert the RHS of a
7584 shift-expression if it is integer_type_node. Use types_compatible_p.
7585
b731b390
JJ
75862014-11-29 Jakub Jelinek <jakub@redhat.com>
7587
7588 * c-common.c (convert_vector_to_pointer_for_subscript): Remove NULL
7589 last argument from create_tmp_var_raw and create_tmp_var calls.
7590 * cilk.c (gimplify_cilk_spawn): Likewise.
7591 * c-omp.c (c_finish_omp_atomic): Likewise.
7592
6a4da643
MP
75932014-11-28 Marek Polacek <polacek@redhat.com>
7594
7595 * c-ubsan.c (ubsan_instrument_shift): Use op1_utype for MINUS_EXPR
7596 instead of unsigned_type_node.
7597
541e35a6
MP
75982014-11-28 Marek Polacek <polacek@redhat.com>
7599
7600 PR c/63862
7601 * c-ubsan.c (ubsan_instrument_shift): Change the type of a MINUS_EXPR
7602 to op1_utype.
7603 * c-gimplify.c (c_gimplify_expr): Convert right operand of a shift
7604 expression to unsigned_type_node.
7605
dcc97066
MW
76062014-11-20 Mark Wielaard <mjw@redhat.com>
7607
7608 PR debug/38757
7609 * c-opts.c (set_std_c89): Set lang_hooks.name.
7610 (set_std_c99): Likewise.
7611 (set_std_c11): Likewise.
7612 (set_std_cxx98): Likewise.
7613 (set_std_cxx11): Likewise.
7614 (set_std_cxx14): Likewise.
7615 (set_std_cxx1z): Likewise.
7616
aa7da51a
JJ
76172014-11-21 Jakub Jelinek <jakub@redhat.com>
7618
7619 PR target/63764
7620 * c-common.h (convert_vector_to_pointer_for_subscript): Change
7621 return type to bool.
009a3480 7622 * c-common.c: Include gimple-expr.h.
aa7da51a
JJ
7623 (convert_vector_to_pointer_for_subscript): Change return type to
7624 bool. If *vecp is not lvalue_p and has VECTOR_TYPE, return true
7625 and copy it into a TARGET_EXPR and use that instead of *vecp
7626 directly.
7627
538dd0b7
DM
76282014-11-19 David Malcolm <dmalcolm@redhat.com>
7629
7630 Merger of git branch "gimple-classes-v2-option-3".
7631 * ChangeLog.gimple-classes: New.
7632 * c-gimplify.c (add_block_to_enclosing): Strengthen local "stack"
7633 from being just a vec<gimple> to a vec<gbind *>.
7634
c39a5e99
JJ
76352014-11-18 Jakub Jelinek <jakub@redhat.com>
7636
7637 PR sanitizer/63813
7638 * c-ubsan.c (ubsan_maybe_instrument_reference_or_call): Change type
7639 argument to ptype, set type to TREE_TYPE (ptype). Don't call
7640 get_pointer_alignment for non-pointers. Use ptype, or if it is
7641 reference type, corresponding pointer type, as type of kind
7642 argument.
7643 (ubsan_maybe_instrument_reference,
7644 ubsan_maybe_instrument_member_call): Adjust callers.
7645
8537a4a9
MP
76462014-11-15 Marek Polacek <polacek@redhat.com>
7647
7648 PR middle-end/63884
7649 * array-notation-common.c (is_sec_implicit_index_fn): Return false
7650 for NULL fndecl.
7651 (extract_array_notation_exprs): Return for NULL node.
7652
2079956a
JM
76532014-11-12 Joseph Myers <joseph@codesourcery.com>
7654
7655 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Define and
7656 undefine __NO_MATH_ERRNO__ based on changes to -fmath-errno state.
7657
1304953e
JJ
76582014-11-12 Jakub Jelinek <jakub@redhat.com>
7659
7660 PR c/59708
7661 * c-common.c (check_builtin_function_arguments): Handle
7662 BUILT_IN_{ADD,SUB,MUL}_OVERFLOW.
7663
e5e44252
AK
76642014-11-10 Andi Kleen <ak@linux.intel.com>
7665
7666 PR c/60804
7667 * c-common.h (check_no_cilk): Declare.
7668 * cilk.c (get_error_location): New function.
7669 (check_no_cilk): Dito.
7670
e64b984d
AK
76712014-11-10 Andi Kleen <ak@linux.intel.com>
7672
7673 * cilk.c (recognize_spawn): Use expression location
7674 for error message.
7675
13c21655
PC
76762014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
7677
7678 * c.opt ([Wshift-count-negative, Wshift-count-overflow]): Add.
7679
42fd12b1
ESR
76802014-11-10 Edward Smith-Rowland <3dw4rd@verizon.net>
7681
7682 * c-cppbuiltin.c (__has_attribute, __has_cpp_attribute): New macros;
7683 (__cpp_rtti, __cpp_exceptions): New macros for C++98;
7684 (__cpp_range_based_for, __cpp_initializer_lists,
7685 __cpp_delegating_constructors, __cpp_nsdmi,
7686 __cpp_inheriting_constructors, __cpp_ref_qualifiers): New macros
7687 for C++11; (__cpp_attribute_deprecated): Remove in favor of
7688 __has_cpp_attribute.
7689 * c-lex.c (cb_has_attribute): New callback CPP function;
7690 (init_c_lex): Set has_attribute callback.
7691
6f450181
RB
76922014-11-04 Richard Biener <rguenther@suse.de>
7693
7694 * c-common.c (shorten_compare): Do not shorten mixed
7695 DFP and non-DFP compares.
7696
26f0e1d6
ESR
76972014-11-01 Edward Smith-Rowland <3dw4rd@verizon.net>
7698
7699 * g++.dg/cpp1y/feat-cxx11.C: Commentary and rearrangement of tests.
7700 * g++.dg/cpp1y/feat-cxx11-neg.C: Add aggregate NSDMI test.
7701 Commentary and rearrangement of tests.
7702 * g++.dg/cpp1y/feat-cxx14.C: Enable aggregate NSDMI test.
7703 Commentary and rearrangement of tests.
ab20d992 7704 * g++.dg/cpp1y/feat-cxx98-neg.C: Ditto.
26f0e1d6
ESR
7705 * g++.dg/cpp1y/feat-cxx98.C: Commentary.
7706
ef4bddc2
RS
77072014-10-29 Richard Sandiford <richard.sandiford@arm.com>
7708
7709 * c-common.c, c-common.h, c-cppbuiltin.c, c-lex.c: Remove redundant
7710 enum from machine_mode.
7711
c582198b
AM
77122014-10-28 Andrew MacLeod <amacleod@redhat.com>
7713
adfac8df
JJ
7714 * c-common.c: Adjust include files.
7715 * c-gimplify.c: Ditto.
7716 * cilk.c: Ditto.
7717 * c-pragma.c: Ditto.
7718 * c-ubsan.c: Ditto.
c582198b 7719
60393bbc
AM
77202014-10-27 Andrew MacLeod <amacleod@redhat.com>
7721
7722 * c-gimplify.c: Adjust include files.
7723
d723bb7c
MLI
77242014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
7725
7726 PR c++/53061
7727 * c-opts.c (c_common_diagnostics_set_defaults): Renamed from
7728 c_common_initialize_diagnostics.
7729 * c-common.h: Likewise.
7730
90f3520e
MP
77312014-10-24 Marek Polacek <polacek@redhat.com>
7732
7733 PR c/56980
7734 * c-pretty-print.c (c_pretty_printer::simple_type_specifier): Don't
7735 print "struct"/"union"/"enum" for typedefed names.
7736
59d7607a
MP
77372014-10-23 Marek Polacek <polacek@redhat.com>
7738
7739 * c-ubsan.c (ubsan_instrument_shift): Perform the MINUS_EXPR
7740 in unsigned type.
7741
d95a2703
JJ
77422014-10-22 Jakub Jelinek <jakub@redhat.com>
7743 Yury Gribov <y.gribov@samsung.com>
7744
7745 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
7746 ubsan_instrument_vla): Check bits in flag_sanitize_recover bitmask
7747 instead of flag_sanitize_recover as bool flag.
7748
8e6ef852
KY
77492014-10-21 Kirill Yukhin <kirill.yukhin@intel.com>
7750
7751 * cilk.c: Revert previous change.
7752
948cf550
IZ
77532014-10-20 Igor Zamyatin <igor.zamyatin@intel.com>
7754
7755 PR c/63307
7756 * cilk.c: Include vec.h.
7757 (struct cilk_decls): New structure.
7758 (wrapper_parm_cb): Split this function to...
7759 (fill_decls_vec): ...this...
7760 (create_parm_list): ...and this.
7761 (compare_decls): New function.
7762 (for_local_cb): Remove.
7763 (wrapper_local_cb): Ditto.
7764 (build_wrapper_type): For now first traverse and fill vector of
7765 declarations then sort it and then deal with sorted vector.
7766 (cilk_outline): Ditto.
7767 (declare_one_free_variable): Ditto.
7768
92574c7c
MP
77692014-10-17 Marek Polacek <polacek@redhat.com>
7770
7771 * c-opts.c (c_common_post_options): Set warn_implicit_int.
7772 * c.opt (Wimplicit-int): Initialize to -1.
7773
83685514
AM
77742014-10-16 Andrew MacLeod <amacleod@redhat.com>
7775
7776 * c-pragma.c: Adjust include files.
7777 * c-semantics.c: Likewise.
7778
5b8300ea
DD
77792014-10-16 DJ Delorie <dj@redhat.com>
7780
7781 * c-cppbuiltin.c (cpp_atomic_builtins): Don't assume pointers are
7782 multiples of bytes.
7783
5f83e90b
JM
77842014-10-14 Jason Merrill <jason@redhat.com>
7785
7786 PR c++/63455
7787 * c-common.h (CPP_PREPARSED_EXPR): New.
7788 (N_CP_TTYPES): Adjust.
7789
d73326ca
MP
77902014-10-15 Marek Polacek <polacek@redhat.com>
7791
7792 * c-opts.c (c_common_init_options): Make -std=gnu11 the default for C.
7793
78a7c317
DD
77942014-10-14 DJ Delorie <dj@redhat.com>
7795
7796 * c-pretty-print.c (pp_c_integer_constant): Check for all __intN
7797 types, not just __int128.
7798 * c-cppbuiltin.c (c_cpp_builtins): Add builtins for all __intN
7799 types, not just __int128.
7800 (cpp_atomic_builtins): Round pointer sizes up.
7801 (type_suffix): Use type precision, not specific types.
7802 * c-common.c (c_common_reswords): Remove __int128 special case.
7803 (c_common_type_for_size): Check for all __intN types, not just
7804 __int128.
7805 (c_common_type_for_mode): Likewise.
7806 (c_common_signed_or_unsigned_type): Likewise.
7807 (c_build_bitfield_integer_type): Likewise.
7808 (c_common_nodes_and_builtins): Likewise.
7809 (keyword_begins_type_specifier): Likewise.
7810 * c-common.h (rid): Remove RID_INT128 and add RID_INT_N_* for all
7811 __intN variants.
7812
2a22f99c
TS
78132014-10-12 Trevor Saunders <tsaunders@mozilla.com>
7814
7815 * c-common.c: Use hash_table instead of hashtab.
7816
2a8ef767
ESR
78172014-10-06 Edward Smith-Rowland <3dw4rd@verizon.net>
7818
adfac8df 7819 * c-cppbuiltin.c: Move __cpp_attribute_deprecated to the
2a8ef767
ESR
7820 C++11 section.
7821
3c9aabbd
MG
78222014-10-03 Marc Glisse <marc.glisse@inria.fr>
7823
7824 PR c++/54427
7825 PR c++/57198
7826 PR c++/58845
7827 * c-common.c (warn_logical_operator): Punt for vectors.
7828
a15f7cb8
ESR
78292014-10-01 Edward Smith-Rowland <3dw4rd@verizon.net>
7830
7831 Implement SD-6: SG10 Feature Test Recommendations
7832 * c-cppbuiltin.c (c_cpp_builtins()): Define language feature
7833 macros and the __has_header macro.
7834
8d0cf15e
JM
78352014-09-30 Jason Merrill <jason@redhat.com>
7836
dd5d5481
JM
7837 * c-common.h (enum rid): Add RID_IS_TRIVIALLY_ASSIGNABLE and
7838 RID_IS_TRIVIALLY_CONSTRUCTIBLE.
7839 * c-common.c (c_common_reswords): Add __is_trivially_copyable.
7840
b752325e
JM
7841 * c-common.h (enum rid): Add RID_IS_TRIVIALLY_COPYABLE.
7842 * c-common.c (c_common_reswords): Add __is_trivially_copyable.
7843
8d0cf15e
JM
7844 * c-common.h (enum rid): Remove RID_IS_CONVERTIBLE_TO.
7845 * c-common.c (c_common_reswords): Remove __is_convertible_to.
7846
083e891e
MP
78472014-09-24 Marek Polacek <polacek@redhat.com>
7848
7849 PR c/61405
7850 PR c/53874
7851 * c-common.h (struct c_common_resword): Don't define CPP_KEYWORD.
7852
7861b648
AK
78532014-09-23 Andi Kleen <ak@linux.intel.com>
7854
7855 * c-common.c (handle_no_reorder_attribute): New function.
7856 (c_common_attribute_table): Add no_reorder attribute.
7857
9a79452d
JM
78582014-09-22 Joseph Myers <joseph@codesourcery.com>
7859
7860 * c-cppbuiltin.c (c_cpp_builtins): Define
7861 __LIBGCC_*_EXCESS_PRECISION__ macros for supported floating-point
7862 modes.
7863
dd69f047
JM
78642014-09-18 Joseph Myers <joseph@codesourcery.com>
7865
7866 * c-cppbuiltin.c (c_cpp_builtins): Define __LIBGCC_*_FUNC_EXT__
7867 for supported floating-point modes.
7868
737a4826
MLI
78692014-09-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
7870
7871 * c.opt (Wpsabi): Use LangEnabledBy.
7872 * c-opts.c (c_common_handle_option): Do not handle here.
7873
8cc4b7a2
JM
78742014-09-12 Joseph Myers <joseph@codesourcery.com>
7875
7876 * c-cppbuiltin.c (c_cpp_builtins): Define __LIBGCC_HAS_%s_MODE__
7877 macros for floating-point modes.
7878
179b5a55
MG
78792014-09-11 Marc Glisse <marc.glisse@inria.fr>
7880
7881 PR target/58757
7882 * c-cppbuiltin.c (builtin_define_float_constants): Correct
7883 __*_DENORM_MIN__ without denormals.
7884
570a11fe
JJ
78852014-09-10 Jakub Jelinek <jakub@redhat.com>
7886
7887 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
7888 ubsan_instrument_vla, ubsan_instrument_return): Adjust
7889 ubsan_create_data callers.
7890 (ubsan_instrument_bounds): Don't emit UBSAN_BOUNDS at all if
7891 index is constant or BIT_AND_EXPR with constant mask and is
7892 small enough for the bound.
7893 * c-gimplify.c (ubsan_walk_array_refs_r): For ADDR_EXPR of
7894 ARRAY_REF, make sure the inner ARRAY_REF is not walked again.
7895
b559c810
MLI
78962014-09-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
7897
7898 * c.opt: Add CppReason to various flags.
7899 (Wdate-time): Re-sort.
7900 * c-common.c: Include c-common.h earlier.
7901 (struct reason_option_codes_t): Delete.
7902 (c_option_controlling_cpp_error): Prefix global type and struct
7903 with cpp_.
7904
1ef33fd4
MLI
79052014-09-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
7906
7907 * c.opt (Wnormalized): New.
7908 (Wnormalized=): Use Enum and Reject Negative.
7909 * c-opts.c (c_common_handle_option): Do not handle Wnormalized here.
7910
66bb34c0
JM
79112014-09-08 Joseph Myers <joseph@codesourcery.com>
7912
7913 * c-cppbuiltin.c (c_cpp_builtins): Define macros for mantissa
7914 digits of floating-point modes if -fbuilding-libgcc.
7915
53d68b9f
JM
79162014-09-05 Joseph Myers <joseph@codesourcery.com>
7917
7918 * c-cppbuiltin.c (c_cpp_builtins): Also define
7919 __LIBGCC_EH_TABLES_CAN_BE_READ_ONLY__,
7920 __LIBGCC_EH_FRAME_SECTION_NAME__, __LIBGCC_JCR_SECTION_NAME__,
7921 __LIBGCC_CTORS_SECTION_ASM_OP__, __LIBGCC_DTORS_SECTION_ASM_OP__,
7922 __LIBGCC_TEXT_SECTION_ASM_OP__, __LIBGCC_INIT_SECTION_ASM_OP__,
7923 __LIBGCC_INIT_ARRAY_SECTION_ASM_OP__,
7924 __LIBGCC_STACK_GROWS_DOWNWARD__,
7925 __LIBGCC_DONT_USE_BUILTIN_SETJMP__,
7926 __LIBGCC_DWARF_ALT_FRAME_RETURN_COLUMN__,
7927 __LIBGCC_DWARF_FRAME_REGISTERS__,
7928 __LIBGCC_EH_RETURN_STACKADJ_RTX__, __LIBGCC_JMP_BUF_SIZE__,
7929 __LIBGCC_STACK_POINTER_REGNUM__ and
7930 __LIBGCC_VTABLE_USES_DESCRIPTORS__ for -fbuilding-libgcc.
7931 (builtin_define_with_value): Handle backslash-escaping in string
7932 macro values.
7933
f65586dc
RB
79342014-09-05 Richard Biener <rguenther@suse.de>
7935
7936 PR middle-end/63148
7937 * c-format.c (check_format_arg): Properly handle
7938 effectively signed POINTER_PLUS_EXPR offset.
7939
2b71f4a4
MLI
79402014-09-04 Manuel López-Ibáñez <manu@gcc.gnu.org>
7941
7942 * c.opt (Wc90-c99-compat,Wc++-compat,Wcomment,Wendif-labels,
7943 Winvalid-pch,Wlong-long,Wmissing-include-dirs,Wmultichar,Wpedantic,
7944 (Wdate-time,Wtraditional,Wundef,Wvariadic-macros): Add CPP, Var
7945 and Init.
7946 * c-opts.c (c_common_handle_option): Do not handle here.
7947 (sanitize_cpp_opts): Likewise.
7948 * c-common.c (struct reason_option_codes_t): Handle
7949 CPP_W_C90_C99_COMPAT and CPP_W_PEDANTIC.
7950
d2e4feca
MP
79512014-09-03 Marek Polacek <polacek@redhat.com>
7952
7953 * c.opt (Wlogical-not-parentheses): Enable by -Wall.
7954
9a771876
JJ
79552014-09-02 Jakub Jelinek <jakub@redhat.com>
7956 Balaji V. Iyer <balaji.v.iyer@intel.com>
7957 Igor Zamyatin <igor.zamyatin@intel.com>
7958
7959 * c-cilkplus.c (cilk_for_number_of_iterations): New function.
7960 * c-common.c (c_common_reswords): Added _Cilk_for.
7961 * c-common.h (enum rid): Added RID_CILK_FOR.
7962 (cilk_for_number_of_iterations): Add declaration.
7963 * c-omp.c (c_finish_omp_for): Added checks for CILK_SIMD and
7964 CILK_FOR.
7965 * c-pragma.c (init_pragma): Register "grainsize" pragma.
7966 * c-pragma.h (enum pragma_kind): Add PRAGMA_CILK_GRAINSIZE.
7967
81b5d104
MLI
79682014-08-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
7969
7970 * c.opt (Wbuiltin-macro-redefined,Wdeprecated,Wendif-labels,
7971 Winvalid-pch,Wliteral-suffix,Wmissing-include-dirs,Wtrigraphs,
7972 Wundef): Use CPP, Var and Init.
7973 * c-opts.c (c_common_handle_option): Do not handle the above flags here.
7974
b753b37b
MLI
79752014-08-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
7976
7977 * c.opt (Wbuiltin-macro-redefined): Use CPP, Var and Init.
7978 * c-opts.c (c_common_handle_option): Do not handle here.
7979
028aee17
JM
79802014-08-25 Jason Merrill <jason@redhat.com>
7981
7982 * c.opt: Change -std=c++1y and -std=gnu++1y to be aliases for
7983 -std=c++14 and -std=gnu++14, rather than the reverse.
7984 * c-opts.c (c_common_handle_option): Change OPT_std_c__1y and
7985 OPT_std_gnu__1y to OPT_std_c__14 and OPT_std_gnu__14.
7986 * c-common.h (cxx_dialect): Remove cxx1y.
7987
e4276ba5
ESR
79882014-08-23 Edward Smith-Rowland <3dw4rd@verizon.net>
7989
7990 * c-common.h (enum cxx_dialect): Add cxx14.
7991 * c-opts.c (set_std_cxx1y): Rename to set_std_cxx14; Use cxx14.
7992 * c-ubsan.c (ubsan_instrument_shift): Change comment and logic from
7993 cxx_dialect == cxx11 || cxx_dialect == cxx1y to cxx_dialect >= cxx11.
7994
a545cacd
JM
79952014-08-22 Jason Merrill <jason@redhat.com>
7996
7997 * c.opt (std=gnu++17): Fix alias.
7998
59ea0364
MP
79992014-08-22 Marek Polacek <polacek@redhat.com>
8000
8001 PR c++/62199
8002 * c-common.c (warn_logical_not_parentheses): Don't check LHS. Don't
8003 check for vector types. Drop LHS argument.
8004 * c-common.h (warn_logical_not_parentheses): Adjust.
8005
596e808c
MLI
80062014-08-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
8007
8008 * c.opt (Wcomment): Use CPP, Var and LangEnabledBy.
8009 (Wmultichar): Likewise.
8010 (Wdate-time): Use C-family languages instead of Common. Use CPP
8011 and Var.
8012 * c-opts.c (c_common_handle_option): Do not handle the above
8013 options here.
8014 (sanitize_cpp_opts): Likewise.
8015
18767f65
MLI
80162014-08-21 Manuel López-Ibáñez <manu@gcc.gnu.org>
8017
8018 PR fortran/44054
8019 * c-opts.c: Include tree-diagnostics.h.
8020 (c_diagnostic_finalizer): New.
8021 (c_common_initialize_diagnostics): Use it.
8022
b4413594
MLI
80232014-08-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
8024
8025 PR preprocessor/51303
8026 * c-common.c (struct reason_option_codes_t option_codes):
8027 Add CPP_W_MISSING_INCLUDE_DIRS. Sort alphabetically.
8028
43f9a13c
MLI
80292014-08-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
8030
8031 PR c/60975
8032 PR c/53063
8033 * c.opt (Wvariadic-macros): Use CPP and LangEnabledBy.
8034 * c-opts.c (c_common_handle_option): Call cpp_handle_option_auto.
8035 (c_common_post_options): Call init_global_opts_from_cpp.
8036 (sanitize_cpp_opts): Do not handle Wvariadic-macros here.
8037
04159acf
MP
80382014-08-19 Marek Polacek <polacek@redhat.com>
8039
8040 PR c++/62153
8041 * c-common.c (maybe_warn_bool_compare): New function.
8042 * c-common.h (maybe_warn_bool_compare): Declare.
8043 * c.opt (Wbool-compare): New option.
8044
35aff4fb
MP
80452014-08-19 Marek Polacek <polacek@redhat.com>
8046
8047 * c.opt (Wc99-c11-compat): New option.
8048
177cce46
MP
80492014-08-19 Marek Polacek <polacek@redhat.com>
8050
8051 * c-opts.c (sanitize_cpp_opts): Make warn_long_long be set according
8052 to warn_c90_c99_compat.
8053 * c.opt (Wc90-c99-compat, Wdeclaration-after-statement): Initialize
8054 to -1.
8055
6ae9194f
MLI
80562014-08-19 Manuel López-Ibáñez <manu@gcc.gnu.org>
8057 Steven Bosscher <steven@gcc.gnu.org>
8058
8059 PR c/52952
8060 * c-format.c: Add extra_arg_loc and format_string_loc to struct
8061 format_check_results.
8062 (check_function_format): Use true and add comment for boolean
8063 argument.
8064 (finish_dollar_format_checking): Use explicit location when warning.
8065 (check_format_info): Likewise.
8066 (check_format_arg): Set extra_arg_loc and format_string_loc.
8067 (check_format_info_main): Use explicit location when warning.
8068 (check_format_types): Pass explicit location.
8069 (format_type_warning): Likewise.
8070
8e54f6d3
MLI
80712014-08-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
8072
8073 PR fortran/44054
8074 * c-format.c: Handle Fortran flags.
8075
cd4e76fc
IZ
80762014-08-12 Igor Zamyatin <igor.zamyatin@intel.com>
8077
8078 PR other/61962
8079 * array-notation-common.c (find_rank): Added handling for other
8080 types of references.
8081
f3bede71
MP
80822014-08-10 Marek Polacek <polacek@redhat.com>
8083
8084 PR c/51849
8085 * c-opts.c (sanitize_cpp_opts): Pass warn_c90_c99_compat to libcpp.
8086 * c.opt (Wc90-c99-compat): Add option.
8087
9f25a338
TS
80882014-08-07 Trevor Saunders <tsaunders@mozilla.com>
8089
8090 * c-gimplify.c, cilk.c: Remove includes of pointer-set.h.
8091
62e4eb35
MP
80922014-08-03 Marek Polacek <polacek@redhat.com>
8093
ab20d992 8094 * c-common.c (check_case_value): Add location_t parameter. Use it.
62e4eb35
MP
8095 (c_add_case_label): Pass loc to check_case_value.
8096
b787e7a2
TS
80972014-08-02 Trevor Saunders <tsaunders@mozilla.com>
8098
8099 * cilk.c: Use hash_map instead of pointer_map.
8100
6e2830c3
TS
81012014-08-02 Trevor Saunders <tsaunders@mozilla.com>
8102
8103 * c-gimplify.c: Use hash_set instead of pointer_set.
8104
a7ee52fb
IZ
81052014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
8106
8107 PR middle-end/61455
8108 * array-notation-common.c (extract_array_notation_exprs): Handling
8109 of DECL_EXPR added.
8110
944fa280
JJ
81112014-08-01 Jakub Jelinek <jakub@redhat.com>
8112
8113 * c-common.h (min_align_of_type): Removed prototype.
8114 * c-common.c (min_align_of_type): Removed.
8115 * c-ubsan.h (ubsan_maybe_instrument_reference,
8116 ubsan_maybe_instrument_member_call): New prototypes.
8117 * c-ubsan.c: Include stor-layout.h and builtins.h.
8118 (ubsan_maybe_instrument_reference_or_call,
8119 ubsan_maybe_instrument_reference, ubsan_maybe_instrument_call): New
8120 functions.
8121
b4dfdc11
MG
81222014-07-31 Marc Glisse <marc.glisse@inria.fr>
8123
8124 PR c++/60517
8125 * c.opt (-Wreturn-local-addr): Move to common.opt.
8126
a41844e5
JM
81272014-07-30 Jason Merrill <jason@redhat.com>
8128
8129 PR c++/61659
8130 PR c++/61687
8131 Revert:
8132 * c.opt (-fuse-all-virtuals): New.
8133
976d5a22
TT
81342014-07-30 Tom Tromey <tromey@redhat.com>
8135
8136 PR c/59855
8137 * c.opt (Wdesignated-init): New option.
8138 * c-common.c (c_common_attribute_table): Add "designated_init".
8139 (handle_designated_init): New function.
8140
cdc94aca
MP
81412014-07-24 Marek Polacek <polacek@redhat.com>
8142
8143 PR c/57653
8144 * c-opts.c (c_finish_options): If -imacros is in effect, return.
8145
f41373b6
DS
81462014-07-16 Dodji Seketeli <dodji@redhat.com>
8147
8148 PR preprocessor/60723 - missing system-ness marks for macro tokens
8149 * c-ppoutput.c (struct print::prev_was_system_token): New data
8150 member.
8151 (init_pp_output): Initialize it.
8152 (maybe_print_line_1, maybe_print_line, print_line_1, print_line)
8153 (do_line_change): Return a flag saying if a line marker was
8154 emitted or not.
8155 (scan_translation_unit): Detect if the system-ness of the token we
8156 are about to emit is different from the one of the previously
8157 emitted token. If so, emit a line marker. Avoid emitting useless
8158 adjacent line markers. Avoid emitting line markers for tokens
8159 originating from the expansion of built-in macros.
8160 (scan_translation_unit_directives_only): Adjust.
8161
4d661eaa
MP
81622014-07-15 Marek Polacek <polacek@redhat.com>
8163
8164 * c-ubsan.c (ubsan_instrument_bounds): Don't instrument if
8165 TYPE_MAX_VALUE is NULL.
8166
b108f48f
JJ
81672014-07-14 Jakub Jelinek <jakub@redhat.com>
8168
8169 PR middle-end/61294
8170 * c.opt (Wmemset-transposed-args): New warning.
8171
c0221884
JM
81722014-07-10 Jason Merrill <jason@redhat.com>
8173
8174 PR c++/61659
8175 PR c++/61687
8176 * c.opt (-fuse-all-virtuals): New.
8177
63dfbb95
RB
81782014-07-09 Richard Biener <rguenther@suse.de>
8179
8180 PR c-family/61741
8181 * c-gimplify.c (c_gimplify_expr): Gimplify self-modify expressions
8182 using unsigned arithmetic if overflow does not wrap instead of
8183 if overflow is undefined.
8184
773ec47f
MP
81852014-07-06 Marek Polacek <polacek@redhat.com>
8186
8187 PR c/6940
8188 * c.opt (Wsizeof-array-argument): New option.
8189
00a7ba58
JJ
81902014-07-03 Jakub Jelinek <jakub@redhat.com>
8191
b1726d6c 8192 * c-ada-spec.c (dump_ada_nodes): Don't call qsort if
00a7ba58
JJ
8193 comments->count <= 1, as comments->entries might be NULL.
8194
52ec0ea3
MP
81952014-07-01 Marek Polacek <polacek@redhat.com>
8196
8197 * c.opt (Wint-conversion): New option.
8198
d5c3d343
MP
81992014-07-01 Marek Polacek <polacek@redhat.com>
8200
8201 PR c/58286
8202 * c.opt (Wincompatible-pointer-types): New option.
8203
6e7ceb17
PC
82042014-06-30 Paolo Carlini <paolo.carlini@oracle.com>
8205
8206 PR c++/51400
8207 * c-common.c (handle_noreturn_attribute, handle_const_attribute):
8208 Do not discard TYPE_QUALS of type.
8209
da73100b
JM
82102014-06-26 Jason Merrill <jason@redhat.com>
8211
8212 * c-common.h (enum cxx_dialect): Add cxx1z.
8213 * c.opt (std=c++1z, std=c++17, std=gnu++1z, std=gnu++17): New.
8214 * c-opts.c (c_common_handle_option, set_std_cxx1z): Handle it.
8215
08eedf75
TJ
82162014-06-26 Teresa Johnson <tejohnson@google.com>
8217
8218 * c-common.h (get_dump_info): Declare.
8219 * c-gimplify.c (c_genericize): Use saved dump files.
8220 * c-opts.c (c_common_parse_file): Begin and end dumps
8221 once around parsing invocation.
8222 (get_dump_info): New function.
8223
7b56b2f8
MP
82242014-06-23 Marek Polacek <polacek@redhat.com>
8225 Andrew MacLeod <amacleod@redhat.com>
8226
8227 PR c/61553
8228 * c-common.c (get_atomic_generic_size): Don't segfault if the
8229 type doesn't have a size.
8230
0e37a2f3
MP
82312014-06-20 Marek Polacek <polacek@redhat.com>
8232
8233 * c-gimplify.c: Include "c-ubsan.h" and "pointer-set.h".
8234 (ubsan_walk_array_refs_r): New function.
8235 (c_genericize): Instrument array bounds.
8236 * c-ubsan.c: Include "internal-fn.h".
8237 (ubsan_instrument_division): Mark instrumented arrays as having
8238 side effects. Adjust ubsan_type_descriptor call.
8239 (ubsan_instrument_shift): Likewise.
8240 (ubsan_instrument_vla): Adjust ubsan_type_descriptor call.
8241 (ubsan_instrument_bounds): New function.
8242 (ubsan_array_ref_instrumented_p): New function.
8243 (ubsan_maybe_instrument_array_ref): New function.
8244 * c-ubsan.h (ubsan_instrument_bounds): Declare.
8245 (ubsan_array_ref_instrumented_p): Declare.
8246 (ubsan_maybe_instrument_array_ref): Declare.
8247
82482014-06-20 Hale Wang <hale.wang@arm.com>
dd6fe7d4
HW
8249
8250 PR lto/61123
8251 * c.opt (fshort-enums): Add to LTO.
8252 * c.opt (fshort-wchar): Likewise.
8253
5c3d09f7
MP
82542014-06-16 Marek Polacek <polacek@redhat.com>
8255
8256 PR c/60439
8257 * c.opt (Wswitch-bool): Add Var.
8258
9cf32741
JJ
82592014-06-12 Jakub Jelinek <jakub@redhat.com>
8260
8261 PR middle-end/61486
8262 * c-omp.c (c_omp_split_clauses): Don't crash on firstprivate in
8263 #pragma omp target teams or
8264 #pragma omp {,target }teams distribute simd.
8265
62984918
JM
82662014-06-12 Jason Merrill <jason@redhat.com>
8267
8268 * c.opt (Wabi=, fabi-compat-version): New.
8269 * c-opts.c (c_common_handle_option): Handle -Wabi=.
8270 (c_common_post_options): Handle flag_abi_compat_version default.
8271 Disallow -fabi-compat-version=1.
8272 * c-common.h (abi_version_crosses): New.
8273
f961457f
JH
82742014-06-11 Jan Hubicka <hubicka@ucw.cz>
8275
adfac8df 8276 * c-common.c (handle_section_attribute): Update handling for
f961457f
JH
8277 section names that are no longer trees.
8278
92d28cbb
JJ
82792014-06-10 Jakub Jelinek <jakub@redhat.com>
8280
8281 PR fortran/60928
8282 * c-pragma.c (omp_pragmas_simd): Move PRAGMA_OMP_TASK...
8283 (omp_pragmas): ... back here.
8284
742938c9
MP
82852014-06-05 Marek Polacek <polacek@redhat.com>
8286
8287 PR c/49706
8288 * c-common.c (warn_logical_not_parentheses): New function.
8289 * c-common.h (warn_logical_not_parentheses): Declare.
8290 * c.opt (Wlogical-not-parentheses): New option.
8291
9d548dfb
MP
82922014-06-04 Marek Polacek <polacek@redhat.com>
8293
8294 PR c/30020
8295 * c-common.c (check_case_bounds): Add location parameter.
8296 Use it.
8297 (c_add_case_label): Pass loc to check_case_bounds.
8298
fedfecef
MP
82992014-06-03 Marek Polacek <polacek@redhat.com>
8300
8301 PR c/60439
8302 * c.opt (Wswitch-bool): New option.
8303
f6a7cffc
TS
83042014-05-22 Thomas Schwinge <thomas@codesourcery.com>
8305
040d18b6
TS
8306 * c-common.h (c_omp_sharing_predetermined, c_omp_remap_decl):
8307 Remove prototypes.
8308 (record_types_used_by_current_var_decl): Move prototype to where
8309 it belongs.
8310
f6a7cffc
TS
8311 * c-common.c (DEF_FUNCTION_TYPE_0, DEF_FUNCTION_TYPE_6)
8312 (DEF_FUNCTION_TYPE_7, DEF_FUNCTION_TYPE_8)
8313 (DEF_FUNCTION_TYPE_VAR_5): Cosmetic fixes.
8314
632f2871
RS
83152014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
8316
8317 * c-common.h (CTI_VOID_ZERO, void_zero_node): Delete.
8318 * c-common.c (c_common_nodes_and_builtins): Don't initialize
8319 void_zero_node.
8320 * c-pretty-print.c (pp_c_void_constant): New function.
8321 (c_pretty_printer::constant, c_pretty_printer::primary_expression)
8322 (c_pretty_printer::expression): Handle VOID_CST.
8323 * cilk.c (extract_free_variables): Likewise.
8324 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift)
8325 (ubsan_instrument_vla): Use void_node instead of void_zero_node.
8326
766090c2
TS
83272014-05-17 Trevor Saunders <tsaunders@mozilla.com>
8328
8329 * c-common.h (sorted_fields_type): Remove variable_size GTY attribute.
8330 * c-pragma.c (push_alignment): Adjust.
8331 (handle_pragma_push_options): Likewise.
8332
661a0813
MP
83332014-05-09 Marek Polacek <polacek@redhat.com>
8334
8335 PR c/50459
8336 * c-common.c (check_user_alignment): Return -1 if alignment is error
8337 node.
8338 (handle_aligned_attribute): Don't call default_conversion on
8339 FUNCTION_DECLs.
8340 (handle_vector_size_attribute): Likewise.
8341 (handle_tm_wrap_attribute): Handle case when wrap_decl is error node.
8342 (handle_sentinel_attribute): Call default_conversion and allow even
8343 integral types as an argument.
8344
2793eeab
MP
83452014-05-08 Marek Polacek <polacek@redhat.com>
8346
8347 PR c/61053
8348 * c-common.c (min_align_of_type): New function factored out from...
8349 (c_sizeof_or_alignof_type): ...here.
8350 * c-common.h (min_align_of_type): Declare.
8351
f827930a
MP
83522014-05-08 Marek Polacek <polacek@redhat.com>
8353
8354 PR c/61077
8355 * c-common.c (check_main_parameter_types): Warn for _Atomic-qualified
8356 parameter type of main.
8357
ca49b74e
DD
83582014-05-07 DJ Delorie <dj@redhat.com>
8359
8360 * c-cppbuiltin.c (print_bits_of_hex): New.
8361 (builtin_define_type_minmax): Print values using hex so as not to
8362 require a pre-computed list of string values.
8363
1d60af08
KZ
83642014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
8365 Mike Stump <mikestump@comcast.net>
8366 Richard Sandiford <rdsandiford@googlemail.com>
8367
8368 * c-ada-spec.c: Include wide-int.h.
8369 (ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX): Remove.
8370 (dump_generic_ada_node): Use wide-int interfaces.
8371 * c-common.c: Include wide-int-print.h.
8372 (shorten_compare): Use wide-int interfaces and tree_int_cst_lt.
8373 (pointer_int_sum): Use wide-int interfaces.
8374 (c_common_nodes_and_builtins): Use make_int_cst.
8375 (match_case_to_enum_1): Use tree_fits_uhwi_p and tree_fits_shwi_p.
8376 (handle_alloc_size_attribute): Use wide-int interfaces.
8377 (get_nonnull_operand): Likewise.
8378 * c-format.c (get_constant): Use tree_fits_uhwi_p.
8379 * c-lex.c: Include wide-int.h.
8380 (narrowest_unsigned_type): Take a widest_int rather than two
8381 HOST_WIDE_INTs.
8382 (narrowest_signed_type): Likewise.
8383 (interpret_integer): Update accordingly. Use wide-int interfaces.
8384 (lex_charconst): Use wide-int interfaces.
8385 * c-pretty-print.c: Include wide-int.h.
8386 (pp_c_integer_constant): Use wide-int interfaces.
8387 * cilk.c (declare_one_free_variable): Use tree_int_cst_lt instead of
8388 INT_CST_LT_UNSIGNED.
8389
b15458be
RB
83902014-05-06 Richard Biener <rguenther@suse.de>
8391
8392 * c-opts.c (c_common_post_options): For -freestanding,
8393 -fno-hosted and -fno-builtin disable pattern recognition
8394 if not enabled explicitely.
8395
6577374e
MP
83962014-05-02 Marek Polacek <polacek@redhat.com>
8397
8398 * c.opt (Wsizeof-pointer-memaccess): Describe option.
8399
d00887e8
MP
84002014-05-01 Marek Polacek <polacek@redhat.com>
8401
8402 PR c/43245
8403 * c.opt (Wdiscarded-qualifiers): Add.
8404
f8ed5150
MP
84052014-04-30 Marek Polacek <polacek@redhat.com>
8406
8407 * c-ubsan.c (ubsan_instrument_division): Handle REAL_TYPEs. Perform
8408 INT_MIN / -1 sanitization only for integer types.
8409
45484dcf
MP
84102014-04-25 Marek Polacek <polacek@redhat.com>
8411
8412 PR c/18079
8413 * c-common.c (handle_noinline_attribute): Warn if the attribute
8414 conflicts with always_inline attribute.
8415 (handle_always_inline_attribute): Warn if the attribute conflicts
8416 with noinline attribute.
8417
38e514c0
MP
84182014-04-25 Marek Polacek <polacek@redhat.com>
8419
8420 PR c/60156
8421 * c-common.c (check_main_parameter_types): Warn about variadic main.
8422
44875f92
MS
84232014-04-24 Mike Stump <mikestump@comcast.net>
8424
8425 * c.opt (Wshadow-ivar): Default to on.
8426
dcaaa5a0
DP
84272014-04-24 Dimitris Papavasiliou <dpapavas@gmail.com>
8428
8429 * c.opt (Wshadow-ivar, flocal-ivars, fivar-visibility): Add.
8430
c07d7c02
MP
84312014-04-23 Marek Polacek <polacek@redhat.com>
8432
8433 * c-common.c (handle_tm_wrap_attribute): Tweak error message.
8434
1c33c9b7
JJ
84352014-04-22 Jakub Jelinek <jakub@redhat.com>
8436
8437 PR sanitizer/60275
8438 * c-ubsan.c (ubsan_instrument_return): Return __builtin_trap ()
8439 if flag_sanitize_undefined_trap_on_error.
8440 (ubsan_instrument_division, ubsan_instrument_shift,
8441 ubsan_instrument_vla): Likewise. Use __ubsan_handle_*_abort ()
8442 if !flag_sanitize_recover.
8443
793c625f
MG
84442014-04-22 Marc Glisse <marc.glisse@inria.fr>
8445
8446 PR libstdc++/43622
8447 * c-common.c (registered_builtin_types): Make non-static.
8448 * c-common.h (registered_builtin_types): Declare.
8449
b0f1bf36 84502014-04-14 Richard Biener <rguenther@suse.de>
ab20d992 8451 Marc Glisse <marc.glisse@inria.fr>
b0f1bf36
RB
8452
8453 PR c/60819
8454 * c-common.c (convert_vector_to_pointer_for_subscript): Properly
8455 apply may-alias the scalar pointer type when applicable.
8456
3b07fa4a
IZ
84572014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
8458
8459 PR middle-end/60467
8460 * cilk.c (cilk_set_spawn_marker): Remove FUNCTION_DECL
8461 as possible argument for Cilk_spawn.
8462
cbbd2b1c
TB
84632014-04-11 Tobias Burnus <burnus@net-b.de>
8464
8465 PR c/60194
8466 * c.opt (Wformat-signedness): Add
8467 * c-format.c(check_format_types): Use it.
8468
6415bd5d
JM
84692014-04-11 Jason Merrill <jason@redhat.com>
8470
8471 PR c++/57926
8472 * c-common.c (sync_resolve_size, get_atomic_generic_size): Call
8473 default_conversion for an array argument.
8474
6525783a
MP
84752014-04-08 Marek Polacek <polacek@redhat.com>
8476
8477 PR sanitizer/60745
8478 * c-ubsan.c: Include asan.h.
8479 (ubsan_instrument_return): Call initialize_sanitizer_builtins.
8480
880a467b
NS
84812014-04-03 Nathan Sidwell <nathan@codesourcery.com>
8482
8483 * c.opt (Wnon-virtual-dtor): Auto set when Weffc++.
8484
7b59ff2d
MP
84852014-04-02 Marek Polacek <polacek@redhat.com>
8486
8487 * c-common.h (c_expand_expr): Remove declaration.
8488
8edbfaa6
JJ
84892014-03-28 Jakub Jelinek <jakub@redhat.com>
8490
8491 PR c++/60689
8492 * c-common.c (add_atomic_size_parameter): When creating new
8493 params vector, push the size argument first.
8494
07d72e1d
JJ
84952014-03-26 Jakub Jelinek <jakub@redhat.com>
8496
8497 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
8498 ubsan_instrument_vla, ubsan_instrument_return): Adjust
8499 ubsan_create_data callers.
8500
b35e0fa0
JJ
85012014-03-22 Jakub Jelinek <jakub@redhat.com>
8502
8503 PR debug/60603
8504 * c-opts.c (c_finish_options): Restore cb_file_change call to
8505 <built-in>.
8506
39a1ebb3
JJ
85072014-03-13 Jakub Jelinek <jakub@redhat.com>
8508
8509 PR middle-end/36282
8510 * c-pragma.c (apply_pragma_weak): Only look at
8511 TREE_SYMBOL_REFERENCED (DECL_ASSEMBLER_NAME (decl)) if
8512 DECL_ASSEMBLER_NAME_SET_P (decl).
8513 (maybe_apply_pending_pragma_weaks): Exit early if
8514 vec_safe_is_empty (pending_weaks) rather than only when
8515 !pending_weaks.
8516 (maybe_apply_pragma_weak): Likewise. If !DECL_ASSEMBLER_NAME_SET_P,
8517 set assembler name back to NULL afterwards.
8518
a07f6ed2
JM
85192014-03-11 Jason Merrill <jason@redhat.com>
8520
8521 * c.opt: Add -std=gnu++14.
8522
75b107f5
IB
85232014-03-11 Ian Bolton <ian.bolton@arm.com>
8524
8525 * c-opts.c (c_common_post_options): Don't override
8526 -ffp-contract=fast if unsafe-math-optimizations is on.
8527
f42c637e
PM
85282014-03-08 Paulo Matos <paulo@matos-sorge.com>
8529
22b15758 8530 * c.opt: Enable LTO FE for fshort-double.
f42c637e 8531
70e24808
JM
85322014-03-07 Jason Merrill <jason@redhat.com>
8533
8534 * c.opt: Add -std=c++14.
8535
3af9c5e9
MP
85362014-03-06 Marek Polacek <polacek@redhat.com>
8537
8538 PR c/60197
8539 * cilk.c (contains_cilk_spawn_stmt): New function.
8540 (contains_cilk_spawn_stmt_walker): Likewise.
8541 (recognize_spawn): Give error on invalid use of _Cilk_spawn.
8542 * c-common.h (contains_cilk_spawn_stmt): Add declaration.
8543
b3bdf019
JJ
85442014-03-03 Jakub Jelinek <jakub@redhat.com>
8545
8546 * c-pragma.c (c_pp_lookup_pragma): Handle PRAGMA_CILK_SIMD.
8547 (init_pragma): Call cpp_register_deferred_pragma for PRAGMA_CILK_SIMD
8548 even when flag_preprocess_only.
8549
ca7e759d
JM
85502014-02-26 Jason Merrill <jason@redhat.com>
8551
8552 PR c++/59231
8553 PR c++/11586
8554 * c-common.c (shorten_compare): Don't check
8555 c_inhibit_evaluation_warnings.
8556
28e41874
JJ
85572014-02-19 Jakub Jelinek <jakub@redhat.com>
8558
cca615af
JJ
8559 PR c/37743
8560 * c-common.c (c_common_nodes_and_builtins): When initializing
8561 c_uint{16,32,64}_type_node, also set corresponding
8562 uint{16,32,64}_type_node to the same value.
8563
28e41874
JJ
8564 PR c++/60267
8565 * c-pragma.c (init_pragma): Don't call cpp_register_deferred_pragma
8566 for PRAGMA_IVDEP if flag_preprocess_only.
8567
c2bf53a1
JJ
85682014-02-12 Jakub Jelinek <jakub@redhat.com>
8569
8570 PR c/60101
8571 * c-common.c (merge_tlist): If copy is true, call new_tlist,
8572 if false, add ADD itself, rather than vice versa.
8573 (verify_tree): For COND_EXPR, don't call merge_tlist with non-zero
8574 copy. For SAVE_EXPR, only call merge_tlist once.
8575
8fcbce72
JJ
85762014-02-08 Jakub Jelinek <jakub@redhat.com>
8577
8578 PR middle-end/60092
8579 * c-common.c (handle_alloc_size_attribute): Use tree_fits_uhwi_p
8580 and tree_to_uhwi.
8581 (handle_alloc_align_attribute, handle_assume_aligned_attribute): New
8582 functions.
8583 (c_common_attribute_table): Add alloc_align and assume_aligned
8584 attributes.
8585
0a756a3f
MP
85862014-02-06 Marek Polacek <polacek@redhat.com>
8587
8588 PR c/60087
8589 * c-common.c (warn_for_sign_compare): Call warning_at with location
8590 instead of warning.
8591
7ec4847a
MP
85922014-02-05 Marek Polacek <polacek@redhat.com>
8593
8594 PR c/53123
8595 * c-omp.c (c_finish_omp_atomic): Remove unreachable return
8596 statement.
8597
66f20604
MP
85982014-02-04 Marek Polacek <polacek@redhat.com>
8599
8600 PR c/60036
8601 * c-common.c (conversion_warning): Unwrap C_MAYBE_CONST_EXPR and/or
8602 SAVE_EXPR.
8603
5d77fb19
MG
86042014-02-03 Marc Glisse <marc.glisse@inria.fr>
8605
8606 PR c++/53017
8607 PR c++/59211
8608 * c-common.c (handle_aligned_attribute, handle_alloc_size_attribute,
8609 handle_vector_size_attribute, handle_nonnull_attribute): Call
8610 default_conversion on the attribute argument.
8611 (handle_nonnull_attribute): Increment the argument number.
8612
81e5eca8
MP
86132014-01-31 Marek Polacek <polacek@redhat.com>
8614
8615 PR c/59963
8616 * c-common.c (add_atomic_size_parameter): Pass vNULL to
8617 build_function_call_vec.
8618 (resolve_overloaded_builtin): Likewise.
8619 * c-common.h (build_function_call_vec): Adjust declaration.
8620
68fca595
MP
86212014-01-30 Marek Polacek <polacek@redhat.com>
8622
8623 PR c/59940
8624 * c-common.h (unsafe_conversion_p): Adjust declaration.
8625 (warnings_for_convert_and_check): Likewise.
8626 (convert_and_check): Likewise.
8627 * c-common.c (unsafe_conversion_p): Add location parameter. Call
8628 expansion_point_location_if_in_system_header on it.
8629 (warnings_for_convert_and_check): Add location parameter. Call
8630 expansion_point_location_if_in_system_header on it. Use it.
8631 (convert_and_check): Add location parameter. Use it.
8632 (conversion_warning): Likewise.
8633 (c_add_case_label): Adjust convert_and_check calls.
8634 (scalar_to_vector): Adjust unsafe_conversion_p calls.
8635
b72271b9
BI
86362014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
8637
8638 * c-common.c (c_define_builtins): Replaced flag_enable_cilkplus with
8639 flag_cilkplus.
8640 * c-pragma.c (init_pragma): Likewise.
8641 * c.opt: Likewise.
8642
393e8e8b
MP
86432014-01-23 Marek Polacek <polacek@redhat.com>
8644
8645 PR c/59846
8646 * c-common.c (shorten_compare): Add location_t parameter.
8647 * c-common.h (shorten_binary_op): Adjust declaration.
8648
f04dda30
MP
86492014-01-23 Marek Polacek <polacek@redhat.com>
8650
8651 PR c/58346
8652 * c-common.c (pointer_to_zero_sized_aggr_p): New function.
8653 * c-common.h: Declare it.
8654
621955cb
EB
86552014-01-20 Eric Botcazou <ebotcazou@adacore.com>
8656
8657 * c-ada-spec.h (dump_ada_specs): Revert prototype change.
8658 * c-ada-spec.c (dump_ads): Likewise.
8659 (cpp_check): Likewise.
8660 (dump_ada_specs): Likewise.
8661
86622014-01-15 Laurent Alfonsi <laurent.alfonsi@st.com>
67bf2939
LA
8663
8664 PR c++/49718
8665 * c-common.c (handle_no_instrument_function_attribute): Allow
8666 no_instrument_function attribute in class member
8667 definition/declaration.
8668
241f845a
JJ
86692014-01-15 Jakub Jelinek <jakub@redhat.com>
8670
8671 PR c/58943
8672 * c-omp.c (c_finish_omp_atomic): Set in_late_binary_op around
8673 build_modify_expr with non-NOP_EXPR opcode. Handle return from it
8674 being COMPOUND_EXPR.
8675 (c_finish_omp_for): Handle incr being COMPOUND_EXPR with first
8676 operand a SAVE_EXPR and second MODIFY_EXPR.
8677
e83b8e2e
JJ
86782014-01-09 Jakub Jelinek <jakub@redhat.com>
8679
8680 PR target/58115
8681 * c-pch.c (c_common_write_pch): Call
8682 prepare_target_option_nodes_for_pch.
8683
23a5b65a
RS
86842014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
8685
8686 Update copyright years
8687
f9030485
RS
86882014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
8689
8690 * array-notation-common.c, c-cilkplus.c: Use the standard form for
8691 the copyright notice.
8692
f2aa696b
EB
86932013-12-28 Eric Botcazou <ebotcazou@adacore.com>
8694
8695 * c-ada-spec.c (print_constructor): New function.
8696 (print_destructor): Retrieve the origin of the destructor.
8697 (print_ada_declaration): Revamp handling of constructors/destructors.
8698
3f8257db 86992013-12-23 Stuart Hastings <stuart@apple.com>
1f26ac87
JM
8700 Bill Maddox <maddox@google.com>
8701 Jason Merrill <jason@redhat.com>
8702
8703 * c.opt: Add -fdeclone-ctor-dtor.
8704 * c-opts.c (c_common_post_options): Default to on iff -Os.
8705
41958c28
BI
87062013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
8707
8708 * c-common.c (c_common_attribute_table): Added "cilk simd function"
8709 attribute.
8710 * c-pragma.h (enum pragma_cilk_clause): Remove.
ab20d992 8711 (enum pragma_omp_clause): Added the following fields:
41958c28
BI
8712 PRAGMA_CILK_CLAUSE_NOMASK, PRAGMA_CILK_CLAUSE_MASK,
8713 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_NONE,
8714 PRAGMA_CILK_CLAUSE_LINEAR, PRAGMA_CILK_CLAUSE_PRIVATE,
8715 PRAGMA_CILK_CLAUSE_FIRSTPRIVATE, PRAGMA_CILK_CLAUSE_LASTPRIVATE,
8716 PRAGMA_CILK_CLAUSE_UNIFORM.
8717
b1726d6c 8718
12893402
BI
87192013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
8720
8721 * cilk.c (cilk_outline): Made this function non-static.
8722 (gimplify_cilk_spawn): Removed pre_p and post_p arguments.
8723 (create_cilk_wrapper): Added a new parameter: a function pointer.
8724 (c_install_body_w_frame_cleanup): Remove
8725 (extract_free_variables): Added VEC_INIT_EXPR and CONSTRUCTOR case.
8726 * c-common.h (cilk_outline): New prototype.
8727 (gimplify_cilk_spawn): Removed two parameters.
8728 (cilk_install_body_with_frame_cleanup): New prototype.
8729 * c-gimplify.c (c_gimplify_expr): Added MODIFY_EXPR, CALL_EXPR and
8730 CILK_SPAWN_STMT case.
8731
085b42ed
BS
87322013-12-11 Bernd Schmidt <bernds@codesourcery.com>
8733
2ce064c3
BS
8734 * c-common.c (c_fully_fold_internal): Handle ADDR_SPACE_CONVERT_EXPR.
8735
085b42ed
BS
8736 * c-common.h (enum c_tree_index): Remove CTI_INT_ARRAY_TYPE.
8737 (int_array_type_node): Remove.
8738 * c-common.c (c_common_nodes_and_builtins): Don't build it.
8739
9e36c9ed
MP
87402013-12-05 Marek Polacek <polacek@redhat.com>
8741
8742 PR c/52023
8743 * c-common.c (c_sizeof_or_alignof_type): Move a declaration into
8744 [ADJUST_FIELD_ALIGN].
8745
296674db
JM
87462013-12-04 Joseph Myers <joseph@codesourcery.com>
8747
8748 PR c/52023
8749 * c-common.c (c_sizeof_or_alignof_type): Add parameter min_alignof
8750 and check field alignment if set.
8751 * c-common.h (c_sizeof_or_alignof_type): Update prototype.
8752 (c_sizeof, c_alignof): Update calls to c_sizeof_or_alignof_type.
8753
b1726d6c 87542013-12-04 Jakub Jelinek <jakub@redhat.com>
31e071ae
MP
8755 Marek Polacek <polacek@redhat.com>
8756
8757 * c-gimplify.c (c_gimplify_expr): If doing the integer-overflow
8758 sanitization, call unsigned_type_for only when !TYPE_OVERFLOW_WRAPS.
8759
d7947e19
L
87602013-11-29 H.J. Lu <hongjiu.lu@intel.com>
8761
8762 PR c/59309
8763 * cilk.c (gimplify_cilk_spawn): Properly handle function without
8764 arguments.
8765
fad7652e
JJ
87662013-11-29 Jakub Jelinek <jakub@redhat.com>
8767
8768 PR c/59280
8769 * c-common.c (get_priority): If TREE_VALUE (args) is IDENTIFIER_NODE,
8770 goto invalid. If it is error_mark_node, don't issue further
8771 diagnostics.
8772
8b5e1202
SO
87732013-11-28 Sergey Ostanevich <sergos.gnu@gmail.com>
8774
8775 * c.opt (Wopenmp-simd): New.
8776
0a508bb6
JJ
87772013-11-22 Jakub Jelinek <jakub@redhat.com>
8778
8779 * c-ubsan.h (ubsan_instrument_return): New prototype.
8780 * c-ubsan.c (ubsan_instrument_return): New function.
8781
2fb9a547
AM
87822013-11-22 Andrew MacLeod <amacleod@redhat.com>
8783
8784 * c-common.c: Add required include files from gimple.h.
ab20d992
JJ
8785 * c-gimplify.c: Likewise.
8786 * cilk.c: Likewise.
2fb9a547 8787
8400e75e
DM
87882013-11-22 David Malcolm <dmalcolm@redhat.com>
8789
8790 * c-common.c (unsafe_conversion_p): Remove use of
8791 EXPR_LOC_OR_HERE macro.
8792 (conversion_warning): Likewise.
8793 (warnings_for_convert_and_check): Likewise.
8794 (warn_for_collisions_1): Likewise.
8795 (shorten_compare): Likewise, and remove use of in_system_header
8796 macro, using the location from the former.
8797 * c-lex.c (dump_one_header): Remove use of input_filename macro.
8798 (cb_def_pragma): Remove use of in_system_header macro.
8799 (lex_string): Likewise.
8800 * c-pragma.c (handle_pragma_float_const_decimal64): Likewise.
8801
eb1ce453
KZ
88022013-11-20 Kenneth Zadeck <zadeck@naturalbridge.com>
8803 Mike Stump <mikestump@comcast.net>
8804 Richard Sandiford <rdsandiford@googlemail.com>
8805
8806 * c-ada-spec.c (is_simple_enum): Use tree_to_shwi and tree_to_uhwi
8807 instead of TREE_INT_CST_LOW, in cases where there is a protecting
8808 tree_fits_shwi_p or tree_fits_uhwi_p.
8809 (dump_generic_ada_node): Likewise.
8810 * c-format.c (check_format_arg): Likewise.
8811 * c-pretty-print.c (pp_c_integer_constant): Likewise.
8812
6b3b8c27
KZ
88132013-11-20 Kenneth Zadeck <zadeck@naturalbridge.com>
8814
8815 * c-common.c (check_function_arguments_recurse): Use tree_to_uhwi.
8816
49b0aa18
JC
88172013-11-19 Joshua J Cogliati <jrincayc@yahoo.com>
8818
8819 PR c/53001
8820 * c-common.c (unsafe_conversion_p): Make this function
8821 return an enumeration with more detail.
8822 (conversion_warning): Use the new return type of
8823 unsafe_conversion_p to separately warn either about conversions
8824 that lower floating point number precision or about the other
8825 kinds of conversions.
8826 * c-common.h (enum conversion_safety): New enumeration.
8e745a17
JJ
8827 (unsafe_conversion_p): switching return type to
8828 conversion_safety enumeration.
49b0aa18
JC
8829 * c.opt: Adding new warning -Wfloat-conversion and
8830 enabling it with -Wconversion.
8831
b826515a
BS
88322013-11-19 Basile Starynkevitch <basile@starynkevitch.net>
8833
8e745a17
JJ
8834 * c-opts.c: Include plugin.h.
8835 (cb_file_change): Invoke plugin event PLUGIN_INCLUDE_FILE.
b826515a 8836
b9a55b13
MP
88372013-11-19 Marek Polacek <polacek@redhat.com>
8838
8839 * c-ubsan.c (ubsan_instrument_division): Adjust ubsan_create_data
8840 call.
8841 (ubsan_instrument_shift): Likewise.
8842 (ubsan_instrument_vla): Likewise.
8843
7d362f6c
RS
88442013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
8845
8846 * c-common.c (convert_vector_to_pointer_for_subscript): Remove
8847 cast to unsigned type.
8848
386b1f1f
RS
88492013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
8850
8851 * c-common.c (fold_offsetof_1): Use tree_to_uhwi rather than
8852 tree_low_cst.
8853 (complete_array_type): Update comment to refer to tree_to_[su]hwi
8854 rather than tree_low_cst.
8855
ae7e9ddd
RS
88562013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
8857
8858 * c-common.c, c-cppbuiltin.c: Replace tree_low_cst (..., 1) with
8859 tree_to_uhwi throughout.
8860
9439e9a1
RS
88612013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
8862
8863 * c-common.c, c-format.c, c-omp.c, c-pretty-print.c: Replace
8864 tree_low_cst (..., 0) with tree_to_shwi throughout.
8865
cc269bb6
RS
88662013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
8867
8868 * c-ada-spec.c, c-common.c, c-pretty-print.c: Replace
8869 host_integerp (..., 1) with tree_fits_uhwi_p throughout.
8870
9541ffee
RS
88712013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
8872
8873 * c-ada-spec.c, c-common.c, c-format.c, c-pretty-print.c: Replace
8874 host_integerp (..., 0) with tree_fits_shwi_p throughout.
8875
c02065fc
AH
88762013-11-15 Aldy Hernandez <aldyh@redhat.com>
8877
8878 * c-cilkplus.c: New file.
8879 * c-common.c (readonly_error): Add location argument.
8880 * c-common.h (readonly_error): Same.
8881 (c_finish_cilk_clauses): Protoize.
8882 (c_check_cilk_loop): Same.
8883 c-omp.c (c_finish_omp_for): Handle CILK_SIMD nodes.
8884 Do not fail on error_mark_node.
8885 Abstract increment canonicalization to here...
8886 (c_omp_for_incr_canonicalize_ptr): New.
8887 c-pragma.c (init_pragma): Register "simd" pragma.
8888 c-pragma.h (enum pragma_kind): Add PRAGMA_CILK_SIMD.
8889 (enum pragma_cilk_clause): New.
8890
9cc65f15
RS
88912013-11-15 Richard Sandiford <rdsandiford@googlemail.com>
8892
8893 * c-pretty-print.c (pp_c_character_constant): Remove unnecessary
8894 wchar_type and host_integerp checks.
8895
18f429e2
AM
88962013-11-14 Andrew MacLeod <amacleod@redhat.com>
8897
8898 * c-common.c: Likewise.
8899 * c-gimplify.c: Likewise.
8900 * cilk.c: Likewise.
8901
d8a2d370
DN
89022013-11-14 Diego Novillo <dnovillo@google.com>
8903
8904 * c-common.c: Include fold-const.h.
8905 Include stor-layout.h.
8906 Include calls.h.
8907 Include stringpool.h.
8908 Include attribs.h.
8909 Include varasm.h.
8910 Include trans-mem.h.
8911 * c-cppbuiltin.c: Include stor-layout.h.
8912 Include stringpool.h.
8913 * c-format.c: Include stringpool.h.
8914 * c-lex.c: Include stringpool.h.
8915 Include stor-layout.h.
8916 * c-pragma.c: Include stringpool.h.
8917 Include attribs.h.
8918 Include varasm.h.
8919 Include gcc-symtab.h.
8920 * c-pretty-print.c: Include stor-layout.h.
8921 Include attribs.h.
8922 * cilk.c: Include stringpool.h.
8923 Include calls.h.
8924
38b7bc7f
JM
89252013-11-13 Joseph Myers <joseph@codesourcery.com>
8926
8927 * c-common.h (enum rid): Add RID_AUTO_TYPE.
8928 * c-common.c (c_common_reswords): Add __auto_type.
8929 (keyword_begins_type_specifier): Handle RID_AUTO_TYPE.
8930
45b0be94
AM
89312013-11-12 Andrew MacLeod <amacleod@redhat.com>
8932
18f429e2
AM
8933 * c-common.c: Include gimplify.h.
8934 * c-gimplify.c: Likewise.
8935 * cilk.c: Likewise.
8936 * c-omp.c: Include gimple-expr.h instead of gimple.h.
8937 * c-ubsan.c: Don't include gimple.h.
45b0be94 8938
582d9b50
JM
89392013-11-12 Joseph Myers <joseph@codesourcery.com>
8940
8941 * c-common.c (c_common_reswords): Add _Thread_local.
8942
6b28e197
JM
89432013-11-09 Joseph Myers <joseph@codesourcery.com>
8944
8945 * c-common.c (atomic_size_supported_p): New function.
8946 (resolve_overloaded_atomic_exchange)
8947 (resolve_overloaded_atomic_compare_exchange)
8948 (resolve_overloaded_atomic_load, resolve_overloaded_atomic_store):
8949 Use it instead of comparing size with a local list of sizes.
8950
267bac10
JM
89512013-11-07 Andrew MacLeod <amacleod@redhat.com>
8952 Joseph Myers <joseph@codesourcery.com>
8953
8954 * c-common.h (enum rid): Add RID_ATOMIC.
8955 * c-common.c (c_common_reswords): Add _Atomic.
8956 (sync_resolve_params): Use TYPE_MAIN_VARIANT on pointer argument.
8957 (keyword_is_type_qualifier): Accept RID_ATOMIC.
8958 * c-format.c (check_format_types): Check for extra _Atomic
8959 qualifiers in format argument.
8960 * c-pretty-print.c (pp_c_cv_qualifiers): Handle atomic qualifier.
8961 (pp_c_type_qualifier_list): Mention _Atomic in comment.
8962
5157b91e
TB
89632013-11-06 Tobias Burnus <burnus@net-b.de>
8964
8965 * c-common.c (reason_option_codes_t): Add CPP_W_DATE_TIME.
8966
6dbe0958
JM
89672013-11-06 Joseph Myers <joseph@codesourcery.com>
8968
8969 * c-opts.c (c_common_post_options): Set -ffp-contract=off in C
8970 standards modes.
8971 * c-cppbuiltin.c (cpp_iec_559_value): Consider -ffp-contract=fast
8972 to mean lack of IEEE 754 support.
8973
e8ff5196
TB
89742013-11-05 Tobias Burnus <burnus@net-b.de>
8975
8976 * c.opt (-Wdate-time): New option
8977 * c-opts.c (sanitize_cpp_opts): Pass on to libcpp.
8978
254a0760
JM
89792013-11-05 Joseph Myers <joseph@codesourcery.com>
8980
8981 * c-cppbuiltin.c (cpp_iec_559_value): Test
8982 flag_excess_precision_cmdline not flag_excess_precision.
8983
6d7f7e0a
TB
89842013-11-05 Tobias Burnus <burnus@net-b.de>
8985
8986 * c.opt (fopenmp-simd): New option.
8987 * c-pragma.c (omp_pragmas): Move pragmas which can contain simd to ...
8988 (omp_pragmas): ... this new struct.
8989 (c_pp_lookup_pragma): Also walk omp_pragmas.
8990 (init_pragma): Init pragmas for -fopenmp-simd.
8991
55a7f02f
MP
89922013-11-04 Marek Polacek <polacek@redhat.com>
8993
8994 PR c++/58979
8995 * c-common.c (invalid_indirection_error): Handle RO_ARROW_STAR case.
8996
9193fb05
JM
89972013-11-04 Joseph Myers <joseph@codesourcery.com>
8998
8999 * c-cppbuiltin.c (cpp_iec_559_value, cpp_iec_559_complex_value):
9000 New functions.
9001 (c_cpp_builtins): Define __GCC_IEC_559 and __GCC_IEC_559_COMPLEX.
9002
94159ecf
EB
90032013-11-04 Eric Botcazou <ebotcazou@adacore.com>
9004
9005 * c-ada-spec.h (cpp_operation): Add IS_TRIVIAL.
9006 (dump_ada_specs): Adjust prototype of second callback.
9007 * c-ada-spec.c (cpp_check): New global variable.
9008 (dump_ada_nodes): Remove cpp_check parameter and do not pass it down.
9009 (print_generic_ada_decl): Likewise.
9010 (has_static_fields): Change return type to bool and add guard.
9011 (has_nontrivial_methods): New predicate.
9012 (is_tagged_type): Change return type to bool.
9013 (separate_class_package): Call has_nontrivial_methods.
9014 (pp_ada_tree_identifier): Minor tweaks.
9015 (dump_ada_function_declaration): Adjust calls to dump_generic_ada_node.
9016 (dump_ada_array_domains): Likewise.
9017 (dump_ada_array_type): Likewise.
9018 (dump_template_types): Remove cpp_check parameter and do not pass it to
9019 dump_generic_ada_node.
9020 (dump_ada_template): Likewise.
9021 (dump_generic_ada_node): Remove cpp_check parameter and do not pass it
9022 recursively.
9023 (print_ada_methods): Change return type to integer. Remove cpp_check
9024 parameter and do not pass it down.
9025 (dump_nested_types): Remove cpp_check parameter and do not pass it to
9026 dump_generic_ada_node.
9027 (print_ada_declaration): Likewise. Test RECORD_OR_UNION_TYPE_P before
9028 accessing methods.
9029 (print_ada_struct_decl): Remove cpp_check parameter and do not pass it
9030 down. Use has_nontrivial_methods to recognize C++ classes. Use return
9031 value of print_ada_methods.
9032 (dump_ads): Rename cpp_check parameter to check and adjust prototype.
9033 Set cpp_check to it before invoking dump_ada_nodes.
9034 (dump_ada_specs): Likewise.
9035
b906f4ca
MP
90362013-11-03 Marek Polacek <polacek@redhat.com>
9037
9038 * c-ubsan.c: Don't include hash-table.h.
9039 (ubsan_instrument_vla): New function.
9040 * c-ubsan.h: Declare it.
9041
5e20cdc9
DM
90422013-10-31 David Malcolm <dmalcolm@redhat.com>
9043
9044 Automated part of renaming of symtab_node_base to symtab_node.
9045
9046 Patch autogenerated by rename_symtab.py from
9047 https://github.com/davidmalcolm/gcc-refactoring-scripts
9048 revision 58bb219cc090b2f4516a9297d868c245495ee622
9049
9050 * c-pragma.c (maybe_apply_pending_pragma_weaks): Rename
9051 symtab_node_base to symtab_node.
9052
7057e645
ESR
90532013-10-31 Edward Smith-Rowland <3dw4rd@verizon.net>
9054
8e745a17 9055 Implement C++14 digit separators.
7057e645
ESR
9056 * c-lex.c (interpret_float): Remove digit separators from scratch string
9057 before building real literal.
9058
193ea7bc
JJ
90592013-10-30 Jakub Jelinek <jakub@redhat.com>
9060
9061 * cilk.c (create_cilk_helper_decl): Use HOST_WIDE_INT_PRINT_DEC.
9062
939b37da
BI
90632013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
9064
9065 * c-common.c (c_common_reswords[]): Added _Cilk_spawn and _Cilk_sync
9066 fields.
9067 (c_define_builtins): Called cilk_init_builtins if Cilk Plus is
9068 enabled.
9069 * c-common.h (enum rid): Added RID_CILK_SPAWN and RID_CILK_SYNC.
9070 (insert_cilk_frame): New prototype.
9071 (cilk_init_builtins): Likewise.
9072 (gimplify_cilk_spawn): Likewise.
9073 (c_cilk_install_body_w_frame_cleanup): Likewise.
9074 (cilk_detect_spawn_and_unwrap): Likewise.
9075 (cilk_set_spawn_marker): Likewise.
9076 (build_cilk_sync): Likewise.
9077 (build_cilk_spawn): Likewise.
9078 * cilk.c: New file.
9079
67348ccc
DM
90802013-10-29 David Malcolm <dmalcolm@redhat.com>
9081
9082 Patch autogenerated by refactor_symtab.py from
9083 https://github.com/davidmalcolm/gcc-refactoring-scripts
9084 revision 58bb219cc090b2f4516a9297d868c245495ee622
9085
9086 * c-gimplify.c (c_genericize): Update for conversion of symtab types
9087 to a true class hierarchy.
9088 * c-pragma.c (maybe_apply_pending_pragma_weaks): Likewise.
9089
d570872d
RS
90902013-10-27 Richard Sandiford <rdsandiford@googlemail.com>
9091
9092 * c-lex.c (interpret_integer): Remove call to cpp_num_sign_extend.
9093
98906124
JL
90942013-10-26 Jeff Law <law@redhat.com>
9095
adfac8df
JJ
9096 * c-common.c (c_define_builtins): Remove mudflap support.
9097 * c.opt: Ignore and warn for mudflap options.
98906124 9098
d73749df 90992013-10-24 Tobias Burnus <burnus@net-b.de>
8170608b
TB
9100
9101 PR other/33426
9102 * c-pragma.c (init_pragma) Add #pragma ivdep handling.
9103 * c-pragma.h (pragma_kind): Add PRAGMA_IVDEP.
9104
3f04b1bb
JM
91052013-10-23 Jason Merrill <jason@redhat.com>
9106
9107 * c-format.c (gcc_cxxdiag_char_table): Add %X.
9108
acf0174b
JJ
91092013-10-11 Jakub Jelinek <jakub@redhat.com>
9110
acd15a28
JJ
9111 * c-common.h (omp_clause_mask::operator !=): New method.
9112 * c-omp.c (c_omp_split_clauses): Use if ((mask & something) != 0)
9113 instead of if (mask & something) tests everywhere.
9114
acf0174b
JJ
9115 * c-cppbuiltin.c (c_cpp_builtins): Predefine _OPENMP to
9116 201307 instead of 201107.
9117 * c-common.c (DEF_FUNCTION_TYPE_8): Define.
9118 (c_common_attribute_table): Add "omp declare target" and
9119 "omp declare simd" attributes.
9120 (handle_omp_declare_target_attribute,
9121 handle_omp_declare_simd_attribute): New functions.
9122 * c-omp.c: Include c-pragma.h.
9123 (c_finish_omp_taskgroup): New function.
9124 (c_finish_omp_atomic): Add swapped argument, if true,
9125 build the operation first with rhs, lhs arguments and use NOP_EXPR
9126 build_modify_expr.
9127 (c_finish_omp_for): Add code argument, pass it down to make_code.
9128 (c_omp_split_clauses): New function.
9129 (c_split_parallel_clauses): Removed.
9130 (c_omp_declare_simd_clause_cmp, c_omp_declare_simd_clauses_to_numbers,
9131 c_omp_declare_simd_clauses_to_decls): New functions.
9132 * c-common.h (omp_clause_mask): New type.
9133 (OMP_CLAUSE_MASK_1): Define.
9134 (omp_clause_mask::omp_clause_mask, omp_clause_mask::operator &=,
9135 omp_clause_mask::operator |=, omp_clause_mask::operator ~,
9136 omp_clause_mask::operator |, omp_clause_mask::operator &,
9137 omp_clause_mask::operator <<, omp_clause_mask::operator >>,
9138 omp_clause_mask::operator ==): New methods.
9139 (enum c_omp_clause_split): New.
9140 (c_finish_omp_taskgroup): New prototype.
9141 (c_finish_omp_atomic): Add swapped argument.
9142 (c_finish_omp_for): Add code argument.
9143 (c_omp_split_clauses): New prototype.
9144 (c_split_parallel_clauses): Removed.
9145 (c_omp_declare_simd_clauses_to_numbers,
9146 c_omp_declare_simd_clauses_to_decls): New prototypes.
9147 * c-pragma.c (omp_pragmas): Add new OpenMP 4.0 constructs.
9148 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_CANCEL,
9149 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_DECLARE_REDUCTION,
9150 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_SIMD,
9151 PRAGMA_OMP_TARGET, PRAGMA_OMP_TASKGROUP and PRAGMA_OMP_TEAMS.
9152 Remove PRAGMA_OMP_PARALLEL_FOR and PRAGMA_OMP_PARALLEL_SECTIONS.
9153 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_ALIGNED,
9154 PRAGMA_OMP_CLAUSE_DEPEND, PRAGMA_OMP_CLAUSE_DEVICE,
9155 PRAGMA_OMP_CLAUSE_DIST_SCHEDULE, PRAGMA_OMP_CLAUSE_FOR,
9156 PRAGMA_OMP_CLAUSE_FROM, PRAGMA_OMP_CLAUSE_INBRANCH,
9157 PRAGMA_OMP_CLAUSE_LINEAR, PRAGMA_OMP_CLAUSE_MAP,
9158 PRAGMA_OMP_CLAUSE_NOTINBRANCH, PRAGMA_OMP_CLAUSE_NUM_TEAMS,
9159 PRAGMA_OMP_CLAUSE_PARALLEL, PRAGMA_OMP_CLAUSE_PROC_BIND,
9160 PRAGMA_OMP_CLAUSE_SAFELEN, PRAGMA_OMP_CLAUSE_SECTIONS,
9161 PRAGMA_OMP_CLAUSE_SIMDLEN, PRAGMA_OMP_CLAUSE_TASKGROUP,
9162 PRAGMA_OMP_CLAUSE_THREAD_LIMIT, PRAGMA_OMP_CLAUSE_TO and
9163 PRAGMA_OMP_CLAUSE_UNIFORM.
9164
826cacfe
MG
91652013-10-09 Marc Glisse <marc.glisse@inria.fr>
9166
9167 PR tree-optimization/20318
9168 * c-common.c (handle_returns_nonnull_attribute): New function.
9169 (c_common_attribute_table): Add returns_nonnull.
9170
2284b034
MG
91712013-10-03 Marc Glisse <marc.glisse@inria.fr>
9172
9173 PR c++/19476
9174 * c.opt (fcheck-new): Move to common.opt.
9175
b56e9788
MP
91762013-09-25 Marek Polacek <polacek@redhat.com>
9177 Jakub Jelinek <jakub@redhat.com>
9178
9179 PR sanitizer/58413
9180 * c-ubsan.c (ubsan_instrument_shift): Don't instrument
9181 an expression if we can prove it is correct.
9182 (ubsan_instrument_division): Likewise. Remove unnecessary
9183 check.
9184
ce6923c5
MP
91852013-09-18 Marek Polacek <polacek@redhat.com>
9186
9187 PR sanitizer/58411
9188 * c-common.c (handle_no_sanitize_undefined_attribute): New function.
9189 Declare it.
9190 (struct attribute_spec c_common_att): Add no_sanitize_undefined.
9191
fb5610fb
IS
91922013-09-14 Iain Sandoe <iain@codesourcery.com>
9193
9194 PR target/48094
9195 * c.opt (fgnu-runtime, fnext-runtime, fobjc-abi-version,
9196 fobjc-gc, freplace-objc-classes): Accept for LTO.
9197
88b0e79e
JC
91982013-09-13 Jacek Caban <jacek@codeweavers.com>
9199
9200 * c-target.def: New hook
9201
c9b0866a
PC
92022013-09-09 Paolo Carlini <paolo.carlini@oracle.com>
9203
9204 PR c++/43452
9205 * c.opt (Wdelete-incomplete): Add.
9206
0af94e6f
JR
92072013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
9208
9209 * c-common.c (same_scalar_type_ignoring_signedness): Delete.
9210 (vector_types_compatible_elements_p): New function.
9211 * c-common.h: (same_scalar_type_ignoring_signedness): Delete
9212 declaration.
9213 (vector_types_compatible_elements_p): Declare.
9214
7c26172c
GDR
92152013-09-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
9216
9217 * c-pretty-print.h (c_pretty_printer::simple_type_specifier): Now
9218 a virtual member function.
9219 (pp_simple_type_specifier): Remove.
9220 (pp_c_type_specifier): Likewise.
9221 * c-pretty-print.c (c_pretty_printer::simple_type_specifier):
9222 Rename from pp_c_type_specifier. Adjust.
9223 (c_pretty_printer::c_pretty_printer): Do not assign to
9224 simple_type_specifier.
9225
20059c8b
GDR
92262013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
9227
9228 * c-pretty-print.h (c_pretty_printer::type_id): Now a virtual
9229 member function.
9230 (c_pretty_printer::storage_class_specifier): Likewise.
9231 (c_pretty_printer::initializer): Likewise.
9232 (pp_declaration): Remove.
9233 (pp_declaration_specifiers): Likewise.
9234 (pp_abstract_declarator): Likewise.
9235 (pp_declarator): Likewise.
9236 (pp_type_id): Likewise.
9237 (pp_statement): Likewise.
9238 (pp_constant): Likewise.
9239 (pp_id_expression): Likewise.
9240 (pp_primary_expression): Likewise.
9241 (pp_unary_expression): Likewise.
9242 (pp_multiplicative_expression): Likewise.
9243 (pp_conditional_expression): Likewise.
9244 (pp_assignment_expression): Likewise.
9245 (pp_expression): Likewise.
9246 (pp_c_type_id): Likewise.
9247 (pp_c_storage_class_specifier): Likewise.
9248 * c-pretty-print.c (pp_c_type_cast): Tidy.
9249 (pp_c_pointer): Likewise.
9250 (pp_c_type_specifier): Likewise.
9251 (pp_c_parameter_type_list): Likewise.
9252 (pp_c_function_definition): Likewise.
9253 (pp_c_init_declarator): Likewise.
9254 (pp_c_initializer_list): Likewise.
9255 (pp_c_constructor_elts): Likewise.
9256 (c_pretty_printer::direct_abstract_declarator): Likewise.
9257 (c_pretty_printer::declaration_specifiers): Likewise.
9258 (c_pretty_printer::primary_expression): Likewise.
9259 (c_pretty_printer::postfix_expression): Likewise.
9260 (c_pretty_printer::type_id): Rename from pp_c_type_id.
9261 (c_pretty_printer::storage_class_specifier): Rename from
9262 pp_c_storage_class_specifier.
9263 (c_pretty_printer::initializer): Rename from pp_c_initializer.
9264 (c_pretty_printer::c_pretty_printer): Do not assign to type_id,
9265 storage_class_specifier, initializer, offset_list, flags.
9266
de5a5fa1
MP
92672013-08-30 Marek Polacek <polacek@redhat.com>
9268
9269 * c-ubsan.c: New file.
9270 * c-ubsan.h: New file.
9271
8f0e4d72
GDR
92722013-08-30 Gabriel Dos Reis <gdr@integrable-solutions.net>
9273
9274 * c-pretty-print.h (c_pretty_printer::declaration): Now a virtual
9275 member function.
9276 (c_pretty_printer::declaration_specifiers): Likewise.
9277 (c_pretty_printer::declarator): Likewise.
9278 (c_pretty_printer::abstract_declarator): Likewise.
9279 (c_pretty_printer::direct_abstract_declarator): Likewise.
9280 (c_pretty_printer::direct_declarator): Likewise.
9281 (c_pretty_printer::function_specifier): Likewise.
9282 (pp_declaration): Adjust.
9283 (pp_declaration_specifiers): Likewise.
9284 (pp_abstract_declarator): Likewise.
9285 (pp_direct_declarator): Likewise.
9286 (pp_function_specifier): Likewise.
9287 (pp_direct_abstract_declarator): Remove as unused.
9288 (pp_c_declaration): Remove.
9289 (pp_c_declaration_specifiers): Likewise.
9290 (pp_c_declarator): Likewise.
9291 (pp_c_direct_declarator): Likewise.
9292 (pp_c_function_specifier): Likewise.
9293 (pp_c_direct_abstract_declarator): Likewise.
9294 * c-pretty-print.c (c_pretty_printer::abstract_declarator): Rename
9295 from pp_c_abstract_declarator. Adjust.
ab20d992 9296 (c_pretty_printer::direct_abstract_declarator): Rename from
8f0e4d72
GDR
9297 pp_c_direct_abstract_declarator. Adjust.
9298 (c_pretty_printer::function_specifier): Rename from
9299 pp_c_function_specifier. Adjust.
9300 (c_pretty_printer::declaration_specifiers): Rename from
9301 pp_c_declaration_specifiers. Adjust.
9302 (c_pretty_printer::direct_declarator): Rename from
9303 pp_c_direct_declarator. Adjust.
9304 (c_pretty_printer::declarator): Rename from pp_c_declarator. Adjust.
9305 (c_pretty_printer::declaration): Rename from pp_c_declaration. Adjust.
9306 (c_pretty_printer::c_pretty_printer): Do not assign to
9307 declaration, declaration_specifiers, declarator,
9308 direct_declarator, direct_abstract_declarator, function_specifier.
9309
00d34d3a
GDR
93102013-08-26 Gabriel Dos Reis <gdre@integrable-solutions.net>
9311
9312 * c-pretty-print.h (c_pretty_printer::unary_expression): Now a
9313 virtual member function.
9314 (c_pretty_printer::multiplicative_expression): Likewise.
9315 (c_pretty_printer::conditional_expression): Likewise.
9316 (c_pretty_printer::assignment_expression): Likewise.
9317 (c_pretty_printer::expression): Likewise.
9318 (pp_unary_expression): Adjust.
9319 (pp_multiplicative_expression): Likewise.
9320 (pp_assignment_expression): Likewise.
9321 (pp_conditional_expression): Likewise.
9322 (pp_expression): Likewise.
9323 * c-pretty-print.c (c_pretty_printer::unary_expression): Rename
9324 from pp_c_unary_expression. Adjust.
9325 (c_pretty_printer::multiplicative_expression): Rename from
9326 pp_c_multiplicative_expression. Adjust.
9327 (c_pretty_printer::conditional_expression): Rename from
9328 pp_c_conditional_expression. Adjust.
9329 (c_pretty_printer::assignment_expression): Rename from
9330 pp_c_assignment_expression. Adjust.
9331 (c_pretty_printer::expression): Rename from pp_c_expression. Adjust.
9332 (c_pretty_printer::c_pretty_printer): Do not assign to
9333 unary_expression, multiplicative_expression,
9334 conditional_expression, expression.
9335
fb22178f
GDR
93362013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
9337
9338 * c-pretty-print.h (c_pretty_printer::postfix_expression): Now a
9339 virtual member function.
9340 (pp_postfix_expression): Adjust.
9341 (pp_c_postfix_expression): Remove.
9342 * c-pretty-print.c (c_pretty_printer::postfix_expression): Rename
9343 from pp_c_postfix_expression. Adjust.
9344 (c_pretty_printer::c_pretty_printer): Do not assign to
9345 postfix_expression.
9346
7ecc2600
GDR
93472013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
9348
9349 * c-pretty-print.h (c_pretty_printer::primary_expression): Now a
9350 virtua member function.
9351 (pp_primary_expression): Adjust.
9352 (pp_c_primary_expression): Remove.
9353 * c-pretty-print.c (c_pretty_printer::primary_expression): Rename
9354 from pp_c_primary_expression. Adjust.
9355 (pp_c_initializer_list): Use pp_primary_expression.
9356 (c_pretty_printer::c_pretty_printer): Do not assign to
9357 primary_expression.
9358
0691175f
GDR
93592013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
9360
9361 * c-pretty-print.h (c_pretty_printer::translate_string): Declare.
9362 * c-pretty-print.c (M_): Remove.
9363 (c_pretty_printer::translate_string): Define.
9364 (pp_c_type_specifier): Use it.
9365 (pp_c_primary_expression): Likewise.
9366 (pp_c_expression): Likewise.
9367
66dfe4c4
GDR
93682013-08-24 Gabriel Dos Reis <gdr@integrable-solutions.net>
9369
9370 * c-pretty-print.h (c_pretty_printer::id_expression): Now a
9371 virtual function.
9372 (pp_c_id_expression): Remove.
9373 (pp_id_expression): Adjust.
9374 * c-pretty-print.c (c_pretty_printer::id_expression): Rename from
9375 pp_c_id_expression. Adjust.
9376 (pp_c_postfix_expression): Use pp_id_expression.
9377 (c_pretty_printer::c_pretty_printer): Do not assign to id_expression.
9378
ca43e9d5
GDR
93792013-08-24 Gabriel Dos Reis <gdr@integrable-solutions.net>
9380
9381 * c-pretty-print.h (c_pretty_printer::constant): Now a virtual
9382 member function.
9383 (pp_constant): Adjust.
9384 (pp_c_constant): Remove.
9385 * c-pretty-print.c (c_pretty_printer::constant): Rename from
9386 pp_c_constant. Adjust.
9387 (pp_c_constant)
9388 (pp_c_primary_expression): Call pp_constant in lieu of pp_c_constant.
9389 (c_pretty_printer::c_pretty_printer): Remove assignment to constant.
9390
da6ca2b5
GDR
93912013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
9392
9393 * c-pretty-print.h (pp_c_pretty_printer_init): Remove.
9394 (c_pretty_printer::c_pretty_printer): Declare.
9395 * c-pretty-print.c (pretty_printer::c_pretty_printer): Rename from
9396 c_pretty_printer_init. Adjust.
9397 (print_c_tree): Do not call c_pretty_printer_init.
9398 * c-ada-spec.c (dump_ads): Remove call to pp_construct.
9399
65a372f4
AC
94002013-08-09 Arnaud Charlet <charlet@adacore.com>
9401
9402 * c-ada-spec.c (print_ada_declaration): Prevent accessing null asm name
9403
fd9b0f32
PC
94042013-08-05 Paolo Carlini <paolo.carlini@oracle.com>
9405
9406 PR c++/58080
9407 * c-common.c (pointer_int_sum): Add bool parameter.
9408 * c-common.h (pointer_int_sum): Adjust declaration.
9409
e0aec1e9
GDR
94102013-08-05 Gabriel Dos Reis <gdr@integrable-solutions.net>
9411
9412 * c-pretty-print.c (print_c_tree): Simplify. Use non-static local
9413 c_pretty_printer variable.
9414
b066401f
GDR
94152013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
9416
9417 * c-pretty-print.h (c_pretty_printer): Derive from pretty_printer.
9418 (pp_base): Remove.
9419 (pp_c_base): Likewise. Adjust users.
9420 * c-pretty-print.c (pp_c_maybe_whitespace): Adjust.
9421 (pp_c_whitespace): Do not call pp_base.
9422 (pp_c_left_paren): Likewise.
9423 (pp_c_right_paren): Likewise.
9424 (pp_c_left_brace): Likewise.
9425 (pp_c_right_brace): Likewise.
9426 (pp_c_left_bracket): Likewise.
9427 (pp_c_right_bracket): Likewise.
9428 (pp_c_dot): Likewise.
9429 (pp_c_ampersand): Likewise.
9430 (pp_c_star): Likewise.
9431 (pp_c_arrow): Likewise.
9432 (pp_c_semicolon): Likewise.
9433 (pp_c_complement): Likewise.
9434 (pp_c_exclamation): Likewise.
9435 (pp_c_direct_declarator): Likewise.
9436 (pp_c_ws_string): Likewise.
9437 (pp_c_identifier): Likewise.
9438 (pp_c_statement): Likewise.
9439 (print_c_tree): Likewise.
9440
65e5a578
ESR
94412013-08-04 Ed Smith-Rowland <3dw4rd@verizon.net>
9442
9443 PR c++/58072
9444 * c-common.c (c_parse_error): Catch user-defined literal tokens and
9445 provide useful error strings.
9446
137a1a27
GDR
94472013-08-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
9448
9449 * c-ada-spec.c (pp_ada_tree_identifier): Use specialized pretty
9450 printer functions instead of pp_string or operators and punctuators.
9451 (dump_generic_ada_node): Likewise.
9452 * c-pretty-print.c (pp_c_type_specifier): Likewise.
9453 (pp_c_relational_expression): Likewise.
9454 (pp_c_logical_or_expression): Likewise.
9455
07838b13
GDR
94562013-08-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
9457
9458 * c-ada-spec.c (print_ada_macros): Use specialized pretty printer
9459 functions instead of pp_character.
9460 (pp_ada_tree_identifier): Likewise.
9461 (dump_ada_double_name): Likewise.
9462 (dump_ada_function_declaration): Likewise.
9463 (dump_ada_array_domains): Likewise.
9464 (dump_template_types): Likewise.
9465 (dump_generic_ada_node): Likewise.
9466 (print_ada_declaration): Likewise.
9467 (print_ada_struct_decl): Likewise.
9468 * c-pretty-print.c (pp_c_integer_constant): Likewise.
9469
433cc7b0
TT
94702013-07-23 Tom Tromey <tromey@redhat.com>
9471
9472 * c-common.h (enum rid) <RID_GENERIC>: New constant.
9473 * c-common.c (c_common_reswords): Add _Generic.
9474
688010ba
OB
94752013-07-21 OndÅ\99ej Bílka <neleai@seznam.cz>
9476
9477 * c-common.c: Fix typos.
9478 * c-common.h: Likewise.
9479
2a99e5e6
LL
94802013-07-13 Lubos Lunak <l.lunak@suse.cz>
9481
9482 PR c++/55203
9483 * c-common.c (c_common_attribute_table): Add warn_unused.
9484 (handle_warn_unused_attribute): New.
9485
c26302d5
JJ
94862013-07-10 Jakub Jelinek <jakub@redhat.com>
9487
9488 * c-ppoutput.c (scan_translation_unit): Call account_for_newlines
9489 for all CPP_TOKEN_FLD_STR tokens, not just CPP_COMMENT.
9490
dfeadaa0
PC
94912013-07-10 Paolo Carlini <paolo.carlini@oracle.com>
9492
9493 PR c++/57869
9494 * c.opt: Add Wconditionally-supported.
9495
6a2fa4b2
GS
94962013-07-08 Graham Stott <graham.stott@btinternet.com>
9497
adfac8df 9498 * array-notation-common.c (length_mismatch_in_expr_p): Delete
6a2fa4b2
GS
9499 unused variables l_length and l_node.
9500
ecdbd01a 95012013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
40d3d530
JR
9502
9503 PR c/57821
9504 * c-common.c (complete_array_type): Delay folding first index
9505 like other indices. When folding, check for index overflow.
9506
bedc293e
MG
95072013-06-27 Marc Glisse <marc.glisse@inria.fr>
9508
9509 PR c++/57509
9510 * c-common.h (c_build_vec_perm_expr): New complain argument.
9511 * c-common.c (c_build_vec_perm_expr): Likewise.
9512 Use save_expr also in C++.
9513
604b2bfc
GDR
95142013-06-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
9515
9516 * c-common.c (c_common_nodes_and_builtins): Use cxx11 in lieu of cxx0x.
9517 * c-cppbuiltin.c (c_cpp_builtins): Likewise.
9518 * c-opts.c (c_common_post_options): Likewise.
9519
dfeadaa0 95202013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
713b46fa
BI
9521
9522 * array-notation-common.c (length_mismatch_in_expr): Changed the
9523 parameter type's from a dynamic array to a vec_tree. Also removed
9524 the size parameters.
9525 * c-common.h (length_mismatch_in_expr_p): Fixed prototype's as per
9526 the change above.
9527
2ce86d2e
BI
95282013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
9529
9530 * c-common.h (struct cilkplus_an_parts): New structure.
9531 (struct cilkplus_an_loop_parts): Likewise.
9532 (cilkplus_extract_an_triplets): New prototype.
9533 (fix_sec_implicit_args): Likewise.
9534 * array-notation-common.c (cilkplus_extract_an_triplets): New function.
9535 (fix_sec_implicit_args): Likewise.
604b2bfc 9536
07a6825b
BI
95372013-06-20 Balaji V. Iyer <balaji.v.iyer@intel.com>
9538
9539 * array-notation-common.c (find_inv_trees): Removed an unwanted
9540 typecasting.
9541 * c-common.h (struct inv_list::additional_tcodes): Changed type from
9542 enum rid to enum tree_code.
9543
08346abd
JH
95442013-06-11 Jan Hubicka <jh@suse.cz>
9545
9546 * c-common.c (handle_alias_ifunc_attribute): Do not set
9547 DECL_EXTERNAL for weakref variables.
9548 * c-pragma.c (handle_pragma_weak): Make sure aliases
9549 are not declared as external.
9550
d60f1706
BI
95512013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
9552
9553 * array-notation-common.c (length_mismatch_in_expr_p): Moved this
9554 function from c/c-array-notation.c.
9555 (is_cilkplus_reduce_builtin): Likewise.
9556 (find_rank): Likewise.
9557 (extract_array_notation_exprs): Likewise.
9558 (replace_array_notations): Likewise.
9559 (find_inv_trees): Likewise.
9560 (replace_inv_trees): Likewise.
9561 (contains_array_notation_expr): Likewise.
9562 (find_correct_array_notation_type): Likewise.
9563 * c-common.h (struct inv_list): Moved this struct from the file
9564 c/c-array-notation.c and added a new field called additional tcodes.
9565 (length_mismatch_in_expr_p): New prototype.
9566 (is_cilkplus_reduce_builtin): Likewise.
9567 (find_rank): Likewise.
9568 (extract_array_notation_exprs): Likewise.
9569 (replace_array_notation): Likewise.
9570 (find_inv_trees): Likewise.
9571 (replace_inv_trees): Likewise.
9572 (find_correct_array_notation_type): Likewise.
dfeadaa0 9573
36536d79
BI
95742013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
9575
9576 * c-common.c (c_define_builtins): When cilkplus is enabled, the
9577 function array_notation_init_builtins is called.
9578 (c_common_init_ts): Added ARRAY_NOTATION_REF as typed.
9579 * c-common.def (ARRAY_NOTATION_REF): New tree.
9580 * c-common.h (build_array_notation_expr): New function declaration.
9581 (build_array_notation_ref): Likewise.
9582 (extract_sec_implicit_index_arg): New extern declaration.
9583 (is_sec_implicit_index_fn): Likewise.
9584 (ARRAY_NOTATION_CHECK): New define.
9585 (ARRAY_NOTATION_ARRAY): Likewise.
9586 (ARRAY_NOTATION_START): Likewise.
9587 (ARRAY_NOTATION_LENGTH): Likewise.
9588 (ARRAY_NOTATION_STRIDE): Likewise.
9589 * c-pretty-print.c (pp_c_postifix_expression): Added a new case for
9590 ARRAY_NOTATION_REF.
9591 (pp_c_expression): Likewise.
9592 * c.opt (flag_enable_cilkplus): New flag.
9593 * array-notation-common.c: New file.
9594
f7716d57
JJ
95952013-05-14 Jakub Jelinek <jakub@redhat.com>
9596
9597 PR c++/57274
9598 * c-common.c (verify_tree): Don't recurse into SIZEOF_EXPR.
9599
a5e0cd1d
MG
96002013-05-10 Marc Glisse <marc.glisse@inria.fr>
9601
9602 * c-common.c (vector_types_convertible_p): No TYPE_PRECISION for
9603 vectors.
9604
f6bc1c4a
HS
96052013-05-07 Han Shen <shenhan@google.com>
9606
9607 * c-cppbuiltin.c (c_cpp_builtins): Added "__SSP_STRONG__=3".
9608
3f12f6e9
SKS
96092013-04-29 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
9610
9611 * c-common.c (check_user_alignment): Emit error for negative values.
9612
61949153
PC
96132013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
9614
9615 * c-opts.c (set_std_cxx11): Use CLK_CXX1Y and CLK_GNUCXX1Y.
9616
e93e18e9
PC
96172013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
9618
9619 * c-cppbuiltin.c (c_cpp_builtins): Do not define
9620 __GXX_EXPERIMENTAL_CXX1Y__.
9621
44d90fe1 96222013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
8e745a17 9623 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
44d90fe1
PC
9624
9625 * c.opt ([Wpointer-arith]): Enabled by -Wpedantic, as documented.
9626 * c-common.c (pointer_int_sum): Change -Wpointer-arith pedwarns
9627 to simply use OPT_Wpointer_arith.
9628 (c_sizeof_or_alignof_type): Likewise.
9629
13f39b2e
PC
96302013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
9631
9632 * c-cppbuiltin.c (c_cpp_builtins): Define __GXX_EXPERIMENTAL_CXX1Y__.
9633
4b84d650
JJ
96342013-04-12 Jakub Jelinek <jakub@redhat.com>
9635
9636 * c-format.c (gcc_diag_char_table, gcc_tdiag_char_table,
9637 gcc_cdiag_char_table, gcc_cxxdiag_char_table): Add %r and %R format
9638 specifiers.
9639
fb037b5d
SB
96402013-04-07 Steven Bosscher <steven@gcc.gnu.org>
9641
9642 * c-pragma.c (add_to_renaming_pragma_list): Fix leading comment.
9643
4e856798
PC
96442013-04-03 Paolo Carlini <paolo.carlini@oracle.com>
9645
9646 * c-common.c (pointer_int_sum): Remove dead code.
9647
4b1baac8
RS
96482013-03-09 Richard Sandiford <rdsandiford@googlemail.com>
9649
9650 PR middle-end/56524
9651 * c-common.c (handle_optimize_attribute): Don't call
9652 save_optabs_if_changed.
9653
0b50e654
JJ
96542013-03-05 Jakub Jelinek <jakub@redhat.com>
9655
9656 PR middle-end/56461
9657 * c-pch.c (pch_init): Free target_validity at the end.
9658
48c41403
JJ
96592013-03-04 Jakub Jelinek <jakub@redhat.com>
9660
9661 * c-pretty-print.c (pp_c_pretty_printer_init): Clear pp->flags.
9662
e664c61c
KS
96632013-02-28 Konstantin Serebryany <konstantin.s.serebryany@gmail.com>
9664 Jakub Jelinek <jakub@redhat.com>
9665
9666 PR sanitizer/56454
9667 * c-common.c (handle_no_sanitize_address_attribute): New function.
9668 (c_common_attribute_table): Add no_sanitize_address attribute.
9669 (handle_no_address_safety_analysis_attribute): Add
9670 no_sanitize_address attribute, not no_address_safety_analysis
9671 attribute.
9672
a475fd3d 96732013-02-18 Aldy Hernandez <aldyh@redhat.com>
135204dd
AH
9674
9675 PR target/52555
9676 * c-common.c (handle_optimize_attribute): Call
9677 save_optabs_if_changed.
9678
f6007d99
JJ
96792013-02-18 Jakub Jelinek <jakub@redhat.com>
9680 Steven Bosscher <steven@gcc.gnu.org>
9681
9682 PR pch/54117
9683 * c-opts.c (c_common_post_options): If debug info is enabled
9684 and non-dwarf*, refuse to load PCH files and when writing PCH
9685 file warn.
9686
cf35e2b1
JJ
96872013-02-05 Jakub Jelinek <jakub@redhat.com>
9688
9689 PR middle-end/56167
9690 * c-common.c (handle_error_attribute): Fix condition.
9691
32887460
JJ
96922013-01-30 Jakub Jelinek <jakub@redhat.com>
9693
9694 PR c++/55742
9695 * c-common.c (handle_target_attribute): Revert 2012-12-26 change.
9696
5af057d8
JM
96972013-01-18 Jason Merrill <jason@redhat.com>
9698
9699 PR target/54908
9700 * c.opt (-fextern-tls-init): New.
9701 * c-opts.c (c_common_post_options): Handle it.
9702
cc83c823
JJ
97032013-01-09 Jakub Jelinek <jakub@redhat.com>
9704
9705 PR c/48418
9706 * c-common.c (c_fully_fold_internal): Warn for LSHIFT_EXPR and
9707 RSHIFT_EXPR, if orig_op1 isn't INTEGER_CST, op1 is INTEGER_CST
9708 and is either negative or bigger or equal to type precision
9709 of the first operand.
9710
a859517f
MP
97112012-12-03 Marek Polacek <polacek@redhat.com>
9712
9713 PR c/55570
9714 * c-common.c (check_user_alignment): Swap order of tests,
9715 check TREE_CODE first.
9716
2d7aa578
ESR
97172012-11-29 Ed Smith-Rowland <3dw4rd@verizon.net>
9718
9719 PR c++/52654
9720 * c-common.h (overflow_type): New enum.
9721 (build_userdef_literal): Add overflow_type argument.
9722 (tree_userdef_literal): Add overflow_type.
9723 (USERDEF_LITERAL_OVERFLOW): New access macro.
9724 * c-common.c (build_userdef_literal): Add overflow_type
9725 argument.
9726 * c-lex.c (c_lex_with_flags): Add overflow_type to
9727 build_userdef_literal calls.
9728 (interpret_integer, interpret_float): Add overflow_type argument.
9729
cc3c4f62
RB
97302012-11-28 Richard Biener <rguenther@suse.de>
9731
9732 PR c/35634
9733 * c-gimplify.c (c_gimplify_expr): Gimplify self-modify expressions
9734 here and use a type with proper overflow behavior for types that would
9735 need to be promoted for the arithmetic.
9736
77bc5132
JJ
97372012-11-23 Jakub Jelinek <jakub@redhat.com>
9738
9739 PR sanitizer/55435
9740 * c-common.c (handle_no_address_safety_analysis_attribute): New
9741 function.
9742 (c_common_attribute_table): Add no_address_safety_analysis.
9743
5dc99c46
SB
97442012-11-16 Simon Baldwin <simonb@google.com>
9745
9746 * c.opt: Add f[no-]canonical-system-headers.
9747 * c-opts.c (c_common_handle_option): Handle
9748 OPT_fcanonical_system_headers.
9749
a4a0016d
ESR
97502012-11-09 Ed Smith-Rowland <3dw4rd@verizon.net>
9751
9752 PR c++/54413
9753 * c-opts.c (c_common_handle_option): Set new flags.
9754 * c.opt: Describe new flags.
9755
7dbb85a7
JM
97562012-11-09 Jason Merrill <jason@redhat.com>
9757
9758 * c.opt (Wabi-tag): New.
9759
ad7bac31
AK
97602012-11-09 Andi Kleen <ak@linux.intel.com>
9761
9762 PR 55139
9763 * c-common.c (get_atomic_generic_size): Mask with
8e745a17 9764 MEMMODEL_MASK
ad7bac31 9765
7332899a
MLI
97662012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
9767
9768 PR c/53063
9769 * c.opt (Wformat): Make it Alias Wformat=1.
9770 (Wformat-contains-nul,Wformat-extra-args,Wformat-nonliteral,
9771 Wformat-security,Wformat-y2k,Wformat-zero-length): Use
9772 LangEnabledBy.
9773 (Wformat=): RejectNegative. Use LangEnabledBy.
9774 (Wnonnull): Use LangEnabledBy.
9775 * c-opts.c (c_common_handle_option): Do not handle Wformat here.
9776 * c-format.c (set_Wformat): Delete.
9777 (decode_format_attr): Replace OPT_Wformat with OPT_Wformat_.
ab20d992
JJ
9778 (maybe_read_dollar_number): Likewise.
9779 (avoid_dollar_number): Likewise.
9780 (finish_dollar_format_checking): Likewise.
9781 (check_format_info): Likewise.
9782 (check_format_info_main): Likewise.
9783 (check_format_types): Likewise.
9784 (format_type_warning): Likewise.
9785 * c-common.c (int): Likewise.
9786 (check_function_sentinel): Likewise.
8e745a17 9787 * c-common.h (warn_format,set_Wformat): Do not declare here.
7332899a 9788
34a180a6
MLI
97892012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
9790
9791 PR c/53063
9792 * c.opt(Warray-bounds,Wdelete-non-virtual-dtor,Wenum-compare,
9793 Wmain,Woverlength-strings, Wunknown-pragmas,Wunused-macros):
9794 Use LangEnabledBy.
9795 (Wswitch,Wswitch-default,Wswitch-enum): Likewise. Move here from
9796 common.opt.
9797 (Wvariadic-macros): Init(1).
9798 * c-opts.c (c_common_handle_option): Do not handle them
9799 explicitly.
9800 (c_common_post_options): Likewise.
9801 (sanitize_cpp_opts): warn_unused_macros is now
9802 cpp_warn_unused_macros.
9803 (push_command_line_include): Likewise.
9804 * c-common.c (warn_unknown_pragmas): Do not define.
9805 * c-common.h (warn_unknown_pragmas): Do not declare.
9806
3f46d6a5
MLI
98072012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
9808
9809 PR c/51294
9810 * c-common.c (conversion_warning): Handle conditional expressions.
9811
880661a4
JW
98122012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
9813
9814 PR c++/54930
9815 * c.opt (Wreturn_local_addr): Define new option.
9816
4514a96b
JM
98172012-10-25 Jason Merrill <jason@redhat.com>
9818
f14edc1a
JM
9819 * c.opt (Wvirtual-move-assign): New.
9820
4514a96b
JM
9821 * c.opt (Winherited-variadic-ctor): New.
9822
93100c6b
MG
98232012-10-25 Marc Glisse <marc.glisse@inria.fr>
9824
9825 PR c++/54427
9826 * c-common.c (scalar_to_vector): Handle VEC_COND_EXPR.
9827
1efcb8c6
JM
98282012-10-23 Joseph Myers <joseph@codesourcery.com>
9829
9830 * c-common.h (pch_cpp_save_state): Declare.
9831 * c-target.def (c_preinclude): New hook.
9832 * c-opts.c (done_preinclude): New.
9833 (push_command_line_include): Handle default preincluded header.
9834 (cb_file_change): Call pch_cpp_save_state when calling
9835 push_command_line_include.
9836 * c-pch.c (pch_ready_to_save_cpp_state, pch_cpp_state_saved)
9837 (pch_cpp_save_state): New.
9838 (pch_init): Call pch_cpp_save_state conditionally, instead of
9839 calling cpp_save_state.
9840
4a0ae68e
MLI
98412012-10-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
9842
9843 PR c/53063
9844 PR c/40989
9845 * c.opt (Waddress,Wchar-subscripts,Wsign-conversion,Wimplicit,
9846 Wimplicit-function-declaration,Wimplicit-int,Wsizeof-pointer-memaccess,
9847 Wnarrowing,Wparentheses,Wpointer-sign,Wreturn-type,Wsequence-point,
9848 Wsign-compare,Wuninitialized,Wmaybe-uninitialized,Wunused,
9849 Wvolatile-register-var): Add LangEnabledBy or EnabledBy.
9850 * c-opts.c (c_common_handle_option): Remove explicit handling from
9851 here.
9852 (c_common_post_options): Likewise.
9853
67e4210b
EB
98542012-10-18 Eric Botcazou <ebotcazou@adacore.com>
9855
9856 * c-ada-spec.c (LOCATION_COL): Delete.
9857 (compare_location): New function.
9858 (compare_node): Use it.
9859 (compare_comment): Likewise.
9860
65d4f2cd
MLI
98612012-10-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
9862
9863 PR c/53063
9864 PR c/40989
9865 * c.opt (Wstrict-aliasing=,Wstrict-overflow=): Use LangEnabledBy.
9866 * c-opts.c (c_common_handle_option): Do not set them here. Add
9867 comment.
9868 (c_common_post_options): Likewise.
9869
909881cb
EB
98702012-10-16 Eric Botcazou <ebotcazou@adacore.com>
9871
9872 * c-ada-spec.c (ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX): Define.
9873 (dump_generic_ada_node) <INTEGER_CST>: Deal with sizetype specially.
9874 Remove POINTER_TYPE handling, add large unsigned handling and use
9875 ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX for big numbers.
9876
3a785c97
JJ
98772012-10-12 Jakub Jelinek <jakub@redhat.com>
9878
9879 PR c/54381
9880 * c-common.h (sizeof_pointer_memaccess_warning): Adjust prototype.
9881 * c-common.c (sizeof_pointer_memaccess_warning): Take array of 3
9882 locs and array of 3 trees instead of just single loc and single
9883 sizeof_arg tree. Handle __builtin___*_chk builtins too, and
9884 also stpncpy, bcopy, bcmp, bzero, snprintf and vsnprintf builtins.
9885 For *cmp* builtins that take two sources strings report warnings
9886 about first and second source, not about destination and source.
9887
5e54f81d
MG
98882012-10-12 Marc Glisse <marc.glisse@inria.fr>
9889
9890 PR c++/53055
9891 * c-common.h (enum ref_operator) [RO_ARROW_STAR]: New.
9892
f5b02f1e
EB
98932012-10-11 Eric Botcazou <ebotcazou@adacore.com>
9894
9895 * c-ada-spec.c (dump_ada_template): Bail out for template declarations
9896 declaring something coming from another file.
9897
b46dbc6c
AC
98982012-10-10 Arnaud Charlet <charlet@adacore.com>
9899
f5b02f1e 9900 PR ada/54845
b46dbc6c
AC
9901 * c-ada-spec.c (print_ada_struct_decl): Increase buf size.
9902
5d9de0d0
PC
99032012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
9904
9905 PR c++/54194
9906 * c-common.c (warn_about_parentheses): Add location_t parameter;
9907 use EXPR_LOC_OR_LOC.
9908 * c-common.h: Update declaration.
9909
a212e43f
MG
99102012-10-09 Marc Glisse <marc.glisse@inria.fr>
9911
9912 PR c++/54427
9913 * c-common.c (scalar_to_vector): Moved from c-typeck.c. Support
9914 more operations. Make error messages optional.
9915 * c-common.h (enum stv_conv): Moved from c-typeck.c.
9916 (scalar_to_vector): Declare.
9917
b1db7f91
JM
99182012-10-08 Jason Merrill <jason@redhat.com>
9919
9920 * c-common.c (c_common_reswords): Add thread_local.
9921
e28d52cf
DS
99222012-10-08 Dodji Seketeli <dodji@redhat.com>
9923
9924 PR c++/53528 C++11 attribute support
9925 * c-common.h (bitfield_p, cxx_fundamental_alignment_p): Declare
9926 new functions.
9927 * c-common.c (check_cxx_fundamental_alignment_constraints): New
9928 static function.
9929 (handle_aligned_attribute): In choose strictest alignment
9930 among many. Use new check_cxx_fundamental_alignment_constraints.
9931 (handle_transparent_union_attribute): In c++11 attribute syntax,
9932 don't look through typedefs.
9933
3b78de56
AC
99342012-10-04 Arnaud Charlet <charlet@adacore.com>
9935
9936 * c-ada-spec.c (print_ada_declaration): Remove handling of TDF_RAW.
9937 * c.opt (-fdump-ada-spec, -fdump-ada-spec-slim): Move switch definition
9938 out of dumpfile.h.
9939
6040bb5f
DC
99402012-09-25 Dehao Chen <dehao@google.com>
9941
9942 PR middle-end/54645
3b78de56 9943 * c-pch.c (c_common_read_pch): Rebuild the location_adhoc_data
6040bb5f
DC
9944 map when read in the pch.
9945
3f8257db 99462012-09-18 Arnaud Charlet <charlet@adacore.com>
0b07a57e
AC
9947
9948 * c-ada-spec.c: Style fixes.
9949
3f8257db 99502012-09-18 Thomas Quinot <quinot@adacore.com>
da5182be
TQ
9951
9952 * c.opt (-fada-spec-parent): Define new command line switch.
9953 * c-ada-spec.c (get_ada_package): When -fada-spec-parent
9954 is specified, generate binding spec as a child of the specified unit.
9955
0ccb505d
PC
99562012-09-13 Paolo Carlini <paolo.carlini@oracle.com>
9957 Manuel López-Ibáñez <manu@gcc.gnu.org>
9958
9959 PR c++/53210
9960 * c.opt ([Winit-self]): Enabled by -Wall in C++.
9961
c583af79
AC
99622012-08-23 Arnaud Charlet <charlet@adacore.com>
9963
9964 * c-ada-spec.c (dump_generic_ada_node): Fix handling of name_only
9965 for pointers, and add missing Convention C pragma.
9966 (print_ada_struct_decl): Add missing aliased keyword.
9967 (dump_ads): Add pragma Ada_2005 and Style_Checks (Off).
9968
1a4049e7
JJ
99692012-08-17 Jakub Jelinek <jakub@redhat.com>
9970
9971 * c-common.c (sizeof_pointer_memaccess_warning): New function.
9972 * c.opt (-Wsizeof-pointer-memaccess): Add new option.
9973 * c-opts.c (c_common_handle_option): Enable it for -Wall.
9974 * c-common.h (sizeof_pointer_memaccess_warning): Add prototype.
9975 * c-common.def (SIZEOF_EXPR): Moved here from cp-tree.def.
9976
70b5e7dc
RG
99772012-08-10 Richard Guenther <rguenther@suse.de>
9978
9979 * c-pretty-print.c (pp_c_expression): Handle anonymous SSA names.
9980
f8923f7e
SB
99812012-08-07 Steven Bosscher <steven@gcc.gnu.org>
9982
9983 * c-pretty-print.c (pp_c_function_definition): Use pp_newline_and_flush
9984 instead of separate pp_newline and pp_flush.
9985 (print_c_tree): Likewise.
9986
e45abe1f
RH
99872012-07-26 Richard Henderson <rth@redhat.com>
9988
9989 * c-common.c (handle_hot_attribute): Allow labels.
9990 (handle_cold_attribute): Likewise.
9991
332f1d24
JJ
99922012-07-20 Jakub Jelinek <jakub@redhat.com>
9993
9994 PR c++/28656
9995 * c-common.c (check_function_nonnull): Handle multiple nonnull
9996 attributes properly.
9997
7ee2468b
SB
99982012-07-16 Steven Bosscher <steven@gcc.gnu.org>
9999
10000 * c-gimplify.c: Include dumpfile.h instead of tree-dump.h.
10001 * c-ada-spec.c: Likewise.
10002 * c-dump.c (dump_stmt): Move to cp/dump.c, the only user.
10003
ee7b28eb
SB
100042012-07-14 Steven Bosscher <steven@gcc.gnu.org>
10005
10006 * c-pch.c (CHECK_NO_ASM_OUT_DURING_PCH): Do not define.
10007 Remove code conditional on it.
10008
6bdf3519
SB
100092012-07-11 Steven Bosscher <steven@gcc.gnu.org>
10010
10011 * c-gimplify.c: Do not include basic-block.h.
10012 * c-common.c: Do not include linfuncs.h.
10013
532aafad
SB
100142012-07-08 Steven Bosscher <steven@gcc.gnu.org>
10015
10016 * c-common.h: Include tree.h.
10017
8d0d1915
JM
100182012-07-02 Jason Merrill <jason@redhat.com>
10019
10020 PR c++/53524
10021 * c-common.c (get_priority): Call default_conversion.
10022
fbc873ad
UB
100232012-07-01 Uros Bizjak <ubizjak@gmail.com>
10024
10025 * c-pch.c (c_common_write_pch): Remove unused variables.
10026
d4a10d0a
SB
100272012-06-29 Steven Bosscher <steven@gcc.gnu.org>
10028
10029 * cppspec.c: Moved from gcc/ to here.
10030
6f3a2e23
KT
100312012-06-27 Kai Tietz <ktietz@redhat.com>
10032
10033 PR preprocessor/37215
10034 * c-ppoutput.c (preprocess_file): Check for nonempty buffer.
10035
8ca92d04
SB
100362012-06-21 Steven Bosscher <steven@gcc.gnu.org>
10037
10038 * c-common.h (c_common_print_pch_checksum): Remove.
10039 * c-pch.c: Do not include output.h.
10040 (CHECK_NO_ASM_OUT_DURING_PCH): Define and add FIXME.
10041 (asm_out_file): Define iff CHECK_NO_ASM_OUT_DURING_PCH isdefined.
10042 (asm_file_startpos): Define iff CHECK_NO_ASM_OUT_DURING_PCH is defined.
10043 (struct c_pch_header): Remove.
10044 (get_ident): Update gpch version.
10045 (pch_init): Do not print executable_checksum to asm_out_file.
10046 Do not fail if there is no asm_out_file to read back from. Set
10047 asm_file_startpos only if CHECK_NO_ASM_OUT_DURING_PCH is defined.
10048 (c_common_write_pch): Verify that nothing was written to asm_out_file
10049 since pch_init was called. Do not write a c_pch_header, and do not
10050 copy from asm_out_file to the PCH.
10051 (c_common_read_pch): Do not read a c_pch_header, and do not restore
10052 the content of asm_out_file from the PCH.
10053 (c_common_print_pch_checksum): Remove.
10054 * c-opts.c (c_common_init): Print out executable_checksum directly.
10055
70f42967
SB
100562012-06-19 Steven Bosscher <steven@gcc.gnu.org>
10057
10058 * c-target.def (objc_declare_unresolved_class_reference,
10059 objc_declare_class_definition): Add new hooks.
10060
a8781821
SB
100612012-06-19 Steven Bosscher <steven@gcc.gnu.org>
10062
10063 * c-lex.c: Do not include output.h.
10064 (cb_ident): Try to put out .ident with targetm.asm_out.output_ident.
10065 Remove uses of ASM_OUTPUT_IDENT.
10066
9e1a8dd1
RR
100672012-06-15 Marc Glisse <marc.glisse@inria.fr>
10068
10069 PR c++/51033
10070 * c-common.h (c_build_vec_perm_expr): Move decl here.
10071 * c-common.c (c_build_vec_perm_expr): Move definition
10072 here.
10073
6f07a821
SB
100742012-06-06 Steven Bosscher <steven@gcc.gnu.org>
10075
10076 * c.opt (fconserve-space): Turn into a no-op.
10077
9faeb493 100782012-06-04 Sterling Augustine <saugustine@google.com>
c265f413
SA
10079
10080 * c-pretty-print.h (pp_c_flag_gnu_v3): New enumerator.
10081 * c-pretty-print.c (pp_c_specifier_qualifier_list): Check it at
10082 both the start and end of the function.
10083
a4b7d13c
SB
100842012-06-04 Steven Bosscher <steven@gcc.gnu.org>
10085
10086 * c-common.c: Do not include output.h.
10087 * c-pragma.c: Likewise.
10088
c265f413
SA
100892012-06-04 Steven Bosscher <steven@gcc.gnu.org>
10090
10091 * error.c (dump_decl): Check pp_c_flag_gnu_v3.
10092 (decl_as_dwarf_string, lang_decl_dwarf_name): New functions.
10093 (lang_decl_name): Handle namespace decls.
10094
be7a421e
SB
100952012-05-31 Steven Bosscher <steven@gcc.gnu.org>
10096
10097 * c-ada-spec.c: Do not include output.h.
10098 * c-semantics.c: Likewise.
10099
65de6659
JM
101002012-05-29 Joseph Myers <joseph@codesourcery.com>
10101
10102 * c-common.c: Fix typo.
10103
ca5f4331
MM
101042012-05-29 Michael Matz <matz@suse.de>
10105
10106 * c-common.h (c_expand_decl): Remove prototype.
10107
4f7f7aca
MLI
101082012-05-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
10109
10110 * c.opt (Wmissing-braces): Use LangEnabledBy(C ObjC,Wall).
10111 * c-opts.c (c_common_handle_option): Remove code handling
10112 warn_missing_braces.
10113
4a792f9b
PC
101142012-05-28 Paolo Carlini <paolo.carlini@oracle.com>
10115
10116 PR c++/25137
10117 * c-opts.c (c_common_handle_option): For C++ -Wall doesn't enable
10118 -Wmissing_braces.
10119
650dc14a
DS
101202012-05-22 Dodji Seketeli <dodji@redhat.com>
10121
10122 PR c++/53322
10123 * c.opt (Wunused-local-typedefs): Use EnabledBy(Wunused).
10124
9b095bf1
MLI
101252012-05-17 Manuel López-Ibáñez <manu@gcc.gnu.org>
10126
10127 * c.opt (--pedantic-errors,-pedantic-errors): Do not handle here.
10128 * c-opts.c (c_common_handle_option): Do not handle explicitly
10129 Wreturn-type, Wwrite-strings, warn_ecpp, and -pedantic-errors.
10130
0b2c4be5
DS
101312012-05-16 Dodji Seketeli <dodji@redhat.com>
10132
10133 PR preprocessor/7263
ab20d992 10134 * c-lex.c (c_lex_with_flags): Pass a virtual location to the call
0b2c4be5
DS
10135 to cpp_classify_number. For diagnostics, use the precise location
10136 instead of the global input_location.
10137
a1bde5af
PC
101382012-05-15 Paolo Carlini <paolo.carlini@oracle.com>
10139
d02924ef 10140 PR c++/11856
a1bde5af
PC
10141 * c-common.c (shorten_compare): Check c_inhibit_evaluation_warnings.
10142
d1ede5f4
BS
101432012-05-14 Bernd Schmidt <bernds@codesourcery.com>
10144
a1bde5af 10145 * c-common.c (DEF_ATTR_STRING): Define and undefine as necessary.
d1ede5f4 10146
f2bc201f
MLI
101472012-05-14 Manuel López-Ibáñez <manu@gcc.gnu.org>
10148
10149 PR 53063
10150 * c.opt (Wc++0X-compat,Wdelete-non-virtual-dtor,Wjump-misses-init,
10151 Wreorder): Use LangEnabledBy.
10152 * c-opts.c (c_common_handle_option): Do not enable them
10153 explicitly. Call lang-specific generated functions.
10154 (c_common_post_options): Do not set them here.
10155
95744782
MLI
101562012-05-13 Manuel López-Ibáñez <manu@gcc.gnu.org>
10157
10158 * c.opt (Wclobbered,Wempty-body,Wignored-qualifiers,
10159 Wmissing-field-initializers,Wmissing-parameter-type,
10160 Wold-style-declaration,Woverride-init): Use EnabledBy.
10161 * c-opts.c (c_common_post_options): Do not set here explicitly.
10162
7d5a5747
MLI
101632012-05-11 Manuel López-Ibáñez <manu@gcc.gnu.org>
10164
10165 PR 53063
10166 * c-opts.c (c_common_handle_option): Use handle_generated_option
10167 to enable sub-options.
10168
5a3c9cf2
PC
101692012-05-10 Paolo Carlini <paolo.carlini@oracle.com>
10170
10171 PR c++/53158
10172 * c-common.c (warnings_for_convert_and_check): Use warning_at.
10173
3ac8781c
RG
101742012-05-10 Richard Guenther <rguenther@suse.de>
10175
10176 * c-common.c (c_sizeof_or_alignof_type): Remove assert and
10177 adjust commentary about TYPE_IS_SIZETYPE types.
10178
1e537948
MLI
101792012-05-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
10180
10181 PR c++/53261
10182 * c-common.c (warn_logical_operator): Check that argument of
10183 integer_zerop is not NULL.
10184
f2c4a785
MLI
101852012-05-05 Manuel López-Ibáñez <manu@gcc.gnu.org>
10186
10187 PR c/43772
10188 * c-common.c (warn_logical_operator): Do not warn if either side
10189 is already true or false.
10190
50f305ca
MLI
101912012-05-04 Manuel López-Ibáñez <manu@gcc.gnu.org>
10192
10193 PR c/51712
10194 * c-common.c (expr_original_type): New.
10195 (shorten_compare): Do not warn for enumeration types.
10196
0c3641b0
MLI
101972012-05-03 Manuel López-Ibáñez <manu@gcc.gnu.org>
10198
10199 * c.opt (fpermissive): Add Var(flag_permissive).
10200
7edaa4d2
MG
102012012-04-30 Marc Glisse <marc.glisse@inria.fr>
10202
10203 PR c++/51033
10204 * c-common.c (convert_vector_to_pointer_for_subscript): New function.
10205 * c-common.h (convert_vector_to_pointer_for_subscript): Declare it.
10206
b9c8da34
DS
102072012-04-30 Dodji Seketeli <dodji@redhat.com>
10208
10209 Add -Wvarargs option
ab20d992 10210 * c.opt (Wvarargs): Define new option.
b9c8da34 10211
e6c69da0
MLI
102122012-04-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
10213
10214 * c-common.c (check_function_arguments): Replace
10215 Wmissing-format-attribute with Wsuggest-attribute=format.
10216
90137d8f
MLI
102172012-04-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
10218
10219 * c.opt (Wsuggest-attribute=format): New. Alias of
10220 Wmissing-format-attribute.
10221 * c-format.c (decode_format_type): Replace
10222 Wmissing-format-attribute with Wsuggest-attribute=format.
10223 (check_function_format): Likewise.
10224
9faeb493 102252012-04-27 Ollie Wild <aaw@google.com>
7f5f5f98
OW
10226
10227 * c-common.c: Add CPP_W_LITERAL_SUFFIX mapping.
10228 * c-opts.c (c_common_handle_option): Handle OPT_Wliteral_suffix.
10229 * c.opt: Add Wliteral-suffix.
10230
c1771a20
MLI
102312012-04-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
10232
10233 PR c/44774
10234 * c.opt (Wpedantic): New.
10235 (pedantic): Alias Wpedantic.
10236 * c-opts.c (c_common_handle_option): Replace -pedantic with -Wpedantic.
10237 (c_common_post_options): Likewise.
10238 (sanitize_cpp_opts): Likewise.
10239 * c-lex.c (interpret_float): Likewise.
10240 * c-format.c (check_format_types): Likewise.
10241 * c-common.c (pointer_int_sum): Likewise.
10242 (c_sizeof_or_alignof_type): Likewise.
10243 (c_add_case_label): Likewise.
10244 (c_do_switch_warnings): Likewise.
10245 * c-pragma.c (handle_pragma_float_const_decimal64): Likewise.
10246
04b391c1
JM
102472012-04-15 Jason Merrill <jason@redhat.com>
10248
10249 PR c++/52818
10250 * c-format.c (CPLUSPLUS_STD_VER): C++11 inherits from C99.
10251 (C_STD_NAME): Distinguish between C++98 and C++11.
10252
ac868f29
EB
102532012-04-11 Eric Botcazou <ebotcazou@adacore.com>
10254
10255 PR target/52624
10256 * c-common.h (uint16_type_node): Rename into...
10257 (c_uint16_type_node): ...this.
10258 * c-common.c (c_common_nodes_and_builtins): Adjust for above renaming.
10259 * c-cppbuiltin.c (builtin_define_stdint_macros): Likewise.
10260
fd4116f4
MLI
102612012-04-10 Manuel López-Ibáñez <manu@gcc.gnu.org>
10262
10263 * c-common.c (warn_if_unused_value): Move definition to here.
10264 * c-common.h (warn_if_unused_value): Move declaration to here.
10265
573ac65e
WB
102662012-03-23 William Bader <williambader@hotmail.com>
10267
10268 * c-lex.c (c_lex_with_flags): Avoid declarations after stmts.
10269
552b8185
JM
102702012-03-20 Jason Merrill <jason@redhat.com>
10271
10272 * c-common.h (enum cxx_dialect): Add cxx1y.
10273 * c-common.c (c_common_nodes_and_builtins): Use >= for cxx_dialect
10274 test.
10275 * c-cppbuiltin.c (c_cpp_builtins): Likewise.
10276 * c-opts.c (c_common_post_options): Likewise.
10277 (set_std_cxx1y): New.
10278 (c_common_handle_option): Call it.
10279 * c.opt (-std=c++1y, -std=gnu++1y): New flags.
10280
04398fa8
PC
102812012-03-19 Paolo Carlini <paolo.carlini@oracle.com>
10282
10283 PR c++/14710
10284 * c.opt ([Wuseless-cast]): Add.
10285
d2a12ae7
RG
102862012-03-16 Richard Guenther <rguenther@suse.de>
10287
10288 * c-pretty-print.c (pp_c_initializer_list): Adjust.
10289
a12bf402
MLI
102902012-03-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
10291
10292 PR c++/44783
10293 * c.opt (ftemplate-backtrace-limit) Add.
10294
5c30094f
RO
102952012-03-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
10296
10297 * c-cppbuiltin.c (c_cpp_builtins): Remove #pragma extern_prefix
10298 handling.
10299 * c-pragma.c (handle_pragma_extern_prefix): Remove.
10300 (init_pragma): Don't register extern_prefix.
10301
21fa2faf
RG
103022012-03-12 Richard Guenther <rguenther@suse.de>
10303
10304 * c-common.c (c_common_get_narrower): Use c_common_type_for_size.
10305 (builtin_type_for_size): Likewise.
10306
e3793c6f
JJ
103072012-02-13 Jakub Jelinek <jakub@redhat.com>
10308
10309 PR c++/52215
10310 * c-common.c (sync_resolve_params): Don't decide whether to convert
10311 or not based on TYPE_SIZE comparison, convert whenever arg_type
10312 is unsigned INTEGER_TYPE.
10313
93286335
PC
103142012-02-06 Paolo Carlini <paolo.carlini@oracle.com>
10315
10316 PR c/52118
10317 * c.opt ([Wunused-local-typedefs]): Fix description.
10318
7a421706
MS
103192012-01-24 Mike Stump <mikestump@comcast.net>
10320
10321 * c-common.c (c_common_type_for_mode): Match signed/unsigned types
10322 exactly.
10323
ba9b1f11
RG
103242012-01-18 Richard Guenther <rguenther@suse.de>
10325
10326 * c-opts.c (c_common_post_options): Reset LTO flags if
10327 we are about to generate a PCH.
10328
465406be
PC
103292012-01-17 Paolo Carlini <paolo.carlini@oracle.com>
10330
10331 PR c++/51777
10332 * c-pretty-print.c (pp_c_integer_constant): For unsigned constants
10333 use pp_unsigned_wide_integer.
10334
aee15221
RG
103352012-01-10 Richard Guenther <rguenther@suse.de>
10336
10337 PR middle-end/51806
10338 * c-opts.c (c_common_handle_option): Move -Werror handling
10339 to language independent code.
10340
5720c0dc
RG
103412012-01-05 Richard Guenther <rguenther@suse.de>
10342
10343 PR middle-end/51764
10344 * c.opt (Wmudflap, fmudflap, fmudflapth, fmudflapir): Move here
10345 from common.opt.
10346
73ac190a
PC
103472011-12-30 Paolo Carlini <paolo.carlini@oracle.com>
10348
10349 PR c++/51316
10350 * c-common.c (c_sizeof_or_alignof_type): In C++ allow for alignof
10351 of array types with an unknown bound.
10352
48b0b196
JM
103532011-12-20 Joseph Myers <joseph@codesourcery.com>
10354
10355 * c-common.c (flag_isoc99): Update comment to refer to C11.
10356 (flag_isoc1x): Change to flag_isoc11.
10357 * c-common.h (flag_isoc99): Update comment to refer to C11.
10358 (flag_isoc1x): Change to flag_isoc11.
10359 * c-cppbuiltin.c (cpp_atomic_builtins): Change comment to refer to
10360 C11.
10361 * c-opts.c (set_std_c1x): Change to set_std_c11.
10362 (c_common_handle_option): Handle OPT_std_c11 and OPT_std_gnu11.
10363 Call set_std_c11.
10364 (set_std_c89, set_std_c99, set_std_c11): Use flag_isoc11.
10365 (set_std_c1): Use CLK_STDC11 and CLK_GNUC11.
10366 * c.opt (std=c1x): Change to std=c11. Document as non-draft
10367 standard.
10368 (std=c1x, std=iso9899:2011): Add as aliases of std=c11.
10369 (std=gnu1x): Change to std=gnu11. Refer to non-draft standard.
10370 (std=gnu1x): Make alias of std=gnu11.
10371
d58d6eb5
JM
103722011-12-19 Jason Merrill <jason@redhat.com>
10373
10374 PR c++/51228
10375 * c-common.c (handle_transparent_union_attribute): Check the first
10376 field if the type is complete.
10377
b3908fcc
JW
103782011-12-15 Jonathan Wakely <jwakely.gcc@gmail.com>
10379
10380 PR libstdc++/51365
10381 * c-common.c (RID_IS_FINAL): Add.
10382 * c-common.h (RID_IS_FINAL): Add.
10383
fea3ca91
IS
103842011-11-30 Iain Sandoe <iains@gcc.gnu.org>
10385
10386 * c.opt (fgnu-runtime): Provide full description.
10387 (fnext-runtime): Likewise.
10388 * c-opts.c (OPT_fgnu_runtime, OPT_fnext_runtime) Remove.
10389
62bad7cd
AM
103902011-11-28 Andrew MacLeod <amacleod@redhat.com>
10391
10392 * c-cpp-builtin.c (cpp_atomic_builtins):New. Emit all atomic
10393 predefines in one place. Add LOCK_FREE predefines.
10394 (c_cpp_builtins): Move Legacy HAVE_SYNC predefines to
10395 new func.
10396
c466c4ff
AM
103972011-11-24 Andrew MacLeod <amacleod@redhat.com>
10398
10399 PR c/51256
9faeb493 10400 * c-common.c (get_atomic_generic_size): Check for various error
c466c4ff 10401 conditions
9faeb493
UB
10402 (resolve_overloaded_atomic_exchange,
10403 resolve_overloaded_atomic_compare_exchange,
c466c4ff
AM
10404 resolve_overloaded_atomic_load, resolve_overloaded_atomic_store): Return
10405 error_mark_node for error conditions.
9faeb493 10406
a5952633
RG
104072011-11-08 Richard Guenther <rguenther@suse.de>
10408
10409 PR middle-end/51010
ab20d992 10410 * c-pretty-print.c (pp_c_expression): Handle SSA_NAMEs.
a5952633 10411
0a35513e
AH
104122011-11-07 Richard Henderson <rth@redhat.com>
10413 Aldy Hernandez <aldyh@redhat.com>
10414 Torvald Riegel <triegel@redhat.com>
10415
10416 Merged from transactional-memory.
10417
10418 * c-common.c (handle_tm_wrap_attribute,
10419 handle_tm_attribute, ignore_attribute, parse_tm_stmt_attr): New.
10420 (struct c_common_reswords): Added __transaction* keywords.
10421 (struct c_common_attribute_table): Added transaction* and tm_regparm
10422 attributes.
10423 * c-common.h: Added RID_TRANSACTION*. Added TM_ATTR* and TM_STMT*
10424 masks.
10425 (parse_tm_stmt_attr, tm_attr_to_mask, tm_mask_to_attr,
10426 find_tm_attribute): Declare.
10427
6d87092d
JM
104282011-11-07 Jason Merrill <jason@redhat.com>
10429
10430 PR c++/35688
10431 * c-common.c, c-common.h: Revert yesterday's changes.
10432
8e7860a1
JM
104332011-11-06 Jason Merrill <jason@redhat.com>
10434
10435 PR c++/35688
10436 * c-common.c (decl_has_visibility_attr): Split out from...
10437 (c_determine_visibility): ...here.
10438 * c-common.h: Declare it.
10439
d19fa6b5
JM
104402011-11-06 Joseph Myers <joseph@codesourcery.com>
10441
10442 * c-common.c (c_common_reswords): Add _Alignas and _Alignof.
10443 (c_sizeof_or_alignof_type): Diagnose alignof applied to a function
10444 type.
10445 (check_user_alignment): New. Split out of
10446 handle_aligned_attribute. Disallow integer constants with
10447 noninteger types. Conditionally allow zero.
10448 (handle_aligned_attribute): Use check_user_alignment.
10449 * c-common.h (RID_ALIGNAS, check_user_alignment): New.
10450
86951993
AM
104512011-11-06 Andrew MacLeod <amacleod@redhat.com>
10452 Richard Henderson <rth@redhat.com>
10453
10454 Merged from cxx-mem-model.
10455
10456 * c-cppbuiltin.c (c_cpp_builtins): Test both atomic and sync patterns.
9faeb493 10457 * c-common.c (sync_resolve_params, sync_resolve_return): Only tweak
86951993
AM
10458 parameters that are the same type size.
10459 (get_atomic_generic_size): New. Find size of generic
10460 atomic function parameters and do typechecking.
10461 (add_atomic_size_parameter): New. Insert size into parameter list.
10462 (resolve_overloaded_atomic_exchange): Restructure __atomic_exchange to
10463 either __atomic_exchange_n or external library call.
9faeb493 10464 (resolve_overloaded_atomic_compare_exchange): Restructure
86951993 10465 __atomic_compare_exchange to either _n variant or external library call.
9faeb493 10466 (resolve_overloaded_atomic_load): Restructure __atomic_load to either
86951993
AM
10467 __atomic_load_n or an external library call.
10468 (resolve_overloaded_atomic_store): Restructure __atomic_store to either
10469 __atomic_store_n or an external library call.
10470 (resolve_overloaded_builtin): Handle new __atomic builtins.
10471
cf9e9959
EB
104722011-11-04 Eric Botcazou <ebotcazou@adacore.com>
10473
10474 PR c++/50608
10475 * c-common.c (c_fully_fold_internal) <ADDR_EXPR>: Call fold_offsetof_1.
10476 (fold_offsetof_1): Make global. Remove STOP_REF argument and adjust.
10477 <INDIRECT_REF>: Return the argument.
10478 <ARRAY_REF>: Remove special code for negative offset.
10479 Call fold_build_pointer_plus instead of size_binop.
10480 (fold_offsetof): Remove STOP_REF argument and adjust.
10481 * c-common.h (fold_offsetof_1): Declare.
10482 (fold_offsetof): Remove STOP_REF argument.
10483
25339f10
JM
104842011-11-02 Paolo Carlini <paolo.carlini@oracle.com>
10485
10486 PR c++/50810
10487 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
10488 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
10489 Wnarrowing for C++0x and C++98.
10490 * c.opt ([Wnarrowing]): Update.
10491
89401152
PC
104922011-11-01 Paolo Carlini <paolo.carlini@oracle.com>
10493
10494 PR c++/44277
10495 * c.opt: Add Wzero-as-null-pointer-constant.
10496
97e3ad20
JM
104972011-10-31 Jason Merrill <jason@redhat.com>
10498
15694fdd
JM
10499 * c.opt (-fdeduce-init-list): Off by default.
10500
97e3ad20
JM
10501 PR c++/50920
10502 * c-common.h (cxx_dialect): Add cxx11 and cxx03.
10503 * c.opt: Add -std=c++11, -std=gnu++11, -std=gnu++03,
10504 and -Wc++11-compat.
10505 * c-opts.c (set_std_cxx11): Rename from set_std_cxx0x.
10506
fb9120e3
RAV
105072011-10-27 Roberto Agostino Vitillo <ravitillo@lbl.gov>
10508
10509 PR c++/30066
10510 * c.opt (fvisibility-inlines-hidden): Description change.
10511
3ce4f9e4
ESR
105122011-10-26 Ed Smith-Rowland <3dw4rd@verizon.net>
10513
10514 Implement C++11 user-defined literals.
10515 * c-common.c (build_userdef_literal): New.
10516 * c-common.def: New tree code.
10517 * c-common.h (tree_userdef_literal): New tree struct and accessors.
10518 * c-lex.c (interpret_float): Add suffix parm.
10519 (c_lex_with_flags): Build literal tokens.
10520
5f53c243
PC
105212011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
10522
10523 PR c++/50841
10524 Revert:
10525 2011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
10526
10527 PR c++/50810
10528 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
10529 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
10530 Wnarrowing for C++0x and C++98.
10531 * c.opt ([Wnarrowing]): Update.
10532
263734e1
PC
105332011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
10534
10535 PR c++/50810
10536 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
10537 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
10538 Wnarrowing for C++0x and C++98.
10539 * c.opt ([Wnarrowing]): Update.
10540
d2e312d7
PC
105412011-10-21 Paolo Carlini <paolo.carlini@oracle.com>
10542
10543 PR c++/45385
10544 * c-common.c (conversion_warning): Remove code looking for
10545 artificial operands.
10546
d17687f6
DS
105472011-10-18 Dodji Seketeli <dodji@redhat.com>
10548
10549 PR bootstrap/50760
10550 * c-lex.c (fe_file_change): Use LINEMAP_SYSP when
9faeb493 10551 !NO_IMPLICIT_EXTERN_C.
d17687f6 10552
fc8396e9
PC
105532011-10-17 Michael Spertus <mike_spertus@symantec.com>
10554
10555 * c-common.c (c_common_reswords): Add __bases,
10556 __direct_bases.
10557 * c-common.h: Add RID_BASES and RID_DIRECT_BASES.
10558
105592011-10-17 Paolo Carlini <paolo.carlini@oracle.com>
10560
10561 PR c++/50757
10562 * c.opt ([Wnonnull]): Add C++ and Objective-C++.
10563
847e697a
TT
105642011-10-15 Tom Tromey <tromey@redhat.com>
10565 Dodji Seketeli <dodji@redhat.com>
10566
10567 * c.opt (fdebug-cpp): New option.
10568 * c-opts.c (c_common_handle_option): Handle the option.
10569 * c-ppoutput.c (maybe_print_line_1): New static function. Takes an
10570 output stream in parameter. Factorized from ...
10571 (maybe_print_line): ... this. Dump location debug information when
10572 -fdebug-cpp is in effect.
10573 (print_line_1): New static function. Takes an output stream in
10574 parameter. Factorized from ...
10575 (print_line): ... here. Dump location information when -fdebug-cpp
10576 is in effect.
10577 (scan_translation_unit): Dump location information when
10578 -fdebug-cpp is in effect.
10579
92582b75
TT
105802011-10-15 Tom Tromey <tromey@redhat.com>
10581 Dodji Seketeli <dodji@redhat.com>
10582
10583 * c.opt (ftrack-macro-expansion): New option. Handle it with and
10584 without argument.
10585 * c-opts.c (c_common_handle_option)<case
10586 OPT_ftrack_macro_expansion_, case OPT_ftrack_macro_expansion>: New
10587 cases. Handle -ftrack-macro-expansion with and without argument.
10588
46427374
TT
105892011-10-15 Tom Tromey <tromey@redhat.com>
10590 Dodji Seketeli <dodji@redhat.com>
10591
10592 * c-ppoutput.c (scan_translation_unit, maybe_print_line)
10593 (print_line, cb_define, do_line_change): Adjust to avoid touching
10594 the internals of struct line_map. Use the public API instead.
10595 * c-pch.c (c_common_read_pch): Likewise.
10596 * c-lex.c (fe_file_change): Likewise.
10597
fc8396e9
PC
105982011-10-14 Paolo Carlini <paolo.carlini@oracle.com>
10599
10600 PR c++/17212
10601 * c.opt ([Wformat-zero-length]): Add C++ and Objective-C++.
10602
106032011-10-11 Paolo Carlini <paolo.carlini@oracle.com>
10604
10605 PR c++/33067
10606 * c-pretty-print.c (pp_c_floating_constant): Output
10607 max_digits10 (in the ISO C++ WG N1822 sense) decimal digits.
10608
e79983f4
MM
106092011-10-11 Michael Meissner <meissner@linux.vnet.ibm.com>
10610
10611 * c-common.c (def_builtin_1): Delete old interface with two
10612 parallel arrays to hold standard builtin declarations, and replace
10613 it with a function based interface that can support creating
10614 builtins on the fly in the future. Change all uses, and poison
10615 the old names. Make sure 0 is not a legitimate builtin index.
10616 * c-omp.c (c_finish_omp_barrier): Ditto.
10617 (c_finish_omp_taskwait): Ditto.
10618 (c_finish_omp_flush): Ditto.
10619
6637388f
TG
106202011-10-11 Tristan Gingold <gingold@adacore.com>
10621
10622 * c.opt: (fallow-parameterless-variadic-functions): New.
10623
3797cb21
DS
106242011-09-08 Dodji Seketeli <dodji@redhat.com>
10625
10626 PR c++/33255 - Support -Wunused-local-typedefs warning
10627 * c-common.h (struct c_language_function::local_typedefs): New
10628 field.
9faeb493
UB
10629 (record_locally_defined_typedef, maybe_record_typedef_use)
10630 (maybe_warn_unused_local_typedefs): Declare new functions.
3797cb21 10631 * c-common.c (record_locally_defined_typedef)
9faeb493
UB
10632 (maybe_record_typedef_use)
10633 (maybe_warn_unused_local_typedefs): Define new functions.
3797cb21
DS
10634 * c.opt: Declare new -Wunused-local-typedefs flag.
10635
693ddb1b
EB
106362011-09-06 Eric Botcazou <ebotcazou@adacore.com>
10637
10638 PR middle-end/50266
10639 * c-common.c (c_fully_fold_internal) <ADDR_EXPR>: Fold offsetof-like
10640 computations.
10641
830c740f
RG
106422011-09-05 Richard Guenther <rguenther@suse.de>
10643
10644 * c-common.c (complete_array_type): Use ssize_int (-1) instead
10645 of integer_minus_one_node for empty array upper bounds.
10646
892a371f
DS
106472011-08-28 Dodji Seketeli <dodji@redhat.com>
10648
10649 * c-pch.c (c_common_read_pch): Call linemap_add with LC_ENTER as
10650 it's the first time it's being called on this main TU.
10651
0e3fdb48
RB
106522011-08-24 Richard Guenther <rguenther@suse.de>
10653
10654 PR c/49396
10655 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Fix conditional.
10656
106572011-08-22 Gabriel Charette <gchare@google.com>
e3dfef44
GC
10658
10659 * c-opts.c (c_finish_options): Force BUILTINS_LOCATION for tokens
10660 defined in cpp_init_builtins and c_cpp_builtins.
10661
d4a83c10
JM
106622011-08-19 Joseph Myers <joseph@codesourcery.com>
10663
10664 * c-common.c (c_common_reswords): Add __builtin_complex.
10665 * c-common.h (RID_BUILTIN_COMPLEX): New.
10666
bbceee64
JM
106672011-08-18 Joseph Myers <joseph@codesourcery.com>
10668
10669 * c-common.c (c_common_reswords): Add _Noreturn.
10670 (keyword_is_function_specifier): Handle RID_NORETURN.
10671 * c-common.h (RID_NORETURN): New.
10672
3f8257db 106732011-08-10 Artjoms Sinkarovs <artyom.shinakroff@gmail.com>
0e3a99ae
AS
10674
10675 * c-common.c (unsafe_conversion_p): New function. Check if it is
10676 unsafe to convert an expression to the type.
10677 (conversion_warning): Adjust, use unsafe_conversion_p.
10678 * c-common.h (unsafe_conversion_p): New function declaration.
10679
20906c66
JJ
106802011-08-02 Jakub Jelinek <jakub@redhat.com>
10681
10682 * c-common.h (c_finish_omp_atomic): Adjust prototype.
10683 (c_finish_omp_taskyield): New prototype.
10684 * c-omp.c (c_finish_omp_atomic): Add OPCODE, V, LHS1 and RHS1
10685 arguments. Handle OMP_ATOMIC_READ, OMP_ATOMIC_CAPTURE_OLD and
10686 OMP_ATOMIC_CAPTURE_NEW in addition to OMP_ATOMIC. If LHS1
10687 or RHS1 have side-effects, evaluate those too in the right spot,
10688 if it is a decl and LHS is also a decl, error out if they
10689 aren't the same.
10690 (c_finish_omp_taskyield): New function.
10691 * c-cppbuiltin.c (c_cpp_builtins): Change _OPENMP to 201107.
10692 * c-pragma.c (omp_pragmas): Add taskyield.
10693 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_TASKYIELD.
10694 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_FINAL and
10695 PRAGMA_OMP_CLAUSE_MERGEABLE.
10696
770e5a2e
DS
106972011-07-25 Dodji Seketeli <dodji@redhat.com>
10698
10699 * c-common.h (set_underlying_type): Remove parm name from
10700 declaration.
10701
1baae426
RG
107022011-07-25 Romain Geissler <romain.geissler@gmail.com>
10703
10704 * c-pretty-print.h: Search c-common.h in c-family.
9faeb493 10705
fcb21722
JM
107062011-07-22 Jason Merrill <jason@redhat.com>
10707
76f86d00
JM
10708 PR c++/49793
10709 * c.opt (Wnarrowing): New.
10710
3a636414
JM
10711 PR c++/30112
10712 * c-common.h: Declare c_linkage_bindings.
10713 * c-pragma.c (handle_pragma_redefine_extname): Use it.
10714
fcb21722
JM
10715 PR c++/49813
10716 * c-opts.c (set_std_cxx0x): Set flag_isoc94 and flag_isoc99.
10717 * c-pretty-print.c (pp_c_cv_qualifiers): Check c_dialect_cxx as well
10718 as flag_isoc99 for 'restrict'.
10719 (pp_c_specifier_qualifier_list): Likewise for _Complex.
10720
02614448
ILT
107212011-07-21 Ian Lance Taylor <iant@google.com>
10722
10723 PR middle-end/49705
10724 * c-common.c (c_disable_warnings): New static function.
10725 (c_enable_warnings): New static function.
10726 (c_fully_fold_internal): Change local unused_p to bool. Call
10727 c_disable_warnings and c_enable_warnings rather than change
10728 c_inhibit_evaluation_warnings.
10729
34429675
JM
107302011-07-20 Jason Merrill <jason@redhat.com>
10731
10732 PR c++/6709 (DR 743)
10733 PR c++/42603 (DR 950)
10734 * c-common.h (CPP_KEYWORD, CPP_TEMPLATE_ID): Move from cp/parser.h.
10735 (CPP_NESTED_NAME_SPECIFIER, N_CP_TTYPES): Likewise.
10736 (CPP_DECLTYPE): New.
10737 * c-common.c (c_parse_error): Handle CPP_DECLTYPE.
10738
5d49b6a7
RG
107392011-07-19 Richard Guenther <rguenther@suse.de>
10740
10741 * c-common.c (pointer_int_sum): Use fold_build_pointer_plus.
10742 * c-omp.c (c_finish_omp_for): Likewise.
10743
e84a58ff
EB
107442011-07-12 Eric Botcazou <ebotcazou@adacore.com>
10745
10746 * c-ada-spec.c (dump_nested_types): Put semi-colon after empty loop
10747 body on the next line.
10748
329af3c7
JM
107492011-07-08 Jason Merrill <jason@redhat.com>
10750
4063e61b
JM
10751 PR c++/45437
10752 * c-omp.c (check_omp_for_incr_expr): Handle preevaluation.
10753
329af3c7
JM
10754 PR c++/49673
10755 * c-common.c (c_apply_type_quals_to_decl): Don't check
10756 TYPE_NEEDS_CONSTRUCTING.
10757
1a072294
RG
107582011-07-06 Richard Guenther <rguenther@suse.de>
10759
10760 * c-common.c (c_common_nodes_and_builtins):
10761 Merge calls to build_common_tree_nodes and build_common_tree_nodes_2.
10762
fce5dddd
RG
107632011-07-05 Richard Guenther <rguenther@suse.de>
10764
10765 * c-common.c (c_common_nodes_and_builtins): Build all common
10766 tree nodes first.
10767
45d439ac
JJ
107682011-06-27 Jakub Jelinek <jakub@redhat.com>
10769
56300785
JJ
10770 * c-common.h (c_tree_chain_next): New static inline function.
10771
45d439ac
JJ
10772 * c-common.c (check_builtin_function_arguments): Handle
10773 BUILT_IN_ASSUME_ALIGNED.
10774
e0a8ecf2
AM
107752011-06-21 Andrew MacLeod <amacleod@redhat.com>
10776
10777 * c-common.c: Add sync_ or SYNC__ to builtin names.
10778 * c-omp.c: Add sync_ or SYNC__ to builtin names.
dfb43cd5
PV
10779
107802011-06-20 Pierre Vittet <piervit@pvittet.com>
10781
10782 * c-pragma.h (pragma_handler_1arg, pragma_handler_2arg): New
10783 handler.
10784 (gen_pragma_handler): New union.
10785 (internal_pragma_handler): New type.
10786 (c_register_pragma_with_data)
10787 (c_register_pragma_with_expansion_and_data): New functions.
10788
10789 * c-pragma.c (registered_pragmas, c_register_pragma_1)
10790 (c_register_pragma, c_register_pragma_with_expansion)
10791 (c_invoke_pragma_handler): Changed to work with
10792 internal_pragma_handler.
10793 (c_register_pragma_with_data)
10794 (c_register_pragma_with_expansion_and_data): New functions.
10795
677f3fa8
JM
107962011-06-14 Joseph Myers <joseph@codesourcery.com>
10797
10798 * c-common.c: Include common/common-target.h.
10799 (handle_section_attribute): Use
10800 targetm_common.have_named_sections.
10801 * c-cppbuiltin.c: Include common/common-target.h.
10802 (c_cpp_builtins): Use targetm_common.except_unwind_info.
10803
d7fc8c14
RG
108042011-06-10 Richard Guenther <rguenther@suse.de>
10805
10806 * c-pretty-print.c (pp_c_type_specifier): Use pp_c_identifier
10807 to print a IDENTIFIER_NODE.
10808
10e48e39
RO
108092011-06-09 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
10810 Joseph Myers <joseph@codesourcery.com>
10811
10812 * c.opt (fbuilding-libgcc): New option.
10813 * c-cppbuiltin.c (c_cpp_builtins): Define
10814 __LIBGCC_TRAMPOLINE_SIZE__ if flag_building_libgcc.
10815
6976ae51
JM
108162011-06-07 Jason Merrill <jason@redhat.com>
10817
3ff60975
JM
10818 * c-common.c (max_tinst_depth): Lower default to 900.
10819
6976ae51
JM
10820 * c-format.c (gcc_cxxdiag_char_table): Add 'S' format.
10821
009db074
RG
108222011-06-07 Richard Guenther <rguenther@suse.de>
10823
10824 * c-common.c (c_common_nodes_and_builtins): Do not set
10825 size_type_node or call set_sizetype.
10826
b4592b92
DS
108272011-06-07 Dodji Seketeli <dodji@redhat.com>
10828
10829 PR debug/49130
10830 * c-pretty-print.c (pp_c_integer_constant): Consider the canonical
9faeb493 10831 type when using pointer comparison to compare types.
b4592b92 10832
014ab419
JW
108332011-06-02 Jonathan Wakely <jwakely.gcc@gmail.com>
10834
10835 * c.opt: Add -Wdelete-non-virtual-dtor.
10836 * c-opts.c (c_common_handle_option): Include it in -Wall.
10837
4f60111f
NF
108382011-05-30 Nathan Froyd <froydnj@gcc.gnu.org>
10839
10840 PR bootstrap/49190
10841
10842 Revert:
10843 2011-05-26 Nathan Froyd <froydnj@codesourcery.com>
10844
10845 * c-common.h (struct c_common_identifier): Inherit from tree_typed,
10846 not tree_common.
10847
4cc4f2f4
JJ
108482011-05-27 Jakub Jelinek <jakub@redhat.com>
10849
10850 PR c++/49165
10851 * c-common.c (c_common_truthvalue_conversion) <case COND_EXPR>: For
10852 C++ don't call c_common_truthvalue_conversion on void type arms.
10853
38e01f9e
NF
108542011-05-27 Nathan Froyd <froydnj@codesourcery.com>
10855
10856 * c-common.h (struct stmt_tree_s) [x_cur_stmt_list]: Change to a VEC.
10857 (stmt_list_stack): Define.
10858 (cur_stmt_list): Adjust for new type of x_cur_stmt_list.
10859 * c-semantics.c (push_stmt_list, pop_stmt_list): Likewise.
10860
92e948a8
NF
108612011-05-26 Nathan Froyd <froydnj@codesourcery.com>
10862
10863 * c-common.c (warning_candidate_p): Check for BLOCKs.
10864
a2fc3e63
NF
108652011-05-26 Nathan Froyd <froydnj@codesourcery.com>
10866
10867 * c-common.h (struct c_common_identifier): Inherit from tree_typed,
10868 not tree_common.
10869
0957c029
JJ
108702011-05-25 Jakub Jelinek <jakub@redhat.com>
10871
10872 * c-common.c (def_fn_type): Remove extra va_end.
10873
828fb3ba
JM
108742011-05-23 Jason Merrill <jason@redhat.com>
10875
10876 PR c++/48106
10877 * c-common.c (c_common_get_narrower): New.
10878 (shorten_binary_op, shorten_compare, warn_for_sign_compare): Use it.
10879
dde05067
NF
108802011-05-23 Nathan Froyd <froydnj@codesourcery.com>
10881
10882 * c-common.h (check_function_arguments): Tweak prototype of
10883 check_function_arguments.
10884 * c-common.c (check_function_arguments): Likewise. Adjust
10885 calls to check_function_nonnull, check_function_format, and
10886 check_function_sentinel.
10887 (check_function_sentinel): Take a FUNCTION_TYPE rather than
10888 separate attributes and typelist arguments. Use
10889 FOREACH_FUNCTION_ARGS to iterate over argument types.
10890
3c0d13bf
PC
108912011-05-15 Paolo Carlini <paolo.carlini@oracle.com>
10892
10893 * c-common.c (c_common_reswords): Reorder.
10894 * c-common.h (rid): Likewise.
10895
8242dd04
NF
108962011-05-10 Nathan Froyd <froydnj@codesourcery.com>
10897
10898 * c-common.c (def_fn_type): Don't call build_function_type, call
10899 build_function_type_array or build_varargs_function_type_array
10900 instead.
10901 (c_common_nodes_and_builtins): Likewise.
10902
3d528853
NF
109032011-05-05 Nathan Froyd <froydnj@codesourcery.com>
10904
10905 * c-common.c (c_add_case_label): Omit the loc argument to
10906 build_case_label.
10907 * c-common.h (build_case_label): Remove.
10908 * c-semantics.c (build_case_label): Remove.
10909
a04a722b
JM
109102011-05-05 Joseph Myers <joseph@codesourcery.com>
10911
10912 * c-objc.h (objc_start_method_definition): Update prototype.
10913 * stub-objc.c (objc_start_method_definition): Add extra parameter.
10914
e19a18d4
NF
109152011-05-04 Nathan Froyd <froydnj@codesourcery.com>
10916
10917 * c-common.c (check_main_parameter_types): Reindent. Don't use
10918 TYPE_ARG_TYPES directly.
10919 (handle_nonnull_attribute): Likewise.
10920 (sync_resolve_params): Likewise.
10921 * c-format.c (handle_format_arg_attribute): Likewise. Adjust call
10922 to check_format_string.
10923 (handle_format_attribute): Likewise.
10924 (check_format_string): Take a function type to examine instead of
10925 a type list. Use a function_arg_iterator to step through argument
10926 types.
10927
c62c040f
RG
109282011-05-04 Richard Guenther <rguenther@suse.de>
10929
10930 * c-common.c (fix_string_type): Use size_int for index type bounds.
10931 (start_fname_decls): Do not pass NULL to build_int_cst.
10932 (c_init_attributes): Likewise.
10933 * c-lex.c (c_lex_with_flags): Likewise.
10934
c12ff9d8
JM
109352011-04-27 Jason Merrill <jason@redhat.com>
10936
10937 * c-common.c (make_tree_vector_from_list): New.
10938 * c-common.h: Declare it.
10939
304dfbe3
RG
109402011-04-26 Richard Guenther <rguenther@suse.de>
10941
10942 PR preprocessor/48248
10943 * c-ppoutput.c (maybe_print_line): Always optimize newlines
10944 for output size with -P.
10945
3c0d13bf
PC
109462011-04-25 Paolo Carlini <paolo.carlini@oracle.com>
10947
10948 * c-common.c (struct c_common_resword): Add __underlying_type.
10949 * c-common.h (enum rid): Add RID_UNDERLYING_TYPE.
10950
04695783
JM
109512011-04-20 Jim Meyering <meyering@redhat.com>
10952
10953 * c-format.c (init_dollar_format_checking): Remove useless
10954 if-before-free.
10955
0dc33c3c
NP
109562011-04-15 Nicola Pero <nicola.pero@meta-innovation.com>
10957
10958 * c-objc.h (objc_get_interface_ivars): Removed.
3c0d13bf 10959 (objc_detect_field_duplicates): New.
0dc33c3c 10960 * stub-objc.c: Likewise.
3c0d13bf 10961
c59633d9
NP
109622011-04-14 Nicola Pero <nicola.pero@meta-innovation.com>
10963
10964 * stub-objc.c (objc_declare_protocols): Renamed to
10965 objc_declare_protocol.
10966 * c-objc.h: Likewise.
3c0d13bf 10967
32dabdaf
NP
109682011-04-14 Nicola Pero <nicola.pero@meta-innovation.com>
10969
10970 * stub-objc.c (objc_declare_class): Updated argument name.
10971
81f653d6
NF
109722011-04-12 Nathan Froyd <froydnj@codesourcery.com>
10973
10974 * c-common.h (c_common_init_ts): Declare.
10975 * c-common.c (c_common_init_ts): Define.
10976
eb345401
NP
109772011-04-12 Nicola Pero <nicola.pero@meta-innovation.com>
10978
10979 * c-objc.h (objc_build_message_expr): Updated prototype.
10980 * stub-objc.c (objc_build_message_expr): Likewise.
9faeb493 10981
a358e188
MJ
109822011-04-12 Martin Jambor <mjambor@suse.cz>
10983
10984 * c-gimplify.c (c_genericize): Call cgraph_get_create_node instead
10985 of cgraph_node.
10986
e6313a78
RG
109872011-04-11 Richard Guenther <rguenther@suse.de>
10988
10989 * c-common.c (complete_array_type): Build a range type of
10990 proper type.
10991
dcf0c47e
NF
109922011-04-08 Nathan Froyd <froydnj@codesourcery.com>
10993
10994 * c-common.c (handle_sentinel_attribute): Don't use TYPE_ARG_TYPES.
10995 (handle_type_generic_attribute): Likewise.
10996
1ee44b26
JM
109972011-04-07 Jason Merrill <jason@redhat.com>
10998
10999 PR c++/48450
11000 * c-common.c (c_common_truthvalue_conversion): Don't ignore
11001 conversion from C++0x scoped enum.
11002
acce4e77
JM
110032011-04-06 Joseph Myers <joseph@codesourcery.com>
11004
11005 * c-target-def.h: New file.
11006 * c-target.def: New file.
11007 * c-target.h: New file.
11008 * c-common.c (targetcm): Don't define here.
11009 * c-common.h (default_handle_c_option): Declare.
11010 * c-format.c: Include c-target.h instead of target.h.
11011 * c-opts.c: Include c-target.h instead of target.h. Explicitly
11012 include tm.h.
11013 (default_handle_c_option): Move from targhooks.c.
11014
e2eefb55
JJ
110152011-03-29 Jakub Jelinek <jakub@redhat.com>
11016
11017 PR preprocessor/48248
11018 * c-ppoutput.c (print): Add src_file field.
11019 (init_pp_output): Initialize it.
11020 (maybe_print_line): Don't optimize by adding up to 8 newlines
11021 if map->to_file and print.src_file are different file.
11022 (print_line): Update print.src_file.
11023
ba78087b
KT
110242011-03-25 Kai Tietz <ktietz@redhat.com>
11025
11026 * c-ada-spec.c (compare_comment): Use filename_cmp
11027 instead of strcmp for filename.
11028
0edf1bb2
JL
110292011-03-25 Jeff Law <law@redhat.com>
11030
adfac8df 11031 * c-common.c (def_fn_type): Add missing va_end.
0edf1bb2 11032
c7dc8804
JM
110332011-03-25 Jason Merrill <jason@redhat.com>
11034
11035 * c.opt: Add -std=c++03.
11036
d1d879b1
EB
110372011-03-22 Eric Botcazou <ebotcazou@adacore.com>
11038
11039 * c-ada-spec.c (dump_ada_template): Skip non-class instances.
11040
3f8257db 110412011-03-17 Kai Tietz <ktietz@redhat.com>
62d784f7
KT
11042
11043 PR target/12171
5050afdf
KT
11044 * c-pretty-print.c (pp_c_specifier_qualifier_list):
11045 Display allowed attributes for function pointer types.
11046 (pp_c_attributes_display): New function to display
11047 attributes having affects_type_identity flag set to true.
11048 * c-pretty-print.h (pp_c_attributes_display): New prototype.
11049
62d784f7
KT
11050 * c-common.c (c_common_attribute_table):
11051 Add new element.
11052 (c_common_format_attribute_table): Likewise.
11053
82d37118
JM
110542011-03-18 Jason Merrill <jason@redhat.com>
11055
49a000c3
JM
11056 * c.opt (fconstexpr-depth): Add Var(max_constexpr_depth).
11057 * c-common.h: Don't declare it here.
11058 * c-common.c: Or define it here.
11059 * c-opts.c (c_common_handle_option): Or set it here.
11060
82d37118
JM
11061 PR c++/35315
11062 * c-common.c (handle_transparent_union_attribute): Don't
11063 make a duplicate type in C++.
11064
17bc631c
JM
110652011-03-15 Jason Merrill <jason@redhat.com>
11066
11067 * c-common.c (max_constexpr_depth): New.
11068 * c-common.h: Declare it.
11069 * c-opts.c (c_common_handle_option): Set it.
11070 * c.opt (fconstexpr-depth): New option.
11071
1b9b91a6
JM
110722011-03-11 Jason Merrill <jason@redhat.com>
11073
f231b5ff
JM
11074 * c-common.c (attribute_takes_identifier_p): Add missing const.
11075
1b9b91a6
JM
11076 PR c++/46803
11077 * c-common.c (attribute_takes_identifier_p): Assume that an
11078 unknown attribute takes an identifier.
11079
a19e4d44
NF
110802011-03-07 Nathan Froyd <froydnj@codesourcery.com>
11081
11082 PR c/47786
11083 * c-common.c (c_type_hash): Call list_length instead of iterating
11084 through DECL_CHAIN. Rename 'i' to 'n_elements'.
11085
982d62f6
JJ
110862011-02-19 Jakub Jelinek <jakub@redhat.com>
11087
11088 PR c/47809
11089 * c-common.c (c_fully_fold_internal): Handle VIEW_CONVERT_EXPR.
11090
0a256240
NP
110912011-02-17 Iain Sandoe <iains@gcc.gnu.org>
11092
11093 * c.opt (fobjc-abi-version=) New.
11094 (fobjc-nilcheck): New.
11095
ba9e6dd5
NF
110962011-02-03 Nathan Froyd <froydnj@codesourcery.com>
11097
11098 PR c++/46890
11099 * c-common.h (keyword_is_decl_specifier): Declare.
11100 * c-common.c (keyword_is_decl_specifier): Define.
11101 (keyword_is_function_specifier): New function.
11102
7273813a
JJ
111032011-01-26 Jakub Jelinek <jakub@redhat.com>
11104
11105 PR c/47473
11106 * c-lex.c (interpret_float): If CPP_N_IMAGINARY, ensure
11107 EXCESS_PRECISION_EXPR is created with COMPLEX_TYPE instead of
11108 REAL_TYPE.
11109
908ef79b
AC
111102011-01-26 Arnaud Charlet <charlet@adacore.com>
11111
11112 * c-ada-spec.c (dump_generic_ada_node): Avoid dereferencing null type.
11113
237e9384
JJ
111142011-01-26 Jakub Jelinek <jakub@redhat.com>
11115
11116 PR pch/47430
11117 * c-opts.c (c_common_post_options): Call c_common_no_more_pch
11118 after init_c_lex if pch_file is set.
11119
47ea1edf
DK
111202011-01-26 Dave Korn <dave.korn.cygwin@gmail.com>
11121
d4dba752 11122 PR c++/43601
47ea1edf
DK
11123 * c.opt (-fkeep-inline-dllexport): New switch.
11124
2aa9c6ae
RG
111252011-01-12 Richard Guenther <rguenther@suse.de>
11126
11127 PR middle-end/32511
11128 * c-common.c (handle_weak_attribute): Warn instead of error
11129 on declaring an inline function weak.
11130
7bd11157
TT
111312011-01-05 Tom Tromey <tromey@redhat.com>
11132
11133 * c-common.h (lvalue_error): Update.
11134 * c-common.c (lvalue_error): Add 'loc' argument. Call error_at,
11135 not error.
11136
0e66e494 111372010-12-29 Nicola Pero <nicola.pero@meta-innovation.com>
9faeb493 11138
b4f588c4
NP
11139 PR objc/47075
11140 * c-objc.h (objc_finish_message_expr): Added argument to
11141 prototype.
11142
f4da8dce
NF
111432010-12-22 Nathan Froyd <froydnj@codesourcery.com>
11144
11145 * c-common.c (handle_nonnull_attribute, handle_sentinel_attribute):
11146 Use prototype_p.
11147
46270f14
NP
111482010-12-18 Nicola Pero <nicola.pero@meta-innovation.com>
11149
11150 * c-objc.h (objc_maybe_warn_exceptions): New.
9faeb493 11151 * stub-objc.c (objc_maybe_warn_exceptions): New.
46270f14 11152
4816c593
NF
111532010-12-10 Nathan Froyd <froydnj@codesourcery.com>
11154
11155 * c-common.h (readonly_error): Declare.
11156 * c-common.c (readonly_error): Define.
11157
7a6daeb0
NF
111582010-12-09 Nathan Froyd <froydnj@codesourcery.com>
11159
11160 * c-common.h (invalid_indirection_error): Declare.
11161 * c-common.c (invalid_indirection_error): Define.
11162
892f6119
RG
111632010-12-03 Richard Guenther <rguenther@suse.de>
11164
11165 PR c/46745
11166 * c-pretty-print.c (pp_c_postfix_expression): Handle MEM_REF.
11167 (pp_c_unary_expression): Likewise.
11168 (pp_c_expression): Likewise.
11169
6c39e757
NP
111702010-11-30 Nicola Pero <nicola.pero@meta-innovation.com>
11171
11172 * c-common.h (objc_finish_function): New.
11173 (objc_non_volatilized_type): Removed.
11174 (objc_type_quals_match): Removed.
11175 * stub-objc.c (objc_finish_function): New.
11176 (objc_non_volatilized_type): Removed.
11177 (objc_type_quals_match): Removed.
9faeb493 11178
7c475d11
JM
111792010-11-30 Joseph Myers <joseph@codesourcery.com>
11180
11181 * c-common.h (parse_optimize_options): Declare.
11182 * c-cppbuiltin.c, c-format.c, c-gimplify.c, c-lex.c, c-omp.c,
11183 c-pch.c, c-pragma.c, c-semantics.c: Don't include toplev.h.
11184
71f3e391
JM
111852010-11-29 Joseph Myers <joseph@codesourcery.com>
11186
11187 * c-opts.c (check_deps_environment_vars): Use getenv instead of
11188 GET_ENVIRONMENT.
11189 * c-pch.c (O_BINARY): Don't define here.
11190 * c-pragma.h: Include "cpplib.h" instead of <cpplib.h>.
11191
d5fabb58
JM
111922010-11-25 Joseph Myers <joseph@codesourcery.com>
11193
11194 * c-cppbuiltin.c (c_cpp_builtins): Pass &global_options to
11195 targetm.except_unwind_info.
11196
299404a1
JM
111972010-11-23 Joseph Myers <joseph@codesourcery.com>
11198
11199 * c-opts.c (c_common_handle_option): Pass location to
11200 set_struct_debug_option.
11201
c98cd5bf
JM
112022010-11-23 Joseph Myers <joseph@codesourcery.com>
11203
11204 * c-common.c (visibility_options): Move from ../opts.c.
11205 * c-common.h (struct visibility_flags, visibility_options):
11206 Declare here.
11207 * c-opts.c (finish_options): Rename to c_finish_options.
11208 (c_common_init): Update call to finish_options.
11209
a9546771
NP
112102010-11-22 Nicola Pero <nicola.pero@meta-innovation.com>
11211
11212 PR objc/34033
11213 * c-lex.c (lex_string): Check that each string in an Objective-C
11214 string concat sequence starts with either one or zero '@', and
11215 that there are no spurious '@' signs at the end.
11216
24a57808
JM
112172010-11-20 Joseph Myers <joseph@codesourcery.com>
11218
11219 * c-pragma.c: Remove conditionals on HANDLE_PRAGMA_PACK,
11220 HANDLE_PRAGMA_PACK_PUSH_POP, HANDLE_PRAGMA_WEAK and
11221 HANDLE_PRAGMA_VISIBILITY.
11222 * c-pragma.h (HANDLE_PRAGMA_WEAK, HANDLE_PRAGMA_PACK,
11223 HANDLE_PRAGMA_VISIBILITY): Don't define.
11224 (HANDLE_SYSV_PRAGMA, HANDLE_PRAGMA_PACK_PUSH_POP): Don't test.
11225
a9aa2c3a
NF
112262010-11-20 Nathan Froyd <froydnj@codesourcery.com>
11227
11228 PR c++/16189
11229 PR c++/36888
11230 PR c++/45331
11231 * c-common.h (keyword_begins_type_specifier): Declare.
11232 (keyword_is_storage_class_specifier): Declare.
11233 (keyword_is_type_qualifier): Declare.
11234 * c-common.c (keyword_begins_type_specifier): New function.
11235 (keyword_is_storage_class_specifier): New function.
11236 (keyword_is_type_qualifier): Declare.
11237
5386338c
JM
112382010-11-19 Joseph Myers <joseph@codesourcery.com>
11239
11240 PR c/46547
11241 * c-common.c (in_late_binary_op): Define.
11242 (c_common_truthvalue_conversion): Check in_late_binary_op before
11243 calling c_save_expr.
11244 * c-common.h (in_late_binary_op): Declare.
11245
69ccdddb
JM
112462010-11-19 Joseph Myers <joseph@codesourcery.com>
11247
11248 * c-opts.c (c_common_handle_option): Update calls to
11249 set_struct_debug_option.
11250
6b192a09
NP
112512010-11-19 Nicola Pero <nicola.pero@meta-innovation.com>
11252
11253 * c-common.h (objc_declare_protocols): Added additional argument.
11254 * stub-objc.c (objc_declare_protocol): Same change.
9faeb493 11255
fb52b50a
NF
112562010-11-18 Nathan Froyd <froydnj@codesourcery.com>
11257
11258 PR c/33193
11259 * c-common.h (build_real_imag_expr): Declare.
11260 * c-semantics.c (build_real_imag_expr): Define.
11261
b37421c6
JM
112622010-11-17 Joseph Myers <joseph@codesourcery.com>
11263
11264 * c-opts.c (c_common_parse_file): Take no arguments.
11265 * c-common.h (c_common_parse_file): Update prototype.
11266
07078664
JJ
112672010-11-16 Jakub Jelinek <jakub@redhat.com>
11268
11269 PR c++/46401
11270 * c-common.c (warning_candidate_p): Don't track non-const calls
11271 or STRING_CSTs.
11272
c6a13190
ILT
112732010-11-15 Ian Lance Taylor <iant@google.com>
11274
11275 * c-lex.c (init_c_lex): Set macro debug callbacks if
11276 flag_dump_go_spec is set.
11277
925e8657
NP
112782010-11-15 Nicola Pero <nicola.pero@meta-innovation.com>
11279
11280 * c-common.h (objc_build_incr_expr_for_property_ref): New.
11281 * stub-objc.c (objc_build_incr_expr_for_property_ref): New.
11282
bb0a9581
NF
112832010-11-15 Nathan Froyd <froydnj@codesourcery.com>
11284
11285 PR preprocessor/45038
11286 * c-cppbuiltin.c (c_cpp_builtins): Use different format for C++
11287 dialects.
11288
c5fa0890
JM
112892010-11-12 Joseph Myers <joseph@codesourcery.com>
11290
11291 * c-common.h (c_family_lang_mask): Declare.
11292 * c-opts.c (c_family_lang_mask): Make extern.
11293 * c-pragma.c (handle_pragma_diagnostic): Use
11294 control_warning_option.
11295
a4d8c676
JM
112962010-11-12 Joseph Myers <joseph@codesourcery.com>
11297
11298 * c-common.c (parse_optimize_options): Update call to
11299 decode_options.
11300 * c-common.h (c_common_handle_option): Update prototype.
11301 * c-opts.c (c_common_handle_option): Take location_t parameter and
11302 pass it to other functions.
11303
f954bd2c
JM
113042010-11-11 Joseph Myers <joseph@codesourcery.com>
11305
11306 * c-opts.c (warning_as_error_callback): Remove.
11307 (c_common_initialize_diagnostics): Don't call
11308 register_warning_as_error_callback.
11309 (c_common_handle_option): Handle -Werror=normalized= here.
11310
d8a07487
JM
113112010-11-10 Joseph Myers <joseph@codesourcery.com>
11312
11313 * c-common.c (handle_mode_attribute): Use %' and word "signedness"
11314 in diagnostic.
11315 * c-opts.c (c_common_parse_file): Start diagnostics with lowercase
11316 letter.
11317 * c-pragma.c (handle_pragma_target, handle_pragma_optimize):
11318 Remove trailing '.' from diagnostics.
11319 * c.opt (Wwrite-strings_: Avoid '`' in help text.
11320
d5478783
JM
113212010-11-10 Joseph Myers <joseph@codesourcery.com>
11322
11323 * c-common.c (parse_optimize_options): Pass global_dc to
11324 decode_options.
11325 * c-opts.c (c_common_handle_option): Pass &global_options to
11326 set_Wstrict_aliasing.
11327 * c.opt (v): Don't mark Common or document here.
11328
91ebb981
IS
113292010-11-06 Iain Sandoe <iains@gcc.gnu.org>
11330
11331 PR target/44981
11332 * c-format.c (format_type): New type gcc_objc_string_format_type.
11333 (valid_stringptr_type_p): New.
11334 (handle_format_arg_attribute): Use valid_stringptr_type_p ().
9faeb493 11335 (check_format_string): Pass expected type, use
91ebb981
IS
11336 valid_stringptr_type_p (), check that the format string types are
11337 consistent with the format specification.
11338 (decode_format_attr): Warn if NSString is used outside objective-c.
11339 (format_types_orig): Add NSString.
11340 (format_name): New.
11341 (format_flags): New.
11342 (check_format_arg): Handle format strings requiring an external parser.
11343 first_target_format_type: New variable.
11344 (handle_format_attribute): Set up first_target_format_type, pass the
11345 expected format arg string type to check_format_string().
ab20d992 11346 * c-common.h (FMT_FLAG_PARSE_ARG_CONVERT_EXTERNAL): New flag.
91ebb981
IS
11347 * stub-objc.c (objc_string_ref_type_p): New.
11348 (objc_check_format_arg): New.
11349
bede2adc
NP
113502010-11-04 Nicola Pero <nicola.pero@meta-innovation.com>
11351
9faeb493 11352 Fixed using the Objective-C 2.0 dot-syntax with class names.
bede2adc
NP
11353 * c-common.h (objc_build_class_component_ref): New.
11354 * stub-objc.c (objc_build_class_component_ref): New.
11355
9a179d01
NP
113562010-11-03 Nicola Pero <nicola.pero@meta-innovation.com>
11357
11358 * c.opt (Wproperty-assign-default): New option.
11359
22d8d616
NP
113602010-11-03 Nicola Pero <nicola.pero@meta-innovation.com>
11361
11362 Implemented -fobjc-std=objc1 flag.
11363 * c.opt (fobjc-std=objc1): New option.
11364
2debdb4f
NP
113652010-11-01 Nicola Pero <nicola.pero@meta-innovation.com>
11366
11367 Implemented format and noreturn attributes for Objective-C methods.
11368 * c-common.c (handle_noreturn_attribute): Recognize 'noreturn'
11369 attribute for Objective-C methods.
11370
ec52b111
JM
113712010-10-31 Jason Merrill <jason@redhat.com>
11372
11373 * c-common.c (conversion_warning, warn_for_collisions_1): Use
11374 EXPR_LOC_OR_HERE.
11375
46a88c12
NP
113762010-10-30 Nicola Pero <nicola.pero@meta-innovation.com>
11377
11378 Implemented Objective-C 2.0 @property, @synthesize and @dynamic.
11379 * c-common.h (enum rid): Removed RID_COPIES and RID_IVAR.
11380 (objc_add_property_declaration): Removed arguments for copies and
11381 ivar.
11382 (objc_build_getter_call): Renamed to
11383 objc_maybe_build_component_ref.
11384 (objc_build_setter_call): Renamed to objc_maybe_build_modify_expr.
11385 (objc_is_property_ref): New.
11386 * c-common.c (c_common_reswords): Removed copies and ivar.
11387 * stub-objc.c (objc_add_property_declaration): Removed arguments
11388 for copies and ivar.
11389 (objc_build_getter_call): Renamed to
11390 objc_maybe_build_component_ref.
11391 (objc_build_setter_call): Renamed to objc_maybe_build_modify_expr.
11392 (objc_is_property_ref): New.
9faeb493 11393
1e4bf85b
AC
113942010-10-29 Arnaud Charlet <charlet@adacore.com>
11395 Matthew Gingell <gingell@adacore.com>
11396
11397 * c-ada-spec.c (separate_class_package): New function.
11398 (pp_ada_tree_identifier): Prefix references to C++ classes with the
11399 name of their enclosing package.
11400 (print_ada_declaration): Use separate_class_package.
11401
81f0bab2
JM
114022010-10-27 Jason Merrill <jason@redhat.com>
11403
2b08f2c5
JM
11404 * c-common.c (c_common_reswords): Add __is_literal_type.
11405 * c-common.h (enum rid): Add RID_IS_LITERAL_TYPE.
11406
81f0bab2
JM
11407 * c-common.c (check_case_value): Remove special C++ code.
11408
200290f2
NP
114092010-10-27 Nicola Pero <nicola.pero@meta-innovation.com>
11410
11411 * c-common.h (enum rid): Added RID_READWRITE, RID_ASSIGN,
11412 RID_RETAIN, RID_COPY and RID_NONATOMIC. Updated RID_FIRST_PATTR
11413 and RID_LAST_PATTR.
11414 (objc_add_property_declaration): Added additional arguments.
11415 (objc_property_attribute_kind): Removed.
11416 (objc_set_property_attr): Removed.
11417 * c-common.c (c_common_reswords): Added readwrite, assign, retain,
11418 copy and nonatomic.
11419 * stub-objc.c (objc_add_property_declaration): Added additional
11420 arguments.
11421 (objc_set_property_attr): Removed.
9faeb493 11422
f614132b
NP
114232010-10-27 Nicola Pero <nicola.pero@meta-innovation.com>
11424
11425 * c-common.h (objc_add_property_variable): Renamed to
11426 objc_add_property_declaration. Added location argument.
11427 * stub-objc.c (objc_add_property_variable): Same change.
b1726d6c 11428
b8a18805
NP
114292010-10-23 Nicola Pero <nicola.pero@meta-innovation.com>
11430
11431 * c-common.h (objc_maybe_printable_name): New.
11432 * stub-objc.c (objc_maybe_printable_name): New.
11433
3f8257db
JJ
114342010-10-22 Artjoms Sinkarovs <artyom.shinakroff@gmail.com>
11435 Andrew Pinski <pinskia@gmail.com>
30cd1c5d
AS
11436
11437 * c-common.h (c_common_mark_addressable_vec): Declare.
11438 * c-common.c (c_common_mark_addressable_vec): New function.
11439
249a82c4
NP
114402010-10-20 Nicola Pero <nicola.pero@meta-innovation.com>
11441
11442 * c-common.h (objc_set_method_type): Removed.
11443 (objc_add_method_declaration): Added boolean argument.
11444 (objc_start_method_definition): Same change.
11445 (objc_build_method_signature): Same change.
11446 * stub-objc.c (objc_set_method_type): Removed.
11447 (objc_add_method_declaration): Added boolean argument.
11448 (objc_start_method_definition): Same change.
11449 (objc_build_method_signature): Same change.
11450
977e30bc
NP
114512010-10-20 Nicola Pero <nicola.pero@meta-innovation.com>
11452
11453 * c-common.h (finish_file): Removed.
11454 (objc_write_global_declarations): New.
11455 * c-opts.c (c_common_parse_file): Do not call finish_file.
11456 * stub-objc.c (objc_write_global_declarations): New.
9faeb493 11457
da57d1b9
NP
114582010-10-18 Nicola Pero <nicola.pero@meta-innovation.com>
11459
11460 Implemented parsing @synthesize and @dynamic for
11461 Objective-C/Objective-C++.
11462 * c-common.h (enum rid): Add RID_AT_SYNTHESIZE and RID_AT_DYNAMIC.
11463 (objc_add_synthesize_declaration): New.
11464 (objc_add_dynamic_declaration): New.
11465 * c-common.c (c_common_reswords): Add synthesize and dynamic.
11466 * stub-objc.c (objc_add_synthesize_declaration): New.
11467 (objc_add_dynamic_declaration): New.
9faeb493 11468
0069111f
MM
114692010-10-18 Michael Meissner <meissner@linux.vnet.ibm.com>
11470
11471 PR target/46041
11472 * c-cppbuiltin.c (mode_has_fma): Move function here from
11473 builtins.c. Don't use the fma optab, instead just use the
11474 HAVE_fma* macros, so that __FP_FAST_FMA* will be defined when
11475 using -save-temps.
11476
e426b47b
NP
114772010-10-18 Nicola Pero <nicola.pero@meta-innovation.com>
11478
11479 Merge from 'apple/trunk' branch on FSF servers.
0069111f 11480
3f8257db 11481 2005-11-08 Fariborz Jahanian <fjahanian@apple.com>
e426b47b 11482
9faeb493 11483 Radar 4330422
e426b47b
NP
11484 * c-common.h (objc_non_volatilized_type): New declaration
11485 * stub-objc.c (objc_non_volatilized_type): New stub.
11486
90fbfdc3
NP
114872010-10-17 Nicola Pero <nicola.pero@meta-innovation.com>
11488
e426b47b 11489 Merge from 'apple/trunk' branch on FSF servers.
90fbfdc3 11490
ab20d992 11491 2006-03-27 Fariborz Jahanian <fjahanian@apple.com>
90fbfdc3 11492
9faeb493 11493 Radar 4133425
90fbfdc3 11494 * c-common.h (objc_diagnose_private_ivar): New decl.
0069111f 11495 * stub-objc.c (objc_diagnose_private_ivar): New stub.
90fbfdc3 11496
c37d8c30
IS
114972010-10-17 Iain Sandoe <iains@gcc.gnu.org>
11498
11499 * c-common.c (c_common_reswords): Add package, RID_AT_PACKAGE.
11500 * c-common.h (enum rid): Add RID_AT_PACKAGE.
11501 (objc_ivar_visibility_kind): New enum.
11502 (objc_set_visibility): Adjust prototype to use visibility enum.
0069111f 11503 * stub-objc.c (objc_set_visibility): Adjust stub to use
c37d8c30
IS
11504 visibility enum.
11505
1b1562a5
MM
115062010-10-14 Michael Meissner <meissner@linux.vnet.ibm.com>
11507
11508 * c-cppbuiltin.c (builtin_define_float_constants): Emit
11509 __FP_FAST_FMA, __FP_FAST_FMAF, and __FP_FAST_FMAL if the machine
11510 has the appropriate fma builtins.
11511 (c_cpp_builtins): Adjust call to builtin_define_float_constants.
11512
668ea4b1
IS
115132010-10-14 Iain Sandoe <iains@gcc.gnu.org>
11514
1b1562a5 11515 merge from FSF apple 'trunk' branch.
3f8257db 11516 2006 Fariborz Jahanian <fjahanian@apple.com>
1b1562a5 11517
668ea4b1
IS
11518 Radars 4436866, 4505126, 4506903, 4517826
11519 * c-common.c (c_common_resword): Define @property and its attributes.
11520 * c-common.h: Define property attribute enum entries.
11521 (OBJC_IS_PATTR_KEYWORD): New.
11522 (objc_property_attribute_kind): New enum.
11523 Declare objc_set_property_attr (), objc_add_property_variable (),
11524 objc_build_getter_call () and objc_build_setter_call ().
11525 * stub-objc.c (objc_set_property_attr): New stub.
11526 (objc_add_property_variable): Likewise.
11527 (objc_build_getter_call): Likewise.
11528 (objc_build_setter_call) Likewise.
1b1562a5 11529
a1178b30
IS
115302010-10-13 Iain Sandoe <iains@gcc.gnu.org>
11531
1b1562a5 11532 merge from FSF apple 'trunk' branch.
ab20d992 11533 2006-04-26 Fariborz Jahanian <fjahanian@apple.com>
a1178b30
IS
11534
11535 Radar 3803157 (method attributes)
11536 * c-common.c (handle_deprecated_attribute): Recognize
11537 objc methods as valid declarations.
11538 * c-common.h: Declare objc_method_decl ().
1b1562a5 11539 * stub-objc.c (objc_method_decl): New stub.
a1178b30 11540
a75bfaa6
JM
115412010-10-08 Joseph Myers <joseph@codesourcery.com>
11542
11543 * c-common.c (parse_optimize_options): Call
11544 decode_cmdline_options_to_array_default_mask before
11545 decode_options. Update arguments to decode_options.
11546 * c-common.h (c_common_init_options_struct): Declare.
11547 * c-opts.c (c_common_init_options_struct): New. Split out from
11548 c_common_init_options.
11549
f05b9d93
NP
115502010-10-06 Nicola Pero <nicola.pero@meta-innovation.com>
11551
11552 Implemented fast enumeration for Objective-C.
11553 * c-common.h (objc_finish_foreach_loop): New.
11554 * stub-objc.c (objc_finish_foreach_loop): New.
11555
1ebe4b4f
JM
115562010-10-05 Joseph Myers <joseph@codesourcery.com>
11557
11558 * c-common.h (struct diagnostic_context): Don't declare here.
11559 (c_common_initialize_diagnostics): Declare using
11560 diagnostic_context typedef.
11561 * c-opts.c (c_common_handle_option): Pass global_dc to
11562 handle_generated_option.
11563
d4d24ba4
JM
115642010-10-04 Joseph Myers <joseph@codesourcery.com>
11565
11566 * c-opts.c (c_common_handle_option): Pass &global_options_set to
11567 handle_generated_option.
11568
478a1c5b
ILT
115692010-10-03 Ian Lance Taylor <iant@google.com>
11570
11571 * c.opt (-fplan9-extensions): New option.
11572
82a1c2fe
FXC
115732010-10-03 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
11574
11575 * c-cppbuiltin.c (define__GNUC__, builtin_define_type_precision):
11576 Remove.
11577 (c_cpp_builtins): Call functions from cppbuiltin.c instead
11578 of duplicating code.
11579
92902b1b
IS
115802010-09-30 Iain Sandoe <iains@gcc.gnu.org>
11581
11582 * c-common.c: Add two new entries for @optional
11583 and @required keywords.
11584
11585 merge from FSF 'apple/trunk' branch.
3f8257db 11586 2006-01-30 Fariborz Jahanian <fjahanian@apple.com>
92902b1b
IS
11587
11588 Radar 4386773
11589 * c-common.h (RID_AT_OPTIONAL, RID_AT_REQUIRED): Two new
11590 objective-c keywords.
11591 (objc_set_method_opt): New declaration.
11592 * stub-objc.c (objc_set_method_opt): New stub.
9faeb493 11593
46625112
JM
115942010-09-30 Joseph Myers <joseph@codesourcery.com>
11595
11596 * c-common.c (handle_optimize_attribute): Pass &global_options to
11597 cl_optimization_save and cl_optimization_restore.
11598 * c-opts.c (c_common_handle_option): Pass &global_options to
11599 handle_generated_option.
11600 * c-pragma.c (handle_pragma_diagnostic): Use option_flag_var.
11601 (handle_pragma_pop_options, handle_pragma_reset_options): Pass
11602 &global_options to cl_optimization_restore.
11603
49b91f05
NP
116042010-09-30 Nicola Pero <nicola.pero@meta-innovation.com>
11605
11606 * c-lex.c (c_lex_with_flags): Updated comments for CPP_AT_NAME
11607 Objective-C/Objective-C++ keywords.
11608
13ed556f 116092010-09-29 Nicola Pero <nicola.pero@meta-innovation.com>
a6341d57 11610
9faeb493
UB
11611 Merge from 'apple/trunk' branch on FSF servers.
11612
3f8257db 11613 2005-10-04 Fariborz Jahanian <fjahanian@apple.com>
a6341d57
NP
11614
11615 Radar 4281748
11616 * c-common.h (objc_check_global_decl): New declaration.
11617 * stub-objc.c (objc_check_global_decl): New stub.
11618
f0036cca
JM
116192010-09-29 Joseph Myers <joseph@codesourcery.com>
11620
11621 * c.opt: Don't use VarExists.
11622
e3339d0f
JM
116232010-09-29 Joseph Myers <joseph@codesourcery.com>
11624
11625 * c-common.c (c_cpp_error): Update names of diagnostic_context
11626 members.
11627 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Update names of
11628 cl_optimization members.
11629 * c-opts.c (warning_as_error_callback, c_common_handle_option,
11630 sanitize_cpp_opts, finish_options): Update names of cpp_options
11631 members.
11632
1973201f
NP
116332010-09-29 Nicola Pero <nicola.pero@meta-innovation.com>
11634
11635 * c-common.h (OBJC_IS_CXX_KEYWORD): New macro. Updated comments.
11636 (objc_is_reserved_word): Removed.
11637 * c-common.c: Updated comments.
11638 * c-lex.c (c_lex_with_flags): Use OBJC_IS_CXX_KEYWORD instead of
11639 objc_is_reserved_word.
11640 * stub-objc.c (objc_is_reserved_word): Removed.
11641
f7e71da5
IS
116422010-09-28 Iain Sandoe <iains@gcc.gnu.org>
11643
9faeb493 11644 * c-common.h (objc_add_method_declaration): Adjust prototype to
f7e71da5
IS
11645 include attributes.
11646 (objc_start_method_definition): Likewise.
11647 (objc_build_keyword_decl): Likewise.
11648 * stub-objc.c:(objc_add_method_declaration): Handle attributes.
11649 (objc_start_method_definition): Likewise.
11650 (objc_build_keyword_decl): Likewise.
11651
c165dca7
IS
116522010-09-28 Iain Sandoe <iains@gcc.gnu.org>
11653
11654 * c-common.h (objc_start_class_interface): Adjust prototype.
11655 (objc_start_category_interface): Likewise.
11656 (objc_start_protocol): Likewise.
11657 * stub-objc.c (objc_start_protocol): Adjust for extra argument.
11658 (objc_start_class_interface): Likewise.
11659 (objc_start_category_interface): Likewise.
11660
7458026b
ILT
116612010-09-27 Ian Lance Taylor <iant@google.com>
11662
11663 * c-common.c (c_common_attribute_table): Add no_split_stack.
11664 (handle_no_split_stack_attribute): New static function.
11665
b581b85b
NP
116662010-09-27 Nicola Pero <nicola.pero@meta-innovation.com>
11667
9faeb493 11668 Merge from 'apple/trunk' branch on FSF servers.
b581b85b 11669
3f8257db 11670 2005-12-15 Fariborz Jahanian <fjahanian@apple.com>
b581b85b 11671
9faeb493 11672 Radar 4229905
b581b85b
NP
11673 * c-common.h (objc_have_common_type): New declaration.
11674 * stub-objc.c (objc_have_common_type): New stub.
11675
11676 2005-06-22 Ziemowit Laski <zlaski@apple.com>
11677
11678 Radar 4154928
11679 * c-common.h (objc_common_type): New prototype.
9faeb493 11680 * stub-objc.c (objc_common_type): New stub.
b581b85b 11681
46a4da10
JH
116822010-09-24 Jan Hubicka <jh@suse.cz>
11683
11684 * c-common.c (handle_leaf_attribute): New function.
11685 (struct attribute_spec c_common_att): Add leaf.
11686
e200444e
JM
116872010-09-22 Joseph Myers <joseph@codesourcery.com>
11688
11689 * c.opt (-all-warnings, -ansi, -assert, -assert=, -comments,
11690 -comments-in-macros, -define-macro, -define-macro=, -dependencies,
11691 -dump, -dump=, -imacros, -imacros=, -include, -include=,
11692 -include-barrier, -include-directory, -include-directory=,
11693 -include-directory-after, -include-directory-after=,
11694 -include-prefix, -include-prefix=, -include-with-prefix,
11695 -include-with-prefix=, -include-with-prefix-after,
11696 -include-with-prefix-after=, -include-with-prefix-before,
11697 -include-with-prefix-before=, -no-integrated-cpp,
11698 -no-line-commands, -no-standard-includes, -no-warnings, -output,
11699 -output=, -pedantic, -pedantic-errors, -preprocess,
11700 -print-missing-file-dependencies, -trace-includes, -traditional,
11701 -traditional-cpp, -trigraphs, -undefine-macro, -undefine-macro=,
11702 -user-dependencies, -verbose, -write-dependencies,
11703 -write-user-dependencies, no-integrated-cpp, traditional): New.
11704
29a80ea6
NP
117052010-09-21 Nicola Pero <nicola.pero@meta-innovation.com>
11706
11707 PR objc/23710
ac1fc2fc
NP
11708 * c-common.h (objc_start_method_definition): Return bool instead
11709 of void.
11710 * stub-objc.c (objc_start_method_definition): Return bool instead
11711 of void.
11712
117132010-09-21 Nicola Pero <nicola.pero@meta-innovation.com>
11714
11715 PR objc/25965
11716 * c-common.h (objc_get_interface_ivars): New declaration.
11717 * stub-objc.c (objc_get_interface_ivars): New stub.
29a80ea6 11718
de621752
ILT
117192010-09-15 Ian Lance Taylor <iant@google.com>
11720
11721 * c-common.c (parse_optimize_options): Do not capitalize warning
06730c5d 11722 messages. Remove period at end of warning message.
de621752 11723
ba885ec5
NS
117242010-09-09 Nathan Sidwell <nathan@codesourcery.com>
11725
11726 * c-common.c (handle_alias_ifunc_attribute): New, broken out of ...
11727 (handle_alias_attribute): ... here.
11728 (handle_ifunc_attribute): New.
11729
c5ee1358
MM
117302010-09-06 Mark Mitchell <mark@codesourcery.com>
11731
11732 * c-common.h (do_warn_double_promotion): Declare.
11733 * c-common.c (do_warn_double_promotion): Define.
11734
0a0b3574
MM
117352010-09-05 Mark Mitchell <mark@codesourcery.com>
11736
11737 * c.opt (Wdouble-promotion): New.
11738
d1779886
JM
117392010-09-02 Joseph Myers <joseph@codesourcery.com>
11740
11741 * c.opt (falt-external-templates, fhuge-objects, fvtable-gc,
11742 fvtable-thunks, fxref): Mark no longer supported in help text.
11743
2d2bd949
JM
117442010-09-02 Joseph Myers <joseph@codesourcery.com>
11745
11746 * c.opt (Wimport, fall-virtual, falt-external-templates,
11747 fdefault-inline, fenum-int-equiv, fexternal-templates,
11748 fguiding-decls, fhonor-std, fhuge-objects, flabels-ok,
11749 fname-mangling-version-, fnew-abi, fnonnull-objects,
11750 foptional-diags, fsquangle, fstrict-prototype, fthis-is-variable,
11751 fvtable-gc, fvtable-thunks, fxref): Mark with Ignore and Warn as
11752 applicable.
11753 (fhandle-exceptions): Mark with Alias and Warn.
11754 * c-opts.c (c_common_handle_option): Don't handle options marked
11755 as ignored.
11756
5de8299c
JM
117572010-09-02 Joseph Myers <joseph@codesourcery.com>
11758
11759 * c.opt (Wcomments, Werror-implicit-function-declaration,
11760 ftemplate-depth-, std=c89, std=c9x, std=gnu89, std=gnu9x,
11761 std=iso9899:1990, std=iso9899:1999, std=iso9899:199x): Mark as
11762 aliases.
11763 * c-common.c (option_codes): Use OPT_Wcomment instead of
11764 OPT_Wcomments.
11765 * c-opts.c (warning_as_error_callback, c_common_handle_option):
11766 Don't handle options marked as aliases.
11767
0ceb0201
RG
117682010-08-25 Richard Guenther <rguenther@suse.de>
11769
11770 * c-common.c (c_common_get_alias_set): Remove special
11771 handling for pointers.
11772
ac47786e
NF
117732010-08-20 Nathan Froyd <froydnj@codesourcery.com>
11774
11775 * c-common.c: Use FOR_EACH_VEC_ELT.
11776 * c-gimplify.c: Likewise.
11777 * c-pragma.c: Likewise.
11778
c878765b
JM
117792010-08-16 Joseph Myers <joseph@codesourcery.com>
11780
11781 * c.opt (MDX): Change back to MD. Mark NoDriverArg instead of
11782 RejectDriver.
11783 (MMDX): Change back to MMD. Mark NoDriverArg instead of
11784 RejectDriver.
11785 * c-opts.c (c_common_handle_option): Use OPT_MD and OPT_MMD
11786 instead of OPT_MDX and OPT_MMDX.
11787
603349bf
JM
117882010-08-16 Joseph Myers <joseph@codesourcery.com>
11789
11790 * c.opt (MDX, MMDX, lang-asm): Mark RejectDriver.
11791
644fa7ac
JM
117922010-08-12 Joseph Myers <joseph@codesourcery.com>
11793
11794 * c.opt (MD, MMD): Change to MDX and MMDX.
11795 * c-opts.c (c_common_handle_option): Use OPT_MMD and OPT_MMDX.
11796
481e1176
JM
117972010-08-11 Joseph Myers <joseph@codesourcery.com>
11798
11799 * c-opts.c (c_common_handle_option): Call handle_generated_option
11800 instead of handle_option.
11801
ac8dc9f7
NF
118022010-08-08 Nathan Froyd <froydnj@codesourcery.com>
11803
11804 * c-pragma.c (add_to_renaming_pragma_list): Fix call to VEC_safe_push.
11805 (maybe_apply_renaming_pragma): Delete unneeded declarations.
11806
4f8c876d
NF
118072010-08-08 Nathan Froyd <froydnj@codesourcery.com>
11808
11809 * c-pragma.c (pending_redefinition): Declare. Declare a VEC of it.
11810 (pending_redefine_extname): Change type to a VEC.
11811 (add_to_renaming_pragma_list): Update for new type of
11812 pending_redefine_extname.
ac8dc9f7 11813 (maybe_apply_renaming_pragma): Likewise.
4f8c876d 11814
3b0c690e
AC
118152010-08-04 Arnaud Charlet <charlet@adacore.com>
11816
11817 * c-ada-spec.c (dump_ada_template): Mark underlying instance type as
11818 visited.
11819 (dump_generic_ada_node): Code clean up. Use TREE_VISITED flag to
11820 decide whether a type has already been declared/seen.
11821 Do not go to the original type.
11822 (dump_nested_types): New parameter forward.
11823 Generate forward declaration if needed and mark type as visited.
11824 (print_ada_declaration): Call dump_nested_types if not already done.
11825 Mark types as visited.
11826
1890bccc
JM
118272010-08-03 Joseph Myers <joseph@codesourcery.com>
11828
11829 * c.opt (-print-pch-checksum): Remove option.
11830 * c-opts.c (c_common_handle_option): Don't handle
11831 OPT_print_pch_checksum.
11832
5f20c657
JM
118332010-07-27 Joseph Myers <joseph@codesourcery.com>
11834
11835 * c-common.h (c_common_handle_option): Update prototype and return
11836 value type.
11837 * c-opts.c (c_common_handle_option): Update prototype and return
11838 value type. Update calls to handle_option and
11839 enable_warning_as_error.
11840
f551f80c
JJ
118412010-07-27 Jakub Jelinek <jakub@redhat.com>
11842
11843 PR c/45079
11844 * c-pretty-print.c (pp_c_expression): Handle C_MAYBE_CONST_EXPR.
11845
61ff2bdc
JM
118462010-07-27 Joseph Myers <joseph@codesourcery.com>
11847
11848 * c-common.h (c_common_missing_argument): Remove.
11849 * c-opts.c (c_common_missing_argument): Remove.
11850 * c.opt (A, D, F, I, MD, MMD, MQ, MT, U, fconstant-string-class=,
11851 idirafter, imacros, include, isysroot, isystem, iquote): Add
11852 MissingArgError.
11853 * c-objc-common.h (LANG_HOOKS_MISSING_ARGUMENT): Remove.
11854
7a9bf9a4
JM
118552010-07-27 Joseph Myers <joseph@codesourcery.com>
11856
11857 * c-common.h (c_common_option_lang_mask,
11858 c_common_initialize_diagnostics, c_common_complain_wrong_lang_p):
11859 New.
11860 (c_common_init_options): Update prototype.
11861 * c-opts.c (c_common_option_lang_mask): New.
11862 (c_common_initialize_diagnostics): Split out of
11863 c_common_init_options.
11864 (accept_all_c_family_options, c_common_complain_wrong_lang_p):
11865 New.
11866 (c_common_init_options): Update prototype. Use decoded options in
11867 search for -lang-asm.
11868
910ad8de
NF
118692010-07-15 Nathan Froyd <froydnj@codesourcery.com>
11870
11871 * c-common.c: Carefully replace TREE_CHAIN with DECL_CHAIN.
11872 * c-format.c: Likewise.
11873
718f9c0f
MLI
118742010-07-08 Manuel López-Ibáñez <manu@gcc.gnu.org>
11875
11876 * c-common.h: Include diagnostic-core.h. Error if already
11877 included.
11878 * c-semantics.c: Do not define GCC_DIAG_STYLE here.
11879
4d451982
MLI
118802010-07-03 Manuel López-Ibáñez <manu@gcc.gnu.org>
11881
adfac8df 11882 * c-common.c (IN_GCC_FRONTEND): Do not undef.
4d451982
MLI
11883 Do not include expr.h
11884 (vector_mode_valid_p): Move here.
11885
119fe915
SB
118862010-06-21 DJ Delorie <dj@redhat.com>
11887
11888 * c-pragma.c (handle_pragma_diagnostic): Add push/pop,
11889 allow these pragmas anywhere.
11890
118912010-06-14 Jakub Jelinek <jakub@redhat.com>
11892
11893 PR bootstrap/44509
11894 * c-cppbuiltin.c: Include gt-c-family-c-cppbuiltin.h.
11895 (lazy_hex_fp_values, lazy_hex_fp_value_count): Add GTY(()) markers.
11896 (lazy_hex_fp_value, builtin_define_with_hex_fp_value): Use
11897 ggc_strdup instead of xstrdup.
11898
118992010-06-10 Jakub Jelinek <jakub@redhat.com>
11900
11901 * c-cppbuiltin.c: Include cpp-id-data.h.
11902 (lazy_hex_fp_values, lazy_hex_fp_value_count): New variables.
11903 (lazy_hex_fp_value): New function.
11904 (builtin_define_with_hex_fp_value): Provide definitions lazily.
11905
6662d794
MLI
119062010-06-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
11907
11908 * c-gimplify.c: Do not include tree-flow.h
11909
38f8b050
JR
119102010-06-29 Joern Rennecke <joern.rennecke@embecosm.com>
11911
11912 PR other/44034
11913 * c-common.c: Rename targetm member:
11914 targetm.enum_va_list -> targetm.enum_va_list_p
11915
9589f23e
AS
119162010-06-28 Anatoly Sokolov <aesok@post.ru>
11917
11918 * c-common.c (shorten_compare): Adjust call to force_fit_type_double.
11919
3b06d379
SB
119202010-06-28 Steven Bosscher <steven@gcc.gnu.org>
11921
11922 * c-cppbuiltin.c: Do not include except.h.
11923
d166d4c3
AK
119242010-06-24 Andi Kleen <ak@linux.intel.com>
11925
9faeb493
UB
11926 * c-common.c (warn_for_omitted_condop): New.
11927 * c-common.h (warn_for_omitted_condop): Add prototype.
d166d4c3 11928
70cb8be6
JM
119292010-06-21 Joseph Myers <joseph@codesourcery.com>
11930
11931 * c.opt (lang-objc): Remove.
11932 * c-opts.c (c_common_handle_option): Don't handle OPT_lang_objc.
11933
a4c97feb
JR
119342010-06-21 Joern Rennecke <joern.rennecke@embecosm.com>
11935
11936 * c-opts.c: Include "tm_p.h".
11937
6e2f1956
JM
119382010-06-20 Joseph Myers <joseph@codesourcery.com>
11939
11940 * c-common.c (parse_optimize_options): Update call to
11941 decode_options.
11942
bc87224e
NF
119432010-06-18 Nathan Froyd <froydnj@codesourcery.com>
11944
11945 * c-common.c (record_types_used_by_current_var_decl): Adjust for
11946 new type of types_used_by_cur_var_decl.
11947
b49cf425
JR
119482010-06-17 Joern Rennecke <joern.rennecke@embecosm.com>
11949
11950 PR bootstrap/44512
11951 * c-cppbuiltin.c (builtin_define_with_hex_fp_value): Add cast
11952 for C++ standard compliance.
11953
59f9c2ed
JM
119542010-06-16 Jason Merrill <jason@redhat.com>
11955
11956 * c.opt: Add -Wnoexcept.
11957
33766b66
RG
119582010-06-16 Richard Guenther <rguenther@suse.de>
11959
11960 PR c/44555
11961 * c-common.c (c_common_truthvalue_conversion): Remove
11962 premature and wrong optimization concering ADDR_EXPRs.
11963
eff7e30c
AC
119642010-06-15 Arnaud Charlet <charlet@adacore.com>
11965
11966 * c-ada-spec.c (dump_sloc): Remove column info.
11967 (is_simple_enum): New function.
11968 (dump_generic_ada_node, print_ada_declaration): Map C enum types to Ada
11969 enum types when relevant.
11970
6312e84d
MLI
119712010-06-11 Manuel López-Ibáñez <manu@gcc.gnu.org>
11972
9faeb493 11973 * c-common.c (conversion_warning): Warn at expression
6312e84d
MLI
11974 location.
11975
1cb42611
JM
119762010-06-10 Joseph Myers <joseph@codesourcery.com>
11977
11978 * c-opts.c (c_common_handle_option): Don't handle
11979 OPT_fshow_column.
11980
a9429e29
LB
119812010-06-08 Laurynas Biveinis <laurynas.biveinis@gmail.com>
11982
11983 * c-pragma.c (push_alignment): Use typed GC allocation.
11984 (handle_pragma_push_options): Likewise.
11985
11986 * c-common.c (parse_optimize_options): Likewise.
11987
11988 * c-common.h (struct sorted_fields_type): Add variable_size GTY
11989 option.
11990
5498f011
JM
119912010-06-07 Joseph Myers <joseph@codesourcery.com>
11992
11993 * c-common.c (flag_preprocess_only, flag_undef, flag_no_builtin,
11994 flag_no_nonansi_builtin, flag_short_double, flag_short_wchar,
11995 flag_lax_vector_conversions, flag_ms_extensions, flag_no_asm,
11996 flag_signed_bitfields, warn_strict_null_sentinel,
11997 flag_nil_receivers, flag_zero_link, flag_replace_objc_classes,
11998 flag_gen_declaration, flag_no_gnu_keywords,
11999 flag_implement_inlines, flag_implicit_templates,
12000 flag_implicit_inline_templates, flag_optional_diags,
12001 flag_elide_constructors, flag_default_inline, flag_rtti,
12002 flag_conserve_space, flag_access_control, flag_check_new,
12003 flag_new_for_scope, flag_weak, flag_working_directory,
12004 flag_use_cxa_atexit, flag_use_cxa_get_exception_ptr,
12005 flag_enforce_eh_specs, flag_threadsafe_statics,
12006 flag_pretty_templates): Remove.
12007 * c-common.h (flag_preprocess_only, flag_nil_receivers,
12008 flag_objc_exceptions, flag_objc_sjlj_exceptions, flag_zero_link,
12009 flag_replace_objc_classes, flag_undef, flag_no_builtin,
12010 flag_no_nonansi_builtin, flag_short_double, flag_short_wchar,
12011 flag_lax_vector_conversions, flag_ms_extensions, flag_no_asm,
12012 flag_const_strings, flag_signed_bitfields, flag_gen_declaration,
12013 flag_no_gnu_keywords, flag_implement_inlines,
12014 flag_implicit_templates, flag_implicit_inline_templates,
12015 flag_optional_diags, flag_elide_constructors, flag_default_inline,
12016 flag_rtti, flag_conserve_space, flag_access_control,
12017 flag_check_new, flag_new_for_scope, flag_weak,
12018 flag_working_directory, flag_use_cxa_atexit,
12019 flag_use_cxa_get_exception_ptr, flag_enforce_eh_specs,
12020 flag_threadsafe_statics, flag_pretty_templates,
12021 warn_strict_null_sentinel): Remove.
12022 * c.opt (E, Wstrict-null-sentinel, faccess-control, fasm,
12023 fbuiltin, fcheck-new, fconserve-space, felide-constructors,
12024 fenforce-eh-specs, ffor-scope, fgnu-keywords, fimplement-inlines,
12025 fimplicit-inline-templates, fimplicit-templates,
12026 flax-vector-conversions, fms-extensions, fnil-receivers,
12027 fnonansi-builtins, fpretty-templates, freplace-objc-classes,
12028 frtti, fshort-double, fshort-enums, fshort-wchar,
12029 fsigned-bitfields, fsigned-char, fstats, fthreadsafe-statics,
12030 funsigned-bitfields, funsigned-char, fuse-cxa-atexit,
12031 fuse-cxa-get-exception-ptr, fweak, fworking-directory, fzero-link,
12032 gen-decls, undef): Use Var.
12033 (fdefault-inline, foptional-diags): Document as doing nothing.
12034 * c-opts.c (c_common_handle_option): Remove cases for options now
12035 using Var. Mark ignored options as such.
12036
39dabefd
SB
120372010-06-05 Steven Bosscher <steven@gcc.gnu.org>
12038
9faeb493 12039 * c-common.c: Moved to here from parent directory.
39dabefd
SB
12040 * c-common.def: Likewise.
12041 * c-common.h: Likewise.
12042 * c-cppbuiltin.c: Likewise.
12043 * c-dump.c: Likewise.
12044 * c-format.c: Likewise.
12045 * c-format.h : Likewise.
12046 * c-gimplify.c: Likewise.
12047 * c-lex.c: Likewise.
12048 * c-omp.c: Likewise.
12049 * c.opt: Likewise.
12050 * c-opts.c: Likewise.
12051 * c-pch.c: Likewise.
12052 * c-ppoutput.c: Likewise.
12053 * c-pragma.c: Likewise.
12054 * c-pragma.h: Likewise.
12055 * c-pretty-print.c: Likewise.
12056 * c-pretty-print.h: Likewise.
12057 * c-semantics.c: Likewise.
12058 * stub-objc.c: Likewise.
12059
12060 * c-common.c: Include gt-c-family-c-common.h.
12061 * c-pragma.c: Include gt-c-family-c-pragma.h.
12062\f
c48514be 12063Copyright (C) 2010-2021 Free Software Foundation, Inc.
39dabefd
SB
12064
12065Copying and distribution of this file, with or without modification,
12066are permitted in any medium without royalty provided the copyright
12067notice and this notice are preserved.