]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/c-family/ChangeLog
Fortran: extend check for array arguments and reject CLASS array elements.
[thirdparty/gcc.git] / gcc / c-family / ChangeLog
CommitLineData
419c6c68
GA
12021-07-21 Thomas Schwinge <thomas@codesourcery.com>
2 Joseph Myers <joseph@codesourcery.com>
3 Cesar Philippidis <cesar@codesourcery.com>
4
5 * c-pragma.h (pragma_omp_clause): Add 'PRAGMA_OACC_CLAUSE_NOHOST'.
6
92d45509
GA
72021-07-20 Martin Sebor <msebor@redhat.com>
8
9 * c-common.c (c_build_shufflevector): Adjust by-value argument to
10 by-const-reference.
11 * c-common.h (c_build_shufflevector): Same.
12
87277b6a
GA
132021-07-16 Andrew Pinski <apinski@marvell.com>
14
15 PR c/101453
16 * c-common.c (parse_optimize_options): Use the correct
17 size for buffer.
18
d97d71a1
GA
192021-07-15 Martin Sebor <msebor@redhat.com>
20
21 PR c/101289
22 PR c/97548
23 * c-warn.c (warn_parm_array_mismatch): Use OEP_DECL_NAME.
24
c4fee1c6
GA
252021-07-14 Jason Merrill <jason@redhat.com>
26
27 * c-opts.c (c_common_post_options): Set -fdelete-dead-exceptions.
28
6fba0eea
GA
292021-07-06 Martin Sebor <msebor@redhat.com>
30
31 * c-format.c (gcc_tdiag_char_table): Remove support for %G and %K.
32 (gcc_cdiag_char_table): Same.
33 (gcc_cxxdiag_char_table): Same.
34
7a60a6e8
GA
352021-07-02 Jakub Jelinek <jakub@redhat.com>
36
37 * c-common.h (enum c_omp_directive_kind): New enum.
38 (struct c_omp_directive): New type.
39 (c_omp_categorize_directive): Declare.
40 * c-omp.c (omp_directives): New variable.
41 (c_omp_categorize_directive): New function.
42
bea7c16a
GA
432021-07-01 Eric Botcazou <ebotcazou@adacore.com>
44
45 * c-ada-spec.c (packed_layout): New global variable.
46 (dump_ada_declaration): Set it upon seeing a packed record type.
47 Do not put the "aliased" keyword if it is set.
48 (dump_ada_structure): Add Pack aspect if it is set and clear it.
49
502021-07-01 Eric Botcazou <ebotcazou@adacore.com>
51
52 * c-ada-spec.c (check_name): Rename into...
53 (check_type_name_conflict): ...this. Minor tweak.
54 (dump_ada_function_declaration): Adjust to above renaming.
55 (dump_ada_array_domains): Fix oversight.
56 (dump_ada_declaration): Call check_type_name_conflict for variables.
57
90708f87
GA
582021-06-25 Martin Sebor <msebor@redhat.com>
59
60 * c-common.c (c_wrap_maybe_const): Remove TREE_NO_WARNING.
61 (c_common_truthvalue_conversion): Replace direct uses of
62 TREE_NO_WARNING with warning_suppressed_p, suppress_warning, and
63 copy_no_warning.
64 (check_function_arguments_recurse): Same.
65 * c-gimplify.c (c_gimplify_expr): Same.
66 * c-warn.c (overflow_warning): Same.
67 (warn_logical_operator): Same.
68 (warn_if_unused_value): Same.
69 (do_warn_unused_parameter): Same.
70
9aa8327e
GA
712021-06-24 Jakub Jelinek <jakub@redhat.com>
72
73 * c-common.h (enum c_omp_region_type): Add C_ORT_TARGET and
74 C_ORT_OMP_TARGET.
75 * c-omp.c (c_omp_split_clauses): For OMP_CLAUSE_IN_REDUCTION on
76 combined target constructs also add map (always, tofrom:) clause.
77
ede6c356
GA
782021-06-15 Robin Dapp <rdapp@linux.ibm.com>
79
80 * c-attribs.c (common_handle_aligned_attribute): Remove short
81 circuit and dead code.
82
8dc48181
GA
832021-06-14 Jonathan Wakely <jwakely@redhat.com>
84
85 PR c++/101052
86 * known-headers.cc (get_stdlib_header_for_name): Add known
87 headers for EXIT_FAILURE, EXIT_SUCCESS, abort, atexit, calloc,
88 exit, and getenv.
89
8b8c3912
GA
902021-06-12 Jason Merrill <jason@redhat.com>
91
92 * c-attribs.c (handle_unused_attribute): Handle FIELD_DECL.
93
f16f65f8
GA
942021-06-11 Jakub Jelinek <jakub@redhat.com>
95
96 PR c++/100974
97 * c-cppbuiltin.c (c_cpp_builtins): Predefine __cpp_if_consteval for
98 -std=c++2b for P1938R3 consteval if support.
99
4f625f47
GA
1002021-06-09 Jason Merrill <jason@redhat.com>
101
102 PR c++/100879
103 * c-warn.c (warn_for_sign_compare): Remove C++ enum mismatch
104 warning.
105
438aac59
GA
1062021-06-07 Martin Liska <mliska@suse.cz>
107
108 * c-target.def: Split long lines and replace them
109 with '\n\'.
110
600f90cb
GA
1112021-06-04 Martin Sebor <msebor@redhat.com>
112
113 PR c/100783
114 * c-attribs.c (positional_argument): Bail on erroneous types.
115
1162021-06-04 Martin Sebor <msebor@redhat.com>
117
118 * c-warn.c (warn_parm_array_mismatch): Check TREE_PURPOSE to test
119 for element presence.
120
440c8a0a
GA
1212021-06-03 Eric Botcazou <ebotcazou@adacore.com>
122
123 * c-ada-spec.c (dump_ada_macros): Minor tweaks.
124 (dump_ada_decl_name): Likewise.
125 (dump_anonymous_type_name): Remove parent parameter and adjust.
126 (dump_sloc): Minor tweak.
127 (dump_ada_array_type): Remove type parameter and adjust.
128 (dump_ada_enum_type): Remove parent parameter and adjust.
129 (dump_ada_node): Adjust calls to above functions.
130 (dumped_anonymous_types): New global variable.
131 (dump_nested_types_1): Rename into...
132 (dump_nested_types): ...this.
133 (dump_nested_type): Remove parent and dumped_types parameters.
134 <ARRAY_TYPE>: Replace dumped_types with dumped_anonymous_types.
135 Adjust calls to dump_anonymous_type_name and dump_ada_array_type.
136 (dump_ada_specs): Initialize and free dumped_anonymous_types.
137
1382021-06-03 Eric Botcazou <ebotcazou@adacore.com>
139
140 * c-ada-spec.c (pp_ada_tree_identifier): Tidy up.
141 (dump_ada_node) <POINTER_TYPE>: Deal specially with external subtypes.
142
1432021-06-03 Eric Botcazou <ebotcazou@adacore.com>
144
145 * c-ada-spec.c (dump_ada_enum_type): Dump a prefix for constants.
146 (htable_t): New typedef.
147 (overloaded_names): Use it.
148 (add_name): New function.
149 (init_overloaded_names): Use add_name to populate the table and add
150 special cases for sigaction and stat.
151 (overloaded_name_p): Rename into...
152 (overloading_index): ...this. Do not initialize overloaded_names table
153 here. Return the index or zero.
154 (dump_ada_declaration): Minor tweaks. Do not skip overloaded functions
155 but add an overloading suffix instead.
156 (dump_ada_specs): Initialize overloaded_names tables here.
157
b75978d1
GA
1582021-06-01 Martin Liska <mliska@suse.cz>
159
160 PR other/100759
161 * c-attribs.c (handle_optimize_attribute): Limit sanity check
162 to a situation where we are not in processing of an optimize
163 pragma.
164 * c-pragma.c (handle_pragma_pop_options): Restore target
165 options.
166
ee682192
GA
1672021-05-31 Indu Bhagat <indu.bhagat@oracle.com>
168
169 PR testsuite/100749
170 * c-pch.c (c_common_valid_pch): Use xstrdup for debug format set names.
171
1722021-05-31 Richard Biener <rguenther@suse.de>
173
174 PR c++/88601
175 * c-common.c: Include tree-vector-builder.h and
176 vec-perm-indices.h.
177 (c_common_reswords): Add __builtin_shufflevector.
178 (c_build_shufflevector): New funtion.
179 * c-common.h (enum rid): Add RID_BUILTIN_SHUFFLEVECTOR.
180 (c_build_shufflevector): Declare.
181
48166757
GA
1822021-05-28 Jakub Jelinek <jakub@redhat.com>
183
184 PR middle-end/99928
185 * c-omp.c (c_omp_split_clauses): For reduction clause if combined with
186 target add a map tofrom clause with OMP_CLAUSE_MAP_IMPLICIT.
187
1882021-05-28 Tobias Burnus <tobias@codesourcery.com>
189
190 * c-pragma.h (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_AFFINITY.
191
2bc6dace
GA
1922021-05-25 Martin Liska <mliska@suse.cz>
193
194 PR tree-optimization/92860
195 PR target/99592
196 * c-attribs.c (handle_optimize_attribute): Save target node
197 before calling parse_optimize_options and save it in case
198 it changes.
199 * c-pragma.c (handle_pragma_target): Similarly for pragma.
200 (handle_pragma_pop_options): Likewise here.
201
2022021-05-25 Martin Liska <mliska@suse.cz>
203
204 * c-attribs.c (handle_no_sanitize_coverage_attribute): New.
205
2062021-05-25 Jakub Jelinek <jakub@redhat.com>
207
208 PR middle-end/99928
209 * c-omp.c (c_omp_split_clauses): Copy reduction to teams when teams is
210 combined with simd and not with taskloop or for.
211
2832d51b
GA
2122021-05-21 Jakub Jelinek <jakub@redhat.com>
213
214 PR middle-end/99928
215 * c-omp.c (c_omp_split_clauses): Set OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT
216 on firstprivate clause copy going to target construct, and for
217 target simd set also OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT_TARGET bit.
218
ea34e2ed
GA
2192021-05-20 Jonathan Wakely <jwakely@redhat.com>
220
221 * c.opt (Wc++11-extensions, Wc++14-extensions)
222 (Wc++17-extensions, Wc++20-extensions, Wc++23-extensions): New
223 options.
224
2252021-05-20 Indu Bhagat <indu.bhagat@oracle.com>
226
227 * c-lex.c (init_c_lex): Use dwarf_debuginfo_p.
228
2292021-05-20 Indu Bhagat <indu.bhagat@oracle.com>
230
231 * c-opts.c (c_common_post_options): Adjust access to debug_type_names.
232 * c-pch.c (struct c_pch_validity): Use type uint32_t.
233 (pch_init): Renamed member.
234 (c_common_valid_pch): Adjust access to debug_type_names.
235
65f32e5d
GA
2362021-05-19 Martin Sebor <msebor@redhat.com>
237
238 PR c/100619
239 * c-attribs.c (build_attr_access_from_parms): Handle arbitrarily many
240 bounds.
241
a8daf9a1
GA
2422021-05-18 Richard Biener <rguenther@suse.de>
243
244 PR c/100547
245 * c-attribs.c (type_valid_for_vector_size): Reject too large nunits.
246 Reword existing nunit diagnostic.
247
a7ffc1ef
GA
2482021-05-17 Joern Rennecke <joern.rennecke@embecosm.com>
249
250 * c-common.c (braced_list_to_string): Return CTOR unchanged
251 if host and target character sizes don't match.
252
87a7d10c
GA
2532021-05-14 Martin Liska <mliska@suse.cz>
254
255 * c.opt: Add Warning keyword for 2 options.
256
f9af11c7
GA
2572021-05-13 Martin Liska <mliska@suse.cz>
258
259 PR middle-end/100504
260 * c-attribs.c (handle_target_clones_attribute): Expect a string
261 argument to target_clone argument.
262
037e3661
GA
2632021-05-11 Joseph Myers <joseph@codesourcery.com>
264
265 * c-lex.c (interpret_float): Handle digit separators for C2X.
266
aa891c56
GA
2672021-05-10 Martin Liska <mliska@suse.cz>
268
269 * c-ada-spec.c (print_destructor): Use startswith
270 function instead of strncmp.
271 (dump_ada_declaration): Likewise.
272 * c-common.c (disable_builtin_function): Likewise.
273 (def_builtin_1): Likewise.
274 * c-format.c (check_tokens): Likewise.
275 (check_plain): Likewise.
276 (convert_format_name_to_system_name): Likewise.
277
e4ff4ffb
GA
2782021-04-28 Patrick McGehearty <patrick.mcgehearty@oracle.com>
279
280 * c-cppbuiltin.c (c_cpp_builtins): Add supporting macros for new
281 complex divide
282
c0fa3f2f
GA
2832021-04-26 Thomas Schwinge <thomas@codesourcery.com>
284 Nathan Sidwell <nathan@codesourcery.com>
285 Tom de Vries <vries@codesourcery.com>
286 Julian Brown <julian@codesourcery.com>
287 Kwok Cheung Yeung <kcy@codesourcery.com>
288
289 * c.opt (Wopenacc-parallelism): New.
290
6e81e015
GA
2912021-04-19 Thomas Schwinge <thomas@codesourcery.com>
292
293 * c.opt (fopenacc-kernels=): Remove.
294
019a9220
GA
2952021-04-08 Jakub Jelinek <jakub@redhat.com>
296
297 * c-warn.c (do_warn_double_promotion): Fix comment typo,
298 occured -> occurred.
299 (check_alignment_of_packed_member): Fix a comment typo,
300 memeber -> member.
301 (warn_parm_ptrarray_mismatch): Fix comment typos, os -> of
302 and onless -> unless.
303 (warn_parm_array_mismatch): Fix comment typos, declaratation
304 -> declaration and woud -> would. Fix up comment indentation.
305
3062021-04-08 Martin Sebor <msebor@redhat.com>
307
308 PR middle-end/99883
309 * c.opt (Wmismatched-new-delete): Correct spelling.
310
b1da9916
GA
3112021-04-05 Eric Botcazou <ebotcazou@adacore.com>
312
313 * c-ada-spec.c (is_simple_enum): Minor tweaks.
314 (dump_ada_enum_type): Add TYPE and PARENT parameters. For non-simple
315 enumeral types use again the type name for the enumeration constants.
316 (dump_ada_node): Adjust call to dump_ada_enum_type.
317 (dump_nested_type): Likewise.
318
f1607029
GA
3192021-04-01 Jason Merrill <jason@redhat.com>
320
321 PR c++/98481
322 * c-opts.c (c_common_post_options): Bump latest_abi_version.
323
4493b1c1
GA
3242021-03-25 Jakub Jelinek <jakub@redhat.com>
325
326 PR c++/99565
327 * c-warn.c (do_warn_duplicated_branches): Pass also
328 OEP_ADDRESS_OF_SAME_FIELD to operand_equal_p.
329
6af7b307
GA
3302021-03-20 Jakub Jelinek <jakub@redhat.com>
331
332 PR debug/99230
333 * c-gimplify.c (c_genericize_control_stmt): Handle STATEMENT_LIST.
334
ceae9533
GA
3352021-03-05 Eric Botcazou <ebotcazou@adacore.com>
336
337 * c-ada-spec.c (dump_ada_declaration) <TYPE_DECL>: Dump nested types
338 after entering the separate class package, if any.
339
67f10d28
GA
3402021-03-04 Richard Biener <rguenther@suse.de>
341
342 * c-pretty-print.c (c_pretty_printer::direct_abstract_declarator):
343 Handle ERROR_MARK.
344
3452021-03-04 Jakub Jelinek <jakub@redhat.com>
346
347 PR c/99325
348 * c-ppoutput.c (print): Change src_line type from int to unsigned.
349 (token_streamer::stream) Likewise.
350 (maybe_print_line_1): Likewise. Don't strcmp src_file if src_loc is
351 UNKNOWN_LOCATION.
352
f3641ac7
GA
3532021-03-03 Jakub Jelinek <jakub@redhat.com>
354
355 PR c/99324
356 * c-common.c (build_va_arg): Call c_common_mark_addressable_vec
357 instead of mark_addressable. Fix a comment typo -
358 neutrallly -> neutrally.
359
2c83c3fb
GA
3602021-02-28 Jakub Jelinek <jakub@redhat.com>
361
362 PR c/99304
363 * c-attribs.c (handle_malloc_attribute): Fix a typo in inform
364 message - refernced -> referenced. Remove superfluous space before
365 closing paren of function calls.
366
daa68844
GA
3672021-02-25 Nathan Sidwell <nathan@acm.org>
368
369 PR c++/99166
370 * c.opt (-flang-info-module-cmi): Renamed option.
371
50352c6c
GA
3722021-02-19 Nathan Sidwell <nathan@acm.org>
373
374 * c.opt (flang-info-module-read, flang-info-module-read=): New.
375
bf81237e
GA
3762021-02-18 H.J. Lu <hjl.tools@gmail.com>
377
378 PR target/99113
379 * c-attribs.c (c_common_attribute_table): Add the "retain"
380 attribute.
381 (handle_retain_attribute): New function.
382
0e804ce3
GA
3832021-02-16 Marek Polacek <polacek@redhat.com>
384
385 PR c++/99062
386 * c-attribs.c (handle_assume_aligned_attribute): Check that the
387 alignment argument is non-negative. Tweak a warning message.
388
fab095da
GA
3892021-02-12 Martin Sebor <msebor@redhat.com>
390
391 PR c/99055
392 * c-warn.c (warn_parm_array_mismatch): Free strings returned from
393 print_generic_expr_to_str.
394
4b37c3ea
GA
3952021-02-10 Richard Biener <rguenther@suse.de>
396
397 * c-common.c (parse_optimize_options): Free decoded_options.
398
a19dd5e6
GA
3992021-02-04 emsr <3dw4rd@verizon.net>
400
401 * c-cppbuiltin.c (c_cpp_builtins): __cpp_size_t_suffix=202011L.
402
9faaa807
GA
4032021-02-03 Ed Smith-Rowland <3dw4rd@verizon.net>
404
405 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_size_t_suffix.
406 * c-lex.c (interpret_integer): Set node type for size literal.
407
85d04a2e
GA
4082021-01-28 Jakub Jelinek <jakub@redhat.com>
409
410 * c.opt (-std=c++2a, -std=c++20, -std=gnu++2a, -std=gnu++20): Remove
411 draft from description.
412 (-std=c++2b): Fix a pasto, 2020 -> 2023.
413
e62bb7f0
GA
4142021-01-26 Paul Fee <paul.f.fee@gmail.com>
415
416 * c-common.h (cxx_dialect): Add cxx23 as a dialect.
417 * c.opt: Add options for -std=c++23, std=c++2b, -std=gnu++23
418 and -std=gnu++2b
419 * c-opts.c (set_std_cxx23): New.
420 (c_common_handle_option): Set options when -std=c++23 is enabled.
421 (c_common_post_options): Adjust comments.
422 (set_std_cxx20): Likewise.
423
161e4c08
GA
4242021-01-25 Martin Sebor <msebor@redhat.com>
425
426 PR c++/98646
427 * c-common.c (check_nonnull_arg): Adjust warning text.
428
4c9bcd5c
GA
4292021-01-17 Martin Sebor <msebor@redhat.com>
430
431 * c-pretty-print.c (c_pretty_printer::primary_expression): Don't
432 assume SSA_NAME_IDENTIFIER evaluates to nonzero.
433
59cf67d1
GA
4342021-01-16 Kwok Cheung Yeung <kcy@codesourcery.com>
435
436 * c-pragma.h (pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_DETACH.
437 Redefine PRAGMA_OACC_CLAUSE_DETACH.
438
2f7f0d32
GA
4392021-01-15 Jakub Jelinek <jakub@redhat.com>
440
441 PR tree-optimization/98597
442 * c-pretty-print.c: Include options.h.
443 (c_fold_indirect_ref_for_warn): New function.
444 (print_mem_ref): Use it. If it returns something that has compatible
445 type and is TBAA compatible with zero offset, print it and return,
446 otherwise print it using offsetof syntax or array ref syntax. Fix up
447 printing if MEM_REFs first operand is ADDR_EXPR, or when the first
448 argument has pointer to array type. Print pointers using the standard
449 formatting.
450
6851dda2
GA
4512021-01-12 Martin Sebor <msebor@redhat.com>
452
453 PR c/98597
454 PR c/98592
455 * c-pretty-print.c (print_mem_ref): Avoid assuming MEM_REF operand
456 has pointer type. Remove redundant code. Avoid calling
457 gimple_canonical_types_compatible_p.
458
7d187e4f
GA
4592021-01-07 Martin Sebor <msebor@redhat.com>
460
461 PR middle-end/98578
462 * c-pretty-print.c (print_mem_ref): Strip array from access type.
463 Avoid assuming acces type's size is constant. Correct condition
464 guarding the printing of a parenthesis.
465
942ae5be
GA
4662021-01-06 Martin Sebor <msebor@redhat.com>
467
468 PR c++/95768
469 * c-pretty-print.c (c_pretty_printer::primary_expression): For
470 SSA_NAMEs print VLA names and GIMPLE defining statements.
471 (print_mem_ref): New function.
472 (c_pretty_printer::unary_expression): Call it.
473
4742021-01-06 Richard Biener <rguenther@suse.de>
475
476 PR tree-optimization/95582
477 * c-attribs.c (c_common_attribute_table): Add entry for
478 signed_bool_precision.
479 (handle_signed_bool_precision_attribute): New.
480
8daa719b
GA
4812020-12-24 Iain Sandoe <iain@sandoe.co.uk>
482
483 * c.opt: Add -stdlib= option and enumerations for
484 libstdc++ and libc++.
485
eefe499f
GA
4862020-12-16 Martin Liska <mliska@suse.cz>
487
488 * c.opt: Remove usage of Report.
489
d52945ce
GA
4902020-12-14 Martin Sebor <msebor@redhat.com>
491
492 PR middle-end/98166
493 PR c++/57111
494 PR middle-end/98160
495 * c-attribs.c (maybe_add_noinline): New function.
496 (handle_malloc_attribute): Call it. Use ATTR_FLAG_INTERNAL.
497 Implicitly add attribute noinline to functions not declared inline
498 and warn on those.
499
ca2bd949
GA
5002020-12-09 Tobias Burnus <tobias@codesourcery.com>
501
502 * c-pragma.c (omp_pragmas): Add 'allocate'.
503 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_ALLOCATE.
504
f6e8e279
GA
5052020-12-08 Jakub Jelinek <jakub@redhat.com>
506
507 PR c++/98187
508 * c-pragma.c (omp_pragmas): Remove "master".
509 (omp_pragmas_simd): Add "master".
510
bc8a7013
GA
5112020-12-07 Marek Polacek <polacek@redhat.com>
512
513 PR c++/98126
514 * c-common.c (verify_tree_lim_r): New function.
515 (verify_sequence_points): Use it. Use nullptr instead of 0.
516
b8dd0ef7
GA
5172020-12-03 Martin Sebor <msebor@redhat.com>
518
519 PR c++/90629
520 PR middle-end/94527
521 * c-attribs.c (handle_dealloc_attribute): New function.
522 (handle_malloc_attribute): Handle argument forms of attribute.
523 * c.opt (-Wmismatched-dealloc): New option.
524 (-Wmismatched-new-delete): New option.
525
5262020-12-03 Jakub Jelinek <jakub@redhat.com>
527
528 PR libstdc++/93121
529 * c-common.h (enum rid): Add RID_BUILTIN_BIT_CAST.
530 * c-common.c (c_common_reswords): Add __builtin_bit_cast.
531
e0f5e792
GA
5322020-12-01 JeanHeyd Meneide <phdofthehouse@gmail.com>
533
534 * c-cppbuiltin.c (c_cpp_builtins): Add predefined
535 {__GNUC_EXECUTION_CHARSET_NAME} and
536 _WIDE_EXECUTION_CHARSET_NAME} macros.
537
5382020-12-01 Nathan Sidwell <nathan@acm.org>
539
540 * c-common.c (module, import, export): New internal tokens (with
541 trailing space).
542 * c-common.h (RID__MODULE, RID__IMPORT & RID__EXPORT): Enumerate
543 them.
544 (D_CXX_MODULES, D_CXX_MODULES_FLAGS): Enable them.
545 * c-cppbuiltin.c (c_cpp_builtins): Feature macro.
546
5472020-12-01 Nathan Sidwell <nathan@acm.org>
548
549 * c-opts.c (c_common_init_options): Ask for module dependencies.
550 (c_common_handle_option): Handle -Mmodules -Mno-modules.
551 * c-pch.c (c_common_valid_pch): ... does not play with C++
552 modules.
553 * c.opt (Mmodules, Mno-modules): New preprocessor dependency
554 options.
555 (fmodules-ts, fmodule-header, fmodule-implicit-inline)
556 (fmodule-only, fmodule-mapper, fmodule-lazy)
557 (fmodule-version-ignore, Winvalid-imported-macros)
558 (flang-info-include-translate, flang-info-include-translate-not):
559 New options
560
5fbf0ecb
GA
5612020-11-28 Eric Botcazou <ebotcazou@adacore.com>
562
563 * c-ada-spec.c (dump_nested_type) <RECORD_TYPE>: Remove obsolete code.
564 (dump_ada_structure): Also deal with convention, unchecked union and
565 bit-field for nested types. In the latter case, print an Alignment
566 aspect along with the Pack aspect.
567
360258da
GA
5682020-11-25 Martin Sebor <msebor@redhat.com>
569
570 PR bootstrap/94982
571 * c-attribs.c (handle_patchable_function_entry_attribute): Avoid
572 -Wformat-diag.
573
1e2c9a27
GA
5742020-11-24 Martin Sebor <msebor@redhat.com>
575
576 * c-warn.c (warn_parm_array_mismatch): Avoid invalid redeclarations.
577
8e6198d0
GA
5782020-11-23 Jozef Lawrynowicz <jozef.l@mittosystems.com>
579
580 * c-attribs.c (handle_special_var_sec_attribute): New.
581 (handle_noinit_attribute): Remove.
582 (attr_noinit_exclusions): Rename to...
583 (attr_section_exclusions): ...this, and add "persistent" attribute
584 exclusion.
585 (c_common_attribute_table): Add "persistent" attribute.
586
7a97e2fc
GA
5872020-11-21 Aaron Sawdey <acsawdey@linux.ibm.com>
588
589 * c-pretty-print.c (c_pretty_printer::simple_type_specifier):
590 Treat opaque types like other types.
591 (c_pretty_printer::direct_abstract_declarator): Opaque types are
592 supported types.
593
82e5048e
GA
5942020-11-20 Martin Sebor <msebor@redhat.com>
595
596 * c-warn.c (warn_parm_array_mismatch): Bail on invalid redeclarations
597 with fewer arguments.
598
5992020-11-20 Martin Sebor <msebor@redhat.com>
600
601 PR middle-end/97879
602 * c-attribs.c (handle_access_attribute): Handle ATTR_FLAG_INTERNAL.
603 Error out on invalid modes.
604
6052020-11-20 Jakub Jelinek <jakub@redhat.com>
606
607 PR libstdc++/88101
608 * c-common.c (check_builtin_function_arguments): Handle
609 BUILT_IN_CLEAR_PADDING.
610
25bb75f8
GA
6112020-11-18 Nathan Sidwell <nathan@acm.org>
612
613 * c-lex.c (c_lex_with_flags): CPP_HEADER_NAMEs can now be seen.
614
4dabb037
GA
6152020-11-17 Nathan Sidwell <nathan@acm.org>
616
617 * c-common.h (enum c_tree_index): Reorder to place lazy fields
618 after newly-added CTI_MODULE_HWM.
619
6202020-11-17 Joseph Myers <joseph@codesourcery.com>
621
622 * c-cppbuiltin.c (builtin_define_float_constants): Define
623 "*_IS_IEC_60559__" macros.
624
6252020-11-17 Nathan Sidwell <nathan@acm.org>
626
627 * c-lex.c: #include "langhooks.h".
628 (cb_undef): Maybe call preprocess_undef lang hook.
629 * c-opts.c (c_common_post_options): Maybe call preprocess_options
630 lang hook.
631 (push_command_line_include): Maybe call preprocess_main_file lang
632 hook.
633 (cb_file_change): Likewise.
634 * c-ppoutput.c: #include "langhooks.h.
635 (scan_translation_unit): Maybe call preprocess_token lang hook.
636 (class do_streamer): New, derive from token_streamer.
637 (directives_only_cb): Data pointer is do_streamer, call
638 preprocess_token lang hook.
639 (scan_translation_unit_directives_only): Use do_streamer.
640 (print_line_1): Move src_line recording to after string output.
641 (cb_undef): Maybe call preprocess_undef lang hook.
642
6432020-11-17 Nathan Sidwell <nathan@acm.org>
644
645 * c-ppoutput.c (scan_translation_unit): Use token_streamer, remove
646 code duplicating that functionality.
647
6482020-11-17 Jakub Jelinek <jakub@redhat.com>
649
650 PR c/90628
651 * c-common.c (check_builtin_function_arguments)
652 <case BUILT_IN_ADD_OVERFLOW>: Diagnose when last argument is pointer
653 to _Atomic. For the TYPE_READONLY case, adjust message to be usable
654 for more builtins and argument positions.
655
29c5d9ce
GA
6562020-11-16 Iain Sandoe <iain@sandoe.co.uk>
657
658 PR objc/97854
659 * stub-objc.c: Include c-common.h to declare enum rid.
660
77f67db2
GA
6612020-11-13 Jakub Jelinek <jakub@redhat.com>
662
663 PR c++/63287
664 * c-cppbuiltin.c: Include configargs.h.
665 (c_cpp_builtins): For C++11 and later if THREAD_MODEL_SPEC is not
666 defined, predefine __STDCPP_THREADS__ to 1 unless thread_model is
667 "single".
668
6692020-11-13 Gergö Barany <gergo@codesourcery.com>
670 Thomas Schwinge <thomas@codesourcery.com>
671
672 * c.opt (fopenacc-kernels): Add.
673
6742020-11-13 Jason Merrill <jason@redhat.com>
675
676 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_using_enum.
677
6782020-11-13 Piotr H. Dabrowski <phd@phd.re>
679
680 PR c++/91318
681 * c-cppbuiltin.c: c_cpp_builtins_optimize_pragma(): use cpp_define_unused()
682
6832020-11-13 Martin Liska <mliska@suse.cz>
684
685 * c-attribs.c (build_attr_access_from_parms): Format properly.
686
6872020-11-13 Iain Sandoe <iain@sandoe.co.uk>
688
689 PR objc/90707
690 * c-common.c (c_common_reswords): null_unspecified, nullable,
691 nonnull, null_resettable: New keywords.
692 * c-common.h (enum rid): RID_NULL_UNSPECIFIED, RID_NULLABLE,
693 RID_NONNULL, RID_NULL_RESETTABLE: New.
694 (OBJC_IS_PATTR_KEYWORD): Include nullability keywords in the
695 ranges accepted for property attributes.
696 * c-attribs.c (handle_objc_nullability_attribute): New.
697 * c-objc.h (enum objc_property_attribute_group): Add
698 OBJC_PROPATTR_GROUP_NULLABLE.
699 (enum objc_property_attribute_kind):Add
700 OBJC_PROPERTY_ATTR_NULL_UNSPECIFIED, OBJC_PROPERTY_ATTR_NULLABLE,
701 OBJC_PROPERTY_ATTR_NONNULL, OBJC_PROPERTY_ATTR_NULL_RESETTABLE.
702
7032020-11-13 Iain Sandoe <iain@sandoe.co.uk>
704
705 PR objc/77404
706 * c-attribs.c (handle_objc_root_class_attribute): New
707 * c-objc.h (objc_start_class_interface): Add a location
708 value for the position of the class name.
709 * c.opt: Add Wobjc-root-class.
710 * stub-objc.c (objc_start_class_interface): Add a location
711 value for the position of the class name.
712
a5a11525
GA
7132020-11-12 Joseph Myers <joseph@codesourcery.com>
714
715 * c-lex.c (c_common_has_attribute): Take argument std_syntax.
716 Allow scope for C. Handle standard attributes for C. Do not
717 accept unscoped attributes if std_syntax and not handled as
718 standard attributes.
719 * c-common.h (c_common_has_attribute): Update prototype.
720
7212020-11-12 Nicholas Guriev <guriev-ns@ya.ru>
722
723 PR pch/86674
724 * c-pch.c (c_common_valid_pch): Use cpp_warning with CPP_W_INVALID_PCH
725 reason to fix -Werror=invalid-pch and -Wno-error=invalid-pch switches.
726
0f5f9ed5
GA
7272020-11-11 Patrick Palka <ppalka@redhat.com>
728
729 PR c++/88115
730 * c-opts.c (c_common_post_options): Update latest_abi_version.
731
bb622641
GA
7322020-11-10 Jakub Jelinek <jakub@redhat.com>
733
734 PR c/97748
735 * c-common.h (warn_if_unused_value): Add quiet argument defaulted
736 to false.
737 * c-warn.c (warn_if_unused_value): Likewise. Pass it down
738 recursively and just return true instead of warning if it is true.
739 Handle COMPLEX_EXPR.
740
7412020-11-10 Chung-Lin Tang <cltang@codesourcery.com>
742
743 * c-common.h (c_omp_adjust_map_clauses): New declaration.
744 * c-omp.c (struct map_clause): Helper type for c_omp_adjust_map_clauses.
745 (c_omp_adjust_map_clauses): New function.
746
2bee28dd
GA
7472020-11-09 Marek Polacek <polacek@redhat.com>
748
749 DR 1914
750 * c-common.c (attribute_fallthrough_p): Tweak the warning
751 message.
752
7532020-11-09 Patrick Palka <ppalka@redhat.com>
754
755 * c-pragma.c (handle_pragma_diagnostic): Split the
756 unknown-option -Wpragmas diagnostic into a warning and a
757 subsequent note containing a spelling suggestion. Avoid
758 computing the suggestion if -Wpragmas warnings are being
759 suppressed.
760
7612020-11-09 Patrick Palka <ppalka@redhat.com>
762
763 PR testsuite/97117
764 * c-indentation.c (get_visual_column): Remove location_t
765 parameter. Move the column-tracking diagnostic code from here
766 to ...
767 (should_warn_for_misleading_indentation): ... here, before the
768 early exit for when the loci are not all distinct. Don't pass a
769 location_t argument to get_visual_column.
770 (assert_get_visual_column_succeeds): Don't pass a location_t
771 argument to get_visual_column.
772 (assert_get_visual_column_fails): Likewise.
773
fb95de7a
GA
7742020-11-08 Iain Sandoe <iain@sandoe.co.uk>
775
776 * c-common.h (OBJC_IS_PATTR_KEYWORD): Add class to the list
777 of keywords accepted in @property attribute contexts.
778 * c-objc.h (enum objc_property_attribute_group): Add
779 OBJC_PROPATTR_GROUP_CLASS.
780 (enum objc_property_attribute_kind): Add
781 OBJC_PROPERTY_ATTR_CLASS.
782
2da7ee05
GA
7832020-11-07 Iain Sandoe <iain@sandoe.co.uk>
784
785 * c-common.c (c_common_reswords): Add 'atomic' property
786 attribute.
787 * c-common.h (enum rid): Add RID_PROPATOMIC for atomic
788 property attributes.
789
7902020-11-07 Iain Sandoe <iain@sandoe.co.uk>
791
792 * c-attribs.c (handle_nsobject_attribute): New.
793 * c.opt: Add WNSObject-attribute.
794
44cab2d8
GA
7952020-11-06 Iain Sandoe <iain@sandoe.co.uk>
796
797 * c-objc.h (enum objc_property_attribute_group): New
798 (enum objc_property_attribute_kind): New.
799 (OBJC_PROPATTR_GROUP_MASK): New.
800 (struct property_attribute_info): Small class encapsulating
801 parser output from property attributes.
802 (objc_prop_attr_kind_for_rid): New
803 (objc_add_property_declaration): Simplify interface.
804 * stub-objc.c (enum rid): Dummy type.
805 (objc_add_property_declaration): Simplify interface.
806 (objc_prop_attr_kind_for_rid): New.
807
8082020-11-06 Nathan Sidwell <nathan@acm.org>
809
810 * c-ada-spec.c (collect_ada_nodes): Rename
811 DECL_IS_BUILTIN->DECL_IS_UNDECLARED_BUILTIN.
812 (collect_ada_node): Likewise.
813 (dump_forward_type): Likewise.
814 * c-common.c (set_underlying_type): Rename
815 DECL_IS_BUILTIN->DECL_IS_UNDECLARED_BUILTIN.
816 (user_facing_original_type, c_common_finalize_early_debug): Likewise.
817
8182020-11-06 Jakub Jelinek <jakub@redhat.com>
819
820 * c-common.c (verify_sequence_points): Remove DEBUG_FUNCTION.
821
0cfd9109
GA
8222020-11-05 Marek Polacek <polacek@redhat.com>
823
824 PR c++/97675
825 * c.opt (Wexceptions): New option.
826
8272020-11-05 Marek Polacek <polacek@redhat.com>
828
829 PR c++/25814
830 * c.opt (Wvexing-parse): New option.
831
35c125cb
GA
8322020-11-04 Jakub Jelinek <jakub@redhat.com>
833
834 PR c++/97670
835 * c-omp.c (c_omp_split_clauses): Look through array reductions to find
836 underlying decl to clear in the allocate_head bitmap.
837
8382020-11-04 Iain Sandoe <iain@sandoe.co.uk>
839
840 * c-objc.h (objc_non_constant_expr_p): New.
841 * stub-objc.c (objc_non_constant_expr_p): New.
842
fd2325ea
GA
8432020-11-03 Nathan Sidwell <nathan@acm.org>
844
845 * c.opt (MQ,MT): Reword description to be make-agnostic.
846
88ce3d5f
GA
8472020-11-02 Nathan Sidwell <nathan@acm.org>
848
849 * c-opts.c (c_common_post_options): Move var decl to its
850 initialization point.
851
8522020-11-01 Iain Sandoe <iain@sandoe.co.uk>
853
854 * c-lex.c (c_lex_with_flags): When combining '@' with a
855 keyword for Objective-C, combine the location ranges too.
856
8572020-10-30 Qing Zhao <qing.zhao@oracle.com>
858 H.J.Lu <hjl.tools@gmail.com>
859
860 * c-attribs.c (c_common_attribute_table): Add new attribute
861 zero_call_used_regs.
862 (handle_zero_call_used_regs_attribute): New function.
863
e93aae4a
GA
8642020-10-28 Marek Polacek <polacek@redhat.com>
865
866 PR c++/97573
867 * c-opts.c (c_common_post_options): In C++20, turn on
868 -Wdeprecated-enum-enum-conversion and
869 -Wdeprecated-enum-float-conversion.
870 * c.opt (Wdeprecated-enum-enum-conversion,
871 Wdeprecated-enum-float-conversion): New options.
872 (Wenum-conversion): Allow for C++ too.
873
8742020-10-28 Jakub Jelinek <jakub@redhat.com>
875
876 * c-pragma.h (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_ALLOCATE.
877 * c-omp.c: Include bitmap.h.
878 (c_omp_split_clauses): Handle OMP_CLAUSE_ALLOCATE.
879
f19e7c8d
GA
8802020-10-26 Ville Voutilainen <ville.voutilainen@gmail.com>
881
882 * c-common.c (__is_nothrow_assignable): New.
883 (__is_nothrow_constructible): Likewise.
884 * c-common.h (RID_IS_NOTHROW_ASSIGNABLE): New.
885 (RID_IS_NOTHROW_CONSTRUCTIBLE): Likewise.
886
efe71fcc
GA
8872020-10-23 Jan Hubicka <hubicka@ucw.cz>
888
889 * c-common.c (c_common_finalize_early_debug): Update for new thunk api.
890
8912020-10-23 Marek Polacek <polacek@redhat.com>
892
893 PR c++/91741
894 * c-common.c (verify_tree): Handle PAREN_SIZEOF_EXPR.
895 (c_common_init_ts): Likewise.
896 * c-common.def (PAREN_SIZEOF_EXPR): New tree code.
897 * c-common.h (maybe_warn_sizeof_array_div): Declare.
898 * c-warn.c (sizeof_pointer_memaccess_warning): Unwrap NOP_EXPRs.
899 (maybe_warn_sizeof_array_div): New function.
900 * c.opt (Wsizeof-array-div): New option.
901
9022020-10-23 Martin Sebor <msebor@redhat.com>
903
904 PR c/97463
905 * c-warn.c (warn_parm_ptrarray_mismatch): Move null test earlier.
906
56ddd5e2
GA
9072020-10-22 Martin Liska <mliska@suse.cz>
908
909 PR c/94722
910 * c-attribs.c (handle_no_stack_protect_function_attribute): New.
911 (handle_stack_protect_attribute): Add error message for a
912 no_stack_protector function.
913
9142020-10-22 Martin Liska <mliska@suse.cz>
915
916 * c-cppbuiltin.c (c_cpp_builtins): Use the stack_protector enum.
917
9182020-10-22 Jan Hubicka <hubicka@ucw.cz>
919
920 * c-gimplify.c: Include tree-nested.h
921 (c_genericize): Update for new nested function info.
922
b2698c21
GA
9232020-10-14 Martin Sebor <msebor@redhat.com>
924
925 PR c/97413
926 * c-attribs.c (build_attr_access_from_parms): Wrap chain of VLA
927 bounds in an extra list.
928
7e9282ae
GA
9292020-10-05 Richard Biener <rguenther@suse.de>
930 Jakub Jelinek <jakub@redhat.com>
931
932 PR c++/97197
933 * c-pretty-print.c: Include langhooks.h.
934 (c_pretty_printer::postfix_expression): Handle TARGET_MEM_REF as
935 expression.
936 (c_pretty_printer::expression): Handle TARGET_MEM_REF as
937 unary_expression.
938 (c_pretty_printer::unary_expression): Handle TARGET_MEM_REF.
939
660bfe61
GA
9402020-09-30 Martin Sebor <msebor@redhat.com>
941
942 PR middle-end/97189
943 * c-attribs.c (append_access_attr): Use the function declaration
944 location for a warning about an attribute access argument.
945
93bca37c
GA
9462020-09-29 Marek Polacek <polacek@redhat.com>
947
948 PR c++/94695
949 * c.opt (Wrange-loop-construct): New option.
950
82b77dee
GA
9512020-09-23 Martin Sebor <msebor@redhat.com>
952
953 PR c/97131
954 * c-warn.c (warn_parm_ptrarray_mismatch): Handle more invalid input.
955
9562020-09-23 Marek Polacek <polacek@redhat.com>
957
958 PR c/97125
959 * c-gimplify.c (c_genericize): Only call do_warn_duplicated_branches_r
960 after loops and other structured control constructs have been lowered.
961
521d2711
GA
9622020-09-22 Jakub Jelinek <jakub@redhat.com>
963
964 * c.opt (Wbuiltin-declaration-mismatch): Fix typo in variable name:
965 warn_builtin_declaraion_mismatch -> warn_builtin_declaration_mismatch.
966
44135373
GA
9672020-09-21 Marek Polacek <polacek@redhat.com>
968
969 * c.opt (Wctad-maybe-unsupported): New option.
970
2fe5b7d1
GA
9712020-09-19 Martin Sebor <msebor@redhat.com>
972
973 PR c/50584
974 * c-common.h (warn_parm_array_mismatch): Declare new function.
975 (has_attribute): Move declaration of an existing function.
976 (build_attr_access_from_parms): Declare new function.
977 * c-warn.c (parm_array_as_string): Define new function.
978 (plus_one): Define new function.
979 (warn_parm_ptrarray_mismatch): Define new function.
980 (warn_parm_array_mismatch): Define new function.
981 (vla_bound_parm_decl): New function.
982 * c.opt (-Warray-parameter, -Wvla-parameter): New options.
983 * c-pretty-print.c (pp_c_type_qualifier_list): Don't print array type
984 qualifiers here...
985 (c_pretty_printer::direct_abstract_declarator): ...but instead print
986 them in brackets here. Also print [static]. Strip extraneous
987 expressions from VLA bounds.
988
9892020-09-19 Martin Sebor <msebor@redhat.com>
990
991 PR c/50584
992 * c-attribs.c (c_common_attribute_table): Add "arg spec" attribute.
993 (handle_argspec_attribute): New function.
994 (get_argument, get_argument_type): New functions.
995 (append_access_attrs): Add overload. Handle internal attribute
996 representation in addition to external.
997 (handle_access_attribute): Handle internal attribute representation
998 in addition to external.
999 (build_attr_access_from_parms): New function.
1000
10012020-09-19 Sandra Loosemore <sandra@codesourcery.com>
1002
1003 * c-gimplify.c (genericize_c_loop): Rewrite to match
1004 c_finish_loop in c-typeck.c.
1005
10062020-09-19 Sandra Loosemore <sandra@codesourcery.com>
1007
1008 * c-common.c (c_block_may_fallthrough): New, split from
1009 cxx_block_may_fallthrough in the cp front end.
1010 (c_common_init_ts): Move handling of loop and switch-related
1011 statements here from the cp front end.
1012 * c-common.def (FOR_STMT, WHILE_STMT, DO_STMT): Move here from
1013 cp front end.
1014 (BREAK_STMT, CONTINUE_STMT, SWITCH_STMT): Likewise.
1015 * c-common.h (c_block_may_fallthru): Declare.
1016 (bc_state_t): Move here from cp front end.
1017 (save_bc_state, restore_bc_state): Declare.
1018 (c_genericize_control_stmt): Declare.
1019 (WHILE_COND, WHILE_BODY): Likewise.
1020 (DO_COND, DO_BODY): Likewise.
1021 (FOR_INIT_STMT, FOR_COND, FOR_EXPR, FOR_BODY, FOR_SCOPE): Likewise.
1022 (SWITCH_STMT_COND, SWITCH_STMT_BODY): Likewise.
1023 (SWITCH_STMT_TYPE, SWITCH_STMT_SCOPE): Likewise.
1024 (SWITCH_STMT_ALL_CASES_P, SWITCH_STMT_NO_BREAK_P): Likewise.
1025 (LABEL_DECL_BREAK, LABEL_DECL_CONTINUE): Likewise.
1026 * c-dump.c (dump_stmt): Copy from cp front end.
1027 (c_dump_tree): Move code to handle structured loop and switch
1028 tree nodes here from cp front end.
1029 * c-gimplify.c: Adjust includes.
1030 (enum bc_t, bc_label, begin_bc_block, finish_bc_block): Move from
1031 cp front end.
1032 (save_bc_state, restore_bc_state): New functions using old code
1033 from cp front end.
1034 (get_bc_label, expr_loc_or_loc): Move from cp front end.
1035 (genericize_c_loop): Move from cp front end.
1036 (genericize_for_stmt, genericize_while_stmt): Likewise.
1037 (genericize_do_stmt, genericize_switch_stmt): Likewise.
1038 (genericize_continue_stmt, genericize_break_stmt): Likewise.
1039 (genericize_omp_for_stmt): Likewise.
1040 (c_genericize_control_stmt): New function using code split from
1041 cp front end.
1042 (c_genericize_control_r): New.
1043 (c_genericize): Call walk_tree with c_genericize_control_r.
1044 * c-pretty-print.c (c_pretty_printer::statement): Move code to handle
1045 structured loop and switch tree nodes here from cp front end.
1046
2aad20c0
GA
10472020-09-17 Patrick Palka <ppalka@redhat.com>
1048
1049 PR c/80076
1050 * c-indentation.c (should_warn_for_misleading_indentation): Move
1051 declarations of local variables closer to their first use.
1052 Handle virtual token locations by resolving them to their
1053 respective macro expansion points. If all three tokens are
1054 produced from the same macro expansion, then instead use their
1055 loci within the macro definition.
1056
ecde1b0a
GA
10572020-09-16 Martin Sebor <msebor@redhat.com>
1058
1059 PR c/78666
1060 PR c/96126
1061 * c-attribs.c (validate_attr_args): New function.
1062 (validate_attr_arg): Same.
1063 (handle_section_attribute): Call it. Introduce a local variable.
1064 (handle_alloc_size_attribute): Same.
1065 (handle_alloc_align_attribute): Same.
1066
50a71cd0
GA
10672020-09-14 Jakub Jelinek <jakub@redhat.com>
1068
1069 * c-attribs.c (handle_optimize_attribute): Adjust
1070 cl_optimization_save, cl_optimization_restore and
1071 build_optimization_node callers.
1072 * c-pragma.c (handle_pragma_optimize): Adjust
1073 build_optimization_node caller.
1074 (handle_pragma_push_options): Adjust
1075 build_optimization_node and build_target_option_node callers.
1076 (handle_pragma_pop_options, handle_pragma_reset_options):
1077 Adjust cl_optimization_restore callers.
1078
8f7ea26a
GA
10792020-08-28 Martin Sebor <msebor@redhat.com>
1080
1081 * c.opt (Wstringop-overread): New option.
1082
a6493809
GA
10832020-08-11 Jakub Jelinek <jakub@redhat.com>
1084
1085 PR c/96545
1086 * c-common.c (get_atomic_generic_size): Require that first argument's
1087 type points to a complete type and use tree_fits_uhwi_p instead of
1088 just INTEGER_CST TREE_CODE check for the TYPE_SIZE_UNIT.
1089
48cc2e46
GA
10902020-07-31 Martin Sebor <msebor@redhat.com>
1091
1092 PR c++/96003
1093 * c-common.c (check_function_arguments_recurse): Return early when
1094 no-warning bit is set.
1095
10962020-07-31 Richard Biener <rguenther@suse.de>
1097
1098 PR debug/96383
1099 * c-common.h (c_common_finalize_early_debug): Declare.
1100 * c-common.c: Include debug.h.
1101 (c_common_finalize_early_debug): finalize_early_debug langhook
1102 implementation generating debug for extern declarations.
1103
e71dab87
GA
11042020-07-27 Nathan Sidwell <nathan@acm.org>
1105
1106 * c-common.c (try_to_locate_new_include_insertion_point): Use
1107 strcmp, not pointer equality.
1108
ae2e0bc1
GA
11092020-07-25 Martin Sebor <msebor@redhat.com>
1110
1111 PR c++/96310
1112 * c-common.c (check_nonnull_arg): Print note only when warning was
1113 issued.
1114
3ea9abca
GA
11152020-07-22 Tobias Burnus <tobias@codesourcery.com>
1116
1117 * c-omp.c (c_finish_omp_critical): Check for no name but
1118 nonzero hint provided.
1119
0933f508
GA
11202020-07-20 Jason Merrill <jason@redhat.com>
1121
1122 * c-cppbuiltin.c (c_cpp_builtins): Update
1123 __cpp_nontype_template_args for C++20.
1124
11252020-07-20 Martin Sebor <msebor@redhat.com>
1126
1127 PR c/96249
1128 * c.opt: Remove stray text.
1129
8ca07a30
GA
11302020-07-14 Lewis Hyatt <lhyatt@gmail.com>
1131
1132 PR other/86904
1133 * c-indentation.c (should_warn_for_misleading_indentation): Get
1134 global tabstop from the new source.
1135 * c-opts.c (c_common_handle_option): Remove handling of -ftabstop, which
1136 is now a common option.
1137 * c.opt: Likewise.
1138
a82c4c4c 11392020-07-08 Eric Botcazou <ebotcazou@adacore.com>
50873cc5
GA
1140
1141 * c.opt (Wscalar-storage-order): Add explicit variable.
1142
f60ee68d
GA
11432020-07-07 Nathan Sidwell <nathan@acm.org>
1144
1145 * c-opts.c (c_common_post_options): Add 'injecting' arg to
1146 cpp_read_main_file.
1147 (c_finish_options): Add linemap_line_start calls for builtin and cmd
1148 maps. Force token position to line_table's highest line.
1149 * c-ppoutput.c (print_line_1): Refactor, print line zero.
1150 (cb_define): Always increment source line.
1151
4077d74c
GA
11522020-07-06 Martin Sebor <msebor@redhat.com>
1153
1154 PR c++/95984
1155 * c-common.c (check_function_nonnull): Avoid checking syntesized calls
1156 to stub lambda objects with null this pointer.
1157 (check_nonnull_arg): Handle C++ nullptr.
1158
b5f24739
GA
11592020-07-02 Jason Merrill <jason@redhat.com>
1160 Jakub Jelinek <jakub@redhat.com>
1161
1162 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_consteval.
1163
46fbb6c6
GA
11642020-06-30 Jakub Jelinek <jakub@redhat.com>
1165
1166 PR c++/95963
1167 * c-common.c (check_function_arguments_recurse): Don't crash on
1168 calls to internal functions.
1169
69273534
GA
11702020-06-28 Martin Sebor <msebor@redhat.com>
1171
1172 PR c++/86568
1173 * c-common.c (struct nonnull_arg_ctx): Add members.
1174 (check_function_nonnull): Use nonnull_arg_ctx as argument. Handle
1175 C++ member functions specially. Consider the this pointer implicitly
1176 nonnull.
1177 (check_nonnull_arg): Use location of argument when available.
1178 (check_function_arguments): Use nonnull_arg_ctx as argument.
1179
9a33c41f
GA
11802020-06-27 Jakub Jelinek <jakub@redhat.com>
1181
1182 PR middle-end/95903
1183 * c-common.c (pointer_int_sum): Use TYPE_OVERFLOW_UNDEFINED instead of
1184 !TYPE_UNSIGNED check to see if we can apply distributive law and handle
1185 smaller precision intop operands separately.
1186
c9c05f73
GA
11872020-06-26 Marek Polacek <polacek@redhat.com>
1188
1189 * c-opts.c (c_common_init_options): Default to gnu++17.
1190
aff95ee7
GA
11912020-06-17 Jonathan Wakely <jwakely@redhat.com>
1192
bd0a89dc 1193 PR c/95378
aff95ee7
GA
1194 * c-common.c (get_atomic_generic_size): Check cv-qualifiers in
1195 pointer arguments.
1196
56638b9b
GA
11972020-06-16 Jakub Jelinek <jakub@redhat.com>
1198
1199 * c-common.h (c_omp_check_loop_iv_exprs): Add an int argument.
1200 * c-omp.c (struct c_omp_check_loop_iv_data): Add maybe_nonrect and
1201 idx members.
1202 (c_omp_is_loop_iterator): New function.
1203 (c_omp_check_loop_iv_r): Use it. Add support for silent scanning
1204 if outer loop iterator is present. Perform duplicate checking through
1205 hash_set in the function rather than expecting caller to do that.
1206 Pass NULL instead of d->ppset to walk_tree_1.
1207 (c_omp_check_nonrect_loop_iv): New function.
1208 (c_omp_check_loop_iv): Use it. Fill in new members, allow
1209 non-rectangular loop forms, diagnose multiple associated loops with
1210 the same iterator. Pass NULL instead of &pset to walk_tree_1.
1211 (c_omp_check_loop_iv_exprs): Likewise.
1212
ec6ffbb9
GA
12132020-06-10 Martin Liska <mliska@suse.cz>
1214
1215 PR tree-optimization/92860
1216 * c-attribs.c (handle_optimize_attribute):
1217 Save global options and compare it after parsing of function
1218 attribute.
1219 * c-pragma.c (opt_stack::saved_global_options): New field.
1220 (handle_pragma_push_options): Save global_options.
1221 (handle_pragma_pop_options): Compare them after pop.
1222
b952c2cf
GA
12232020-06-09 Jakub Jelinek <jakub@redhat.com>
1224
1225 PR c/95580
1226 * c-pretty-print.c (c_pretty_printer::unary_expression): Handle the
1227 case when MEM_REF's first argument has type pointer to incomplete type.
1228
1a59f3db
GA
12292020-06-05 Jason Merrill <jason@redhat.com>
1230
1231 * c-pretty-print.c (pp_c_additive_expression): Handle negative
1232 operand to POINTER_PLUS_EXPR.
1233
3add3425
GA
12342020-06-04 Martin Sebor <msebor@redhat.com>
1235
1236 PR middle-end/10138
1237 PR middle-end/95136
1238 * c-attribs.c (append_access_attrs): Handle attr_access::none.
1239 (handle_access_attribute): Same.
1240
9a5b7438
GA
12412020-06-03 Mark Wielaard <mark@klomp.org>
1242
1243 * known-headers.cc (get_cp_stdlib_header_for_string_macro_name):
1244 New function.
1245 * known-headers.h (get_cp_stdlib_header_for_string_macro_name):
1246 New function declaration.
1247
12482020-06-03 Mark Wielaard <mark@klomp.org>
1249
1250 * known-headers.cc (get_string_macro_hint): New function.
1251 (get_stdlib_header_for_name): Use get_string_macro_hint.
1252 (get_c_stdlib_header_for_string_macro_name): New function.
1253 * known-headers.h (get_c_stdlib_header_for_string_macro_name):
1254 New function declaration.
1255
12562020-06-03 Tobias Burnus <tobias@codesourcery.com>
1257
1258 * c-common.h (c_omp_predetermined_mapping): Declare.
1259 * c-omp.c (c_omp_predetermined_mapping): New.
1260
af114c38
MW
12612020-05-22 Mark Wielaard <mark@klomp.org>
1262
1263 * known-headers.cc (get_stdlib_header_for_name): Add a new
1264 stdlib_hint array for stdbool and stdint.
1265
45c50b6a
MW
12662020-05-22 Mark Wielaard <mark@klomp.org>
1267
1268 * known-headers.cc (get_stdlib_header_for_name): Return
1269 "<stdbool.h>" for "bool", "true" or "false" when STDLIB_C and
1270 flag_isoc99.
1271
c22027a0
NS
12722020-05-20 Nathan Sidwell <nathan@acm.org>
1273
38a4db21
NS
1274 * c-common.c (try_to_locate_new_include_insertion_point): Revert change.
1275
c22027a0
NS
1276 * c-common.c (try_to_locate_new_include_insertion_point): Use
1277 strcmp to compare filenames.
1278 * c-lex.c (init_c_lex): Move declaration to initialization.
1279 * c-opts.c (handle_deferred_opts): Move cpp_get_deps call into
1280 deferred count loop.
1281
29f0e90d
JM
12822020-05-15 Jason Merrill <jason@redhat.com>
1283
1284 * c-opts.c (set_std_cxx20): Set flag_coroutines.
1285
b04445d4
JM
12862020-05-13 Jason Merrill <jason@redhat.com>
1287
1288 * c.opt (std=c++20): Make c++2a the alias.
1289 (std=gnu++20): Likewise.
1290 * c-common.h (cxx_dialect): Change cxx2a to cxx20.
1291 * c-opts.c: Adjust.
1292 * c-cppbuiltin.c: Adjust.
1293 * c-ubsan.c: Adjust.
1294 * c-warn.c: Adjust.
1295
11dd3be5
EB
12962020-05-12 Eric Botcazou <ebotcazou@adacore.com>
1297
1298 * c-ada-spec.c (dump_ads): Output pragma Warnings ("U"); on entry.
1299
b224c376
NS
13002020-05-08 Nathan Sidwell <nathan@acm.org>
1301
1302 Reimplement directives only processing.
1303 * c-ppoutput.c (token_streamer): Ne.
1304 (directives_only_cb): New. Swallow ...
1305 (print_lines_directives_only): ... this.
1306 (scan_translation_unit_directives_only): Reimplment using the
1307 published interface.
1308
f1d94677
MP
13092020-05-07 Marek Polacek <polacek@redhat.com>
1310
1311 * c-format.c (badwords): Add "nonstatic".
1312
9b95bb52
JJ
1313202-05-07 Jakub Jelinek <jakub@redhat.com>
1314
1315 PR c/94968
1316 * c-common.c (speculation_safe_value_resolve_params): Return false if
1317 error_operand_p (val2).
1318 (resolve_overloaded_builtin) <case BUILT_IN_SPECULATION_SAFE_VALUE_N>:
1319 Remove extraneous semicolon.
1320
530b4409 13212020-05-06 qing zhao <qing.zhao@oracle.com>
1322
1323 PR c/94230
1324 * c-indentation.c (get_visual_column): Add a hint to use the new
1325 -flarge-source-files option.
1326
b776bdca
SSF
13272020-05-05 Stefan Schulze Frielinghaus <stefansf@linux.ibm.com>
1328
1329 * c-attribs.c (handle_vector_size_attribute): Add attribute
1330 nonnull for argument args in order to silence warning of
1331 uninitialized variable usage. Since this is local to the
1332 compilation unit and thus cannot be checked at call sides by the
1333 compiler, added an assert statement in order to verify this.
1334
6607bdd9
L
13352020-05-01 H.J. Lu <hongjiu.lu@intel.com>
1336
1337 PR target/93492
1338 * c-attribs.c (handle_patchable_function_entry_attribute): Limit
1339 value to USHRT_MAX (65535).
1340
691eeb65
JJ
13412020-04-29 Jakub Jelinek <jakub@redhat.com>
1342
1343 * c-format.c (PP_FORMAT_CHAR_TABLE): Add %{ and %}.
1344
26d76be7
JJ
13452020-04-27 Jakub Jelinek <jakub@redhat.com>
1346
1347 PR c/94755
1348 * c-common.c (resolve_overloaded_builtin): Return error_mark_node for
1349 fncode == BUILT_IN_NONE before initialization of first_param.
1350
7291b2ed
MP
13512020-04-23 Marek Polacek <polacek@redhat.com>
1352
1353 PR c++/94733
1354 * c-attribs.c (find_tm_attribute): Use get_attribute_name instead of
1355 TREE_PURPOSE.
1356
58a29af8
PP
13572020-04-14 Patrick Palka <ppalka@redhat.com>
1358
1359 PR c++/85278
1360 * c-pretty-print.c (pp_c_pointer) <case REFERENCE_TYPE>: Print a double
1361 ampersand if it's an rvalue reference type.
1362
09f04139
MS
13632020-04-13 Martin Sebor <msebor@redhat.com>
1364
1365 PR c/92326
1366 * c-pretty-print.c (c_pretty_printer::direct_abstract_declarator): Avoid
1367 printing array bound for flexible array members.
1368
ee26baf4
IS
13692020-04-13 Iain Sandoe <iain@sandoe.co.uk>
1370
1371 * c-cppbuiltin.c (c_cpp_builtins): Update coroutines builtin
1372 define, per n4861.
1373
75efe9cb
RB
13742020-04-02 Richard Biener <rguenther@suse.de>
1375
1376 PR c/94392
1377 * c-opts.c (c_common_post_options): Enable -ffinite-loops
1378 for -O2 and C++11 or newer.
1379
75defde9
PP
13802020-03-28 Patrick Palka <ppalka@redhat.com>
1381
1382 * c.opt: Add -fconcepts-diagnostics-depth.
1383
52f24a9e
MS
13842020-03-27 Martin Sebor <msebor@redhat.com>
1385
1386 PR c++/94346
1387 * c-attribs.c (handle_copy_attribute): Avoid passing expressions
1388 to decl_attributes. Make handling of different kinds of entities
1389 more robust.
1390
ccacf77b
MS
13912020-03-27 Martin Sebor <msebor@redhat.com>
1392
1393 PR c++/94098
1394 * c-attribs.c (handle_access_attribute): Avoid setting TYPE_ATTRIBUTES
1395 here.
1396
ca6c7225
JJ
13972020-03-23 Jakub Jelinek <jakub@redhat.com>
1398
1399 PR c++/91993
1400 * c-warn.c (warnings_for_convert_and_check): For expr and/or
1401 result being COMPOUND_EXPRs, skip to ultimate rhs.
1402
1aa22b19
RS
14032020-03-20 Richard Sandiford <richard.sandiford@arm.com>
1404
1405 PR middle-end/94072
1406 * c-common.c (c_common_type_for_mode): Before using a registered
1407 built-in type, check that the vectorness of the type matches
1408 the vectorness of the mode.
1409
700d4cb0
JJ
14102020-03-17 Jakub Jelinek <jakub@redhat.com>
1411
1412 * c-common.c (resolve_overloaded_builtin): Fix up duplicated word
1413 issue in a diagnostic message.
1414
b408e010
LH
14152020-03-15 Lewis Hyatt <lhyatt@gmail.com>
1416
1417 * c.opt: Avoid redundancy in the help text.
1418
e78e50d5
MP
14192020-03-02 Marek Polacek <polacek@redhat.com>
1420
1421 PR c++/93958 - add missing -std=gnu++20.
1422 * c.opt: Add -std=gnu++20.
1423
649e1741
MS
14242020-03-01 Martin Sebor <msebor@redhat.com>
1425
1426 PR c++/92721
1427 * c-attribs.c (append_access_attrs): Correctly handle attribute.
1428 (handle_access_attribute): Same.
1429
7b60f3ba
JJ
14302020-02-25 Jakub Jelinek <jakub@redhat.com>
1431
1432 PR c/93858
1433 * c-pragma.c (handle_pragma_diagnostic): Add missing ? after
1434 "did you mean" hint in diagnostics.
1435
fb260504
JM
14362020-02-15 Jason Merrill <jason@redhat.com>
1437
1438 * c.opt: Add -std=c++20.
1439
1d757b09
EB
14402020-02-14 Eric Botcazou <ebotcazou@adacore.com>
1441
1442 * c-ada-spec.c: Include bitmap.h.
1443 (dump_ada_double_name): Rename into...
1444 (dump_anonymous_type_name): ...this. Always use the TYPE_UID.
1445 (dump_ada_array_type): Adjust to above renaming. Robustify.
1446 (dump_nested_types_1): New function copied from... Add dumped_types
1447 parameter and pass it down to dump_nested_type.
1448 (dump_nested_types): ...this. Remove parent parameter. Just call
1449 dump_nested_types_1 on an automatic bitmap.
1450 (dump_nested_type): Add dumped_types parameter.
1451 <ARRAY_TYPE>: Do not dump it if already present in dumped_types.
1452 Adjust recursive calls and adjust to above renaming.
1453 (dump_ada_declaration): Adjust call to dump_nested_types.
1454 Tidy up and adjust to above renaming.
1455 (dump_ada_specs): Initialize and release bitmap obstack.
1456
0cc575e4
MS
14572020-02-10 Martin Sebor <msebor@redhat.com>
1458
1459 PR c/93640
1460 * c-attribs.c (handle_access_attribute): Correct off-by-one mistakes.
1461
a59aa302
JJ
14622020-02-10 Jakub Jelinek <jakub@redhat.com>
1463
1464 PR other/93641
1465 * c-format.c (check_plain): Fix up last argument of strncasecmp.
1466 Remove useless extra test.
1467
e464fc90
TB
14682020-02-03 Julian Brown <julian@codesourcery.com>
1469 Tobias Burnus <tobias@codesourcery.com>
1470
1471 * c-cppbuiltin.c (c_cpp_builtins): Update _OPENACC define to 201711.
1472
e3b6c052
JM
14732020-01-29 Jason Merrill <jason@redhat.com>
1474
1475 PR c++/89357
1476 * c-attribs.c (check_cxx_fundamental_alignment_constraints): Remove.
1477
6d00f052
JM
14782020-01-23 Jason Merrill <jason@redhat.com>
1479
1480 * c-warn.c (conversion_warning): Change -Wsign-conversion handling.
1481
8a990ffa
MS
14822020-01-23 Martin Sebor <msebor@redhat.com>
1483
1484 PR c/84919
1485 * c-common.c (check_function_arguments): Avoid overlap checking
1486 of sprintf functions.
1487
55b7df8b
JM
14882020-01-22 Jason Merrill <jason@redhat.com>
1489
1490 PR testsuite/93391 - PR 40752 test fails with unsigned plain char.
1491 PR c++/40752
1492 * c-warn.c (conversion_warning): Check operands only after checking
1493 the whole expression. Don't check second operand of + for sign.
1494
c77074d0
JM
14952020-01-21 Jason Merrill <jason@redhat.com>
1496 Manuel López-Ibáñez <manu@gcc.gnu.org>
1497
1498 PR c++/40752 - useless -Wconversion with short +=.
1499 * c.opt (-Warith-conversion): New.
1500 * c-warn.c (conversion_warning): Recurse for operands of
1501 operators. Only warn about the whole expression with
1502 -Warith-conversion.
1503
731dbfc3
JM
15042020-01-21 Jason Merrill <jason@redhat.com>
1505
1506 * c-common.c (unsafe_conversion_p): Don't warn, return UNSAFE_SIGN.
1507 * c-warn.c (conversion_warning): Warn about UNSAFE_SIGN.
1508
ad1a3914
NS
15092020-01-20 Nathan Sidwell <nathan@acm.org>
1510
1511 PR preprocessor/80005
1512 * c-cppbuiltins.c (c_cpp_builtins): Don't define __has_include{,_next}.
1513
49789fd0
IS
15142020-01-18 Iain Sandoe <iain@sandoe.co.uk>
1515
1516 * c-common.c (co_await, co_yield, co_return): New.
1517 * c-common.h (RID_CO_AWAIT, RID_CO_YIELD,
1518 RID_CO_RETURN): New enumeration values.
1519 (D_CXX_COROUTINES): Bit to identify coroutines are active.
1520 (D_CXX_COROUTINES_FLAGS): Guard for coroutine keywords.
1521 * c-cppbuiltin.c (__cpp_coroutines): New cpp define.
1522 * c.opt (fcoroutines): New command-line switch.
1523
4bc1899b
DM
15242020-01-10 David Malcolm <dmalcolm@redhat.com>
1525
1526 * c-format.c (local_event_ptr_node): New.
1527 (PP_FORMAT_CHAR_TABLE): Add entry for "%@".
1528 (init_dynamic_diag_info): Initialize local_event_ptr_node.
1529 * c-format.h (T_EVENT_PTR): New define.
1530
f25e33fa
MS
15312020-01-10 Martin Sebor <msebor@redhat.com>
1532
1533 PR c/93132
1534 * c-attribs.c (append_access_attrs): Validate against the translated
1535 access string rather than the human-readable representation.
1536
8d9254fc
JJ
15372020-01-01 Jakub Jelinek <jakub@redhat.com>
1538
1539 Update copyright years.
1540
39292e25
EB
15412019-12-20 Eric Botcazou <ebotcazou@adacore.com>
1542
1543 * c-ada-spec.h (decl_sloc): Delete.
1544 * c-ada-spec.c (decl_sloc): Make static.
1545
519d7496
JB
15462019-12-19 Julian Brown <julian@codesourcery.com>
1547
1548 * c-common.h (c_omp_map_clause_name): Add prototype.
1549 * c-omp.c (c_omp_map_clause_name): New function.
1550 * c-pragma.h (pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_ATTACH and
1551 PRAGMA_OACC_CLAUSE_DETACH.
1552
a6163563
JB
15532019-12-19 Julian Brown <julian@codesourcery.com>
1554 Maciej W. Rozycki <macro@codesourcery.com>
1555 Tobias Burnus <tobias@codesourcery.com>
1556 Thomas Schwinge <thomas@codesourcery.com>
1557
1558 * c-pragma.h (pragma_omp_clause): Add
1559 PRAGMA_OACC_CLAUSE_NO_CREATE.
1560
e8f1ade2
MS
15612019-12-17 Martin Sebor <msebor@redhat.com>
1562
1563 PR c++/61339
1564 * c.opt (-Wmismatched-tags, -Wredundant-tags): New options.
1565
368877a1
DM
15662019-12-11 David Malcolm <dmalcolm@redhat.com>
1567
1568 * c-pretty-print.c (c_pretty_printer::clone): New vfunc
1569 implementation.
1570 * c-pretty-print.h (c_pretty_printer::clone): New vfunc decl.
1571
d68f5d45
DM
15722019-12-09 David Malcolm <dmalcolm@redhat.com>
1573
1574 * c-format.c (range_label_for_format_type_mismatch::get_text):
1575 Replace label_text ctor called with true with label_text::take.
1576
d3e28653
DM
15772019-12-09 David Malcolm <dmalcolm@redhat.com>
1578
1579 * c-format.c (selftest::test_type_mismatch_range_labels): Remove
1580 initial newline from expected outputs.
1581 * c-opts.c (c_diagnostic_finalizer): Add pp_newline call before
1582 call to diagnostic_show_locus.
1583
abd6d8cc
JJ
15842019-12-06 Jakub Jelinek <jakub@redhat.com>
1585
1586 * c-cppbuiltin.c (c_cpp_builtins): Don't define __cpp_consteval for
1587 now.
1588
7906797e
MP
15892019-12-05 Marek Polacek <polacek@redhat.com>
1590 Jakub Jelinek <jakub@redhat.com>
1591
1592 PR c++/91353 - P1331R2: Allow trivial default init in constexpr contexts.
1593 * c-cppbuiltin.c (c_cpp_builtins): Adjust the value of __cpp_constexpr.
1594
5c04da88
MP
15952019-12-05 Marek Polacek <polacek@redhat.com>
1596
1597 PR c++/92271 - make __is_same alias for __is_same_as.
1598 * c-common.c: Add __is_same, an alias for __is_same_as.
1599
43aae289
MP
16002019-12-03 Marek Polacek <polacek@redhat.com>
1601
1602 PR c++/91363 - P0960R3: Parenthesized initialization of aggregates.
1603 * c-cppbuiltin.c (c_cpp_builtins): Predefine
1604 __cpp_aggregate_paren_init=201902 for -std=c++2a.
1605
d7ddfbcb
JH
16062019-11-30 Jan Hubicka <hubicka@ucw.cz>
1607
1608 * c-attribs.c (handle_symver_attribute): New function
1609 (c_common_attributes): Add symver.
1610
65ef05d0
RS
16112019-11-30 Richard Sandiford <richard.sandiford@arm.com>
1612
1613 * c-common.c (pointer_int_sum): Use verify_type_context to check
1614 whether the target allows pointer arithmetic for the types involved.
1615 (c_sizeof_or_alignof_type, c_alignof_expr): Use verify_type_context
1616 to check whether the target allows sizeof and alignof operations
1617 for the types involved.
1618
1a291106
JM
16192019-11-27 Jason Merrill <jason@redhat.com>
1620
1621 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_deduction_guides.
1622
05d6cb1a
JJ
16232019-11-26 Jakub Jelinek <jakub@redhat.com>
1624
1625 PR c++/61414
1626 * c-attribs.c (handle_mode_attribute): Add mode attribute to
1627 ENUMERAL_TYPEs.
1628
5b8d9367
JM
16292019-11-25 Joseph Myers <joseph@codesourcery.com>
1630
1631 PR c/91985
1632 * c-common.c (c_common_type_for_mode): Handle decimal
1633 floating-point types being NULL_TREE.
1634 * c-format.c (get_format_for_type_1): Handle specified types being
1635 NULL_TREE.
1636 * c-lex.c (interpret_float): Give an error for decimal
1637 floating-point constants when decimal floating-point not
1638 supported.
1639
1fbf51cb
JJ
16402019-11-23 Jakub Jelinek <jakub@redhat.com>
1641
1642 PR middle-end/83859
1643 * c-attribs.c (append_access_attrs): Avoid buffer overflow. Avoid
1644 memory leak. Use XNEWVEC macro. Use auto_diagnostic_group to
1645 group warning with inform together.
1646 (handle_access_attribute): Formatting fix.
1647
761df906
JJ
16482019-11-22 Jakub Jelinek <jakub@redhat.com>
1649
bdaf8be1
JJ
1650 PR c/90677
1651 * c-common.h (identifier_global_tag): Declare.
1652 * c-format.c (get_pointer_to_named_type): Renamed to ...
1653 (get_named_type): ... this. Use identifier_global_tag instead of
1654 identifier_global_value, handle the return value being a TYPE_P.
1655 (init_dynamic_diag_info): Adjust get_pointer_to_named_type callers
1656 to call get_named_type instead. Formatting fixes.
1657
c2ecce6d 1658 Implement P1902R1, Missing feature-test macros 2017-2019.
761df906
JJ
1659 * c-cppbuiltin.c (c_cpp_builtins): Bump __cpp_init_captures
1660 and __cpp_generic_lambdas for -std=c++2a. Define
1661 __cpp_designated_initializers, __cpp_constexpr_in_decltype and
1662 __cpp_consteval for -std=c++2a. Remove a FIXME comment about
1663 __cpp_concepts for -std=c++2a.
1664
54aa6b58
MS
16652019-11-22 Martin Sebor <msebor@redhat.com>
1666
1667 PR middle-end/83859
1668 * c-attribs.c (handle_access_attribute): New function.
1669 (c_common_attribute_table): Add new attribute.
1670 (get_argument_type): New function.
1671 (append_access_attrs): New function.
1672 (get_nonnull_operand): Rename...
1673 (get_attribute_operand): ...to this.
1674 * c-common.c (get_nonnull_operand): Rename...
1675 (get_attribute_operand): ...to this.
1676
6c80b1b5
JM
16772019-11-21 Joseph Myers <joseph@codesourcery.com>
1678
1679 * c-attribs.c (handle_fallthrough_attribute): Use pedwarn instead
1680 of warning.
1681
192961ff
JM
16822019-11-19 Joseph Myers <joseph@codesourcery.com>
1683
1684 * c-common.c (attribute_fallthrough_p): In C, use pedwarn not
1685 warning for standard attributes mixed with fallthrough attributes.
1686
f8aea5e3
JM
16872019-11-15 Joseph Myers <joseph@codesourcery.com>
1688
1689 * c-attribs.c (handle_fallthrough_attribute): Remove static.
1690 * c-common.h (handle_fallthrough_attribute): Declare.
1691
2cc94aa8
JM
16922019-11-15 Joseph Myers <joseph@codesourcery.com>
1693
1694 * c-attribs.c (handle_deprecated_attribute): Remove static.
1695 * c-common.h (handle_deprecated_attribute): Declare.
1696
7c5890cc
JM
16972019-11-14 Joseph Myers <joseph@codesourcery.com>
1698
1699 * c-lex.c (lex_charconst): Make CPP_UTF8CHAR constants unsigned
1700 char for C.
1701
b2417b59
JJ
17022019-11-14 Jakub Jelinek <jakub@redhat.com>
1703
d0ec7c93
JJ
1704 * c-omp.c (c_omp_check_context_selector): Add nvidia to the list of
1705 valid vendors.
1706
b2417b59
JJ
1707 * c-omp.c (c_omp_check_context_selector): Handle name lists
1708 containing string literals. Don't diagnose atomic_default_mem_order
1709 with multiple props.
1710
00be2a5f
JM
17112019-11-13 Joseph Myers <joseph@codesourcery.com>
1712
1713 * c-cppbuiltin.c (builtin_define_float_constants): Also define
1714 NORM_MAX constants. Update call to get_max_float.
1715 (LAZY_HEX_FP_VALUES_CNT): Update value to include NORM_MAX
1716 constants.
1717
2dbad62d
EB
17182019-11-13 Eric Botcazou <ebotcazou@adacore.com>
1719
1720 * c-ada-spec.c (get_underlying_decl): Do not look through typedefs.
1721 (dump_forward_type): Do not generate a declaration for function types.
1722 (dump_nested_type) <ARRAY_TYPE>: Do not generate a nested declaration
1723 of the component type if it is declared in another file.
1724
6ed76044
ML
17252019-11-12 Martin Liska <mliska@suse.cz>
1726
1727 * c-opts.c (c_common_post_options):
1728 Use SET_OPTION_IF_UNSET.
1729
62aee289
MR
17302019-11-12 Maciej W. Rozycki <macro@codesourcery.com>
1731 Frederik Harwath <frederik@codesourcery.com>
1732
1733 gcc/c-family/
1734 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_SERIAL enumeration
1735 constant.
1736 * c-pragma.c (oacc_pragmas): Add "serial" entry.
1737
f486280c
RS
17382019-11-08 Richard Sandiford <richard.sandiford@arm.com>
1739
1740 * c-common.h (gnu_vector_type_p): New function.
1741 * c-common.c (c_build_vec_perm_expr): Require __builtin_shuffle
1742 vectors to satisfy gnu_vector_type_p.
1743 (c_build_vec_convert): Likewise __builtin_convertvector.
1744 (convert_vector_to_array_for_subscript): Likewise when applying
1745 implicit vector to array conversion.
1746 (scalar_to_vector): Likewise when converting vector-scalar
1747 operations to vector-vector operations.
1748
017c6491
JM
17492019-11-08 Joseph Myers <joseph@codesourcery.com>
1750
1751 * c.opt (Wold-style-definition): Initialize to -1.
1752 * c-opts.c (c_common_post_options): Set warn_old_style_definition
1753 to flag_isoc2x if not set explicitly.
1754
c01bd174
JM
17552019-11-07 Joseph Myers <joseph@codesourcery.com>
1756
1757 * c-attribs.c (parse_tm_stmt_attr): Handle scoped attributes.
1758
0df65305
JM
17592019-11-05 Jason Merrill <jason@redhat.com>
1760
1761 * c-opts.c (c_common_post_options): -fconcepts-ts implies
1762 -fconcepts.
1763
e0c866dd
KK
17642019-11-04 Kamlesh Kumar <kamleshbhalui@gmail.com>
1765
1766 * c-opts.c (c_common_post_options): Update
1767 latest_abi_version.
1768
f968ef9b
JJ
17692019-11-02 Jakub Jelinek <jakub@redhat.com>
1770
d0c464d2
JJ
1771 * c-common.h (c_omp_get_context_selector): Remove.
1772 * c-omp.c (c_omp_get_context_selector): Moved to omp-general.c
1773 and renamed to omp_get_context_selector.
1774
917dd789
JJ
1775 * c-omp.c (c_omp_mark_declare_variant): Use
1776 omp_context_selector_set_compare.
1777
f968ef9b
JJ
1778 PR c++/88335 - Implement P1073R3: Immediate functions
1779 * c-common.h (enum rid): Add RID_CONSTEVAL.
1780 * c-common.c (c_common_reswords): Add consteval.
1781
5f6705b7
JJ
17822019-11-01 Martin Sebor <msebor@redhat.com>
1783
1784 PR middle-end/91679
1785 PR middle-end/91647
1786 PR middle-end/91463
1787 PR middle-end/92312
1788 * c-pretty-print.c (direct_abstract_declarator): Print
1789 bound in zero-length arrays.
1790 * c.opt (-Wzero-length-bounds): New option.
1791
43f1814c
NS
17922019-10-30 Nathan Sidwell <nathan@acm.org>
1793
1794 * c-cppbuiltin.c (c_cpp_builtins): Add 'L' suffix to feature
1795 macros.
1796
ad1539d5
MS
17972019-10-28 Martin Sebor <msebor@redhat.com>
1798
1799 PR c/66970
1800 * c-common.c (c_common_nodes_and_builtins): Call c_define_builtins
1801 even when only preprocessing.
1802 * c-common.h (names_builtin_p): Declare new function.
1803 * c-lex.c (init_c_lex): Set has_builtin.
1804 (c_common_has_builtin): Define a new function.
1805 * c-ppoutput.c (init_pp_output): Set has_builtin.
1806
135df52c
JJ
18072019-10-24 Jakub Jelinek <jakub@redhat.com>
1808
1809 * c-common.h (c_omp_context_selector_matches): Remove.
1810 * c-omp.c (c_omp_context_selector_matches): Remove.
1811 * c-attribs.c (c_common_attribute_table): Add
1812 "omp declare target {host,nohost,block}" attributes.
1813
8ad0c477
JM
18142019-10-17 JeanHeyd Meneide <phdofthehouse@gmail.com>
1815
1816 * c-lex.c (c_common_has_attribute): Update nodiscard value.
1817
56898e43
RS
18182019-10-14 Richard Sandiford <richard.sandiford@arm.com>
1819
1820 * c-common.h (user_facing_original_type_p): Declare.
1821 * c-common.c: Include c-spellcheck.h.
1822 (user_facing_original_type_p): New function.
1823
20de9568
JJ
18242019-10-12 Jakub Jelinek <jakub@redhat.com>
1825
1826 * c-common.h (c_omp_mark_declare_variant,
1827 c_omp_context_selector_matches): Declare.
1828 * c-omp.c: Include attribs.h, gimplify.h, cgraph.h, symbol-summary.h
1829 and hsa-common.h.
1830 (c_omp_get_context_selector): Support second argument NULL.
1831 (c_omp_mark_declare_variant, c_omp_context_selector_matches): New
1832 functions.
1833 * c-attribs.c (c_common_attribute_table): Remove "omp declare variant"
1834 attribute, add "omp declare variant base" and
1835 "omp declare variant variant" attributes.
1836
175a85b2
JM
18372019-10-11 Joseph Myers <joseph@codesourcery.com>
1838
1839 * c.opt (Wc11-c2x-compat): Add CPP(cpp_warn_c11_c2x_compat)
1840 CppReason(CPP_W_C11_C2X_COMPAT).
1841
fe2bc27c
JM
18422019-10-11 Joseph Myers <joseph@codesourcery.com>
1843
1844 * c-common.c (c_common_reswords): Do not use D_EXT for _Decimal32,
1845 _Decimal64 and _Decimal128.
1846
27dfdc0f
JM
18472019-10-10 Joseph Myers <joseph@codesourcery.com>
1848
1849 * c-cppbuiltin.c (c_cpp_builtins): Do not define macros for DFP
1850 types if DFP not supported.
1851
94e7f906
JJ
18522019-10-10 Jakub Jelinek <jakub@redhat.com>
1853
1854 * c-common.h (c_omp_check_context_selector,
1855 c_omp_get_context_selector): Declare.
1856 * c-omp.c (c_omp_declare_simd_clauses_to_numbers): Fix spelling
1857 in diagnostic message.
1858 (c_omp_check_context_selector, c_omp_get_context_selector): New
1859 functions.
1860 * c-attribs.c (c_common_attribute_table): Add "omp declare variant"
1861 attribute.
1862 (handle_omp_declare_variant_attribute): New function.
1863
a7160771
MS
18642019-10-09 Martin Sebor <msebor@redhat.com>
1865
1866 PR tree-optimization/90879
1867 * c.opt (-Wstring-compare): New option.
1868
cb57504a
JM
18692019-10-08 Andrew Sutton <asutton@lock3software.com>
1870 Jason Merrill <jason@redhat.com>
1871
1872 Update the concepts implementation to conform to the C++20
1873 specification, improve compile times, and generally clean up
1874 the implementation.
1875
1876 * c-cppbuiltin.c (c_cpp_builtins): Use new feature test values for
1877 concepts when -std=c++2a. Bump __cpp_concepts to 201907.
1878 * c.opt: Add -Wconcepts-ts.
1879 * c-opts.c (c_common_post_options): Warn when -fconcepts is used
1880 with -std=c++2a. Disable warning for -fconcepts in C++20 mode.
1881 (set_std_cxx2a): Enable concepts by default.
1882
fbb2a6dc
JM
18832019-10-08 Joseph Myers <joseph@codesourcery.com>
1884
1885 * c-opts.c (c_common_post_options): Set
1886 -fno-fp-int-builtin-inexact for C2X.
1887
8e007055
JJ
18882019-10-05 Jakub Jelinek <jakub@redhat.com>
1889
1890 PR c++/91369 - Implement P0784R7: constexpr new
1891 * c-cppbuiltin.c (c_cpp_builtins): Predefine
1892 __cpp_constexpr_dynamic_alloc=201907 for -std=c++2a.
1893
843f104d
JM
18942019-10-04 Joseph Myers <joseph@codesourcery.com>
1895
1896 PR c/82752
1897 * c-format.c (C_STD_VER): Handle C2x.
1898 (C_STD_NAME): Likewise.
1899 (strftime_flag_specs): Add 'O' modifier with 'p' flag.
1900 (time_char_table): Use separate entry for 'B' and 'b', with 'O'
1901 modifier allowed and 'p' flag.
1902 * c-format.h (enum format_std_version): Add STD_C2X.
1903 (struct format_char_info): Mention 'p' in comment on flags2.
1904
e9c9a142
DM
19052019-10-01 David Malcolm <dmalcolm@redhat.com>
1906
1907 * c-opts.c (c_diagnostic_finalizer): Temporarily clear prefix when
1908 calling diagnostic_show_locus, rather than destroying it afterwards.
1909
7552c36a
JJ
19102019-10-01 Jakub Jelinek <jakub@redhat.com>
1911
1912 PR c++/91925
1913 * c-warn.c (check_alignment_of_packed_member): Ignore FIELD_DECLs
1914 with NULL DECL_FIELD_OFFSET.
1915
8209db25
RS
19162019-10-01 Richard Sandiford <richard.sandiford@arm.com>
1917
1918 * c-pretty-print.c (pp_c_specifier_qualifier_list): If a vector type
1919 has a type name, use it in preference to the __vector syntax.
1920
9343bf99
RS
19212019-09-30 Richard Sandiford <richard.sandiford@arm.com>
1922
1923 * c-pretty-print.c (pp_c_parameter_type_list): Avoid printing
1924 two spaces between a comma and "...".
1925
59bc434a
JJ
19262019-09-27 Jakub Jelinek <jakub@redhat.com>
1927
1928 PR c++/88203
1929 * c-common.h (c_omp_predefined_variable): Declare.
1930 * c-omp.c (c_omp_predefined_variable): New function.
1931 (c_omp_predetermined_sharing): Return OMP_CLAUSE_DEFAULT_SHARED
1932 for predefined variables.
1933
c6447c20
RS
19342019-09-27 Richard Sandiford <richard.sandiford@arm.com>
1935
1936 * c-common.h (build_function_call_vec): Take the original
1937 function decl as an optional final parameter.
1938 (check_builtin_function_arguments): Take the original function decl.
1939 * c-common.c (check_builtin_function_arguments): Likewise.
1940 Handle all built-in functions, not just BUILT_IN_NORMAL ones.
1941 Use targetm.check_builtin_call to check BUILT_IN_MD functions.
1942
c4438114
JM
19432019-09-15 Jason Merrill <jason@redhat.com>
1944
1945 * c-warn.c (warn_logical_operator): Strip location wrappers. Don't
1946 fold_for_warn in "|| mask" warning.
1947
68a57628
ML
19482019-09-10 Martin Liska <mliska@suse.cz>
1949
1950 * c.opt: Use newly added WarnRemoved.
1951
f48ef52e
ML
19522019-09-09 Martin Liska <mliska@suse.cz>
1953
1954 * c.opt: Update comment of removed
1955 options that are preserved only for backward
1956 compatibility.
1957
67f6e649
ML
19582019-09-06 Martin Liska <mliska@suse.cz>
1959
1960 PR c++/91125
1961 * c-common.c: Remove definition of flag_use_repository.
1962 * c-common.h: Likewise.
1963 * c-opts.c (c_common_handle_option):
1964 Do not handle OPT_frepo option.
1965 * c.opt: Mark the option with Deprecated.
1966
db9d2274
MP
19672019-09-04 Marek Polacek <polacek@redhat.com>
1968
1969 * c.opt (fdeduce-init-list): Ignored.
1970
68e2c199
PK
19712019-09-04 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1972
1973 PR c/78736
1974 * c.opt (Wenum-conversion): New option.
1975
7a4418a5
JL
19762019-09-03 Jozef Lawrynowicz <jozef.l@mittosystems.com>
1977
1978 * c-attribs.c (handle_section_attribute): Call the
1979 handle_generic_attribute target hook after performing target
1980 independent processing.
1981 (handle_noinit_attribute): Likewise.
1982
5f76ab15
ILT
19832019-09-03 Ian Lance Taylor <iant@golang.org>
1984
1985 * c-cppbuiltin.c (builtin_define_with_hex_fp_value): Always expand
1986 when using -fgo-dump-spec.
1987
ae0d3f6a
ML
19882019-09-02 Martin Liska <mliska@suse.cz>
1989
1990 PR c++/91155
1991 * c-common.c (fname_as_string): Use cxx_printable_name for
1992 __PRETTY_FUNCTION__ same as was used before r265711.
1993
8a902edb
MP
19942019-08-28 Marek Polacek <polacek@redhat.com>
1995
1996 Implement P1152R4: Deprecating some uses of volatile.
1997 PR c++/91361
1998 * c-opts.c (c_common_post_options): Enable -Wvolatile by
1999 default for C++2a, unless -Wno-deprecated.
2000 * c.opt (Wvolatile): New warning.
2001
4742dbe7
MP
20022019-08-28 Marek Polacek <polacek@redhat.com>
2003
2004 PR c++/91360 - Implement C++20 P1143R2: constinit.
2005 * c-common.c (c_common_reswords): Add constinit and __constinit.
2006 (keyword_is_decl_specifier): Handle RID_CONSTINIT.
2007 * c-common.h (enum rid): Add RID_CONSTINIT, RID_FIRST_CXX20, and
2008 RID_LAST_CXX20.
2009 (D_CXX20): Define.
2010 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_constinit.
2011 * c-format.c (cxx_keywords): Add "constinit".
2012 * c.opt (Wc++2a-compat, Wc++20-compat): New options.
2013
6a074892
JJ
20142019-08-27 Jakub Jelinek <jakub@redhat.com>
2015
2016 PR c++/91415
2017 * c-common.c (verify_tree): For LSHIFT_EXPR, RSHIFT_EXPR,
2018 COMPONENT_REF and ARRAY_REF in cxx_dialect >= cxx17 mode handle it
2019 like COMPOUND_EXPR rather than normal expression.
2020
22f8849d
IS
20212019-08-23 Iain Sandoe <iain@sandoe.co.uk>
2022
2023 PR pch/61250
2024 * c-lex.c (c_lex_with_flags): Don't call
2025 c_common_no_more_pch () from here.
2026
df375b03
JJ
20272019-08-23 Jakub Jelinek <jakub@redhat.com>
2028
2029 PR middle-end/91283
2030 * c-common.c (c_ts18661_flt_eval_method): Use flag_excess_precision
2031 instead of flag_excess_precision_cmdline.
2032 * c-cppbuiltin.c (c_cpp_flt_eval_method_iec_559): Likewise.
2033 * c-opts.c (c_common_post_options): Likewise.
2034
14b7950f
MS
20352019-08-22 Martin Sebor <msebor@redhat.com>
2036
2037 PR middle-end/91490
2038 * c-common.c (braced_list_to_string): Add argument and overload.
2039 Handle flexible length arrays and unions.
2040
8bb2ee59
EB
20412019-08-21 Eric Botcazou <ebotcazou@adacore.com>
2042
2043 * c-ada-spec.c (dump_ada_function_declaration): Be prepared for broken
2044 function declarations where arguments are missing. Rename variables.
2045
21c1e205
RB
20462019-08-15 Richard Biener <rguenther@suse.de>
2047
2048 * c-common.c (c_stddef_cpp_builtins): When the GIMPLE FE is
2049 enabled, define __SIZETYPE__.
2050
f0033821
CL
20512019-08-14 Christophe Lyon <christophe.lyon@linaro.org>
2052
2053 * c-attribs.c (c_common_attribute_table): Add "noinit" entry. Add
2054 exclusion with "section" attribute.
2055 (attr_noinit_exclusions): New table.
2056 (handle_noinit_attribute): New function.
2057
4d732405
RS
20582019-08-13 Richard Sandiford <richard.sandiford@arm.com>
2059
2060 PR middle-end/91421
2061 * c-common.c (resolve_overloaded_builtin): Use
2062 copy_decl_built_in_function.
2063
51ad8481
MS
20642019-08-13 Martin Sebor <msebor@redhat.com>
2065
2066 PR c/80619
2067 * c-format.c (printf_length_specs): Set FMT_LEN_w for "w".
2068 (asm_fprintf_length_spec): Same.
2069 * c-format.h (format_lengths): Add FMT_LEN_w.
2070
77eb117f
JJ
20712019-08-10 Jakub Jelinek <jakub@redhat.com>
2072
2073 * c-pragma.h (enum pragma_omp_clause): Add
2074 PRAGMA_OMP_CLAUSE_DEVICE_TYPE.
2075
398e3feb
JJ
20762019-08-07 Jakub Jelinek <jakub@redhat.com>
2077
2078 * c-pragma.h (enum pragma_omp_clause): Add
2079 PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR. Set PRAGMA_OACC_CLAUSE_USE_DEVICE
2080 equal to PRAGMA_OMP_CLAUSE_USE_DEVICE_PTR instead of being a separate
2081 enumeration value.
2082
ab574db6
MP
20832019-08-05 Marek Polacek <polacek@redhat.com>
2084
2085 PR c++/91338 - Implement P1161R3: Deprecate a[b,c].
2086 * c-opts.c (c_common_post_options): Enable -Wcomma-subscript by
2087 default for C++2a, unless -Wno-deprecated.
2088 * c.opt (Wcomma-subscript): New warning.
2089
554a530f
JJ
20902019-07-20 Jakub Jelinek <jakub@redhat.com>
2091
2092 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_LOOP.
2093 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_BIND.
2094 * c-pragma.c (omp_pragmas_simd): Add PRAGMA_OMP_LOOP entry.
2095 * c-common.h (enum c_omp_clause_split): Add C_OMP_CLAUSE_SPLIT_LOOP.
2096 * c-omp.c (c_omp_split_clauses): Add support for 4 new combined
2097 constructs with the loop construct.
2098
1a888209
JJ
20992019-07-13 Jakub Jelinek <jakub@redhat.com>
2100
2101 PR c/91149
2102 * c-omp.c (c_omp_split_clauses): Fix a pasto in
2103 OMP_CLAUSE_REDUCTION_TASK handling.
2104
1fdd6f04
JJ
21052019-07-12 Jakub Jelinek <jakub@redhat.com>
2106
2107 * c-pragma.h (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_ORDER.
2108 * c-omp.c (c_omp_split_clauses): Handle splitting of OMP_CLAUSE_ORDER.
2109
99b1c316
MS
21102019-07-09 Martin Sebor <msebor@redhat.com>
2111
2112 PR c++/61339
1fdd6f04 2113 * c-opts.c (handle_deferred_opts): Change class-key of PODs to struct
99b1c316
MS
2114 and others to class.
2115 * c-pretty-print.h: Same.
2116
6c1dae73
MS
21172019-07-09 Martin Sebor <msebor@redhat.com>
2118
2119 PR c++/61339
2120 * c-format.c (check_argument_type): Change class-key from class to
2121 struct and vice versa to match convention and avoid -Wclass-is-pod
2122 and -Wstruct-no-pod.
2123 * c-pretty-print.h: Same.
2124
8ba6ea87
ML
21252019-07-03 Martin Liska <mliska@suse.cz>
2126
2127 * c-common.c (try_to_locate_new_include_insertion_point): Remove
2128 dead assignemts.
2129
83eb9522
JJ
21302019-07-03 Jakub Jelinek <jakub@redhat.com>
2131
2132 * c-omp.c (c_omp_split_clauses): Put OMP_CLAUSE_REDUCTION_INSCAN
2133 clauses on OMP_FOR rather than OMP_PARALLEL when OMP_FOR is combined
2134 with OMP_PARALLEL.
2135
1c6ffbab
QZ
21362019-07-02 qing zhao <qing.zhao@oracle.com>
2137
2138 PR preprocessor/90581
2139 * c-opts.c (c_common_handle_option): Handle -fmax-include-depth.
2140 * c.opt: Add new option -fmax-include-depth.
2141
7ffc7de5
JM
21422019-06-26 Jason Merrill <jason@redhat.com>
2143
2144 PR c++/55442 - memory-hog with highly recursive constexpr.
2145 * c.opt (fconstexpr-loop-limit): New.
2146
361af3e4
JJ
21472019-06-25 Jakub Jelinek <jakub@redhat.com>
2148
2149 PR sanitizer/90954
2150 * c-omp.c (c_finish_omp_atomic): Allow tree_invariant_p in addition
2151 to SAVE_EXPR in first operand of a COMPOUND_EXPR.
2152
ab20d992
JJ
21532019-06-25 Jozef Lawrynowicz <jozef.l@mittosystems.com>
2154
2155 * c-common.c (c_common_nodes_and_builtins): Define
2156 alternate "__intN__" name for "__intN" types.
2157
f4af4019
JH
21582019-06-24 Jan Hubicka <jh@suse.cz>
2159
2160 * c-common.c (braced_lists_to_strings): Check that
2161 type is array or integer prior checking string flag.
2162
da9e9b57
MB
21632019-06-21 Matthew Beliveau <mbelivea@redhat.com>
2164
2165 PR c++/90875 - added -Wswitch-outside-range option
2166 * c.opt (Wswitch-outside-range): Added new option.
2167 * c-warn.c (c_do_switch_warnings): Use OPT_Wswitch-outside-range.
2168
3f3d6a6f
MP
21692019-06-21 Marek Polacek <polacek@redhat.com>
2170
2171 PR c++/90953 - ICE with -Wmissing-format-attribute.
2172 * c-common.c (check_function_arguments_recurse): Use
2173 get_attribute_name.
2174 (check_missing_format_attribute): Likewise.
2175
1bf32c11
MP
21762019-06-19 Marek Polacek <polacek@redhat.com>
2177
2178 PR c++/60364 - noreturn after first decl not diagnosed.
2179 * c-attribs.c (handle_noreturn_attribute): No longer static.
2180 * c-common.h (handle_noreturn_attribute, attr_noreturn_exclusions):
2181 Declare.
2182 * c-format.c (check_function_format): Use get_attribute_name.
2183
a04c0734
MS
21842019-06-19 Martin Sebor <msebor@redhat.com>
2185
2186 PR translation/90156
2187 * c-format.c (function_format_info::format_type): Adjust type.
2188 (function_format_info::is_raw): New member.
2189 (decode_format_type): Adjust signature. Handle "raw" diag attributes.
2190 (decode_format_attr): Adjust call to decode_format_type.
2191 Avoid a redundant call to convert_format_name_to_system_name.
2192 Avoid abbreviating the word "arguments" in a diagnostic.
2193 (format_warning_substr): New function.
2194 (avoid_dollar_number): Quote dollar sign in a diagnostic.
2195 (finish_dollar_format_checking): Same.
2196 (check_format_info): Same.
2197 (struct baltoks_t): New.
2198 (c_opers, c_keywords, cxx_keywords, badwords, contrs): New arrays.
2199 (maybe_diag_unbalanced_tokens, check_tokens, check_plain): New
2200 functions.
2201 (check_format_info_main): Call check_plain. Use baltoks_t. Call
2202 maybe_diag_unbalanced_tokens.
2203 (handle_format_attribute): Spell out the word "arguments" in
2204 a diagnostic.
2205
d3786ebb
MB
22062019-06-11 Matthew Beliveau <mbelivea@redhat.com>
2207
2208 PR c++/90449 - add -Winaccessible-base option.
2209 * c.opt (Winaccessible-base): New option.
2210
bf38f7e9
JJ
22112019-06-10 Jakub Jelinek <jakub@redhat.com>
2212
2213 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_SCAN.
2214 * c-pragma.c (omp_pragmas_simd): Add #pragma omp scan.
2215 * c-omp.c (c_omp_split_clauses): Diagnose inscan reductions on
2216 combined/composite constructs where it is not allowed. Copy over
2217 OMP_CLAUSE_REDUCTION_INSCAN.
2218
0ecf545c
MS
22192019-06-05 Martin Sebor <msebor@redhat.com>
2220
2221 * c-attribs.c (handle_mode_attribute): Adjust quoting and hyphenation.
2222 (handle_alias_ifunc_attribute): Same.
2223 (handle_copy_attribute): Same.
2224 (handle_weakref_attribute): Same.
2225 (handle_nonnull_attribute): Same.
2226 * c-warn.c (warn_for_sign_compare): Same.
2227 (warn_for_restrict): Same.
2228 * c.opt: Same.
2229
36b34127
MS
22302019-06-05 Martin Sebor <msebor@redhat.com>
2231
2232 * c-pragma.c (handle_pragma_weak): Adjust quoting in a diagnostic.
2233 * c.opt (-Wformat-diag): Remove a spurious period.
2234
357a352f
JJ
22352019-05-29 Jakub Jelinek <jakub@redhat.com>
2236
2237 PR c/90628
2238 * c-common.c (check_builtin_function_arguments)
2239 <case BUILTIN_*_OVERFLOW>: Diagnose pointer to const qualified integer
2240 as last argument.
2241
2b8235ea
EB
22422019-05-23 Eric Botcazou <ebotcazou@adacore.com>
2243
2244 * c-ada-spec.c (compare_node): Compare the DECL_UIDs as a last resort.
2245
6d86ddc4
ML
22462019-05-22 Martin Liska <mliska@suse.cz>
2247
2248 PR lto/90500
2249 * c-attribs.c (handle_copy_attribute): Do not copy
2250 target_clones attribute.
2251
419ba5b9
EB
22522019-05-21 Eric Botcazou <ebotcazou@adacore.com>
2253
2254 * c-ada-spec.h (enum cpp_operation): Add IS_ASSIGNMENT_OPERATOR.
2255 * c-ada-spec.c (print_assignment_operator): New function.
2256 (dump_ada_declaration) <FUNCTION_DECL>: Call it do dump explicit copy
2257 assignment operators declared as methods and filter out the others.
2258
e03436e7
TS
22592019-05-17 Thomas Schwinge <thomas@codesourcery.com>
2260
2261 PR c/89433
2262 * c-attribs.c (c_common_attribute_table): Set min_len to -1 for
2263 "omp declare target".
2264
a9c697b8
MS
22652019-05-16 Martin Sebor <msebor@redhat.com>
2266
ab20d992
JJ
2267 * c-attribs.c (handle_no_sanitize_attribute): Quote identifiers,
2268 keywords, operators, and types in diagnostics.
2269 (handle_scalar_storage_order_attribute): Same.
2270 (handle_mode_attribute): Same.
2271 (handle_visibility_attribute): Same.
2272 (handle_assume_aligned_attribute): Same.
2273 (handle_no_split_stack_attribute): Same.
2274 * c-common.c (shorten_compare): Same.
2275 (c_common_truthvalue_conversion): Same.
2276 (cb_get_source_date_epoch): Same.
2277 * c-lex.c (cb_def_pragma): Quote keywords, operators, and types
2278 in diagnostics.
2279 (interpret_float): Same.
2280 * c-omp.c (c_finish_omp_for): Same.
2281 * c-opts.c (c_common_post_options): Same.
2282 * c-pch.c (c_common_pch_pragma): Same.
2283 * c-pragma.c (pop_alignment): Same.
2284 (handle_pragma_pack): Same.
2285 (apply_pragma_weak): Same.
2286 (handle_pragma_weak): Same.
2287 (handle_pragma_scalar_storage_order): Same.
2288 (handle_pragma_redefine_extname): Same.
2289 (add_to_renaming_pragma_list): Same.
2290 (maybe_apply_renaming_pragma): Same.
2291 (push_visibility): Same.
2292 (handle_pragma_visibility): Same.
2293 (handle_pragma_optimize): Same.
2294 (handle_pragma_message): Same.
2295 * c-warn.c (warn_for_omitted_condop): Same.
2296 (lvalue_error): Same.
a9c697b8 2297
6b943512
RB
22982019-05-15 Richard Biener <rguenther@suse.de>
2299
2300 PR c/90474
2301 * c-common.c (c_common_mark_addressable_vec): Also mark
2302 a COMPOUND_LITERAL_EXPR_DECL addressable similar to
2303 c_mark_addressable.
ab20d992 2304
b744fc85
NS
23052019-05-06 Nathan Sidwell <nathan@acm.org>
2306
2307 * c-opts.c (handle_defered_opts): Rename struct deps to struc mkdeps.
2308
598f50d7
NS
23092019-04-30 Nathan Sidwell <nathan@acm.org>
2310
2311 * c-common.c (c_common_init_ts): Use MARK_TS_EXP. Mark SIZEOF_EXPR.
2312
5bcc5a3b
ML
23132019-04-30 Martin Liska <mliska@suse.cz>
2314
2315 * c-pragma.c (handle_pragma_diagnostic): Provide hints
2316 for unknown options.
2317
e78a87f7
RS
23182019-04-26 Richard Sandiford <richard.sandiford@arm.com>
2319
2320 * c-warn.c (strict_aliasing_warning): Apply COMPLETE_TYPE_P to
2321 the pointer target rather than the pointer itself.
2322
c280b7ee
JJ
23232019-04-19 Jakub Jelinek <jakub@redhat.com>
2324
2325 PR c/89888
2326 * c-common.h (c_add_case_label): Remove orig_type and outside_range_p
2327 arguments.
2328 (c_do_switch_warnings): Remove outside_range_p argument.
2329 * c-common.c (check_case_bounds): Removed.
2330 (c_add_case_label): Remove orig_type and outside_range_p arguments.
2331 Don't call check_case_bounds. Fold low_value as well as high_value.
2332 * c-warn.c (c_do_switch_warnings): Remove outside_range_p argument.
2333 Check for case labels outside of range of original type here and
2334 adjust them.
2335
8e8225e6
JJ
23362019-04-12 Jakub Jelinek <jakub@redhat.com>
2337
63b8a166
JJ
2338 PR translation/90041
2339 * c.opt (-fhandle-exceptions): Use %< and %> around option names
2340 in the Warn diagnostics.
2341
8e8225e6
JJ
2342 PR c/89946
2343 * c-attribs.c (handle_patchable_function_entry_attribute): Add
2344 function comment. Warn if arguments of the attribute are not positive
2345 integer constants.
2346
53a3f614
EB
23472019-04-09 Eric Botcazou <ebotcazou@adacore.com>
2348
2349 * c-ada-spec.c (print_destructor): Deal with deleting destructors.
2350 (dump_ada_declaration) <FUNCTION_DECL>: Likewise.
2351
22be5873
EB
23522019-04-07 Eric Botcazou <ebotcazou@adacore.com>
2353
2354 * c-ada-spec.c (is_float128): New predicate extracted from...
2355 (dump_ada_node) <COMPLEX_TYPE>: Use it to recognize __cfloat128.
2356 <REAL_TYPE>: ...here. Call it.
2357
34facf20
DM
23582019-04-05 David Malcolm <dmalcolm@redhat.com>
2359
2360 PR c/89985
2361 * c-warn.c (check_address_or_pointer_of_packed_member): Add
2362 auto_diagnostic_group. Guard inform calls by result of
2363 warning_at call.
2364
05564120
MP
23652019-04-05 Marek Polacek <polacek@redhat.com>
2366
ab20d992 2367 PR c++/89973 - -Waddress-of-packed-member ICE with invalid conversion.
05564120
MP
2368 * c-warn.c (check_address_or_pointer_of_packed_member): Check the type
2369 of RHS.
2370
7a506c3c
JM
23712019-04-03 Jason Merrill <jason@redhat.com>
2372
2373 PR c++/86586 - -fcompare-debug=-Wsign-compare.
2374 * c-warn.c (warn_for_sign_compare): Call fold_for_warn.
2375
ddeae8c8
MS
23762019-04-01 Martin Sebor <msebor@redhat.com>
2377
2378 PR c/89685
2379 * c-attribs.c (handle_copy_attribute): Handle references and
2380 non-constant expressions.
2381
a15ffa22
JJ
23822019-03-22 Jakub Jelinek <jakub@redhat.com>
2383
2384 PR c++/87481
2385 * c.opt (-fconstexpr-ops-limit=): New option.
2386
36a3a7a3
JJ
23872019-03-21 Jakub Jelinek <jakub@redhat.com>
2388
2389 * c-common.c (per_file_includes_t): Use false as Lazy in hash_set
2390 template param.
2391
bec1da64
MS
23922019-03-19 Martin Sebor <msebor@redhat.com>
2393
2394 PR tree-optimization/89688
2395 * c-common.c (braced_list_to_string): Make static.
2396 (braced_lists_to_strings): Define new function.
2397 * c-common.h (braced_list_to_string): Remove.
2398 (braced_lists_to_strings): Declare.
2399
1fe61adf
ML
24002019-03-12 Martin Liska <mliska@suse.cz>
2401
2402 * c-opts.c (c_common_handle_option): Wrap option with %< and %>.
2403
93964ebd
ML
24042019-03-11 Martin Liska <mliska@suse.cz>
2405
2406 * c-opts.c (c_common_post_options): Wrap apostrophes
2407 in gcc internal format with %'.
2408
a3f9f006
ML
24092019-03-11 Martin Liska <mliska@suse.cz>
2410
2411 * c-attribs.c (handle_nocf_check_attribute): Wrap an option name
2412 in a string format message and fix GNU coding style.
2413 * c-common.c (vector_types_convertible_p): Likewise.
2414 (c_build_vec_perm_expr): Likewise.
2415 * c-indentation.c (get_visual_column): Likewise.
2416 * c-opts.c (c_common_handle_option): Likewise.
2417 (c_common_post_options): Likewise.
2418 (sanitize_cpp_opts): Likewise.
2419 * c-pch.c (c_common_pch_pragma): Likewise.
2420 * c-pragma.c (handle_pragma_pack): Likewise.
2421
1db01ff9
JJ
24222019-03-08 Jakub Jelinek <jakub@redhat.com>
2423
2424 PR tree-optimization/89550
2425 * c-common.c (c_common_truthvalue_conversion): Only set
2426 TREE_NO_WARNING if warning_at returned true.
2427 * c-warn.c (overflow_warning, warn_logical_operator): Likewise.
2428
ba790e6f
JJ
24292019-02-25 Sandra Loosemore <sandra@codesourcery.com>
2430 Martin Sebor <msebor@gmail.com>
2431
2432 * c.opt (Wmissing-attributes): Clean up doc string.
2433
7da73ba7
JJ
24342019-02-25 Jakub Jelinek <jakub@redhat.com>
2435
2436 PR c/89495
2437 * c-format.c (maybe_read_dollar_number): Compute nargnum in
2438 HOST_WIDE_INT type to avoid overflows and change overflow_flag
2439 checking.
2440
921bb9d1
RB
24412019-02-22 Richard Biener <rguenther@suse.de>
2442
2443 * c-pch.c (no_checksum): Remove.
2444 (pch_init): Remove assertion that executable_checksum is not
2445 all zero.
2446 (c_common_valid_pch): Likewise.
2447
e2ebb05c
MS
24482019-02-18 Martin Sebor <msebor@redhat.com>
2449
2450 PR middle-end/89294
2451 * c-common.c (invalid_array_size_error): Handle cst_size_not_constant.
2452
3fe53000
DM
24532019-02-16 David Malcolm <dmalcolm@redhat.com>
2454
2455 PR c++/88680
2456 * c-common.c (shorten_compare): Call fold_for_warn on op0 when
2457 implementing -Wtype-limits.
2458
28a8cef1
MS
24592019-02-11 Martin Sebor <msebor@redhat.com>
2460
2461 PR c++/87996
2462 * c-common.c (invalid_array_size_error): New function.
2463 (valid_array_size_p): Call it. Handle size as well as type.
2464 * c-common.h (valid_constant_size_p): New function.
2465 (enum cst_size_error): New type.
2466
ec2be203
DM
24672019-01-31 David Malcolm <dmalcolm@redhat.com>
2468
2469 PR c/89122
2470 * known-headers.cc (get_stdlib_header_for_name): Add
2471 {FLT|DBL|LDBL}_{MAX|MIN} to "hints" array.
2472
8936f047
JJ
24732019-01-31 Jakub Jelinek <jakub@redhat.com>
2474
2475 PR libstdc++/88170
2476 * c-pretty-print.c (pp_c_enumeration_constant): Print always as
2477 a C cast in pp_c_flag_gnu_v3 mode.
2478
6a335b96
JJ
24792019-01-29 Jakub Jelinek <jakub@redhat.com>
2480
2481 PR c/86125
2482 * c-common.c (c_common_nodes_and_builtins): Build type variants for
2483 builtin_structptr_types types even for C.
2484
2a06eba5
BE
24852019-01-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
2486
2487 * c-warn.c (check_address_or_pointer_of_packed_member): Handle the case
2488 when rhs is of array type correctly. Fix handling of nested structures.
2489 Fix handling of indirect_ref together with nop_expr and/or addr_expr.
2490 (check_and_warn_address_or_pointer_of_packed_member): Fix handling of
2491 type casts within nested compound expressions.
2492
18a23298
JJ
24932019-01-22 Jakub Jelinek <jakub@redhat.com>
2494
2495 PR middle-end/88968
2496 * c-omp.c (c_finish_omp_atomic): For bitfield atomics, update type
2497 variable after using BIT_FIELD_REF.
2498
420183d9
L
24992019-01-18 H.J. Lu <hongjiu.lu@intel.com>
2500
2501 PR c/51628
2502 PR c/88664
2503 * c-common.h (warn_for_address_or_pointer_of_packed_member):
2504 Remove the boolean argument.
2505 * c-warn.c (check_address_of_packed_member): Renamed to ...
2506 (check_address_or_pointer_of_packed_member): This. Also
2507 warn pointer conversion.
2508 (check_and_warn_address_of_packed_member): Renamed to ...
2509 (check_and_warn_address_or_pointer_of_packed_member): This.
2510 Also warn pointer conversion.
2511 (warn_for_address_or_pointer_of_packed_member): Remove the
2512 boolean argument. Don't check pointer conversion here.
2513
99063eee
RS
25142019-01-15 Richard Sandiford <richard.sandiford@arm.com>
2515
2516 PR inline-asm/52813
2517 * c.opt (Wdeprecated): Move documentation and variable to common.opt.
2518
a30d0196
JJ
25192019-01-14 Jakub Jelinek <jakub@redhat.com>
2520
2521 * c-cppbuiltin.c (c_cpp_builtin): Define __cpp_guaranteed_copy_elision
2522 and __cpp_nontype_template_parameter_auto. Add a comment that
2523 __cpp_template_auto is deprecated.
2524
2d91f79d
TH
25252019-01-14 Tom Honermann <tom@honermann.net>
2526
2527 Implement P0482R5, char8_t: A type for UTF-8 characters and strings
2528 * c-common.c (c_common_reswords): Add char8_t.
2529 (fix_string_type): Use char8_t for the type of u8 string literals.
2530 (c_common_get_alias_set): char8_t doesn't alias.
2531 (c_common_nodes_and_builtins): Define char8_t as a builtin type in
2532 C++.
2533 (c_stddef_cpp_builtins): Add __CHAR8_TYPE__.
2534 (keyword_begins_type_specifier): Add RID_CHAR8.
2535 * c-common.h (rid): Add RID_CHAR8.
2536 (c_tree_index): Add CTI_CHAR8_TYPE and CTI_CHAR8_ARRAY_TYPE.
2537 Define D_CXX_CHAR8_T and D_CXX_CHAR8_T_FLAGS.
2538 Define char8_type_node and char8_array_type_node.
2539 * c-cppbuiltin.c (cpp_atomic_builtins): Predefine
2540 __GCC_ATOMIC_CHAR8_T_LOCK_FREE.
2541 (c_cpp_builtins): Predefine __cpp_char8_t.
2542 * c-lex.c (lex_string): Use char8_array_type_node as the type of
2543 CPP_UTF8STRING.
2544 (lex_charconst): Use char8_type_node as the type of CPP_UTF8CHAR.
2545 * c-opts.c: If not otherwise specified, enable -fchar8_t when
2546 targeting C++2a.
2547 * c.opt: Add the -fchar8_t command line option.
2548
23db6ced
MS
25492019-01-14 Martin Sebor <msebor@redhat.com>
2550
2551 PR target/88638
2552 * c-attribs.c (positional_argument): Call valid_format_string_type_p
2553 and issue errors if it fails.
2554 * c-common.h (valid_format_string_type_p): Declare.
2555 * c-format.c (valid_stringptr_type_p): Rename...
2556 (valid_format_string_type_p): ...to this and make extern.
2557 (handle_format_arg_attribute): Adjust to new name.
2558 (check_format_string): Same.
2559
234c3818
L
25602019-01-13 H.J. Lu <hongjiu.lu@intel.com>
2561
2562 * c-warn.c (warn_for_address_or_pointer_of_packed_member):
2563 Replace "may may" with "may" in warning message.
2564
d8fcab68
JJ
25652019-01-07 Jakub Jelinek <jakub@redhat.com>
2566
2567 PR c++/85052
2568 * c-common.h (enum rid): Add RID_BUILTIN_CONVERTVECTOR.
2569 (c_build_vec_convert): Declare.
2570 * c-common.c (c_build_vec_convert): New function.
2571
29d24852
MS
25722019-01-04 Martin Sebor <msebor@redhat.com>
2573
2574 PR c/88546
2575 * c-attribs.c (handle_copy_attribute): Avoid copying attribute leaf.
2576 Handle C++ empty throw specification and C11 _Noreturn.
2577 (has_attribute): Also handle C11 _Noreturn.
2578
9069a4c9
MS
25792019-01-04 Martin Sebor <msebor@redhat.com>
2580
2581 PR c/88363
2582 * c-attribs.c (positional_argument): Also accept enumerated types.
2583
a5544970
JJ
25842019-01-01 Jakub Jelinek <jakub@redhat.com>
2585
2586 Update copyright years.
2587
da77eace
L
25882018-12-20 H.J. Lu <hongjiu.lu@intel.com>
2589
2590 PR c/51628
2591 * c-common.h (warn_for_address_or_pointer_of_packed_member): New.
2592 * c-warn.c (check_alignment_of_packed_member): New function.
2593 (check_address_of_packed_member): Likewise.
2594 (check_and_warn_address_of_packed_member): Likewise.
2595 (warn_for_address_or_pointer_of_packed_member): Likewise.
2596 * c.opt: Add -Wno-address-of-packed-member.
2597
573767d4
DM
25982018-12-20 David Malcolm <dmalcolm@redhat.com>
2599
2600 PR c++/87504
2601 * c-warn.c (get_outermost_macro_expansion): New function.
2602 (spelled_the_same_p): Use it to unwind the macro expansions, and
2603 compare the outermost macro in each nested expansion, rather than
2604 the innermost.
2605
a14feb3c
DM
26062018-12-19 David Malcolm <dmalcolm@redhat.com>
2607
2608 PR c++/87504
2609 * c-common.h (warn_tautological_cmp): Convert 1st param from
2610 location_t to const op_location_t &.
2611 * c-warn.c (find_array_ref_with_const_idx_r): Call fold_for_warn
2612 when testing for INTEGER_CST.
2613 (warn_tautological_bitwise_comparison): Convert 1st param from
2614 location_t to const op_location_t &; use it to build a
2615 binary_op_rich_location, and use this.
2616 (spelled_the_same_p): New function.
2617 (warn_tautological_cmp): Convert 1st param from location_t to
2618 const op_location_t &. Warn for macro expansions if
2619 spelled_the_same_p. Use binary_op_rich_location.
2620
dfd7fdca
DM
26212018-12-19 David Malcolm <dmalcolm@redhat.com>
2622
2623 PR c++/43064
2624 PR c++/43486
2625 * c-common.c (unsafe_conversion_p): Fold any location wrapper.
2626 (verify_tree): Handle location wrappers.
2627 (c_common_truthvalue_conversion): Strip any location wrapper.
2628 Handle CONST_DECL.
2629 (fold_offsetof): Strip any location wrapper.
2630 (complete_array_type): Likewise for initial_value.
2631 (convert_vector_to_array_for_subscript): Call fold_for_warn on the
2632 index before checking for INTEGER_CST.
2633 * c-pretty-print.c (c_pretty_printer::primary_expression): Don't
2634 print parentheses around location wrappers.
2635 * c-warn.c (warn_logical_operator): Call fold_for_warn on op_right
2636 before checking for INTEGER_CST.
2637 (warn_tautological_bitwise_comparison): Call
2638 tree_strip_any_location_wrapper on lhs, rhs, and bitop's operand
2639 before checking for INTEGER_CST.
2640 (readonly_error): Strip any location wrapper.
2641 (warn_array_subscript_with_type_char): Strip location wrappers
2642 before checking for INTEGER_CST. Use the location of the index if
2643 available.
2644
5c8b3702
JM
26452018-12-06 Jason Merrill <jason@redhat.com>
2646
2647 PR c++/88136 - -Wdeprecated-copy false positives
2648 * c.opt (Wdeprecated-copy-dtor): New.
2649 (Wdeprecated-copy): Move to -Wextra.
2650
673670da
MS
26512018-11-29 Martin Sebor <msebor@redhat.com>
2652
2653 PR c/88172
2654 PR testsuite/88208
2655 * c-attribs.c (common_handle_aligned_attribute): Silently avoid setting
2656 alignments to values less than the target requires.
2657 (has_attribute): For attribute aligned consider both the attribute
2658 and the alignment bits.
2659 * c-common.c (c_init_attributes): Optionally issue a warning for
2660 zero alignment.
2661
04864ec8
MS
26622018-11-28 Martin Sebor <msebor@redhat.com>
2663
2664 PR c/88065
2665 PR c/87297
2666 * c-warn.c (sizeof_pointer_memaccess_warning): Bail if source
2667 or destination is an error.
2668
ace83db0
JJ
26692018-11-28 Jakub Jelinek <jakub@redhat.com>
2670
2671 PR c++/88215
2672 * c-ubsan.c: Include langhooks.h.
2673 (ubsan_instrument_division): Change gcc_assert that main variants
2674 of op0 and op1 types are equal to gcc_checking_assert that the
2675 main variants are compatible types.
2676
da193a27
EB
26772018-11-27 Eric Botcazou <ebotcazou@adacore.com>
2678
2679 * c-ada-spec.c: Include stringpool.h.
2680 (has_static_fields): Return false for incomplete types.
2681 (is_tagged_type): Likewise.
2682 (has_nontrivial_methods): Likewise.
2683 (dump_ada_node) <INTEGER_TYPE>: Deal specifically with __int128.
2684 (struct overloaded_name_hash): New structure.
2685 (struct overloaded_name_hasher): Likewise.
2686 (overloaded_names): New global variable.
2687 (init_overloaded_names): New static function.
2688 (overloaded_name_p): New predicate.
2689 (dump_ada_declaration) <TYPE_DECL>: Tidy up and set TREE_VISITED
2690 on the TYPE_STUB_DECL of the original type of a typedef, if any.
2691 <FUNCTION_DECL>: Bail out for an unsupported overloaded name.
2692 Remove always-true condition and dump forward types.
2693 (dump_ada_specs): Delete overloaded_names.
2694
98f08eb8
MS
26952018-11-20 Martin Sebor <msebor@redhat.com>
2696
2697 * c-attribs.c (type_for_vector_size): New function.
2698 (type_valid_for_vector_size): Same.
2699 (handle_vector_size_attribute): Move code to the functions above
2700 and call them.
2701 (validate_attribute, has_attribute): New functions.
2702 * c-common.h (has_attribute): Declare.
2703 (rid): Add RID_HAS_ATTRIBUTE_EXPRESSION.
2704 * c-common.c (c_common_resword): Same.
2705
2674fa47
JM
27062018-11-16 Jason Merrill <jason@redhat.com>
2707
2708 * c-lex.c (c_common_has_attribute): Handle likely/unlikely.
2709 * c-attribs.c (attr_cold_hot_exclusions): Make public.
2710
258b3854
JJ
27112018-11-16 Jakub Jelinek <jakub@redhat.com>
2712
2713 PR middle-end/87854
2714 * c-common.c (fix_string_type): Reject string literals larger than
2715 TYPE_MAX_VALUE (ssizetype) bytes.
2716
1d249509
MS
27172018-11-15 Martin Sebor <msebor@redhat.com>
2718
2719 PR c++/87541
2720 PR c++/87542
2721 * c-attribs.c (positional_argument): New function.
2722 (handle_alloc_size_attribute): Use it and simplify.
2723 (handle_alloc_align_attribute): Same.
2724 (handle_assume_aligned_attribute): Same.
2725 (handle_nonnull_attribute): Same.
2726 * c-common.c (check_function_arguments): Pass fntype to
2727 check_function_format.
2728 * c-common.h (check_function_format): Add an argument.
2729 (PosArgFlags, positional_argument): Declare new type and function.
2730 * c-format.c (decode_format_attr): Add arguments.
2731 (check_format_string, get_constant): Same.
2732 (convert_format_name_to_system_name): Adjust.
2733
478dd60d
DM
27342018-11-15 David Malcolm <dmalcolm@redhat.com>
2735
2736 PR other/19165
2737 * c-opts.c (c_diagnostic_finalizer): Add diagnostic_t param.
2738
8cca0163
JJ
27392018-11-14 Jakub Jelinek <jakub@redhat.com>
2740
8ee09943
JJ
2741 P1236R1 - Signed integers are two's complement
2742 * c-warn.c (maybe_warn_shift_overflow): Don't warn for c++2a.
2743 * c-ubsan.c (ubsan_instrument_shift): Make signed shifts
2744 with in-range second operand well defined for -std=c++2a.
2745
8cca0163
JJ
2746 PR other/88007
2747 * c-common.c (parse_optimize_options): Allocate option string from
2748 opts_obstack rather than as GC memory. Move the allocation after
2749 warning for invalid option.
2750
620e594b
DM
27512018-11-13 David Malcolm <dmalcolm@redhat.com>
2752
2753 * c-common.c (c_get_substring_location): Update for renaming of
2754 get_source_location_for_substring to get_location_within_string.
2755 * c-lex.c: Replace "source_location" with "location_t".
2756 * c-opts.c: Likewise.
2757 * c-ppoutput.c: Likewise.
2758
f9731de3
MS
27592018-11-13 Martin Sebor <msebor@redhat.com>
2760
2761 PR middle-end/81824
2762 * c-attribs.c (handle_copy_attribute): Exclude inlining attributes.
2763 (handle_tls_model_attribute): Improve diagnostics.
2764
e4bd6d5e
JM
27652018-11-12 Jason Merrill <jason@redhat.com>
2766
a6bb6b07
JM
2767 * c-cppbuiltin.c (c_cpp_builtins): Define
2768 __cpp_impl_destroying_delete.
2769
e4bd6d5e
JM
2770 * c-cppbuiltin.c (c_cpp_builtins): Change __cpp_explicit_bool to
2771 __cpp_conditional_explicit.
2772
79a2c428
MS
27732018-11-09 Martin Sebor <msebor@redhat.com>
2774
2775 PR middle-end/81824
2776 * c-attribs.c (handle_copy_attribute): New function.
2777
4c7bd361
MS
27782018-11-09 Martin Sebor <msebor@redhat.com>
2779
2780 PR c/87795
2781 * c-common.c (check_user_alignment): Use MAX_OFILE_ALIGNMENT.
2782
28567c40
JJ
27832018-11-08 Jakub Jelinek <jakub@redhat.com>
2784
2785 * c-common.h (c_finish_omp_taskgroup): Add CLAUSES argument.
2786 (c_finish_omp_atomic): Replace bool SEQ_CST argument with
2787 enum omp_memory_order MEMORY_ORDER.
2788 (c_finish_omp_flush): Add MO argument.
2789 (c_omp_depend_t_p, c_finish_omp_depobj): Declare.
2790 (c_finish_omp_for): Add FINAL_P argument.
2791 * c-omp.c: Include memmodel.h.
2792 (c_finish_omp_taskgroup): Add CLAUSES argument. Set
2793 OMP_TASKGROUP_CLAUSES to it.
2794 (c_finish_omp_atomic): Replace bool SEQ_CST argument with
2795 enum omp_memory_order MEMORY_ORDER. Set OMP_ATOMIC_MEMORY_ORDER
2796 instead of OMP_ATOMIC_SEQ_CST.
2797 (c_omp_depend_t_p, c_finish_omp_depobj): New functions.
2798 (c_finish_omp_flush): Add MO argument, if not MEMMODEL_LAST, emit
2799 __atomic_thread_fence call with the given value.
2800 (check_omp_for_incr_expr): Formatting fixes.
2801 (c_finish_omp_for): Add FINAL_P argument. Allow NE_EXPR
2802 even in OpenMP loops, diagnose if NE_EXPR and incr expression
2803 is not constant expression 1 or -1. Transform NE_EXPR loops
2804 with iterators pointers to VLA into LT_EXPR or GT_EXPR loops.
2805 (c_omp_check_loop_iv_r): Look for orig decl of C++ range for
2806 loops too.
2807 (c_omp_split_clauses): Add support for combined
2808 #pragma omp parallel master and
2809 #pragma omp {,parallel }master taskloop{, simd} constructs.
2810 Handle OMP_CLAUSE_IN_REDUCTION. Handle OMP_CLAUSE_REDUCTION_TASK.
2811 Handle OMP_CLAUSE_NONTEMPORAL. Handle splitting OMP_CLAUSE_IF
2812 also to OMP_SIMD. Copy OMP_CLAUSE_LASTPRIVATE_CONDITIONAL.
2813 (c_omp_predetermined_sharing): Don't return
2814 OMP_CLAUSE_DEFAULT_SHARED for const qualified decls.
2815 * c-pragma.c (omp_pragmas): Add PRAGMA_OMP_DEPOBJ and
2816 PRAGMA_OMP_REQUIRES.
2817 * c-pragma.h (enum pragma_kind): Likewise.
2818 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_NONTEMPORAL
2819 and PRAGMA_OMP_CLAUSE_{IN,TASK}_REDUCTION.
2820
204839e7
DM
28212018-11-08 David Malcolm <dmalcolm@redhat.com>
2822
2823 * c-format.c (gcc_dump_printf_char_table): Add entry for %f.
2824
d8010ee4
DM
28252018-11-08 David Malcolm <dmalcolm@redhat.com>
2826
2827 * c-format.c (local_cgraph_node_ptr_node): New variable.
2828 (gcc_dump_printf_char_table): Add entry for %C.
2829 (get_pointer_to_named_type): New function, taken from the handling
2830 code for "gimple *" from...
2831 (init_dynamic_diag_info): ...here. Add handling for
2832 "cgraph_node *".
2833 * c-format.h (T_CGRAPH_NODE): New.
2834
4be5c72c
JM
28352018-10-19 Jason Merrill <jason@redhat.com>
2836
2837 * c-cppbuiltin.c (c_cpp_builtins): Add
2838 __cpp_nontype_template_parameter_class.
2839
f3f6029d
NS
28402018-10-31 Nathan Sidwell <nathan@acm.org>
2841
ab5324fb
NS
2842 * c-opts.c (c_finish_options): Force command line macro
2843 location. Refactor to avoid repeating main debug hook.
2844 (push_command_line_include): Clarify comment.
2845
f3f6029d
NS
2846 * c-opts.c (c_finish_options): Adjust cpp_force_token_locations call.
2847
91e3ec29
MS
28482018-10-30 Martin Sebor <msebor@redhat.com>
2849
2850 PR middle-end/87041
2851 * c-format.c (check_format_types): Avoid diagnosing null pointer
2852 arguments to printf-family of functions.
2853
b5ff4f5c
MP
28542018-10-30 Marek Polacek <polacek@redhat.com>
2855
2856 Implement P0892R2, explicit(bool).
2857 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_explicit_bool.
2858
7e2de6df
DM
28592018-10-29 David Malcolm <dmalcolm@redhat.com>
2860
2861 * name-hint.h (name_hint::take_deferred): New member function.
2862
b2bf438c
DM
28632018-10-29 David Malcolm <dmalcolm@redhat.com>
2864
2865 PR c++/56856
2866 * c-common.c (check_function_sentinel): Call fold_for_warn on the
2867 argument.
2868 (check_function_restrict): Rename param "argarray" to
2869 "unfolded_argarray", and make a copy named "argarray", calling
2870 fold_for_warn on each argument.
2871 (check_function_arguments): Add note about responsibility for
2872 folding the arguments.
2873
9f936c86
JM
28742018-10-17 Joseph Myers <joseph@codesourcery.com>
2875
2876 * c-common.c (flag_isoc2x): New variable.
2877 * c-common.h (clk_c): Update comment to reference C2X.
2878 (flag_isoc99, flag_isoc11): Update comments to reference future
2879 standard versions in general.
2880 (flag_isoc2x): Declare.
2881 * c-opts.c (set_std_c2x): New function.
2882 (c_common_handle_option): Handle -std=c2x and -std=gnu2x.
2883 (set_std_c89, set_std_c99, set_std_c11, set_std_c17): Set
2884 flag_isoc2x to 0.
2885 * c.opt (Wc11-c2x-compat, std=c2x, std=gnu2x): New options.
2886
7a8a92c4
JM
28872018-10-17 Joseph Myers <joseph@codesourcery.com>
2888
2889 * c.opt (std=c17, std=c18, std=gnu17, std=gnu18, std=iso9899:2017)
2890 (std=iso9899:2018): Document C17 as published in 2018.
2891
4dc003ff
CL
28922018-10-12 Christophe Lyon <christophe.lyon@linaro.org>
2893
2894 PR c++/87364
2895 * c-pretty-print.c (c_pretty_printer::constant): Fix typo.
2896
79371671
WW
28972018-10-11 Will Wray <wjwray@gmail.com>
2898
2899 PR c++/87364
2900 * c-pretty-print.h (pp_c_type_cast): Prototype.
2901 (pp_c_integer_constant): Likewise.
2902 * c-pretty-print.c (pp_c_type_cast): No longer static.
2903 (pp_c_integer_constant): Likewise.
2904 (pp_c_enumeration_constant): Fix loop termination when finding
2905 name of constant. No longer returns a value. Call
2906 pp_c_integer_constant.
2907 (c_pretty_printer::constant): Update for changes to
2908 pp_c_enumeration_constant.
2909
46c62690
JJ
29102018-10-11 Jakub Jelinek <jakub@redhat.com>
2911
2912 * c-lex.c (c_common_has_attribute): Return 201803 instead of 20180312
2913 for no_unique_address.
2914
c24300ba
DM
29152018-10-09 David Malcolm <dmalcolm@redhat.com>
2916
2917 * c-common.c (c_option_controlling_cpp_error): Rename to...
2918 (c_option_controlling_cpp_diagnostic): ...this, and convert
2919 "reason" from int to enum.
2920 (c_cpp_error): Rename to...
2921 (c_cpp_diagnostic): ...this, converting level and reason to enums.
2922 * c-common.h (c_cpp_error): Rename to...
2923 (c_cpp_diagnostic): ...this, converting level and reason to enums.
2924 * c-opts.c (c_common_init_options): Update for renaming.
2925
8656dafa
RS
29262018-10-08 Richard Sandiford <richard.sandiford@arm.com>
2927
2928 PR c/87286
2929 * c-common.c (vector_types_compatible_elements_p): Use
2930 INTEGRAL_TYPE_P instead of checking only for INTEGER_TYPE.
2931
8cff0652
VK
29322018-10-04 Vinay Kumar <vinay.kumar@blackfigtech.com>
2933
2934 * c-attribs.c (get_priority): Add a warning flag warn_prio_ctor_dtor
2935 to generate constructor destructor priority warning.
2936 * c.opt (-Wprio-ctor-dtor): New option.
2937
bedf03a2
JM
29382018-10-01 Jason Merrill <jason@redhat.com>
2939
2940 * c-lex.c (c_common_has_attribute): Add no_unique_address.
2941
6cc430c1
EB
29422018-10-01 Eric Botcazou <ebotcazou@adacore.com>
2943
2944 * c-ada-spec.c (get_underlying_decl): Get to the main type variant.
2945 (dump_ada_node): Add const keyword.
2946
87677ac7
ML
29472018-09-25 Martin Liska <mliska@suse.cz>
2948
2949 * c-common.c (c_common_truthvalue_conversion):
2950 Remove Pascal from documentation.
2951
518196cb
EB
29522018-09-21 Eric Botcazou <ebotcazou@adacore.com>
2953
2954 * c-ada-spec.c: Include diagnostic.h.
2955 (dump_ada_declaration) <RECORD_TYPE>: Issue a warning on packed layout.
2956
a599af84
MP
29572018-09-19 Marek Polacek <polacek@redhat.com>
2958
2959 * c.opt (Wclass-conversion): New.
2960
9c4a4b3c
DM
29612018-09-17 David Malcolm <dmalcolm@redhat.com>
2962
2963 * c-format.c (range_label_for_format_type_mismatch::get_text):
2964 Update for new param.
2965
c896ecfe
DM
29662018-09-17 David Malcolm <dmalcolm@redhat.com>
2967
2968 * c-format.c (format_warning_at_char): Update for introduction of
2969 format_string_diagnostic_t.
2970 (format_type_warning): Likewise.
2971
80c6d1f4
MJ
29722018-09-17 Martin Jambor <mjambor@suse.cz>
2973
2974 PR c/63886
2975 * c.opt (Wabsolute-value): New.
2976
6d900107
BE
29772018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
2978
2979 * c-common.c (complete_flexible_array_elts): New helper function.
2980 * c-common.h (complete_flexible_array_elts): Declare.
2981
b5764229
BE
29822018-09-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
2983
2984 * c-common.c (braced_list_to_string): Remove eval parameter.
2985 Add some more checks. Always create zero-terminated STRING_CST.
2986 * c-common.h (braced_list_to_string): Adjust prototype.
2987
85204e23
DM
29882018-08-27 David Malcolm <dmalcolm@redhat.com>
2989
2990 PR 87091
2991 * c-common.c (c_cpp_error): Update for conversion of show_caret_p
2992 to a tri-state.
2993 (maybe_suggest_missing_token_insertion): Likewise.
2994 (maybe_add_include_fixit): Add param "override_location". If set,
2995 and source-printing is enabled, then override the rich_location's
2996 primary location with that of the insertion point for the fix-it
2997 hint, marking it with SHOW_LINES_WITHOUT_RANGE.
2998 * c-common.h (extern void maybe_add_include_fixit): Add bool
2999 param.
3000 * c-format.c (selftest::test_type_mismatch_range_labels): Update
3001 for conversion of show_caret_p to a tri-state.
3002 * c-warn.c (warn_for_restrict): Likewise.
3003 * known-headers.cc
3004 (suggest_missing_header::~suggest_missing_header): Update call to
3005 maybe_add_include_fixit to suggest overriding the location, as it
3006 is for a note.
3007
3d78e008
ML
30082018-08-27 Martin Liska <mliska@suse.cz>
3009
3010 * c-common.c (check_function_restrict): Use new function
92a285c1
ML
3011 fndecl_built_in_p and remove check for FUNCTION_DECL if
3012 possible.
3d78e008
ML
3013 (check_builtin_function_arguments): Likewise.
3014 (reject_gcc_builtin): Likewise.
3015 * c-warn.c (sizeof_pointer_memaccess_warning): Likewise.
3016
b5be6d0c
MP
30172018-08-26 Marek Polacek <polacek@redhat.com>
3018
3019 PR c++/87029, Implement -Wredundant-move.
3020 * c.opt (Wredundant-move): New option.
3021
79ca9c35
MP
30222018-08-21 Marek Polacek <polacek@redhat.com>
3023
3024 PR c++/86981, Implement -Wpessimizing-move.
3025 * c.opt (Wpessimizing-move): New option.
3026
097f82ec
DM
30272018-08-20 David Malcolm <dmalcolm@redhat.com>
3028
3029 PR other/84889
3030 * c-attribs.c (common_handle_aligned_attribute): Add
3031 auto_diagnostic_group instance.
3032 * c-indentation.c (warn_for_misleading_indentation): Likewise.
3033 * c-opts.c (c_common_post_options): Likewise.
3034 * c-warn.c (warn_logical_not_parentheses): Likewise.
3035 (warn_duplicated_cond_add_or_warn): Likewise.
3036 (warn_for_multistatement_macros): Likewise.
3037
3fb558b1
NS
30382018-08-20 Nathan Sidwell <nathan@acm.org>
3039
3040 * c-ada-spec.c (macro_length, dump_ada_macros): Adjust macro parm
3041 access.
3042
800c0e98
NS
30432018-08-17 Nathan Sidwell <nathan@acm.org>
3044
3045 * c-cppbuiltin.c (struct lazy_hex_fp_value_struct): Remove macro
3046 field.
3047 (laxy_hex_fp_value_count): Make unsigned.
3048 (lazy_hex_fp_value): Provided with macro & lazy number. Directly
3049 manipulate the macro.
3050 (builtin_defin_with_hex_fp_value): Adjust callback name, use
3051 cpp_define_lazily.
3052
6f795a92
DM
30532018-08-17 David Malcolm <dmalcolm@redhat.com>
3054
3055 * c-format.c (enum format_type): Add gcc_dump_printf_format_type.
3056 (gcc_dump_printf_length_specs): New.
3057 (gcc_dump_printf_flag_pairs): New.
3058 (gcc_dump_printf_flag_specs): New.
3059 (gcc_dump_printf_char_table): New.
3060 (format_types_orig): Add entry for "gcc_dump_printf".
3061 (init_dynamic_diag_info): Set up length_char_specs and
3062 conversion_specs for gcc_dump_printf_format_type.
3063 (handle_format_attribute): Handle gcc_dump_printf_format_type.
3064
c5d725c0
NS
30652018-08-17 Nathan Sidwell <nathan@acm.org>
3066
10f04917
NS
3067 * c-ada-spec.c (macro_length, dump_ada_macros): Constify.
3068
c5d725c0
NS
3069 * c-ada-spec.c: Don't #include "cpp-id-data.h"
3070 * c-cppbuiltin.c: Likewise.
3071
c0c12356
ML
30722018-08-17 Martin Liska <mliska@suse.cz>
3073
3074 * c.opt: Remove Warn, Init and Report for options with
92a285c1
ML
3075 Ignore/Deprecated flag. Warning is done automatically for
3076 Deprecated flags.
c0c12356 3077
10fcc142
DM
30782018-08-16 David Malcolm <dmalcolm@redhat.com>
3079
3080 PR c++/70693
3081 * c-common.c (selftest::c_family_tests): Call
3082 selftest::c_indentation_c_tests.
3083 * c-common.h (selftest::c_indentation_c_tests): New decl.
3084 * c-indentation.c: Include "selftest.h".
3085 (next_tab_stop): Add "tab_width" param, rather than accessing
3086 cpp_opts.
3087 (get_visual_column): Likewise. Clarify comment. Bulletproof
3088 against reading past the end of the line.
3089 (get_first_nws_vis_column): Add "tab_width" param.
3090 (detect_intervening_unindent): Likewise.
3091 (should_warn_for_misleading_indentation): Read tab width from
3092 cpp_opts and pass around.
3093 (selftest::test_next_tab_stop): New test.
3094 (selftest::assert_get_visual_column_succeeds): New function.
3095 (ASSERT_GET_VISUAL_COLUMN_SUCCEEDS): New macro.
3096 (selftest::assert_get_visual_column_fails): New function.
3097 (ASSERT_GET_VISUAL_COLUMN_FAILS): New macro.
3098 (selftest::test_get_visual_column): New test.
3099 (selftest::c_indentation_c_tests): New function.
3100
3f6677f4
NS
31012018-08-16 Nathan Sidwell <nathan@acm.org>
3102
3103 * c-ada-spec.c (count_ada_macro): Use cpp_user_macro_p.
3104 (store_ada_macro): Likewise.
3105 * c-ppoutput.c (cb_used_define, dump_macro): Likewise.
3106 * c-spellcheck.cc (should-suggest_as_macro_p): Likewise,
3107
96e6ae57
DM
31082018-08-15 David Malcolm <dmalcolm@redhat.com>
3109
3110 * c-format.c: Include "selftest-diagnostic.h" and
3111 "gcc-rich-location.h".
3112 (format_warning_at_char): Pass NULL for new label params of
3113 format_warning_va.
3114 (class indirection_suffix): New class.
3115 (class range_label_for_format_type_mismatch): New class.
3116 (format_type_warning): Move logic for generating "*" suffix to
3117 class indirection_suffix. Create "fmt_label" and "param_label"
3118 to show their types, and pass them to the
3119 format_warning_at_substring calls.
3120 (selftest::test_type_mismatch_range_labels): New test.
3121 (selftest::c_format_c_tests): Call it.
3122
23aa9f7c
MS
31232018-08-13 Martin Sebor <msebor@redhat.com>
3124
3125 PR tree-optimization/71625
3126 * c-common.c (braced_list_to_string): New function.
3127 * c-common.h (braced_list_to_string): Declare it.
3128
f10a9135
NS
31292018-08-08 Nathan Sidwell <nathan@acm.org>
3130
3131 * c-common.c (try_to_locate_new_include_inertion_point): Use
3132 linemap_included_from_linemap.
3133 * c-lex.c (fe_file_change): Use linemap_included_from.
3134 * c-ppoutput.c (pp_file_change): Likewise.
3135
8a45b051
MS
31362018-08-01 Martin Sebor <msebor@redhat.com>
3137
3138 PR tree-optimization/86650
ab20d992 3139 * c-format.c (gcc_tdiag_char_table): Update comment for "%G".
8a45b051
MS
3140 (gcc_cdiag_char_table, gcc_cxxdiag_char_table): Same.
3141 (init_dynamic_diag_info): Update from "gcall *" to "gimple *".
3142 * c-format.h (T89_G): Update to be "gimple *" rather than
3143 "gcall *".
3144 (local_gcall_ptr_node): Rename...
3145 (local_gimple_ptr_node): ...to this.
3146
e540ccc0
DM
31472018-07-31 David Malcolm <dmalcolm@redhat.com>
3148
3149 * c-format.c (PP_FORMAT_CHAR_TABLE): New macro, based on existing
3150 table entries for gcc_diag_char_table, and the 'Z' entry from
3151 gcc_tdiag_char_table, changing the "chain" entry for 'Z' from
3152 &gcc_tdiag_char_table[0] to &gcc_diag_char_table[0].
3153 (gcc_diag_char_table): Use PP_FORMAT_CHAR_TABLE, implicitly
3154 adding missing "Z" for this table. Remove erroneous "G" and "K"
3155 entries.
3156 (gcc_tdiag_char_table): Use PP_FORMAT_CHAR_TABLE. Remove "v".
3157 (gcc_cdiag_char_table): Use PP_FORMAT_CHAR_TABLE.
3158 (gcc_cxxdiag_char_table): Use PP_FORMAT_CHAR_TABLE. Remove "v".
3159
425fc685
RE
31602018-07-31 Richard Earnshaw <rearnsha@arm.com>
3161
3162 * c-common.c (speculation_safe_resolve_call): New function.
3163 (speculation_safe_resolve_params): New function.
3164 (speculation_safe_resolve_return): New function.
3165 (resolve_overloaded_builtin): Handle __builtin_speculation_safe_value.
3166 * c-cppbuiltin.c (c_cpp_builtins): Add pre-define for
3167 __HAVE_SPECULATION_SAFE_VALUE.
3168
181463c2
DM
31692018-07-20 David Malcolm <dmalcolm@redhat.com>
3170
3171 * c-common.c (c_cpp_error): Remove redundant "line_table"
3172 parameter from call to rich_location::set_range.
3173 (maybe_suggest_missing_token_insertion): Likewise.
3174
0d7f9065
MS
31752018-07-20 Martin Sebor <msebor@redhat.com>
3176
3177 PR middle-end/82063
ab20d992 3178 * c.opt (-Warray-bounds): Remove redundant -Wall.
0d7f9065 3179
00abf86c
MS
31802018-07-20 Martin Sebor <msebor@redhat.com>
3181
3182 PR middle-end/82063
3183 * c-common.h (c_common_handle_option): Change function argument
3184 to HOST_WIDE_INT.
3185 * c-opts.c (c_common_init_options): Same.
3186 (c_common_handle_option): Same. Remove special handling of
3187 OPT_Walloca_larger_than_ and OPT_Wvla_larger_than_.
3188 * c.opt (-Walloc-size-larger-than, -Walloca-larger-than): Change
3189 options to take a HOST_WIDE_INT argument and accept a byte-size
3190 suffix. Initialize.
3191 (-Wvla-larger-than): Same.
3192 (-Wno-alloc-size-larger-than, -Wno-alloca-larger-than): New.
3193 (-Wno-vla-larger-than): Same.
3194
9b452033
JJ
31952018-07-12 Jakub Jelinek <jakub@redhat.com>
3196
3197 * c-attribs.c (c_common_attribute_table): Add
3198 "omp declare target implicit" attribute.
3199
cd0762f3
RB
32002018-07-12 Richard Biener <rguenther@suse.de>
3201
3202 PR c/86453
3203 * c-attribs.c (handle_packed_attribute): Do not build a variant
3204 type with TYPE_PACKED, instead ignore the attribute if we may
3205 not apply to the original type.
3206
0b27c3ed
JJ
32072018-07-10 Jakub Jelinek <jakub@redhat.com>
3208
3209 PR c++/86443
3210 * c-omp.c (c_omp_check_loop_iv_r, c_omp_check_loop_iv): Allow declv
3211 to contain TREE_LIST for both the original class iterator and the
3212 "last" helper var.
3213
e730a0ef
EB
32142018-07-07 Eric Botcazou <ebotcazou@adacore.com>
3215
3216 * c-ada-spec.c (to_ada_name): Remove index parameter.
3217 (pp_ada_tree_identifier): Likewise.
3218 (dump_ada_macros): Adjust call to to_ada_name.
3219 (struct overloaded_name_hash): Delete.
3220 (struct overloaded_name_hasher): Likewise.
3221 (overloaded_names): Likewise.
3222 (compute_overloading_index): Likewise.
3223 (dump_ada_decl_name): Do not call compute_overloading_index and
3224 adjust calls to pp_ada_tree_identifier.
3225 (dump_ada_double_name): Adjust calls to pp_ada_tree_identifier.
3226 (dump_ada_import): Add spc parameter and switch to aspect syntax.
3227 (dump_ada_function_declaration): Adjust call to pp_ada_tree_identifier.
3228 (dump_ada_enum_type): Remove type and display_convention parameters.
3229 Adjust calls to pp_ada_tree_identifier.
3230 (dump_ada_node): Likewise and for dump_ada_structure.
3231 (dump_nested_type) <ENUMERAL_TYPE>: Adjust call to dump_ada_enum_type
3232 and tidy up.
3233 <RECORD_TYPE>: Adjust call to dump_ada_structure and switch to aspect
3234 syntax.
3235 (print_constructor): Adjust call to pp_ada_tree_identifier.
3236 (print_destructor): Likewise.
3237 (dump_ada_declaration): Switch to aspect syntax.
3238 (dump_ada_structure): Likewise and tidy up. Replace display_convention
3239 parameter with nested parameter.
3240 (dump_ads): Emit pragma Ada_2012 in lieu of pragma Ada_2005.
3241 (dump_ada_specs): Do not delete overloaded_names table.
3242
8de583fc
PB
32432018-07-06 Peter Bergner <bergner@linux.ibm.com>
3244
3245 PR target/86324
e730a0ef 3246 * c-attribs.c (handle_mode_attribute): Call translate_mode_attribute
8de583fc
PB
3247 target hook.
3248
09cff37b
NS
32492018-07-05 Nathan Sidwell <nathan@acm.org>
3250
3251 * c-lex.c (fe_file_change): Check SYSTEM_IMPLICIT_EXTERN_C not
3252 NO_IMPLICIT_EXTERN_C.
3253
98086b2b
ML
32542018-06-28 Martin Liska <mliska@suse.cz>
3255
3256 * cppspec.c: Include opt-suggestions.h.
3257
ab20d992
JJ
32582018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
3259 Thomas Schwinge <thomas@codesourcery.com>
829c6349
CLT
3260 Cesar Philippidis <cesar@codesourcery.com>
3261
3262 * c-pragma.h (enum pragma_omp_clause): Add
3263 PRAGMA_OACC_CLAUSE_{FINALIZE,IF_PRESENT}. Remove
3264 PRAGMA_OACC_CLAUSE_PRESENT_OR_{COPY,COPYIN,COPYOUT,CREATE}.
3265
f41b7612
JJ
32662018-06-20 Jakub Jelinek <jakub@redhat.com>
3267
3268 PR c++/86210
3269 * c-common.c (check_nonnull_arg): Use fold_for_warn. Adjust obsolete
3270 comment.
3271
4252ccd7
MS
32722018-06-18 Martin Sebor <msebor@redhat.com>
3273
3274 PR middle-end/85602
3275 * c-warn.c (sizeof_pointer_memaccess_warning): Check for attribute
3276 nonstring.
3277
e197e64e
KV
32782018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
3279
3280 * c-common.c (c_common_truthvalue_conversion): Handle ABSU_EXPR.
3281
34a7a230
JM
32822018-06-13 Jason Merrill <jason@redhat.com>
3283
5cef3733
JM
3284 * c-opts.c (c_common_post_options): Warn about useless -Wabi.
3285 (c_common_handle_option) [OPT_Wabi_]: Remove flag_abi_compat_version
3286 handling.
3287
34a7a230
JM
3288 PR c++/86094 - wrong code with defaulted move ctor.
3289 * c-opts.c (c_common_post_options): Bump the current ABI version to
3290 13. Set warn_abi_version and flag_abi_compat_version to the current
3291 version rather than 0. Fix defaulting flag_abi_compat_version from
3292 warn_abi_version.
3293
bb0f14ae
MS
32942018-06-12 Martin Sebor <msebor@redhat.com>
3295
3296 PR c/85931
3297 * c-warn.c (sizeof_pointer_memaccess_warning): Avoid warning when
3298 sizeof source and destination yields the same value.
3299
3713f2e2
ML
33002018-06-12 Martin Liska <mliska@suse.cz>
3301
3302 * c.opt: Make MPX-related options as Deprecated.
3303
4af78ef8
DM
33042018-06-08 David Malcolm <dmalcolm@redhat.com>
3305
3306 * c-pretty-print.c (c_pretty_printer::statement): Use TDF_NONE
3307 rather than 0.
3308
31db0fe0
ML
33092018-06-08 Martin Liska <mliska@suse.cz>
3310
3311 * c-attribs.c (handle_bnd_variable_size_attribute): Remove support
3312 for MPX (macros, related functions, fields in cgraph_node, ...).
3313 (handle_bnd_legacy): Likewise.
3314 (handle_bnd_instrument): Likewise.
3315 * c.opt: Likewise.
3316
fe16acf2
JJ
33172018-06-06 Jakub Jelinek <jakub@redhat.com>
3318
3319 PR c++/86068
3320 * c-cppbuiltin.c (c_cpp_builtins): Fix a typo, set
3321 __cpp_transactional_memory to 201500 instead of 210500.
3322
4dbdb49b
JM
33232018-06-06 Jason Merrill <jason@redhat.com>
3324
3325 PR c++/85710 - ICE with -Wmemset-elt-size.
3326 * c-warn.c (warn_for_memset): Don't crash on incomplete element type.
3327
f8ad043f
JM
33282018-06-01 Jason Merrill <jason@redhat.com>
3329
3330 * c-cppbuiltin.c (c_cpp_builtins): Bump __cpp_deduction_guides to
3331 201703.
3332
abc24d93
EB
33332018-06-01 Eric Botcazou <ebotcazou@adacore.com>
3334
3335 * c-ada-spec.c (dump_ada_declaration) <TYPE_DECL>: Generate a forward
3336 declaration for a typedef independently of whether the declaration of
3337 the subtype is generated.
3338
d258f4aa
MS
33392018-05-31 Martin Sebor <msebor@redhat.com>
3340
3341 PR c/82063
3342 * c.opt (-Wno-alloc-size-larger-than): New option.
3343
b67b9225
DP
33442018-04-22 David Pagan <dave.pagan@oracle.com>
3345
3346 PR c/55976
3347 * c-opts.c (c_common_post_options): Set default for warn_return_type
ab20d992 3348 for C++/C++ with ObjC extensions only. For C, makes it possible to
b67b9225
DP
3349 differentiate between default (no option), -Wreturn-type, and
3350 -Wno-return-type.
3351
04eb9c55
JM
33522018-05-29 Jason Merrill <jason@redhat.com>
3353
3354 * c.opt (Winit-list-lifetime): New flag.
3355
b0c31bc6
BE
33562018-05-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
3357
3358 * c-lex.c (get_fileinfo): Use splay_tree_compare_strings and
3359 splay_tree_delete_pointers.
3360
44284983
JJ
33612018-05-26 Jakub Jelinek <jakub@redhat.com>
3362
3363 PR bootstrap/85921
3364 * c-warn.c (diagnose_mismatched_attributes): Remove unnecessary
3365 noinline variable to workaround broken kernel headers.
3366
b46b715d
JM
33672018-05-18 Jason Merrill <jason@redhat.com>
3368
3369 * c.opt (Wdeprecated-copy): New flag.
3370
40659769
ML
33712018-05-17 Martin Liska <mliska@suse.cz>
3372
3373 * c-warn.c (overflow_warning): Do not use
3374 space in between 'G_' and '('.
3375
403962ea
JM
33762018-05-09 Jason Merrill <jason@redhat.com>
3377
3378 * c-common.c (valid_array_size_p): Add complain parameter.
3379 * c-common.h: ...which defaults to true.
3380
1c9ee609
JJ
33812018-05-11 Jakub Jelinek <jakub@redhat.com>
3382
3383 PR c/85696
3384 * c-omp.c (c_omp_predetermined_sharing): Return
3385 OMP_CLAUSE_DEFAULT_SHARED for artificial vars with integral type.
3386
19916065
ML
33872018-05-11 Martin Liska <mliska@suse.cz>
3388
92a285c1 3389 PR sanitizer/85556
19916065
ML
3390 * c-attribs.c (handle_no_sanitize_attribute): Iterate all
3391 TREE_LIST values.
3392
79e7b1fe
JJ
33932018-05-10 Jakub Jelinek <jakub@redhat.com>
3394
3395 PR c++/85662
3396 * c-common.h (fold_offsetof_1): Removed.
3397 (fold_offsetof): Add TYPE argument defaulted to size_type_node and
3398 CTX argument defaulted to ERROR_MARK.
3399 * c-common.c (fold_offsetof_1): Renamed to ...
3400 (fold_offsetof): ... this. Remove wrapper function. Add TYPE
3401 argument, convert the pointer constant to TYPE and use size_binop
3402 with PLUS_EXPR instead of fold_build_pointer_plus if type is not
3403 a pointer type. Adjust recursive calls.
3404
86c12f76
EB
34052018-05-10 Eric Botcazou <ebotcazou@adacore.com>
3406
3407 PR c++/85400
3408 * c-attribs.c (handle_visibility_attribute): Do not set no_add_attrs.
3409
ee336e84
NS
34102018-05-07 Nathan Sidwell <nathan@acm.org>
3411
3412 * c.opt (ffor-scope): Remove functionality, issue warning.
3413
6c072e21
NS
34142018-05-03 Nathan Sidwell <nathan@acm.org>
3415
3416 * c.opt (ffriend-injection): Remove functionality, issue warning.
3417
2cc7d3a7
DM
34182018-05-01 David Malcolm <dmalcolm@redhat.com>
3419
3420 PR c/84258
3421 * c-format.c (struct format_check_results): Add field
3422 "number_non_char".
3423 (check_format_info): Initialize it, and warn if encountered.
3424 (check_format_arg): Distinguish between wide char and
3425 everything else when detecting arrays of non-char.
3426
7761dfbe
DM
34272018-04-30 David Malcolm <dmalcolm@redhat.com>
3428
3429 * c-format.c (get_corrected_substring): Update for
3430 location_get_source_line returning a char_span. Use a char_span
3431 when handling the prefix of the correction.
3432 * c-indentation.c (get_visual_column): Update for
3433 location_get_source_line returning a char_span.
3434 (get_first_nws_vis_column): Likewise.
3435
62e98ef1
DM
34362018-03-29 David Malcolm <dmalcolm@redhat.com>
3437
3438 PR c++/84269
3439 * known-headers.cc (get_stdlib_header_for_name): Add various names
3440 from <assert.h>, <string.h>, and <memory.h>; add more names from
3441 <stdio.h>.
3442
a7dea617
JJ
34432018-03-27 Jakub Jelinek <jakub@redhat.com>
3444
3445 PR c++/85061
3446 * c-common.c (fold_offsetof_1) <case COMPOUND_EXPR>: Assert that
3447 get_base_address of the second operand is a VAR_P, rather than the
3448 operand itself, and use gcc_checking_assert instead of gcc_assert.
3449
889a3a30
MP
34502018-03-23 Marek Polacek <polacek@redhat.com>
3451
3452 PR c++/85045
3453 * c-pretty-print.c (c_pretty_printer::multiplicative_expression)
3454 <case RDIV_EXPR>: Tweak condition.
3455
452154b9
EB
34562018-03-20 Eric Botcazou <ebotcazou@adacore.com>
3457
3458 * c-ada-spec.c (pp_ada_tree_identifier): Deal specifically with _Bool.
3459
63ecb626
JJ
34602018-03-16 Jakub Jelinek <jakub@redhat.com>
3461
ce811fc4
JJ
3462 PR c/84909
3463 * c-warn.c (conversion_warning): Replace "to to" with "to" in
3464 diagnostics.
3465
63ecb626
JJ
3466 PR c/84910
3467 * c-warn.c (diagnose_mismatched_attributes): Remove trailing space from
3468 diagnostics.
3469
a1295eec
RB
34702018-03-16 Richard Biener <rguenther@suse.de>
3471
3472 PR c/84873
3473 * c-gimplify.c (c_gimplify_expr): Revert previous change. Instead
3474 unshare the possibly folded expression.
3475
919674fb
RB
34762018-03-15 Richard Biener <rguenther@suse.de>
3477
3478 PR c/84873
3479 * c-gimplify.c (c_gimplify_expr): Do not fold expressions.
3480
f99309b2
MS
34812018-03-13 Martin Sebor <msebor@redhat.com>
3482
3483 PR tree-optimization/84725
3484 * c-attribs.c (handle_nonstring_attribute): Allow attribute nonstring
3485 with all three narrow character types, including their qualified forms.
3486
e9b9fa4c
MS
34872018-03-12 Martin Sebor <msebor@redhat.com>
3488
3489 PR tree-optimization/83456
ab20d992 3490 * c-common.c (check_function_restrict): Return bool.
e9b9fa4c
MS
3491 Restore checking of bounded built-in functions.
3492 (check_function_arguments): Also return the result
3493 of warn_for_restrict.
ab20d992
JJ
3494 * c-common.c (check_function_restrict): Return bool.
3495 * c-warn.c (warn_for_restrict): Return bool.
e9b9fa4c 3496
0805d020
MP
34972018-03-02 Marek Polacek <polacek@redhat.com>
3498
3499 PR c++/84171
3500 * c-warn.c (warn_for_sign_compare): Bail out if any of the operands
3501 is erroneous.
3502
ed2a2f08
TS
35032018-03-02 Thomas Schwinge <thomas@codesourcery.com>
3504
3505 * c-attribs.c (c_common_attribute_table): Remove "cilk simd
3506 function".
3507
90abdde0
MP
35082018-03-01 Marek Polacek <polacek@redhat.com>
3509
3510 PR c++/84639
3511 * c-attribs.c (common_handle_aligned_attribute): Don't use invalid
3512 alignment in computation.
3513
c6db43fa
EB
35142018-02-28 Eric Botcazou <ebotcazou@adacore.com>
3515
3516 * c-ada-spec.c (dump_ada_node) <NULLPTR_TYPE>: New case.
3517 <REAL_TYPE>: Deal specifically with _Float128/__float128.
3518
9e25c7ed
EB
35192018-02-28 Eric Botcazou <ebotcazou@adacore.com>
3520
3521 * c-ada-spec.c (dump_ada_double_name) <ENUMERAL_TYPE>: New case.
3522 (is_char_array): Take a type instead of a declaration.
3523 (dump_ada_array_type): Likewise.
3524 (is_simple_enum): Minor tweak.
3525 (dump_ada_enum_type): New function extracted from...
3526 (dump_ada_node) <ENUMERAL_TYPE>: ...here. Invoke it.
3527 <INTEGER_TYPE>: Remove unreachable code.
3528 <RECORD_TYPE>: Likewise. Minor tweaks.
3529 (dump_nested_type) <ARRAY_TYPE>: Adjust to above changes.
3530 <ENUMERAL_TYPE>: New case.
3531 <RECORD_TYPE>: Factor out common code.
3532 (dump_ada_declaration) <ARRAY_TYPE>: Adjust to above changes.
3533 Minor tweaks. Deal with enumeral types.
3534 (dump_ada_structure): Minor tweaks.
3535
09de3550
EB
35362018-02-28 Eric Botcazou <ebotcazou@adacore.com>
3537
3538 * c-ada-spec.c (dump_ada_node) <POINTER_TYPE>: Do not use generic
3539 address for incomplete structures.
3540 (dump_forward_type): Do not bail out for incomplete structures.
3541 (dump_ada_declaration): Do not special-case incomplete structures
3542 for subtypes. Dump them as null records for types.
3543
095d8d4b
EB
35442018-02-28 Eric Botcazou <ebotcazou@adacore.com>
3545
3546 * c-ada-spec.c (dump_ada_import): Use boolean and fix formatting.
3547 (is_char_array): Fix formatting.
3548 (dump_template_types): Likewise.
3549 (dump_generic_ada_node): Rename into...
3550 (dump_ada_node): ...this.
3551 <POINTER_TYPE>: Remove superfluous space. Use generic address for
3552 incomplete structures and not for empty structures. Do not use it
3553 when forward declarations are needed.
3554 (dump_forward_type): New function.
3555 (dump_nested_types): Remove FORWARD parameter. Do not consider
3556 TREE_VISITED and do not generate a forward declaration. Only dump
3557 original nested types for nested declaration.
3558 (dump_nested_type) <POINTER_TYPE>: Call dump_forward_type.
3559 <ARRAY_TYPE>: Likewise if the component type is an anonymous pointer.
3560 <RECORD_TYPE>: Do not consider TREE_VISITED.
3561 (dump_ada_declaration): Use booleans and fix formatting throughout.
3562 <TYPE_DECL>: Skip incomplete structures and not empty structures.
3563 Call dump_forward_type instead of dump_nested_types for a typedef.
3564 Remove superfluous check and adjust call to dump_nested_types.
3565 <POINTER_TYPE>: Call dump_forward_type and fall through.
3566 (dump_ada_struct_decl): Rename into...
3567 (dump_ada_structure): ...this. Do not special-case empty structures.
3568
d4cfd486
MS
35692018-02-27 Martin Sebor <msebor@redhat.com>
3570
3571 PR c++/83871
3572 * c.opt (-Wmissing-attributes): New option.
3573
b22dbd03
ML
35742018-02-21 Martin Liska <mliska@suse.cz>
3575
3576 * c.opt (Wcatch-value=): Add IntegerRange.
3577
883dfe2a
JM
35782018-02-15 Jason Merrill <jason@redhat.com>
3579
3580 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_deduction_guides.
3581
0444aa9c
NS
35822018-02-09 Nathan Sidwell <nathan@acm.org>
3583
3584 PR c/84293
3585 * c-common.h (strict_aliasing_warning): Drop OTYPE arg, insert LOC
3586 arg.
3587 * c-warn.c (strict_aliasing_warning): Drop OTYPE arg, require LOC
3588 arg. Adjust.
3589
cea71f0a
MS
35902018-02-09 Martin Sebor <msebor@redhat.com>
3591
3592 PR lto/84212
3593 * c.opt (-Wstringop-overflow, -Warray-bounds): Add LTO.
3594 (-Walloc-size-larger-than, -Wformat-truncation=): Same.
3595 (-Wmaybe-uninitialized, -Wnonnull, -Wrestrict): Same.
3596 (-Wstrict-overflow, -Wsuggest-attribute): Same.
3597 (-Wuninitialized): Same.
3598
8c8b7be5
EB
35992018-02-09 Eric Botcazou <ebotcazou@adacore.com>
3600
3601 * c-ada-spec.c (dump_ada_declaration): Do not generate the 'constant'
3602 keyword for components.
3603
7c30b12a
PC
36042018-02-02 Paolo Carlini <paolo.carlini@oracle.com>
3605
3606 * c-common.h (DECL_UNNAMED_BIT_FIELD): New.
3607
eece7fe5
JK
36082018-02-02 Julia Koval <julia.koval@intel.com>
3609
3610 * c-common.h (omp_clause_mask): Move to wide_int_bitmask.h.
3611
7d07a93a
MP
36122018-01-29 Marek Polacek <polacek@redhat.com>
3613
3614 PR c/83966
3615 * c-format.c (check_function_format): Check current_function_decl.
3616
53723269
JJ
36172018-01-27 Jakub Jelinek <jakub@redhat.com>
3618
3619 * c-cppbuiltin.c (c_cpp_builtins): Use ggc_strdup for the fp_suffix
3620 argument.
3621 (LAZY_HEX_FP_VALUES_CNT): Define.
3622 (lazy_hex_fp_values): Allow up to LAZY_HEX_FP_VALUES_CNT lazy hex fp
3623 values rather than just 12.
3624 (builtin_define_with_hex_fp_value): Likewise.
3625
7365279f
BK
36262018-01-18 Boris Kolpackov <boris@codesynthesis.com>
3627
92a285c1
ML
3628 PR other/70268
3629 * c.opt (-fmacro-prefix-map): New option.
3630 * c-opts.c (c_common_handle_option): Handle it.
3631 * c-lex.c (init_c_lex): Set remap_filename cpp callback.
3632 * c-ppoutput.c (init_pp_output): Likewise.
7365279f 3633
bb9869d5
DM
36342018-01-17 David Malcolm <dmalcolm@redhat.com>
3635
3636 PR c++/83814
3637 * c-common.c (fold_for_warn): Move to c/c-fold.c and cp/expr.c.
3638
68dc87c3
EB
36392018-01-10 Eric Botcazou <ebotcazou@adacore.com>
3640
3641 * c-ada-spec.c (dump_number): Add FLOAT_P parameter.
3642 Skip 'f' and 'F' characters if it is true.
3643 (store_ada_macro): Minor tweak.
3644 (dump_ada_macros) <CPP_COMMENT>: Likewise.
3645 <CPP_WSTRING>: Likewise.
3646 <CPP_STRING>: Output '&' in the buffer if not the first string.
3647 <CPP_NUMBER>: Adjust calls to dump_number.
3648
9a004410
DM
36492018-01-10 David Malcolm <dmalcolm@redhat.com>
3650
3651 PR c++/43486
3652 * c-common.c: Include "selftest.h".
3653 (get_atomic_generic_size): Perform the test for integral type
3654 before the range test for any integer constant, fixing indentation
3655 of braces. Call fold_for_warn before testing for an INTEGER_CST.
3656 (reject_gcc_builtin): Strip any location wrapper from EXPR.
3657 (selftest::test_fold_for_warn): New function.
3658 (selftest::c_common_c_tests): New function.
3659 (selftest::c_family_tests): Call it, and
3660 selftest::c_pretty_print_c_tests.
3661 * c-common.h (selftest::c_pretty_print_c_tests): New decl.
3662 * c-format.c (check_format_arg): Convert VAR_P check to a
3663 fold_for_warn.
3664 * c-pretty-print.c: Include "selftest.h".
3665 (pp_c_cast_expression): Don't print casts for location wrappers.
3666 (selftest::assert_c_pretty_printer_output): New function.
3667 (ASSERT_C_PRETTY_PRINTER_OUTPUT): New macro.
3668 (selftest::test_location_wrappers): New function.
3669 (selftest::c_pretty_print_c_tests): New function.
3670 * c-warn.c (warn_for_memset): Call fold_for_warn on the arguments.
3671
5c0caeb3
RS
36722018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
3673 Alan Hayward <alan.hayward@arm.com>
3674 David Sherwood <david.sherwood@arm.com>
3675
3676 * c-common.c (c_common_type_for_mode): Handle MODE_VECTOR_BOOL.
3677
73a699ae
RS
36782018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
3679 Alan Hayward <alan.hayward@arm.com>
3680 David Sherwood <david.sherwood@arm.com>
3681
3682 * c-ubsan.c (ubsan_instrument_shift): Treat GET_MODE_BITSIZE
3683 as polynomial.
3684
928686b1
RS
36852018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
3686 Alan Hayward <alan.hayward@arm.com>
3687 David Sherwood <david.sherwood@arm.com>
3688
3689 * c-common.c (vector_types_convertible_p, c_build_vec_perm_expr)
3690 (convert_vector_to_array_for_subscript): Handle polynomial
3691 TYPE_VECTOR_SUBPARTS.
3692 (c_common_type_for_mode): Check valid_vector_subparts_p.
3693 * c-pretty-print.c (pp_c_initializer_list): Handle polynomial
3694 VECTOR_CST_NELTS.
3695
85ec4feb
JJ
36962018-01-03 Jakub Jelinek <jakub@redhat.com>
3697
3698 Update copyright years.
3699
170a8bd6 37002017-12-22 Mike Stump <mikestump@comcast.net>
92a285c1 3701 Eric Botcazou <ebotcazou@adacore.com>
170a8bd6
EB
3702
3703 * c-pragma.c (init_pragma): Register pragma GCC unroll.
3704 * c-pragma.h (enum pragma_kind): Add PRAGMA_UNROLL.
3705
ab20d992 37062017-12-22 Alexandre Oliva <aoliva@redhat.com>
18408e96
AO
3707
3708 PR debug/83527
3709 PR debug/83419
3710 * c-semantics.c (only_debug_stmts_after_p): New.
3711 (pop_stmt_list): Clear side effects in debug-only stmt list.
3712 Check for single nondebug stmt followed by debug stmts only.
3713
c12d20d4
AO
37142017-12-21 Alexandre Oliva <aoliva@redhat.com>
3715
3716 PR debug/83419
3717 * c-semantics.c (pop_stmt_list): Propagate side effects from
3718 single nondebug stmt to container list.
3719
01512446
JJ
37202017-12-19 Jakub Jelinek <jakub@redhat.com>
3721
3722 * known-headers.cc (get_stdlib_header_for_name): Replace Yoda
3723 conditions with typical order conditions.
3724
82cfbd01
MP
37252017-12-18 Marek Polacek <polacek@redhat.com>
3726
3727 * c-warn.c (warn_logical_operator): Return early if -Wlogical-op is
3728 not in effect.
3729
99da11ec
MS
37302017-12-17 Martin Sebor <msebor@redhat.com>
3731
3732 * c-attribs.c (common_handle_aligned_attribute): Avoid issuing
3733 an error for attribute warn_if_not_aligned.
3734
cc8bea0a
MS
37352017-12-16 Martin Sebor <msebor@redhat.com>
3736
3737 PR tree-optimization/78918
3738 * c-common.c (check_function_restrict): Avoid checking built-ins.
3739 * c.opt (-Wrestrict): Include in -Wall.
3740
4849deb1
JJ
37412017-12-15 Jakub Jelinek <jakub@redhat.com>
3742
3743 * c-attribs.c (c_common_attribute_table,
3744 c_common_format_attribute_table): Swap affects_type_identity
3745 and handler fields, adjust comments.
3746
c65e18d3
BE
37472017-12-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
3748
3749 * c.opt (Wcast-function-type): New warning option.
3750 * c-lex.c (get_fileinfo): Avoid warning.
3751 * c-ppoutput.c (scan_translation_unit_directives_only): Remove cast.
3752
2004617a
QZ
37532017-12-14 Qing Zhao <qing.zhao@oracle.com>
3754
7365279f 3755 PR middle_end/79538
2004617a
QZ
3756 * c-cppbuiltin.c (builtin_define_with_hex_fp_value):
3757 Adjust the size of buf1 and buf2, add a new buf to avoid
3758 format-overflow warning.
3759
ab20d992 37602017-12-12 Alexandre Oliva <aoliva@redhat.com>
96a95ac1
AO
3761
3762 * c-semantics.c (pop_stmt_list): Move begin stmt marker into
3763 subsequent statement list.
3764
5d9ae53d
MS
37652017-12-07 Martin Sebor <msebor@redhat.com>
3766
3767 PR c/81544
3768 PR c/81566
3769 * c-attribs.c (attr_aligned_exclusions): New array.
3770 (attr_alloc_exclusions, attr_cold_hot_exclusions): Same.
3771 (attr_common_exclusions, attr_const_pure_exclusions): Same.
3772 (attr_gnu_inline_exclusions, attr_inline_exclusions): Same.
3773 (attr_noreturn_exclusions, attr_returns_twice_exclusions): Same.
3774 (attr_warn_unused_result_exclusions): Same.
3775 (handle_hot_attribute, handle_cold_attribute): Simplify.
3776 (handle_const_attribute): Warn on function returning void.
3777 (handle_pure_attribute): Same.
3778 (handle_aligned_attribute): Diagnose conflicting attribute
3779 specifications.
3780 * c-warn.c (diagnose_mismatched_attributes): Simplify.
3781
c79144f8
DM
37822017-12-06 David Malcolm <dmalcolm@redhat.com>
3783
3784 PR c/83236
3785 * c-common.c (selftest::c_family_tests): Call
3786 selftest::c_spellcheck_cc_tests.
3787 * c-common.h (selftest::c_spellcheck_cc_tests): New decl.
3788 * c-spellcheck.cc: Include "selftest.h".
3789 (name_reserved_for_implementation_p): New function.
3790 (should_suggest_as_macro_p): New function.
3791 (find_closest_macro_cpp_cb): Move the check for NT_MACRO to
3792 should_suggest_as_macro_p and call it.
3793 (selftest::test_name_reserved_for_implementation_p): New function.
3794 (selftest::c_spellcheck_cc_tests): New function.
3795 * c-spellcheck.h (name_reserved_for_implementation_p): New decl.
3796
613bc14f
DM
37972017-12-06 David Malcolm <dmalcolm@redhat.com>
3798
3799 * c-spellcheck.cc: New file, taken from macro-handling code in
3800 spellcheck-tree.c.
3801 * c-spellcheck.h: New file, taken from macro-handling code in
3802 spellcheck-tree.h.
3803
e76c7157
JJ
38042017-12-01 Jakub Jelinek <jakub@redhat.com>
3805
3806 * c-attribs.c (c_common_attribute_table): Remove "cilk simd function"
3807 attribute.
3808 (handle_simd_attribute): Don't check for "cilk simd function"
3809 attribute. Reindent, formatting changes.
3810
b0da4034
JK
38112017-11-30 Julia Koval <julia.koval@intel.com>
3812
3813 * c-common.h (inv_list): Remove.
3814
058f0b9e
JJ
38152017-11-28 Jakub Jelinek <jakub@redhat.com>
3816
3817 PR sanitizer/81275
3818 * c-common.c (c_switch_covers_all_cases_p_1,
3819 c_switch_covers_all_cases_p): New functions.
3820 * c-common.h (c_switch_covers_all_cases_p): Declare.
3821
5e9d6aa4 38222017-11-28 Julia Koval <julia.koval@intel.com>
92a285c1 3823 Sebastian Peryt <sebastian.peryt@intel.com>
5e9d6aa4
JK
3824
3825 * array-notation-common.c: Delete.
3826 * c-cilkplus.c: Ditto.
3827 * c-common.c (_Cilk_spawn, _Cilk_sync, _Cilk_for): Remove.
3828 * c-common.def (ARRAY_NOTATION_REF): Remove.
3829 * c-common.h (RID_CILK_SPAWN, build_array_notation_expr,
3830 build_array_notation_ref, C_ORT_CILK, c_check_cilk_loop,
3831 c_validate_cilk_plus_loop, cilkplus_an_parts,
3832 cilk_ignorable_spawn_rhs_op,
3833 cilk_recognize_spawn): Remove.
3834 * c-gimplify.c (CILK_SPAWN_STMT): Remove.
3835 * c-omp.c: Remove CILK_SIMD check.
3836 * c-pragma.c: Ditto.
3837 * c-pragma.h: Remove CILK related pragmas.
3838 * c-pretty-print.c (c_pretty_printer::postfix_expression): Remove
3839 ARRAY_NOTATION_REF condition.
3840 (c_pretty_printer::expression): Ditto.
3841 * c.opt (fcilkplus): Remove.
3842 * cilk.c: Delete.
3843
1af4ebf5
MG
38442017-11-21 Marc Glisse <marc.glisse@inria.fr>
3845
3846 * c-pretty-print.c (pp_c_additive_expression,
3847 c_pretty_printer::expression): Handle POINTER_DIFF_EXPR.
3848
d44ed508
JJ
38492017-11-21 Jakub Jelinek <jakub@redhat.com>
3850
7d2f0f9b
JJ
3851 * c-common.c (get_nonnull_operand): Use tree_to_uhwi.
3852
d44ed508
JJ
3853 PR c++/83059
3854 * c-common.c (get_atomic_generic_size): Use TREE_INT_CST_LOW
3855 instead of tree_to_uhwi, formatting fix.
3856
26edace6
DM
38572017-11-20 David Malcolm <dmalcolm@redhat.com>
3858
3859 PR c/81404
3860 * known-headers.cc: New file, based on material from c/c-decl.c.
3861 (suggest_missing_header): Copied as-is.
3862 (get_stdlib_header_for_name): New, based on get_c_name_hint but
3863 heavily edited to add C++ support. Add some knowledge about
3864 <limits.h>, <stdint.h>, and <wchar.h>.
3865 * known-headers.h: Likewise.
3866
6c7a259b
DM
38672017-11-20 David Malcolm <dmalcolm@redhat.com>
3868
3869 * c-common.h (enum lookup_name_fuzzy_kind): Move to name-hint.h.
3870 (lookup_name_fuzzy): Likewise. Convert return type from
3871 const char * to name_hint. Add location_t param.
3872 * name-hint.h: New header.
3873
f9c59f7e
JJ
38742017-11-19 Jakub Jelinek <jakub@redhat.com>
3875
3876 PR c/66618
3877 PR c/69960
3878 * c-common.h (c_fully_fold): Add LVAL argument defaulted to false.
3879
1e39313a
JM
38802017-11-16 Joseph Myers <joseph@codesourcery.com>
3881
3882 * c.opt (-std=c17, std=gnu17, -std=iso9899:2017): Refer to 2018
3883 expected publication date of C17.
3884 (-std=c18, -std=gnu18, -std=iso9899:2018): New option aliases.
3885
3ca0dc60
JM
38862017-11-15 Joseph Myers <joseph@codesourcery.com>
3887
3888 PR c/81156
3889 * c-common.c (c_common_reswords): Add __builtin_tgmath.
3890 * c-common.h (enum rid): Add RID_BUILTIN_TGMATH.
3891
025d57f0
MS
38922017-11-10 Martin Sebor <msebor@redhat.com>
3893
3894 PR c/81117
3895 * c-common.c (catenate_strings): Use memcpy instead of strncpy.
3896 * c-warn.c (sizeof_pointer_memaccess_warning): Handle arrays.
3897 * c.opt (-Wstringop-truncation): New option.
3898
1b6fa695
ML
38992017-11-06 Martin Liska <mliska@suse.cz>
3900
3901 PR middle-end/82404
3902 * c-opts.c (c_common_post_options): Set -Wreturn-type for C++
3903 FE.
3904 * c.opt: Set default value of warn_return_type.
3905
64a5912c
DM
39062017-10-31 David Malcolm <dmalcolm@redhat.com>
3907
3908 * c-common.c (binary_op_error): Update for renaming of
3909 error_at_rich_loc.
3910 (c_parse_error): Likewise.
3911 * c-warn.c (warn_logical_not_parentheses): Likewise for
3912 renaming of inform_at_rich_loc.
3913 (warn_for_restrict): Likewise for renaming of
3914 warning_at_rich_loc_n.
3915
c76dc9c3
JM
39162017-10-30 Joseph Myers <joseph@codesourcery.com>
3917
3918 * c.opt (std=c17, std=gnu17, std=iso9899:2017): New options.
3919 * c-opts.c (set_std_c17): New function.
3920 (c_common_init_options): Use gnu17 as default C version.
3921 (c_common_handle_option): Handle -std=c17 and -std=gnu17.
3922
ee5fd23a
MM
39232017-10-27 Michael Meissner <meissner@linux.vnet.ibm.com>
3924
3925 * c-cppbuiltin.c (mode_has_fma): Add support for PowerPC KFmode.
3926 (c_cpp_builtins): If a machine has a fast fma _Float<N> and
3927 _Float<N>X variant, define __FP_FAST_FMA<N> and/or
3928 __FP_FAST_FMA<N>X.
3929
d1047465
MP
39302017-10-23 Marek Polacek <polacek@redhat.com>
3931
3932 PR c/82681
3933 * c-warn.c (warnings_for_convert_and_check): Fix typos.
3934
9e878cf1
EB
39352017-10-19 Eric Botcazou <ebotcazou@adacore.com>
3936
3937 * c-common.c (check_builtin_function_arguments): Also check arguments
3938 of __builtin_alloca_with_align_and_max.
3939
89b6abbb
DM
39402017-10-17 David Malcolm <dmalcolm@redhat.com>
3941
3942 * c-format.c (format_warning_at_char): Pass UNKNOWN_LOCATION
3943 rather than NULL to format_warning_va.
3944 (check_format_types): Likewise when calling format_type_warning.
3945 Remove code to extract source_ranges and source_range * in favor
3946 of just a location_t.
3947 (format_type_warning): Convert source_range * param to a
3948 location_t.
3949
39382c09
JJ
39502017-10-13 Jakub Jelinek <jakub@redhat.com>
3951
3952 * c-gimplify.c (c_gimplify_expr): Handle [LR]ROTATE_EXPR like
3953 [LR]SHIFT_EXPR.
3954
62e1c678
DM
39552017-10-12 David Malcolm <dmalcolm@redhat.com>
3956
3957 * c-common.c (enum missing_token_insertion_kind): New enum.
3958 (get_missing_token_insertion_kind): New function.
3959 (maybe_suggest_missing_token_insertion): New function.
3960 * c-common.h (maybe_suggest_missing_token_insertion): New decl.
3961
b90c9338
NS
39622017-10-11 Nathan Sidwell <nathan@acm.org>
3963
3964 * c-opts.c (add_prefixed_path): Change chain to incpath_kind.
3965 (c_common_handle_option): Update incpath_kind names.
3966
3a266bcd
ML
39672017-10-11 Martin Liska <mliska@suse.cz>
3968
3969 PR sanitizer/82490
3970 * c-attribs.c (handle_no_sanitize_attribute): Report directly
3971 Wattributes warning.
3972
8e6cdc90
RS
39732017-10-10 Richard Sandiford <richard.sandiford@linaro.org>
3974
3975 * c-ada-spec.c (dump_generic_ada_node): Use wi::to_wide when
3976 operating on trees as wide_ints.
3977 * c-common.c (pointer_int_sum): Likewise.
3978 * c-pretty-print.c (pp_c_integer_constant): Likewise.
3979 * c-warn.c (match_case_to_enum_1): Likewise.
3980 (c_do_switch_warnings): Likewise.
3981 (maybe_warn_shift_overflow): Likewise.
3982
802b38c9
JJ
39832017-10-10 Jakub Jelinek <jakub@redhat.com>
3984
3985 PR c/82437
3986 * c-warn.c (warn_tautological_bitwise_comparison): Use wi::to_wide
3987 instead of wide_int::from.
3988
4e34b338
JJ
39892017-10-06 Jakub Jelinek <jakub@redhat.com>
3990
3991 PR c/82437
3992 * c-warn.c (warn_tautological_bitwise_comparison): Instead of
3993 using to_widest use wide_int with the larger of the two precisions.
3994
4bc4b2b4
BE
39952017-10-05 Bernd Edlinger <bernd.edlinger@hotmail.de>
3996
3997 * c-pretty-print.c (pp_c_parameter_type_list): Print ... for variadic
3998 functions.
3999
a1488398
RS
40002017-10-02 Richard Sandiford <richard.sandiford@linaro.org>
4001
4002 * c-warn.c (warn_tautological_bitwise_comparison): Use wi::to_widest
4003 when combining the original unconverted comparison operands.
4004
01c9fb68
JJ
40052017-09-29 Jakub Jelinek <jakub@redhat.com>
4006
4007 * c-attribs.c (handle_noipa_attribute): Don't add "stack_protect"
4008 attribute.
4009
6e3e8419
EB
40102017-09-29 Eric Botcazou <ebotcazou@adacore.com>
4011
4012 * c-ada-spec.c (to_ada_name): Add index parameter.
4013 (pp_ada_tree_identifier): Likewise.
4014 (dump_ada_macros): Adjust call to to_ada_name.
4015 (struct overloaded_name_hash): New type.
4016 (struct overloaded_name_hasher): Likewise.
4017 (overloaded_names): New hash table.
4018 (compute_overloading_index): New function.
4019 (dump_ada_decl_name): Call it and pass the result to
4020 pp_ada_tree_identifier.
4021 (dump_ada_double_name): Adjust calls to pp_ada_tree_identifier.
4022 (dump_ada_function_declaration): Likewise.
4023 (dump_generic_ada_node): Likewise.
4024 (print_constructor): Likewise.
4025 (print_destructor): Likewise.
4026 (dump_ada_specs): Delete overloaded_names table.
4027
79310774
EB
40282017-09-29 Eric Botcazou <ebotcazou@adacore.com>
4029
4030 * c-ada-spec.c (max_ada_macros): Move around.
4031 (store_ada_macro_index): Likewise.
4032 (source_file): Rename into...
4033 (macro_source_file): ...this.
4034 (count_ada_macro): Move around.
4035 (store_ada_macro): Likewise.
4036 (compare_macro): Likewise.
4037 (print_ada_macros): Merge in...
4038 (dump_ada_macros): ...this.
4039 (source_file_base): Rename into...
4040 (current_source_file): ...this.
4041 (print_comment): Move around.
4042 (dump_ada_nodes): Call dump_ada_declaration directly.
4043 (struct with): Change type of limited field to bool.
4044 (append_withs): Change type of limited_access parameter to bool.
4045 (pp_ada_tree_identifie): Likewise.
4046 (dump_ada_decl_nam): Likewise.
4047 (dump_generic_ada_node): Likewise. Do not print the return type.
4048 (to_ada_name): Change type of space_found parameter to bool.
4049 (dump_ada_function_declaration): Return void and change type of
4050 parameters to bool. Also print the return type for a function.
4051 (print_ada_methods): Rename into...
4052 (dump_ada_methods): ...this.
4053 (print_ada_declaration): Rename into ...
4054 (dump_ada_declaration): ...this. Do not print the return type.
4055 (print_ada_struct_decl): Rename into...
4056 (dump_ada_struct_decl): ...this.
4057
7d386d45
JJ
40582017-09-29 Jakub Jelinek <jakub@redhat.com>
4059
4060 * c-attribs.c (handle_packed_attribute): Test DECL_C_BIT_FIELD
4061 rather than DECL_INITIAL.
4062 (common_handle_aligned_attribute): Likewise.
4063
ab20d992 40642017-09-20 Alexandre Oliva <aoliva@redhat.com>
9ed32e27
AO
4065
4066 * c.opt (gen-decls): Add RejectNegative.
4067
026a79f7
AS
40682017-09-15 Andrew Sutton <andrew.n.sutton@gmail.com>
4069 Jakub Jelinek <jakub@redhat.com>
4070
4071 Add support for -std=c++2a.
4072 * c-common.h (cxx_dialect): Add cxx2a as a dialect.
4073 * opt.c: Add options for -std=c++2a and -std=gnu++2a.
4074 * c-opts.c (set_std_cxx2a): New.
4075 (c_common_handle_option): Set options when -std=c++2a is enabled.
4076 (c_common_post_options): Adjust comments.
4077 (set_std_cxx14, set_std_cxx17): Likewise.
4078
4a8ca690
EB
40792017-09-15 Eric Botcazou <ebotcazou@adacore.com>
4080
4081 * c-pragma.c (handle_pragma_scalar_storage_order): Expand on error
4082 message for non-uniform endianness and issue a warning in C++.
4083
7b936140
JJ
40842017-09-15 Jakub Jelinek <jakub@redhat.com>
4085
4086 * c.opt (Wc++1z-compat): Change from option to undocumented alias.
4087 (Wc++17-compat): Change from undocumented alias to option.
4088 (Wnoexcept-type): Enable by Wc++17-compat instead of Wc++1z-compat,
4089 change C++1z to C++17 in description.
4090 (std=c++1z, std=gnu++1z): Change from option to undocumented
4091 deprecated alias.
4092 (std=c++17, std=gnu++17): Change from undocumented alias to option.
4093 Adjust description.
4094 * c-common.h (enum cxx_dialect): Rename cxx1z to cxx17.
4095 * c-opts.c (set_std_cxx1z): Rename to ...
4096 (set_std_cxx17): ... this.
4097 (c_common_handle_option): Rename OPT_std_c__1z to OPT_std_c__17
4098 and OPT_std_gnu__1z to OPT_std_gnu__17. Adjust set_std_cxx1z
7365279f 4099 caller.
7b936140
JJ
4100 (c_common_post_options): Use cxx17 instead of cxx1z. Adjust
4101 comments.
4102
12263f13
L
41032017-09-12 H.J. Lu <hongjiu.lu@intel.com>
4104
4105 * c-attribs.c (common_handle_aligned_attribute): Don't warn
4106 function alignment if warn_if_not_aligned_p is true.
4107
6836632e
NS
41082017-09-12 Nathan Sidwell <nathan@acm.org>
4109
4110 * c-common.c (field_decl_cmp, resort_data, resort_field_decl_cmp,
4111 resort_sorted_fields): Move to c/c-decl.c.
4112 * c-common.h (field_decl_cmp, resort_sorted_fields): Delete.
4113 (struct sorted_fields_type): Move to c/c-lang.h.
4114
019bf9ad
JW
41152017-09-09 Jonathan Wakely <jwakely@redhat.com>
4116
4117 PR c++/81852
4118 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_threadsafe_static_init.
4119
bc7fe952
MP
41202017-09-04 Marek Polacek <polacek@redhat.com>
4121
4122 PR c/81783
4123 * c-warn.c (warn_tautological_bitwise_comparison): New function.
4124 (warn_tautological_cmp): Call it.
4125
ab20d992 41262017-09-01 Boris Kolpackov <boris@codesynthesis.com>
de7c2c6a
BK
4127
4128 * c-opts.c (c_common_finish): Write dependency information even if
4129 there are errors.
4130
d2e05fcb
JJ
41312017-09-01 Jakub Jelinek <jakub@redhat.com>
4132
4133 PR c/81887
4134 * c-pragma.c (omp_pragmas): Move "ordered" entry from here to ...
4135 (omp_pragmas_simd): ... here.
4136 * c-omp.c (c_finish_omp_ordered): If clauses isn't simd clause alone,
4137 create new clauses list containing just simd clause.
4138
18e2a8b8
RS
41392017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
4140 Alan Hayward <alan.hayward@arm.com>
4141 David Sherwood <david.sherwood@arm.com>
4142
4143 * c-attribs.c (vector_mode_valid_p) Fold GET_MODE_INNER call
4144 into scalar_mode_supported_p call.
4145 (handle_mode_attribute): Update call to scalar_mode_supported_p.
4146
16d22000
RS
41472017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
4148 Alan Hayward <alan.hayward@arm.com>
4149 David Sherwood <david.sherwood@arm.com>
4150
4151 * c-common.c (c_common_fixed_point_type_for_size): Use opt_scalar_mode
4152 for the mode iterator.
4153
b397965c
RS
41542017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
4155 Alan Hayward <alan.hayward@arm.com>
4156 David Sherwood <david.sherwood@arm.com>
4157
4158 * c-lex.c (interpret_fixed): Use SCALAR_TYPE_MODE.
4159 * c-common.c (c_build_vec_perm_expr): Likewise.
4160
357b7604
RS
41612017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
4162 Alan Hayward <alan.hayward@arm.com>
4163 David Sherwood <david.sherwood@arm.com>
4164
4165 * c-common.c (c_common_type_for_mode): Use as_a <scalar_int_mode>.
4166
e05c94ba
RS
41672017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
4168 Alan Hayward <alan.hayward@arm.com>
4169 David Sherwood <david.sherwood@arm.com>
4170
4171 * c-attribs.c (handle_mode_attribute): Check for a scalar_int_mode
4172 before calling targetm.addr_space.valid_pointer_mode.
4173
5c20c4af
RS
41742017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
4175 Alan Hayward <alan.hayward@arm.com>
4176 David Sherwood <david.sherwood@arm.com>
4177
4178 * c-cppbuiltin.c (c_cpp_builtins): Use opt_scalar_float_mode.
4179
c94843d2 41802017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
92a285c1
ML
4181 Alan Hayward <alan.hayward@arm.com>
4182 David Sherwood <david.sherwood@arm.com>
c94843d2
RS
4183
4184 * c-common.c (c_common_fixed_point_type_for_size): Use new mode
4185 iterators.
4186 * c-cppbuiltin.c (c_cpp_builtins): Likewise.
4187
4e10a5a7
RS
41882017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
4189 Alan Hayward <alan.hayward@arm.com>
4190 David Sherwood <david.sherwood@arm.com>
4191
4192 * c-cppbuiltin.c (mode_has_fma): Prefix mode names with E_ in
4193 case statements.
4194
130fcab0
ML
41952017-08-29 Martin Liska <mliska@suse.cz>
4196
4197 PR other/39851
4198 * c-common.c (parse_optimize_options): Add argument to function
4199 call.
4200 * c-pragma.c (handle_pragma_diagnostic): Likewise.
4201
14e18d71
DM
42022017-08-24 David Malcolm <dmalcolm@redhat.com>
4203
4204 * c-lex.c (interpret_float): Use token location
4205 when building an EXCESS_PRECISION_EXPR.
4206
2f687306
DM
42072017-08-21 David Malcolm <dmalcolm@redhat.com>
4208
4209 * c-common.c (check_function_arguments): Add "arglogs" param; pass
4210 it to check_function_format.
4211 * c-common.h (check_function_arguments): Add vec<location_t> *
4212 param.
4213 (check_function_format): Likewise.
4214 * c-format.c (struct format_check_context): Add field "arglocs".
4215 (check_function_format): Add param "arglocs"; pass it to
4216 check_format_info.
ab20d992 4217 (check_format_info): Add param "arglocs"; use it to initialize
2f687306
DM
4218 new field of format_ctx.
4219 (check_format_arg): Pass format_ctx->arglocs to new param of
4220 check_format_info_main.
4221 (class argument_parser): New field "arglocs".
4222 (argument_parser::argument_parser): Add "arglocs_" param and use
4223 it to initialize new field.
4224 (argument_parser::check_argument_type): Pass new arglocs field to
4225 check_format_types.
4226 (check_format_info_main): Add param "arglocs", and use it when
4227 constructing arg_parser.
4228 (check_format_types): Add param "arglocs"; use it if non-NULL when
4229 !EXPR_HAS_LOCATION (cur_param) to get at location information.
4230
00aa1fa2
L
42312017-08-18 H.J. Lu <hongjiu.lu@intel.com>
4232
4233 PR c/53037
4234 * c-attribs.c (handle_warn_if_not_aligned_attribute): New.
4235 (c_common_attribute_table): Add warn_if_not_aligned.
4236 (handle_aligned_attribute): Renamed to ...
4237 (common_handle_aligned_attribute): Remove argument, name, and add
4238 argument, warn_if_not_aligned. Handle warn_if_not_aligned.
4239 (handle_aligned_attribute): New.
4240 * c.opt: Add -Wif-not-aligned and -Wpacked-not-aligned.
4241
27be025d
MS
42422017-08-14 Martin Sebor <msebor@redhat.com>
4243
4244 PR c/81117
4245 * c-attribs.c (c_common_attribute_table): Add nonstring entry.
4246 (handle_nonstring_attribute): New function.
4247
da67acb9
MS
42482017-08-14 Martin Sebor <msebor@redhat.com>
4249
4250 PR c/81117
4251 * c-format.h (T89_G): New macro.
4252 * c-format.c (local_gcall_ptr_node): New variable.
4253 (init_dynamic_diag_info): Initialize it.
4254
a8b522b4
ML
42552017-08-11 Martin Liska <mliska@suse.cz>
4256
4257 * c-opts.c (c_common_post_options): Replace ASM_OUTPUT_DEF with
4258 TARGET_SUPPORTS_ALIASES.
4259
32129a17
DM
42602017-08-10 David Malcolm <dmalcolm@redhat.com>
4261
4262 * c-common.c (c_parse_error): Add rich_location * param, using it
4263 rather implicitly using input_location.
4264 * c-common.h (c_parse_error): Add rich_location * param.
4265
30af3a2b
MP
42662017-08-09 Marek Polacek <polacek@redhat.com>
4267
4268 * c-common.c (pointer_int_sum): Use true/false instead of 1/0.
4269 (c_common_truthvalue_conversion): Likewise.
4270 * c-omp.c (c_finish_omp_atomic): Likewise.
4271 * c-common.h (build_binary_op): Update declaration.
4272
314e6352
ML
42732017-08-08 Martin Liska <mliska@suse.cz>
4274
4275 * c-ada-spec.c: Include header files.
4276 * c-ubsan.c: Likewise.
4277 * c-warn.c: Likewise.
4278
56b5041c
JJ
42792017-08-07 Jakub Jelinek <jakub@redhat.com>
4280
4281 PR c/69389
4282 * c-omp.c (c_finish_omp_atomic): Handle atomics on bitfields.
4283
db440138
EB
42842017-08-07 Eric Botcazou <ebotcazou@adacore.com>
4285
4286 * c-ada-spec.c (has_nontrivial_methods): Test for FUNCTION_DECL.
4287 (print_ada_methods): Likewise.
4288 (print_ada_declaration): Likewise.
4289
577eec56
ML
42902017-08-07 Martin Liska <mliska@suse.cz>
4291
4292 * array-notation-common.c: Add new includes.
4293 * c-format.c( handle_format_attribute): Canonicalize a format
4294 function name.
4295 * c-lex.c (c_common_has_attribute): Canonicalize name of an
4296 attribute.
4297 * c-pretty-print.c: Add new include.
4298
b854df3c
EB
42992017-08-05 Eric Botcazou <ebotcazou@adacore.com>
4300
4301 * c-ada-spec.c (has_static_fields): Look only into variables.
4302 (print_constructor): Add TYPE parameter and use it for the name.
4303 (print_destructor): Likewise.
4304 (print_ada_declaration): Adjust to new constructor/destructor names.
4305 Adjust calls to print_constructor and print_destructor.
4306 (print_ada_struct_decl): Do not test TREE_STATIC on FIELD_DECL.
4307 Look only into variables in the final loop.
4308
9f2cb25e
EB
43092017-08-01 Eric Botcazou <ebotcazou@adacore.com>
4310
4311 * c-ada-spec.c (has_static_fields): Look only into fields.
4312 (dump_generic_ada_node): Small tweak.
4313 (dump_nested_types): Look only into fields.
4314 (print_ada_declaration): Look only into methods. Small tweak.
4315 (print_ada_struct_decl): Look only into fields. Use DECL_VIRTUAL_P.
4316
f4bcd9eb
EB
43172017-08-01 Eric Botcazou <ebotcazou@adacore.com>
4318
4319 * c-ada-spec.c (print_generic_ada_decl): Pass correctly-typed constant.
4320 (dump_ada_function_declaration): Likewise.
4321 (dump_generic_ada_node): Likewise.
4322 (print_ada_declaration): Add support for const-qualified variables.
4323
f34ebeb2
ML
43242017-07-31 Martin Liska <mliska@suse.cz>
4325
4326 PR sanitize/81530
4327 * c-ubsan.c (ubsan_maybe_instrument_array_ref):
4328 Guard condition with flag_sanitize_p also with current_function_decl
4329 non-null equality.
4330 (ubsan_maybe_instrument_reference_or_call): Likewise.
4331
218e5d04
UB
43322017-07-30 Uros Bizjak <ubizjak@gmail.com>
4333
4334 * c-format.c (asm_fprintf_char_table): Add 'z' to format_chars.
4335
942047f2
EB
43362017-07-29 Eric Botcazou <ebotcazou@adacore.com>
4337
4338 * c-ada-spec.c (dump_generic_ada_node): Take into account signedness
4339 for enumeral types.
4340 (print_ada_declaration): Add missing guard for record types.
4341
a40ff0ae
JJ
43422017-07-27 Jakub Jelinek <jakub@redhat.com>
4343
4344 PR c/45784
4345 * c-omp.c (c_finish_omp_for): If the condition is wrapped in
4346 rhs of COMPOUND_EXPR(s), skip them and readd their lhs into
4347 new COMPOUND_EXPRs around the rhs of the comparison.
4348
06bd22f6
MP
43492017-07-27 Marek Polacek <polacek@redhat.com>
4350
4351 PR c/81417
4352 * c-warn.c (warn_for_sign_compare): Tweak the warning message. Print
4353 the types.
4354
036ea399
JJ
43552017-07-27 Jakub Jelinek <jakub@redhat.com>
4356
4357 * c-attribs.c (c_common_attribute_table): Add noipa attribute.
4358 (handle_noipa_attribute): New function.
4359
417ca011
TD
43602017-07-07 Torsten Duwe <duwe@suse.de>
4361
4362 * c-attribs.c (c_common_attribute_table): Add entry for
4363 "patchable_function_entry".
4364
5aaa8fb4
NS
43652017-07-20 Nathan Sidwell <nathan@acm.org>
4366
4367 Remove TYPE_METHODS.
4368 * c-ada-spec.c (is_tagged_type, has_nontrivial_methods,
4369 dump_ada_template, print_ada_methods,
4370 print_ada_declaration): Member fns are on TYPE_FIELDS.
4371
ff22eb12
NS
43722017-07-18 Nathan Sidwell <nathan@acm.org>
4373
4374 * c-warn.c (warn_for_memset): Use TYPE_{MIN,MAX}_VALUE.
4375
eea77d1f
DM
43762017-07-14 David Malcolm <dmalcolm@redhat.com>
4377
4378 * c-common.c (try_to_locate_new_include_insertion_point): New
4379 function.
4380 (per_file_includes_t): New typedef.
4381 (added_includes_t): New typedef.
4382 (added_includes): New variable.
4383 (maybe_add_include_fixit): New function.
4384 * c-common.h (maybe_add_include_fixit): New decl.
4385
281ac396
MS
43862017-07-10 Martin Sebor <msebor@redhat.com>
4387
4388 PR other/81345
4389 * c.opt (-Wstringop-overflow): Set defaults in LangEnabledBy.
4390
b6f43128
DM
43912017-07-06 David Malcolm <dmalcolm@redhat.com>
4392
4393 * c-common.c (selftest::c_family_tests): New.
4394 * c-common.h (selftest::run_c_tests): Move decl to c/c-lang.h.
4395 (selftest::c_family_tests): New decl.
4396
efbf55b0
MP
43972017-07-04 Marek Polacek <polacek@redhat.com>
4398
4399 PR c/81231
4400 * c-common.c (sync_resolve_size): Give error for pointers to incomplete
4401 types.
4402
6c86bd88
MP
44032017-07-04 Marek Polacek <polacek@redhat.com>
4404
4405 * c-warn.c (warn_if_unused_value): Remove WITH_CLEANUP_EXPR handling.
4406
17a7218b
ML
44072017-06-28 Martin Liska <mliska@suse.cz>
4408
4409 PR ipa/81128
4410 * c-attribs.c (handle_alias_ifunc_attribute): Append ifunc alias
4411 to a function declaration.
4412
63010089
ML
44132017-06-28 Martin Liska <mliska@suse.cz>
4414
4415 PR driver/79659
4416 * c.opt: Add IntegerRange to various options.
4417
3e2becc4
MP
44182017-06-26 Marek Polacek <polacek@redhat.com>
4419
4420 PR c/80116
4421 * c-common.h (warn_for_multistatement_macros): Declare.
4422 * c-warn.c: Include "c-family/c-indentation.h".
4423 (warn_for_multistatement_macros): New function.
4424 * c.opt (Wmultistatement-macros): New option.
4425 * c-indentation.c (guard_tinfo_to_string): No longer static.
4426 Change the parameter type to "enum rid". Handle RID_SWITCH.
4427 * c-indentation.h (guard_tinfo_to_string): Declare.
4428
2db9b7cd
MG
44292017-06-23 Marc Glisse <marc.glisse@inria.fr>
4430
4431 * c-common.c (c_common_nodes_and_builtins): Use builtin_structptr_types.
4432
c3684b7b
MS
44332017-06-15 Martin Sebor <msebor@redhat.com>
4434
4435 PR c++/80560
4436 * c.opt (-Wclass-memaccess): New option.
4437
e72c4afd
BK
44382017-06-14 Boris Kolpackov <boris@codesynthesis.com>
4439
4440 * c-opts.c (c_common_finish): Handle '-' special value to -MF.
4441
8a516588
MP
44422017-06-13 Marek Polacek <polacek@redhat.com>
4443
4444 PR objc/80949
4445 * c-warn.c (do_warn_duplicated_branches): Return if any of the
4446 branches is null.
4447
45b2222a
ML
44482017-06-13 Martin Liska <mliska@suse.cz>
4449
4450 PR sanitize/78204
4451 * c-attribs.c (add_no_sanitize_value): New function.
4452 (handle_no_sanitize_attribute): Likewise.
4453 (handle_no_sanitize_address_attribute): Use the function.
4454 (handle_no_sanitize_thread_attribute): New function.
4455 (handle_no_address_safety_analysis_attribute): Use
4456 add_no_sanitize_value.
4457 (handle_no_sanitize_undefined_attribute): Likewise.
4458 * c-common.h: Declare new functions.
4459 * c-ubsan.c (ubsan_instrument_division): Use sanitize_flags_p.
4460 (ubsan_instrument_shift): Likewise.
4461 (ubsan_instrument_bounds): Likewise.
4462 (ubsan_maybe_instrument_array_ref): Likewise.
4463 (ubsan_maybe_instrument_reference_or_call): Likewise.
4464
a01f151f
JM
44652017-06-11 Jason Merrill <jason@redhat.com>
4466
4467 * c-ada-spec.c, c-pragma.c: Use id_equal.
4468
3de4ac6d
MP
44692017-06-04 Marek Polacek <polacek@redhat.com>
4470
4471 PR c/80919
4472 * c-format.c (matching_type_p): Return false if any of the types
4473 requires structural equality.
4474
2474f48f
MS
44752017-06-02 Martin Sebor <msebor@redhat.com>
4476
4477 PR c/80892
4478 * c-warn.c (conversion_warning): Use -Wconversion for integer
4479 conversion and -Wfloat-conversion for floating one.
4480
40ffd95f
BE
44812017-06-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
4482
4483 * c.opt (Wsizeof-pointer-div): New warning option.
4484
3fa4634c
VR
44852017-06-01 Volker Reichelt <v.reichelt@netcologne.de>
4486
4487 * c.opt (Wcatch-value): New shortcut for Wcatch-value=1.
4488 (Wcatch-value=1): Enable by -Wall.
4489
f012c8ef
DM
44902017-05-30 David Malcolm <dmalcolm@redhat.com>
4491
4492 * c-format.c (gcc_cxxdiag_char_table): Add 'H' and 'I' to
4493 format_chars.
4494 * c.opt (fdiagnostics-show-template-tree): New option.
4495 (felide-type): New option.
4496
63dbcd13
VR
44972017-05-25 Volker Reichelt <v.reichelt@netcologne.de>
4498
4499 * c.opt (Wcatch-value=): New C++ warning flag.
4500
be136b5c
NS
45012017-05-24 Nathan Sidwell <nathan@acm.org>
4502
4503 * c=common.c (field_decl_cmp, resort_field_decl_cmp): Adjust T
4504 const casts to avoid warning.
4505
3cd211af
MS
45062017-05-24 Martin Sebor <msebor@redhat.com>
4507
4508 PR c/80731
4509 * c-common.h (unsafe_conversion_p): Add a function argument.
4510 * c-common.c (unsafe_conversion_p): Same.
4511 Add type names and values to diagnostics.
4512 (scalar_to_vector): Adjust.
4513 * c-warn.c (constant_expression_error): Add a function argument.
4514 Add type names and values to diagnostics.
4515 (conversion_warning): Add a function argument.
4516 Add type names and values to diagnostics.
4517 (warnings_for_convert_and_check): Same.
4518
1ff7be5a
JM
45192017-05-19 Jason Merrill <jason@redhat.com>
4520
4521 * c-warn.c (match_case_to_enum_1): Don't warn about enums with no
4522 enumerators.
4523
ff502317
BE
45242017-05-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
4525
4526 * c-format.c (locus): Move out of function scope,
4527 add GTY attribute.
4528
2a8a8d7b
NS
45292017-05-19 Nathan Sidwell <nathan@acm.org>
4530
4531 * c-opts.c (class_dump_file, class_dump_flags): Delete.
4532 (c_common_parse_file): Remove class dump handling.
4533 (get_dump_info): Likewise.
4534
39aac208
RB
45352017-05-19 Richard Biener <rguenther@suse.de>
4536
4537 PR c++/80593
4538 * c-warn.c (strict_aliasing_warning): Do not warn for accesses
4539 to alias-set zero memory.
4540
6ecd2339
BE
45412017-05-18 Bernd Edlinger <bernd.edlinger@hotmail.de>
4542
4543 * c-format.c (local_tree_type_node): Add GTY attribute.
4544
6574d78e
MP
45452017-05-18 Marek Polacek <polacek@redhat.com>
4546
4547 * c-common.c (c_common_type_for_size): Use NULL_TREE instead of 0.
4548 (c_common_fixed_point_type_for_size): Likewise.
4549 (c_common_type_for_mode): Likewise.
4550 (shorten_compare): Likewise.
4551 (c_promoting_integer_type_p): Use false/true instead of 0/1.
4552 * c-pragma.c (maybe_apply_renaming_pragma): Use NULL_TREE instead of 0.
4553
e3455240
MP
45542017-05-18 Marek Polacek <polacek@redhat.com>
4555
4556 * c-common.c (self_promoting_args_p): Change the return type to bool.
4557 Use false/true instead of 0/1.
4558 * c-common.h (self_promoting_args_p): Update.
4559
3fa8871b
MP
45602017-05-17 Marek Polacek <polacek@redhat.com>
4561
4562 * c-common.c: Use NULL_TREE instead of 0 where appropriate.
4563 * c-warn.c: Likewise.
4564
b42cc3ca
VV
45652017-05-17 Ville Voutilainen <ville.voutilainen@gmail.com>
4566
4567 Implement new C++ intrinsics __is_assignable and __is_constructible.
4568 * c-common.c (__is_assignable, __is_constructible): New.
4569 * c-common.h (RID_IS_ASSIGNABLE, RID_IS_CONSTRUCTIBLE): Likewise.
4570
1a817418
ML
45712017-05-17 Martin Liska <mliska@suse.cz>
4572
4573 * c-common.h: Introduce dump_flags_t type and
4574 use it instead of int type.
4575 * c-gimplify.c (c_genericize): Likewise.
4576 * c-opts.c: Likewise.
4577
b2fa0a8b
MP
45782017-05-17 Marek Polacek <polacek@redhat.com>
4579
4580 * c-common.c (c_save_expr): Remove.
4581 (c_common_truthvalue_conversion): Remove a call to c_save_expr.
4582 * c-common.h (c_save_expr): Remove declaration.
4583
31c2d57d
VR
45842017-05-09 Volker Reichelt <v.reichelt@netcologne.de>
4585
4586 PR c/35441
4587 * c-pretty-print.c (c_pretty_printer::expression): Handle MAX_EXPR,
4588 MIN_EXPR, EXACT_DIV_EXPR, RDIV_EXPR, LROTATE_EXPR, RROTATE_EXPR.
4589 (c_pretty_printer::postfix_expression): Handle MAX_EXPR, MIN_EXPR.
4590 (c_pretty_printer::multiplicative_expression): Handle EXACT_DIV_EXPR,
4591 RDIV_EXPR.
4592 (pp_c_shift_expression): Handle LROTATE_EXPR, RROTATE_EXPR.
4593
684f84de
MP
45942017-05-09 Marek Polacek <polacek@redhat.com>
4595
4596 PR c/80525
4597 * c-warn.c (unwrap_c_maybe_const): New.
4598 (warn_logical_operator): Call it.
4599
641da50a
NS
46002017-05-09 Nathan Sidwell <nathan@acm.org>
4601
4602 * c-common.c (c_register_builtin_type): Use pushdecl lang_hook.
4603 * c-common.h (pushdecl_top_level, pushdecl): Don't declare here.
4604
631238ac
MS
46052017-05-08 Martin Sebor <msebor@redhat.com>
4606
4607 PR translation/80280
4608 * c-format.h (struct format_flag_spec): Add new member.
4609 (T89_T): New macro.
4610 * c-format.c (local_tree_type_node): New global.
4611 (printf_flag_specs, asm_fprintf_flag_spec): Initialize new data.
4612 (gcc_diag_flag_specs, scanf_flag_specs, strftime_flag_specs): Ditto.
4613 (strfmon_flag_specs): Likewise.
4614 (gcc_diag_char_table, gcc_cdiag_char_table): Split up specifiers
4615 with distinct quoting properties.
4616 (gcc_tdiag_char_table, gcc_cxxdiag_char_table): Same.
4617 (flag_chars_t::validate): Add argument and handle bad quoting.
4618 (check_format_info_main): Handle quoting problems.
4619 (init_dynamic_diag_info): Simplify.
4620
49f0c04c
JM
46212017-05-08 Jason Merrill <jason@redhat.com>
4622
4623 * c-opts.c (c_common_post_options): Update defaults for
4624 flag_abi_version and flag_abi_compat_version.
4625
56d35585
DM
46262017-05-05 David Malcolm <dmalcolm@redhat.com>
4627
4628 * c-common.c (c_cpp_error): Replace report_diagnostic
4629 with diagnostic_report_diagnostic.
4630
0f2c4a8f
MS
46312017-05-04 Martin Sebor <msebor@redhat.com>
4632
4633 PR translation/80280
4634 * c-attribs.c (handle_alias_ifunc_attribute): Quote a %D directive.
4635 (handle_weakref_attribute): Same.
4636
6fe63fb4
NS
46372017-05-03 Nathan Sidwell <nathan@acm.org>
4638
4639 Canonicalize canonical type hashing
4640 * c-common.c (complete_array_type): Use type_hash_canon.
4641
815d9cc6
XR
46422017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn>
4643
92a285c1 4644 PR c++/80038
815d9cc6
XR
4645 * c-common.h (cilk_gimplify_call_params_in_spawned_fn): Remove
4646 prototype.
4647 (cilk_install_body_pedigree_operations): Likewise.
4648 * cilk.c (cilk_set_spawn_marker): Mark functions that should be
4649 detatched.
4650 (cilk_gimplify_call_params_in_spawned_fn): Remove.
4651 (cilk_install_body_pedigree_operations): Likewise.
4652 (gimplify_cilk_spawn): Add EXPR_STMT and CLEANUP_POINT_EXPR
4653 unwrapping.
4654
f8a36447
JJ
46552017-04-27 Jakub Jelinek <jakub@redhat.com>
4656
4657 PR c++/80534
4658 * c-common.c (complete_array_type): Only hash TYPE_TYPELESS_STORAGE
4659 flag on non-aggregate element types.
4660
7c145456
BE
46612017-04-25 Bernd Edlinger <bernd.edlinger@hotmail.de>
4662
4663 * c-common.c (c_type_hasher, type_hash_table): Remove.
4664 (c_common_get_alias_set): Remove unreachable code.
4665 * c-opts.c (c_common_post_options): Make sure cc1 takes only one file.
4666
c3cbcd45
VR
46672017-04-20 Volker Reichelt <v.reichelt@netcologne.de>
4668
4669 * c.opt (Wextra-semi): New C++ warning flag.
4670
8a59d466
JJ
46712017-04-20 Jakub Jelinek <jakub@redhat.com>
4672
4673 PR middle-end/80423
4674 * c-common.c (complete_array_type): Preserve TYPE_TYPELESS_STORAGE.
4675
8487c9a5
JJ
46762017-04-18 Jakub Jelinek <jakub@redhat.com>
4677
4678 PR middle-end/79788
4679 PR middle-end/80375
4680 * c-common.c (c_common_type_for_mode): Don't handle
4681 widest_*_literal_type_node here.
4682 c_common_signed_or_unsigned_type): Likewise.
4683 (c_common_nodes_and_builtins): Set widest_*_literal_type_node
4684 to *intTI_type_node or *intDI_type_node depending on whether
4685 TImode is supported by the target or not.
4686
3ee0fb02
ML
46872017-04-10 Martin Liska <mliska@suse.cz>
4688
4689 PR sanitizer/80350
4690 * c-ubsan.c (ubsan_instrument_shift): Evaluate RHS before
4691 doing an UBSAN check.
4692
5764ee3c
JW
46932017-04-03 Jonathan Wakely <jwakely@redhat.com>
4694
4695 * c-warn.c (do_warn_double_promotion): Fix typo in comment.
4696
6f3af356
JJ
46972017-03-31 Jakub Jelinek <jakub@redhat.com>
4698
4699 PR c++/79572
4700 * c-ubsan.h (ubsan_maybe_instrument_reference): Change argument to
4701 tree *.
4702 * c-ubsan.c (ubsan_maybe_instrument_reference): Likewise. Handle
4703 not just NOP_EXPR to REFERENCE_TYPE, but also INTEGER_CST with
4704 REFERENCE_TYPE.
4705
f6a7a9d5
DM
47062017-03-31 David Malcolm <dmalcolm@redhat.com>
4707
4708 PR documentation/78732
4709 * c.opt (Wendif-labels): Fix description to refer to
4710 #else rather than #elif.
4711
af88f557
JJ
47122017-03-31 Jakub Jelinek <jakub@redhat.com>
4713
4714 PR libstdc++/80251
4715 * c-common.h (enum rid): Add RID_IS_AGGREGATE.
4716 * c-common.c (c_common_reswords): Add __is_aggregate trait.
4717
a9e4a1a5
JJ
47182017-03-27 Jakub Jelinek <jakub@redhat.com>
4719
4720 PR middle-end/80162
4721 * c-common.c (c_common_mark_addressable_vec): Don't set
4722 TREE_ADDRESSABLE on DECL_HARD_REGISTER.
4723
3f01b620
MS
47242017-03-21 Martin Sebor <msebor@redhat.com>
4725
4726 PR c++/79548
4727 * c-common.c (set_underlying_type): Mark type used only when
4728 original del is declared unused.
4729
2f6f187a
DM
47302017-03-10 David Malcolm <dmalcolm@redhat.com>
4731
4732 PR translation/79848
4733 * c-format.c (check_format_string): Simplify uses of "%<%s%>" to
4734 "%qs".
4735
a02fa805
DM
47362017-03-10 David Malcolm <dmalcolm@redhat.com>
4737
4738 PR c/79921
4739 * c-indentation.c (warn_for_misleading_indentation): Remove parens
4740 from inform's message, so that xgettext can locate it.
4741
822a132c
MP
47422017-03-09 Marek Polacek <polacek@redhat.com>
4743
4744 PR c++/79962
4745 PR c++/79984
4746 * c-attribs.c (handle_nonnull_attribute): Save the result of default
4747 conversion to the attribute list.
4748
bba81f1c
ML
47492017-03-09 Martin Liska <mliska@suse.cz>
4750
4751 * c-ada-spec.c (macro_length): Increment value instead of a pointer.
4752
108154ff
JM
47532017-03-03 Jason Merrill <jason@redhat.com>
4754
4755 * c.opt (Wnoexcept-type): New.
4756
eb0e7c34
RB
47572017-03-02 Richard Biener <rguenther@suse.de>
4758
4759 PR c/79756
4760 * c-common.c (c_common_mark_addressable_vec): Look through
4761 C_MAYBE_CONST_EXPR.
4762
9453ba0a
ML
47632017-02-28 Martin Liska <mliska@suse.cz>
4764
4765 * c.opt: Replace space with tabular for options of <number>
4766 type.
4767
6a825afe
ML
47682017-02-28 Martin Liska <mliska@suse.cz>
4769
4770 * c.opt: Fix --help=option -Q for options which are of
4771 an enum type.
4772
4227c9ad
JJ
47732017-02-24 Jakub Jelinek <jakub@redhat.com>
4774
4775 PR c++/79588
4776 * c-common.c (check_function_restrict): New function.
4777 (check_function_arguments): Add FNDECL argument. Call
4778 check_function_restrict if -Wrestrict.
4779 * c-warn.c (warn_for_restrict): Remove ARGS argument, add ARGARRAY
4780 and NARGS. Use auto_vec for ARG_POSITIONS, simplify.
4781 * c-common.h (check_function_arguments): Add FNDECL argument.
4782 (warn_for_restrict): Remove ARGS argument, add ARGARRAY and NARGS.
4783
59909673
EB
47842017-02-24 Eric Botcazou <ebotcazou@adacore.com>
4785
4786 * c-ada-spec.c (dump_ada_function_declaration): Add comment about the
4787 treatment of parameters with pointer-to-tagged type and tidy up.
4788 (print_ada_methods): Remove the special treatment of C++ static member
4789 functions.
4790
54dcd526
ML
47912017-02-22 Martin Liska <mliska@suse.cz>
4792
4793 * c.opt: Replace inequality signs with square brackets
4794 for -Wnornalized.
4795
00bc9de3
JJ
47962017-02-21 Jakub Jelinek <jakub@redhat.com>
4797
4798 PR c++/79641
4799 * c-attribs.c (handle_mode_attribute): Use build_qualified_type to
4800 preserve quals.
4801
97fcf744
JM
48022017-02-17 Joseph Myers <joseph@codesourcery.com>
4803
4804 * c-cppbuiltin.c (builtin_define_float_constants): Define
4805 __DECIMAL_DIG__ to the value for long double.
4806
c7545f1c
MP
48072017-02-15 Marek Polacek <polacek@redhat.com>
4808
4809 PR c/79515
4810 * c-warn.c (do_warn_double_promotion): Don't warn if an invalid
4811 conversion has occured.
4812
c2e84327
DM
48132017-01-24 David Malcolm <dmalcolm@redhat.com>
4814
4815 * c-common.c (c_common_reswords): Add "__RTL".
4816 * c-common.h (enum rid): Add RID_RTL.
4817
2ebd93e1
MP
48182017-01-20 Marek Polacek <polacek@redhat.com>
4819
4820 PR c/64279
4821 * c-common.h (do_warn_duplicated_branches_r): Declare.
4822 * c-gimplify.c (c_genericize): Walk the function tree calling
4823 do_warn_duplicated_branches_r.
4824 * c-warn.c (expr_from_macro_expansion_r): New.
4825 (do_warn_duplicated_branches): New.
4826 (do_warn_duplicated_branches_r): New.
4827 * c.opt (Wduplicated-branches): New option.
4828
0d80ab91
DM
48292017-01-17 David Malcolm <dmalcolm@redhat.com>
4830
4831 PR c++/71497
4832 * c-indentation.c (warn_for_misleading_indentation): Use the past
4833 subjunctive in the note.
4834
7f991c36
AH
48352017-01-17 Aldy Hernandez <aldyh@redhat.com>
4836
4837 PR c/79116
4838 * array-notation-common.c (cilkplus_extract_an_triplets): Convert
4839 start type to integer_type.
4840
1c70261c
JJ
48412017-01-16 Jakub Jelinek <jakub@redhat.com>
4842
4843 PR driver/49726
4844 * c.opt (gen-decls): Add Driver flag.
4845
1ddca3f3
PC
48462017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
4847
4848 Revert:
4849 2017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
4850
4851 PR c++/71737
4852 * c-common.c (set_underlying_type): Always set DECL_ORIGINAL_TYPE.
4853
7d2f3f1d
PC
48542017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
4855
4856 PR c++/71737
4857 * c-common.c (set_underlying_type): Always set DECL_ORIGINAL_TYPE.
4858
bce6f760
MS
48592017-01-12 Martin Sebor <msebor@redhat.com>
4860
4861 (-Wformat-overflow): ...to this.
4862
bf5fbf46
MS
48632017-01-11 Martin Sebor <msebor@redhat.com>
4864
4865 PR c/78768
4866 * c.opt (-Walloca-larger-than, -Wformat-length, -Wformat-truncation):
4867 Also enable for LTO.
4868
e363df3f
JM
48692017-01-10 Jason Merrill <jason@redhat.com>
4870
4871 Implement P0195R2, C++17 variadic using.
4872 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_variadic_using.
4873
bd2c6270
JJ
48742017-01-09 Jakub Jelinek <jakub@redhat.com>
4875
4876 PR translation/79019
4877 PR translation/79020
4878 * c.opt (Wnormalized=): Fix typo in description.
4879
efcc8d38
MS
48802017-01-08 Martin Sebor <msebor@redhat.com>
4881
4882 PR middle-end/77708
4883 * c.opt (-Wformat-truncation): New option.
4884
ab20d992 48852017-01-06 Alexandre Oliva <aoliva@redhat.com>
435f3f7a
AO
4886
4887 * c-pretty-print.c (pp_c_tree_decl_identifier): Convert 16-bit
4888 value to unsigned short to fit in 4 hex digits without
4889 warnings.
4890
4e89adf9
EB
48912017-01-05 Eric Botcazou <ebotcazou@adacore.com>
4892
4893 * c.opt (fsso-struct): Add 'native' value.
4894
cd445b54
ML
48952017-01-05 Martin Liska <mliska@suse.cz>
4896
4897 PR pch/78970
4898 * c-opts.c (c_common_post_options): Reject '-' filename for a precompiled
4899 header.
4900
a9342885
MP
49012017-01-04 Marek Polacek <polacek@redhat.com>
4902
4903 PR c++/64767
4904 * c.opt (Wpointer-compare): New option.
4905
fc73e60c
JJ
49062017-01-04 Jakub Jelinek <jakub@redhat.com>
4907
4908 PR driver/78957
4909 * c.opt (fsso-struct=): Add RejectNegative.
4910
cbe34bb5
JJ
49112017-01-01 Jakub Jelinek <jakub@redhat.com>
4912
4913 Update copyright years.
4914
d4a6c0ea
ML
49152016-12-29 Martin Liska <mliska@suse.cz>
4916
4917 PR c/78933
4918 * c.opt (strong-eval-order): Add RejectNegative keyword.
4919
67a5ad7c
JM
49202016-12-22 Jason Merrill <jason@redhat.com>
4921
4922 Implement P0522R0, matching of template template arguments.
4923 * c-cppbuiltin.c (c_cpp_builtins): Define
4924 __cpp_template_template_args.
4925
0dba7960
JJ
49262016-12-21 Jakub Jelinek <jakub@redhat.com>
4927
4928 PR bootstrap/78817
4929 * c-common.c (struct nonnull_arg_ctx): New type.
4930 (check_function_nonnull): Return bool instead of void. Use
4931 nonnull_arg_ctx as context rather than just location_t.
4932 (check_nonnull_arg): Adjust for the new context type, set
4933 warned_p to true if a warning has been diagnosed.
4934 (check_function_arguments): Return bool instead of void.
4935 * c-common.h (check_function_arguments): Adjust prototype.
4936
31bfc9b9
JM
49372016-12-21 Jason Merrill <jason@redhat.com>
4938
4939 * c.opt (-fnew-ttp-matching): New flag.
4940 * c-opts.c (c_common_post_options): Default on if -std=c++1z.
4941
629b3d75
MJ
49422016-12-14 Martin Jambor <mjambor@suse.cz>
4943
4944 * c-omp.c: Include omp-general.h instead of omp-low.h.
4945 (c_finish_oacc_wait): Adjusted call to find_omp_clause to use its new
4946 name.
4947
474da67e
MS
49482016-12-14 Martin Sebor <msebor@redhat.com>
4949
4950 PR c/17308
4951 * c-common.c (check_nonnull_arg): Disable when optimization
4952 is enabled.
4953
fe366b87
MP
49542016-12-12 Marek Polacek <polacek@redhat.com>
4955
4956 PR c++/78647
4957 * c-common.c (attribute_fallthrough_p): Return false for
4958 error_mark_node.
4959
8bd9f164
MS
49602016-12-08 Martin Sebor <msebor@redhat.com>
4961
4962 PR c/78284
4963 * c.opt (-Walloc-zero, -Walloc-size-larger-than): New options.
4964
060162e0
MS
49652016-12-08 Martin Sebor <msebor@redhat.com>
4966
4967 PR c/78165
92a285c1
ML
4968 * c-pretty-print (pp_c_integer_constant): Avoid formatting type
4969 suffix.
060162e0 4970
ee92e7ba
MS
49712016-12-07 Martin Sebor <msebor@redhat.com>
4972
4973 PR c/53562
4974 PR middle-end/77784
4975 PR middle-end/78149
4976 PR middle-end/78138
4977 * c.opt (-Wstringop-overflow): New option.
4978
84b0769e
MO
49792016-12-02 Maxim Ostapenko <m.ostapenko@samsung.com>
4980
4981 * c-attribs.c (asan odr indicator): New attribute.
4982 (handle_asan_odr_indicator_attribute): New function.
4983
7fa6a965
PK
49842016-11-26 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
4985
4986 * c-common.c (c_common_nodes_and_builtins): Remove initialization of
4987 ptrdiff_type_node;
4988
56d8ffc1
JG
49892016-11-23 James Greenhalgh <james.greenhalgh@arm.com>
4990
4991 * c-common.c (excess_precision_mode_join): New.
4992 (c_ts18661_flt_eval_method): New.
4993 (c_c11_flt_eval_method): Likewise.
4994 (c_flt_eval_method): Likewise.
4995 * c-common.h (excess_precision_mode_join): New.
4996 (c_flt_eval_method): Likewise.
4997 * c-cppbuiltin.c (c_cpp_flt_eval_method_iec_559): New.
4998 (cpp_iec_559_value): Call it.
4999 (c_cpp_builtins): Modify logic for __LIBGCC_*_EXCESS_PRECISION__,
5000 call c_flt_eval_method to set __FLT_EVAL_METHOD__ and
5001 __FLT_EVAL_METHOD_TS_18661_3__.
5002
04f0fcf7
JG
50032016-11-23 James Greenhalgh <james.greenhalgh@arm.com>
5004
5005 * c-opts.c (c_common_post_options): Add logic to handle the default
5006 case for -fpermitted-flt-eval-methods.
5007
fb2675cb
PB
50082016-11-23 Paolo Bonzini <bonzini@gnu.org>
5009
5010 * c.opt (Wexpansion-to-defined): New.
5011
ec1c5694
JJ
50122016-11-23 Jakub Jelinek <jakub@redhat.com>
5013
5014 PR target/78451
5015 * c-pragma.c (handle_pragma_target): Don't replace
5016 current_target_pragma, but chainon the new args to the current one.
5017
730c9e75
NS
50182016-11-22 Nathan Sidwell <nathan@acm.org>
5019
5020 * array-notation-common.c (cilkplus_extract_an_trplets): Fix
cacd29be 5021 indentation and formatting.
730c9e75 5022
89990732
MS
50232016-11-21 Martin Sebor <msebor@redhat.com>
5024
5025 * c.opt (-fprintf-return-value): Enable by default.
5026
48330c93
BE
50272016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
5028
5029 PR c++/71973
5030 * c.opt (-Wbuiltin-declaration-mismatch): New warning.
5031 * c-common.c (c_common_nodes_and_builtins): Initialize
5032 const_tm_ptr_type_node.
5033
0d939c95
MP
50342016-11-16 Marek Polacek <polacek@redhat.com>
5035
5036 PR c/78285
5037 * c-common.c (c_add_case_label): Turn error_at calls into inform.
5038
8e745a17
JJ
50392016-11-14 Jakub Jelinek <jakub@redhat.com>
5040
5041 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_structured_bindings.
5042
1ee62b92 50432016-11-14 Prasad Ghangal <prasad.ghangal@gmail.com>
8e745a17
JJ
5044 Richard Biener <rguenther@suse.de>
5045
5046 * c-common.h (c_common_resword): Add RID_GIMPLE, RID_PHI types.
5047 * c-common.h (enum rid): Add RID_GIMPLE, RID_PHI.
5048 * c.opt (fgimple): New option.
1ee62b92 5049
22b15758
UB
50502016-11-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
5051
5052 PR c/35503
5053 * c-common.h (warn_for_restrict): Declare.
5054 * c-warn.c: Include gcc-rich-location.h.
5055 (warn_for_restrict): New function.
5056 * c-format.c (gcc_tdiag_char_table): Add entry for "Z" specifier.
5057 (gcc_cdiag_char_table): Likewise.
5058 (gcc_cxxdiag_char_table): Likewise.
5059 * c.opt (Wrestrict): New option.
5060
4be719cd
EB
50612016-11-13 Eric Botcazou <ebotcazou@adacore.com>
5062
5063 * c-ada-spec.c (print_ada_declaration): For typedef declarations, look
5064 for nested types only if the type is a record or union and dump SLOC.
5065
4a826ca6
JM
50662016-11-09 Jason Merrill <jason@redhat.com>
5067
5068 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_template_auto.
5069
2e955d50
JJ
50702016-11-09 Jakub Jelinek <jakub@redhat.com>
5071
5072 * c-ubsan.c (ubsan_instrument_shift): Handle split
5073 -fsanitize=shift-base and -fsanitize=shift-exponent.
5074
51dc6603
JM
50752016-11-07 Jason Merrill <jason@redhat.com>
5076
5077 * c.opt (Wc++1z-compat): New.
5078 * c-cppbuiltin.c (c_cpp_builtins): Add __cpp_noexcept_function_type.
5079
6dc4a604
ML
50802016-11-07 Martin Liska <mliska@suse.cz>
5081
5082 * c-warn.c (warn_for_unused_label): Save all labels used
5083 in goto or in &label.
5084
b302001e
JM
50852016-11-03 Jason Merrill <jason@redhat.com>
5086
5087 * c-cppbuiltin.c (c_cpp_builtins): Correct
5088 __cpp_inheriting_constructors.
5089
31f7f784
JM
50902016-11-01 Jason Merrill <jason@redhat.com>
5091
2bc78e3c
JM
5092 * c-cppbuiltin.c (c_cpp_builtins): Update
5093 __cpp_inheriting_constructors.
5094
31f7f784
JM
5095 * c.opt (-fnew-inheriting-ctors): New.
5096 * c-opts.c: Default to on for ABI 11+.
5097
dcb466ec
JJ
50982016-10-31 Jakub Jelinek <jakub@redhat.com>
5099
5100 PR c++/77948
5101 * c.opt (fext-numeric-literals): Add Var and Init.
5102 * c-opts.c (c_common_handle_option): Don't clear
5103 cpp_opts->ext_numeric_literals for -std=c++{11,14,1z}.
5104 (c_common_post_options): Clear it here if not set
5105 explicitly.
5106
52e1b91e
AH
51072016-10-28 Aldy Hernandez <aldyh@redhat.com>
5108
5109 PR debug/77773
5110 * c-pretty-print.c (simple_type_specifier): Do not dereference `t'
5111 if NULL.
5112
e16f1cc7
JJ
51132016-10-25 Jakub Jelinek <jakub@redhat.com>
5114
5115 * c-common.h (enum rid): Add RID_BUILTIN_LAUNDER.
5116 * c-common.c (c_common_reswords): Add __builtin_launder.
5117
f8348061
BE
51182016-10-24 Bernd Edlinger <bernd.edlinger@hotmail.de>
5119
5120 * c-common.c (c_common_truthvalue_conversion): Warn for
5121 multiplications in boolean context. Fix the quoting of '<<' and '<'
5122 in the shift warning.
5123
eff89e01
BE
51242016-10-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
5125
5126 * c-common.c (c_common_truthvalue_conversion): Fix the comment.
5127
24bc7bf4
JM
51282016-10-20 Jason Merrill <jason@redhat.com>
5129
5130 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_concepts value.
5131
4c712374
BE
51322016-10-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
5133
5134 * c-common.c (c_common_truthvalue_conversion): Warn only for signed
5135 integer shift ops in boolean context.
5136
51372016-10-18 Aldy Hernandez <aldyh@redhat.com>
adc577c5
AH
5138
5139 * c.opt (Walloca): New.
5140 (Walloca-larger-than=): New.
5141 (Wvla-larger-than=): New.
5142
8fa18c06
MP
51432016-10-17 Marek Polacek <polacek@redhat.com>
5144
5145 * c-warn.c (find_array_ref_with_const_idx_r): Remove parameter names.
5146 Return immediately when finding a match.
5147 (warn_tautological_cmp): Remove a boolean variable that is no longer
5148 needed.
5149
b12b1915
MP
51502016-10-17 Marek Polacek <polacek@redhat.com>
5151
5152 * c-attribs.c: New file.
5153 * c-common.c: Move attributes handling to c-attribs.c.
5154 (get_nonnull_operand): No longer static.
5155 * c-common.h: Move the declarations from c-attribs.c to its own section.
5156
2045acd9
JM
51572016-10-14 Jason Merrill <jason@redhat.com>
5158
5159 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_aggregate_bases
5160 and __cpp_deduction_guides.
5161
14a2c9aa
JM
51622016-10-13 Jason Merrill <jason@redhat.com>
5163
5164 * c-cppbuiltin.c (c_cpp_builtins): Add __cpp_inline_variables.
5165
4d0cdd0c
TP
51662016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
5167
5168 * c-cppbuiltin.c: Include memmodel.h.
5169 * c-opts.c: Likewise.
5170 * c-pragma.c: Likewise.
5171 * c-warn.c: Likewise.
5172
70f6d5e1
JJ
51732016-10-12 Jakub Jelinek <jakub@redhat.com>
5174
5175 * c.opt (Wextra): Add as C/C++/ObjC/ObjC++ option.
5176 (Wimplicit-fallthrough=): Enable for these languages by -Wextra.
5177 * c-opts.c (sanitize_cpp_opts): Initialize
5178 cpp_opts->cpp_warn_implicit_fallthrough.
5179
78f61294
MP
51802016-10-11 Marek Polacek <polacek@redhat.com>
5181
5182 * c-common.c (warning_candidate_p): Change the return type to bool
5183 and return true/false instead of 1/0.
5184 (vector_mode_valid_p): Likewise.
5185
038b5cc0
MP
51862016-10-11 Marek Polacek <polacek@redhat.com>
5187
5188 * c-common.c (fold_for_warn): No longer static.
5189 (bool_promoted_to_int_p): Likewise.
5190 (c_common_get_narrower): Likewise.
5191 (constant_expression_warning): Move to c-warn.c.
5192 (constant_expression_error): Likewise.
5193 (overflow_warning): Likewise.
5194 (warn_logical_operator): Likewise.
5195 (find_array_ref_with_const_idx_r): Likewise.
5196 (warn_tautological_cmp): Likewise.
5197 (expr_has_boolean_operands_p): Likewise.
5198 (warn_logical_not_parentheses): Likewise.
5199 (warn_if_unused_value): Likewise.
5200 (strict_aliasing_warning): Likewise.
5201 (sizeof_pointer_memaccess_warning): Likewise.
5202 (check_main_parameter_types): Likewise.
5203 (conversion_warning): Likewise.
5204 (warnings_for_convert_and_check): Likewise.
5205 (match_case_to_enum_1): Likewise.
5206 (match_case_to_enum): Likewise.
5207 (c_do_switch_warnings): Likewise.
5208 (warn_for_omitted_condop): Likewise.
5209 (readonly_error): Likewise.
5210 (lvalue_error): Likewise.
5211 (invalid_indirection_error): Likewise.
5212 (warn_array_subscript_with_type_char): Likewise.
5213 (warn_about_parentheses): Likewise.
5214 (warn_for_unused_label): Likewise.
5215 (warn_for_div_by_zero): Likewise.
5216 (warn_for_memset): Likewise.
5217 (warn_for_sign_compare): Likewise.
5218 (do_warn_double_promotion): Likewise.
5219 (do_warn_unused_parameter): Likewise.
5220 (record_locally_defined_typedef): Likewise.
5221 (maybe_record_typedef_use): Likewise.
5222 (maybe_warn_unused_local_typedefs): Likewise.
5223 (maybe_warn_bool_compare): Likewise.
5224 (maybe_warn_shift_overflow): Likewise.
5225 (warn_duplicated_cond_add_or_warn): Likewise.
5226 (diagnose_mismatched_attributes): Likewise.
5227 * c-common.h: Move the declarations from c-warn.c to its own section.
5228 * c-warn.c: New file.
5229
627be19f
JM
52302016-10-08 Jason Merrill <jason@redhat.com>
5231
5232 * c-common.c (c_common_truthvalue_conversion): Don't distribute
5233 into COND_EXPR in C++.
5234
7bad794a
JJ
52352016-10-08 Jakub Jelinek <jakub@redhat.com>
5236
5237 * c-lex.c (c_lex_with_flags) <case CPP_COMMENT>: For CPP_COMMENT
5238 token with PREV_FALLTHROUGH, skip all following CPP_PADDING and
5239 CPP_COMMENT tokens and set add_flags to PREV_FALLTHROUGH afterwards.
5240
be845b04
JJ
52412016-10-07 Jakub Jelinek <jakub@redhat.com>
5242
5243 Implement LWG2296 helper intrinsic
5244 * c-common.h (enum rid): Add RID_ADDRESSOF.
5245 * c-common.c (c_common_reswords): Add __builtin_addressof.
5246
c09c4992
BE
52472016-10-07 Bernd Edlinger <bernd.edlinger@hotmail.de>
5248
5249 PR c++/77700
5250 * c-common.c (c_common_truthvalue_conversion): Warn also for
5251 suspicious enum values in boolean context.
5252
342cfb3e
JJ
52532016-10-06 Jakub Jelinek <jakub@redhat.com>
5254
5255 Implement P0258R2 - helper for C++17
5256 std::has_unique_object_representations trait
5257 * c-common.h (enum rid): Add RID_HAS_UNIQUE_OBJ_REPRESENTATIONS.
5258 * c-common.c (c_common_reswords): Add
5259 __has_unique_object_representations.
5260
2e69f143
JJ
52612016-10-05 Jakub Jelinek <jakub@redhat.com>
5262
5263 PR sanitizer/66343
5264 * c-ubsan.c (ubsan_instrument_return): Don't call
5265 initialize_sanitizer_builtins here.
5266
700fff34
BE
52672016-10-05 Bernd Edlinger <bernd.edlinger@hotmail.de>
5268
5269 * c-common.c (c_common_truthvalue_conversion): Warn also for suspicious
5270 conditional expression in boolean context when only one arm is
5271 non-boolean.
5272
9563bfcd
JJ
52732016-10-05 Jakub Jelinek <jakub@redhat.com>
5274
04a32443
JJ
5275 PR sanitizer/77823
5276 * c-ubsan.c (ubsan_instrument_shift): Return NULL_TREE if type0
5277 is not integral.
5278
9563bfcd
JJ
5279 * c-common.c (c_common_reswords): Update comment for C++11.
5280
f1644724
JM
52812016-10-04 Jason Merrill <jason@redhat.com>
5282
5283 * c-common.c (make_tree_vector_from_ctor): New.
5284 * c-common.h: Declare it.
5285
5a79befb
JJ
52862016-10-04 Jakub Jelinek <jakub@redhat.com>
5287
5288 * c-cppbuiltin.c (c_cpp_builtins): Don't define
5289 __LIBGCC_JCR_SECTION_NAME__.
5290
1633d3b9
BE
52912016-10-03 Bernd Edlinger <bernd.edlinger@hotmail.de>
5292
5293 * c-common.c (c_common_truthvalue_conversion): Warn for suspicious
5294 left shift in boolean context.
5295
a2c6e7f2
JJ
52962016-09-29 Jakub Jelinek <jakub@redhat.com>
5297
5298 Implement P0001R1 - C++17 removal of register storage class specifier
5299 * c.opt (Wregister): New warning.
5300 * c-opts.c (c_common_post_options): Enable -Wregister by
5301 default for C++17.
5302
75304c87
JG
53032016-09-29 James Greenhalgh <james.greenhalgh@arm.com>
5304
5305 * c-opts.c (c_common_post_options): Remove special case for
5306 TARGET_FLT_EVAL_METHOD_NON_DEFAULT with -fexcess-precision=standard
5307 in C++.
5308
bbfac6da
JJ
53092016-09-27 Jakub Jelinek <jakub@redhat.com>
5310
6e39060a
JJ
5311 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_capture_star_this for
5312 -std=c++1z.
5313
bbfac6da
JJ
5314 * c-ada-spec.c (print_ada_declaration): Remove break after return.
5315
e73cf9a2
TP
53162016-09-26 Thomas Preud'homme <thomas.preudhomme@arm.com>
5317
5318 * c-common.c: Include memmodel.h.
5319
c6147dc4
MP
53202016-09-26 Marek Polacek <polacek@redhat.com>
5321
5322 * c-lex.c (c_common_has_attribute): Handle attribute fallthrough.
5323
81fea426
MP
53242016-09-26 Marek Polacek <polacek@redhat.com>
5325
5326 PR c/7652
5327 * c-common.c (c_common_attribute_table): Add fallthrough attribute.
5328 (handle_fallthrough_attribute): New function.
5329 (attribute_fallthrough_p): New function.
5330 * c-common.h (attribute_fallthrough_p): Declare.
5331
9a2300e9
MP
53322016-09-24 Marek Polacek <polacek@redhat.com>
5333
5334 PR c/77490
5335 * c.opt (Wbool-operation): New.
5336
a09e9e35
BE
53372016-09-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
5338
5339 * c-common.c (c_common_truthvalue_conversion): Inhibit
5340 Wint-in-bool-context warning with from_macro_definition_at.
5341 Mention the expression will always evaluate to true.
5342
d43b4ccc
MS
53432016-09-21 Martin Sebor <msebor@redhat.com>
5344
5345 PR bootstrap/77676
5346 * c.opt (fprintf-return-value): Temporarily initialize to zero
5347 to unblock bootstrap failures.
5348
2e1c20b1
JJ
53492016-09-21 Jakub Jelinek <jakub@redhat.com>
5350
5351 PR c++/77651
5352 * c.opt (Waligned-new=): Add RejectNegative.
5353 (faligned-new=): Likewise. Spelling fix - change
5354 aligned_new_threshhold to aligned_new_threshold.
5355 * c-cppbuiltin.c (c_cpp_builtins): Change aligned_new_threshhold
5356 to aligned_new_threshold.
5357
88d0c3f0
MS
53582016-09-20 Martin Sebor <msebor@redhat.com>
5359
5360 PR middle-end/49905
5361 * c.opt: Add -Wformat-length and -fprintf-return-value.
5362
144a96e4
BE
53632016-09-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
5364
5365 PR c++/77434
5366 * c.opt (Wint-in-bool-context): New warning.
5367 * c-common.c (c_common_truthvalue_conversion): Warn on integer
5368 constants in boolean context.
5369
63012d9a
JM
53702016-09-19 Joseph Myers <joseph@codesourcery.com>
5371
5372 * c-common.c (max_align_t_align): Also consider alignment of
5373 float128_type_node.
5374
931388ce
JM
53752016-09-15 Jason Merrill <jason@redhat.com>
5376
5377 * c-common.c (check_cxx_fundamental_alignment_constraints): Check
5378 DECL_EXTERNAL.
5379
38711381
JM
53802016-09-14 Jason Merrill <jason@redhat.com>
5381
5382 * c-common.c (check_cxx_fundamental_alignment_constraints): Don't
5383 limit FIELD_DECL, either.
5384
e51fbec3
MP
53852016-09-14 Marek Polacek <polacek@redhat.com>
5386
5387 * c-common.c (c_common_truthvalue_conversion): Use false instead of 0.
5388 * c-common.h (build_unary_op): Change nonconvert parameter type to bool.
5389 * c-omp.c (c_finish_omp_atomic): Use false instead of 0.
5390
254830ba
DM
53912016-09-13 David Malcolm <dmalcolm@redhat.com>
5392
5393 * c-common.c (warn_logical_not_parentheses): Replace
5394 rich_location::add_fixit_insert calls with add_fixit_insert_before
5395 and add_fixit_insert_after, eliminating the "next_loc" calculation.
5396
42763690
JM
53972016-09-13 Jason Merrill <jason@redhat.com>
5398 Tom de Vries <tom@codesourcery.com>
5399
5400 PR c++/77427
5401 * c-common.c (set_underlying_type): Don't treat array as builtin type.
5402
9453eee9
JM
54032016-09-13 Jason Merrill <jason@redhat.com>
5404
5405 * c-common.c (check_cxx_fundamental_alignment_constraints): Don't
5406 limit types at all.
5407
e96809e3
JM
54082016-09-12 Jason Merrill <jason@redhat.com>
5409
5410 * c-common.c (check_cxx_fundamental_alignment_constraints): Fix
5411 bit/byte confusion, allow large alignment for types.
5412
54dcdb88
BE
54132016-09-12 Bernd Edlinger <bernd.edlinger@hotmail.de>
5414
5415 PR c++/77496
5416 * c-common.c (warn_for_omitted_condop): Also warn for boolean data.
5417
d1463eb9
DM
54182016-09-12 David Malcolm <dmalcolm@redhat.com>
5419
5420 PR c/72858
5421 * c-format.c (argument_parser::check_argument_type): Add params
5422 "type_start" and "conversion_char". Use the former to generate
5423 offset_to_type_start and pass it and conversion_char to
5424 check_format_types.
5425 (check_format_info_main): Capture the start of the type
5426 information as "type_start", and pass it an format_char
5427 to arg_parser.check_argument_type.
5428 (check_format_types): Provide an example in the leading comment.
5429 Add params "offset_to_type_start" and "conversion_char"; pass
5430 them to format_type_warning calls.
5431 (test_get_modifier_for_format_len): Likewise.
5432 (matching_type_p): New function.
5433 (get_format_for_type): Add param "conversion_char" and move
5434 implementation into...
5435 (get_format_for_type_1): ...new function, called twice.
5436 Use new function matching_type_p rather than checking for
5437 TYPE_CANONICAL equality.
5438 (get_corrected_substring): New function.
5439 (format_type_warning): Provide an example in the leading comment.
5440 Add params "offset_to_type_start" and "conversion_char". Replace
5441 call to get_format_for_type with call to get_corrected_substring
5442 and move rejection of hints for widths/precisions there.
5443 (assert_format_for_type_streq): Add param "conversion_char".
5444 (ASSERT_FORMAT_FOR_TYPE_STREQ): Add param CONVERSION_CHAR.
5445 (test_get_format_for_type_printf): Add conversion chars to the
5446 tests, adding coverage for various combinations of integer
5447 vs double conversions, and for preserving octal and hexadecimal
5448 conversions.
5449 (test_get_format_for_type_scanf): Add conversion chars to the
5450 tests.
5451
5b28efbb
TV
54522016-09-10 Tom de Vries <tom@codesourcery.com>
5453
5454 PR C/71602
5455 * c-common.c (build_va_arg): Handle more strict
5456 targetm.canonical_va_list_type. Replace first argument type error with
5457 assert.
5458
3f0177e7
MS
54592016-09-09 Martin Sebor <msebor@redhat.com>
5460
5461 PR c/77520
5462 PR c/77521
5463 * c-format.c (argument_parser::find_format_char_info): Use %qc
5464 format directive unconditionally.
5465
af63ba4b
JM
54662016-09-09 Jason Merrill <jason@redhat.com>
5467
5468 Implement C++17 new of over-aligned types.
5469 * c.opt: Add -faligned-new and -Waligned-new.
5470 * c-common.c (max_align_t_align): Split out from...
5471 (cxx_fundamental_alignment_p): ...here.
5472 * c-common.h: Declare it.
5473 * c-cppbuiltin.c (c_cpp_builtins): Handle aligned new.
5474
c65248cb
JM
54752016-09-09 Joseph Myers <joseph@codesourcery.com>
5476
5477 * c-cppbuiltin.c (builtin_define_type_width): New function.
5478 (builtin_define_stdint_macros, c_cpp_builtins): Define type width
5479 macros.
5480
e5106e27
DM
54812016-09-07 David Malcolm <dmalcolm@redhat.com>
5482
5483 * c-common.c (get_cpp_ttype_from_string_type): Handle being passed
5484 a POINTER_TYPE.
5485 (substring_loc::get_location): Move to substring-locations.c,
5486 keeping implementation as...
5487 (c_get_substring_location): New function, from the above, reworked
5488 to use accessors rather than member lookup.
5489 * c-common.h (class substring_loc): Move to substring-locations.h,
5490 replacing with a forward decl.
5491 (c_get_substring_location): New decl.
5492 * c-format.c: Include "substring-locations.h".
5493 (format_warning_va): Move to substring-locations.c.
5494 (format_warning_at_substring): Likewise.
5495
ab20d992 54962016-09-06 Martin Sebor <msebor@redhat.com>
a42e7952
MS
5497
5498 PR c/77336
5499 * c-format.c (check_function_format): Avoid issuing warnings for
5500 functions unless they call format functions with non-constant
5501 format strings.
5502
b772a565
RB
55032016-09-06 Richard Biener <rguenther@suse.de>
5504
5505 PR c/77450
5506 * c-common.c (c_common_mark_addressable_vec): Handle
5507 COMPOUND_LITERAL_EXPR.
5508
25ff5dd3
MP
55092016-09-05 Marek Polacek <polacek@redhat.com>
5510
5511 PR c/77423
5512 * c-common.c (bool_promoted_to_int_p): New function.
5513 (expr_has_boolean_operands_p): New function.
5514 (warn_logical_not_parentheses): Return if expr_has_boolean_operands_p.
5515 (maybe_warn_bool_compare): Use bool_promoted_to_int_p.
5516
21234eb5
TV
55172016-09-04 Tom de Vries <tom@codesourcery.com>
5518
5519 revert:
5520 2016-08-29 Tom de Vries <tom@codesourcery.com>
5521
5522 * c-common.c (build_va_arg): Replace first argument type error
5523 with assert.
5524
9dc5773f
JJ
55252016-09-02 Jakub Jelinek <jakub@redhat.com>
5526
5527 PR c/65467
5528 * c-omp.c (c_finish_omp_atomic): Reject _Atomic qualified expressions.
5529 (c_finish_omp_for): Reject _Atomic qualified iterators.
5530
55312016-09-01 Martin Sebor <msebor@redhat.com>
3d7b83b6
MS
5532
5533 * c-ada-spec.c (dump_ada_function_declaration): Increase buffer
5534 size to guarantee it fits the output of the formatted function
5535 regardless of its arguments.
5536
295844f6
MP
55372016-09-01 Marek Polacek <polacek@redhat.com>
5538
5539 PR c/7652
5540 * c-common.c (resolve_overloaded_builtin): Fix formatting. Add
5541 FALLTHRU comments.
5542
3d06b6f2
MP
55432016-08-29 Marek Polacek <polacek@redhat.com>
5544
5545 PR c/77292
5546 * c-common.c (warn_logical_not_parentheses): Don't warn for
5547 a comparison or a logical operator.
5548
34cedad5
TV
55492016-08-29 Tom de Vries <tom@codesourcery.com>
5550
5551 * c-common.c (build_va_arg): Fix type comparison assert.
5552
f162d717
TV
55532016-08-29 Tom de Vries <tom@codesourcery.com>
5554
5555 * c-common.c (build_va_arg): Replace first argument type error
5556 with assert.
5557
ba9bbd6f
TV
55582016-08-29 Tom de Vries <tom@codesourcery.com>
5559
5560 PR c/77398
5561 * c-common.c (build_va_arg): Add first argument error. Build va_arg
5562 with error_mark_node as va_list instead of with illegal va_list.
5563
ebef225f
MP
55642016-08-25 Marek Polacek <polacek@redhat.com>
5565 David Malcolm <dmalcolm@redhat.com>
5566
5567 * c-common.c (warn_logical_not_parentheses): Print fixit hints.
5568 * c-common.h (warn_logical_not_parentheses): Update declaration.
5569
b00e6e75
MP
55702016-08-22 Marek Polacek <polacek@redhat.com>
5571
5572 PR c++/77321
5573 * c-common.c (warn_for_memset): Check type for null.
5574
6dc198e3
JM
55752016-08-22 Joseph Myers <joseph@codesourcery.com>
5576
14ec014e 5577 * c-cppbuiltin.c (c_cpp_builtins): Check _FloatN and
6dc198e3
JM
5578 _FloatNx types for suffixes for built-in functions.
5579
c65699ef
JM
55802016-08-19 Joseph Myers <joseph@codesourcery.com>
5581
5582 PR c/32187
5583 * c-common.h (RID_FLOAT16, RID_FLOATN_NX_FIRST, RID_FLOAT32)
5584 (RID_FLOAT64, RID_FLOAT128, RID_FLOAT32X, RID_FLOAT64X)
5585 (RID_FLOAT128X): New enum rid values.
5586 (CASE_RID_FLOATN_NX): New macro.
5587 * c-common.c (c_common_reswords): Add _FloatN and _FloatNx
5588 keywords.
5589 (c_common_type_for_mode): Check for _FloatN and _FloatNx and
5590 corresponding complex types.
5591 (c_common_nodes_and_builtins): For non-C++, register _FloatN and
5592 _FloatNx and corresponding complex types.
5593 (keyword_begins_type_specifier): Use CASE_RID_FLOATN_NX.
5594 * c-cppbuiltin.c (builtin_define_float_constants): Check _FloatN
5595 and _FloatNx types for the widest type for determining
5596 DECIMAL_DIG. Define __LDBL_DECIMAL_DIG__ as well as
5597 __DECIMAL_DIG__ for long double. Handle FMA_SUFFIX being NULL.
5598 (c_cpp_builtins): Call builtin_define_float_constants for _FloatN
5599 and _FloatNx types.
5600 * c-lex.c (interpret_float): Handle _FloatN and _FloatNx
5601 constants.
5602 * c-pretty-print.c (pp_c_floating_constant): Handle _FloatN and
5603 _FloatNx types.
5604
cc015f3a
DM
56052016-08-18 David Malcolm <dmalcolm@redhat.com>
5606
5607 * c-opts.c (c_diagnostic_finalizer): Update for change to
5608 diagnostic_show_locus.
5609
cb18fd07
DM
56102016-08-18 David Malcolm <dmalcolm@redhat.com>
5611
5612 * c-common.c: Include "spellcheck.h".
5613 (cb_get_suggestion): New function.
5614 * c-common.h (cb_get_suggestion): New decl.
5615 * c-lex.c (init_c_lex): Initialize cb->get_suggestion to
5616 cb_get_suggestion.
5617
a76989dc
MP
56182016-08-18 Marek Polacek <polacek@redhat.com>
5619
5620 PR c/71514
5621 * c-common.c (get_atomic_generic_size): Disallow pointer-to-function
5622 and pointer-to-VLA.
5623
65e736c0
DM
56242016-08-16 David Malcolm <dmalcolm@redhat.com>
5625
5626 PR c/72857
5627 * c-common.c (substring_loc::get_range): Rename to...
5628 (substring_loc::get_location): ...this, converting param from a
5629 source_range * to a location_t *. Call
5630 get_source_location_for_substring rather than
5631 get_source_range_for_substring, and pass in m_caret_idx.
5632 * c-common.h (substring_loc::substring_loc): Add param "caret_idx".
5633 (substring_loc::get_range): Replace with...
5634 (substring_loc::get_location): ...this.
5635 (substring_loc::set_caret_index): New method.
5636 (substring_loc): Add field m_caret_idx.
5637 * c-format.c (format_warning_va): Update for above changes.
5638 Rename local "substring_loc" to "fmt_substring_loc" to avoid
5639 clashing with type name.
5640 (format_warning_at_char): Add caret_idx param to substring_loc ctor.
5641 (check_argument_type): Likewise.
5642 (format_type_warning): Rename param "fmt_loc" to "whole_fmt_loc"
5643 Use a copy when emitting warnings, setting the caret index from TYPE.
5644
7e1dde14 56452016-08-16 Eric Botcazou <ebotcazou@adacore.com>
8e745a17 5646 Arnaud Charlet <charlet@adacore.com>
7e1dde14
EB
5647
5648 * c-ada-spec.c (dump_number): New function.
5649 (handle_escape_character): Likewise.
5650 (print_ada_macros): Add handling of constant integers and strings.
5651
191816a3
MP
56522016-08-12 Marek Polacek <polacek@redhat.com>
5653
5654 PR c/7652
5655 * c-common.c (scalar_to_vector): Adjust fall through comment.
5656 * c-opts.c (c_common_handle_option): Likewise.
5657 * c-pragma.c (handle_pragma_pack): Add FALLTHRU.
5658 * c-pretty-print.c (c_pretty_printer::postfix_expression): Adjust
5659 fall through comment.
5660 * cilk.c (extract_free_variables): Add FALLTHRU.
5661
452df4a4
JM
56622016-08-10 Jason Merrill <jason@redhat.com>
5663
5664 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_if_constexpr.
5665
f3365c12
JM
56662016-08-09 Jason Merrill <jason@redhat.com>
5667
5668 * c-common.c (c_common_attribute_table): vector_size affects type
5669 identity.
5670
f0bc3323
MP
56712016-08-09 Marek Polacek <polacek@redhat.com>
5672
5673 PR c/7652
5674 * c-ada-spec.c (dump_generic_ada_node): Add return.
5675
98e5a19a
JM
56762016-08-09 Jason Merrill <jason@redhat.com>
5677
5678 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_constexpr for
5679 C++17 constexpr lambdas.
5680
895aa8e1
DM
56812016-08-08 David Malcolm <dmalcolm@redhat.com>
5682
5683 PR c/64955
5684 * c-common.h (selftest::c_format_c_tests): New declaration.
5685 (selftest::run_c_tests): New declaration.
5686 * c-format.c: Include "selftest.h.
5687 (format_warning_va): Add param "corrected_substring" and use
5688 it to add a replacement fix-it hint.
5689 (format_warning_at_substring): Likewise.
5690 (format_warning_at_char): Update for new param of
5691 format_warning_va.
5692 (argument_parser::check_argument_type): Pass "fki" to
5693 check_format_types.
5694 (check_format_types): Add param "fki" and pass it to
5695 format_type_warning.
5696 (deref_n_times): New function.
5697 (get_modifier_for_format_len): New function.
5698 (selftest::test_get_modifier_for_format_len): New function.
5699 (get_format_for_type): New function.
5700 (format_type_warning): Add param "fki" and use it to attempt
5701 to provide hints for argument types when calling
5702 format_warning_at_substring.
5703 (selftest::get_info): New function.
5704 (selftest::assert_format_for_type_streq): New function.
5705 (ASSERT_FORMAT_FOR_TYPE_STREQ): New macro.
5706 (selftest::test_get_format_for_type_printf): New function.
5707 (selftest::test_get_format_for_type_scanf): New function.
5708 (selftest::c_format_c_tests): New function.
5709
e52ed3fe
DM
57102016-08-08 David Malcolm <dmalcolm@redhat.com>
5711
5712 PR c/52952
5713 * c-format.c: Include "diagnostic.h".
5714 (location_column_from_byte_offset): Delete.
5715 (location_from_offset): Delete.
5716 (format_warning_va): New function.
5717 (format_warning_at_substring): New function.
5718 (format_warning_at_char): New function.
5719 (check_format_arg): Capture location of format_tree and pass to
5720 check_format_info_main.
5721 (argument_parser): Add fields "start_of_this_format" and
5722 "format_string_cst".
5723 (flag_chars_t::validate): Add param "format_string_cst". Convert
5724 warning_at call using location_from_offset to call to
5725 format_warning_at_char.
5726 (argument_parser::argument_parser): Add param "format_string_cst_"
5727 and use use it to initialize field "format_string_cst".
5728 Initialize new field "start_of_this_format".
5729 (argument_parser::read_format_flags): Convert warning_at call
5730 using location_from_offset to a call to format_warning_at_char.
5731 (argument_parser::read_any_format_left_precision): Likewise.
5732 (argument_parser::read_any_format_precision): Likewise.
5733 (argument_parser::read_any_other_modifier): Likewise.
5734 (argument_parser::find_format_char_info): Likewise, in three places.
5735 (argument_parser::parse_any_scan_set): Likewise, in one place.
5736 (argument_parser::handle_conversions): Likewise, in two places.
5737 (argument_parser::check_argument_type): Add param "fmt_param_loc"
5738 and use it to make a substring_loc. Pass the latter to
5739 check_format_types.
5740 (check_format_info_main): Add params "fmt_param_loc" and
5741 "format_string_cst". Convert warning_at calls using
5742 location_from_offset to calls to format_warning_at_char. Pass the
5743 new params to the arg_parser ctor. Pass "format_string_cst" to
5744 flag_chars.validate. Pass "fmt_param_loc" to
5745 arg_parser.check_argument_type.
5746 (check_format_types): Convert first param from a location_t
5747 to a const substring_loc & and rename to "fmt_loc". Attempt
5748 to extract the range of the relevant parameter and pass it
5749 to format_type_warning.
5750 (format_type_warning): Convert first param from a location_t
5751 to a const substring_loc & and rename to "fmt_loc". Add
5752 params "param_range" and "type". Replace calls to warning_at
5753 with calls to format_warning_at_substring.
5754
1c4d457e
DM
57552016-08-08 David Malcolm <dmalcolm@redhat.com>
5756
5757 * c-format.c (class flag_chars_t): New class.
5758 (struct length_modifier): New struct.
5759 (class argument_parser): New class.
5760 (flag_chars_t::flag_chars_t): New ctor.
5761 (flag_chars_t::has_char_p): New method.
5762 (flag_chars_t::add_char): New method.
5763 (flag_chars_t::validate): New method.
5764 (flag_chars_t::get_alloc_flag): New method.
5765 (flag_chars_t::assignment_suppression_p): New method.
5766 (argument_parser::argument_parser): New ctor.
5767 (argument_parser::read_any_dollar): New method.
5768 (argument_parser::read_format_flags): New method.
5769 (argument_parser::read_any_format_width): New method.
5770 (argument_parser::read_any_format_left_precision): New method.
5771 (argument_parser::read_any_format_precision): New method.
5772 (argument_parser::handle_alloc_chars): New method.
5773 (argument_parser::read_any_length_modifier): New method.
5774 (argument_parser::read_any_other_modifier): New method.
5775 (argument_parser::find_format_char_info): New method.
5776 (argument_parser::validate_flag_pairs): New method.
5777 (argument_parser::give_y2k_warnings): New method.
5778 (argument_parser::parse_any_scan_set): New method.
5779 (argument_parser::handle_conversions): New method.
5780 (argument_parser::check_argument_type): New method.
5781 (check_format_info_main): Introduce classes argument_parser
5782 and flag_chars_t, moving the code within the loop into methods
5783 of these classes. Make various locals "const".
5784
88fa5555
DM
57852016-08-05 David Malcolm <dmalcolm@redhat.com>
5786
5787 * c-common.c: Include "substring-locations.h".
5788 (get_cpp_ttype_from_string_type): New function.
5789 (g_string_concat_db): New global.
5790 (substring_loc::get_range): New method.
5791 * c-common.h (g_string_concat_db): New declaration.
5792 (class substring_loc): New class.
5793 * c-lex.c (lex_string): When concatenating strings, capture the
5794 locations of all tokens using a new obstack, and record the
5795 concatenation locations within g_string_concat_db.
5796 * c-opts.c (c_common_init_options): Construct g_string_concat_db
5797 on the ggc-heap.
5798
78169471
MP
57992016-07-29 Marek Polacek <polacek@redhat.com>
5800
638fc14f
MP
5801 PR c/71926
5802 * c-common.c (c_common_truthvalue_conversion): Use LOCATION for the
5803 parentheses warning.
5804
78169471
MP
5805 PR c/71574
5806 * c-common.c (handle_alloc_align_attribute): Also check FUNCTION_DECL.
5807
1225d6b1
ML
58082016-07-28 Martin Liska <mliska@suse.cz>
5809
5810 PR gcov-profile/68025
5811 * c-common.c (handle_no_profile_instrument_function_attribute):
5812
ec1e2a40
BE
58132016-07-27 Bernd Edlinger <bernd.edlinger@hotmail.de>
5814
5815 * c-common.c (check_user_alignment): Use LOG2_BITS_PER_UNIT instead of
5816 BITS_PER_UNIT_LOG.
5817
5ec2cd9f
JM
58182016-07-25 Jason Merrill <jason@redhat.com>
5819
5820 PR c++/65970
5821 * c.opt (fconstexpr-loop-limit): New.
5822
9dc5773f 58232016-07-22 Martin Sebor <msebor@redhat.com>
2e6b45af
MS
5824
5825 PR c++/71675
5826 * c-common.c (resolve_overloaded_builtin): Avoid converting
5827 __atomic_compare_exchange_n return type to that of what its
5828 first argument points to.
5829
e3fe09c1
UB
58302016-07-22 Uros Bizjak <ubizjak@gmail.com>
5831
5832 * c-common.c: Use HOST_WIDE_INT_M1U instead of
5833 ~(unsigned HOST_WIDE_INT) 0.
5834
bc91c436
ML
58352016-07-22 Martin Liska <mliska@suse.cz>
5836
5837 PR gcov-profile/69028
5838 PR gcov-profile/62047
5839 * cilk.c (create_cilk_helper_decl): Set location of a new decl
5840 to the current_function_decl.
5841
451dcc66
JM
58422016-07-21 Jason Merrill <jason@redhat.com>
5843
5844 PR c++/65168
5845 * c-common.c (c_common_truthvalue_conversion): Check
5846 c_inhibit_evaluation_warnings for warning about address of
5847 reference.
5848
de6a69ee
DM
58492016-07-20 David Malcolm <dmalcolm@redhat.com>
5850
5851 * c-common.h (lookup_name_fuzzy): Convert return type from tree to
5852 const char *.
5853
d022c55a
JM
58542016-07-15 Jason Merrill <jason@redhat.com>
5855
5856 * c-opts.c (c_common_post_options): Update -fabi-version default to 11.
5857
ddbbcb19
JJ
58582016-07-15 Jakub Jelinek <jakub@redhat.com>
5859
5860 PR c/71858
5861 * c-common.h (enum lookup_name_fuzzy_kind): Add
5862 FUZZY_LOOKUP_FUNCTION_NAME.
5863
d0cf395a
JM
58642016-07-08 Jason Merrill <jason@redhat.com>
5865
5866 P0145: Refining Expression Order for C++.
5867 * c.opts (-fargs-in-order): Rename to -fstrong-eval-order.
5868 * c-opts.c: Adjust.
5869
98d44e93
MT
58702016-07-05 Markus Trippelsdorf <markus@trippelsdorf.de>
5871
5872 PR c++/71214
5873 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_rvalue_references.
5874
f9d8d994
TS
58752016-06-29 Thomas Schwinge <thomas@codesourcery.com>
5876
5877 * c-pragma.h (enum pragma_kind): Rename
5878 PRAGMA_OMP_DECLARE_REDUCTION to PRAGMA_OMP_DECLARE. Adjust all
5879 users.
5880
4aa83879
RB
58812016-06-29 Richard Biener <rguenther@suse.de>
5882
5883 PR middle-end/71002
5884 * c-common.c (c_common_get_alias_set): Remove union type punning case.
5885
a25bd9e6
JM
58862016-06-24 Jason Merrill <jason@redhat.com>
5887
5888 P0145R2: Refining Expression Order for C++.
5889 * c-common.c (verify_tree) [COMPOUND_EXPR]: Fix handling on LHS of
5890 MODIFY_EXPR.
5891
a86451b9
JJ
58922016-06-24 Jakub Jelinek <jakub@redhat.com>
5893
5894 * c-common.c (check_builtin_function_arguments): Require last
5895 argument of BUILT_IN_*_OVERFLOW_P to have INTEGER_TYPE type.
5896 Adjust wording of diagnostics for BUILT_IN_*_OVERLFLOW
5897 if the last argument is pointer to enumerated or boolean type.
5898
1a4f11c8
DM
58992016-06-22 David Malcolm <dmalcolm@redhat.com>
5900
5901 PR c/70339
5902 * c-common.h (enum lookup_name_fuzzy_kind): New enum.
5903 (lookup_name_fuzzy): New prototype.
5904
fe55692c
JDA
59052016-06-21 John David Anglin <danglin@gcc.gnu.org>
5906
5907 * c-common.c (get_source_date_epoch): Use int64_t instead of long long.
5908
4eb24e01
JM
59092016-06-14 Jason Merrill <jason@redhat.com>
5910
5911 P0145R2: Refining Expression Order for C++.
5912 * c.opt (fargs-in-order): New.
5913 * c-opts.c (c_common_post_options): Adjust flag_args_in_order.
5914
ef7cf206
JJ
59152016-06-13 Jakub Jelinek <jakub@redhat.com>
5916
0dda258b
JJ
5917 PR sanitizer/71498
5918 * c-gimplify.c (ubsan_walk_array_refs_r): Set *walk_subtrees = 0 on
5919 all BIND_EXPRs, and on all BIND_EXPRs recurse also on BIND_EXPR_BODY.
5920
ef7cf206
JJ
5921 PR preprocessor/71183
5922 * c-ppoutput.c (init_pp_output): Set cb->get_source_date_epoch
5923 to cb_get_source_date_epoch.
5924
50b15873
JJ
59252016-06-10 Jakub Jelinek <jakub@redhat.com>
5926
5927 PR c/68657
5928 * c.opt (Wpsabi): Add Warning flag.
5929
4d926e34
MS
59302016-06-10 Martin Sebor <msebor@redhat.com>
5931
5932 PR c/71392
14ec014e 5933 * c-common.c (handle_nonnull_attribute): Accept
4d926e34
MS
5934 the nonnull attribute in type-generic builtins.
5935
e01b4e16
MS
59362016-06-09 Martin Sebor <msebor@redhat.com>
5937
5938 PR c/70883
5939 * c-common.c (builtin_function_validate_nargs): Make text of error
5940 message consistent with others like it.
5941
44a845ca
MS
59422016-06-08 Martin Sebor <msebor@redhat.com>
5943 Jakub Jelinek <jakub@redhat.com>
5944
5945 PR c++/70507
5946 PR c/68120
5947 * c-common.c (check_builtin_function_arguments): Handle
5948 BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
5949
a80a7051
RB
59502016-06-08 Richard Biener <rguenther@suse.de>
5951
5952 * c-common.c (parse_optimize_options): Improve diagnostic messages.
5953
bfd67b47
RB
59542016-06-07 Richard Biener <rguenther@suse.de>
5955
5956 PR c/61564
5957 * c-common.c (parse_optimize_options): Only apply CL_OPTIMIZATION
5958 options and warn about others.
5959
15c98b2e
ES
59602016-06-01 Eduard Sanou <dhole@openmailbox.org>
5961
5962 * c-common.c (get_source_date_epoch): Rename to
5963 cb_get_source_date_epoch.
5964 * c-common.c (cb_get_source_date_epoch): Use a single generic erorr
5965 message when the parsing fails. Use error_at instead of fatal_error.
5966 * c-common.h (get_source_date_epoch): Rename to
5967 cb_get_source_date_epoch.
5968 * c-common.h (cb_get_source_date_epoch): Prototype.
5969 * c-common.h (MAX_SOURCE_DATE_EPOCH): Define.
5970 * c-common.h (c_omp_region_type): Remove trailing comma.
5971 * c-lex.c (init_c_lex): Set cb->get_source_date_epoch callback.
5972 * c-lex.c (c_lex_with_flags): Remove initialization of
5973 pfile->source_date_epoch.
5974
00631022
JJ
59752016-05-30 Jakub Jelinek <jakub@redhat.com>
5976
5977 PR c++/71349
5978 * c-omp.c (c_omp_split_clauses): Put OMP_CLAUSE_DEPEND to
5979 C_OMP_CLAUSE_SPLIT_TARGET. Put OMP_CLAUSE_NOWAIT to
5980 C_OMP_CLAUSE_SPLIT_TARGET if combined with target construct,
5981 instead of C_OMP_CLAUSE_SPLIT_FOR.
5982
f17a223d
RB
59832016-05-24 Richard Biener <rguenther@suse.de>
5984
5985 PR middle-end/70434
5986 PR c/69504
5987 * c-common.h (convert_vector_to_pointer_for_subscript): Rename to ...
5988 (convert_vector_to_array_for_subscript): ... this.
5989 * c-common.c (convert_vector_to_pointer_for_subscript): Use a
5990 VIEW_CONVERT_EXPR to an array type. Rename to ...
5991 (convert_vector_to_array_for_subscript): ... this.
5992
4f2e1536
MP
59932016-05-12 Marek Polacek <polacek@redhat.com>
5994
5995 PR c/70756
5996 * c-common.c (pointer_int_sum): Call size_in_bytes_loc instead of
5997 size_in_bytes and pass LOC to it.
5998
d6e83a8d
MM
59992016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
6000
6001 PR c/43651
6002 * c.opt (Wduplicate-decl-specifier): New option.
6003
5c3a10fb
MP
60042016-05-11 Marek Polacek <polacek@redhat.com>
6005
6006 PR c++/71024
6007 * c-common.c (diagnose_mismatched_attributes): New function.
6008 * c-common.h (diagnose_mismatched_attributes): Declare.
6009
deef7113
MP
60102016-05-04 Marek Polacek <polacek@redhat.com>
6011
6012 * c.opt (Wdangling-else): New option.
6013
79ce98bc
MP
60142016-05-03 Marek Polacek <polacek@redhat.com>
6015
6016 PR c/70859
6017 * c-common.c (builtin_function_validate_nargs): Add location
6018 parameter. Use it.
6019 (check_builtin_function_arguments): Add location and arguments
6020 parameters. Use them.
6021 * c-common.h (check_builtin_function_arguments): Update declaration.
6022
381cdae4
RB
60232016-05-03 Richard Biener <rguenther@suse.de>
6024
6025 * cilk.c (cilk_gimplify_call_params_in_spawned_fn): Do not
6026 allow call args to gimplify to SSA names.
6027
1d793c34
MP
60282016-05-03 Marek Polacek <polacek@redhat.com>
6029
6030 * c-common.h (enum c_omp_region_type): Remove stray comma.
6031
77886428
CP
60322016-05-02 Cesar Philippidis <cesar@codesourcery.com>
6033
6034 * c-common.h (enum c_omp_region_type): Define.
6035
697e0b28
RS
60362016-05-02 Richard Sandiford <richard.sandiford@arm.com>
6037
6038 * c-common.c (shorten_compare): Use wi::to_wide.
6039
e7ff0319
CP
60402016-04-29 Cesar Philippidis <cesar@codesourcery.com>
6041
6042 PR middle-end/70626
6043 * c-common.h (c_oacc_split_loop_clauses): Add boolean argument.
6044 * c-omp.c (c_oacc_split_loop_clauses): Use it to duplicate
6045 reduction clauses in acc parallel loops.
6046
2fff3db8
MP
60472016-04-29 Marek Polacek <polacek@redhat.com>
6048
6049 PR c/70852
6050 * c-common.c (warn_for_memset): Check domain before accessing it.
6051
509063eb
DV
60522016-04-29 Dominik Vogt <vogt@linux.vnet.ibm.com>
6053
6054 PR/69089
6055 * c-common.c (handle_aligned_attribute): Allow 0 as an argument to the
6056 "aligned" attribute.
6057
b632761d
JM
60582016-04-28 Jason Merrill <jason@redhat.com>
6059
6060 * c-lex.c (c_common_has_attribute): Handle nodiscard.
6061
174f6622
ES
60622016-04-28 Eduard Sanou <dhole@openmailbox.org>
6063 Matthias Klose <doko@debian.org>
6064
6065 * c-common.c (get_source_date_epoch): New function, gets the environment
7365279f 6066 variable SOURCE_DATE_EPOCH and parses it as long long with error
174f6622
ES
6067 handling.
6068 * c-common.h (get_source_date_epoch): Prototype.
6069 * c-lex.c (c_lex_with_flags): set parse_in->source_date_epoch.
6070
6bc2bb18
RB
60712015-04-27 Ryan Burn <contact@rnburn.com>
6072
6073 PR c++/69024
6074 PR c++/68997
6075 * cilk.c (cilk_ignorable_spawn_rhs_op): Change to external linkage.
6076 (cilk_recognize_spawn): Renamed from recognize_spawn and change to
6077 external linkage.
6078 (cilk_detect_and_unwrap): Corresponding changes.
6079 (extract_free_variables): Don't extract free variables from
6080 AGGR_INIT_EXPR slot.
6081 * c-common.h (cilk_ignorable_spawn_rhs_op): Prototype.
6082 (cilk_recognize_spawn): Likewise.
6083
c1e1f433
BS
60842016-04-27 Bernd Schmidt <bschmidt@redhat.com>
6085
6086 * c.opt (Wmemset-elt-size): New option.
6087 * c-common.c (warn_for_memset): New function.
6088 * c-common.h (warn_for_memset): Declare.
6089
d067e05f
JM
60902016-04-25 Jason Merrill <jason@redhat.com>
6091
6092 * c-common.c (handle_unused_attribute): Accept CONST_DECL.
6093 No longer static.
6094 * c-common.h: Declare it.
6095 * c-lex.c (c_common_has_attribute): Add maybe_unused.
6096
9aa36ae5
JM
60972016-04-22 Jason Merrill <jason@redhat.com>
6098
6099 * c-cppbuiltin.c (c_cpp_builtins): Fix __cpp_range_based_for.
6100
477d4906
IV
61012016-04-20 Ilya Verbin <ilya.verbin@intel.com>
6102
6103 PR c++/69363
6104 * c-cilkplus.c (c_finish_cilk_clauses): Remove function.
6105 * c-common.h (c_finish_cilk_clauses): Remove declaration.
6106
fe37c7af
MM
61072016-04-18 Michael Matz <matz@suse.de>
6108
6109 * c-common.c (handle_aligned_attribute): Use SET_TYPE_ALIGN
6110 and SET_DECL_ALIGN.
6111
23f2660f
EB
61122016-04-17 Eric Botcazou <ebotcazou@adacore.com>
6113
6114 * c-ada-spec.c (get_underlying_decl): Return the typedef, if any.
6115 (dump_generic_ada_node) <POINTER_TYPE>: Clean up handling of access
6116 to incomplete types.
6117 (dump_nested_type): Remove redundant tests and tidy up.
6118 (print_ada_declaration): Also set TREE_VISITED on the declaration of
6119 a type which is the typedef of an original type.
6120
1e77281b
MP
61212016-04-15 Marek Polacek <polacek@redhat.com>
6122
6123 PR c/70651
6124 * c-common.c (build_va_arg): Change two asserts into errors and return
6125 error_mark_node.
6126
b3a77f21
MP
61272016-04-13 Marek Polacek <polacek@redhat.com>
6128
6129 PR c++/70639
6130 * c-indentation.c (should_warn_for_misleading_indentation): Bail out
6131 for switch statements, too.
6132
322b8466
JM
61332016-03-28 Jason Merrill <jason@redhat.com>
6134
6135 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_range_based_for.
6136
fbdb6baf
MP
61372016-03-23 Marek Polacek <polacek@redhat.com>
6138
6139 PR c++/69884
6140 * c.opt (Wignored-attributes): New option.
6141
5c240f4d
DM
61422016-03-22 David Malcolm <dmalcolm@redhat.com>
6143
6144 PR c/69993
6145 * c-indentation.c (warn_for_misleading_indentation): Rewrite the
6146 diagnostic text, reversing the order of the warning and note so
6147 that they appear in source order.
6148
14ba7b28
MP
61492016-03-17 Marek Polacek <polacek@redhat.com>
6150
6151 PR c/69407
6152 * c-common.c (resolve_overloaded_builtin): Set TREE_USED for the fetch
6153 operations.
6154
08a1cadc
JM
61552016-03-14 Jason Merrill <jason@redhat.com>
6156
2aaeea19
JM
6157 * c-cppbuiltin.c (c_cpp_builtins): Set __cpp_hex_float.
6158
08a1cadc
JM
6159 * c-cppbuiltin.c (c_cpp_builtins): Bump __cpp_range_based_for.
6160
c06d25bb
RB
61612016-03-09 Richard Biener <rguenther@suse.de>
6162
6163 PR c/70143
6164 * c-common.c (strict_aliasing_warning): Add back
6165 alias_sets_conflict_p check.
6166
80aac5c8
JM
61672016-03-08 Jason Merrill <jason@redhat.com>
6168
6169 * c-opts.c (set_std_cxx1z): Don't enable concepts.
6170
64b23c13
DM
61712016-03-04 David Malcolm <dmalcolm@redhat.com>
6172
6173 PR c/68187
6174 * c-indentation.c (get_visual_column): Move code to determine next
6175 tab stop to...
6176 (next_tab_stop): ...this new function.
6177 (line_contains_hash_if): Delete function.
6178 (detect_preprocessor_logic): Delete function.
6179 (get_first_nws_vis_column): New function.
6180 (detect_intervening_unindent): New function.
6181 (should_warn_for_misleading_indentation): Replace call to
6182 detect_preprocessor_logic with a call to
6183 detect_intervening_unindent.
6184
729526f5
DM
61852016-03-04 David Malcolm <dmalcolm@redhat.com>
6186
6187 PR c/68187
6188 * c-indentation.c (should_warn_for_misleading_indentation): When
6189 suppressing warnings about cases where the guard and body are on
6190 the same column, only use the first non-whitespace column in place
6191 of the guard token column when dealing with "else" clauses.
6192 When rejecting aligned BODY and NEXT, loosen the requirement
6193 from equality with the first non-whitespace of guard to simply
6194 that they not be indented relative to it.
6195
e9a35493
RB
61962016-03-04 Richard Biener <rguenther@suse.de>
6197
6198 PR c++/70054
6199 * c-common.c (strict_aliasing_warning): Use alias_set_subset_of
6200 instead of alias_sets_conflict_p.
6201
1be56bc5
MP
62022016-03-01 Marek Polacek <polacek@redhat.com>
6203
6204 PR c++/69795
6205 * c-common.c (reject_gcc_builtin): Check for FUNCTION_DECL rather than
6206 any DECL.
6207
35886f0b
MS
62082016-02-22 Martin Sebor <msebor@redhat.com>
6209
6210 PR middle-end/69780
6211 * c-common.c (check_builtin_function_arguments): Validate and
6212 reject invalid arguments to __builtin_alloca_with_align.
6213
4246c8da
MW
62142016-02-20 Mark Wielaard <mjw@redhat.com>
6215
6216 PR c/28901
6217 * c.opt (Wunused-const-variable): Turn into Alias for...
6218 (Wunused-const-variable=): New option.
6219
268be88c
BE
62202016-02-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
6221
6222 PR c++/69865
6223 * c-opts.c (c_common_post_options): Move call to set_std_cxx14 from
6224 here...
6225 (c_common_init_options): ...to here.
6226 (set_std_cxx98): Initialize flag_isoc94 and flag_isoc99.
6227
871b3f47
JJ
62282016-02-19 Jakub Jelinek <jakub@redhat.com>
6229
6230 PR c++/69826
6231 * c-pragma.c (c_pp_lookup_pragma): Handle PRAGMA_CILK_GRAINSIZE.
6232 (init_pragma): Register PRAGMA_CILK_GRAINSIZE even for
6233 flag_preprocess_only.
6234
bf14eba2
JJ
62352016-02-16 Jakub Jelinek <jakub@redhat.com>
6236
6237 PR c/69835
6238 * c.opt (Wnonnull-compare): Enable for -Wall.
6239
ba6b3795
JJ
62402016-02-15 Jakub Jelinek <jakub@redhat.com>
6241
6242 PR c++/69797
6243 * c-common.c (sync_resolve_size): Diagnose too few arguments
6244 even when params is non-NULL empty vector.
6245
a011cd92
BS
62462016-02-08 Bernd Schmidt <bschmidt@redhat.com>
6247
6248 PR target/60410
6249 * c.opt (fshort-double): Remove.
6250
46cb9332
MS
62512016-02-05 Martin Sebor <msebor@redhat.com>
6252
6253 PR c++/69662
6254 * c.opt (Warning options): Update -Wplacement-new to take
6255 an optional argument.
6256
e1b81f2b
JJ
62572016-02-01 Jakub Jelinek <jakub@redhat.com>
6258
6259 PR preprocessor/69543
6260 PR c/69558
6261 * c-pragma.c (handle_pragma_diagnostic): Pass input_location
6262 instead of loc to control_warning_option.
6263
b6adbb9f
NS
62642016-02-01 Nathan Sidwell <nathan@codesourcery.com>
6265
6266 * c.opt (fopenacc-dim=): New option.
6267
5d70666e
RB
62682016-01-27 Ryan Burn <contact@rnburn.com>
6269
6270 PR cilkplus/69267
6271 * cilk.c (cilk_gimplify_call_params_in_spawned_fn): Change to use
6272 gimplify_arg. Removed superfluous post_p argument.
6273 * c-family.h (cilk_gimplify_call_params_in_spawned_fn): Removed
6274 superfluous post_p argument.
6275 * c-gimplify.c (c_gimplify_expr): Likewise.
6276
01e1dea3
DM
62772016-01-26 David Malcolm <dmalcolm@redhat.com>
6278
6279 PR other/69006
6280 * c-opts.c (c_diagnostic_finalizer): Replace invocation of
6281 pp_newline_and_flush with pp_flush.
6282
9f04a53e
MS
62832016-01-20 Martin Sebor <msebor@redhat.com>
6284
6285 PR c/69405
6286 * c-common.c (sync_resolve_size): Avoid printing diagnostic about
6287 an incompatible argument when the argument isn't a valid tree node.
6288
7f26f7df
JM
62892016-01-18 Jason Merrill <jason@redhat.com>
6290
6291 PR c++/68767
6292 * c-common.c (check_function_arguments_recurse): Fold the whole
6293 COND_EXPR, not just the condition.
6294
f62bf092
TV
62952016-01-18 Tom de Vries <tom@codesourcery.com>
6296
6297 * c-omp.c (c_oacc_split_loop_clauses): Don't copy OMP_CLAUSE_REDUCTION,
6298 classify as loop clause.
6299
e0a575ff
JJ
63002016-01-15 Jakub Jelinek <jakub@redhat.com>
6301
6302 PR bootstrap/68271
6303 * c-pragma.c (c_register_pragma_1): Adjust comment to note that
6304 C++ FE no longer has limit on number of pragmas.
6305
63062015-01-14 Ryan Burn <contact@rnburn.com>
b6e3db06
RB
6307
6308 PR c++/69048
6309 * cilk.c (create_cilk_wrapper_body): Call fold_build_cleanup_point_expr
c47eaca6 6310 to add missing cleanup point.
b6e3db06 6311
c7df95d8
DM
63122016-01-14 David Malcolm <dmalcolm@redhat.com>
6313
6314 PR c++/68819
6315 * c-indentation.c (get_visual_column): Add location_t param.
6316 Handle the column number being zero by effectively disabling the
6317 warning, with an "inform".
6318 (should_warn_for_misleading_indentation): Add location_t argument
6319 for all uses of get_visual_column.
6320
21efdd80
PP
63212016-01-10 Patrick Palka <ppalka@gcc.gnu.org>
6322
6323 PR c++/69029
6324 * c-indentation.c (should_warn_for_misleading_indentation):
6325 Don't warn about do-while statements.
6326
7a127fa7
MS
63272016-01-07 Martin Sebor <msebor@redhat.com>
6328
6329 PR c/68966
6330 * c-common.c (sync_resolve_size): Reject first argument when it's
6331 a pointer to _Bool.
6332
c589e975
DM
63332016-01-05 David Malcolm <dmalcolm@redhat.com>
6334
6335 PR c/69122
6336 * c-indentation.c (get_visual_column): Remove default argument.
6337 (should_warn_for_misleading_indentation): For the multiline case,
6338 update call to get_visual_column for next_stmt_exploc so that it
6339 captures the location of the first non-whitespace character in the
6340 relevant line. Don't issue warnings if there is non-whitespace
6341 before the next statement.
6342
818ab71a
JJ
63432016-01-04 Jakub Jelinek <jakub@redhat.com>
6344
6345 Update copyright years.
6346
745e411d
DM
63472015-12-21 David Malcolm <dmalcolm@redhat.com>
6348
6349 * c-common.c (binary_op_error): Convert first param from
6350 location_t to rich_location * and use it when emitting an error.
6351 * c-common.h (binary_op_error): Convert first param from
6352 location_t to rich_location *.
6353
de67c4c3
DM
63542015-12-16 David Malcolm <dmalcolm@redhat.com>
6355
6356 * c-common.h (conflict_marker_get_final_tok_kind): New prototype.
6357 * c-lex.c (conflict_marker_get_final_tok_kind): New function.
6358
4a38b02b
IV
63592015-12-15 Ilya Verbin <ilya.verbin@intel.com>
6360
6361 * c-common.c (c_common_attribute_table): Handle "omp declare target
6362 link" attribute.
6363
54d62f51
JJ
63642015-12-14 Jakub Jelinek <jakub@redhat.com>
6365
6366 PR c/68833
6367 * c.opt (Wmissing-format-attribute, Wnormalized): Add Warning option.
6368
8d4227c8
TB
63692014-12-12 Tobias Burnus <burnus@net-b.de>
6370
6371 PR fortran/68815
6372 * c-format.c (gcc_gfc_char_table): Add 'q' flag to remaining
6373 specifiers (%d, %i,%u and %c).
6374
f6069ccc
DM
63752015-12-10 David Malcolm <dmalcolm@redhat.com>
6376
6377 * c.opt (Wmisleading-indentation): Add to -Wall for C and C++.
6378
63bbf46d
JJ
63792015-12-08 Jakub Jelinek <jakub@redhat.com>
6380
6381 PR c/48088
6382 PR c/68657
6383 * c.opt (Wfloat-conversion, Wsign-conversion): Add Warning.
6384 * c-pragma.c (handle_pragma_diagnostic): Adjust
6385 control_warning_option caller.
6386
f79520bb
DM
63872015-12-07 David Malcolm <dmalcolm@redhat.com>
6388
6389 * c-common.c (c_cpp_error): Update for change to
6390 rich_location::set_range.
6391
b3d5bc62
JJ
63922015-12-04 Paolo Bonzini <bonzini@gnu.org>
6393
6394 * c-common.c (maybe_warn_shift_overflow): Warn on all overflows if
6395 shifting 1 out of the sign bit.
6396
63972015-12-04 Kirill Yukhin <kirill.yukhin@intel.com>
6398
6399 * c-common.c (c_common_attribute_table[]): Update max arguments
6400 count for "simd" attribute.
6401 (handle_simd_attribute): Parse "notinbranch" and "inbranch" arguments.
6402
6eb4a537
JJ
64032015-12-03 Jakub Jelinek <jakub@redhat.com>
6404
6405 PR preprocessor/57580
6406 * c-ppoutput.c (print): Change printed field to bool.
6407 Move src_file last for smaller padding.
6408 (init_pp_output): Set print.printed to false instead of 0.
6409 (scan_translation_unit): Fix up formatting. Set print.printed
6410 to true after printing something other than newline.
6411 (scan_translation_unit_trad): Set print.printed to true instead of 1.
6412 (maybe_print_line_1): Set print.printed to false instead of 0.
6413 (print_line_1): Likewise.
6414 (do_line_change): Set print.printed to true instead of 1.
6415 (cb_define, dump_queued_macros, cb_include, cb_def_pragma,
6416 dump_macro): Set print.printed to false after printing newline.
6417
4250754e
JM
64182015-12-02 Jason Merrill <jason@redhat.com>
6419
f479b43d
JM
6420 * c-common.c (fold_for_warn): New.
6421 (warn_logical_operator, warn_tautological_cmp)
6422 (check_function_arguments_recurse, maybe_warn_bool_compare): Use it.
6423
4250754e
JM
6424 * c-common.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
6425 (c_fully_fold_internal, decl_constant_value_for_optimization):
6426 Move to c/c-fold.c.
6427 * c-common.h: Don't declare decl_constant_value_for_optimization.
6428
e9e32ee6
JM
64292015-12-02 Joseph Myers <joseph@codesourcery.com>
6430
6431 PR c/68162
6432 * c-common.h (c_build_qualified_type): Add extra default
6433 arguments.
6434
37d5ad46
JB
64352015-12-01 Julian Brown <julian@codesourcery.com>
6436 Cesar Philippidis <cesar@codesourcery.com>
6437 James Norris <James_Norris@mentor.com>
6438
6439 * c-pragma.c (oacc_pragmas): Add PRAGMA_OACC_HOST_DATA.
6440 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_HOST_DATA.
6441 (pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_USE_DEVICE.
6442
f07862c7
EB
64432015-11-30 Eric Botcazou <ebotcazou@adacore.com>
6444
6445 * c-ada-spec.c (print_ada_macros): Remove redundant blank line.
6446 (decl_sloc_common): Delete and move bulk of processing to...
6447 (decl_sloc): ...here.
6448 (pp_ada_tree_identifier): Remove reference to QUAL_UNION_TYPE.
6449 (dump_ada_double_name): Remove S parameter and compute the suffix.
6450 (dump_ada_array_type): Add PARENT parameter. Simplify computation of
6451 element type and deal with an anonymous one.
6452 (dump_ada_template): Use RECORD_OR_UNION_TYPE_P macro.
6453 (dump_generic_ada_node): Tweak. Adjust call to dump_ada_array_type
6454 and remove reference to QUAL_UNION_TYPE.
6455 (dump_nested_types): Make 2 passes on the fields and move bulk to...
6456 (dump_nested_type): ...here. New function extracted from above.
6457 Generate a full declaration for anonymous element type of arrays.
6458 (print_ada_declaration): Really skip anonymous declarations. Remove
6459 references to QUAL_UNION_TYPE. Adjust call to dump_ada_array_type.
6460 Clean up processing of declarations of array types and objects.
6461 (print_ada_struct_decl): Remove reference to QUAL_UNION_TYPE.
6462 Remove obsolete code and tidy up.
6463
75c8aac3
JH
64642015-11-29 Jan Hubicka <hubicka@ucw.cz>
6465
6466 PR c/67581
6467 * c-common.c (handle_transparent_union_attribute): Update
6468 also type variants.
6469
b58d3df2
ML
64702015-11-27 Martin Liska <mliska@suse.cz>
6471
6472 PR c++/68312
6473 * array-notation-common.c (cilkplus_extract_an_triplets):
6474 Release vector of vectors.
6475 * cilk.c (gimplify_cilk_spawn): Free allocated memory.
6476
89a01fcf
EB
64772015-11-26 Eric Botcazou <ebotcazou@adacore.com>
6478
6479 PR c++/68527
6480 * c-ada-spec.c (dump_nested_types): Add guard for error_mark_node.
6481 (print_ada_struct_decl): Likewise.
6482
cc5c5226
IZ
64832015-11-23 Igor Zamyatin <igor.zamyatin@intel.com>
6484
6485 PR c++/68001
6486 * c-gimplify.c (c_gimplify_expr): Stop the process if see an error.
6487 * cilk.c (recognize_spawn): Determine location in a more precise
6488 way.
6489
269adb9d
JM
64902015-11-19 Jason Merrill <jason@redhat.com>
6491
6492 * c-common.c (shorten_compare): But look through macros from
6493 system headers.
6494
d0eccfcd
JM
64952015-11-18 Jason Merrill <jason@redhat.com>
6496
6497 * c-common.c (shorten_compare): Don't -Wtype-limits if the
6498 non-constant operand comes from a macro.
6499
3e44547c
JM
65002015-11-17 Jason Merrill <jason@redhat.com>
6501
6502 PR bootstrap/68346
6503 * c-common.c (warn_tautological_cmp): Fold before checking for
6504 constants.
6505
0f62c7a0
MP
65062015-11-16 Marek Polacek <polacek@redhat.com>
6507
6508 PR c++/68362
6509 * c-common.c (check_case_bounds): Fold low and high cases.
6510
a868811e
MP
65112015-11-16 Marek Polacek <polacek@redhat.com>
6512
6513 * c-ada-spec.c (dump_ada_template): Use RECORD_OR_UNION_TYPE_P.
6514 * c-common.c (c_common_get_alias_set): Likewise.
6515 (handle_visibility_attribute): Likewise.
6516
fff77217
KY
65172015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
6518
6519 * c-common.c (handle_simd_attribute): New.
6520 (struct attribute_spec): Add entry for "simd".
6521 (handle_simd_attribute): New.
6522
269e63b7
KT
65232015-11-13 Kai Tietz <ktietz70@googlemail.com>
6524
6525 * c-lex.c (interpret_float): Use fold_convert.
6526
ebedc9a3
DM
65272015-11-13 David Malcolm <dmalcolm@redhat.com>
6528
6529 * c-common.c (c_fully_fold_internal): Capture existing souce_range,
6530 and store it on the result.
6531 * c-opts.c (c_common_init_options): Set
6532 global_dc->colorize_source_p.
6533
6e232ba4
JN
65342015-11-12 James Norris <jnorris@codesourcery.com>
6535 Joseph Myers <joseph@codesourcery.com>
6536
7365279f 6537 * c-pragma.c (oacc_pragmas): Add entry for declare directive.
6e232ba4
JN
6538 * c-pragma.h (enum pragma_kind): Add PRAGMA_OACC_DECLARE.
6539 (enum pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT and
6540 PRAGMA_OACC_CLAUSE_LINK.
6541
e78bede6
MP
65422015-11-11 Marek Polacek <polacek@redhat.com>
6543
6544 PR c/68107
6545 PR c++/68266
6546 * c-common.c (valid_array_size_p): New function.
6547 * c-common.h (valid_array_size_p): Declare.
6548
3f8257db 65492015-11-11 Dominique d'Humieres <dominiq@lps.ens.fr>
4ac93c7c
DH
6550
6551 PR bootstrap/68271
6552 * c-pragma.c (c_register_pragma_1): Update the gcc_assert to 256.
6553
69f293c9
AM
65542015-11-11 Andrew MacLeod <amacleod@redhat.com>
6555
6556 * array-notation-common.c: Remove unused header files.
6557 * c-ada-spec.c: Likewise.
6558 * c-cilkplus.c: Likewise.
6559 * c-common.c: Likewise.
6560 * c-cppbuiltin.c: Likewise.
6561 * c-dump.c: Likewise.
6562 * c-format.c: Likewise.
6563 * c-gimplify.c: Likewise.
6564 * c-indentation.c: Likewise.
6565 * c-lex.c: Likewise.
6566 * c-omp.c: Likewise.
6567 * c-opts.c: Likewise.
6568 * c-pch.c: Likewise.
6569 * c-ppoutput.c: Likewise.
6570 * c-pragma.c: Likewise.
6571 * c-pretty-print.c: Likewise.
6572 * c-semantics.c: Likewise.
6573 * c-ubsan.c: Likewise.
6574 * cilk.c: Likewise.
6575 * stub-objc.c: Likewise.
6576
3a40d81d
NS
65772015-11-09 Thomas Schwinge <thomas@codesourcery.com>
6578 Cesar Philippidis <cesar@codesourcery.com>
6579 James Norris <jnorris@codesourcery.com>
6580 Julian Brown <julian@codesourcery.com>
6581 Nathan Sidwell <nathan@codesourcery.com>
6582
6583 * c-pragma.c (oacc_pragmas): Add "routine".
6584 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_ROUTINE.
6585
ee45a32d
EB
65862015-11-08 Eric Botcazou <ebotcazou@adacore.com>
6587
6588 * c-common.c (c_common_attributes): Add scalar_storage_order.
6589 (handle_scalar_storage_order_attribute): New function.
6590 * c-pragma.c (global_sso): New variable.
6591 (maybe_apply_pragma_scalar_storage_order): New function.
6592 (handle_pragma_scalar_storage_order): Likewise.
6593 (init_pragma): Register scalar_storage_order.
6594 * c-pragma.h (maybe_apply_pragma_scalar_storage_order): Declare.
6595 * c.opt (Wscalar-storage-order): New warning.
6596 (fsso-struct=): New option.
6597
eb11eb15
MS
65982015-11-08 Martin Sebor <msebor@redhat.com>
6599
6600 * c.opt (Wplacement-new): Add a period to the end of a sentence.
6601
0aad0198
RS
66022015-11-07 Richard Sandiford <richard.sandiford@arm.com>
6603
6604 * c-common.c: Don't undef DEF_BUILTIN.
6605
8a645150
DM
66062015-11-06 David Malcolm <dmalcolm@redhat.com>
6607
6608 * c-common.c (c_cpp_error): Convert parameter from location_t to
6609 rich_location *. Eliminate the "column_override" parameter and
6610 the call to diagnostic_override_column.
6611 Update the "done_lexing" clause to set range 0
6612 on the rich_location, rather than overwriting a location_t.
6613 * c-common.h (c_cpp_error): Convert parameter from location_t to
6614 rich_location *. Eliminate the "column_override" parameter.
6615
7a5e4956
CP
66162015-11-05 Cesar Philippidis <cesar@codesourcery.com>
6617 Thomas Schwinge <thomas@codesourcery.com>
6618 James Norris <jnorris@codesourcery.com>
6619
6620 * c-omp.c (c_oacc_split_loop_clauses): Make TILE, GANG, WORKER, VECTOR,
6621 AUTO, SEQ, INDEPENDENT and PRIVATE loop clauses. Associate REDUCTION
6622 clauses with parallel and kernels and loops.
6623 * c-pragma.h (enum pragma_omp_clause): Add entries for
6624 PRAGMA_OACC_CLAUSE_{INDEPENDENT,TILE,DEFAULT}.
6625 * pt.c (tsubst_omp_clauses): Add support for OMP_CLAUSE_{NUM_GANGS,
6626 NUM_WORKERS,VECTOR_LENGTH,GANG,WORKER,VECTOR,ASYNC,WAIT,TILE,AUTO,
6627 INDEPENDENT,SEQ}.
6628 (tsubst_expr): Add support for OMP_CLAUSE_{KERNELS,PARALLEL,LOOP}.
6629
e2f5cc96
MS
66302015-11-05 Martin Sebor <msebor@redhat.com>
6631
6632 PR c++/67942
6633 * c.opt (-Wplacement-new): New option.
6634
e01d41e5
JJ
66352015-11-05 Jakub Jelinek <jakub@redhat.com>
6636
6637 * c-common.h (c_finish_omp_atomic): Add TEST argument.
6638 (c_omp_check_loop_iv, c_omp_check_loop_iv_exprs): New prototypes.
6639 * c-omp.c (c_finish_omp_atomic): Add TEST argument. Don't call
6640 save_expr or create_tmp_var* if TEST is true.
6641 (c_finish_omp_for): Store OMP_FOR_ORIG_DECLS always.
6642 Don't call add_stmt here.
6643 (struct c_omp_check_loop_iv_data): New type.
6644 (c_omp_check_loop_iv_r, c_omp_check_loop_iv,
6645 c_omp_check_loop_iv_exprs): New functions.
6646 (c_omp_split_clauses): Adjust for lastprivate being allowed on
6647 distribute.
6648 (c_omp_declare_simd_clauses_to_numbers): Change
6649 OMP_CLAUSE_LINEAR_VARIABLE_STRIDE OMP_CLAUSE_LINEAR_STEP into numbers.
6650 (c_omp_declare_simd_clauses_to_decls): Similarly change those
6651 from numbers to PARM_DECLs.
6652
595278be
MM
66532015-11-04 Mikhail Maltsev <maltsevm@gmail.com>
6654
6655 * c-omp.c (c_omp_split_clauses): Remove conditional compilation. Use
6656 flag_checking.
6657
3f8257db 66582015-11-03 Bernd Schmidt <bschmidt@redhat.com>
c85158de
MS
6659
6660 PR c++-common/67882
b3d5bc62
JJ
6661 * c-common.h (fold_offsetof_1): Add argument.
6662 * c-common.c (fold_offsetof_1): Diagnose more invalid
c85158de
MS
6663 offsetof expressions that reference elements past the end of
6664 an array.
6665
4bf9e5a8
TS
66662015-11-03 Thomas Schwinge <thomas@codesourcery.com>
6667 Chung-Lin Tang <cltang@codesourcery.com>
6668
6669 * c-pragma.c (oacc_pragmas): Add "atomic".
6670 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_ATOMIC.
6671
3b1661a9
ES
66722015-10-30 Evgeny Stupachenko <evstupac@gmail.com>
6673
6674 * c-common.c (handle_target_clones_attribute): New.
6675 (c_common_attribute_table): Add handle_target_clones_attribute.
6676 (handle_always_inline_attribute): Add check on target_clones attribute.
6677 (handle_target_attribute): Ditto.
6678
2adfab87
AM
66792015-10-29 Andrew MacLeod <amacleod@redhat.com>
6680
6681 * array-notation-common.c: Reorder #include's and remove duplicates.
6682 * c-ada-spec.c: Likewise.
6683 * c-cilkplus.c: Likewise.
6684 * c-common.c: Likewise.
6685 * c-cppbuiltin.c: Likewise.
6686 * c-dump.c: Likewise.
6687 * c-format.c: Likewise.
6688 * c-gimplify.c: Likewise.
6689 * c-indentation.c: Likewise.
6690 * c-lex.c: Likewise.
6691 * c-omp.c: Likewise.
6692 * c-opts.c: Likewise.
6693 * c-pch.c: Likewise.
6694 * c-ppoutput.c: Likewise.
6695 * c-pragma.c: Likewise.
6696 * c-pretty-print.c: Likewise.
6697 * c-semantics.c: Likewise.
6698 * c-ubsan.c: Likewise.
6699 * cilk.c: Likewise.
6700 * stub-objc.c: Likewise.
6701
d90ec4f2
JM
67022015-10-28 Jason Merrill <jason@redhat.com>
6703
6704 * c-common.c (pointer_int_sum): Fold the MULT_EXPR.
6705
88bae6f4
TS
67062015-10-27 Thomas Schwinge <thomas@codesourcery.com>
6707 James Norris <jnorris@codesourcery.com>
6708 Cesar Philippidis <cesar@codesourcery.com>
6709
6710 PR c/64765
6711 PR c/64880
6712 * c-common.h (c_oacc_split_loop_clauses): Declare function.
6713 * c-omp.c (c_oacc_split_loop_clauses): New function.
6714
b1726d6c
MS
67152015-10-21 Martin Sebor <msebor@redhat.com>
6716
6717 PR driver/68043
6718 * c.opt: End each sentence that describes an option with a period.
6719
fa60eeb9
MP
67202015-10-20 Marek Polacek <polacek@redhat.com>
6721
6722 * array-notation-common.c (is_cilkplus_vector_p): Define.
6723 * c-common.h (is_cilkplus_vector_p): Declare.
6724
95979049
MP
67252015-10-20 Marek Polacek <polacek@redhat.com>
6726
6727 * c.opt (std=gnu++11): Do not describe as experimental.
6728 (std=gnu++14): Likewise.
6729
2a9fb712
JM
67302015-10-19 Jason Merrill <jason@redhat.com>
6731
6732 * c-cppbuiltin.c (c_cpp_builtins): Define
6733 __cpp_nontype_template_args.
6734
13b380a3
JM
67352015-10-19 Jason Merrill <jason@redhat.com>
6736
6737 * c-cppbuiltin.c (c_cpp_builtins): Define
6738 __cpp_enumerator_attributes, __cpp_fold_expressions,
6739 __cpp_unicode_characters.
6740
d9a6bd32
JJ
67412015-10-13 Jakub Jelinek <jakub@redhat.com>
6742 Aldy Hernandez <aldyh@redhat.com>
6743
6744 * c-common.c (enum c_builtin_type): Define DEF_FUNCTION_TYPE_9,
6745 DEF_FUNCTION_TYPE_10 and DEF_FUNCTION_TYPE_11.
6746 (c_define_builtins): Likewise.
6747 * c-common.h (enum c_omp_clause_split): Add
6748 C_OMP_CLAUSE_SPLIT_TASKLOOP.
6749 (c_finish_omp_critical, c_finish_omp_ordered): Add CLAUSES argument.
6750 (c_finish_omp_for): Add ORIG_DECLV argument.
6751 * c-cppbuiltin.c (c_cpp_builtins): Predefine _OPENMP as
6752 201511 instead of 201307.
6753 * c-omp.c (c_finish_omp_critical): Add CLAUSES argument, set
6754 OMP_CRITICAL_CLAUSES to it.
6755 (c_finish_omp_ordered): Add CLAUSES argument, set
6756 OMP_ORDERED_CLAUSES to it.
6757 (c_finish_omp_for): Add ORIG_DECLV argument, set OMP_FOR_ORIG_DECLS
6758 to it if OMP_FOR. Clear DECL_INITIAL on the IVs.
6759 (c_omp_split_clauses): Handle OpenMP 4.5 combined/composite
6760 constructs and new OpenMP 4.5 clauses. Clear
6761 OMP_CLAUSE_SCHEDULE_SIMD if not combined with OMP_SIMD. Add
6762 verification code.
6763 * c-pragma.c (omp_pragmas_simd): Add taskloop.
6764 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_TASKLOOP.
6765 (enum pragma_omp_clause): Add
6766 PRAGMA_OMP_CLAUSE_{DEFAULTMAP,GRAINSIZE,HINT,{IS,USE}_DEVICE_PTR}
6767 and PRAGMA_OMP_CLAUSE_{LINK,NOGROUP,NUM_TASKS,PRIORITY,SIMD,THREADS}.
6768
624d31fe
RS
67692015-10-05 Richard Sandiford <richard.sandiford@arm.com>
6770
6771 * c-lex.c (interpret_float): Use real_equal instead of
6772 REAL_VALUES_EQUAL.
6773
b8fd7909
JM
67742015-10-04 Jason Merrill <jason@redhat.com>
6775
6776 Implement N4514, C++ Extensions for Transactional Memory.
6777 * c-common.c (c_common_reswords): Add C++ TM TS keywords.
6778 (c_common_attribute_table): Add transaction_safe_dynamic.
6779 transaction_safe now affects type identity.
6780 (handle_tm_attribute): Handle transaction_safe_dynamic.
6781 * c-common.h (enum rid): Add RID_ATOMIC_NOEXCEPT,
6782 RID_ATOMIC_CANCEL, RID_SYNCHRONIZED.
6783 (OBJC_IS_CXX_KEYWORD): Add RID_SYNCHRONIZED.
6784 (D_TRANSMEM): New.
6785 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_transactional_memory.
6786 * c-pretty-print.c (pp_c_attributes_display): Don't print
6787 transaction_safe in C++.
6788
12651878
MP
67892015-10-02 Marek Polacek <polacek@redhat.com>
6790
6791 * c.opt (Wduplicated-cond): Don't enable by -Wall anymore.
6792
3e3b8d63
MP
67932015-10-02 Marek Polacek <polacek@redhat.com>
6794
6795 PR c/64249
6796 * c-common.c (warn_duplicated_cond_add_or_warn): New function.
6797 * c-common.h (warn_duplicated_cond_add_or_warn): Declare.
6798 * c.opt (Wduplicated-cond): New option.
6799
0d1a8f75
JM
68002015-10-01 Joseph Myers <joseph@codesourcery.com>
6801
6802 * c.opt (std=c11): Do not describe as experimental.
6803 (std=gnu11): Likewise.
6804 (std=iso9899:2011): Likewise.
6805
3e32ee19
NS
68062015-09-28 Nathan Sidwell <nathan@codesourcery.com>
6807
6808 * c-common.c (DEF_FUNCTION_TYPE_VAR_6): New.
6809 (DEF_FUNCTION_TYPE_VAR_11): Delete.
6810
974348ee
MP
68112015-09-25 Marek Polacek <polacek@redhat.com>
6812
6813 * c-ubsan.c (ubsan_instrument_division): Remove unnecessary code.
6814 (ubsan_instrument_shift): Likewise.
6815
15dbc1a6
MP
68162015-09-25 Marek Polacek <polacek@redhat.com>
6817
6818 PR sanitizer/64906
6819 * c-ubsan.c (ubsan_instrument_division): Also pre-evaluate OP1.
6820
6b95d7cc
PP
68212015-09-24 Patrick Palka <ppalka@gcc.gnu.org>
6822
6823 * c-indentation.c (should_warn_for_misleading_indentation):
6824 Compare next_stmt_vis_column with guard_line_first_nws instead
6825 of with guard_line_vis_column.
6826
c1822f9c
MLI
68272015-09-23 Manuel López-Ibáñez <manu@gcc.gnu.org>
6828
6829 PR c/49654
6830 PR c/49655
6831 * c-pragma.c (handle_pragma_diagnostic): Detect non-warning
6832 options and options not valid for the current language.
6833
d5398058
PP
68342015-09-22 Patrick Palka <ppalka@gcc.gnu.org>
6835
6836 * c-indentation.c (should_warn_for_misleading_indentation):
6837 Float out and consolidate the calls to get_visual_column that
6838 are passed guard_exploc as an argument. Compare
6839 next_stmt_vis_column with guard_line_first_nws instead of with
6840 body_line_first_nws.
6841
6b333269
NS
68422015-09-22 Nathan Sidwell <nathan@codesourcery.com>
6843
6844 * c.opt (Wmultiple-inheritance, Wvirtual-inheritance, Wtemplates,
6845 Wnamespaces): New C++ warnings.
6846
a75f1574
JM
68472015-09-22 Jason Merrill <jason@redhat.com>
6848
6849 * c-common.h (abi_compat_version_crosses): New.
6850 (warn_abi_version): Declare.
6851 * c-common.c: Define it.
6852 * c-opts.c (c_common_post_options): Handle it.
6853 flag_abi_compat_version defaults to 8.
6854
bdaaa8b7
VV
68552015-09-21 Ville Voutilainen <ville.voutilainen@gmail.com>
6856
6857 Complete the implementation of N4230, Nested namespace definition.
6858 * c-cppbuiltin.c: Add __cpp_namespace_attributes and
6859 __cpp_nested_namespace_definitions.
6860
eaa797e8
MLI
68612015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
6862
6863 * c-pragma.c (handle_pragma_diagnostic): Fix wrong return.
6864
c4914de6
MLI
68652015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
6866
6867 * c-pragma.c (handle_pragma_diagnostic): Use explicit location
6868 when warning.
6869 * c-pragma.h (pragma_lex): Add optional loc argument.
6870
fcb87c50
MM
68712015-09-16 Mikhail Maltsev <maltsevm@gmail.com>
6872
6873 * c-format.c (check_format_arg): Adjust to use common block size in all
6874 object pools.
6875
31bdd08a
DM
68762015-09-15 David Malcolm <dmalcolm@redhat.com>
6877
6878 * c-format.c (location_from_offset): Update for change in
6879 signature of location_get_source_line.
6880 * c-indentation.c (get_visual_column): Likewise.
6881 (line_contains_hash_if): Likewise.
6882
aa9f4b4c
MP
68832015-09-14 Marek Polacek <polacek@redhat.com>
6884
6885 * c-opts.c (c_common_post_options): Set C++ standard earlier, before
6886 setting various warnings.
6887
aa256c4a
MP
68882015-09-14 Marek Polacek <polacek@redhat.com>
6889
6890 * c-common.c (warn_for_sign_compare): Cast to unsigned when shifting
6891 a negative value.
6892
0f876f22
MW
68932015-09-11 Mark Wielaard <mjw@redhat.com>
6894
6895 PR c/28901
6896 * c.opt (Wunused-variable): Option from common.opt.
6897 (Wunused-const-variable): New option.
6898
273aa49e
PC
68992015-09-09 Paolo Carlini <paolo.carlini@oracle.com>
6900
6901 PR c++/53184
6902 * c.opt ([Wsubobject-linkage]): Add.
6903
1807ffc1
MS
69042015-09-03 Martin Sebor <msebor@redhat.com>
6905
6906 PR c/66516
6907 * c-common.h (c_decl_implicit, reject_gcc_builtin): Declare new
6908 functions.
6909 * c-common.c (reject_gcc_builtin): Define.
6910
38942840
BI
69112015-09-02 Balaji V. Iyer <balaji.v.iyer@intel.com>
6912
6913 PR middle-end/60586
6914 * c-common.h (cilk_gimplify_call_params_in_spawned_fn): New
6915 prototype.
6916 * c-gimplify.c (c_gimplify_expr): Added a call to the function
6917 cilk_gimplify_call_params_in_spawned_fn.
6918 * cilk.c (cilk_gimplify_call_params_in_spawned_fn): New function.
6919 (gimplify_cilk_spawn): Removed EXPR_STMT and CLEANUP_POINT_EXPR
6920 unwrapping.
6921
c316b5e4
MP
69222015-08-25 Marek Polacek <polacek@redhat.com>
6923
6924 PR middle-end/67330
6925 * c-common.c (handle_weak_attribute): Don't check whether the
6926 visibility can be changed here.
6927
584a7c46
MLI
69282015-08-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
6929
6930 * c-lex.c (c_lex_with_flags): Use explicit locations.
6931
a79683d5
TS
69322015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
6933
6934 * c-ada-spec.h, c-common.c, c-common.h, c-format.c, c-format.h,
6935 c-objc.h, c-ppoutput.c, c-pragma.c, c-pragma.h: Remove useless
6936
61717a45
FXC
69372015-08-18 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
6938
6939 PR middle-end/36757
6940 * c-common.c (check_builtin_function_arguments): Add check
6941 for BUILT_IN_SIGNBIT argument.
6942
329524f5
PC
69432015-08-18 Paolo Carlini <paolo.carlini@oracle.com>
6944
6945 PR c++/67160
6946 * c-cppbuiltin.c (c_cpp_builtins): Fix __cpp_static_assert value
6947 in c++1z mode.
6948
4ee55665
MP
69492015-08-17 Marek Polacek <polacek@redhat.com>
6950
6951 * c-pretty-print.c (pp_c_cv_qualifiers): Remove code dealing
6952 with whitespaces before qualifier names.
6953
b893e375
MP
69542015-08-12 Marek Polacek <polacek@redhat.com>
6955
6956 PR c++/55095
6957 * c-common.c (maybe_warn_shift_overflow): Properly handle
6958 left-shifting 1 into the sign bit.
6959
c2d89095
MLI
69602015-08-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
6961
6962 * c.opt (Wchkp): Use LangEnabledBy instead of EnabledBy.
6963
971e17ff
AS
69642015-08-06 Andrew Sutton <andrew.n.sutton@gmail.com>
6965 Braden Obrzut <admin@maniacsvault.net>
6966 Jason Merrill <jason@redhat.com>
6967
6968 Add C++ Concepts TS support.
6969 * c-common.c (c_common_reswords): Add __is_same_as, concept, requires.
6970 * c-common.h (enum rid): Add RID_IS_SAME_AS, RID_CONCEPT, RID_REQUIRES.
6971 (D_CXX_CONCEPTS, D_CXX_CONCEPTS_FLAGS): New.
6972 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_concepts.
6973 * c-opts.c (set_std_cxx1z): Set flag_concepts.
6974 * c.opt (fconcepts): New.
6975
b3d5bc62
JJ
69762015-08-02 Martin Sebor <msebor@redhat.com>
6977
6978 * c.opt (-Wframe-address): New warning option.
6979
8ebca419
PP
69802015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
6981
6982 * c-indentation.c (should_warn_for_misleading_indentation):
6983 Improve heuristics.
6984
1a1e101f
PP
69852015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
6986
6987 * c-indentation.c (get_visual_column): Add parameter first_nws,
6988 use it. Update comment documenting the function.
6989 (is_first_nonwhitespace_on_line): Remove.
6990 (should_warn_for_misleading_indentation): Replace usage of
6991 of is_first_nonwhitespace_on_line with get_visual_column.
6992
992118a1
PP
69932015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
6994
6995 * c-indentation.h (struct token_indent_info): Define.
6996 (get_token_indent_info): Define.
6997 (warn_for_misleading_information): Declare.
6998 * c-common.h (warn_for_misleading_information): Remove.
6999 * c-identation.c (warn_for_misleading_indentation):
7000 Change declaration to take three token_indent_infos. Adjust
7001 accordingly.
7002 * c-identation.c (should_warn_for_misleading_indentation):
7003 Likewise. Bail out early if the body is a compound statement.
7004 (guard_tinfo_to_string): Define.
7005
e8fa3817
JM
70062015-07-30 Jason Merrill <jason@redhat.com>
7007
7008 * c-pretty-print.c (unary_expression) [INDIRECT_REF]: Don't print
7009 '*' for reference decay.
7010
173864e8
MP
70112015-07-30 Marek Polacek <polacek@redhat.com>
7012
7013 * c-common.c (warn_tautological_cmp): Bail for float types.
7014
f2afe6dd
MP
70152015-07-27 Marek Polacek <polacek@redhat.com>
7016
7017 PR bootstrap/67030
7018 * c-common.c (warn_tautological_cmp): Don't warn for macro expansion.
7019
05b28fd6
MP
70202015-07-27 Marek Polacek <polacek@redhat.com>
7021
7022 PR c++/66555
7023 PR c/54979
7024 * c-common.c (find_array_ref_with_const_idx_r): New function.
7025 (warn_tautological_cmp): New function.
7026 * c-common.h (warn_tautological_cmp): Declare.
7027 * c.opt (Wtautological-compare): New option.
7028
5a5062b8
MP
70292015-07-23 Marek Polacek <polacek@redhat.com>
7030
7031 * c-ubsan.c (ubsan_instrument_division): Use unshare_expr throughout.
7032 (ubsan_instrument_shift): Likewise.
7033
dc891fe7
MP
70342015-07-23 Marek Polacek <polacek@redhat.com>
7035
7036 PR sanitizer/66908
7037 * c-ubsan.c: Include gimplify.h.
7038 (ubsan_instrument_division): Unshare OP0 and OP1.
7039 (ubsan_instrument_shift): Likewise.
7040
451b5e48
MP
70412015-07-20 Marek Polacek <polacek@redhat.com>
7042 Richard Sandiford <richard.sandiford@arm.com>
7043
7044 PR c++/55095
7045 * c-common.c (c_fully_fold_internal): Warn about left shift overflows.
7046 Use EXPR_LOC_OR_LOC.
7047 (maybe_warn_shift_overflow): New function.
7048 * c-common.h (maybe_warn_shift_overflow): Declare.
7049 * c-opts.c (c_common_post_options): Set warn_shift_overflow.
7050 * c.opt (Wshift-overflow): New option.
7051
fb0b2914
ML
70522015-07-16 Martin Liska <mliska@suse.cz>
7053
7054 * c-format.c (static void check_format_info_main): Use
7055 object_allocator instead of pool_allocator.
7056 (check_format_arg): Likewise.
7057 (check_format_info_main): Likewise.
7058
903f5c23
AM
70592015-07-15 Andrew MacLeod <amacleod@redhat.com>
7060
7061 * c-opts.c: Remove multiline #include comment.
7062
026c3cfd
AH
70632015-07-12 Aldy Hernandez <aldyh@redhat.com>
7064
7065 * c-common.c: Fix double word typos.
7066
bb49ee66
EB
70672015-07-10 Eric Botcazou <ebotcazou@adacore.com>
7068
7069 * c-ada-spec.h (cpp_operation): Revert latest change.
7070 * c-ada-spec.c (print_ada_declaration): Likewise. Skip implicit
7071 constructors and destructors.
7072
1916bcb5
AM
70732015-07-09 Andrew MacLeod <amacleod@redhat.com>
7074
7075 * c-common.h: Adjust includes for flags.h changes.
7076 * stub-objc.c: Likewise.
026c3cfd 7077
a9dcd529
EB
70782015-07-08 Eric Botcazou <ebotcazou@adacore.com>
7079
7080 * c-ada-spec.h (cpp_operation): Add IS_CONSTEXPR.
7081 * c-ada-spec.c (print_ada_declaration): Skip constexpr constructors.
7082
b03b462f
JJ
70832015-07-08 Jakub Jelinek <jakub@redhat.com>
7084
7085 * c-omp.c (c_omp_declare_simd_clauses_to_numbers): If all clauses
7086 are to be removed, return NULL rather than original clauses list.
7087
c7131fb2
AM
70882015-07-07 Andrew MacLeod <amacleod@redhat.com>
7089
7090 * array-notation-common.c: Adjust includes.
7091 * c-ada-spec.c: Likewise.
7092 * c-cilkplus.c: Likewise.
7093 * c-common.h: Likewise.
7094 * c-cppbuiltin.c: Likewise.
7095 * c-dump.c: Likewise.
7096 * c-format.c: Likewise.
7097 * c-gimplify.c: Likewise.
7098 * c-indentation.c: Likewise.
7099 * c-lex.c: Likewise.
7100 * c-omp.c: Likewise.
7101 * c-opts.c: Likewise.
7102 * c-pch.c: Likewise.
7103 * c-ppoutput.c: Likewise.
7104 * c-pragma.c: Likewise.
7105 * c-pretty-print.c: Likewise.
7106 * c-semantics.c: Likewise.
7107 * c-ubsan.c: Likewise.
7108 * cilk.c: Likewise.
7109 * stub-objc.c: Likewise.
7110
2a7fb83f
EB
71112015-07-07 Eric Botcazou <ebotcazou@adacore.com>
7112
7113 * c-ada-spec.h (cpp_operation): Add IS_MOVE_CONSTRUCTOR.
7114 * c-ada-spec.c (print_ada_declaration): Skip move constructors.
7115
a03c9bf1
JM
71162015-07-01 Jason Merrill <jason@redhat.com>
7117
36a85135
JM
7118 * c-common.h (D_CXX11): Rename from D_CXX0X.
7119 (RID_FIRST_CXX11, RID_LAST_CXX11): Rename from *_CXX0X.
7120 * c-common.c: Adjust.
7121
e7fa68d5
JM
7122 * c-opts.c (c_common_post_options): Default to C++14.
7123
a03c9bf1
JM
7124 * c-opts.c (c_common_post_options): Highest ABI level is now 10.
7125
fe95b036
ESR
71262015-06-30 Edward Smith-Rowland <3dw4rd@verizon.net>
7127
7128 Implement N4197 - Adding u8 character literals
b3d5bc62 7129 * c-ada-spec.c (print_ada_macros): Treat CPP_UTF8CHAR like
a64be36b 7130 CPP_CHAR.
b3d5bc62 7131 * c-common.c (c_parse_error): Print CPP_UTF8CHAR and
a64be36b 7132 CPP_UTF8CHAR_USERDEF tokens.
b3d5bc62 7133 * c-lex.c (c_lex_with_flags): Treat CPP_UTF8CHAR_USERDEF
a64be36b
EB
7134 and CPP_UTF8CHAR tokens.
7135 (lex_charconst): Treat CPP_UTF8CHAR token.
fe95b036 7136
da2e71c9
MLI
71372015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
7138
7139 PR fortran/66605
7140 * c-common.c (do_warn_unused_parameter): Move here.
7141 * c-common.h (do_warn_unused_parameter): Declare.
7142
b155cfd9
MP
71432015-06-29 Marek Polacek <polacek@redhat.com>
7144
7145 PR c/66322
7146 * c-common.c (check_case_bounds): Add bool * parameter. Set
7147 OUTSIDE_RANGE_P.
7148 (c_add_case_label): Add bool * parameter. Pass it down to
7149 check_case_bounds.
7150 (c_do_switch_warnings): Add bool parameters. Implement -Wswitch-bool
7151 warning here.
7152 * c-common.h (c_add_case_label, c_do_switch_warnings): Update
7153 declarations.
7154
31521951
MP
71552015-06-27 Marek Polacek <polacek@redhat.com>
7156
7157 * c-common.c (check_main_parameter_types): Use VECTOR_TYPE_P
7158 or VECTOR_INTEGER_TYPE_P throughout.
7159 * c-gimplify.c: Likewise.
7160
22d03525
MP
71612015-06-26 Marek Polacek <polacek@redhat.com>
7162
7163 * array-notation-common.c (find_rank): Use INDIRECT_REF_P.
7164 * c-common.c (c_fully_fold_internal): Likewise.
7165 (c_alignof_expr): Likewise.
7166 * c-pretty-print.c (c_pretty_printer::postfix_expression): Likewise.
7167 * c-ubsan.c (ubsan_instrument_bounds): Likewise.
b1726d6c 7168 * cilk.c (create_parm_list): Likewise.
22d03525 7169
af05e6e5
MP
71702015-06-26 Marek Polacek <polacek@redhat.com>
7171
7172 * c-common.c (handle_unused_attribute): Use VAR_OR_FUNCTION_DECL_P.
7173
f0889939
AM
71742015-06-25 Andrew MacLeod <amacleod@redhat.com>
7175
7176 * c-common.c: Remove ipa-ref.h and plugin-api.h from include list.
7177 * c-gimplify.c: Likewise.
7178 * c-pragma.c: Likewise.
7179 * c-ubsan.c: Likewise.
7180 * cilk.c: Likewise.
7181
ca752f39
RS
71822015-06-25 Richard Sandiford <richard.sandiford@arm.com>
7183
7184 * c-common.c (c_type_hasher): Inherit from ggc_ptr_hash rather than
7185 ggc_hasher.
7186
16a16ec7
AM
71872015-06-25 Andrew MacLeod <amacleod@redhat.com>
7188
7189 * cilk.c: Move calls.h after tm.h in the include chain.
7190
0ae9bd27
MP
71912015-06-25 Marek Polacek <polacek@redhat.com>
7192
7193 * array-notation-common.c: Use VAR_P throughout.
7194 * c-ada-spec.c: Likewise.
7195 * c-common.c: Likewise.
7196 * c-format.c: Likewise.
7197 * c-gimplify.c: Likewise.
7198 * c-omp.c: Likewise.
7199 * c-pragma.c: Likewise.
7200 * c-pretty-print.c: Likewise.
7201 * cilk.c: Likewise.
7202
62f9079a
MP
72032015-06-25 Marek Polacek <polacek@redhat.com>
7204
7205 * cilk.c (extract_free_variables): Use is_global_var.
7206
0fa16060
RS
72072015-06-23 Richard Sandiford <richard.sandiford@arm.com>
7208
7209 * c-common.c: Don't include target-def.h.
7210
a68ae2e1
MP
72112015-06-23 Marek Polacek <polacek@redhat.com>
7212
7213 * c-common.c (warn_logical_operator): Use tree_int_cst_equal
7214 when comparing INTEGER_CSTs.
7215
c6a2f2d9
PMR
72162015-06-22 Pierre-Marie de Rodat <derodat@adacore.com>
7217
7218 * c-ada-spec.h (cpp_operation): Add HAS_DEPENDENT_TEMPLATE_ARGS.
7219 * c-ada-spec.c (collect_ada_nodes): Skip NAMESPACE_DECL
7220 (dump_ada_template): Skip partially specialized types.
7221
6b4db501
MM
72222015-06-22 Mikhail Maltsev <maltsevm@gmail.com>
7223
7224 * c-common.c (scalar_to_vector): Use std::swap instead of manually
7225 swapping.
7226
abb226c9
AM
72272015-06-17 Andrew MacLeod <amacleod@redhat.com>
7228
7229 * array-notation-common.c: Do not include input.h, line-map.h or is-a.h.
7230 * c-ada-spec.c: Likewise.
7231 * c-cilkplus.c: Likewise.
7232 * c-common.c: Likewise.
7233 * c-common.h: Likewise.
7234 * c-cppbuiltin.c: Likewise.
7235 * c-dump.c: Likewise.
7236 * c-format.c: Likewise.
7237 * c-gimplify.c: Likewise.
7238 * c-indentation.c: Likewise.
7239 * c-lex.c: Likewise.
7240 * c-omp.c: Likewise.
7241 * c-opts.c: Likewise.
7242 * c-pch.c: Likewise.
7243 * c-ppoutput.c: Likewise.
7244 * c-pragma.c: Likewise.
7245 * c-pretty-print.c: Likewise.
7246 * c-semantics.c: Likewise.
7247 * c-ubsan.c: Likewise.
7248 * cilk.c: Likewise.
7249 * stub-objc.c: Likewise.
7250
076fecad
PP
72512015-06-13 Patrick Palka <ppalka@gcc.gnu.org>
7252
7253 PR c++/65168
7254 * c-common.c (c_common_truthvalue_conversion): Warn when
7255 converting an address of a reference to a truth value.
7256
13fdf2e2
AM
72572015-06-08 Andrew MacLeod <amacleod@redhat.com>
7258
7259 * array-notation-common.c : Adjust include files.
7260 * c-ada-spec.c : Likewise.
7261 * c-cilkplus.c : Likewise.
7262 * c-common.c : Likewise.
7263 * c-common.h : Likewise.
7264 * c-cppbuiltin.c : Likewise.
7265 * c-dump.c : Likewise.
7266 * c-format.c : Likewise.
7267 * c-gimplify.c : Likewise.
7268 * c-indentation.c : Likewise.
7269 * c-lex.c : Likewise.
7270 * c-omp.c : Likewise.
7271 * c-opts.c : Likewise.
7272 * c-pch.c : Likewise.
7273 * c-ppoutput.c : Likewise.
7274 * c-pragma.c : Likewise.
7275 * c-pretty-print.c : Likewise.
7276 * c-semantics.c : Likewise.
7277 * c-ubsan.c : Likewise.
7278 * cilk.c : Likewise.
7279 * stub-objc.c : Likewise.
7280
a1661b90
MP
72812015-06-08 Marek Polacek <polacek@redhat.com>
7282
7283 PR c/66415
7284 * c-format.c (location_from_offset): Return LOC if LINE is null.
7285
d7438551
AH
72862015-06-05 Aldy Hernandez <aldyh@redhat.com>
7287
7288 * c-common.h (c_parse_final_cleanups): New prototype.
7289 * c-opts.c (c_common_parse_file): Call c_parse_final_cleanups.
7290
b3d5bc62
JJ
72912015-06-04 Sriraman Tallam <tmsriram@google.com>
7292
7293 * c-common.c (noplt): New attribute.
7294 (handle_noplt_attribute): New handler.
7295
ecb9f223
AM
72962015-06-04 Andrew MacLeod <amacleod@redhat.com>
7297
7298 * array-notation-common.c: Adjust includes for restructured coretypes.h.
7299 * c-ada-spec.c: Likewise.
7300 * c-cilkplus.c: Likewise.
7301 * c-common.c: Likewise.
7302 * c-common.h: Likewise.
7303 * c-cppbuiltin.c: Likewise.
7304 * c-dump.c: Likewise.
7305 * c-format.c: Likewise.
7306 * c-gimplify.c: Likewise.
7307 * c-indentation.c: Likewise.
7308 * c-lex.c: Likewise.
7309 * c-omp.c: Likewise.
7310 * c-opts.c: Likewise.
7311 * c-pch.c: Likewise.
7312 * c-ppoutput.c: Likewise.
7313 * c-pragma.c: Likewise.
7314 * c-pretty-print.c: Likewise.
7315 * c-semantics.c: Likewise.
7316 * c-ubsan.c: Likewise.
7317 * cilk.c: Likewise.
7318 * stub-objc.c: Likewise.
7319
6ac48155
DM
73202015-06-02 David Malcolm <dmalcolm@redhat.com>
7321
7322 PR c/66220:
7323 * c-indentation.c (should_warn_for_misleading_indentation): Use
7324 expand_location rather than expand_location_to_spelling_point.
7325 Don't warn if the guarding statement is more indented than the
7326 next/body stmts.
7327
773ce42e
DM
73282015-06-02 David Malcolm <dmalcolm@redhat.com>
7329
7330 * c-indentation.c (warn_for_misleading_indentation): Bail out
7331 immediately if -Wmisleading-indentation isn't enabled.
7332
4fef8379
ML
73332015-06-01 Martin Liska <mliska@suse.cz>
7334
7335 * c-format.c (check_format_arg):Use new type-based pool allocator.
7336 (check_format_info_main) Likewise.
7337
1edfb384
EB
73382015-05-31 Eric Botcazou <ebotcazou@adacore.com>
7339
7340 * c-ada-spec.c (is_tagged_type): Test for TYPE_METHODS on main variant.
7341 (has_nontrivial_methods): Likewise.
7342
9677ef52
MP
73432015-05-25 Marek Polacek <polacek@redhat.com>
7344
7345 * c-ubsan.c (ubsan_instrument_shift): Use type0.
7346
fd5c817a
MP
73472015-05-22 Marek Polacek <polacek@redhat.com>
7348
7349 PR c/47043
7350 * c-common.c (handle_deprecated_attribute): Allow CONST_DECL.
7351
a2f45fe6 73522015-05-21 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
581edfa3
TS
7353
7354 * c-cppbuiltin.c (c_cpp_builtins): Use if instead of #if with
7355 STACK_GROWS_DOWNWARD.
7356
a2f45fe6 73572015-05-21 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
62f9f30b
TS
7358
7359 * c-cppbuiltin.c (c_cpp_builtins): Check the value of
7360 STACK_GROWS_DOWNWARD rather than if it is defined.
7361
0fee2ac2 73622015-05-21 Manuel López-Ibáñez <manu@gcc.gnu.org>
b1726d6c 7363
0fee2ac2
MLI
7364 PR c/52952
7365 * c-format.c (location_column_from_byte_offset): New.
7366 (location_from_offset): New.
7367 (struct format_wanted_type): Add offset_loc field.
7368 (check_format_info): Move handling of location for extra arguments
7369 closer to the point of warning.
7370 (check_format_info_main): Pass the result of location_from_offset
7371 to warning_at.
7372 (format_type_warning): Pass the result of location_from_offset
7373 to warning_at.
7374
cf4ef6f7
MP
73752015-05-20 Marek Polacek <polacek@redhat.com>
7376
7377 * c-omp.c (check_omp_for_incr_expr): Use BINARY_CLASS_P.
7378
3a65ee74
MP
73792015-05-20 Marek Polacek <polacek@redhat.com>
7380
7381 * c-ada-spec.c (dump_sloc): Use DECL_P.
7382
21b634ae
MP
73832015-05-20 Marek Polacek <polacek@redhat.com>
7384
7385 * c-pragma.c: Use VAR_OR_FUNCTION_DECL_P throughout.
7386 * c-common.c: Likewise.
7387
0e50b624
DM
73882015-05-19 David Malcolm <dmalcolm@redhat.com>
7389
7390 * c-common.h (fe_file_change): Strengthen param from
7391 const line_map * to const line_map_ordinary *.
7392 (pp_file_change): Likewise.
7393 * c-lex.c (fe_file_change): Likewise.
7394 (cb_define): Use linemap_check_ordinary when invoking
7395 SOURCE_LINE.
7396 (cb_undef): Likewise.
7397 * c-opts.c (c_finish_options): Use linemap_check_ordinary when
7398 invoking cb_file_change.
7399 (c_finish_options): Likewise.
7400 (push_command_line_include): Likewise.
7401 (cb_file_change): Strengthen param "new_map" from
7402 const line_map * to const line_map_ordinary *.
7403 * c-ppoutput.c (cb_define): Likewise for local "map".
7404 (pp_file_change): Likewise for param "map" and local "from".
7405
fab27f52
MM
74062015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
7407
7408 * c-common.c (shorten_compare): Use std::swap instead of explicit swaps.
7409
2fe1d762
TV
74102015-05-18 Tom de Vries <tom@codesourcery.com>
7411
7412 * c-common.c (build_va_arg_1): New function.
7413 (build_va_arg): Add address operator to va_list operand if necessary.
7414
7a37fa90
MM
74152015-05-15 Mikhail Maltsev <maltsevm@gmail.com>
7416
7417 PR c/48956
7418 * c-common.c (int_safely_convertible_to_real_p): Define.
7419 (unsafe_conversion_p): Check conversions involving complex types.
7420 (conversion_warning): Add new warning message for conversions which
7421 discard imaginary component.
7422 * c-common.h: (enum conversion_safety): Add new enumerator for such
7423 conversions.
7424
3aa3c9fc
MP
74252015-05-14 Marek Polacek <polacek@redhat.com>
7426
7427 PR c/66066
7428 PR c/66127
7429 * c-common.c (c_fully_fold): Pass false down to c_fully_fold_internal.
7430 (c_fully_fold_internal): Fold C_MAYBE_CONST_EXPRs with
7431 C_MAYBE_CONST_EXPR_INT_OPERANDS set. Add FOR_INT_CONST argument and
7432 use it. If FOR_INT_CONST, require that all evaluated operands be
7433 INTEGER_CSTs.
7434
c3388e62
DM
74352015-05-12 David Malcolm <dmalcolm@redhat.com>
7436
7437 * c-common.h (warn_for_misleading_indentation): New prototype.
7438 * c-indentation.c: New file.
7439 * c.opt (Wmisleading-indentation): New option.
7440
c7b38fd5
TV
74412015-05-12 Tom de Vries <tom@codesourcery.com>
7442
7443 PR tree-optimization/66010
7444 * c-common.c (build_va_arg): Don't mark ap addressable unless necessary.
7445
381bf11e
JM
74462015-05-09 Jason Merrill <jason@redhat.com>
7447
edff0c06
JM
7448 * c-opts.c (c_common_post_options): Also clear
7449 cpp_opts->cpp_warn_cxx11_compat.
7450
129211bc
JM
7451 * c-common.h (enum cxx_dialect): Add cxx_unset.
7452 * c-common.c (cxx_dialect): Initialize to cxx_unset.
7453 * c-opts.c (c_common_post_options): Set C++ dialect to C++98 if unset.
7454
381bf11e
JM
7455 * c.opt (std=c++14): Remove Undocumented flag and experimental warning.
7456 (std=gnu++0x): Mark as Undocumented.
7457 (std=gnu++1y): Add deprecated message.
7458
fe191308
JM
74592015-05-08 Jason Merrill <jason@redhat.com>
7460
765189ff
JM
7461 * c.opt (Wc++11-compat): Make primary. Rename var warn_cxx11_compat.
7462 * c-opts.c: Adjust.
7463
fe191308
JM
7464 * c.opt (Wc++0x-compat): Also set cpp_warn_cxx11_compat.
7465
755e528f
MP
74662015-05-08 Marek Polacek <polacek@redhat.com>
7467
7468 PR c/64918
7469 * c.opt (Woverride-init-side-effects): New option.
7470
0173bd2a
MP
74712015-05-07 Marek Polacek <polacek@redhat.com>
7472
7473 PR c/65179
7474 * c-common.c (c_fully_fold_internal): Warn when left shifting a
7475 negative value.
7476 * c.opt (Wshift-negative-value): New option.
7477 * c-opts.c (c_common_post_options): Set warn_shift_negative_value
7478 when -Wextra and C99/C++11 mode.
7479
e0f0d3b9
MP
74802015-05-07 Marek Polacek <polacek@redhat.com>
7481 Martin Uecker <uecker@eecs.berkeley.edu>
7482
7483 * c-ubsan.c (ubsan_instrument_bounds): Don't skip instrumenting
7484 flexible member array-like members if SANITIZE_BOUNDS_STRICT.
7485
8243e2a9
JM
74862015-05-05 Jason Merrill <jason@redhat.com>
7487
7488 * c.opt (Wterminate): New.
7489
577cd070
MP
74902015-04-30 Marek Polacek <polacek@redhat.com>
7491
7492 * c-common.c (maybe_warn_bool_compare): When comparing with 0/1,
7493 require that the non-constant be of a boolean type.
7494
0373796b
JT
74952015-04-29 Josh Triplett <josh@joshtriplett.org>
7496
e0f0d3b9
MP
7497 * c-common.c (handle_section_attribute): Refactor to reduce
7498 nesting and distinguish between error cases.
0373796b 7499
716c0ba6
MP
75002015-04-29 Marek Polacek <polacek@redhat.com>
7501
7502 PR c/64610
7503 * c-common.c (maybe_warn_bool_compare): Warn when comparing a boolean
7504 with 0/1.
7505
8848828b
JJ
75062015-04-29 Jakub Jelinek <jakub@redhat.com>
7507
7508 * c-common.h (omp_clause_mask): Unconditionally define as a class.
7509 Use uint64_t instead of unsigned HOST_WIDE_INT and 64 instead of
7510 HOST_BITS_PER_WIDE_INT.
7511
ecd0e562
TV
75122015-04-28 Tom de Vries <tom@codesourcery.com>
7513
7514 PR tree-optimization/65887
7515 * c-common.c (build_va_arg): Mark va_arg ap argument as addressable.
7516
2a877204 75172015-04-28 Eric Botcazou <ebotcazou@adacore.com>
e0f0d3b9 7518 Pierre-Marie de Rodat <derodat@adacore.com>
2a877204
EB
7519
7520 * c-ada-spec.c (in_function): Delete.
7521 (dump_generic_ada_node): Do not change in_function and remove the
7522 redundant code dealing with it.
7523 (print_ada_declaration): Do not change in_function. Use INDENT_INCR.
7524 (print_ada_methods): Output the static member functions in a nested
7525 package after the regular methods as well as associated renamings.
7526
4853031e
MP
75272015-04-24 Marek Polacek <polacek@redhat.com>
7528
7529 PR c/65830
7530 * c-common.c (c_fully_fold_internal): Use OPT_Wshift_count_negative
7531 and OPT_Wshift_count_overflow.
7532
8c2b7f79
MP
7533 PR c/63357
7534 * c-common.c (warn_logical_operator): Warn if the operands have the
7535 same expressions.
7536
b8787813
MP
75372015-04-24 Marek Polacek <polacek@redhat.com>
7538
7539 PR c/61534
7540 * c-common.c (warn_logical_operator): Bail if either operand comes
7541 from a macro expansion.
7542
8fba1830
BRF
75432015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
7544
7545 PR target/55143
7546 * c-common.c (c_default_pointer_mode): Add definition.
7547 * c-common.h (c_default_pointer_mode): Add declaration.
7548
17958621
JJ
75492015-03-11 Jakub Jelinek <jakub@redhat.com>
7550
7551 * c-common.c (c_common_nodes_and_builtins): Don't call xstrdup
7552 on record_builtin_type argument.
7553
7ccb1a11
JJ
75542015-03-10 Jakub Jelinek <jakub@redhat.com>
7555
7556 PR c/65120
7557 * c-common.c (warn_logical_not_parentheses): Don't warn for
7558 !x == 0 or !x != 0.
7559
04fd785e
MP
75602015-03-07 Marek Polacek <polacek@redhat.com>
7561
7562 PR sanitizer/65280
7563 * c-ubsan.c (ubsan_instrument_bounds): Check for COMPONENT_REF
7564 before trying to figure out whether we have a flexible array member.
7565
a4e26206 75662015-03-06 Eric Botcazou <ebotcazou@adacore.com>
8e745a17 7567 Jonathan Wakely <jwakely.gcc@gmail.com>
a4e26206
EB
7568
7569 * c-ada-spec.c (dump_ada_double_name): Fix pasto.
7570
0d2489f4
EB
75712015-03-05 Eric Botcazou <ebotcazou@adacore.com>
7572
7573 PR ada/65319
7574 * c-ada-spec.c (print_destructor): Remove obsolete code.
7575
83ed54d7
EB
75762015-03-01 Eric Botcazou <ebotcazou@adacore.com>
7577
7578 * c-ada-spec.c (is_tagged_type): Add guard for DECL_VINDEX.
7579 (dump_template_types): Adjust DECL_TEMPLATE_INSTANTIATIONS and
7580 DECL_TEMPLATE_RESULT emulations.
7581 (dump_ada_template)): Add guard for TYPE_METHODS.
7582
7631f0e2
MP
75832015-02-27 Marek Polacek <polacek@redhat.com>
7584
7585 PR c/65040
7586 * c.opt (Wformat-signedness): Don't enable by -Wformat=2.
7587
d1783ae5
KT
75882015-02-27 Kai Tietz <ktietz@redhat.com>
7589
7590 PR c/35330
7591 * c-pragma.c (handle_pragma_weak): Do not try to create
7592 weak/alias of declarations not being function, or variable
7593 declarations.
7594
56a9f6bc
TS
75952015-02-24 Thomas Schwinge <thomas@codesourcery.com>
7596
7597 PR libgomp/64625
7598 * c-common.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
7599 Remove macros.
7600 (DEF_FUNCTION_TYPE_VAR_7, DEF_FUNCTION_TYPE_VAR_11): New macros.
7601
3d5cb23d
MP
76022015-02-16 Marek Polacek <polacek@redhat.com>
7603
7604 PR c/65066
7605 * c-format.c (check_format_types): Handle null param.
7606
fa008882
MP
76072015-02-13 Marek Polacek <polacek@redhat.com>
7608
7609 PR c/65040
7610 * c-format.c (check_format_types): Don't warn about different
7611 signedness if the original value is in the range of WANTED_TYPE.
7612
785f21af
JM
76132015-02-12 Jason Merrill <jason@redhat.com>
7614
7615 PR c++/64956
7616 * c-opts.c (c_common_post_options): Change flag_abi_version from 0
7617 to the current highest version.
7618 * c-cppbuiltin.c (c_cpp_builtins): Assert that it isn't 0.
7619
4886ec8e
JJ
76202015-02-04 Jakub Jelinek <jakub@redhat.com>
7621
7622 PR c/64824
7623 PR c/64868
7624 * c-omp.c (c_finish_omp_atomic): Use TRUNC_DIV_EXPR
7625 instead of RDIV_EXPR. Use build_binary_op instead of
7626 build2_loc.
7627
40fecdd6
JM
76282015-01-30 Joseph Myers <joseph@codesourcery.com>
7629
7630 * c-opts.c, c-pch.c, cppspec.c: All callers of fatal_error changed
7631 to pass input_location as first argument.
7632
a0c88d06
TV
76332015-01-23 Tom de Vries <tom@codesourcery.com>
7634
7635 PR libgomp/64672
7636 * c.opt (fopenacc): Mark as LTO option.
7637
1506ae0e
TV
76382015-01-23 Tom de Vries <tom@codesourcery.com>
7639
7640 PR libgomp/64707
7641 * c.opt (fopenmp): Mark as LTO option.
7642
31be63ab
JJ
76432015-01-21 Jakub Jelinek <jakub@redhat.com>
7644
7645 PR c/63307
b1726d6c 7646 * cilk.c (fill_decls_vec): Only put decls into vector v.
31be63ab
JJ
7647 (compare_decls): Fix up formatting.
7648
76492015-01-21 Igor Zamyatin <igor.zamyatin@intel.com>
7650
7651 PR c/63307
7652 * cilk.c: Include vec.h.
7653 (struct cilk_decls): New structure.
7654 (wrapper_parm_cb): Split this function to...
7655 (fill_decls_vec): ...this...
7656 (create_parm_list): ...and this.
7657 (compare_decls): New function.
7658 (for_local_cb): Remove.
7659 (wrapper_local_cb): Ditto.
7660 (build_wrapper_type): For now first traverse and fill vector of
7661 declarations then sort it and then deal with sorted vector.
7662 (cilk_outline): Ditto.
7663 (declare_one_free_variable): Ditto.
7664
6875457f
JM
76652015-01-21 Jason Merrill <jason@redhat.com>
7666
7667 PR c++/64629
7668 * c-format.c (check_format_arg): Call decl_constant_value.
7669
185c9e56
ML
76702015-01-19 Martin Liska <mliska@suse.cz>
7671
7672 * c-common.c (handle_noicf_attribute): New function.
7673
41dbbb37
TS
76742015-01-15 Thomas Schwinge <thomas@codesourcery.com>
7675 Bernd Schmidt <bernds@codesourcery.com>
7676 James Norris <jnorris@codesourcery.com>
7677 Cesar Philippidis <cesar@codesourcery.com>
7678 Ilmir Usmanov <i.usmanov@samsung.com>
7679 Jakub Jelinek <jakub@redhat.com>
7680
7681 * c.opt (fopenacc): New option.
7682 * c-cppbuiltin.c (c_cpp_builtins): Conditionally define _OPENACC.
7683 * c-common.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
7684 New macros.
7685 * c-common.h (c_finish_oacc_wait): New prototype.
7686 * c-omp.c: Include "omp-low.h" and "gomp-constants.h".
7687 (c_finish_oacc_wait): New function.
7688 * c-pragma.c (oacc_pragmas): New variable.
7689 (c_pp_lookup_pragma, init_pragma): Handle it.
7690 * c-pragma.h (enum pragma_kind): Add PRAGMA_OACC_CACHE,
7691 PRAGMA_OACC_DATA, PRAGMA_OACC_ENTER_DATA, PRAGMA_OACC_EXIT_DATA,
7692 PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP, PRAGMA_OACC_PARALLEL,
7693 PRAGMA_OACC_UPDATE, PRAGMA_OACC_WAIT.
7694 (enum pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_ASYNC,
7695 PRAGMA_OACC_CLAUSE_AUTO, PRAGMA_OACC_CLAUSE_COLLAPSE,
7696 PRAGMA_OACC_CLAUSE_COPY, PRAGMA_OACC_CLAUSE_COPYIN,
7697 PRAGMA_OACC_CLAUSE_COPYOUT, PRAGMA_OACC_CLAUSE_CREATE,
7698 PRAGMA_OACC_CLAUSE_DELETE, PRAGMA_OACC_CLAUSE_DEVICE,
7699 PRAGMA_OACC_CLAUSE_DEVICEPTR, PRAGMA_OACC_CLAUSE_FIRSTPRIVATE,
7700 PRAGMA_OACC_CLAUSE_GANG, PRAGMA_OACC_CLAUSE_HOST,
7701 PRAGMA_OACC_CLAUSE_IF, PRAGMA_OACC_CLAUSE_NUM_GANGS,
7702 PRAGMA_OACC_CLAUSE_NUM_WORKERS, PRAGMA_OACC_CLAUSE_PRESENT,
7703 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPY,
7704 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPYIN,
7705 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPYOUT,
7706 PRAGMA_OACC_CLAUSE_PRESENT_OR_CREATE, PRAGMA_OACC_CLAUSE_PRIVATE,
7707 PRAGMA_OACC_CLAUSE_REDUCTION, PRAGMA_OACC_CLAUSE_SELF,
7708 PRAGMA_OACC_CLAUSE_SEQ, PRAGMA_OACC_CLAUSE_VECTOR,
7709 PRAGMA_OACC_CLAUSE_VECTOR_LENGTH, PRAGMA_OACC_CLAUSE_WAIT,
7710 PRAGMA_OACC_CLAUSE_WORKER.
7711
3f8257db 77122015-01-14 Marcos Diaz <marcos.diaz@tallertechnologies.com>
5434dc07
MD
7713
7714 * c-cppbuiltin.c (c_cpp_builtins): New cpp define __SSP_EXPLICIT__
7715 for the new option fstack-protector_explicit.
7716 * c-common.c (c_common_attribute_table): Add stack_protect attribute.
7717 (handle_stack_protect_attribute): New function.
7718
3f8257db 77192015-01-13 Martin Uecker <uecker@eecs.berkeley.edu>
de1b5c17
MU
7720
7721 * c.opt: New option -Warray-bounds=.
7722
adfac8df
JJ
77232015-01-09 Michael Collison <michael.collison@linaro.org>
7724
7725 * array-notation-common.c: Include hash-set.h, machmode.h,
7726 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
7727 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
7728 * c-ada-spec.c: Ditto.
7729 * c-cilkplus.c: Ditto.
7730 * c-common.c: Include input.h due to flattening of tree.h.
7731 Define macro GCC_C_COMMON_C.
7732 * c-common.h: Flatten tree.h header files into c-common.h.
7733 Remove include of tree-core.h.
7734 * c-cppbuiltin.c: Include hash-set.h, machmode.h,
7735 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
7736 fold-const.h, wide-int.h, and inchash.h due to
7737 flattening of tree.h.
7738 * c-dump.c: Ditto.
7739 * c-format.c: Flatten tree.h header files into c-common.h.
7740 * c-cppbuiltin.c: Include hash-set.h, machmode.h,
7741 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
7742 fold-const.h, wide-int.h, and inchash.h due to
7743 flattening of tree.h.
7744 * c-dump.c: Include hash-set.h, machmode.h,
7745 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
7746 fold-const.h, wide-int.h, and inchash.h due to
7747 flattening of tree.h.
7748 * c-format.c: Include hash-set.h, machmode.h,
7749 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
7750 fold-const.h, wide-int.h, inchash.h and real.h due to
7751 flattening of tree.h.
7752 * c-gimplify.c: Include hash-set.h, machmode.h,
7753 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
7754 fold-const.h, wide-int.h, and inchash.h due to
7755 flattening of tree.h.
7756 * cilk.c: Ditto.
7757 * c-lex.c: Ditto.
7758 * c-omp.c: Ditto.
7759 * c-opts.c: Ditto.
7760 * c-pch.c: Ditto.
7761 * c-ppoutput.c: Ditto.
7762 * c-pragma.c: Ditto.
7763 * c-pretty-print.c: Ditto.
7764 * c-semantics.c: Ditto.
7765 * c-ubsan.c: Ditto.
7766 * stub-objc.c: Ditto.
7767
f5481fc4
JM
77682015-01-08 Jason Merrill <jason@redhat.com>
7769
7770 * c-ubsan.c (ubsan_maybe_instrument_array_ref): Use
7771 do_ubsan_in_current_function.
7772 (ubsan_maybe_instrument_reference_or_call): Likewise.
7773 * c-ubsan.h: Declare it.
7774
de35aa66
MS
77752015-01-08 Mike Stump <mikestump@comcast.net>
7776
7777 * c-common.c (c_common_attribute_table): Add no_sanitize_thread.
7778
4a9a42ab
MP
77792015-01-07 Marek Polacek <polacek@redhat.com>
7780
7781 PR c/64440
7782 * c-common.c (c_fully_fold_internal): Warn for division and modulo
7783 if orig_op1 isn't INTEGER_CST, op1 is INTEGER_CST and is zero.
7784
2f42e5de
TS
77852015-01-05 Trevor Saunders <tsaunders@mozilla.com>
7786
7787 PR c++/31397
7788 * c.opt (Wsuggest-override): New option.
7789
5624e564
JJ
77902015-01-05 Jakub Jelinek <jakub@redhat.com>
7791
7792 Update copyright years.
7793
5bd012f8
MP
77942015-01-05 Marek Polacek <polacek@redhat.com>
7795
7796 PR c/64423
7797 * c-common.c (warn_array_subscript_with_type_char): Add location_t
7798 parameter. Use it.
7799 * c-common.h (warn_array_subscript_with_type_char): Update
7800 declaration.
7801
a7fa8d18
ESR
78022014-12-20 Edward Smith-Rowland <3dw4rd@verizon.net>
7803
7804 * c-cppbuiltin.c (__cpp_sized_deallocation): Uncomment and move macro.
7805 Control macro with flag_sized_deallocation.
7806
3f8257db 78072014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
768952be
MU
7808
7809 * c.opt (Wdiscarded-array-qualifiers): New option.
7810
1f8d3e84
JJ
78112014-12-19 Jakub Jelinek <jakub@redhat.com>
7812
7813 PR preprocessor/63831
7814 * c-cppbuiltin.c (c_cpp_builtins): Don't define __has_attribute
7815 and __has_cpp_attribute here.
7816 * c-ppoutput.c (init_pp_output): Set cb->has_attribute to
7817 c_common_has_attribute.
7818 * c-common.h (c_common_has_attribute): New prototype.
7819 * c-lex.c (init_c_lex): Set cb->has_attribute to
7820 c_common_has_attribute instead of cb_has_attribute.
7821 (get_token_no_padding): New function.
7822 (cb_has_attribute): Renamed to ...
7823 (c_common_has_attribute): ... this. No longer static. Use
7824 get_token_no_padding, require ()s, don't build TREE_LIST
7825 unnecessarily, fix up formatting, adjust diagnostics, call
7826 init_attributes.
7827
20b06add
JM
78282014-12-15 Jason Merrill <jason@redhat.com>
7829
7830 * c.opt (-fsized-deallocation, -Wc++14-compat): New.
7831 (-Wsized-deallocation): New.
7832 * c-opts.c (c_common_post_options): -fsized-deallocation defaults
7833 to on in C++14 and up.
7834
94a073b2
JM
78352014-12-11 Jason Merrill <jason@redhat.com>
7836
acaa5911
JM
7837 * c-cppbuiltin.c (c_cpp_builtins): Enable C++14 __cpp_constexpr.
7838
94a073b2
JM
7839 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_runtime_arrays if
7840 we aren't complaining about VLAs.
7841
7fb66c15
MP
78422014-12-06 Marek Polacek <polacek@redhat.com>
7843
7844 PR tree-optimization/64183
7845 * c-gimplify.c (c_gimplify_expr): Don't convert the RHS of a
7846 shift-expression if it is integer_type_node. Use types_compatible_p.
7847
b731b390
JJ
78482014-11-29 Jakub Jelinek <jakub@redhat.com>
7849
7850 * c-common.c (convert_vector_to_pointer_for_subscript): Remove NULL
7851 last argument from create_tmp_var_raw and create_tmp_var calls.
7852 * cilk.c (gimplify_cilk_spawn): Likewise.
7853 * c-omp.c (c_finish_omp_atomic): Likewise.
7854
6a4da643
MP
78552014-11-28 Marek Polacek <polacek@redhat.com>
7856
7857 * c-ubsan.c (ubsan_instrument_shift): Use op1_utype for MINUS_EXPR
7858 instead of unsigned_type_node.
7859
541e35a6
MP
78602014-11-28 Marek Polacek <polacek@redhat.com>
7861
7862 PR c/63862
7863 * c-ubsan.c (ubsan_instrument_shift): Change the type of a MINUS_EXPR
7864 to op1_utype.
7865 * c-gimplify.c (c_gimplify_expr): Convert right operand of a shift
7866 expression to unsigned_type_node.
7867
dcc97066
MW
78682014-11-20 Mark Wielaard <mjw@redhat.com>
7869
7870 PR debug/38757
7871 * c-opts.c (set_std_c89): Set lang_hooks.name.
7872 (set_std_c99): Likewise.
7873 (set_std_c11): Likewise.
7874 (set_std_cxx98): Likewise.
7875 (set_std_cxx11): Likewise.
7876 (set_std_cxx14): Likewise.
7877 (set_std_cxx1z): Likewise.
7878
aa7da51a
JJ
78792014-11-21 Jakub Jelinek <jakub@redhat.com>
7880
7881 PR target/63764
7882 * c-common.h (convert_vector_to_pointer_for_subscript): Change
7883 return type to bool.
009a3480 7884 * c-common.c: Include gimple-expr.h.
aa7da51a
JJ
7885 (convert_vector_to_pointer_for_subscript): Change return type to
7886 bool. If *vecp is not lvalue_p and has VECTOR_TYPE, return true
7887 and copy it into a TARGET_EXPR and use that instead of *vecp
7888 directly.
7889
538dd0b7
DM
78902014-11-19 David Malcolm <dmalcolm@redhat.com>
7891
7892 Merger of git branch "gimple-classes-v2-option-3".
7893 * ChangeLog.gimple-classes: New.
7894 * c-gimplify.c (add_block_to_enclosing): Strengthen local "stack"
7895 from being just a vec<gimple> to a vec<gbind *>.
7896
c39a5e99
JJ
78972014-11-18 Jakub Jelinek <jakub@redhat.com>
7898
7899 PR sanitizer/63813
7900 * c-ubsan.c (ubsan_maybe_instrument_reference_or_call): Change type
7901 argument to ptype, set type to TREE_TYPE (ptype). Don't call
7902 get_pointer_alignment for non-pointers. Use ptype, or if it is
7903 reference type, corresponding pointer type, as type of kind
7904 argument.
7905 (ubsan_maybe_instrument_reference,
7906 ubsan_maybe_instrument_member_call): Adjust callers.
7907
8537a4a9
MP
79082014-11-15 Marek Polacek <polacek@redhat.com>
7909
7910 PR middle-end/63884
7911 * array-notation-common.c (is_sec_implicit_index_fn): Return false
7912 for NULL fndecl.
7913 (extract_array_notation_exprs): Return for NULL node.
7914
2079956a
JM
79152014-11-12 Joseph Myers <joseph@codesourcery.com>
7916
7917 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Define and
7918 undefine __NO_MATH_ERRNO__ based on changes to -fmath-errno state.
7919
1304953e
JJ
79202014-11-12 Jakub Jelinek <jakub@redhat.com>
7921
7922 PR c/59708
7923 * c-common.c (check_builtin_function_arguments): Handle
7924 BUILT_IN_{ADD,SUB,MUL}_OVERFLOW.
7925
e5e44252
AK
79262014-11-10 Andi Kleen <ak@linux.intel.com>
7927
7928 PR c/60804
7929 * c-common.h (check_no_cilk): Declare.
7930 * cilk.c (get_error_location): New function.
7931 (check_no_cilk): Dito.
7932
e64b984d
AK
79332014-11-10 Andi Kleen <ak@linux.intel.com>
7934
7935 * cilk.c (recognize_spawn): Use expression location
7936 for error message.
7937
13c21655
PC
79382014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
7939
7940 * c.opt ([Wshift-count-negative, Wshift-count-overflow]): Add.
7941
42fd12b1
ESR
79422014-11-10 Edward Smith-Rowland <3dw4rd@verizon.net>
7943
7944 * c-cppbuiltin.c (__has_attribute, __has_cpp_attribute): New macros;
7945 (__cpp_rtti, __cpp_exceptions): New macros for C++98;
7946 (__cpp_range_based_for, __cpp_initializer_lists,
7947 __cpp_delegating_constructors, __cpp_nsdmi,
7948 __cpp_inheriting_constructors, __cpp_ref_qualifiers): New macros
7949 for C++11; (__cpp_attribute_deprecated): Remove in favor of
7950 __has_cpp_attribute.
7951 * c-lex.c (cb_has_attribute): New callback CPP function;
7952 (init_c_lex): Set has_attribute callback.
7953
6f450181
RB
79542014-11-04 Richard Biener <rguenther@suse.de>
7955
7956 * c-common.c (shorten_compare): Do not shorten mixed
7957 DFP and non-DFP compares.
7958
26f0e1d6
ESR
79592014-11-01 Edward Smith-Rowland <3dw4rd@verizon.net>
7960
7961 * g++.dg/cpp1y/feat-cxx11.C: Commentary and rearrangement of tests.
7962 * g++.dg/cpp1y/feat-cxx11-neg.C: Add aggregate NSDMI test.
7963 Commentary and rearrangement of tests.
7964 * g++.dg/cpp1y/feat-cxx14.C: Enable aggregate NSDMI test.
7965 Commentary and rearrangement of tests.
ab20d992 7966 * g++.dg/cpp1y/feat-cxx98-neg.C: Ditto.
26f0e1d6
ESR
7967 * g++.dg/cpp1y/feat-cxx98.C: Commentary.
7968
ef4bddc2
RS
79692014-10-29 Richard Sandiford <richard.sandiford@arm.com>
7970
7971 * c-common.c, c-common.h, c-cppbuiltin.c, c-lex.c: Remove redundant
7972 enum from machine_mode.
7973
c582198b
AM
79742014-10-28 Andrew MacLeod <amacleod@redhat.com>
7975
adfac8df
JJ
7976 * c-common.c: Adjust include files.
7977 * c-gimplify.c: Ditto.
7978 * cilk.c: Ditto.
7979 * c-pragma.c: Ditto.
7980 * c-ubsan.c: Ditto.
c582198b 7981
60393bbc
AM
79822014-10-27 Andrew MacLeod <amacleod@redhat.com>
7983
7984 * c-gimplify.c: Adjust include files.
7985
d723bb7c
MLI
79862014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
7987
7988 PR c++/53061
7989 * c-opts.c (c_common_diagnostics_set_defaults): Renamed from
7990 c_common_initialize_diagnostics.
7991 * c-common.h: Likewise.
7992
90f3520e
MP
79932014-10-24 Marek Polacek <polacek@redhat.com>
7994
7995 PR c/56980
7996 * c-pretty-print.c (c_pretty_printer::simple_type_specifier): Don't
7997 print "struct"/"union"/"enum" for typedefed names.
7998
59d7607a
MP
79992014-10-23 Marek Polacek <polacek@redhat.com>
8000
8001 * c-ubsan.c (ubsan_instrument_shift): Perform the MINUS_EXPR
8002 in unsigned type.
8003
d95a2703
JJ
80042014-10-22 Jakub Jelinek <jakub@redhat.com>
8005 Yury Gribov <y.gribov@samsung.com>
8006
8007 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
8008 ubsan_instrument_vla): Check bits in flag_sanitize_recover bitmask
8009 instead of flag_sanitize_recover as bool flag.
8010
8e6ef852
KY
80112014-10-21 Kirill Yukhin <kirill.yukhin@intel.com>
8012
8013 * cilk.c: Revert previous change.
8014
948cf550
IZ
80152014-10-20 Igor Zamyatin <igor.zamyatin@intel.com>
8016
8017 PR c/63307
8018 * cilk.c: Include vec.h.
8019 (struct cilk_decls): New structure.
8020 (wrapper_parm_cb): Split this function to...
8021 (fill_decls_vec): ...this...
8022 (create_parm_list): ...and this.
8023 (compare_decls): New function.
8024 (for_local_cb): Remove.
8025 (wrapper_local_cb): Ditto.
8026 (build_wrapper_type): For now first traverse and fill vector of
8027 declarations then sort it and then deal with sorted vector.
8028 (cilk_outline): Ditto.
8029 (declare_one_free_variable): Ditto.
8030
92574c7c
MP
80312014-10-17 Marek Polacek <polacek@redhat.com>
8032
8033 * c-opts.c (c_common_post_options): Set warn_implicit_int.
8034 * c.opt (Wimplicit-int): Initialize to -1.
8035
83685514
AM
80362014-10-16 Andrew MacLeod <amacleod@redhat.com>
8037
8038 * c-pragma.c: Adjust include files.
8039 * c-semantics.c: Likewise.
8040
5b8300ea
DD
80412014-10-16 DJ Delorie <dj@redhat.com>
8042
8043 * c-cppbuiltin.c (cpp_atomic_builtins): Don't assume pointers are
8044 multiples of bytes.
8045
5f83e90b
JM
80462014-10-14 Jason Merrill <jason@redhat.com>
8047
8048 PR c++/63455
8049 * c-common.h (CPP_PREPARSED_EXPR): New.
8050 (N_CP_TTYPES): Adjust.
8051
d73326ca
MP
80522014-10-15 Marek Polacek <polacek@redhat.com>
8053
8054 * c-opts.c (c_common_init_options): Make -std=gnu11 the default for C.
8055
78a7c317
DD
80562014-10-14 DJ Delorie <dj@redhat.com>
8057
8058 * c-pretty-print.c (pp_c_integer_constant): Check for all __intN
8059 types, not just __int128.
8060 * c-cppbuiltin.c (c_cpp_builtins): Add builtins for all __intN
8061 types, not just __int128.
8062 (cpp_atomic_builtins): Round pointer sizes up.
8063 (type_suffix): Use type precision, not specific types.
8064 * c-common.c (c_common_reswords): Remove __int128 special case.
8065 (c_common_type_for_size): Check for all __intN types, not just
8066 __int128.
8067 (c_common_type_for_mode): Likewise.
8068 (c_common_signed_or_unsigned_type): Likewise.
8069 (c_build_bitfield_integer_type): Likewise.
8070 (c_common_nodes_and_builtins): Likewise.
8071 (keyword_begins_type_specifier): Likewise.
8072 * c-common.h (rid): Remove RID_INT128 and add RID_INT_N_* for all
8073 __intN variants.
8074
2a22f99c
TS
80752014-10-12 Trevor Saunders <tsaunders@mozilla.com>
8076
8077 * c-common.c: Use hash_table instead of hashtab.
8078
2a8ef767
ESR
80792014-10-06 Edward Smith-Rowland <3dw4rd@verizon.net>
8080
adfac8df 8081 * c-cppbuiltin.c: Move __cpp_attribute_deprecated to the
2a8ef767
ESR
8082 C++11 section.
8083
3c9aabbd
MG
80842014-10-03 Marc Glisse <marc.glisse@inria.fr>
8085
8086 PR c++/54427
8087 PR c++/57198
8088 PR c++/58845
8089 * c-common.c (warn_logical_operator): Punt for vectors.
8090
a15f7cb8
ESR
80912014-10-01 Edward Smith-Rowland <3dw4rd@verizon.net>
8092
8093 Implement SD-6: SG10 Feature Test Recommendations
8094 * c-cppbuiltin.c (c_cpp_builtins()): Define language feature
8095 macros and the __has_header macro.
8096
8d0cf15e
JM
80972014-09-30 Jason Merrill <jason@redhat.com>
8098
dd5d5481
JM
8099 * c-common.h (enum rid): Add RID_IS_TRIVIALLY_ASSIGNABLE and
8100 RID_IS_TRIVIALLY_CONSTRUCTIBLE.
8101 * c-common.c (c_common_reswords): Add __is_trivially_copyable.
8102
b752325e
JM
8103 * c-common.h (enum rid): Add RID_IS_TRIVIALLY_COPYABLE.
8104 * c-common.c (c_common_reswords): Add __is_trivially_copyable.
8105
8d0cf15e
JM
8106 * c-common.h (enum rid): Remove RID_IS_CONVERTIBLE_TO.
8107 * c-common.c (c_common_reswords): Remove __is_convertible_to.
8108
083e891e
MP
81092014-09-24 Marek Polacek <polacek@redhat.com>
8110
8111 PR c/61405
8112 PR c/53874
8113 * c-common.h (struct c_common_resword): Don't define CPP_KEYWORD.
8114
7861b648
AK
81152014-09-23 Andi Kleen <ak@linux.intel.com>
8116
8117 * c-common.c (handle_no_reorder_attribute): New function.
8118 (c_common_attribute_table): Add no_reorder attribute.
8119
9a79452d
JM
81202014-09-22 Joseph Myers <joseph@codesourcery.com>
8121
8122 * c-cppbuiltin.c (c_cpp_builtins): Define
8123 __LIBGCC_*_EXCESS_PRECISION__ macros for supported floating-point
8124 modes.
8125
dd69f047
JM
81262014-09-18 Joseph Myers <joseph@codesourcery.com>
8127
8128 * c-cppbuiltin.c (c_cpp_builtins): Define __LIBGCC_*_FUNC_EXT__
8129 for supported floating-point modes.
8130
737a4826
MLI
81312014-09-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
8132
8133 * c.opt (Wpsabi): Use LangEnabledBy.
8134 * c-opts.c (c_common_handle_option): Do not handle here.
8135
8cc4b7a2
JM
81362014-09-12 Joseph Myers <joseph@codesourcery.com>
8137
8138 * c-cppbuiltin.c (c_cpp_builtins): Define __LIBGCC_HAS_%s_MODE__
8139 macros for floating-point modes.
8140
179b5a55
MG
81412014-09-11 Marc Glisse <marc.glisse@inria.fr>
8142
8143 PR target/58757
8144 * c-cppbuiltin.c (builtin_define_float_constants): Correct
8145 __*_DENORM_MIN__ without denormals.
8146
570a11fe
JJ
81472014-09-10 Jakub Jelinek <jakub@redhat.com>
8148
8149 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
8150 ubsan_instrument_vla, ubsan_instrument_return): Adjust
8151 ubsan_create_data callers.
8152 (ubsan_instrument_bounds): Don't emit UBSAN_BOUNDS at all if
8153 index is constant or BIT_AND_EXPR with constant mask and is
8154 small enough for the bound.
8155 * c-gimplify.c (ubsan_walk_array_refs_r): For ADDR_EXPR of
8156 ARRAY_REF, make sure the inner ARRAY_REF is not walked again.
8157
b559c810
MLI
81582014-09-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
8159
8160 * c.opt: Add CppReason to various flags.
8161 (Wdate-time): Re-sort.
8162 * c-common.c: Include c-common.h earlier.
8163 (struct reason_option_codes_t): Delete.
8164 (c_option_controlling_cpp_error): Prefix global type and struct
8165 with cpp_.
8166
1ef33fd4
MLI
81672014-09-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
8168
8169 * c.opt (Wnormalized): New.
8170 (Wnormalized=): Use Enum and Reject Negative.
8171 * c-opts.c (c_common_handle_option): Do not handle Wnormalized here.
8172
66bb34c0
JM
81732014-09-08 Joseph Myers <joseph@codesourcery.com>
8174
8175 * c-cppbuiltin.c (c_cpp_builtins): Define macros for mantissa
8176 digits of floating-point modes if -fbuilding-libgcc.
8177
53d68b9f
JM
81782014-09-05 Joseph Myers <joseph@codesourcery.com>
8179
8180 * c-cppbuiltin.c (c_cpp_builtins): Also define
8181 __LIBGCC_EH_TABLES_CAN_BE_READ_ONLY__,
8182 __LIBGCC_EH_FRAME_SECTION_NAME__, __LIBGCC_JCR_SECTION_NAME__,
8183 __LIBGCC_CTORS_SECTION_ASM_OP__, __LIBGCC_DTORS_SECTION_ASM_OP__,
8184 __LIBGCC_TEXT_SECTION_ASM_OP__, __LIBGCC_INIT_SECTION_ASM_OP__,
8185 __LIBGCC_INIT_ARRAY_SECTION_ASM_OP__,
8186 __LIBGCC_STACK_GROWS_DOWNWARD__,
8187 __LIBGCC_DONT_USE_BUILTIN_SETJMP__,
8188 __LIBGCC_DWARF_ALT_FRAME_RETURN_COLUMN__,
8189 __LIBGCC_DWARF_FRAME_REGISTERS__,
8190 __LIBGCC_EH_RETURN_STACKADJ_RTX__, __LIBGCC_JMP_BUF_SIZE__,
8191 __LIBGCC_STACK_POINTER_REGNUM__ and
8192 __LIBGCC_VTABLE_USES_DESCRIPTORS__ for -fbuilding-libgcc.
8193 (builtin_define_with_value): Handle backslash-escaping in string
8194 macro values.
8195
f65586dc
RB
81962014-09-05 Richard Biener <rguenther@suse.de>
8197
8198 PR middle-end/63148
8199 * c-format.c (check_format_arg): Properly handle
8200 effectively signed POINTER_PLUS_EXPR offset.
8201
2b71f4a4
MLI
82022014-09-04 Manuel López-Ibáñez <manu@gcc.gnu.org>
8203
8204 * c.opt (Wc90-c99-compat,Wc++-compat,Wcomment,Wendif-labels,
8205 Winvalid-pch,Wlong-long,Wmissing-include-dirs,Wmultichar,Wpedantic,
8206 (Wdate-time,Wtraditional,Wundef,Wvariadic-macros): Add CPP, Var
8207 and Init.
8208 * c-opts.c (c_common_handle_option): Do not handle here.
8209 (sanitize_cpp_opts): Likewise.
8210 * c-common.c (struct reason_option_codes_t): Handle
8211 CPP_W_C90_C99_COMPAT and CPP_W_PEDANTIC.
8212
d2e4feca
MP
82132014-09-03 Marek Polacek <polacek@redhat.com>
8214
8215 * c.opt (Wlogical-not-parentheses): Enable by -Wall.
8216
9a771876
JJ
82172014-09-02 Jakub Jelinek <jakub@redhat.com>
8218 Balaji V. Iyer <balaji.v.iyer@intel.com>
8219 Igor Zamyatin <igor.zamyatin@intel.com>
8220
8221 * c-cilkplus.c (cilk_for_number_of_iterations): New function.
8222 * c-common.c (c_common_reswords): Added _Cilk_for.
8223 * c-common.h (enum rid): Added RID_CILK_FOR.
8224 (cilk_for_number_of_iterations): Add declaration.
8225 * c-omp.c (c_finish_omp_for): Added checks for CILK_SIMD and
8226 CILK_FOR.
8227 * c-pragma.c (init_pragma): Register "grainsize" pragma.
8228 * c-pragma.h (enum pragma_kind): Add PRAGMA_CILK_GRAINSIZE.
8229
81b5d104
MLI
82302014-08-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
8231
8232 * c.opt (Wbuiltin-macro-redefined,Wdeprecated,Wendif-labels,
8233 Winvalid-pch,Wliteral-suffix,Wmissing-include-dirs,Wtrigraphs,
8234 Wundef): Use CPP, Var and Init.
8235 * c-opts.c (c_common_handle_option): Do not handle the above flags here.
8236
b753b37b
MLI
82372014-08-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
8238
8239 * c.opt (Wbuiltin-macro-redefined): Use CPP, Var and Init.
8240 * c-opts.c (c_common_handle_option): Do not handle here.
8241
028aee17
JM
82422014-08-25 Jason Merrill <jason@redhat.com>
8243
8244 * c.opt: Change -std=c++1y and -std=gnu++1y to be aliases for
8245 -std=c++14 and -std=gnu++14, rather than the reverse.
8246 * c-opts.c (c_common_handle_option): Change OPT_std_c__1y and
8247 OPT_std_gnu__1y to OPT_std_c__14 and OPT_std_gnu__14.
8248 * c-common.h (cxx_dialect): Remove cxx1y.
8249
e4276ba5
ESR
82502014-08-23 Edward Smith-Rowland <3dw4rd@verizon.net>
8251
8252 * c-common.h (enum cxx_dialect): Add cxx14.
8253 * c-opts.c (set_std_cxx1y): Rename to set_std_cxx14; Use cxx14.
8254 * c-ubsan.c (ubsan_instrument_shift): Change comment and logic from
8255 cxx_dialect == cxx11 || cxx_dialect == cxx1y to cxx_dialect >= cxx11.
8256
a545cacd
JM
82572014-08-22 Jason Merrill <jason@redhat.com>
8258
8259 * c.opt (std=gnu++17): Fix alias.
8260
59ea0364
MP
82612014-08-22 Marek Polacek <polacek@redhat.com>
8262
8263 PR c++/62199
8264 * c-common.c (warn_logical_not_parentheses): Don't check LHS. Don't
8265 check for vector types. Drop LHS argument.
8266 * c-common.h (warn_logical_not_parentheses): Adjust.
8267
596e808c
MLI
82682014-08-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
8269
8270 * c.opt (Wcomment): Use CPP, Var and LangEnabledBy.
8271 (Wmultichar): Likewise.
8272 (Wdate-time): Use C-family languages instead of Common. Use CPP
8273 and Var.
8274 * c-opts.c (c_common_handle_option): Do not handle the above
8275 options here.
8276 (sanitize_cpp_opts): Likewise.
8277
18767f65
MLI
82782014-08-21 Manuel López-Ibáñez <manu@gcc.gnu.org>
8279
8280 PR fortran/44054
8281 * c-opts.c: Include tree-diagnostics.h.
8282 (c_diagnostic_finalizer): New.
8283 (c_common_initialize_diagnostics): Use it.
8284
b4413594
MLI
82852014-08-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
8286
8287 PR preprocessor/51303
8288 * c-common.c (struct reason_option_codes_t option_codes):
8289 Add CPP_W_MISSING_INCLUDE_DIRS. Sort alphabetically.
8290
43f9a13c
MLI
82912014-08-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
8292
8293 PR c/60975
8294 PR c/53063
8295 * c.opt (Wvariadic-macros): Use CPP and LangEnabledBy.
8296 * c-opts.c (c_common_handle_option): Call cpp_handle_option_auto.
8297 (c_common_post_options): Call init_global_opts_from_cpp.
8298 (sanitize_cpp_opts): Do not handle Wvariadic-macros here.
8299
04159acf
MP
83002014-08-19 Marek Polacek <polacek@redhat.com>
8301
8302 PR c++/62153
8303 * c-common.c (maybe_warn_bool_compare): New function.
8304 * c-common.h (maybe_warn_bool_compare): Declare.
8305 * c.opt (Wbool-compare): New option.
8306
35aff4fb
MP
83072014-08-19 Marek Polacek <polacek@redhat.com>
8308
8309 * c.opt (Wc99-c11-compat): New option.
8310
177cce46
MP
83112014-08-19 Marek Polacek <polacek@redhat.com>
8312
8313 * c-opts.c (sanitize_cpp_opts): Make warn_long_long be set according
8314 to warn_c90_c99_compat.
8315 * c.opt (Wc90-c99-compat, Wdeclaration-after-statement): Initialize
8316 to -1.
8317
6ae9194f
MLI
83182014-08-19 Manuel López-Ibáñez <manu@gcc.gnu.org>
8319 Steven Bosscher <steven@gcc.gnu.org>
8320
8321 PR c/52952
8322 * c-format.c: Add extra_arg_loc and format_string_loc to struct
8323 format_check_results.
8324 (check_function_format): Use true and add comment for boolean
8325 argument.
8326 (finish_dollar_format_checking): Use explicit location when warning.
8327 (check_format_info): Likewise.
8328 (check_format_arg): Set extra_arg_loc and format_string_loc.
8329 (check_format_info_main): Use explicit location when warning.
8330 (check_format_types): Pass explicit location.
8331 (format_type_warning): Likewise.
8332
8e54f6d3
MLI
83332014-08-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
8334
8335 PR fortran/44054
8336 * c-format.c: Handle Fortran flags.
8337
cd4e76fc
IZ
83382014-08-12 Igor Zamyatin <igor.zamyatin@intel.com>
8339
8340 PR other/61962
8341 * array-notation-common.c (find_rank): Added handling for other
8342 types of references.
8343
f3bede71
MP
83442014-08-10 Marek Polacek <polacek@redhat.com>
8345
8346 PR c/51849
8347 * c-opts.c (sanitize_cpp_opts): Pass warn_c90_c99_compat to libcpp.
8348 * c.opt (Wc90-c99-compat): Add option.
8349
9f25a338
TS
83502014-08-07 Trevor Saunders <tsaunders@mozilla.com>
8351
8352 * c-gimplify.c, cilk.c: Remove includes of pointer-set.h.
8353
62e4eb35
MP
83542014-08-03 Marek Polacek <polacek@redhat.com>
8355
ab20d992 8356 * c-common.c (check_case_value): Add location_t parameter. Use it.
62e4eb35
MP
8357 (c_add_case_label): Pass loc to check_case_value.
8358
b787e7a2
TS
83592014-08-02 Trevor Saunders <tsaunders@mozilla.com>
8360
8361 * cilk.c: Use hash_map instead of pointer_map.
8362
6e2830c3
TS
83632014-08-02 Trevor Saunders <tsaunders@mozilla.com>
8364
8365 * c-gimplify.c: Use hash_set instead of pointer_set.
8366
a7ee52fb
IZ
83672014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
8368
8369 PR middle-end/61455
8370 * array-notation-common.c (extract_array_notation_exprs): Handling
8371 of DECL_EXPR added.
8372
944fa280
JJ
83732014-08-01 Jakub Jelinek <jakub@redhat.com>
8374
8375 * c-common.h (min_align_of_type): Removed prototype.
8376 * c-common.c (min_align_of_type): Removed.
8377 * c-ubsan.h (ubsan_maybe_instrument_reference,
8378 ubsan_maybe_instrument_member_call): New prototypes.
8379 * c-ubsan.c: Include stor-layout.h and builtins.h.
8380 (ubsan_maybe_instrument_reference_or_call,
8381 ubsan_maybe_instrument_reference, ubsan_maybe_instrument_call): New
8382 functions.
8383
b4dfdc11
MG
83842014-07-31 Marc Glisse <marc.glisse@inria.fr>
8385
8386 PR c++/60517
8387 * c.opt (-Wreturn-local-addr): Move to common.opt.
8388
a41844e5
JM
83892014-07-30 Jason Merrill <jason@redhat.com>
8390
8391 PR c++/61659
8392 PR c++/61687
8393 Revert:
8394 * c.opt (-fuse-all-virtuals): New.
8395
976d5a22
TT
83962014-07-30 Tom Tromey <tromey@redhat.com>
8397
8398 PR c/59855
8399 * c.opt (Wdesignated-init): New option.
8400 * c-common.c (c_common_attribute_table): Add "designated_init".
8401 (handle_designated_init): New function.
8402
cdc94aca
MP
84032014-07-24 Marek Polacek <polacek@redhat.com>
8404
8405 PR c/57653
8406 * c-opts.c (c_finish_options): If -imacros is in effect, return.
8407
f41373b6
DS
84082014-07-16 Dodji Seketeli <dodji@redhat.com>
8409
8410 PR preprocessor/60723 - missing system-ness marks for macro tokens
8411 * c-ppoutput.c (struct print::prev_was_system_token): New data
8412 member.
8413 (init_pp_output): Initialize it.
8414 (maybe_print_line_1, maybe_print_line, print_line_1, print_line)
8415 (do_line_change): Return a flag saying if a line marker was
8416 emitted or not.
8417 (scan_translation_unit): Detect if the system-ness of the token we
8418 are about to emit is different from the one of the previously
8419 emitted token. If so, emit a line marker. Avoid emitting useless
8420 adjacent line markers. Avoid emitting line markers for tokens
8421 originating from the expansion of built-in macros.
8422 (scan_translation_unit_directives_only): Adjust.
8423
4d661eaa
MP
84242014-07-15 Marek Polacek <polacek@redhat.com>
8425
8426 * c-ubsan.c (ubsan_instrument_bounds): Don't instrument if
8427 TYPE_MAX_VALUE is NULL.
8428
b108f48f
JJ
84292014-07-14 Jakub Jelinek <jakub@redhat.com>
8430
8431 PR middle-end/61294
8432 * c.opt (Wmemset-transposed-args): New warning.
8433
c0221884
JM
84342014-07-10 Jason Merrill <jason@redhat.com>
8435
8436 PR c++/61659
8437 PR c++/61687
8438 * c.opt (-fuse-all-virtuals): New.
8439
63dfbb95
RB
84402014-07-09 Richard Biener <rguenther@suse.de>
8441
8442 PR c-family/61741
8443 * c-gimplify.c (c_gimplify_expr): Gimplify self-modify expressions
8444 using unsigned arithmetic if overflow does not wrap instead of
8445 if overflow is undefined.
8446
773ec47f
MP
84472014-07-06 Marek Polacek <polacek@redhat.com>
8448
8449 PR c/6940
8450 * c.opt (Wsizeof-array-argument): New option.
8451
00a7ba58
JJ
84522014-07-03 Jakub Jelinek <jakub@redhat.com>
8453
b1726d6c 8454 * c-ada-spec.c (dump_ada_nodes): Don't call qsort if
00a7ba58
JJ
8455 comments->count <= 1, as comments->entries might be NULL.
8456
52ec0ea3
MP
84572014-07-01 Marek Polacek <polacek@redhat.com>
8458
8459 * c.opt (Wint-conversion): New option.
8460
d5c3d343
MP
84612014-07-01 Marek Polacek <polacek@redhat.com>
8462
8463 PR c/58286
8464 * c.opt (Wincompatible-pointer-types): New option.
8465
6e7ceb17
PC
84662014-06-30 Paolo Carlini <paolo.carlini@oracle.com>
8467
8468 PR c++/51400
8469 * c-common.c (handle_noreturn_attribute, handle_const_attribute):
8470 Do not discard TYPE_QUALS of type.
8471
da73100b
JM
84722014-06-26 Jason Merrill <jason@redhat.com>
8473
8474 * c-common.h (enum cxx_dialect): Add cxx1z.
8475 * c.opt (std=c++1z, std=c++17, std=gnu++1z, std=gnu++17): New.
8476 * c-opts.c (c_common_handle_option, set_std_cxx1z): Handle it.
8477
08eedf75
TJ
84782014-06-26 Teresa Johnson <tejohnson@google.com>
8479
8480 * c-common.h (get_dump_info): Declare.
8481 * c-gimplify.c (c_genericize): Use saved dump files.
8482 * c-opts.c (c_common_parse_file): Begin and end dumps
8483 once around parsing invocation.
8484 (get_dump_info): New function.
8485
7b56b2f8
MP
84862014-06-23 Marek Polacek <polacek@redhat.com>
8487 Andrew MacLeod <amacleod@redhat.com>
8488
8489 PR c/61553
8490 * c-common.c (get_atomic_generic_size): Don't segfault if the
8491 type doesn't have a size.
8492
0e37a2f3
MP
84932014-06-20 Marek Polacek <polacek@redhat.com>
8494
8495 * c-gimplify.c: Include "c-ubsan.h" and "pointer-set.h".
8496 (ubsan_walk_array_refs_r): New function.
8497 (c_genericize): Instrument array bounds.
8498 * c-ubsan.c: Include "internal-fn.h".
8499 (ubsan_instrument_division): Mark instrumented arrays as having
8500 side effects. Adjust ubsan_type_descriptor call.
8501 (ubsan_instrument_shift): Likewise.
8502 (ubsan_instrument_vla): Adjust ubsan_type_descriptor call.
8503 (ubsan_instrument_bounds): New function.
8504 (ubsan_array_ref_instrumented_p): New function.
8505 (ubsan_maybe_instrument_array_ref): New function.
8506 * c-ubsan.h (ubsan_instrument_bounds): Declare.
8507 (ubsan_array_ref_instrumented_p): Declare.
8508 (ubsan_maybe_instrument_array_ref): Declare.
8509
85102014-06-20 Hale Wang <hale.wang@arm.com>
dd6fe7d4
HW
8511
8512 PR lto/61123
8513 * c.opt (fshort-enums): Add to LTO.
8514 * c.opt (fshort-wchar): Likewise.
8515
5c3d09f7
MP
85162014-06-16 Marek Polacek <polacek@redhat.com>
8517
8518 PR c/60439
8519 * c.opt (Wswitch-bool): Add Var.
8520
9cf32741
JJ
85212014-06-12 Jakub Jelinek <jakub@redhat.com>
8522
8523 PR middle-end/61486
8524 * c-omp.c (c_omp_split_clauses): Don't crash on firstprivate in
8525 #pragma omp target teams or
8526 #pragma omp {,target }teams distribute simd.
8527
62984918
JM
85282014-06-12 Jason Merrill <jason@redhat.com>
8529
8530 * c.opt (Wabi=, fabi-compat-version): New.
8531 * c-opts.c (c_common_handle_option): Handle -Wabi=.
8532 (c_common_post_options): Handle flag_abi_compat_version default.
8533 Disallow -fabi-compat-version=1.
8534 * c-common.h (abi_version_crosses): New.
8535
f961457f
JH
85362014-06-11 Jan Hubicka <hubicka@ucw.cz>
8537
adfac8df 8538 * c-common.c (handle_section_attribute): Update handling for
f961457f
JH
8539 section names that are no longer trees.
8540
92d28cbb
JJ
85412014-06-10 Jakub Jelinek <jakub@redhat.com>
8542
8543 PR fortran/60928
8544 * c-pragma.c (omp_pragmas_simd): Move PRAGMA_OMP_TASK...
8545 (omp_pragmas): ... back here.
8546
742938c9
MP
85472014-06-05 Marek Polacek <polacek@redhat.com>
8548
8549 PR c/49706
8550 * c-common.c (warn_logical_not_parentheses): New function.
8551 * c-common.h (warn_logical_not_parentheses): Declare.
8552 * c.opt (Wlogical-not-parentheses): New option.
8553
9d548dfb
MP
85542014-06-04 Marek Polacek <polacek@redhat.com>
8555
8556 PR c/30020
8557 * c-common.c (check_case_bounds): Add location parameter.
8558 Use it.
8559 (c_add_case_label): Pass loc to check_case_bounds.
8560
fedfecef
MP
85612014-06-03 Marek Polacek <polacek@redhat.com>
8562
8563 PR c/60439
8564 * c.opt (Wswitch-bool): New option.
8565
f6a7cffc
TS
85662014-05-22 Thomas Schwinge <thomas@codesourcery.com>
8567
040d18b6
TS
8568 * c-common.h (c_omp_sharing_predetermined, c_omp_remap_decl):
8569 Remove prototypes.
8570 (record_types_used_by_current_var_decl): Move prototype to where
8571 it belongs.
8572
f6a7cffc
TS
8573 * c-common.c (DEF_FUNCTION_TYPE_0, DEF_FUNCTION_TYPE_6)
8574 (DEF_FUNCTION_TYPE_7, DEF_FUNCTION_TYPE_8)
8575 (DEF_FUNCTION_TYPE_VAR_5): Cosmetic fixes.
8576
632f2871
RS
85772014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
8578
8579 * c-common.h (CTI_VOID_ZERO, void_zero_node): Delete.
8580 * c-common.c (c_common_nodes_and_builtins): Don't initialize
8581 void_zero_node.
8582 * c-pretty-print.c (pp_c_void_constant): New function.
8583 (c_pretty_printer::constant, c_pretty_printer::primary_expression)
8584 (c_pretty_printer::expression): Handle VOID_CST.
8585 * cilk.c (extract_free_variables): Likewise.
8586 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift)
8587 (ubsan_instrument_vla): Use void_node instead of void_zero_node.
8588
766090c2
TS
85892014-05-17 Trevor Saunders <tsaunders@mozilla.com>
8590
8591 * c-common.h (sorted_fields_type): Remove variable_size GTY attribute.
8592 * c-pragma.c (push_alignment): Adjust.
8593 (handle_pragma_push_options): Likewise.
8594
661a0813
MP
85952014-05-09 Marek Polacek <polacek@redhat.com>
8596
8597 PR c/50459
8598 * c-common.c (check_user_alignment): Return -1 if alignment is error
8599 node.
8600 (handle_aligned_attribute): Don't call default_conversion on
8601 FUNCTION_DECLs.
8602 (handle_vector_size_attribute): Likewise.
8603 (handle_tm_wrap_attribute): Handle case when wrap_decl is error node.
8604 (handle_sentinel_attribute): Call default_conversion and allow even
8605 integral types as an argument.
8606
2793eeab
MP
86072014-05-08 Marek Polacek <polacek@redhat.com>
8608
8609 PR c/61053
8610 * c-common.c (min_align_of_type): New function factored out from...
8611 (c_sizeof_or_alignof_type): ...here.
8612 * c-common.h (min_align_of_type): Declare.
8613
f827930a
MP
86142014-05-08 Marek Polacek <polacek@redhat.com>
8615
8616 PR c/61077
8617 * c-common.c (check_main_parameter_types): Warn for _Atomic-qualified
8618 parameter type of main.
8619
ca49b74e
DD
86202014-05-07 DJ Delorie <dj@redhat.com>
8621
8622 * c-cppbuiltin.c (print_bits_of_hex): New.
8623 (builtin_define_type_minmax): Print values using hex so as not to
8624 require a pre-computed list of string values.
8625
1d60af08
KZ
86262014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
8627 Mike Stump <mikestump@comcast.net>
8628 Richard Sandiford <rdsandiford@googlemail.com>
8629
8630 * c-ada-spec.c: Include wide-int.h.
8631 (ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX): Remove.
8632 (dump_generic_ada_node): Use wide-int interfaces.
8633 * c-common.c: Include wide-int-print.h.
8634 (shorten_compare): Use wide-int interfaces and tree_int_cst_lt.
8635 (pointer_int_sum): Use wide-int interfaces.
8636 (c_common_nodes_and_builtins): Use make_int_cst.
8637 (match_case_to_enum_1): Use tree_fits_uhwi_p and tree_fits_shwi_p.
8638 (handle_alloc_size_attribute): Use wide-int interfaces.
8639 (get_nonnull_operand): Likewise.
8640 * c-format.c (get_constant): Use tree_fits_uhwi_p.
8641 * c-lex.c: Include wide-int.h.
8642 (narrowest_unsigned_type): Take a widest_int rather than two
8643 HOST_WIDE_INTs.
8644 (narrowest_signed_type): Likewise.
8645 (interpret_integer): Update accordingly. Use wide-int interfaces.
8646 (lex_charconst): Use wide-int interfaces.
8647 * c-pretty-print.c: Include wide-int.h.
8648 (pp_c_integer_constant): Use wide-int interfaces.
8649 * cilk.c (declare_one_free_variable): Use tree_int_cst_lt instead of
8650 INT_CST_LT_UNSIGNED.
8651
b15458be
RB
86522014-05-06 Richard Biener <rguenther@suse.de>
8653
8654 * c-opts.c (c_common_post_options): For -freestanding,
8655 -fno-hosted and -fno-builtin disable pattern recognition
8656 if not enabled explicitely.
8657
6577374e
MP
86582014-05-02 Marek Polacek <polacek@redhat.com>
8659
8660 * c.opt (Wsizeof-pointer-memaccess): Describe option.
8661
d00887e8
MP
86622014-05-01 Marek Polacek <polacek@redhat.com>
8663
8664 PR c/43245
8665 * c.opt (Wdiscarded-qualifiers): Add.
8666
f8ed5150
MP
86672014-04-30 Marek Polacek <polacek@redhat.com>
8668
8669 * c-ubsan.c (ubsan_instrument_division): Handle REAL_TYPEs. Perform
8670 INT_MIN / -1 sanitization only for integer types.
8671
45484dcf
MP
86722014-04-25 Marek Polacek <polacek@redhat.com>
8673
8674 PR c/18079
8675 * c-common.c (handle_noinline_attribute): Warn if the attribute
8676 conflicts with always_inline attribute.
8677 (handle_always_inline_attribute): Warn if the attribute conflicts
8678 with noinline attribute.
8679
38e514c0
MP
86802014-04-25 Marek Polacek <polacek@redhat.com>
8681
8682 PR c/60156
8683 * c-common.c (check_main_parameter_types): Warn about variadic main.
8684
44875f92
MS
86852014-04-24 Mike Stump <mikestump@comcast.net>
8686
8687 * c.opt (Wshadow-ivar): Default to on.
8688
dcaaa5a0
DP
86892014-04-24 Dimitris Papavasiliou <dpapavas@gmail.com>
8690
8691 * c.opt (Wshadow-ivar, flocal-ivars, fivar-visibility): Add.
8692
c07d7c02
MP
86932014-04-23 Marek Polacek <polacek@redhat.com>
8694
8695 * c-common.c (handle_tm_wrap_attribute): Tweak error message.
8696
1c33c9b7
JJ
86972014-04-22 Jakub Jelinek <jakub@redhat.com>
8698
8699 PR sanitizer/60275
8700 * c-ubsan.c (ubsan_instrument_return): Return __builtin_trap ()
8701 if flag_sanitize_undefined_trap_on_error.
8702 (ubsan_instrument_division, ubsan_instrument_shift,
8703 ubsan_instrument_vla): Likewise. Use __ubsan_handle_*_abort ()
8704 if !flag_sanitize_recover.
8705
793c625f
MG
87062014-04-22 Marc Glisse <marc.glisse@inria.fr>
8707
8708 PR libstdc++/43622
8709 * c-common.c (registered_builtin_types): Make non-static.
8710 * c-common.h (registered_builtin_types): Declare.
8711
b0f1bf36 87122014-04-14 Richard Biener <rguenther@suse.de>
ab20d992 8713 Marc Glisse <marc.glisse@inria.fr>
b0f1bf36
RB
8714
8715 PR c/60819
8716 * c-common.c (convert_vector_to_pointer_for_subscript): Properly
8717 apply may-alias the scalar pointer type when applicable.
8718
3b07fa4a
IZ
87192014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
8720
8721 PR middle-end/60467
8722 * cilk.c (cilk_set_spawn_marker): Remove FUNCTION_DECL
8723 as possible argument for Cilk_spawn.
8724
cbbd2b1c
TB
87252014-04-11 Tobias Burnus <burnus@net-b.de>
8726
8727 PR c/60194
8728 * c.opt (Wformat-signedness): Add
8729 * c-format.c(check_format_types): Use it.
8730
6415bd5d
JM
87312014-04-11 Jason Merrill <jason@redhat.com>
8732
8733 PR c++/57926
8734 * c-common.c (sync_resolve_size, get_atomic_generic_size): Call
8735 default_conversion for an array argument.
8736
6525783a
MP
87372014-04-08 Marek Polacek <polacek@redhat.com>
8738
8739 PR sanitizer/60745
8740 * c-ubsan.c: Include asan.h.
8741 (ubsan_instrument_return): Call initialize_sanitizer_builtins.
8742
880a467b
NS
87432014-04-03 Nathan Sidwell <nathan@codesourcery.com>
8744
8745 * c.opt (Wnon-virtual-dtor): Auto set when Weffc++.
8746
7b59ff2d
MP
87472014-04-02 Marek Polacek <polacek@redhat.com>
8748
8749 * c-common.h (c_expand_expr): Remove declaration.
8750
8edbfaa6
JJ
87512014-03-28 Jakub Jelinek <jakub@redhat.com>
8752
8753 PR c++/60689
8754 * c-common.c (add_atomic_size_parameter): When creating new
8755 params vector, push the size argument first.
8756
07d72e1d
JJ
87572014-03-26 Jakub Jelinek <jakub@redhat.com>
8758
8759 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
8760 ubsan_instrument_vla, ubsan_instrument_return): Adjust
8761 ubsan_create_data callers.
8762
b35e0fa0
JJ
87632014-03-22 Jakub Jelinek <jakub@redhat.com>
8764
8765 PR debug/60603
8766 * c-opts.c (c_finish_options): Restore cb_file_change call to
8767 <built-in>.
8768
39a1ebb3
JJ
87692014-03-13 Jakub Jelinek <jakub@redhat.com>
8770
8771 PR middle-end/36282
8772 * c-pragma.c (apply_pragma_weak): Only look at
8773 TREE_SYMBOL_REFERENCED (DECL_ASSEMBLER_NAME (decl)) if
8774 DECL_ASSEMBLER_NAME_SET_P (decl).
8775 (maybe_apply_pending_pragma_weaks): Exit early if
8776 vec_safe_is_empty (pending_weaks) rather than only when
8777 !pending_weaks.
8778 (maybe_apply_pragma_weak): Likewise. If !DECL_ASSEMBLER_NAME_SET_P,
8779 set assembler name back to NULL afterwards.
8780
a07f6ed2
JM
87812014-03-11 Jason Merrill <jason@redhat.com>
8782
8783 * c.opt: Add -std=gnu++14.
8784
75b107f5
IB
87852014-03-11 Ian Bolton <ian.bolton@arm.com>
8786
8787 * c-opts.c (c_common_post_options): Don't override
8788 -ffp-contract=fast if unsafe-math-optimizations is on.
8789
f42c637e
PM
87902014-03-08 Paulo Matos <paulo@matos-sorge.com>
8791
22b15758 8792 * c.opt: Enable LTO FE for fshort-double.
f42c637e 8793
70e24808
JM
87942014-03-07 Jason Merrill <jason@redhat.com>
8795
8796 * c.opt: Add -std=c++14.
8797
3af9c5e9
MP
87982014-03-06 Marek Polacek <polacek@redhat.com>
8799
8800 PR c/60197
8801 * cilk.c (contains_cilk_spawn_stmt): New function.
8802 (contains_cilk_spawn_stmt_walker): Likewise.
8803 (recognize_spawn): Give error on invalid use of _Cilk_spawn.
8804 * c-common.h (contains_cilk_spawn_stmt): Add declaration.
8805
b3bdf019
JJ
88062014-03-03 Jakub Jelinek <jakub@redhat.com>
8807
8808 * c-pragma.c (c_pp_lookup_pragma): Handle PRAGMA_CILK_SIMD.
8809 (init_pragma): Call cpp_register_deferred_pragma for PRAGMA_CILK_SIMD
8810 even when flag_preprocess_only.
8811
ca7e759d
JM
88122014-02-26 Jason Merrill <jason@redhat.com>
8813
8814 PR c++/59231
8815 PR c++/11586
8816 * c-common.c (shorten_compare): Don't check
8817 c_inhibit_evaluation_warnings.
8818
28e41874
JJ
88192014-02-19 Jakub Jelinek <jakub@redhat.com>
8820
cca615af
JJ
8821 PR c/37743
8822 * c-common.c (c_common_nodes_and_builtins): When initializing
8823 c_uint{16,32,64}_type_node, also set corresponding
8824 uint{16,32,64}_type_node to the same value.
8825
28e41874
JJ
8826 PR c++/60267
8827 * c-pragma.c (init_pragma): Don't call cpp_register_deferred_pragma
8828 for PRAGMA_IVDEP if flag_preprocess_only.
8829
c2bf53a1
JJ
88302014-02-12 Jakub Jelinek <jakub@redhat.com>
8831
8832 PR c/60101
8833 * c-common.c (merge_tlist): If copy is true, call new_tlist,
8834 if false, add ADD itself, rather than vice versa.
8835 (verify_tree): For COND_EXPR, don't call merge_tlist with non-zero
8836 copy. For SAVE_EXPR, only call merge_tlist once.
8837
8fcbce72
JJ
88382014-02-08 Jakub Jelinek <jakub@redhat.com>
8839
8840 PR middle-end/60092
8841 * c-common.c (handle_alloc_size_attribute): Use tree_fits_uhwi_p
8842 and tree_to_uhwi.
8843 (handle_alloc_align_attribute, handle_assume_aligned_attribute): New
8844 functions.
8845 (c_common_attribute_table): Add alloc_align and assume_aligned
8846 attributes.
8847
0a756a3f
MP
88482014-02-06 Marek Polacek <polacek@redhat.com>
8849
8850 PR c/60087
8851 * c-common.c (warn_for_sign_compare): Call warning_at with location
8852 instead of warning.
8853
7ec4847a
MP
88542014-02-05 Marek Polacek <polacek@redhat.com>
8855
8856 PR c/53123
8857 * c-omp.c (c_finish_omp_atomic): Remove unreachable return
8858 statement.
8859
66f20604
MP
88602014-02-04 Marek Polacek <polacek@redhat.com>
8861
8862 PR c/60036
8863 * c-common.c (conversion_warning): Unwrap C_MAYBE_CONST_EXPR and/or
8864 SAVE_EXPR.
8865
5d77fb19
MG
88662014-02-03 Marc Glisse <marc.glisse@inria.fr>
8867
8868 PR c++/53017
8869 PR c++/59211
8870 * c-common.c (handle_aligned_attribute, handle_alloc_size_attribute,
8871 handle_vector_size_attribute, handle_nonnull_attribute): Call
8872 default_conversion on the attribute argument.
8873 (handle_nonnull_attribute): Increment the argument number.
8874
81e5eca8
MP
88752014-01-31 Marek Polacek <polacek@redhat.com>
8876
8877 PR c/59963
8878 * c-common.c (add_atomic_size_parameter): Pass vNULL to
8879 build_function_call_vec.
8880 (resolve_overloaded_builtin): Likewise.
8881 * c-common.h (build_function_call_vec): Adjust declaration.
8882
68fca595
MP
88832014-01-30 Marek Polacek <polacek@redhat.com>
8884
8885 PR c/59940
8886 * c-common.h (unsafe_conversion_p): Adjust declaration.
8887 (warnings_for_convert_and_check): Likewise.
8888 (convert_and_check): Likewise.
8889 * c-common.c (unsafe_conversion_p): Add location parameter. Call
8890 expansion_point_location_if_in_system_header on it.
8891 (warnings_for_convert_and_check): Add location parameter. Call
8892 expansion_point_location_if_in_system_header on it. Use it.
8893 (convert_and_check): Add location parameter. Use it.
8894 (conversion_warning): Likewise.
8895 (c_add_case_label): Adjust convert_and_check calls.
8896 (scalar_to_vector): Adjust unsafe_conversion_p calls.
8897
b72271b9
BI
88982014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
8899
8900 * c-common.c (c_define_builtins): Replaced flag_enable_cilkplus with
8901 flag_cilkplus.
8902 * c-pragma.c (init_pragma): Likewise.
8903 * c.opt: Likewise.
8904
393e8e8b
MP
89052014-01-23 Marek Polacek <polacek@redhat.com>
8906
8907 PR c/59846
8908 * c-common.c (shorten_compare): Add location_t parameter.
8909 * c-common.h (shorten_binary_op): Adjust declaration.
8910
f04dda30
MP
89112014-01-23 Marek Polacek <polacek@redhat.com>
8912
8913 PR c/58346
8914 * c-common.c (pointer_to_zero_sized_aggr_p): New function.
8915 * c-common.h: Declare it.
8916
621955cb
EB
89172014-01-20 Eric Botcazou <ebotcazou@adacore.com>
8918
8919 * c-ada-spec.h (dump_ada_specs): Revert prototype change.
8920 * c-ada-spec.c (dump_ads): Likewise.
8921 (cpp_check): Likewise.
8922 (dump_ada_specs): Likewise.
8923
89242014-01-15 Laurent Alfonsi <laurent.alfonsi@st.com>
67bf2939
LA
8925
8926 PR c++/49718
8927 * c-common.c (handle_no_instrument_function_attribute): Allow
8928 no_instrument_function attribute in class member
8929 definition/declaration.
8930
241f845a
JJ
89312014-01-15 Jakub Jelinek <jakub@redhat.com>
8932
8933 PR c/58943
8934 * c-omp.c (c_finish_omp_atomic): Set in_late_binary_op around
8935 build_modify_expr with non-NOP_EXPR opcode. Handle return from it
8936 being COMPOUND_EXPR.
8937 (c_finish_omp_for): Handle incr being COMPOUND_EXPR with first
8938 operand a SAVE_EXPR and second MODIFY_EXPR.
8939
e83b8e2e
JJ
89402014-01-09 Jakub Jelinek <jakub@redhat.com>
8941
8942 PR target/58115
8943 * c-pch.c (c_common_write_pch): Call
8944 prepare_target_option_nodes_for_pch.
8945
23a5b65a
RS
89462014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
8947
8948 Update copyright years
8949
f9030485
RS
89502014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
8951
8952 * array-notation-common.c, c-cilkplus.c: Use the standard form for
8953 the copyright notice.
8954
f2aa696b
EB
89552013-12-28 Eric Botcazou <ebotcazou@adacore.com>
8956
8957 * c-ada-spec.c (print_constructor): New function.
8958 (print_destructor): Retrieve the origin of the destructor.
8959 (print_ada_declaration): Revamp handling of constructors/destructors.
8960
3f8257db 89612013-12-23 Stuart Hastings <stuart@apple.com>
1f26ac87
JM
8962 Bill Maddox <maddox@google.com>
8963 Jason Merrill <jason@redhat.com>
8964
8965 * c.opt: Add -fdeclone-ctor-dtor.
8966 * c-opts.c (c_common_post_options): Default to on iff -Os.
8967
41958c28
BI
89682013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
8969
8970 * c-common.c (c_common_attribute_table): Added "cilk simd function"
8971 attribute.
8972 * c-pragma.h (enum pragma_cilk_clause): Remove.
ab20d992 8973 (enum pragma_omp_clause): Added the following fields:
41958c28
BI
8974 PRAGMA_CILK_CLAUSE_NOMASK, PRAGMA_CILK_CLAUSE_MASK,
8975 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_NONE,
8976 PRAGMA_CILK_CLAUSE_LINEAR, PRAGMA_CILK_CLAUSE_PRIVATE,
8977 PRAGMA_CILK_CLAUSE_FIRSTPRIVATE, PRAGMA_CILK_CLAUSE_LASTPRIVATE,
8978 PRAGMA_CILK_CLAUSE_UNIFORM.
8979
b1726d6c 8980
12893402
BI
89812013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
8982
8983 * cilk.c (cilk_outline): Made this function non-static.
8984 (gimplify_cilk_spawn): Removed pre_p and post_p arguments.
8985 (create_cilk_wrapper): Added a new parameter: a function pointer.
8986 (c_install_body_w_frame_cleanup): Remove
8987 (extract_free_variables): Added VEC_INIT_EXPR and CONSTRUCTOR case.
8988 * c-common.h (cilk_outline): New prototype.
8989 (gimplify_cilk_spawn): Removed two parameters.
8990 (cilk_install_body_with_frame_cleanup): New prototype.
8991 * c-gimplify.c (c_gimplify_expr): Added MODIFY_EXPR, CALL_EXPR and
8992 CILK_SPAWN_STMT case.
8993
085b42ed
BS
89942013-12-11 Bernd Schmidt <bernds@codesourcery.com>
8995
2ce064c3
BS
8996 * c-common.c (c_fully_fold_internal): Handle ADDR_SPACE_CONVERT_EXPR.
8997
085b42ed
BS
8998 * c-common.h (enum c_tree_index): Remove CTI_INT_ARRAY_TYPE.
8999 (int_array_type_node): Remove.
9000 * c-common.c (c_common_nodes_and_builtins): Don't build it.
9001
9e36c9ed
MP
90022013-12-05 Marek Polacek <polacek@redhat.com>
9003
9004 PR c/52023
9005 * c-common.c (c_sizeof_or_alignof_type): Move a declaration into
9006 [ADJUST_FIELD_ALIGN].
9007
296674db
JM
90082013-12-04 Joseph Myers <joseph@codesourcery.com>
9009
9010 PR c/52023
9011 * c-common.c (c_sizeof_or_alignof_type): Add parameter min_alignof
9012 and check field alignment if set.
9013 * c-common.h (c_sizeof_or_alignof_type): Update prototype.
9014 (c_sizeof, c_alignof): Update calls to c_sizeof_or_alignof_type.
9015
b1726d6c 90162013-12-04 Jakub Jelinek <jakub@redhat.com>
31e071ae
MP
9017 Marek Polacek <polacek@redhat.com>
9018
9019 * c-gimplify.c (c_gimplify_expr): If doing the integer-overflow
9020 sanitization, call unsigned_type_for only when !TYPE_OVERFLOW_WRAPS.
9021
d7947e19
L
90222013-11-29 H.J. Lu <hongjiu.lu@intel.com>
9023
9024 PR c/59309
9025 * cilk.c (gimplify_cilk_spawn): Properly handle function without
9026 arguments.
9027
fad7652e
JJ
90282013-11-29 Jakub Jelinek <jakub@redhat.com>
9029
9030 PR c/59280
9031 * c-common.c (get_priority): If TREE_VALUE (args) is IDENTIFIER_NODE,
9032 goto invalid. If it is error_mark_node, don't issue further
9033 diagnostics.
9034
8b5e1202
SO
90352013-11-28 Sergey Ostanevich <sergos.gnu@gmail.com>
9036
9037 * c.opt (Wopenmp-simd): New.
9038
0a508bb6
JJ
90392013-11-22 Jakub Jelinek <jakub@redhat.com>
9040
9041 * c-ubsan.h (ubsan_instrument_return): New prototype.
9042 * c-ubsan.c (ubsan_instrument_return): New function.
9043
2fb9a547
AM
90442013-11-22 Andrew MacLeod <amacleod@redhat.com>
9045
9046 * c-common.c: Add required include files from gimple.h.
ab20d992
JJ
9047 * c-gimplify.c: Likewise.
9048 * cilk.c: Likewise.
2fb9a547 9049
8400e75e
DM
90502013-11-22 David Malcolm <dmalcolm@redhat.com>
9051
9052 * c-common.c (unsafe_conversion_p): Remove use of
9053 EXPR_LOC_OR_HERE macro.
9054 (conversion_warning): Likewise.
9055 (warnings_for_convert_and_check): Likewise.
9056 (warn_for_collisions_1): Likewise.
9057 (shorten_compare): Likewise, and remove use of in_system_header
9058 macro, using the location from the former.
9059 * c-lex.c (dump_one_header): Remove use of input_filename macro.
9060 (cb_def_pragma): Remove use of in_system_header macro.
9061 (lex_string): Likewise.
9062 * c-pragma.c (handle_pragma_float_const_decimal64): Likewise.
9063
eb1ce453
KZ
90642013-11-20 Kenneth Zadeck <zadeck@naturalbridge.com>
9065 Mike Stump <mikestump@comcast.net>
9066 Richard Sandiford <rdsandiford@googlemail.com>
9067
9068 * c-ada-spec.c (is_simple_enum): Use tree_to_shwi and tree_to_uhwi
9069 instead of TREE_INT_CST_LOW, in cases where there is a protecting
9070 tree_fits_shwi_p or tree_fits_uhwi_p.
9071 (dump_generic_ada_node): Likewise.
9072 * c-format.c (check_format_arg): Likewise.
9073 * c-pretty-print.c (pp_c_integer_constant): Likewise.
9074
6b3b8c27
KZ
90752013-11-20 Kenneth Zadeck <zadeck@naturalbridge.com>
9076
9077 * c-common.c (check_function_arguments_recurse): Use tree_to_uhwi.
9078
49b0aa18
JC
90792013-11-19 Joshua J Cogliati <jrincayc@yahoo.com>
9080
9081 PR c/53001
9082 * c-common.c (unsafe_conversion_p): Make this function
9083 return an enumeration with more detail.
9084 (conversion_warning): Use the new return type of
9085 unsafe_conversion_p to separately warn either about conversions
9086 that lower floating point number precision or about the other
9087 kinds of conversions.
9088 * c-common.h (enum conversion_safety): New enumeration.
8e745a17
JJ
9089 (unsafe_conversion_p): switching return type to
9090 conversion_safety enumeration.
49b0aa18
JC
9091 * c.opt: Adding new warning -Wfloat-conversion and
9092 enabling it with -Wconversion.
9093
b826515a
BS
90942013-11-19 Basile Starynkevitch <basile@starynkevitch.net>
9095
8e745a17
JJ
9096 * c-opts.c: Include plugin.h.
9097 (cb_file_change): Invoke plugin event PLUGIN_INCLUDE_FILE.
b826515a 9098
b9a55b13
MP
90992013-11-19 Marek Polacek <polacek@redhat.com>
9100
9101 * c-ubsan.c (ubsan_instrument_division): Adjust ubsan_create_data
9102 call.
9103 (ubsan_instrument_shift): Likewise.
9104 (ubsan_instrument_vla): Likewise.
9105
7d362f6c
RS
91062013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
9107
9108 * c-common.c (convert_vector_to_pointer_for_subscript): Remove
9109 cast to unsigned type.
9110
386b1f1f
RS
91112013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
9112
9113 * c-common.c (fold_offsetof_1): Use tree_to_uhwi rather than
9114 tree_low_cst.
9115 (complete_array_type): Update comment to refer to tree_to_[su]hwi
9116 rather than tree_low_cst.
9117
ae7e9ddd
RS
91182013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
9119
9120 * c-common.c, c-cppbuiltin.c: Replace tree_low_cst (..., 1) with
9121 tree_to_uhwi throughout.
9122
9439e9a1
RS
91232013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
9124
9125 * c-common.c, c-format.c, c-omp.c, c-pretty-print.c: Replace
9126 tree_low_cst (..., 0) with tree_to_shwi throughout.
9127
cc269bb6
RS
91282013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
9129
9130 * c-ada-spec.c, c-common.c, c-pretty-print.c: Replace
9131 host_integerp (..., 1) with tree_fits_uhwi_p throughout.
9132
9541ffee
RS
91332013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
9134
9135 * c-ada-spec.c, c-common.c, c-format.c, c-pretty-print.c: Replace
9136 host_integerp (..., 0) with tree_fits_shwi_p throughout.
9137
c02065fc
AH
91382013-11-15 Aldy Hernandez <aldyh@redhat.com>
9139
9140 * c-cilkplus.c: New file.
9141 * c-common.c (readonly_error): Add location argument.
9142 * c-common.h (readonly_error): Same.
9143 (c_finish_cilk_clauses): Protoize.
9144 (c_check_cilk_loop): Same.
9145 c-omp.c (c_finish_omp_for): Handle CILK_SIMD nodes.
9146 Do not fail on error_mark_node.
9147 Abstract increment canonicalization to here...
9148 (c_omp_for_incr_canonicalize_ptr): New.
9149 c-pragma.c (init_pragma): Register "simd" pragma.
9150 c-pragma.h (enum pragma_kind): Add PRAGMA_CILK_SIMD.
9151 (enum pragma_cilk_clause): New.
9152
9cc65f15
RS
91532013-11-15 Richard Sandiford <rdsandiford@googlemail.com>
9154
9155 * c-pretty-print.c (pp_c_character_constant): Remove unnecessary
9156 wchar_type and host_integerp checks.
9157
18f429e2
AM
91582013-11-14 Andrew MacLeod <amacleod@redhat.com>
9159
9160 * c-common.c: Likewise.
9161 * c-gimplify.c: Likewise.
9162 * cilk.c: Likewise.
9163
d8a2d370
DN
91642013-11-14 Diego Novillo <dnovillo@google.com>
9165
9166 * c-common.c: Include fold-const.h.
9167 Include stor-layout.h.
9168 Include calls.h.
9169 Include stringpool.h.
9170 Include attribs.h.
9171 Include varasm.h.
9172 Include trans-mem.h.
9173 * c-cppbuiltin.c: Include stor-layout.h.
9174 Include stringpool.h.
9175 * c-format.c: Include stringpool.h.
9176 * c-lex.c: Include stringpool.h.
9177 Include stor-layout.h.
9178 * c-pragma.c: Include stringpool.h.
9179 Include attribs.h.
9180 Include varasm.h.
9181 Include gcc-symtab.h.
9182 * c-pretty-print.c: Include stor-layout.h.
9183 Include attribs.h.
9184 * cilk.c: Include stringpool.h.
9185 Include calls.h.
9186
38b7bc7f
JM
91872013-11-13 Joseph Myers <joseph@codesourcery.com>
9188
9189 * c-common.h (enum rid): Add RID_AUTO_TYPE.
9190 * c-common.c (c_common_reswords): Add __auto_type.
9191 (keyword_begins_type_specifier): Handle RID_AUTO_TYPE.
9192
45b0be94
AM
91932013-11-12 Andrew MacLeod <amacleod@redhat.com>
9194
18f429e2
AM
9195 * c-common.c: Include gimplify.h.
9196 * c-gimplify.c: Likewise.
9197 * cilk.c: Likewise.
9198 * c-omp.c: Include gimple-expr.h instead of gimple.h.
9199 * c-ubsan.c: Don't include gimple.h.
45b0be94 9200
582d9b50
JM
92012013-11-12 Joseph Myers <joseph@codesourcery.com>
9202
9203 * c-common.c (c_common_reswords): Add _Thread_local.
9204
6b28e197
JM
92052013-11-09 Joseph Myers <joseph@codesourcery.com>
9206
9207 * c-common.c (atomic_size_supported_p): New function.
9208 (resolve_overloaded_atomic_exchange)
9209 (resolve_overloaded_atomic_compare_exchange)
9210 (resolve_overloaded_atomic_load, resolve_overloaded_atomic_store):
9211 Use it instead of comparing size with a local list of sizes.
9212
267bac10
JM
92132013-11-07 Andrew MacLeod <amacleod@redhat.com>
9214 Joseph Myers <joseph@codesourcery.com>
9215
9216 * c-common.h (enum rid): Add RID_ATOMIC.
9217 * c-common.c (c_common_reswords): Add _Atomic.
9218 (sync_resolve_params): Use TYPE_MAIN_VARIANT on pointer argument.
9219 (keyword_is_type_qualifier): Accept RID_ATOMIC.
9220 * c-format.c (check_format_types): Check for extra _Atomic
9221 qualifiers in format argument.
9222 * c-pretty-print.c (pp_c_cv_qualifiers): Handle atomic qualifier.
9223 (pp_c_type_qualifier_list): Mention _Atomic in comment.
9224
5157b91e
TB
92252013-11-06 Tobias Burnus <burnus@net-b.de>
9226
9227 * c-common.c (reason_option_codes_t): Add CPP_W_DATE_TIME.
9228
6dbe0958
JM
92292013-11-06 Joseph Myers <joseph@codesourcery.com>
9230
9231 * c-opts.c (c_common_post_options): Set -ffp-contract=off in C
9232 standards modes.
9233 * c-cppbuiltin.c (cpp_iec_559_value): Consider -ffp-contract=fast
9234 to mean lack of IEEE 754 support.
9235
e8ff5196
TB
92362013-11-05 Tobias Burnus <burnus@net-b.de>
9237
9238 * c.opt (-Wdate-time): New option
9239 * c-opts.c (sanitize_cpp_opts): Pass on to libcpp.
9240
254a0760
JM
92412013-11-05 Joseph Myers <joseph@codesourcery.com>
9242
9243 * c-cppbuiltin.c (cpp_iec_559_value): Test
9244 flag_excess_precision_cmdline not flag_excess_precision.
9245
6d7f7e0a
TB
92462013-11-05 Tobias Burnus <burnus@net-b.de>
9247
9248 * c.opt (fopenmp-simd): New option.
9249 * c-pragma.c (omp_pragmas): Move pragmas which can contain simd to ...
9250 (omp_pragmas): ... this new struct.
9251 (c_pp_lookup_pragma): Also walk omp_pragmas.
9252 (init_pragma): Init pragmas for -fopenmp-simd.
9253
55a7f02f
MP
92542013-11-04 Marek Polacek <polacek@redhat.com>
9255
9256 PR c++/58979
9257 * c-common.c (invalid_indirection_error): Handle RO_ARROW_STAR case.
9258
9193fb05
JM
92592013-11-04 Joseph Myers <joseph@codesourcery.com>
9260
9261 * c-cppbuiltin.c (cpp_iec_559_value, cpp_iec_559_complex_value):
9262 New functions.
9263 (c_cpp_builtins): Define __GCC_IEC_559 and __GCC_IEC_559_COMPLEX.
9264
94159ecf
EB
92652013-11-04 Eric Botcazou <ebotcazou@adacore.com>
9266
9267 * c-ada-spec.h (cpp_operation): Add IS_TRIVIAL.
9268 (dump_ada_specs): Adjust prototype of second callback.
9269 * c-ada-spec.c (cpp_check): New global variable.
9270 (dump_ada_nodes): Remove cpp_check parameter and do not pass it down.
9271 (print_generic_ada_decl): Likewise.
9272 (has_static_fields): Change return type to bool and add guard.
9273 (has_nontrivial_methods): New predicate.
9274 (is_tagged_type): Change return type to bool.
9275 (separate_class_package): Call has_nontrivial_methods.
9276 (pp_ada_tree_identifier): Minor tweaks.
9277 (dump_ada_function_declaration): Adjust calls to dump_generic_ada_node.
9278 (dump_ada_array_domains): Likewise.
9279 (dump_ada_array_type): Likewise.
9280 (dump_template_types): Remove cpp_check parameter and do not pass it to
9281 dump_generic_ada_node.
9282 (dump_ada_template): Likewise.
9283 (dump_generic_ada_node): Remove cpp_check parameter and do not pass it
9284 recursively.
9285 (print_ada_methods): Change return type to integer. Remove cpp_check
9286 parameter and do not pass it down.
9287 (dump_nested_types): Remove cpp_check parameter and do not pass it to
9288 dump_generic_ada_node.
9289 (print_ada_declaration): Likewise. Test RECORD_OR_UNION_TYPE_P before
9290 accessing methods.
9291 (print_ada_struct_decl): Remove cpp_check parameter and do not pass it
9292 down. Use has_nontrivial_methods to recognize C++ classes. Use return
9293 value of print_ada_methods.
9294 (dump_ads): Rename cpp_check parameter to check and adjust prototype.
9295 Set cpp_check to it before invoking dump_ada_nodes.
9296 (dump_ada_specs): Likewise.
9297
b906f4ca
MP
92982013-11-03 Marek Polacek <polacek@redhat.com>
9299
9300 * c-ubsan.c: Don't include hash-table.h.
9301 (ubsan_instrument_vla): New function.
9302 * c-ubsan.h: Declare it.
9303
5e20cdc9
DM
93042013-10-31 David Malcolm <dmalcolm@redhat.com>
9305
9306 Automated part of renaming of symtab_node_base to symtab_node.
9307
9308 Patch autogenerated by rename_symtab.py from
9309 https://github.com/davidmalcolm/gcc-refactoring-scripts
9310 revision 58bb219cc090b2f4516a9297d868c245495ee622
9311
9312 * c-pragma.c (maybe_apply_pending_pragma_weaks): Rename
9313 symtab_node_base to symtab_node.
9314
7057e645
ESR
93152013-10-31 Edward Smith-Rowland <3dw4rd@verizon.net>
9316
8e745a17 9317 Implement C++14 digit separators.
7057e645
ESR
9318 * c-lex.c (interpret_float): Remove digit separators from scratch string
9319 before building real literal.
9320
193ea7bc
JJ
93212013-10-30 Jakub Jelinek <jakub@redhat.com>
9322
9323 * cilk.c (create_cilk_helper_decl): Use HOST_WIDE_INT_PRINT_DEC.
9324
939b37da
BI
93252013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
9326
9327 * c-common.c (c_common_reswords[]): Added _Cilk_spawn and _Cilk_sync
9328 fields.
9329 (c_define_builtins): Called cilk_init_builtins if Cilk Plus is
9330 enabled.
9331 * c-common.h (enum rid): Added RID_CILK_SPAWN and RID_CILK_SYNC.
9332 (insert_cilk_frame): New prototype.
9333 (cilk_init_builtins): Likewise.
9334 (gimplify_cilk_spawn): Likewise.
9335 (c_cilk_install_body_w_frame_cleanup): Likewise.
9336 (cilk_detect_spawn_and_unwrap): Likewise.
9337 (cilk_set_spawn_marker): Likewise.
9338 (build_cilk_sync): Likewise.
9339 (build_cilk_spawn): Likewise.
9340 * cilk.c: New file.
9341
67348ccc
DM
93422013-10-29 David Malcolm <dmalcolm@redhat.com>
9343
9344 Patch autogenerated by refactor_symtab.py from
9345 https://github.com/davidmalcolm/gcc-refactoring-scripts
9346 revision 58bb219cc090b2f4516a9297d868c245495ee622
9347
9348 * c-gimplify.c (c_genericize): Update for conversion of symtab types
9349 to a true class hierarchy.
9350 * c-pragma.c (maybe_apply_pending_pragma_weaks): Likewise.
9351
d570872d
RS
93522013-10-27 Richard Sandiford <rdsandiford@googlemail.com>
9353
9354 * c-lex.c (interpret_integer): Remove call to cpp_num_sign_extend.
9355
98906124
JL
93562013-10-26 Jeff Law <law@redhat.com>
9357
adfac8df
JJ
9358 * c-common.c (c_define_builtins): Remove mudflap support.
9359 * c.opt: Ignore and warn for mudflap options.
98906124 9360
d73749df 93612013-10-24 Tobias Burnus <burnus@net-b.de>
8170608b
TB
9362
9363 PR other/33426
9364 * c-pragma.c (init_pragma) Add #pragma ivdep handling.
9365 * c-pragma.h (pragma_kind): Add PRAGMA_IVDEP.
9366
3f04b1bb
JM
93672013-10-23 Jason Merrill <jason@redhat.com>
9368
9369 * c-format.c (gcc_cxxdiag_char_table): Add %X.
9370
acf0174b
JJ
93712013-10-11 Jakub Jelinek <jakub@redhat.com>
9372
acd15a28
JJ
9373 * c-common.h (omp_clause_mask::operator !=): New method.
9374 * c-omp.c (c_omp_split_clauses): Use if ((mask & something) != 0)
9375 instead of if (mask & something) tests everywhere.
9376
acf0174b
JJ
9377 * c-cppbuiltin.c (c_cpp_builtins): Predefine _OPENMP to
9378 201307 instead of 201107.
9379 * c-common.c (DEF_FUNCTION_TYPE_8): Define.
9380 (c_common_attribute_table): Add "omp declare target" and
9381 "omp declare simd" attributes.
9382 (handle_omp_declare_target_attribute,
9383 handle_omp_declare_simd_attribute): New functions.
9384 * c-omp.c: Include c-pragma.h.
9385 (c_finish_omp_taskgroup): New function.
9386 (c_finish_omp_atomic): Add swapped argument, if true,
9387 build the operation first with rhs, lhs arguments and use NOP_EXPR
9388 build_modify_expr.
9389 (c_finish_omp_for): Add code argument, pass it down to make_code.
9390 (c_omp_split_clauses): New function.
9391 (c_split_parallel_clauses): Removed.
9392 (c_omp_declare_simd_clause_cmp, c_omp_declare_simd_clauses_to_numbers,
9393 c_omp_declare_simd_clauses_to_decls): New functions.
9394 * c-common.h (omp_clause_mask): New type.
9395 (OMP_CLAUSE_MASK_1): Define.
9396 (omp_clause_mask::omp_clause_mask, omp_clause_mask::operator &=,
9397 omp_clause_mask::operator |=, omp_clause_mask::operator ~,
9398 omp_clause_mask::operator |, omp_clause_mask::operator &,
9399 omp_clause_mask::operator <<, omp_clause_mask::operator >>,
9400 omp_clause_mask::operator ==): New methods.
9401 (enum c_omp_clause_split): New.
9402 (c_finish_omp_taskgroup): New prototype.
9403 (c_finish_omp_atomic): Add swapped argument.
9404 (c_finish_omp_for): Add code argument.
9405 (c_omp_split_clauses): New prototype.
9406 (c_split_parallel_clauses): Removed.
9407 (c_omp_declare_simd_clauses_to_numbers,
9408 c_omp_declare_simd_clauses_to_decls): New prototypes.
9409 * c-pragma.c (omp_pragmas): Add new OpenMP 4.0 constructs.
9410 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_CANCEL,
9411 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_DECLARE_REDUCTION,
9412 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_SIMD,
9413 PRAGMA_OMP_TARGET, PRAGMA_OMP_TASKGROUP and PRAGMA_OMP_TEAMS.
9414 Remove PRAGMA_OMP_PARALLEL_FOR and PRAGMA_OMP_PARALLEL_SECTIONS.
9415 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_ALIGNED,
9416 PRAGMA_OMP_CLAUSE_DEPEND, PRAGMA_OMP_CLAUSE_DEVICE,
9417 PRAGMA_OMP_CLAUSE_DIST_SCHEDULE, PRAGMA_OMP_CLAUSE_FOR,
9418 PRAGMA_OMP_CLAUSE_FROM, PRAGMA_OMP_CLAUSE_INBRANCH,
9419 PRAGMA_OMP_CLAUSE_LINEAR, PRAGMA_OMP_CLAUSE_MAP,
9420 PRAGMA_OMP_CLAUSE_NOTINBRANCH, PRAGMA_OMP_CLAUSE_NUM_TEAMS,
9421 PRAGMA_OMP_CLAUSE_PARALLEL, PRAGMA_OMP_CLAUSE_PROC_BIND,
9422 PRAGMA_OMP_CLAUSE_SAFELEN, PRAGMA_OMP_CLAUSE_SECTIONS,
9423 PRAGMA_OMP_CLAUSE_SIMDLEN, PRAGMA_OMP_CLAUSE_TASKGROUP,
9424 PRAGMA_OMP_CLAUSE_THREAD_LIMIT, PRAGMA_OMP_CLAUSE_TO and
9425 PRAGMA_OMP_CLAUSE_UNIFORM.
9426
826cacfe
MG
94272013-10-09 Marc Glisse <marc.glisse@inria.fr>
9428
9429 PR tree-optimization/20318
9430 * c-common.c (handle_returns_nonnull_attribute): New function.
9431 (c_common_attribute_table): Add returns_nonnull.
9432
2284b034
MG
94332013-10-03 Marc Glisse <marc.glisse@inria.fr>
9434
9435 PR c++/19476
9436 * c.opt (fcheck-new): Move to common.opt.
9437
b56e9788
MP
94382013-09-25 Marek Polacek <polacek@redhat.com>
9439 Jakub Jelinek <jakub@redhat.com>
9440
9441 PR sanitizer/58413
9442 * c-ubsan.c (ubsan_instrument_shift): Don't instrument
9443 an expression if we can prove it is correct.
9444 (ubsan_instrument_division): Likewise. Remove unnecessary
9445 check.
9446
ce6923c5
MP
94472013-09-18 Marek Polacek <polacek@redhat.com>
9448
9449 PR sanitizer/58411
9450 * c-common.c (handle_no_sanitize_undefined_attribute): New function.
9451 Declare it.
9452 (struct attribute_spec c_common_att): Add no_sanitize_undefined.
9453
fb5610fb
IS
94542013-09-14 Iain Sandoe <iain@codesourcery.com>
9455
9456 PR target/48094
9457 * c.opt (fgnu-runtime, fnext-runtime, fobjc-abi-version,
9458 fobjc-gc, freplace-objc-classes): Accept for LTO.
9459
88b0e79e
JC
94602013-09-13 Jacek Caban <jacek@codeweavers.com>
9461
9462 * c-target.def: New hook
9463
c9b0866a
PC
94642013-09-09 Paolo Carlini <paolo.carlini@oracle.com>
9465
9466 PR c++/43452
9467 * c.opt (Wdelete-incomplete): Add.
9468
0af94e6f
JR
94692013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
9470
9471 * c-common.c (same_scalar_type_ignoring_signedness): Delete.
9472 (vector_types_compatible_elements_p): New function.
9473 * c-common.h: (same_scalar_type_ignoring_signedness): Delete
9474 declaration.
9475 (vector_types_compatible_elements_p): Declare.
9476
7c26172c
GDR
94772013-09-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
9478
9479 * c-pretty-print.h (c_pretty_printer::simple_type_specifier): Now
9480 a virtual member function.
9481 (pp_simple_type_specifier): Remove.
9482 (pp_c_type_specifier): Likewise.
9483 * c-pretty-print.c (c_pretty_printer::simple_type_specifier):
9484 Rename from pp_c_type_specifier. Adjust.
9485 (c_pretty_printer::c_pretty_printer): Do not assign to
9486 simple_type_specifier.
9487
20059c8b
GDR
94882013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
9489
9490 * c-pretty-print.h (c_pretty_printer::type_id): Now a virtual
9491 member function.
9492 (c_pretty_printer::storage_class_specifier): Likewise.
9493 (c_pretty_printer::initializer): Likewise.
9494 (pp_declaration): Remove.
9495 (pp_declaration_specifiers): Likewise.
9496 (pp_abstract_declarator): Likewise.
9497 (pp_declarator): Likewise.
9498 (pp_type_id): Likewise.
9499 (pp_statement): Likewise.
9500 (pp_constant): Likewise.
9501 (pp_id_expression): Likewise.
9502 (pp_primary_expression): Likewise.
9503 (pp_unary_expression): Likewise.
9504 (pp_multiplicative_expression): Likewise.
9505 (pp_conditional_expression): Likewise.
9506 (pp_assignment_expression): Likewise.
9507 (pp_expression): Likewise.
9508 (pp_c_type_id): Likewise.
9509 (pp_c_storage_class_specifier): Likewise.
9510 * c-pretty-print.c (pp_c_type_cast): Tidy.
9511 (pp_c_pointer): Likewise.
9512 (pp_c_type_specifier): Likewise.
9513 (pp_c_parameter_type_list): Likewise.
9514 (pp_c_function_definition): Likewise.
9515 (pp_c_init_declarator): Likewise.
9516 (pp_c_initializer_list): Likewise.
9517 (pp_c_constructor_elts): Likewise.
9518 (c_pretty_printer::direct_abstract_declarator): Likewise.
9519 (c_pretty_printer::declaration_specifiers): Likewise.
9520 (c_pretty_printer::primary_expression): Likewise.
9521 (c_pretty_printer::postfix_expression): Likewise.
9522 (c_pretty_printer::type_id): Rename from pp_c_type_id.
9523 (c_pretty_printer::storage_class_specifier): Rename from
9524 pp_c_storage_class_specifier.
9525 (c_pretty_printer::initializer): Rename from pp_c_initializer.
9526 (c_pretty_printer::c_pretty_printer): Do not assign to type_id,
9527 storage_class_specifier, initializer, offset_list, flags.
9528
de5a5fa1
MP
95292013-08-30 Marek Polacek <polacek@redhat.com>
9530
9531 * c-ubsan.c: New file.
9532 * c-ubsan.h: New file.
9533
8f0e4d72
GDR
95342013-08-30 Gabriel Dos Reis <gdr@integrable-solutions.net>
9535
9536 * c-pretty-print.h (c_pretty_printer::declaration): Now a virtual
9537 member function.
9538 (c_pretty_printer::declaration_specifiers): Likewise.
9539 (c_pretty_printer::declarator): Likewise.
9540 (c_pretty_printer::abstract_declarator): Likewise.
9541 (c_pretty_printer::direct_abstract_declarator): Likewise.
9542 (c_pretty_printer::direct_declarator): Likewise.
9543 (c_pretty_printer::function_specifier): Likewise.
9544 (pp_declaration): Adjust.
9545 (pp_declaration_specifiers): Likewise.
9546 (pp_abstract_declarator): Likewise.
9547 (pp_direct_declarator): Likewise.
9548 (pp_function_specifier): Likewise.
9549 (pp_direct_abstract_declarator): Remove as unused.
9550 (pp_c_declaration): Remove.
9551 (pp_c_declaration_specifiers): Likewise.
9552 (pp_c_declarator): Likewise.
9553 (pp_c_direct_declarator): Likewise.
9554 (pp_c_function_specifier): Likewise.
9555 (pp_c_direct_abstract_declarator): Likewise.
9556 * c-pretty-print.c (c_pretty_printer::abstract_declarator): Rename
9557 from pp_c_abstract_declarator. Adjust.
ab20d992 9558 (c_pretty_printer::direct_abstract_declarator): Rename from
8f0e4d72
GDR
9559 pp_c_direct_abstract_declarator. Adjust.
9560 (c_pretty_printer::function_specifier): Rename from
9561 pp_c_function_specifier. Adjust.
9562 (c_pretty_printer::declaration_specifiers): Rename from
9563 pp_c_declaration_specifiers. Adjust.
9564 (c_pretty_printer::direct_declarator): Rename from
9565 pp_c_direct_declarator. Adjust.
9566 (c_pretty_printer::declarator): Rename from pp_c_declarator. Adjust.
9567 (c_pretty_printer::declaration): Rename from pp_c_declaration. Adjust.
9568 (c_pretty_printer::c_pretty_printer): Do not assign to
9569 declaration, declaration_specifiers, declarator,
9570 direct_declarator, direct_abstract_declarator, function_specifier.
9571
00d34d3a
GDR
95722013-08-26 Gabriel Dos Reis <gdre@integrable-solutions.net>
9573
9574 * c-pretty-print.h (c_pretty_printer::unary_expression): Now a
9575 virtual member function.
9576 (c_pretty_printer::multiplicative_expression): Likewise.
9577 (c_pretty_printer::conditional_expression): Likewise.
9578 (c_pretty_printer::assignment_expression): Likewise.
9579 (c_pretty_printer::expression): Likewise.
9580 (pp_unary_expression): Adjust.
9581 (pp_multiplicative_expression): Likewise.
9582 (pp_assignment_expression): Likewise.
9583 (pp_conditional_expression): Likewise.
9584 (pp_expression): Likewise.
9585 * c-pretty-print.c (c_pretty_printer::unary_expression): Rename
9586 from pp_c_unary_expression. Adjust.
9587 (c_pretty_printer::multiplicative_expression): Rename from
9588 pp_c_multiplicative_expression. Adjust.
9589 (c_pretty_printer::conditional_expression): Rename from
9590 pp_c_conditional_expression. Adjust.
9591 (c_pretty_printer::assignment_expression): Rename from
9592 pp_c_assignment_expression. Adjust.
9593 (c_pretty_printer::expression): Rename from pp_c_expression. Adjust.
9594 (c_pretty_printer::c_pretty_printer): Do not assign to
9595 unary_expression, multiplicative_expression,
9596 conditional_expression, expression.
9597
fb22178f
GDR
95982013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
9599
9600 * c-pretty-print.h (c_pretty_printer::postfix_expression): Now a
9601 virtual member function.
9602 (pp_postfix_expression): Adjust.
9603 (pp_c_postfix_expression): Remove.
9604 * c-pretty-print.c (c_pretty_printer::postfix_expression): Rename
9605 from pp_c_postfix_expression. Adjust.
9606 (c_pretty_printer::c_pretty_printer): Do not assign to
9607 postfix_expression.
9608
7ecc2600
GDR
96092013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
9610
9611 * c-pretty-print.h (c_pretty_printer::primary_expression): Now a
9612 virtua member function.
9613 (pp_primary_expression): Adjust.
9614 (pp_c_primary_expression): Remove.
9615 * c-pretty-print.c (c_pretty_printer::primary_expression): Rename
9616 from pp_c_primary_expression. Adjust.
9617 (pp_c_initializer_list): Use pp_primary_expression.
9618 (c_pretty_printer::c_pretty_printer): Do not assign to
9619 primary_expression.
9620
0691175f
GDR
96212013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
9622
9623 * c-pretty-print.h (c_pretty_printer::translate_string): Declare.
9624 * c-pretty-print.c (M_): Remove.
9625 (c_pretty_printer::translate_string): Define.
9626 (pp_c_type_specifier): Use it.
9627 (pp_c_primary_expression): Likewise.
9628 (pp_c_expression): Likewise.
9629
66dfe4c4
GDR
96302013-08-24 Gabriel Dos Reis <gdr@integrable-solutions.net>
9631
9632 * c-pretty-print.h (c_pretty_printer::id_expression): Now a
9633 virtual function.
9634 (pp_c_id_expression): Remove.
9635 (pp_id_expression): Adjust.
9636 * c-pretty-print.c (c_pretty_printer::id_expression): Rename from
9637 pp_c_id_expression. Adjust.
9638 (pp_c_postfix_expression): Use pp_id_expression.
9639 (c_pretty_printer::c_pretty_printer): Do not assign to id_expression.
9640
ca43e9d5
GDR
96412013-08-24 Gabriel Dos Reis <gdr@integrable-solutions.net>
9642
9643 * c-pretty-print.h (c_pretty_printer::constant): Now a virtual
9644 member function.
9645 (pp_constant): Adjust.
9646 (pp_c_constant): Remove.
9647 * c-pretty-print.c (c_pretty_printer::constant): Rename from
9648 pp_c_constant. Adjust.
9649 (pp_c_constant)
9650 (pp_c_primary_expression): Call pp_constant in lieu of pp_c_constant.
9651 (c_pretty_printer::c_pretty_printer): Remove assignment to constant.
9652
da6ca2b5
GDR
96532013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
9654
9655 * c-pretty-print.h (pp_c_pretty_printer_init): Remove.
9656 (c_pretty_printer::c_pretty_printer): Declare.
9657 * c-pretty-print.c (pretty_printer::c_pretty_printer): Rename from
9658 c_pretty_printer_init. Adjust.
9659 (print_c_tree): Do not call c_pretty_printer_init.
9660 * c-ada-spec.c (dump_ads): Remove call to pp_construct.
9661
65a372f4
AC
96622013-08-09 Arnaud Charlet <charlet@adacore.com>
9663
9664 * c-ada-spec.c (print_ada_declaration): Prevent accessing null asm name
9665
fd9b0f32
PC
96662013-08-05 Paolo Carlini <paolo.carlini@oracle.com>
9667
9668 PR c++/58080
9669 * c-common.c (pointer_int_sum): Add bool parameter.
9670 * c-common.h (pointer_int_sum): Adjust declaration.
9671
e0aec1e9
GDR
96722013-08-05 Gabriel Dos Reis <gdr@integrable-solutions.net>
9673
9674 * c-pretty-print.c (print_c_tree): Simplify. Use non-static local
9675 c_pretty_printer variable.
9676
b066401f
GDR
96772013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
9678
9679 * c-pretty-print.h (c_pretty_printer): Derive from pretty_printer.
9680 (pp_base): Remove.
9681 (pp_c_base): Likewise. Adjust users.
9682 * c-pretty-print.c (pp_c_maybe_whitespace): Adjust.
9683 (pp_c_whitespace): Do not call pp_base.
9684 (pp_c_left_paren): Likewise.
9685 (pp_c_right_paren): Likewise.
9686 (pp_c_left_brace): Likewise.
9687 (pp_c_right_brace): Likewise.
9688 (pp_c_left_bracket): Likewise.
9689 (pp_c_right_bracket): Likewise.
9690 (pp_c_dot): Likewise.
9691 (pp_c_ampersand): Likewise.
9692 (pp_c_star): Likewise.
9693 (pp_c_arrow): Likewise.
9694 (pp_c_semicolon): Likewise.
9695 (pp_c_complement): Likewise.
9696 (pp_c_exclamation): Likewise.
9697 (pp_c_direct_declarator): Likewise.
9698 (pp_c_ws_string): Likewise.
9699 (pp_c_identifier): Likewise.
9700 (pp_c_statement): Likewise.
9701 (print_c_tree): Likewise.
9702
65e5a578
ESR
97032013-08-04 Ed Smith-Rowland <3dw4rd@verizon.net>
9704
9705 PR c++/58072
9706 * c-common.c (c_parse_error): Catch user-defined literal tokens and
9707 provide useful error strings.
9708
137a1a27
GDR
97092013-08-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
9710
9711 * c-ada-spec.c (pp_ada_tree_identifier): Use specialized pretty
9712 printer functions instead of pp_string or operators and punctuators.
9713 (dump_generic_ada_node): Likewise.
9714 * c-pretty-print.c (pp_c_type_specifier): Likewise.
9715 (pp_c_relational_expression): Likewise.
9716 (pp_c_logical_or_expression): Likewise.
9717
07838b13
GDR
97182013-08-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
9719
9720 * c-ada-spec.c (print_ada_macros): Use specialized pretty printer
9721 functions instead of pp_character.
9722 (pp_ada_tree_identifier): Likewise.
9723 (dump_ada_double_name): Likewise.
9724 (dump_ada_function_declaration): Likewise.
9725 (dump_ada_array_domains): Likewise.
9726 (dump_template_types): Likewise.
9727 (dump_generic_ada_node): Likewise.
9728 (print_ada_declaration): Likewise.
9729 (print_ada_struct_decl): Likewise.
9730 * c-pretty-print.c (pp_c_integer_constant): Likewise.
9731
433cc7b0
TT
97322013-07-23 Tom Tromey <tromey@redhat.com>
9733
9734 * c-common.h (enum rid) <RID_GENERIC>: New constant.
9735 * c-common.c (c_common_reswords): Add _Generic.
9736
688010ba
OB
97372013-07-21 OndÅ\99ej Bílka <neleai@seznam.cz>
9738
9739 * c-common.c: Fix typos.
9740 * c-common.h: Likewise.
9741
2a99e5e6
LL
97422013-07-13 Lubos Lunak <l.lunak@suse.cz>
9743
9744 PR c++/55203
9745 * c-common.c (c_common_attribute_table): Add warn_unused.
9746 (handle_warn_unused_attribute): New.
9747
c26302d5
JJ
97482013-07-10 Jakub Jelinek <jakub@redhat.com>
9749
9750 * c-ppoutput.c (scan_translation_unit): Call account_for_newlines
9751 for all CPP_TOKEN_FLD_STR tokens, not just CPP_COMMENT.
9752
dfeadaa0
PC
97532013-07-10 Paolo Carlini <paolo.carlini@oracle.com>
9754
9755 PR c++/57869
9756 * c.opt: Add Wconditionally-supported.
9757
6a2fa4b2
GS
97582013-07-08 Graham Stott <graham.stott@btinternet.com>
9759
adfac8df 9760 * array-notation-common.c (length_mismatch_in_expr_p): Delete
6a2fa4b2
GS
9761 unused variables l_length and l_node.
9762
ecdbd01a 97632013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
40d3d530
JR
9764
9765 PR c/57821
9766 * c-common.c (complete_array_type): Delay folding first index
9767 like other indices. When folding, check for index overflow.
9768
bedc293e
MG
97692013-06-27 Marc Glisse <marc.glisse@inria.fr>
9770
9771 PR c++/57509
9772 * c-common.h (c_build_vec_perm_expr): New complain argument.
9773 * c-common.c (c_build_vec_perm_expr): Likewise.
9774 Use save_expr also in C++.
9775
604b2bfc
GDR
97762013-06-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
9777
9778 * c-common.c (c_common_nodes_and_builtins): Use cxx11 in lieu of cxx0x.
9779 * c-cppbuiltin.c (c_cpp_builtins): Likewise.
9780 * c-opts.c (c_common_post_options): Likewise.
9781
dfeadaa0 97822013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
713b46fa
BI
9783
9784 * array-notation-common.c (length_mismatch_in_expr): Changed the
9785 parameter type's from a dynamic array to a vec_tree. Also removed
9786 the size parameters.
9787 * c-common.h (length_mismatch_in_expr_p): Fixed prototype's as per
9788 the change above.
9789
2ce86d2e
BI
97902013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
9791
9792 * c-common.h (struct cilkplus_an_parts): New structure.
9793 (struct cilkplus_an_loop_parts): Likewise.
9794 (cilkplus_extract_an_triplets): New prototype.
9795 (fix_sec_implicit_args): Likewise.
9796 * array-notation-common.c (cilkplus_extract_an_triplets): New function.
9797 (fix_sec_implicit_args): Likewise.
604b2bfc 9798
07a6825b
BI
97992013-06-20 Balaji V. Iyer <balaji.v.iyer@intel.com>
9800
9801 * array-notation-common.c (find_inv_trees): Removed an unwanted
9802 typecasting.
9803 * c-common.h (struct inv_list::additional_tcodes): Changed type from
9804 enum rid to enum tree_code.
9805
08346abd
JH
98062013-06-11 Jan Hubicka <jh@suse.cz>
9807
9808 * c-common.c (handle_alias_ifunc_attribute): Do not set
9809 DECL_EXTERNAL for weakref variables.
9810 * c-pragma.c (handle_pragma_weak): Make sure aliases
9811 are not declared as external.
9812
d60f1706
BI
98132013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
9814
9815 * array-notation-common.c (length_mismatch_in_expr_p): Moved this
9816 function from c/c-array-notation.c.
9817 (is_cilkplus_reduce_builtin): Likewise.
9818 (find_rank): Likewise.
9819 (extract_array_notation_exprs): Likewise.
9820 (replace_array_notations): Likewise.
9821 (find_inv_trees): Likewise.
9822 (replace_inv_trees): Likewise.
9823 (contains_array_notation_expr): Likewise.
9824 (find_correct_array_notation_type): Likewise.
9825 * c-common.h (struct inv_list): Moved this struct from the file
9826 c/c-array-notation.c and added a new field called additional tcodes.
9827 (length_mismatch_in_expr_p): New prototype.
9828 (is_cilkplus_reduce_builtin): Likewise.
9829 (find_rank): Likewise.
9830 (extract_array_notation_exprs): Likewise.
9831 (replace_array_notation): Likewise.
9832 (find_inv_trees): Likewise.
9833 (replace_inv_trees): Likewise.
9834 (find_correct_array_notation_type): Likewise.
dfeadaa0 9835
36536d79
BI
98362013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
9837
9838 * c-common.c (c_define_builtins): When cilkplus is enabled, the
9839 function array_notation_init_builtins is called.
9840 (c_common_init_ts): Added ARRAY_NOTATION_REF as typed.
9841 * c-common.def (ARRAY_NOTATION_REF): New tree.
9842 * c-common.h (build_array_notation_expr): New function declaration.
9843 (build_array_notation_ref): Likewise.
9844 (extract_sec_implicit_index_arg): New extern declaration.
9845 (is_sec_implicit_index_fn): Likewise.
9846 (ARRAY_NOTATION_CHECK): New define.
9847 (ARRAY_NOTATION_ARRAY): Likewise.
9848 (ARRAY_NOTATION_START): Likewise.
9849 (ARRAY_NOTATION_LENGTH): Likewise.
9850 (ARRAY_NOTATION_STRIDE): Likewise.
9851 * c-pretty-print.c (pp_c_postifix_expression): Added a new case for
9852 ARRAY_NOTATION_REF.
9853 (pp_c_expression): Likewise.
9854 * c.opt (flag_enable_cilkplus): New flag.
9855 * array-notation-common.c: New file.
9856
f7716d57
JJ
98572013-05-14 Jakub Jelinek <jakub@redhat.com>
9858
9859 PR c++/57274
9860 * c-common.c (verify_tree): Don't recurse into SIZEOF_EXPR.
9861
a5e0cd1d
MG
98622013-05-10 Marc Glisse <marc.glisse@inria.fr>
9863
9864 * c-common.c (vector_types_convertible_p): No TYPE_PRECISION for
9865 vectors.
9866
f6bc1c4a
HS
98672013-05-07 Han Shen <shenhan@google.com>
9868
9869 * c-cppbuiltin.c (c_cpp_builtins): Added "__SSP_STRONG__=3".
9870
3f12f6e9
SKS
98712013-04-29 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
9872
9873 * c-common.c (check_user_alignment): Emit error for negative values.
9874
61949153
PC
98752013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
9876
9877 * c-opts.c (set_std_cxx11): Use CLK_CXX1Y and CLK_GNUCXX1Y.
9878
e93e18e9
PC
98792013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
9880
9881 * c-cppbuiltin.c (c_cpp_builtins): Do not define
9882 __GXX_EXPERIMENTAL_CXX1Y__.
9883
44d90fe1 98842013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
8e745a17 9885 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
44d90fe1
PC
9886
9887 * c.opt ([Wpointer-arith]): Enabled by -Wpedantic, as documented.
9888 * c-common.c (pointer_int_sum): Change -Wpointer-arith pedwarns
9889 to simply use OPT_Wpointer_arith.
9890 (c_sizeof_or_alignof_type): Likewise.
9891
13f39b2e
PC
98922013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
9893
9894 * c-cppbuiltin.c (c_cpp_builtins): Define __GXX_EXPERIMENTAL_CXX1Y__.
9895
4b84d650
JJ
98962013-04-12 Jakub Jelinek <jakub@redhat.com>
9897
9898 * c-format.c (gcc_diag_char_table, gcc_tdiag_char_table,
9899 gcc_cdiag_char_table, gcc_cxxdiag_char_table): Add %r and %R format
9900 specifiers.
9901
fb037b5d
SB
99022013-04-07 Steven Bosscher <steven@gcc.gnu.org>
9903
9904 * c-pragma.c (add_to_renaming_pragma_list): Fix leading comment.
9905
4e856798
PC
99062013-04-03 Paolo Carlini <paolo.carlini@oracle.com>
9907
9908 * c-common.c (pointer_int_sum): Remove dead code.
9909
4b1baac8
RS
99102013-03-09 Richard Sandiford <rdsandiford@googlemail.com>
9911
9912 PR middle-end/56524
9913 * c-common.c (handle_optimize_attribute): Don't call
9914 save_optabs_if_changed.
9915
0b50e654
JJ
99162013-03-05 Jakub Jelinek <jakub@redhat.com>
9917
9918 PR middle-end/56461
9919 * c-pch.c (pch_init): Free target_validity at the end.
9920
48c41403
JJ
99212013-03-04 Jakub Jelinek <jakub@redhat.com>
9922
9923 * c-pretty-print.c (pp_c_pretty_printer_init): Clear pp->flags.
9924
e664c61c
KS
99252013-02-28 Konstantin Serebryany <konstantin.s.serebryany@gmail.com>
9926 Jakub Jelinek <jakub@redhat.com>
9927
9928 PR sanitizer/56454
9929 * c-common.c (handle_no_sanitize_address_attribute): New function.
9930 (c_common_attribute_table): Add no_sanitize_address attribute.
9931 (handle_no_address_safety_analysis_attribute): Add
9932 no_sanitize_address attribute, not no_address_safety_analysis
9933 attribute.
9934
a475fd3d 99352013-02-18 Aldy Hernandez <aldyh@redhat.com>
135204dd
AH
9936
9937 PR target/52555
9938 * c-common.c (handle_optimize_attribute): Call
9939 save_optabs_if_changed.
9940
f6007d99
JJ
99412013-02-18 Jakub Jelinek <jakub@redhat.com>
9942 Steven Bosscher <steven@gcc.gnu.org>
9943
9944 PR pch/54117
9945 * c-opts.c (c_common_post_options): If debug info is enabled
9946 and non-dwarf*, refuse to load PCH files and when writing PCH
9947 file warn.
9948
cf35e2b1
JJ
99492013-02-05 Jakub Jelinek <jakub@redhat.com>
9950
9951 PR middle-end/56167
9952 * c-common.c (handle_error_attribute): Fix condition.
9953
32887460
JJ
99542013-01-30 Jakub Jelinek <jakub@redhat.com>
9955
9956 PR c++/55742
9957 * c-common.c (handle_target_attribute): Revert 2012-12-26 change.
9958
5af057d8
JM
99592013-01-18 Jason Merrill <jason@redhat.com>
9960
9961 PR target/54908
9962 * c.opt (-fextern-tls-init): New.
9963 * c-opts.c (c_common_post_options): Handle it.
9964
cc83c823
JJ
99652013-01-09 Jakub Jelinek <jakub@redhat.com>
9966
9967 PR c/48418
9968 * c-common.c (c_fully_fold_internal): Warn for LSHIFT_EXPR and
9969 RSHIFT_EXPR, if orig_op1 isn't INTEGER_CST, op1 is INTEGER_CST
9970 and is either negative or bigger or equal to type precision
9971 of the first operand.
9972
a859517f
MP
99732012-12-03 Marek Polacek <polacek@redhat.com>
9974
9975 PR c/55570
9976 * c-common.c (check_user_alignment): Swap order of tests,
9977 check TREE_CODE first.
9978
2d7aa578
ESR
99792012-11-29 Ed Smith-Rowland <3dw4rd@verizon.net>
9980
9981 PR c++/52654
9982 * c-common.h (overflow_type): New enum.
9983 (build_userdef_literal): Add overflow_type argument.
9984 (tree_userdef_literal): Add overflow_type.
9985 (USERDEF_LITERAL_OVERFLOW): New access macro.
9986 * c-common.c (build_userdef_literal): Add overflow_type
9987 argument.
9988 * c-lex.c (c_lex_with_flags): Add overflow_type to
9989 build_userdef_literal calls.
9990 (interpret_integer, interpret_float): Add overflow_type argument.
9991
cc3c4f62
RB
99922012-11-28 Richard Biener <rguenther@suse.de>
9993
9994 PR c/35634
9995 * c-gimplify.c (c_gimplify_expr): Gimplify self-modify expressions
9996 here and use a type with proper overflow behavior for types that would
9997 need to be promoted for the arithmetic.
9998
77bc5132
JJ
99992012-11-23 Jakub Jelinek <jakub@redhat.com>
10000
10001 PR sanitizer/55435
10002 * c-common.c (handle_no_address_safety_analysis_attribute): New
10003 function.
10004 (c_common_attribute_table): Add no_address_safety_analysis.
10005
5dc99c46
SB
100062012-11-16 Simon Baldwin <simonb@google.com>
10007
10008 * c.opt: Add f[no-]canonical-system-headers.
10009 * c-opts.c (c_common_handle_option): Handle
10010 OPT_fcanonical_system_headers.
10011
a4a0016d
ESR
100122012-11-09 Ed Smith-Rowland <3dw4rd@verizon.net>
10013
10014 PR c++/54413
10015 * c-opts.c (c_common_handle_option): Set new flags.
10016 * c.opt: Describe new flags.
10017
7dbb85a7
JM
100182012-11-09 Jason Merrill <jason@redhat.com>
10019
10020 * c.opt (Wabi-tag): New.
10021
ad7bac31
AK
100222012-11-09 Andi Kleen <ak@linux.intel.com>
10023
10024 PR 55139
10025 * c-common.c (get_atomic_generic_size): Mask with
8e745a17 10026 MEMMODEL_MASK
ad7bac31 10027
7332899a
MLI
100282012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
10029
10030 PR c/53063
10031 * c.opt (Wformat): Make it Alias Wformat=1.
10032 (Wformat-contains-nul,Wformat-extra-args,Wformat-nonliteral,
10033 Wformat-security,Wformat-y2k,Wformat-zero-length): Use
10034 LangEnabledBy.
10035 (Wformat=): RejectNegative. Use LangEnabledBy.
10036 (Wnonnull): Use LangEnabledBy.
10037 * c-opts.c (c_common_handle_option): Do not handle Wformat here.
10038 * c-format.c (set_Wformat): Delete.
10039 (decode_format_attr): Replace OPT_Wformat with OPT_Wformat_.
ab20d992
JJ
10040 (maybe_read_dollar_number): Likewise.
10041 (avoid_dollar_number): Likewise.
10042 (finish_dollar_format_checking): Likewise.
10043 (check_format_info): Likewise.
10044 (check_format_info_main): Likewise.
10045 (check_format_types): Likewise.
10046 (format_type_warning): Likewise.
10047 * c-common.c (int): Likewise.
10048 (check_function_sentinel): Likewise.
8e745a17 10049 * c-common.h (warn_format,set_Wformat): Do not declare here.
7332899a 10050
34a180a6
MLI
100512012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
10052
10053 PR c/53063
10054 * c.opt(Warray-bounds,Wdelete-non-virtual-dtor,Wenum-compare,
10055 Wmain,Woverlength-strings, Wunknown-pragmas,Wunused-macros):
10056 Use LangEnabledBy.
10057 (Wswitch,Wswitch-default,Wswitch-enum): Likewise. Move here from
10058 common.opt.
10059 (Wvariadic-macros): Init(1).
10060 * c-opts.c (c_common_handle_option): Do not handle them
10061 explicitly.
10062 (c_common_post_options): Likewise.
10063 (sanitize_cpp_opts): warn_unused_macros is now
10064 cpp_warn_unused_macros.
10065 (push_command_line_include): Likewise.
10066 * c-common.c (warn_unknown_pragmas): Do not define.
10067 * c-common.h (warn_unknown_pragmas): Do not declare.
10068
3f46d6a5
MLI
100692012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
10070
10071 PR c/51294
10072 * c-common.c (conversion_warning): Handle conditional expressions.
10073
880661a4
JW
100742012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
10075
10076 PR c++/54930
10077 * c.opt (Wreturn_local_addr): Define new option.
10078
4514a96b
JM
100792012-10-25 Jason Merrill <jason@redhat.com>
10080
f14edc1a
JM
10081 * c.opt (Wvirtual-move-assign): New.
10082
4514a96b
JM
10083 * c.opt (Winherited-variadic-ctor): New.
10084
93100c6b
MG
100852012-10-25 Marc Glisse <marc.glisse@inria.fr>
10086
10087 PR c++/54427
10088 * c-common.c (scalar_to_vector): Handle VEC_COND_EXPR.
10089
1efcb8c6
JM
100902012-10-23 Joseph Myers <joseph@codesourcery.com>
10091
10092 * c-common.h (pch_cpp_save_state): Declare.
10093 * c-target.def (c_preinclude): New hook.
10094 * c-opts.c (done_preinclude): New.
10095 (push_command_line_include): Handle default preincluded header.
10096 (cb_file_change): Call pch_cpp_save_state when calling
10097 push_command_line_include.
10098 * c-pch.c (pch_ready_to_save_cpp_state, pch_cpp_state_saved)
10099 (pch_cpp_save_state): New.
10100 (pch_init): Call pch_cpp_save_state conditionally, instead of
10101 calling cpp_save_state.
10102
4a0ae68e
MLI
101032012-10-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
10104
10105 PR c/53063
10106 PR c/40989
10107 * c.opt (Waddress,Wchar-subscripts,Wsign-conversion,Wimplicit,
10108 Wimplicit-function-declaration,Wimplicit-int,Wsizeof-pointer-memaccess,
10109 Wnarrowing,Wparentheses,Wpointer-sign,Wreturn-type,Wsequence-point,
10110 Wsign-compare,Wuninitialized,Wmaybe-uninitialized,Wunused,
10111 Wvolatile-register-var): Add LangEnabledBy or EnabledBy.
10112 * c-opts.c (c_common_handle_option): Remove explicit handling from
10113 here.
10114 (c_common_post_options): Likewise.
10115
67e4210b
EB
101162012-10-18 Eric Botcazou <ebotcazou@adacore.com>
10117
10118 * c-ada-spec.c (LOCATION_COL): Delete.
10119 (compare_location): New function.
10120 (compare_node): Use it.
10121 (compare_comment): Likewise.
10122
65d4f2cd
MLI
101232012-10-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
10124
10125 PR c/53063
10126 PR c/40989
10127 * c.opt (Wstrict-aliasing=,Wstrict-overflow=): Use LangEnabledBy.
10128 * c-opts.c (c_common_handle_option): Do not set them here. Add
10129 comment.
10130 (c_common_post_options): Likewise.
10131
909881cb
EB
101322012-10-16 Eric Botcazou <ebotcazou@adacore.com>
10133
10134 * c-ada-spec.c (ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX): Define.
10135 (dump_generic_ada_node) <INTEGER_CST>: Deal with sizetype specially.
10136 Remove POINTER_TYPE handling, add large unsigned handling and use
10137 ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX for big numbers.
10138
3a785c97
JJ
101392012-10-12 Jakub Jelinek <jakub@redhat.com>
10140
10141 PR c/54381
10142 * c-common.h (sizeof_pointer_memaccess_warning): Adjust prototype.
10143 * c-common.c (sizeof_pointer_memaccess_warning): Take array of 3
10144 locs and array of 3 trees instead of just single loc and single
10145 sizeof_arg tree. Handle __builtin___*_chk builtins too, and
10146 also stpncpy, bcopy, bcmp, bzero, snprintf and vsnprintf builtins.
10147 For *cmp* builtins that take two sources strings report warnings
10148 about first and second source, not about destination and source.
10149
5e54f81d
MG
101502012-10-12 Marc Glisse <marc.glisse@inria.fr>
10151
10152 PR c++/53055
10153 * c-common.h (enum ref_operator) [RO_ARROW_STAR]: New.
10154
f5b02f1e
EB
101552012-10-11 Eric Botcazou <ebotcazou@adacore.com>
10156
10157 * c-ada-spec.c (dump_ada_template): Bail out for template declarations
10158 declaring something coming from another file.
10159
b46dbc6c
AC
101602012-10-10 Arnaud Charlet <charlet@adacore.com>
10161
f5b02f1e 10162 PR ada/54845
b46dbc6c
AC
10163 * c-ada-spec.c (print_ada_struct_decl): Increase buf size.
10164
5d9de0d0
PC
101652012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
10166
10167 PR c++/54194
10168 * c-common.c (warn_about_parentheses): Add location_t parameter;
10169 use EXPR_LOC_OR_LOC.
10170 * c-common.h: Update declaration.
10171
a212e43f
MG
101722012-10-09 Marc Glisse <marc.glisse@inria.fr>
10173
10174 PR c++/54427
10175 * c-common.c (scalar_to_vector): Moved from c-typeck.c. Support
10176 more operations. Make error messages optional.
10177 * c-common.h (enum stv_conv): Moved from c-typeck.c.
10178 (scalar_to_vector): Declare.
10179
b1db7f91
JM
101802012-10-08 Jason Merrill <jason@redhat.com>
10181
10182 * c-common.c (c_common_reswords): Add thread_local.
10183
e28d52cf
DS
101842012-10-08 Dodji Seketeli <dodji@redhat.com>
10185
10186 PR c++/53528 C++11 attribute support
10187 * c-common.h (bitfield_p, cxx_fundamental_alignment_p): Declare
10188 new functions.
10189 * c-common.c (check_cxx_fundamental_alignment_constraints): New
10190 static function.
10191 (handle_aligned_attribute): In choose strictest alignment
10192 among many. Use new check_cxx_fundamental_alignment_constraints.
10193 (handle_transparent_union_attribute): In c++11 attribute syntax,
10194 don't look through typedefs.
10195
3b78de56
AC
101962012-10-04 Arnaud Charlet <charlet@adacore.com>
10197
10198 * c-ada-spec.c (print_ada_declaration): Remove handling of TDF_RAW.
10199 * c.opt (-fdump-ada-spec, -fdump-ada-spec-slim): Move switch definition
10200 out of dumpfile.h.
10201
6040bb5f
DC
102022012-09-25 Dehao Chen <dehao@google.com>
10203
10204 PR middle-end/54645
3b78de56 10205 * c-pch.c (c_common_read_pch): Rebuild the location_adhoc_data
6040bb5f
DC
10206 map when read in the pch.
10207
3f8257db 102082012-09-18 Arnaud Charlet <charlet@adacore.com>
0b07a57e
AC
10209
10210 * c-ada-spec.c: Style fixes.
10211
3f8257db 102122012-09-18 Thomas Quinot <quinot@adacore.com>
da5182be
TQ
10213
10214 * c.opt (-fada-spec-parent): Define new command line switch.
10215 * c-ada-spec.c (get_ada_package): When -fada-spec-parent
10216 is specified, generate binding spec as a child of the specified unit.
10217
0ccb505d
PC
102182012-09-13 Paolo Carlini <paolo.carlini@oracle.com>
10219 Manuel López-Ibáñez <manu@gcc.gnu.org>
10220
10221 PR c++/53210
10222 * c.opt ([Winit-self]): Enabled by -Wall in C++.
10223
c583af79
AC
102242012-08-23 Arnaud Charlet <charlet@adacore.com>
10225
10226 * c-ada-spec.c (dump_generic_ada_node): Fix handling of name_only
10227 for pointers, and add missing Convention C pragma.
10228 (print_ada_struct_decl): Add missing aliased keyword.
10229 (dump_ads): Add pragma Ada_2005 and Style_Checks (Off).
10230
1a4049e7
JJ
102312012-08-17 Jakub Jelinek <jakub@redhat.com>
10232
10233 * c-common.c (sizeof_pointer_memaccess_warning): New function.
10234 * c.opt (-Wsizeof-pointer-memaccess): Add new option.
10235 * c-opts.c (c_common_handle_option): Enable it for -Wall.
10236 * c-common.h (sizeof_pointer_memaccess_warning): Add prototype.
10237 * c-common.def (SIZEOF_EXPR): Moved here from cp-tree.def.
10238
70b5e7dc
RG
102392012-08-10 Richard Guenther <rguenther@suse.de>
10240
10241 * c-pretty-print.c (pp_c_expression): Handle anonymous SSA names.
10242
f8923f7e
SB
102432012-08-07 Steven Bosscher <steven@gcc.gnu.org>
10244
10245 * c-pretty-print.c (pp_c_function_definition): Use pp_newline_and_flush
10246 instead of separate pp_newline and pp_flush.
10247 (print_c_tree): Likewise.
10248
e45abe1f
RH
102492012-07-26 Richard Henderson <rth@redhat.com>
10250
10251 * c-common.c (handle_hot_attribute): Allow labels.
10252 (handle_cold_attribute): Likewise.
10253
332f1d24
JJ
102542012-07-20 Jakub Jelinek <jakub@redhat.com>
10255
10256 PR c++/28656
10257 * c-common.c (check_function_nonnull): Handle multiple nonnull
10258 attributes properly.
10259
7ee2468b
SB
102602012-07-16 Steven Bosscher <steven@gcc.gnu.org>
10261
10262 * c-gimplify.c: Include dumpfile.h instead of tree-dump.h.
10263 * c-ada-spec.c: Likewise.
10264 * c-dump.c (dump_stmt): Move to cp/dump.c, the only user.
10265
ee7b28eb
SB
102662012-07-14 Steven Bosscher <steven@gcc.gnu.org>
10267
10268 * c-pch.c (CHECK_NO_ASM_OUT_DURING_PCH): Do not define.
10269 Remove code conditional on it.
10270
6bdf3519
SB
102712012-07-11 Steven Bosscher <steven@gcc.gnu.org>
10272
10273 * c-gimplify.c: Do not include basic-block.h.
10274 * c-common.c: Do not include linfuncs.h.
10275
532aafad
SB
102762012-07-08 Steven Bosscher <steven@gcc.gnu.org>
10277
10278 * c-common.h: Include tree.h.
10279
8d0d1915
JM
102802012-07-02 Jason Merrill <jason@redhat.com>
10281
10282 PR c++/53524
10283 * c-common.c (get_priority): Call default_conversion.
10284
fbc873ad
UB
102852012-07-01 Uros Bizjak <ubizjak@gmail.com>
10286
10287 * c-pch.c (c_common_write_pch): Remove unused variables.
10288
d4a10d0a
SB
102892012-06-29 Steven Bosscher <steven@gcc.gnu.org>
10290
10291 * cppspec.c: Moved from gcc/ to here.
10292
6f3a2e23
KT
102932012-06-27 Kai Tietz <ktietz@redhat.com>
10294
10295 PR preprocessor/37215
10296 * c-ppoutput.c (preprocess_file): Check for nonempty buffer.
10297
8ca92d04
SB
102982012-06-21 Steven Bosscher <steven@gcc.gnu.org>
10299
10300 * c-common.h (c_common_print_pch_checksum): Remove.
10301 * c-pch.c: Do not include output.h.
10302 (CHECK_NO_ASM_OUT_DURING_PCH): Define and add FIXME.
10303 (asm_out_file): Define iff CHECK_NO_ASM_OUT_DURING_PCH isdefined.
10304 (asm_file_startpos): Define iff CHECK_NO_ASM_OUT_DURING_PCH is defined.
10305 (struct c_pch_header): Remove.
10306 (get_ident): Update gpch version.
10307 (pch_init): Do not print executable_checksum to asm_out_file.
10308 Do not fail if there is no asm_out_file to read back from. Set
10309 asm_file_startpos only if CHECK_NO_ASM_OUT_DURING_PCH is defined.
10310 (c_common_write_pch): Verify that nothing was written to asm_out_file
10311 since pch_init was called. Do not write a c_pch_header, and do not
10312 copy from asm_out_file to the PCH.
10313 (c_common_read_pch): Do not read a c_pch_header, and do not restore
10314 the content of asm_out_file from the PCH.
10315 (c_common_print_pch_checksum): Remove.
10316 * c-opts.c (c_common_init): Print out executable_checksum directly.
10317
70f42967
SB
103182012-06-19 Steven Bosscher <steven@gcc.gnu.org>
10319
10320 * c-target.def (objc_declare_unresolved_class_reference,
10321 objc_declare_class_definition): Add new hooks.
10322
a8781821
SB
103232012-06-19 Steven Bosscher <steven@gcc.gnu.org>
10324
10325 * c-lex.c: Do not include output.h.
10326 (cb_ident): Try to put out .ident with targetm.asm_out.output_ident.
10327 Remove uses of ASM_OUTPUT_IDENT.
10328
9e1a8dd1
RR
103292012-06-15 Marc Glisse <marc.glisse@inria.fr>
10330
10331 PR c++/51033
10332 * c-common.h (c_build_vec_perm_expr): Move decl here.
10333 * c-common.c (c_build_vec_perm_expr): Move definition
10334 here.
10335
6f07a821
SB
103362012-06-06 Steven Bosscher <steven@gcc.gnu.org>
10337
10338 * c.opt (fconserve-space): Turn into a no-op.
10339
9faeb493 103402012-06-04 Sterling Augustine <saugustine@google.com>
c265f413
SA
10341
10342 * c-pretty-print.h (pp_c_flag_gnu_v3): New enumerator.
10343 * c-pretty-print.c (pp_c_specifier_qualifier_list): Check it at
10344 both the start and end of the function.
10345
a4b7d13c
SB
103462012-06-04 Steven Bosscher <steven@gcc.gnu.org>
10347
10348 * c-common.c: Do not include output.h.
10349 * c-pragma.c: Likewise.
10350
c265f413
SA
103512012-06-04 Steven Bosscher <steven@gcc.gnu.org>
10352
10353 * error.c (dump_decl): Check pp_c_flag_gnu_v3.
10354 (decl_as_dwarf_string, lang_decl_dwarf_name): New functions.
10355 (lang_decl_name): Handle namespace decls.
10356
be7a421e
SB
103572012-05-31 Steven Bosscher <steven@gcc.gnu.org>
10358
10359 * c-ada-spec.c: Do not include output.h.
10360 * c-semantics.c: Likewise.
10361
65de6659
JM
103622012-05-29 Joseph Myers <joseph@codesourcery.com>
10363
10364 * c-common.c: Fix typo.
10365
ca5f4331
MM
103662012-05-29 Michael Matz <matz@suse.de>
10367
10368 * c-common.h (c_expand_decl): Remove prototype.
10369
4f7f7aca
MLI
103702012-05-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
10371
10372 * c.opt (Wmissing-braces): Use LangEnabledBy(C ObjC,Wall).
10373 * c-opts.c (c_common_handle_option): Remove code handling
10374 warn_missing_braces.
10375
4a792f9b
PC
103762012-05-28 Paolo Carlini <paolo.carlini@oracle.com>
10377
10378 PR c++/25137
10379 * c-opts.c (c_common_handle_option): For C++ -Wall doesn't enable
10380 -Wmissing_braces.
10381
650dc14a
DS
103822012-05-22 Dodji Seketeli <dodji@redhat.com>
10383
10384 PR c++/53322
10385 * c.opt (Wunused-local-typedefs): Use EnabledBy(Wunused).
10386
9b095bf1
MLI
103872012-05-17 Manuel López-Ibáñez <manu@gcc.gnu.org>
10388
10389 * c.opt (--pedantic-errors,-pedantic-errors): Do not handle here.
10390 * c-opts.c (c_common_handle_option): Do not handle explicitly
10391 Wreturn-type, Wwrite-strings, warn_ecpp, and -pedantic-errors.
10392
0b2c4be5
DS
103932012-05-16 Dodji Seketeli <dodji@redhat.com>
10394
10395 PR preprocessor/7263
ab20d992 10396 * c-lex.c (c_lex_with_flags): Pass a virtual location to the call
0b2c4be5
DS
10397 to cpp_classify_number. For diagnostics, use the precise location
10398 instead of the global input_location.
10399
a1bde5af
PC
104002012-05-15 Paolo Carlini <paolo.carlini@oracle.com>
10401
d02924ef 10402 PR c++/11856
a1bde5af
PC
10403 * c-common.c (shorten_compare): Check c_inhibit_evaluation_warnings.
10404
d1ede5f4
BS
104052012-05-14 Bernd Schmidt <bernds@codesourcery.com>
10406
a1bde5af 10407 * c-common.c (DEF_ATTR_STRING): Define and undefine as necessary.
d1ede5f4 10408
f2bc201f
MLI
104092012-05-14 Manuel López-Ibáñez <manu@gcc.gnu.org>
10410
10411 PR 53063
10412 * c.opt (Wc++0X-compat,Wdelete-non-virtual-dtor,Wjump-misses-init,
10413 Wreorder): Use LangEnabledBy.
10414 * c-opts.c (c_common_handle_option): Do not enable them
10415 explicitly. Call lang-specific generated functions.
10416 (c_common_post_options): Do not set them here.
10417
95744782
MLI
104182012-05-13 Manuel López-Ibáñez <manu@gcc.gnu.org>
10419
10420 * c.opt (Wclobbered,Wempty-body,Wignored-qualifiers,
10421 Wmissing-field-initializers,Wmissing-parameter-type,
10422 Wold-style-declaration,Woverride-init): Use EnabledBy.
10423 * c-opts.c (c_common_post_options): Do not set here explicitly.
10424
7d5a5747
MLI
104252012-05-11 Manuel López-Ibáñez <manu@gcc.gnu.org>
10426
10427 PR 53063
10428 * c-opts.c (c_common_handle_option): Use handle_generated_option
10429 to enable sub-options.
10430
5a3c9cf2
PC
104312012-05-10 Paolo Carlini <paolo.carlini@oracle.com>
10432
10433 PR c++/53158
10434 * c-common.c (warnings_for_convert_and_check): Use warning_at.
10435
3ac8781c
RG
104362012-05-10 Richard Guenther <rguenther@suse.de>
10437
10438 * c-common.c (c_sizeof_or_alignof_type): Remove assert and
10439 adjust commentary about TYPE_IS_SIZETYPE types.
10440
1e537948
MLI
104412012-05-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
10442
10443 PR c++/53261
10444 * c-common.c (warn_logical_operator): Check that argument of
10445 integer_zerop is not NULL.
10446
f2c4a785
MLI
104472012-05-05 Manuel López-Ibáñez <manu@gcc.gnu.org>
10448
10449 PR c/43772
10450 * c-common.c (warn_logical_operator): Do not warn if either side
10451 is already true or false.
10452
50f305ca
MLI
104532012-05-04 Manuel López-Ibáñez <manu@gcc.gnu.org>
10454
10455 PR c/51712
10456 * c-common.c (expr_original_type): New.
10457 (shorten_compare): Do not warn for enumeration types.
10458
0c3641b0
MLI
104592012-05-03 Manuel López-Ibáñez <manu@gcc.gnu.org>
10460
10461 * c.opt (fpermissive): Add Var(flag_permissive).
10462
7edaa4d2
MG
104632012-04-30 Marc Glisse <marc.glisse@inria.fr>
10464
10465 PR c++/51033
10466 * c-common.c (convert_vector_to_pointer_for_subscript): New function.
10467 * c-common.h (convert_vector_to_pointer_for_subscript): Declare it.
10468
b9c8da34
DS
104692012-04-30 Dodji Seketeli <dodji@redhat.com>
10470
10471 Add -Wvarargs option
ab20d992 10472 * c.opt (Wvarargs): Define new option.
b9c8da34 10473
e6c69da0
MLI
104742012-04-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
10475
10476 * c-common.c (check_function_arguments): Replace
10477 Wmissing-format-attribute with Wsuggest-attribute=format.
10478
90137d8f
MLI
104792012-04-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
10480
10481 * c.opt (Wsuggest-attribute=format): New. Alias of
10482 Wmissing-format-attribute.
10483 * c-format.c (decode_format_type): Replace
10484 Wmissing-format-attribute with Wsuggest-attribute=format.
10485 (check_function_format): Likewise.
10486
9faeb493 104872012-04-27 Ollie Wild <aaw@google.com>
7f5f5f98
OW
10488
10489 * c-common.c: Add CPP_W_LITERAL_SUFFIX mapping.
10490 * c-opts.c (c_common_handle_option): Handle OPT_Wliteral_suffix.
10491 * c.opt: Add Wliteral-suffix.
10492
c1771a20
MLI
104932012-04-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
10494
10495 PR c/44774
10496 * c.opt (Wpedantic): New.
10497 (pedantic): Alias Wpedantic.
10498 * c-opts.c (c_common_handle_option): Replace -pedantic with -Wpedantic.
10499 (c_common_post_options): Likewise.
10500 (sanitize_cpp_opts): Likewise.
10501 * c-lex.c (interpret_float): Likewise.
10502 * c-format.c (check_format_types): Likewise.
10503 * c-common.c (pointer_int_sum): Likewise.
10504 (c_sizeof_or_alignof_type): Likewise.
10505 (c_add_case_label): Likewise.
10506 (c_do_switch_warnings): Likewise.
10507 * c-pragma.c (handle_pragma_float_const_decimal64): Likewise.
10508
04b391c1
JM
105092012-04-15 Jason Merrill <jason@redhat.com>
10510
10511 PR c++/52818
10512 * c-format.c (CPLUSPLUS_STD_VER): C++11 inherits from C99.
10513 (C_STD_NAME): Distinguish between C++98 and C++11.
10514
ac868f29
EB
105152012-04-11 Eric Botcazou <ebotcazou@adacore.com>
10516
10517 PR target/52624
10518 * c-common.h (uint16_type_node): Rename into...
10519 (c_uint16_type_node): ...this.
10520 * c-common.c (c_common_nodes_and_builtins): Adjust for above renaming.
10521 * c-cppbuiltin.c (builtin_define_stdint_macros): Likewise.
10522
fd4116f4
MLI
105232012-04-10 Manuel López-Ibáñez <manu@gcc.gnu.org>
10524
10525 * c-common.c (warn_if_unused_value): Move definition to here.
10526 * c-common.h (warn_if_unused_value): Move declaration to here.
10527
573ac65e
WB
105282012-03-23 William Bader <williambader@hotmail.com>
10529
10530 * c-lex.c (c_lex_with_flags): Avoid declarations after stmts.
10531
552b8185
JM
105322012-03-20 Jason Merrill <jason@redhat.com>
10533
10534 * c-common.h (enum cxx_dialect): Add cxx1y.
10535 * c-common.c (c_common_nodes_and_builtins): Use >= for cxx_dialect
10536 test.
10537 * c-cppbuiltin.c (c_cpp_builtins): Likewise.
10538 * c-opts.c (c_common_post_options): Likewise.
10539 (set_std_cxx1y): New.
10540 (c_common_handle_option): Call it.
10541 * c.opt (-std=c++1y, -std=gnu++1y): New flags.
10542
04398fa8
PC
105432012-03-19 Paolo Carlini <paolo.carlini@oracle.com>
10544
10545 PR c++/14710
10546 * c.opt ([Wuseless-cast]): Add.
10547
d2a12ae7
RG
105482012-03-16 Richard Guenther <rguenther@suse.de>
10549
10550 * c-pretty-print.c (pp_c_initializer_list): Adjust.
10551
a12bf402
MLI
105522012-03-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
10553
10554 PR c++/44783
10555 * c.opt (ftemplate-backtrace-limit) Add.
10556
5c30094f
RO
105572012-03-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
10558
10559 * c-cppbuiltin.c (c_cpp_builtins): Remove #pragma extern_prefix
10560 handling.
10561 * c-pragma.c (handle_pragma_extern_prefix): Remove.
10562 (init_pragma): Don't register extern_prefix.
10563
21fa2faf
RG
105642012-03-12 Richard Guenther <rguenther@suse.de>
10565
10566 * c-common.c (c_common_get_narrower): Use c_common_type_for_size.
10567 (builtin_type_for_size): Likewise.
10568
e3793c6f
JJ
105692012-02-13 Jakub Jelinek <jakub@redhat.com>
10570
10571 PR c++/52215
10572 * c-common.c (sync_resolve_params): Don't decide whether to convert
10573 or not based on TYPE_SIZE comparison, convert whenever arg_type
10574 is unsigned INTEGER_TYPE.
10575
93286335
PC
105762012-02-06 Paolo Carlini <paolo.carlini@oracle.com>
10577
10578 PR c/52118
10579 * c.opt ([Wunused-local-typedefs]): Fix description.
10580
7a421706
MS
105812012-01-24 Mike Stump <mikestump@comcast.net>
10582
10583 * c-common.c (c_common_type_for_mode): Match signed/unsigned types
10584 exactly.
10585
ba9b1f11
RG
105862012-01-18 Richard Guenther <rguenther@suse.de>
10587
10588 * c-opts.c (c_common_post_options): Reset LTO flags if
10589 we are about to generate a PCH.
10590
465406be
PC
105912012-01-17 Paolo Carlini <paolo.carlini@oracle.com>
10592
10593 PR c++/51777
10594 * c-pretty-print.c (pp_c_integer_constant): For unsigned constants
10595 use pp_unsigned_wide_integer.
10596
aee15221
RG
105972012-01-10 Richard Guenther <rguenther@suse.de>
10598
10599 PR middle-end/51806
10600 * c-opts.c (c_common_handle_option): Move -Werror handling
10601 to language independent code.
10602
5720c0dc
RG
106032012-01-05 Richard Guenther <rguenther@suse.de>
10604
10605 PR middle-end/51764
10606 * c.opt (Wmudflap, fmudflap, fmudflapth, fmudflapir): Move here
10607 from common.opt.
10608
73ac190a
PC
106092011-12-30 Paolo Carlini <paolo.carlini@oracle.com>
10610
10611 PR c++/51316
10612 * c-common.c (c_sizeof_or_alignof_type): In C++ allow for alignof
10613 of array types with an unknown bound.
10614
48b0b196
JM
106152011-12-20 Joseph Myers <joseph@codesourcery.com>
10616
10617 * c-common.c (flag_isoc99): Update comment to refer to C11.
10618 (flag_isoc1x): Change to flag_isoc11.
10619 * c-common.h (flag_isoc99): Update comment to refer to C11.
10620 (flag_isoc1x): Change to flag_isoc11.
10621 * c-cppbuiltin.c (cpp_atomic_builtins): Change comment to refer to
10622 C11.
10623 * c-opts.c (set_std_c1x): Change to set_std_c11.
10624 (c_common_handle_option): Handle OPT_std_c11 and OPT_std_gnu11.
10625 Call set_std_c11.
10626 (set_std_c89, set_std_c99, set_std_c11): Use flag_isoc11.
10627 (set_std_c1): Use CLK_STDC11 and CLK_GNUC11.
10628 * c.opt (std=c1x): Change to std=c11. Document as non-draft
10629 standard.
10630 (std=c1x, std=iso9899:2011): Add as aliases of std=c11.
10631 (std=gnu1x): Change to std=gnu11. Refer to non-draft standard.
10632 (std=gnu1x): Make alias of std=gnu11.
10633
d58d6eb5
JM
106342011-12-19 Jason Merrill <jason@redhat.com>
10635
10636 PR c++/51228
10637 * c-common.c (handle_transparent_union_attribute): Check the first
10638 field if the type is complete.
10639
b3908fcc
JW
106402011-12-15 Jonathan Wakely <jwakely.gcc@gmail.com>
10641
10642 PR libstdc++/51365
10643 * c-common.c (RID_IS_FINAL): Add.
10644 * c-common.h (RID_IS_FINAL): Add.
10645
fea3ca91
IS
106462011-11-30 Iain Sandoe <iains@gcc.gnu.org>
10647
10648 * c.opt (fgnu-runtime): Provide full description.
10649 (fnext-runtime): Likewise.
10650 * c-opts.c (OPT_fgnu_runtime, OPT_fnext_runtime) Remove.
10651
62bad7cd
AM
106522011-11-28 Andrew MacLeod <amacleod@redhat.com>
10653
10654 * c-cpp-builtin.c (cpp_atomic_builtins):New. Emit all atomic
10655 predefines in one place. Add LOCK_FREE predefines.
10656 (c_cpp_builtins): Move Legacy HAVE_SYNC predefines to
10657 new func.
10658
c466c4ff
AM
106592011-11-24 Andrew MacLeod <amacleod@redhat.com>
10660
10661 PR c/51256
9faeb493 10662 * c-common.c (get_atomic_generic_size): Check for various error
c466c4ff 10663 conditions
9faeb493
UB
10664 (resolve_overloaded_atomic_exchange,
10665 resolve_overloaded_atomic_compare_exchange,
c466c4ff
AM
10666 resolve_overloaded_atomic_load, resolve_overloaded_atomic_store): Return
10667 error_mark_node for error conditions.
9faeb493 10668
a5952633
RG
106692011-11-08 Richard Guenther <rguenther@suse.de>
10670
10671 PR middle-end/51010
ab20d992 10672 * c-pretty-print.c (pp_c_expression): Handle SSA_NAMEs.
a5952633 10673
0a35513e
AH
106742011-11-07 Richard Henderson <rth@redhat.com>
10675 Aldy Hernandez <aldyh@redhat.com>
10676 Torvald Riegel <triegel@redhat.com>
10677
10678 Merged from transactional-memory.
10679
10680 * c-common.c (handle_tm_wrap_attribute,
10681 handle_tm_attribute, ignore_attribute, parse_tm_stmt_attr): New.
10682 (struct c_common_reswords): Added __transaction* keywords.
10683 (struct c_common_attribute_table): Added transaction* and tm_regparm
10684 attributes.
10685 * c-common.h: Added RID_TRANSACTION*. Added TM_ATTR* and TM_STMT*
10686 masks.
10687 (parse_tm_stmt_attr, tm_attr_to_mask, tm_mask_to_attr,
10688 find_tm_attribute): Declare.
10689
6d87092d
JM
106902011-11-07 Jason Merrill <jason@redhat.com>
10691
10692 PR c++/35688
10693 * c-common.c, c-common.h: Revert yesterday's changes.
10694
8e7860a1
JM
106952011-11-06 Jason Merrill <jason@redhat.com>
10696
10697 PR c++/35688
10698 * c-common.c (decl_has_visibility_attr): Split out from...
10699 (c_determine_visibility): ...here.
10700 * c-common.h: Declare it.
10701
d19fa6b5
JM
107022011-11-06 Joseph Myers <joseph@codesourcery.com>
10703
10704 * c-common.c (c_common_reswords): Add _Alignas and _Alignof.
10705 (c_sizeof_or_alignof_type): Diagnose alignof applied to a function
10706 type.
10707 (check_user_alignment): New. Split out of
10708 handle_aligned_attribute. Disallow integer constants with
10709 noninteger types. Conditionally allow zero.
10710 (handle_aligned_attribute): Use check_user_alignment.
10711 * c-common.h (RID_ALIGNAS, check_user_alignment): New.
10712
86951993
AM
107132011-11-06 Andrew MacLeod <amacleod@redhat.com>
10714 Richard Henderson <rth@redhat.com>
10715
10716 Merged from cxx-mem-model.
10717
10718 * c-cppbuiltin.c (c_cpp_builtins): Test both atomic and sync patterns.
9faeb493 10719 * c-common.c (sync_resolve_params, sync_resolve_return): Only tweak
86951993
AM
10720 parameters that are the same type size.
10721 (get_atomic_generic_size): New. Find size of generic
10722 atomic function parameters and do typechecking.
10723 (add_atomic_size_parameter): New. Insert size into parameter list.
10724 (resolve_overloaded_atomic_exchange): Restructure __atomic_exchange to
10725 either __atomic_exchange_n or external library call.
9faeb493 10726 (resolve_overloaded_atomic_compare_exchange): Restructure
86951993 10727 __atomic_compare_exchange to either _n variant or external library call.
9faeb493 10728 (resolve_overloaded_atomic_load): Restructure __atomic_load to either
86951993
AM
10729 __atomic_load_n or an external library call.
10730 (resolve_overloaded_atomic_store): Restructure __atomic_store to either
10731 __atomic_store_n or an external library call.
10732 (resolve_overloaded_builtin): Handle new __atomic builtins.
10733
cf9e9959
EB
107342011-11-04 Eric Botcazou <ebotcazou@adacore.com>
10735
10736 PR c++/50608
10737 * c-common.c (c_fully_fold_internal) <ADDR_EXPR>: Call fold_offsetof_1.
10738 (fold_offsetof_1): Make global. Remove STOP_REF argument and adjust.
10739 <INDIRECT_REF>: Return the argument.
10740 <ARRAY_REF>: Remove special code for negative offset.
10741 Call fold_build_pointer_plus instead of size_binop.
10742 (fold_offsetof): Remove STOP_REF argument and adjust.
10743 * c-common.h (fold_offsetof_1): Declare.
10744 (fold_offsetof): Remove STOP_REF argument.
10745
25339f10
JM
107462011-11-02 Paolo Carlini <paolo.carlini@oracle.com>
10747
10748 PR c++/50810
10749 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
10750 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
10751 Wnarrowing for C++0x and C++98.
10752 * c.opt ([Wnarrowing]): Update.
10753
89401152
PC
107542011-11-01 Paolo Carlini <paolo.carlini@oracle.com>
10755
10756 PR c++/44277
10757 * c.opt: Add Wzero-as-null-pointer-constant.
10758
97e3ad20
JM
107592011-10-31 Jason Merrill <jason@redhat.com>
10760
15694fdd
JM
10761 * c.opt (-fdeduce-init-list): Off by default.
10762
97e3ad20
JM
10763 PR c++/50920
10764 * c-common.h (cxx_dialect): Add cxx11 and cxx03.
10765 * c.opt: Add -std=c++11, -std=gnu++11, -std=gnu++03,
10766 and -Wc++11-compat.
10767 * c-opts.c (set_std_cxx11): Rename from set_std_cxx0x.
10768
fb9120e3
RAV
107692011-10-27 Roberto Agostino Vitillo <ravitillo@lbl.gov>
10770
10771 PR c++/30066
10772 * c.opt (fvisibility-inlines-hidden): Description change.
10773
3ce4f9e4
ESR
107742011-10-26 Ed Smith-Rowland <3dw4rd@verizon.net>
10775
10776 Implement C++11 user-defined literals.
10777 * c-common.c (build_userdef_literal): New.
10778 * c-common.def: New tree code.
10779 * c-common.h (tree_userdef_literal): New tree struct and accessors.
10780 * c-lex.c (interpret_float): Add suffix parm.
10781 (c_lex_with_flags): Build literal tokens.
10782
5f53c243
PC
107832011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
10784
10785 PR c++/50841
10786 Revert:
10787 2011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
10788
10789 PR c++/50810
10790 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
10791 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
10792 Wnarrowing for C++0x and C++98.
10793 * c.opt ([Wnarrowing]): Update.
10794
263734e1
PC
107952011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
10796
10797 PR c++/50810
10798 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
10799 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
10800 Wnarrowing for C++0x and C++98.
10801 * c.opt ([Wnarrowing]): Update.
10802
d2e312d7
PC
108032011-10-21 Paolo Carlini <paolo.carlini@oracle.com>
10804
10805 PR c++/45385
10806 * c-common.c (conversion_warning): Remove code looking for
10807 artificial operands.
10808
d17687f6
DS
108092011-10-18 Dodji Seketeli <dodji@redhat.com>
10810
10811 PR bootstrap/50760
10812 * c-lex.c (fe_file_change): Use LINEMAP_SYSP when
9faeb493 10813 !NO_IMPLICIT_EXTERN_C.
d17687f6 10814
fc8396e9
PC
108152011-10-17 Michael Spertus <mike_spertus@symantec.com>
10816
10817 * c-common.c (c_common_reswords): Add __bases,
10818 __direct_bases.
10819 * c-common.h: Add RID_BASES and RID_DIRECT_BASES.
10820
108212011-10-17 Paolo Carlini <paolo.carlini@oracle.com>
10822
10823 PR c++/50757
10824 * c.opt ([Wnonnull]): Add C++ and Objective-C++.
10825
847e697a
TT
108262011-10-15 Tom Tromey <tromey@redhat.com>
10827 Dodji Seketeli <dodji@redhat.com>
10828
10829 * c.opt (fdebug-cpp): New option.
10830 * c-opts.c (c_common_handle_option): Handle the option.
10831 * c-ppoutput.c (maybe_print_line_1): New static function. Takes an
10832 output stream in parameter. Factorized from ...
10833 (maybe_print_line): ... this. Dump location debug information when
10834 -fdebug-cpp is in effect.
10835 (print_line_1): New static function. Takes an output stream in
10836 parameter. Factorized from ...
10837 (print_line): ... here. Dump location information when -fdebug-cpp
10838 is in effect.
10839 (scan_translation_unit): Dump location information when
10840 -fdebug-cpp is in effect.
10841
92582b75
TT
108422011-10-15 Tom Tromey <tromey@redhat.com>
10843 Dodji Seketeli <dodji@redhat.com>
10844
10845 * c.opt (ftrack-macro-expansion): New option. Handle it with and
10846 without argument.
10847 * c-opts.c (c_common_handle_option)<case
10848 OPT_ftrack_macro_expansion_, case OPT_ftrack_macro_expansion>: New
10849 cases. Handle -ftrack-macro-expansion with and without argument.
10850
46427374
TT
108512011-10-15 Tom Tromey <tromey@redhat.com>
10852 Dodji Seketeli <dodji@redhat.com>
10853
10854 * c-ppoutput.c (scan_translation_unit, maybe_print_line)
10855 (print_line, cb_define, do_line_change): Adjust to avoid touching
10856 the internals of struct line_map. Use the public API instead.
10857 * c-pch.c (c_common_read_pch): Likewise.
10858 * c-lex.c (fe_file_change): Likewise.
10859
fc8396e9
PC
108602011-10-14 Paolo Carlini <paolo.carlini@oracle.com>
10861
10862 PR c++/17212
10863 * c.opt ([Wformat-zero-length]): Add C++ and Objective-C++.
10864
108652011-10-11 Paolo Carlini <paolo.carlini@oracle.com>
10866
10867 PR c++/33067
10868 * c-pretty-print.c (pp_c_floating_constant): Output
10869 max_digits10 (in the ISO C++ WG N1822 sense) decimal digits.
10870
e79983f4
MM
108712011-10-11 Michael Meissner <meissner@linux.vnet.ibm.com>
10872
10873 * c-common.c (def_builtin_1): Delete old interface with two
10874 parallel arrays to hold standard builtin declarations, and replace
10875 it with a function based interface that can support creating
10876 builtins on the fly in the future. Change all uses, and poison
10877 the old names. Make sure 0 is not a legitimate builtin index.
10878 * c-omp.c (c_finish_omp_barrier): Ditto.
10879 (c_finish_omp_taskwait): Ditto.
10880 (c_finish_omp_flush): Ditto.
10881
6637388f
TG
108822011-10-11 Tristan Gingold <gingold@adacore.com>
10883
10884 * c.opt: (fallow-parameterless-variadic-functions): New.
10885
3797cb21
DS
108862011-09-08 Dodji Seketeli <dodji@redhat.com>
10887
10888 PR c++/33255 - Support -Wunused-local-typedefs warning
10889 * c-common.h (struct c_language_function::local_typedefs): New
10890 field.
9faeb493
UB
10891 (record_locally_defined_typedef, maybe_record_typedef_use)
10892 (maybe_warn_unused_local_typedefs): Declare new functions.
3797cb21 10893 * c-common.c (record_locally_defined_typedef)
9faeb493
UB
10894 (maybe_record_typedef_use)
10895 (maybe_warn_unused_local_typedefs): Define new functions.
3797cb21
DS
10896 * c.opt: Declare new -Wunused-local-typedefs flag.
10897
693ddb1b
EB
108982011-09-06 Eric Botcazou <ebotcazou@adacore.com>
10899
10900 PR middle-end/50266
10901 * c-common.c (c_fully_fold_internal) <ADDR_EXPR>: Fold offsetof-like
10902 computations.
10903
830c740f
RG
109042011-09-05 Richard Guenther <rguenther@suse.de>
10905
10906 * c-common.c (complete_array_type): Use ssize_int (-1) instead
10907 of integer_minus_one_node for empty array upper bounds.
10908
892a371f
DS
109092011-08-28 Dodji Seketeli <dodji@redhat.com>
10910
10911 * c-pch.c (c_common_read_pch): Call linemap_add with LC_ENTER as
10912 it's the first time it's being called on this main TU.
10913
0e3fdb48
RB
109142011-08-24 Richard Guenther <rguenther@suse.de>
10915
10916 PR c/49396
10917 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Fix conditional.
10918
109192011-08-22 Gabriel Charette <gchare@google.com>
e3dfef44
GC
10920
10921 * c-opts.c (c_finish_options): Force BUILTINS_LOCATION for tokens
10922 defined in cpp_init_builtins and c_cpp_builtins.
10923
d4a83c10
JM
109242011-08-19 Joseph Myers <joseph@codesourcery.com>
10925
10926 * c-common.c (c_common_reswords): Add __builtin_complex.
10927 * c-common.h (RID_BUILTIN_COMPLEX): New.
10928
bbceee64
JM
109292011-08-18 Joseph Myers <joseph@codesourcery.com>
10930
10931 * c-common.c (c_common_reswords): Add _Noreturn.
10932 (keyword_is_function_specifier): Handle RID_NORETURN.
10933 * c-common.h (RID_NORETURN): New.
10934
3f8257db 109352011-08-10 Artjoms Sinkarovs <artyom.shinakroff@gmail.com>
0e3a99ae
AS
10936
10937 * c-common.c (unsafe_conversion_p): New function. Check if it is
10938 unsafe to convert an expression to the type.
10939 (conversion_warning): Adjust, use unsafe_conversion_p.
10940 * c-common.h (unsafe_conversion_p): New function declaration.
10941
20906c66
JJ
109422011-08-02 Jakub Jelinek <jakub@redhat.com>
10943
10944 * c-common.h (c_finish_omp_atomic): Adjust prototype.
10945 (c_finish_omp_taskyield): New prototype.
10946 * c-omp.c (c_finish_omp_atomic): Add OPCODE, V, LHS1 and RHS1
10947 arguments. Handle OMP_ATOMIC_READ, OMP_ATOMIC_CAPTURE_OLD and
10948 OMP_ATOMIC_CAPTURE_NEW in addition to OMP_ATOMIC. If LHS1
10949 or RHS1 have side-effects, evaluate those too in the right spot,
10950 if it is a decl and LHS is also a decl, error out if they
10951 aren't the same.
10952 (c_finish_omp_taskyield): New function.
10953 * c-cppbuiltin.c (c_cpp_builtins): Change _OPENMP to 201107.
10954 * c-pragma.c (omp_pragmas): Add taskyield.
10955 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_TASKYIELD.
10956 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_FINAL and
10957 PRAGMA_OMP_CLAUSE_MERGEABLE.
10958
770e5a2e
DS
109592011-07-25 Dodji Seketeli <dodji@redhat.com>
10960
10961 * c-common.h (set_underlying_type): Remove parm name from
10962 declaration.
10963
1baae426
RG
109642011-07-25 Romain Geissler <romain.geissler@gmail.com>
10965
10966 * c-pretty-print.h: Search c-common.h in c-family.
9faeb493 10967
fcb21722
JM
109682011-07-22 Jason Merrill <jason@redhat.com>
10969
76f86d00
JM
10970 PR c++/49793
10971 * c.opt (Wnarrowing): New.
10972
3a636414
JM
10973 PR c++/30112
10974 * c-common.h: Declare c_linkage_bindings.
10975 * c-pragma.c (handle_pragma_redefine_extname): Use it.
10976
fcb21722
JM
10977 PR c++/49813
10978 * c-opts.c (set_std_cxx0x): Set flag_isoc94 and flag_isoc99.
10979 * c-pretty-print.c (pp_c_cv_qualifiers): Check c_dialect_cxx as well
10980 as flag_isoc99 for 'restrict'.
10981 (pp_c_specifier_qualifier_list): Likewise for _Complex.
10982
02614448
ILT
109832011-07-21 Ian Lance Taylor <iant@google.com>
10984
10985 PR middle-end/49705
10986 * c-common.c (c_disable_warnings): New static function.
10987 (c_enable_warnings): New static function.
10988 (c_fully_fold_internal): Change local unused_p to bool. Call
10989 c_disable_warnings and c_enable_warnings rather than change
10990 c_inhibit_evaluation_warnings.
10991
34429675
JM
109922011-07-20 Jason Merrill <jason@redhat.com>
10993
10994 PR c++/6709 (DR 743)
10995 PR c++/42603 (DR 950)
10996 * c-common.h (CPP_KEYWORD, CPP_TEMPLATE_ID): Move from cp/parser.h.
10997 (CPP_NESTED_NAME_SPECIFIER, N_CP_TTYPES): Likewise.
10998 (CPP_DECLTYPE): New.
10999 * c-common.c (c_parse_error): Handle CPP_DECLTYPE.
11000
5d49b6a7
RG
110012011-07-19 Richard Guenther <rguenther@suse.de>
11002
11003 * c-common.c (pointer_int_sum): Use fold_build_pointer_plus.
11004 * c-omp.c (c_finish_omp_for): Likewise.
11005
e84a58ff
EB
110062011-07-12 Eric Botcazou <ebotcazou@adacore.com>
11007
11008 * c-ada-spec.c (dump_nested_types): Put semi-colon after empty loop
11009 body on the next line.
11010
329af3c7
JM
110112011-07-08 Jason Merrill <jason@redhat.com>
11012
4063e61b
JM
11013 PR c++/45437
11014 * c-omp.c (check_omp_for_incr_expr): Handle preevaluation.
11015
329af3c7
JM
11016 PR c++/49673
11017 * c-common.c (c_apply_type_quals_to_decl): Don't check
11018 TYPE_NEEDS_CONSTRUCTING.
11019
1a072294
RG
110202011-07-06 Richard Guenther <rguenther@suse.de>
11021
11022 * c-common.c (c_common_nodes_and_builtins):
11023 Merge calls to build_common_tree_nodes and build_common_tree_nodes_2.
11024
fce5dddd
RG
110252011-07-05 Richard Guenther <rguenther@suse.de>
11026
11027 * c-common.c (c_common_nodes_and_builtins): Build all common
11028 tree nodes first.
11029
45d439ac
JJ
110302011-06-27 Jakub Jelinek <jakub@redhat.com>
11031
56300785
JJ
11032 * c-common.h (c_tree_chain_next): New static inline function.
11033
45d439ac
JJ
11034 * c-common.c (check_builtin_function_arguments): Handle
11035 BUILT_IN_ASSUME_ALIGNED.
11036
e0a8ecf2
AM
110372011-06-21 Andrew MacLeod <amacleod@redhat.com>
11038
11039 * c-common.c: Add sync_ or SYNC__ to builtin names.
11040 * c-omp.c: Add sync_ or SYNC__ to builtin names.
dfb43cd5
PV
11041
110422011-06-20 Pierre Vittet <piervit@pvittet.com>
11043
11044 * c-pragma.h (pragma_handler_1arg, pragma_handler_2arg): New
11045 handler.
11046 (gen_pragma_handler): New union.
11047 (internal_pragma_handler): New type.
11048 (c_register_pragma_with_data)
11049 (c_register_pragma_with_expansion_and_data): New functions.
11050
11051 * c-pragma.c (registered_pragmas, c_register_pragma_1)
11052 (c_register_pragma, c_register_pragma_with_expansion)
11053 (c_invoke_pragma_handler): Changed to work with
11054 internal_pragma_handler.
11055 (c_register_pragma_with_data)
11056 (c_register_pragma_with_expansion_and_data): New functions.
11057
677f3fa8
JM
110582011-06-14 Joseph Myers <joseph@codesourcery.com>
11059
11060 * c-common.c: Include common/common-target.h.
11061 (handle_section_attribute): Use
11062 targetm_common.have_named_sections.
11063 * c-cppbuiltin.c: Include common/common-target.h.
11064 (c_cpp_builtins): Use targetm_common.except_unwind_info.
11065
d7fc8c14
RG
110662011-06-10 Richard Guenther <rguenther@suse.de>
11067
11068 * c-pretty-print.c (pp_c_type_specifier): Use pp_c_identifier
11069 to print a IDENTIFIER_NODE.
11070
10e48e39
RO
110712011-06-09 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
11072 Joseph Myers <joseph@codesourcery.com>
11073
11074 * c.opt (fbuilding-libgcc): New option.
11075 * c-cppbuiltin.c (c_cpp_builtins): Define
11076 __LIBGCC_TRAMPOLINE_SIZE__ if flag_building_libgcc.
11077
6976ae51
JM
110782011-06-07 Jason Merrill <jason@redhat.com>
11079
3ff60975
JM
11080 * c-common.c (max_tinst_depth): Lower default to 900.
11081
6976ae51
JM
11082 * c-format.c (gcc_cxxdiag_char_table): Add 'S' format.
11083
009db074
RG
110842011-06-07 Richard Guenther <rguenther@suse.de>
11085
11086 * c-common.c (c_common_nodes_and_builtins): Do not set
11087 size_type_node or call set_sizetype.
11088
b4592b92
DS
110892011-06-07 Dodji Seketeli <dodji@redhat.com>
11090
11091 PR debug/49130
11092 * c-pretty-print.c (pp_c_integer_constant): Consider the canonical
9faeb493 11093 type when using pointer comparison to compare types.
b4592b92 11094
014ab419
JW
110952011-06-02 Jonathan Wakely <jwakely.gcc@gmail.com>
11096
11097 * c.opt: Add -Wdelete-non-virtual-dtor.
11098 * c-opts.c (c_common_handle_option): Include it in -Wall.
11099
4f60111f
NF
111002011-05-30 Nathan Froyd <froydnj@gcc.gnu.org>
11101
11102 PR bootstrap/49190
11103
11104 Revert:
11105 2011-05-26 Nathan Froyd <froydnj@codesourcery.com>
11106
11107 * c-common.h (struct c_common_identifier): Inherit from tree_typed,
11108 not tree_common.
11109
4cc4f2f4
JJ
111102011-05-27 Jakub Jelinek <jakub@redhat.com>
11111
11112 PR c++/49165
11113 * c-common.c (c_common_truthvalue_conversion) <case COND_EXPR>: For
11114 C++ don't call c_common_truthvalue_conversion on void type arms.
11115
38e01f9e
NF
111162011-05-27 Nathan Froyd <froydnj@codesourcery.com>
11117
11118 * c-common.h (struct stmt_tree_s) [x_cur_stmt_list]: Change to a VEC.
11119 (stmt_list_stack): Define.
11120 (cur_stmt_list): Adjust for new type of x_cur_stmt_list.
11121 * c-semantics.c (push_stmt_list, pop_stmt_list): Likewise.
11122
92e948a8
NF
111232011-05-26 Nathan Froyd <froydnj@codesourcery.com>
11124
11125 * c-common.c (warning_candidate_p): Check for BLOCKs.
11126
a2fc3e63
NF
111272011-05-26 Nathan Froyd <froydnj@codesourcery.com>
11128
11129 * c-common.h (struct c_common_identifier): Inherit from tree_typed,
11130 not tree_common.
11131
0957c029
JJ
111322011-05-25 Jakub Jelinek <jakub@redhat.com>
11133
11134 * c-common.c (def_fn_type): Remove extra va_end.
11135
828fb3ba
JM
111362011-05-23 Jason Merrill <jason@redhat.com>
11137
11138 PR c++/48106
11139 * c-common.c (c_common_get_narrower): New.
11140 (shorten_binary_op, shorten_compare, warn_for_sign_compare): Use it.
11141
dde05067
NF
111422011-05-23 Nathan Froyd <froydnj@codesourcery.com>
11143
11144 * c-common.h (check_function_arguments): Tweak prototype of
11145 check_function_arguments.
11146 * c-common.c (check_function_arguments): Likewise. Adjust
11147 calls to check_function_nonnull, check_function_format, and
11148 check_function_sentinel.
11149 (check_function_sentinel): Take a FUNCTION_TYPE rather than
11150 separate attributes and typelist arguments. Use
11151 FOREACH_FUNCTION_ARGS to iterate over argument types.
11152
3c0d13bf
PC
111532011-05-15 Paolo Carlini <paolo.carlini@oracle.com>
11154
11155 * c-common.c (c_common_reswords): Reorder.
11156 * c-common.h (rid): Likewise.
11157
8242dd04
NF
111582011-05-10 Nathan Froyd <froydnj@codesourcery.com>
11159
11160 * c-common.c (def_fn_type): Don't call build_function_type, call
11161 build_function_type_array or build_varargs_function_type_array
11162 instead.
11163 (c_common_nodes_and_builtins): Likewise.
11164
3d528853
NF
111652011-05-05 Nathan Froyd <froydnj@codesourcery.com>
11166
11167 * c-common.c (c_add_case_label): Omit the loc argument to
11168 build_case_label.
11169 * c-common.h (build_case_label): Remove.
11170 * c-semantics.c (build_case_label): Remove.
11171
a04a722b
JM
111722011-05-05 Joseph Myers <joseph@codesourcery.com>
11173
11174 * c-objc.h (objc_start_method_definition): Update prototype.
11175 * stub-objc.c (objc_start_method_definition): Add extra parameter.
11176
e19a18d4
NF
111772011-05-04 Nathan Froyd <froydnj@codesourcery.com>
11178
11179 * c-common.c (check_main_parameter_types): Reindent. Don't use
11180 TYPE_ARG_TYPES directly.
11181 (handle_nonnull_attribute): Likewise.
11182 (sync_resolve_params): Likewise.
11183 * c-format.c (handle_format_arg_attribute): Likewise. Adjust call
11184 to check_format_string.
11185 (handle_format_attribute): Likewise.
11186 (check_format_string): Take a function type to examine instead of
11187 a type list. Use a function_arg_iterator to step through argument
11188 types.
11189
c62c040f
RG
111902011-05-04 Richard Guenther <rguenther@suse.de>
11191
11192 * c-common.c (fix_string_type): Use size_int for index type bounds.
11193 (start_fname_decls): Do not pass NULL to build_int_cst.
11194 (c_init_attributes): Likewise.
11195 * c-lex.c (c_lex_with_flags): Likewise.
11196
c12ff9d8
JM
111972011-04-27 Jason Merrill <jason@redhat.com>
11198
11199 * c-common.c (make_tree_vector_from_list): New.
11200 * c-common.h: Declare it.
11201
304dfbe3
RG
112022011-04-26 Richard Guenther <rguenther@suse.de>
11203
11204 PR preprocessor/48248
11205 * c-ppoutput.c (maybe_print_line): Always optimize newlines
11206 for output size with -P.
11207
3c0d13bf
PC
112082011-04-25 Paolo Carlini <paolo.carlini@oracle.com>
11209
11210 * c-common.c (struct c_common_resword): Add __underlying_type.
11211 * c-common.h (enum rid): Add RID_UNDERLYING_TYPE.
11212
04695783
JM
112132011-04-20 Jim Meyering <meyering@redhat.com>
11214
11215 * c-format.c (init_dollar_format_checking): Remove useless
11216 if-before-free.
11217
0dc33c3c
NP
112182011-04-15 Nicola Pero <nicola.pero@meta-innovation.com>
11219
11220 * c-objc.h (objc_get_interface_ivars): Removed.
3c0d13bf 11221 (objc_detect_field_duplicates): New.
0dc33c3c 11222 * stub-objc.c: Likewise.
3c0d13bf 11223
c59633d9
NP
112242011-04-14 Nicola Pero <nicola.pero@meta-innovation.com>
11225
11226 * stub-objc.c (objc_declare_protocols): Renamed to
11227 objc_declare_protocol.
11228 * c-objc.h: Likewise.
3c0d13bf 11229
32dabdaf
NP
112302011-04-14 Nicola Pero <nicola.pero@meta-innovation.com>
11231
11232 * stub-objc.c (objc_declare_class): Updated argument name.
11233
81f653d6
NF
112342011-04-12 Nathan Froyd <froydnj@codesourcery.com>
11235
11236 * c-common.h (c_common_init_ts): Declare.
11237 * c-common.c (c_common_init_ts): Define.
11238
eb345401
NP
112392011-04-12 Nicola Pero <nicola.pero@meta-innovation.com>
11240
11241 * c-objc.h (objc_build_message_expr): Updated prototype.
11242 * stub-objc.c (objc_build_message_expr): Likewise.
9faeb493 11243
a358e188
MJ
112442011-04-12 Martin Jambor <mjambor@suse.cz>
11245
11246 * c-gimplify.c (c_genericize): Call cgraph_get_create_node instead
11247 of cgraph_node.
11248
e6313a78
RG
112492011-04-11 Richard Guenther <rguenther@suse.de>
11250
11251 * c-common.c (complete_array_type): Build a range type of
11252 proper type.
11253
dcf0c47e
NF
112542011-04-08 Nathan Froyd <froydnj@codesourcery.com>
11255
11256 * c-common.c (handle_sentinel_attribute): Don't use TYPE_ARG_TYPES.
11257 (handle_type_generic_attribute): Likewise.
11258
1ee44b26
JM
112592011-04-07 Jason Merrill <jason@redhat.com>
11260
11261 PR c++/48450
11262 * c-common.c (c_common_truthvalue_conversion): Don't ignore
11263 conversion from C++0x scoped enum.
11264
acce4e77
JM
112652011-04-06 Joseph Myers <joseph@codesourcery.com>
11266
11267 * c-target-def.h: New file.
11268 * c-target.def: New file.
11269 * c-target.h: New file.
11270 * c-common.c (targetcm): Don't define here.
11271 * c-common.h (default_handle_c_option): Declare.
11272 * c-format.c: Include c-target.h instead of target.h.
11273 * c-opts.c: Include c-target.h instead of target.h. Explicitly
11274 include tm.h.
11275 (default_handle_c_option): Move from targhooks.c.
11276
e2eefb55
JJ
112772011-03-29 Jakub Jelinek <jakub@redhat.com>
11278
11279 PR preprocessor/48248
11280 * c-ppoutput.c (print): Add src_file field.
11281 (init_pp_output): Initialize it.
11282 (maybe_print_line): Don't optimize by adding up to 8 newlines
11283 if map->to_file and print.src_file are different file.
11284 (print_line): Update print.src_file.
11285
ba78087b
KT
112862011-03-25 Kai Tietz <ktietz@redhat.com>
11287
11288 * c-ada-spec.c (compare_comment): Use filename_cmp
11289 instead of strcmp for filename.
11290
0edf1bb2
JL
112912011-03-25 Jeff Law <law@redhat.com>
11292
adfac8df 11293 * c-common.c (def_fn_type): Add missing va_end.
0edf1bb2 11294
c7dc8804
JM
112952011-03-25 Jason Merrill <jason@redhat.com>
11296
11297 * c.opt: Add -std=c++03.
11298
d1d879b1
EB
112992011-03-22 Eric Botcazou <ebotcazou@adacore.com>
11300
11301 * c-ada-spec.c (dump_ada_template): Skip non-class instances.
11302
3f8257db 113032011-03-17 Kai Tietz <ktietz@redhat.com>
62d784f7
KT
11304
11305 PR target/12171
5050afdf
KT
11306 * c-pretty-print.c (pp_c_specifier_qualifier_list):
11307 Display allowed attributes for function pointer types.
11308 (pp_c_attributes_display): New function to display
11309 attributes having affects_type_identity flag set to true.
11310 * c-pretty-print.h (pp_c_attributes_display): New prototype.
11311
62d784f7
KT
11312 * c-common.c (c_common_attribute_table):
11313 Add new element.
11314 (c_common_format_attribute_table): Likewise.
11315
82d37118
JM
113162011-03-18 Jason Merrill <jason@redhat.com>
11317
49a000c3
JM
11318 * c.opt (fconstexpr-depth): Add Var(max_constexpr_depth).
11319 * c-common.h: Don't declare it here.
11320 * c-common.c: Or define it here.
11321 * c-opts.c (c_common_handle_option): Or set it here.
11322
82d37118
JM
11323 PR c++/35315
11324 * c-common.c (handle_transparent_union_attribute): Don't
11325 make a duplicate type in C++.
11326
17bc631c
JM
113272011-03-15 Jason Merrill <jason@redhat.com>
11328
11329 * c-common.c (max_constexpr_depth): New.
11330 * c-common.h: Declare it.
11331 * c-opts.c (c_common_handle_option): Set it.
11332 * c.opt (fconstexpr-depth): New option.
11333
1b9b91a6
JM
113342011-03-11 Jason Merrill <jason@redhat.com>
11335
f231b5ff
JM
11336 * c-common.c (attribute_takes_identifier_p): Add missing const.
11337
1b9b91a6
JM
11338 PR c++/46803
11339 * c-common.c (attribute_takes_identifier_p): Assume that an
11340 unknown attribute takes an identifier.
11341
a19e4d44
NF
113422011-03-07 Nathan Froyd <froydnj@codesourcery.com>
11343
11344 PR c/47786
11345 * c-common.c (c_type_hash): Call list_length instead of iterating
11346 through DECL_CHAIN. Rename 'i' to 'n_elements'.
11347
982d62f6
JJ
113482011-02-19 Jakub Jelinek <jakub@redhat.com>
11349
11350 PR c/47809
11351 * c-common.c (c_fully_fold_internal): Handle VIEW_CONVERT_EXPR.
11352
0a256240
NP
113532011-02-17 Iain Sandoe <iains@gcc.gnu.org>
11354
11355 * c.opt (fobjc-abi-version=) New.
11356 (fobjc-nilcheck): New.
11357
ba9e6dd5
NF
113582011-02-03 Nathan Froyd <froydnj@codesourcery.com>
11359
11360 PR c++/46890
11361 * c-common.h (keyword_is_decl_specifier): Declare.
11362 * c-common.c (keyword_is_decl_specifier): Define.
11363 (keyword_is_function_specifier): New function.
11364
7273813a
JJ
113652011-01-26 Jakub Jelinek <jakub@redhat.com>
11366
11367 PR c/47473
11368 * c-lex.c (interpret_float): If CPP_N_IMAGINARY, ensure
11369 EXCESS_PRECISION_EXPR is created with COMPLEX_TYPE instead of
11370 REAL_TYPE.
11371
908ef79b
AC
113722011-01-26 Arnaud Charlet <charlet@adacore.com>
11373
11374 * c-ada-spec.c (dump_generic_ada_node): Avoid dereferencing null type.
11375
237e9384
JJ
113762011-01-26 Jakub Jelinek <jakub@redhat.com>
11377
11378 PR pch/47430
11379 * c-opts.c (c_common_post_options): Call c_common_no_more_pch
11380 after init_c_lex if pch_file is set.
11381
47ea1edf
DK
113822011-01-26 Dave Korn <dave.korn.cygwin@gmail.com>
11383
d4dba752 11384 PR c++/43601
47ea1edf
DK
11385 * c.opt (-fkeep-inline-dllexport): New switch.
11386
2aa9c6ae
RG
113872011-01-12 Richard Guenther <rguenther@suse.de>
11388
11389 PR middle-end/32511
11390 * c-common.c (handle_weak_attribute): Warn instead of error
11391 on declaring an inline function weak.
11392
7bd11157
TT
113932011-01-05 Tom Tromey <tromey@redhat.com>
11394
11395 * c-common.h (lvalue_error): Update.
11396 * c-common.c (lvalue_error): Add 'loc' argument. Call error_at,
11397 not error.
11398
0e66e494 113992010-12-29 Nicola Pero <nicola.pero@meta-innovation.com>
9faeb493 11400
b4f588c4
NP
11401 PR objc/47075
11402 * c-objc.h (objc_finish_message_expr): Added argument to
11403 prototype.
11404
f4da8dce
NF
114052010-12-22 Nathan Froyd <froydnj@codesourcery.com>
11406
11407 * c-common.c (handle_nonnull_attribute, handle_sentinel_attribute):
11408 Use prototype_p.
11409
46270f14
NP
114102010-12-18 Nicola Pero <nicola.pero@meta-innovation.com>
11411
11412 * c-objc.h (objc_maybe_warn_exceptions): New.
9faeb493 11413 * stub-objc.c (objc_maybe_warn_exceptions): New.
46270f14 11414
4816c593
NF
114152010-12-10 Nathan Froyd <froydnj@codesourcery.com>
11416
11417 * c-common.h (readonly_error): Declare.
11418 * c-common.c (readonly_error): Define.
11419
7a6daeb0
NF
114202010-12-09 Nathan Froyd <froydnj@codesourcery.com>
11421
11422 * c-common.h (invalid_indirection_error): Declare.
11423 * c-common.c (invalid_indirection_error): Define.
11424
892f6119
RG
114252010-12-03 Richard Guenther <rguenther@suse.de>
11426
11427 PR c/46745
11428 * c-pretty-print.c (pp_c_postfix_expression): Handle MEM_REF.
11429 (pp_c_unary_expression): Likewise.
11430 (pp_c_expression): Likewise.
11431
6c39e757
NP
114322010-11-30 Nicola Pero <nicola.pero@meta-innovation.com>
11433
11434 * c-common.h (objc_finish_function): New.
11435 (objc_non_volatilized_type): Removed.
11436 (objc_type_quals_match): Removed.
11437 * stub-objc.c (objc_finish_function): New.
11438 (objc_non_volatilized_type): Removed.
11439 (objc_type_quals_match): Removed.
9faeb493 11440
7c475d11
JM
114412010-11-30 Joseph Myers <joseph@codesourcery.com>
11442
11443 * c-common.h (parse_optimize_options): Declare.
11444 * c-cppbuiltin.c, c-format.c, c-gimplify.c, c-lex.c, c-omp.c,
11445 c-pch.c, c-pragma.c, c-semantics.c: Don't include toplev.h.
11446
71f3e391
JM
114472010-11-29 Joseph Myers <joseph@codesourcery.com>
11448
11449 * c-opts.c (check_deps_environment_vars): Use getenv instead of
11450 GET_ENVIRONMENT.
11451 * c-pch.c (O_BINARY): Don't define here.
11452 * c-pragma.h: Include "cpplib.h" instead of <cpplib.h>.
11453
d5fabb58
JM
114542010-11-25 Joseph Myers <joseph@codesourcery.com>
11455
11456 * c-cppbuiltin.c (c_cpp_builtins): Pass &global_options to
11457 targetm.except_unwind_info.
11458
299404a1
JM
114592010-11-23 Joseph Myers <joseph@codesourcery.com>
11460
11461 * c-opts.c (c_common_handle_option): Pass location to
11462 set_struct_debug_option.
11463
c98cd5bf
JM
114642010-11-23 Joseph Myers <joseph@codesourcery.com>
11465
11466 * c-common.c (visibility_options): Move from ../opts.c.
11467 * c-common.h (struct visibility_flags, visibility_options):
11468 Declare here.
11469 * c-opts.c (finish_options): Rename to c_finish_options.
11470 (c_common_init): Update call to finish_options.
11471
a9546771
NP
114722010-11-22 Nicola Pero <nicola.pero@meta-innovation.com>
11473
11474 PR objc/34033
11475 * c-lex.c (lex_string): Check that each string in an Objective-C
11476 string concat sequence starts with either one or zero '@', and
11477 that there are no spurious '@' signs at the end.
11478
24a57808
JM
114792010-11-20 Joseph Myers <joseph@codesourcery.com>
11480
11481 * c-pragma.c: Remove conditionals on HANDLE_PRAGMA_PACK,
11482 HANDLE_PRAGMA_PACK_PUSH_POP, HANDLE_PRAGMA_WEAK and
11483 HANDLE_PRAGMA_VISIBILITY.
11484 * c-pragma.h (HANDLE_PRAGMA_WEAK, HANDLE_PRAGMA_PACK,
11485 HANDLE_PRAGMA_VISIBILITY): Don't define.
11486 (HANDLE_SYSV_PRAGMA, HANDLE_PRAGMA_PACK_PUSH_POP): Don't test.
11487
a9aa2c3a
NF
114882010-11-20 Nathan Froyd <froydnj@codesourcery.com>
11489
11490 PR c++/16189
11491 PR c++/36888
11492 PR c++/45331
11493 * c-common.h (keyword_begins_type_specifier): Declare.
11494 (keyword_is_storage_class_specifier): Declare.
11495 (keyword_is_type_qualifier): Declare.
11496 * c-common.c (keyword_begins_type_specifier): New function.
11497 (keyword_is_storage_class_specifier): New function.
11498 (keyword_is_type_qualifier): Declare.
11499
5386338c
JM
115002010-11-19 Joseph Myers <joseph@codesourcery.com>
11501
11502 PR c/46547
11503 * c-common.c (in_late_binary_op): Define.
11504 (c_common_truthvalue_conversion): Check in_late_binary_op before
11505 calling c_save_expr.
11506 * c-common.h (in_late_binary_op): Declare.
11507
69ccdddb
JM
115082010-11-19 Joseph Myers <joseph@codesourcery.com>
11509
11510 * c-opts.c (c_common_handle_option): Update calls to
11511 set_struct_debug_option.
11512
6b192a09
NP
115132010-11-19 Nicola Pero <nicola.pero@meta-innovation.com>
11514
11515 * c-common.h (objc_declare_protocols): Added additional argument.
11516 * stub-objc.c (objc_declare_protocol): Same change.
9faeb493 11517
fb52b50a
NF
115182010-11-18 Nathan Froyd <froydnj@codesourcery.com>
11519
11520 PR c/33193
11521 * c-common.h (build_real_imag_expr): Declare.
11522 * c-semantics.c (build_real_imag_expr): Define.
11523
b37421c6
JM
115242010-11-17 Joseph Myers <joseph@codesourcery.com>
11525
11526 * c-opts.c (c_common_parse_file): Take no arguments.
11527 * c-common.h (c_common_parse_file): Update prototype.
11528
07078664
JJ
115292010-11-16 Jakub Jelinek <jakub@redhat.com>
11530
11531 PR c++/46401
11532 * c-common.c (warning_candidate_p): Don't track non-const calls
11533 or STRING_CSTs.
11534
c6a13190
ILT
115352010-11-15 Ian Lance Taylor <iant@google.com>
11536
11537 * c-lex.c (init_c_lex): Set macro debug callbacks if
11538 flag_dump_go_spec is set.
11539
925e8657
NP
115402010-11-15 Nicola Pero <nicola.pero@meta-innovation.com>
11541
11542 * c-common.h (objc_build_incr_expr_for_property_ref): New.
11543 * stub-objc.c (objc_build_incr_expr_for_property_ref): New.
11544
bb0a9581
NF
115452010-11-15 Nathan Froyd <froydnj@codesourcery.com>
11546
11547 PR preprocessor/45038
11548 * c-cppbuiltin.c (c_cpp_builtins): Use different format for C++
11549 dialects.
11550
c5fa0890
JM
115512010-11-12 Joseph Myers <joseph@codesourcery.com>
11552
11553 * c-common.h (c_family_lang_mask): Declare.
11554 * c-opts.c (c_family_lang_mask): Make extern.
11555 * c-pragma.c (handle_pragma_diagnostic): Use
11556 control_warning_option.
11557
a4d8c676
JM
115582010-11-12 Joseph Myers <joseph@codesourcery.com>
11559
11560 * c-common.c (parse_optimize_options): Update call to
11561 decode_options.
11562 * c-common.h (c_common_handle_option): Update prototype.
11563 * c-opts.c (c_common_handle_option): Take location_t parameter and
11564 pass it to other functions.
11565
f954bd2c
JM
115662010-11-11 Joseph Myers <joseph@codesourcery.com>
11567
11568 * c-opts.c (warning_as_error_callback): Remove.
11569 (c_common_initialize_diagnostics): Don't call
11570 register_warning_as_error_callback.
11571 (c_common_handle_option): Handle -Werror=normalized= here.
11572
d8a07487
JM
115732010-11-10 Joseph Myers <joseph@codesourcery.com>
11574
11575 * c-common.c (handle_mode_attribute): Use %' and word "signedness"
11576 in diagnostic.
11577 * c-opts.c (c_common_parse_file): Start diagnostics with lowercase
11578 letter.
11579 * c-pragma.c (handle_pragma_target, handle_pragma_optimize):
11580 Remove trailing '.' from diagnostics.
11581 * c.opt (Wwrite-strings_: Avoid '`' in help text.
11582
d5478783
JM
115832010-11-10 Joseph Myers <joseph@codesourcery.com>
11584
11585 * c-common.c (parse_optimize_options): Pass global_dc to
11586 decode_options.
11587 * c-opts.c (c_common_handle_option): Pass &global_options to
11588 set_Wstrict_aliasing.
11589 * c.opt (v): Don't mark Common or document here.
11590
91ebb981
IS
115912010-11-06 Iain Sandoe <iains@gcc.gnu.org>
11592
11593 PR target/44981
11594 * c-format.c (format_type): New type gcc_objc_string_format_type.
11595 (valid_stringptr_type_p): New.
11596 (handle_format_arg_attribute): Use valid_stringptr_type_p ().
9faeb493 11597 (check_format_string): Pass expected type, use
91ebb981
IS
11598 valid_stringptr_type_p (), check that the format string types are
11599 consistent with the format specification.
11600 (decode_format_attr): Warn if NSString is used outside objective-c.
11601 (format_types_orig): Add NSString.
11602 (format_name): New.
11603 (format_flags): New.
11604 (check_format_arg): Handle format strings requiring an external parser.
11605 first_target_format_type: New variable.
11606 (handle_format_attribute): Set up first_target_format_type, pass the
11607 expected format arg string type to check_format_string().
ab20d992 11608 * c-common.h (FMT_FLAG_PARSE_ARG_CONVERT_EXTERNAL): New flag.
91ebb981
IS
11609 * stub-objc.c (objc_string_ref_type_p): New.
11610 (objc_check_format_arg): New.
11611
bede2adc
NP
116122010-11-04 Nicola Pero <nicola.pero@meta-innovation.com>
11613
9faeb493 11614 Fixed using the Objective-C 2.0 dot-syntax with class names.
bede2adc
NP
11615 * c-common.h (objc_build_class_component_ref): New.
11616 * stub-objc.c (objc_build_class_component_ref): New.
11617
9a179d01
NP
116182010-11-03 Nicola Pero <nicola.pero@meta-innovation.com>
11619
11620 * c.opt (Wproperty-assign-default): New option.
11621
22d8d616
NP
116222010-11-03 Nicola Pero <nicola.pero@meta-innovation.com>
11623
11624 Implemented -fobjc-std=objc1 flag.
11625 * c.opt (fobjc-std=objc1): New option.
11626
2debdb4f
NP
116272010-11-01 Nicola Pero <nicola.pero@meta-innovation.com>
11628
11629 Implemented format and noreturn attributes for Objective-C methods.
11630 * c-common.c (handle_noreturn_attribute): Recognize 'noreturn'
11631 attribute for Objective-C methods.
11632
ec52b111
JM
116332010-10-31 Jason Merrill <jason@redhat.com>
11634
11635 * c-common.c (conversion_warning, warn_for_collisions_1): Use
11636 EXPR_LOC_OR_HERE.
11637
46a88c12
NP
116382010-10-30 Nicola Pero <nicola.pero@meta-innovation.com>
11639
11640 Implemented Objective-C 2.0 @property, @synthesize and @dynamic.
11641 * c-common.h (enum rid): Removed RID_COPIES and RID_IVAR.
11642 (objc_add_property_declaration): Removed arguments for copies and
11643 ivar.
11644 (objc_build_getter_call): Renamed to
11645 objc_maybe_build_component_ref.
11646 (objc_build_setter_call): Renamed to objc_maybe_build_modify_expr.
11647 (objc_is_property_ref): New.
11648 * c-common.c (c_common_reswords): Removed copies and ivar.
11649 * stub-objc.c (objc_add_property_declaration): Removed arguments
11650 for copies and ivar.
11651 (objc_build_getter_call): Renamed to
11652 objc_maybe_build_component_ref.
11653 (objc_build_setter_call): Renamed to objc_maybe_build_modify_expr.
11654 (objc_is_property_ref): New.
9faeb493 11655
1e4bf85b
AC
116562010-10-29 Arnaud Charlet <charlet@adacore.com>
11657 Matthew Gingell <gingell@adacore.com>
11658
11659 * c-ada-spec.c (separate_class_package): New function.
11660 (pp_ada_tree_identifier): Prefix references to C++ classes with the
11661 name of their enclosing package.
11662 (print_ada_declaration): Use separate_class_package.
11663
81f0bab2
JM
116642010-10-27 Jason Merrill <jason@redhat.com>
11665
2b08f2c5
JM
11666 * c-common.c (c_common_reswords): Add __is_literal_type.
11667 * c-common.h (enum rid): Add RID_IS_LITERAL_TYPE.
11668
81f0bab2
JM
11669 * c-common.c (check_case_value): Remove special C++ code.
11670
200290f2
NP
116712010-10-27 Nicola Pero <nicola.pero@meta-innovation.com>
11672
11673 * c-common.h (enum rid): Added RID_READWRITE, RID_ASSIGN,
11674 RID_RETAIN, RID_COPY and RID_NONATOMIC. Updated RID_FIRST_PATTR
11675 and RID_LAST_PATTR.
11676 (objc_add_property_declaration): Added additional arguments.
11677 (objc_property_attribute_kind): Removed.
11678 (objc_set_property_attr): Removed.
11679 * c-common.c (c_common_reswords): Added readwrite, assign, retain,
11680 copy and nonatomic.
11681 * stub-objc.c (objc_add_property_declaration): Added additional
11682 arguments.
11683 (objc_set_property_attr): Removed.
9faeb493 11684
f614132b
NP
116852010-10-27 Nicola Pero <nicola.pero@meta-innovation.com>
11686
11687 * c-common.h (objc_add_property_variable): Renamed to
11688 objc_add_property_declaration. Added location argument.
11689 * stub-objc.c (objc_add_property_variable): Same change.
b1726d6c 11690
b8a18805
NP
116912010-10-23 Nicola Pero <nicola.pero@meta-innovation.com>
11692
11693 * c-common.h (objc_maybe_printable_name): New.
11694 * stub-objc.c (objc_maybe_printable_name): New.
11695
3f8257db
JJ
116962010-10-22 Artjoms Sinkarovs <artyom.shinakroff@gmail.com>
11697 Andrew Pinski <pinskia@gmail.com>
30cd1c5d
AS
11698
11699 * c-common.h (c_common_mark_addressable_vec): Declare.
11700 * c-common.c (c_common_mark_addressable_vec): New function.
11701
249a82c4
NP
117022010-10-20 Nicola Pero <nicola.pero@meta-innovation.com>
11703
11704 * c-common.h (objc_set_method_type): Removed.
11705 (objc_add_method_declaration): Added boolean argument.
11706 (objc_start_method_definition): Same change.
11707 (objc_build_method_signature): Same change.
11708 * stub-objc.c (objc_set_method_type): Removed.
11709 (objc_add_method_declaration): Added boolean argument.
11710 (objc_start_method_definition): Same change.
11711 (objc_build_method_signature): Same change.
11712
977e30bc
NP
117132010-10-20 Nicola Pero <nicola.pero@meta-innovation.com>
11714
11715 * c-common.h (finish_file): Removed.
11716 (objc_write_global_declarations): New.
11717 * c-opts.c (c_common_parse_file): Do not call finish_file.
11718 * stub-objc.c (objc_write_global_declarations): New.
9faeb493 11719
da57d1b9
NP
117202010-10-18 Nicola Pero <nicola.pero@meta-innovation.com>
11721
11722 Implemented parsing @synthesize and @dynamic for
11723 Objective-C/Objective-C++.
11724 * c-common.h (enum rid): Add RID_AT_SYNTHESIZE and RID_AT_DYNAMIC.
11725 (objc_add_synthesize_declaration): New.
11726 (objc_add_dynamic_declaration): New.
11727 * c-common.c (c_common_reswords): Add synthesize and dynamic.
11728 * stub-objc.c (objc_add_synthesize_declaration): New.
11729 (objc_add_dynamic_declaration): New.
9faeb493 11730
0069111f
MM
117312010-10-18 Michael Meissner <meissner@linux.vnet.ibm.com>
11732
11733 PR target/46041
11734 * c-cppbuiltin.c (mode_has_fma): Move function here from
11735 builtins.c. Don't use the fma optab, instead just use the
11736 HAVE_fma* macros, so that __FP_FAST_FMA* will be defined when
11737 using -save-temps.
11738
e426b47b
NP
117392010-10-18 Nicola Pero <nicola.pero@meta-innovation.com>
11740
11741 Merge from 'apple/trunk' branch on FSF servers.
0069111f 11742
3f8257db 11743 2005-11-08 Fariborz Jahanian <fjahanian@apple.com>
e426b47b 11744
9faeb493 11745 Radar 4330422
e426b47b
NP
11746 * c-common.h (objc_non_volatilized_type): New declaration
11747 * stub-objc.c (objc_non_volatilized_type): New stub.
11748
90fbfdc3
NP
117492010-10-17 Nicola Pero <nicola.pero@meta-innovation.com>
11750
e426b47b 11751 Merge from 'apple/trunk' branch on FSF servers.
90fbfdc3 11752
ab20d992 11753 2006-03-27 Fariborz Jahanian <fjahanian@apple.com>
90fbfdc3 11754
9faeb493 11755 Radar 4133425
90fbfdc3 11756 * c-common.h (objc_diagnose_private_ivar): New decl.
0069111f 11757 * stub-objc.c (objc_diagnose_private_ivar): New stub.
90fbfdc3 11758
c37d8c30
IS
117592010-10-17 Iain Sandoe <iains@gcc.gnu.org>
11760
11761 * c-common.c (c_common_reswords): Add package, RID_AT_PACKAGE.
11762 * c-common.h (enum rid): Add RID_AT_PACKAGE.
11763 (objc_ivar_visibility_kind): New enum.
11764 (objc_set_visibility): Adjust prototype to use visibility enum.
0069111f 11765 * stub-objc.c (objc_set_visibility): Adjust stub to use
c37d8c30
IS
11766 visibility enum.
11767
1b1562a5
MM
117682010-10-14 Michael Meissner <meissner@linux.vnet.ibm.com>
11769
11770 * c-cppbuiltin.c (builtin_define_float_constants): Emit
11771 __FP_FAST_FMA, __FP_FAST_FMAF, and __FP_FAST_FMAL if the machine
11772 has the appropriate fma builtins.
11773 (c_cpp_builtins): Adjust call to builtin_define_float_constants.
11774
668ea4b1
IS
117752010-10-14 Iain Sandoe <iains@gcc.gnu.org>
11776
1b1562a5 11777 merge from FSF apple 'trunk' branch.
3f8257db 11778 2006 Fariborz Jahanian <fjahanian@apple.com>
1b1562a5 11779
668ea4b1
IS
11780 Radars 4436866, 4505126, 4506903, 4517826
11781 * c-common.c (c_common_resword): Define @property and its attributes.
11782 * c-common.h: Define property attribute enum entries.
11783 (OBJC_IS_PATTR_KEYWORD): New.
11784 (objc_property_attribute_kind): New enum.
11785 Declare objc_set_property_attr (), objc_add_property_variable (),
11786 objc_build_getter_call () and objc_build_setter_call ().
11787 * stub-objc.c (objc_set_property_attr): New stub.
11788 (objc_add_property_variable): Likewise.
11789 (objc_build_getter_call): Likewise.
11790 (objc_build_setter_call) Likewise.
1b1562a5 11791
a1178b30
IS
117922010-10-13 Iain Sandoe <iains@gcc.gnu.org>
11793
1b1562a5 11794 merge from FSF apple 'trunk' branch.
ab20d992 11795 2006-04-26 Fariborz Jahanian <fjahanian@apple.com>
a1178b30
IS
11796
11797 Radar 3803157 (method attributes)
11798 * c-common.c (handle_deprecated_attribute): Recognize
11799 objc methods as valid declarations.
11800 * c-common.h: Declare objc_method_decl ().
1b1562a5 11801 * stub-objc.c (objc_method_decl): New stub.
a1178b30 11802
a75bfaa6
JM
118032010-10-08 Joseph Myers <joseph@codesourcery.com>
11804
11805 * c-common.c (parse_optimize_options): Call
11806 decode_cmdline_options_to_array_default_mask before
11807 decode_options. Update arguments to decode_options.
11808 * c-common.h (c_common_init_options_struct): Declare.
11809 * c-opts.c (c_common_init_options_struct): New. Split out from
11810 c_common_init_options.
11811
f05b9d93
NP
118122010-10-06 Nicola Pero <nicola.pero@meta-innovation.com>
11813
11814 Implemented fast enumeration for Objective-C.
11815 * c-common.h (objc_finish_foreach_loop): New.
11816 * stub-objc.c (objc_finish_foreach_loop): New.
11817
1ebe4b4f
JM
118182010-10-05 Joseph Myers <joseph@codesourcery.com>
11819
11820 * c-common.h (struct diagnostic_context): Don't declare here.
11821 (c_common_initialize_diagnostics): Declare using
11822 diagnostic_context typedef.
11823 * c-opts.c (c_common_handle_option): Pass global_dc to
11824 handle_generated_option.
11825
d4d24ba4
JM
118262010-10-04 Joseph Myers <joseph@codesourcery.com>
11827
11828 * c-opts.c (c_common_handle_option): Pass &global_options_set to
11829 handle_generated_option.
11830
478a1c5b
ILT
118312010-10-03 Ian Lance Taylor <iant@google.com>
11832
11833 * c.opt (-fplan9-extensions): New option.
11834
82a1c2fe
FXC
118352010-10-03 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
11836
11837 * c-cppbuiltin.c (define__GNUC__, builtin_define_type_precision):
11838 Remove.
11839 (c_cpp_builtins): Call functions from cppbuiltin.c instead
11840 of duplicating code.
11841
92902b1b
IS
118422010-09-30 Iain Sandoe <iains@gcc.gnu.org>
11843
11844 * c-common.c: Add two new entries for @optional
11845 and @required keywords.
11846
11847 merge from FSF 'apple/trunk' branch.
3f8257db 11848 2006-01-30 Fariborz Jahanian <fjahanian@apple.com>
92902b1b
IS
11849
11850 Radar 4386773
11851 * c-common.h (RID_AT_OPTIONAL, RID_AT_REQUIRED): Two new
11852 objective-c keywords.
11853 (objc_set_method_opt): New declaration.
11854 * stub-objc.c (objc_set_method_opt): New stub.
9faeb493 11855
46625112
JM
118562010-09-30 Joseph Myers <joseph@codesourcery.com>
11857
11858 * c-common.c (handle_optimize_attribute): Pass &global_options to
11859 cl_optimization_save and cl_optimization_restore.
11860 * c-opts.c (c_common_handle_option): Pass &global_options to
11861 handle_generated_option.
11862 * c-pragma.c (handle_pragma_diagnostic): Use option_flag_var.
11863 (handle_pragma_pop_options, handle_pragma_reset_options): Pass
11864 &global_options to cl_optimization_restore.
11865
49b91f05
NP
118662010-09-30 Nicola Pero <nicola.pero@meta-innovation.com>
11867
11868 * c-lex.c (c_lex_with_flags): Updated comments for CPP_AT_NAME
11869 Objective-C/Objective-C++ keywords.
11870
13ed556f 118712010-09-29 Nicola Pero <nicola.pero@meta-innovation.com>
a6341d57 11872
9faeb493
UB
11873 Merge from 'apple/trunk' branch on FSF servers.
11874
3f8257db 11875 2005-10-04 Fariborz Jahanian <fjahanian@apple.com>
a6341d57
NP
11876
11877 Radar 4281748
11878 * c-common.h (objc_check_global_decl): New declaration.
11879 * stub-objc.c (objc_check_global_decl): New stub.
11880
f0036cca
JM
118812010-09-29 Joseph Myers <joseph@codesourcery.com>
11882
11883 * c.opt: Don't use VarExists.
11884
e3339d0f
JM
118852010-09-29 Joseph Myers <joseph@codesourcery.com>
11886
11887 * c-common.c (c_cpp_error): Update names of diagnostic_context
11888 members.
11889 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Update names of
11890 cl_optimization members.
11891 * c-opts.c (warning_as_error_callback, c_common_handle_option,
11892 sanitize_cpp_opts, finish_options): Update names of cpp_options
11893 members.
11894
1973201f
NP
118952010-09-29 Nicola Pero <nicola.pero@meta-innovation.com>
11896
11897 * c-common.h (OBJC_IS_CXX_KEYWORD): New macro. Updated comments.
11898 (objc_is_reserved_word): Removed.
11899 * c-common.c: Updated comments.
11900 * c-lex.c (c_lex_with_flags): Use OBJC_IS_CXX_KEYWORD instead of
11901 objc_is_reserved_word.
11902 * stub-objc.c (objc_is_reserved_word): Removed.
11903
f7e71da5
IS
119042010-09-28 Iain Sandoe <iains@gcc.gnu.org>
11905
9faeb493 11906 * c-common.h (objc_add_method_declaration): Adjust prototype to
f7e71da5
IS
11907 include attributes.
11908 (objc_start_method_definition): Likewise.
11909 (objc_build_keyword_decl): Likewise.
11910 * stub-objc.c:(objc_add_method_declaration): Handle attributes.
11911 (objc_start_method_definition): Likewise.
11912 (objc_build_keyword_decl): Likewise.
11913
c165dca7
IS
119142010-09-28 Iain Sandoe <iains@gcc.gnu.org>
11915
11916 * c-common.h (objc_start_class_interface): Adjust prototype.
11917 (objc_start_category_interface): Likewise.
11918 (objc_start_protocol): Likewise.
11919 * stub-objc.c (objc_start_protocol): Adjust for extra argument.
11920 (objc_start_class_interface): Likewise.
11921 (objc_start_category_interface): Likewise.
11922
7458026b
ILT
119232010-09-27 Ian Lance Taylor <iant@google.com>
11924
11925 * c-common.c (c_common_attribute_table): Add no_split_stack.
11926 (handle_no_split_stack_attribute): New static function.
11927
b581b85b
NP
119282010-09-27 Nicola Pero <nicola.pero@meta-innovation.com>
11929
9faeb493 11930 Merge from 'apple/trunk' branch on FSF servers.
b581b85b 11931
3f8257db 11932 2005-12-15 Fariborz Jahanian <fjahanian@apple.com>
b581b85b 11933
9faeb493 11934 Radar 4229905
b581b85b
NP
11935 * c-common.h (objc_have_common_type): New declaration.
11936 * stub-objc.c (objc_have_common_type): New stub.
11937
11938 2005-06-22 Ziemowit Laski <zlaski@apple.com>
11939
11940 Radar 4154928
11941 * c-common.h (objc_common_type): New prototype.
9faeb493 11942 * stub-objc.c (objc_common_type): New stub.
b581b85b 11943
46a4da10
JH
119442010-09-24 Jan Hubicka <jh@suse.cz>
11945
11946 * c-common.c (handle_leaf_attribute): New function.
11947 (struct attribute_spec c_common_att): Add leaf.
11948
e200444e
JM
119492010-09-22 Joseph Myers <joseph@codesourcery.com>
11950
11951 * c.opt (-all-warnings, -ansi, -assert, -assert=, -comments,
11952 -comments-in-macros, -define-macro, -define-macro=, -dependencies,
11953 -dump, -dump=, -imacros, -imacros=, -include, -include=,
11954 -include-barrier, -include-directory, -include-directory=,
11955 -include-directory-after, -include-directory-after=,
11956 -include-prefix, -include-prefix=, -include-with-prefix,
11957 -include-with-prefix=, -include-with-prefix-after,
11958 -include-with-prefix-after=, -include-with-prefix-before,
11959 -include-with-prefix-before=, -no-integrated-cpp,
11960 -no-line-commands, -no-standard-includes, -no-warnings, -output,
11961 -output=, -pedantic, -pedantic-errors, -preprocess,
11962 -print-missing-file-dependencies, -trace-includes, -traditional,
11963 -traditional-cpp, -trigraphs, -undefine-macro, -undefine-macro=,
11964 -user-dependencies, -verbose, -write-dependencies,
11965 -write-user-dependencies, no-integrated-cpp, traditional): New.
11966
29a80ea6
NP
119672010-09-21 Nicola Pero <nicola.pero@meta-innovation.com>
11968
11969 PR objc/23710
ac1fc2fc
NP
11970 * c-common.h (objc_start_method_definition): Return bool instead
11971 of void.
11972 * stub-objc.c (objc_start_method_definition): Return bool instead
11973 of void.
11974
119752010-09-21 Nicola Pero <nicola.pero@meta-innovation.com>
11976
11977 PR objc/25965
11978 * c-common.h (objc_get_interface_ivars): New declaration.
11979 * stub-objc.c (objc_get_interface_ivars): New stub.
29a80ea6 11980
de621752
ILT
119812010-09-15 Ian Lance Taylor <iant@google.com>
11982
11983 * c-common.c (parse_optimize_options): Do not capitalize warning
06730c5d 11984 messages. Remove period at end of warning message.
de621752 11985
ba885ec5
NS
119862010-09-09 Nathan Sidwell <nathan@codesourcery.com>
11987
11988 * c-common.c (handle_alias_ifunc_attribute): New, broken out of ...
11989 (handle_alias_attribute): ... here.
11990 (handle_ifunc_attribute): New.
11991
c5ee1358
MM
119922010-09-06 Mark Mitchell <mark@codesourcery.com>
11993
11994 * c-common.h (do_warn_double_promotion): Declare.
11995 * c-common.c (do_warn_double_promotion): Define.
11996
0a0b3574
MM
119972010-09-05 Mark Mitchell <mark@codesourcery.com>
11998
11999 * c.opt (Wdouble-promotion): New.
12000
d1779886
JM
120012010-09-02 Joseph Myers <joseph@codesourcery.com>
12002
12003 * c.opt (falt-external-templates, fhuge-objects, fvtable-gc,
12004 fvtable-thunks, fxref): Mark no longer supported in help text.
12005
2d2bd949
JM
120062010-09-02 Joseph Myers <joseph@codesourcery.com>
12007
12008 * c.opt (Wimport, fall-virtual, falt-external-templates,
12009 fdefault-inline, fenum-int-equiv, fexternal-templates,
12010 fguiding-decls, fhonor-std, fhuge-objects, flabels-ok,
12011 fname-mangling-version-, fnew-abi, fnonnull-objects,
12012 foptional-diags, fsquangle, fstrict-prototype, fthis-is-variable,
12013 fvtable-gc, fvtable-thunks, fxref): Mark with Ignore and Warn as
12014 applicable.
12015 (fhandle-exceptions): Mark with Alias and Warn.
12016 * c-opts.c (c_common_handle_option): Don't handle options marked
12017 as ignored.
12018
5de8299c
JM
120192010-09-02 Joseph Myers <joseph@codesourcery.com>
12020
12021 * c.opt (Wcomments, Werror-implicit-function-declaration,
12022 ftemplate-depth-, std=c89, std=c9x, std=gnu89, std=gnu9x,
12023 std=iso9899:1990, std=iso9899:1999, std=iso9899:199x): Mark as
12024 aliases.
12025 * c-common.c (option_codes): Use OPT_Wcomment instead of
12026 OPT_Wcomments.
12027 * c-opts.c (warning_as_error_callback, c_common_handle_option):
12028 Don't handle options marked as aliases.
12029
0ceb0201
RG
120302010-08-25 Richard Guenther <rguenther@suse.de>
12031
12032 * c-common.c (c_common_get_alias_set): Remove special
12033 handling for pointers.
12034
ac47786e
NF
120352010-08-20 Nathan Froyd <froydnj@codesourcery.com>
12036
12037 * c-common.c: Use FOR_EACH_VEC_ELT.
12038 * c-gimplify.c: Likewise.
12039 * c-pragma.c: Likewise.
12040
c878765b
JM
120412010-08-16 Joseph Myers <joseph@codesourcery.com>
12042
12043 * c.opt (MDX): Change back to MD. Mark NoDriverArg instead of
12044 RejectDriver.
12045 (MMDX): Change back to MMD. Mark NoDriverArg instead of
12046 RejectDriver.
12047 * c-opts.c (c_common_handle_option): Use OPT_MD and OPT_MMD
12048 instead of OPT_MDX and OPT_MMDX.
12049
603349bf
JM
120502010-08-16 Joseph Myers <joseph@codesourcery.com>
12051
12052 * c.opt (MDX, MMDX, lang-asm): Mark RejectDriver.
12053
644fa7ac
JM
120542010-08-12 Joseph Myers <joseph@codesourcery.com>
12055
12056 * c.opt (MD, MMD): Change to MDX and MMDX.
12057 * c-opts.c (c_common_handle_option): Use OPT_MMD and OPT_MMDX.
12058
481e1176
JM
120592010-08-11 Joseph Myers <joseph@codesourcery.com>
12060
12061 * c-opts.c (c_common_handle_option): Call handle_generated_option
12062 instead of handle_option.
12063
ac8dc9f7
NF
120642010-08-08 Nathan Froyd <froydnj@codesourcery.com>
12065
12066 * c-pragma.c (add_to_renaming_pragma_list): Fix call to VEC_safe_push.
12067 (maybe_apply_renaming_pragma): Delete unneeded declarations.
12068
4f8c876d
NF
120692010-08-08 Nathan Froyd <froydnj@codesourcery.com>
12070
12071 * c-pragma.c (pending_redefinition): Declare. Declare a VEC of it.
12072 (pending_redefine_extname): Change type to a VEC.
12073 (add_to_renaming_pragma_list): Update for new type of
12074 pending_redefine_extname.
ac8dc9f7 12075 (maybe_apply_renaming_pragma): Likewise.
4f8c876d 12076
3b0c690e
AC
120772010-08-04 Arnaud Charlet <charlet@adacore.com>
12078
12079 * c-ada-spec.c (dump_ada_template): Mark underlying instance type as
12080 visited.
12081 (dump_generic_ada_node): Code clean up. Use TREE_VISITED flag to
12082 decide whether a type has already been declared/seen.
12083 Do not go to the original type.
12084 (dump_nested_types): New parameter forward.
12085 Generate forward declaration if needed and mark type as visited.
12086 (print_ada_declaration): Call dump_nested_types if not already done.
12087 Mark types as visited.
12088
1890bccc
JM
120892010-08-03 Joseph Myers <joseph@codesourcery.com>
12090
12091 * c.opt (-print-pch-checksum): Remove option.
12092 * c-opts.c (c_common_handle_option): Don't handle
12093 OPT_print_pch_checksum.
12094
5f20c657
JM
120952010-07-27 Joseph Myers <joseph@codesourcery.com>
12096
12097 * c-common.h (c_common_handle_option): Update prototype and return
12098 value type.
12099 * c-opts.c (c_common_handle_option): Update prototype and return
12100 value type. Update calls to handle_option and
12101 enable_warning_as_error.
12102
f551f80c
JJ
121032010-07-27 Jakub Jelinek <jakub@redhat.com>
12104
12105 PR c/45079
12106 * c-pretty-print.c (pp_c_expression): Handle C_MAYBE_CONST_EXPR.
12107
61ff2bdc
JM
121082010-07-27 Joseph Myers <joseph@codesourcery.com>
12109
12110 * c-common.h (c_common_missing_argument): Remove.
12111 * c-opts.c (c_common_missing_argument): Remove.
12112 * c.opt (A, D, F, I, MD, MMD, MQ, MT, U, fconstant-string-class=,
12113 idirafter, imacros, include, isysroot, isystem, iquote): Add
12114 MissingArgError.
12115 * c-objc-common.h (LANG_HOOKS_MISSING_ARGUMENT): Remove.
12116
7a9bf9a4
JM
121172010-07-27 Joseph Myers <joseph@codesourcery.com>
12118
12119 * c-common.h (c_common_option_lang_mask,
12120 c_common_initialize_diagnostics, c_common_complain_wrong_lang_p):
12121 New.
12122 (c_common_init_options): Update prototype.
12123 * c-opts.c (c_common_option_lang_mask): New.
12124 (c_common_initialize_diagnostics): Split out of
12125 c_common_init_options.
12126 (accept_all_c_family_options, c_common_complain_wrong_lang_p):
12127 New.
12128 (c_common_init_options): Update prototype. Use decoded options in
12129 search for -lang-asm.
12130
910ad8de
NF
121312010-07-15 Nathan Froyd <froydnj@codesourcery.com>
12132
12133 * c-common.c: Carefully replace TREE_CHAIN with DECL_CHAIN.
12134 * c-format.c: Likewise.
12135
718f9c0f
MLI
121362010-07-08 Manuel López-Ibáñez <manu@gcc.gnu.org>
12137
12138 * c-common.h: Include diagnostic-core.h. Error if already
12139 included.
12140 * c-semantics.c: Do not define GCC_DIAG_STYLE here.
12141
4d451982
MLI
121422010-07-03 Manuel López-Ibáñez <manu@gcc.gnu.org>
12143
adfac8df 12144 * c-common.c (IN_GCC_FRONTEND): Do not undef.
4d451982
MLI
12145 Do not include expr.h
12146 (vector_mode_valid_p): Move here.
12147
119fe915
SB
121482010-06-21 DJ Delorie <dj@redhat.com>
12149
12150 * c-pragma.c (handle_pragma_diagnostic): Add push/pop,
12151 allow these pragmas anywhere.
12152
121532010-06-14 Jakub Jelinek <jakub@redhat.com>
12154
12155 PR bootstrap/44509
12156 * c-cppbuiltin.c: Include gt-c-family-c-cppbuiltin.h.
12157 (lazy_hex_fp_values, lazy_hex_fp_value_count): Add GTY(()) markers.
12158 (lazy_hex_fp_value, builtin_define_with_hex_fp_value): Use
12159 ggc_strdup instead of xstrdup.
12160
121612010-06-10 Jakub Jelinek <jakub@redhat.com>
12162
12163 * c-cppbuiltin.c: Include cpp-id-data.h.
12164 (lazy_hex_fp_values, lazy_hex_fp_value_count): New variables.
12165 (lazy_hex_fp_value): New function.
12166 (builtin_define_with_hex_fp_value): Provide definitions lazily.
12167
6662d794
MLI
121682010-06-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
12169
12170 * c-gimplify.c: Do not include tree-flow.h
12171
38f8b050
JR
121722010-06-29 Joern Rennecke <joern.rennecke@embecosm.com>
12173
12174 PR other/44034
12175 * c-common.c: Rename targetm member:
12176 targetm.enum_va_list -> targetm.enum_va_list_p
12177
9589f23e
AS
121782010-06-28 Anatoly Sokolov <aesok@post.ru>
12179
12180 * c-common.c (shorten_compare): Adjust call to force_fit_type_double.
12181
3b06d379
SB
121822010-06-28 Steven Bosscher <steven@gcc.gnu.org>
12183
12184 * c-cppbuiltin.c: Do not include except.h.
12185
d166d4c3
AK
121862010-06-24 Andi Kleen <ak@linux.intel.com>
12187
9faeb493
UB
12188 * c-common.c (warn_for_omitted_condop): New.
12189 * c-common.h (warn_for_omitted_condop): Add prototype.
d166d4c3 12190
70cb8be6
JM
121912010-06-21 Joseph Myers <joseph@codesourcery.com>
12192
12193 * c.opt (lang-objc): Remove.
12194 * c-opts.c (c_common_handle_option): Don't handle OPT_lang_objc.
12195
a4c97feb
JR
121962010-06-21 Joern Rennecke <joern.rennecke@embecosm.com>
12197
12198 * c-opts.c: Include "tm_p.h".
12199
6e2f1956
JM
122002010-06-20 Joseph Myers <joseph@codesourcery.com>
12201
12202 * c-common.c (parse_optimize_options): Update call to
12203 decode_options.
12204
bc87224e
NF
122052010-06-18 Nathan Froyd <froydnj@codesourcery.com>
12206
12207 * c-common.c (record_types_used_by_current_var_decl): Adjust for
12208 new type of types_used_by_cur_var_decl.
12209
b49cf425
JR
122102010-06-17 Joern Rennecke <joern.rennecke@embecosm.com>
12211
12212 PR bootstrap/44512
12213 * c-cppbuiltin.c (builtin_define_with_hex_fp_value): Add cast
12214 for C++ standard compliance.
12215
59f9c2ed
JM
122162010-06-16 Jason Merrill <jason@redhat.com>
12217
12218 * c.opt: Add -Wnoexcept.
12219
33766b66
RG
122202010-06-16 Richard Guenther <rguenther@suse.de>
12221
12222 PR c/44555
12223 * c-common.c (c_common_truthvalue_conversion): Remove
12224 premature and wrong optimization concering ADDR_EXPRs.
12225
eff7e30c
AC
122262010-06-15 Arnaud Charlet <charlet@adacore.com>
12227
12228 * c-ada-spec.c (dump_sloc): Remove column info.
12229 (is_simple_enum): New function.
12230 (dump_generic_ada_node, print_ada_declaration): Map C enum types to Ada
12231 enum types when relevant.
12232
6312e84d
MLI
122332010-06-11 Manuel López-Ibáñez <manu@gcc.gnu.org>
12234
9faeb493 12235 * c-common.c (conversion_warning): Warn at expression
6312e84d
MLI
12236 location.
12237
1cb42611
JM
122382010-06-10 Joseph Myers <joseph@codesourcery.com>
12239
12240 * c-opts.c (c_common_handle_option): Don't handle
12241 OPT_fshow_column.
12242
a9429e29
LB
122432010-06-08 Laurynas Biveinis <laurynas.biveinis@gmail.com>
12244
12245 * c-pragma.c (push_alignment): Use typed GC allocation.
12246 (handle_pragma_push_options): Likewise.
12247
12248 * c-common.c (parse_optimize_options): Likewise.
12249
12250 * c-common.h (struct sorted_fields_type): Add variable_size GTY
12251 option.
12252
5498f011
JM
122532010-06-07 Joseph Myers <joseph@codesourcery.com>
12254
12255 * c-common.c (flag_preprocess_only, flag_undef, flag_no_builtin,
12256 flag_no_nonansi_builtin, flag_short_double, flag_short_wchar,
12257 flag_lax_vector_conversions, flag_ms_extensions, flag_no_asm,
12258 flag_signed_bitfields, warn_strict_null_sentinel,
12259 flag_nil_receivers, flag_zero_link, flag_replace_objc_classes,
12260 flag_gen_declaration, flag_no_gnu_keywords,
12261 flag_implement_inlines, flag_implicit_templates,
12262 flag_implicit_inline_templates, flag_optional_diags,
12263 flag_elide_constructors, flag_default_inline, flag_rtti,
12264 flag_conserve_space, flag_access_control, flag_check_new,
12265 flag_new_for_scope, flag_weak, flag_working_directory,
12266 flag_use_cxa_atexit, flag_use_cxa_get_exception_ptr,
12267 flag_enforce_eh_specs, flag_threadsafe_statics,
12268 flag_pretty_templates): Remove.
12269 * c-common.h (flag_preprocess_only, flag_nil_receivers,
12270 flag_objc_exceptions, flag_objc_sjlj_exceptions, flag_zero_link,
12271 flag_replace_objc_classes, flag_undef, flag_no_builtin,
12272 flag_no_nonansi_builtin, flag_short_double, flag_short_wchar,
12273 flag_lax_vector_conversions, flag_ms_extensions, flag_no_asm,
12274 flag_const_strings, flag_signed_bitfields, flag_gen_declaration,
12275 flag_no_gnu_keywords, flag_implement_inlines,
12276 flag_implicit_templates, flag_implicit_inline_templates,
12277 flag_optional_diags, flag_elide_constructors, flag_default_inline,
12278 flag_rtti, flag_conserve_space, flag_access_control,
12279 flag_check_new, flag_new_for_scope, flag_weak,
12280 flag_working_directory, flag_use_cxa_atexit,
12281 flag_use_cxa_get_exception_ptr, flag_enforce_eh_specs,
12282 flag_threadsafe_statics, flag_pretty_templates,
12283 warn_strict_null_sentinel): Remove.
12284 * c.opt (E, Wstrict-null-sentinel, faccess-control, fasm,
12285 fbuiltin, fcheck-new, fconserve-space, felide-constructors,
12286 fenforce-eh-specs, ffor-scope, fgnu-keywords, fimplement-inlines,
12287 fimplicit-inline-templates, fimplicit-templates,
12288 flax-vector-conversions, fms-extensions, fnil-receivers,
12289 fnonansi-builtins, fpretty-templates, freplace-objc-classes,
12290 frtti, fshort-double, fshort-enums, fshort-wchar,
12291 fsigned-bitfields, fsigned-char, fstats, fthreadsafe-statics,
12292 funsigned-bitfields, funsigned-char, fuse-cxa-atexit,
12293 fuse-cxa-get-exception-ptr, fweak, fworking-directory, fzero-link,
12294 gen-decls, undef): Use Var.
12295 (fdefault-inline, foptional-diags): Document as doing nothing.
12296 * c-opts.c (c_common_handle_option): Remove cases for options now
12297 using Var. Mark ignored options as such.
12298
39dabefd
SB
122992010-06-05 Steven Bosscher <steven@gcc.gnu.org>
12300
9faeb493 12301 * c-common.c: Moved to here from parent directory.
39dabefd
SB
12302 * c-common.def: Likewise.
12303 * c-common.h: Likewise.
12304 * c-cppbuiltin.c: Likewise.
12305 * c-dump.c: Likewise.
12306 * c-format.c: Likewise.
12307 * c-format.h : Likewise.
12308 * c-gimplify.c: Likewise.
12309 * c-lex.c: Likewise.
12310 * c-omp.c: Likewise.
12311 * c.opt: Likewise.
12312 * c-opts.c: Likewise.
12313 * c-pch.c: Likewise.
12314 * c-ppoutput.c: Likewise.
12315 * c-pragma.c: Likewise.
12316 * c-pragma.h: Likewise.
12317 * c-pretty-print.c: Likewise.
12318 * c-pretty-print.h: Likewise.
12319 * c-semantics.c: Likewise.
12320 * stub-objc.c: Likewise.
12321
12322 * c-common.c: Include gt-c-family-c-common.h.
12323 * c-pragma.c: Include gt-c-family-c-pragma.h.
12324\f
c48514be 12325Copyright (C) 2010-2021 Free Software Foundation, Inc.
39dabefd
SB
12326
12327Copying and distribution of this file, with or without modification,
12328are permitted in any medium without royalty provided the copyright
12329notice and this notice are preserved.