]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/c/ChangeLog
d: RHS value lost when a target_expr modifies LHS in a cond_expr
[thirdparty/gcc.git] / gcc / c / ChangeLog
CommitLineData
90708f87
GA
12021-06-25 Martin Sebor <msebor@redhat.com>
2
3 * c-decl.c (pop_scope): Replace direct uses of TREE_NO_WARNING with
4 warning_suppressed_p, suppress_warning, and copy_no_warning.
5 (diagnose_mismatched_decls): Same.
6 (duplicate_decls): Same.
7 (grokdeclarator): Same.
8 (finish_function): Same.
9 (c_write_global_declarations_1): Same.
10 * c-fold.c (c_fully_fold_internal): Same.
11 * c-parser.c (c_parser_expr_no_commas): Same.
12 (c_parser_postfix_expression): Same.
13 * c-typeck.c (array_to_pointer_conversion): Same.
14 (function_to_pointer_conversion): Same.
15 (default_function_array_conversion): Same.
16 (convert_lvalue_to_rvalue): Same.
17 (default_conversion): Same.
18 (build_indirect_ref): Same.
19 (build_function_call_vec): Same.
20 (build_atomic_assign): Same.
21 (build_unary_op): Same.
22 (c_finish_return): Same.
23 (emit_side_effect_warnings): Same.
24 (c_finish_stmt_expr): Same.
25 (c_omp_clause_copy_ctor): Same.
26
9aa8327e
GA
272021-06-24 Jakub Jelinek <jakub@redhat.com>
28
29 PR c/101176
30 * c-parser.c (c_parser_has_attribute_expression): Set source range for
31 the result.
32
332021-06-24 Jakub Jelinek <jakub@redhat.com>
34
35 PR c/101171
36 * c-typeck.c (build_c_cast): Don't call note_integer_operands on
37 error_mark_node.
38
392021-06-24 Jakub Jelinek <jakub@redhat.com>
40
41 * c-parser.c (omp_split_clauses): Pass C_ORT_OMP_TARGET instead of
42 C_ORT_OMP for clauses on target construct.
43 (OMP_TARGET_CLAUSE_MASK): Add in_reduction clause.
44 (c_parser_omp_target): For non-combined target add
45 map (always, tofrom:) clauses for OMP_CLAUSE_IN_REDUCTION. Pass
46 C_ORT_OMP_TARGET to c_finish_omp_clauses.
47 * c-typeck.c (handle_omp_array_sections): Adjust ort handling
48 for addition of C_ORT_OMP_TARGET and simplify, mapping clauses are
49 never present on C_ORT_*DECLARE_SIMD.
50 (c_finish_omp_clauses): Likewise. Handle OMP_CLAUSE_IN_REDUCTION
51 on C_ORT_OMP_TARGET, set OMP_CLAUSE_MAP_IN_REDUCTION on
52 corresponding map clauses.
53
2f080224
GA
542021-06-21 Jakub Jelinek <jakub@redhat.com>
55
56 PR inline-asm/100785
57 * c-typeck.c (c_mark_addressable): Diagnose trying to make
58 bit-fields addressable.
59
ede6c356
GA
602021-06-15 Robin Dapp <rdapp@linux.ibm.com>
61
62 * c-decl.c (merge_decls): Copy DECL_USER_ALIGN if DECL_ALIGN is
63 similar.
64
8dc48181
GA
652021-06-14 Tobias Burnus <tobias@codesourcery.com>
66
67 PR c/100913
68 * c-parser.c (c_parser_omp_clause_affinity): No need to set iterator
69 var in the error case.
70
438aac59
GA
712021-06-07 Eric Botcazou <ebotcazou@adacore.com>
72
73 PR c/100920
74 * c-typeck.c (convert_for_assignment): Test fndecl_built_in_p to
75 spot built-in functions.
76
7d6987e9
GA
772021-06-06 Jakub Jelinek <jakub@redhat.com>
78
79 PR c/100902
80 * c-parser.c (c_parser_omp_target): Call c_omp_adjust_map_clauses
81 even when target is combined with other constructs.
82
832021-06-06 Eric Botcazou <ebotcazou@adacore.com>
84
85 PR c/100920
86 * c-decl.c (finish_struct): Fix thinko in previous change.
87 * c-typeck.c (convert_for_assignment): Do not warn on pointer
88 assignment and initialization for storage order purposes if the
89 RHS is a call to a DECL_IS_MALLOC function.
90
600f90cb
GA
912021-06-04 Martin Sebor <msebor@redhat.com>
92
93 PR c/100783
94 * c-objc-common.c (print_type): Handle erroneous types.
95
440c8a0a
GA
962021-06-03 Jakub Jelinek <jakub@redhat.com>
97
98 PR c++/100859
99 * c-typeck.c (c_finish_omp_clauses): Move OMP_CLAUSE_AFFINITY
100 after depend only cases.
101
ee682192
GA
1022021-05-31 Richard Biener <rguenther@suse.de>
103
104 PR c++/88601
105 * c-decl.c (names_builtin_p): Handle RID_BUILTIN_SHUFFLEVECTOR.
106 * c-parser.c (c_parser_postfix_expression): Likewise.
107
48166757
GA
1082021-05-28 Richard Biener <rguenther@suse.de>
109
110 PR c/100803
111 * gimple-parser.c (c_parser_gimple_paren_condition): Diagnose
112 invalid if conditions.
113
1142021-05-28 Jakub Jelinek <jakub@redhat.com>
115
116 PR middle-end/99928
117 * c-typeck.c (handle_omp_array_sections): Copy OMP_CLAUSE_MAP_IMPLICIT.
118 (c_finish_omp_clauses): Move not just OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT
119 marked clauses last, but also OMP_CLAUSE_MAP_IMPLICIT. Add
120 map_firstprivate_head bitmap, set it for GOMP_MAP_FIRSTPRIVATE_POINTER
121 maps and silently remove OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT if it is
122 present too. For OMP_CLAUSE_MAP_IMPLICIT silently remove the clause
123 if present in map_head, map_field_head or map_firstprivate_head
124 bitmaps.
125
1262021-05-28 Tobias Burnus <tobias@codesourcery.com>
127
128 * c-parser.c (c_parser_omp_clause_affinity): New.
129 (c_parser_omp_clause_name, c_parser_omp_variable_list,
130 c_parser_omp_all_clauses, OMP_TASK_CLAUSE_MASK): Handle affinity clause.
131 * c-typeck.c (handle_omp_array_sections_1, handle_omp_array_sections,
132 c_finish_omp_clauses): Likewise.
133
01c59ef2
GA
1342021-05-26 Eric Botcazou <ebotcazou@adacore.com>
135
136 PR c/100653
137 * c-decl.c (finish_struct): Warn for a union containing an aggregate
138 field with a differing scalar storage order.
139
2832d51b
GA
1402021-05-21 Jakub Jelinek <jakub@redhat.com>
141
142 PR middle-end/99928
143 * c-typeck.c (c_finish_omp_clauses): Move firstprivate clauses with
144 OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT to the end of the chain. Don't error
145 if a decl is mentioned both in map clause and in such firstprivate
146 clause unless OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT_TARGET is also set.
147
65f32e5d
GA
1482021-05-19 Jakub Jelinek <jakub@redhat.com>
149
150 PR middle-end/99928
151 * c-parser.c (c_parser_omp_master): Set OMP_MASTER_COMBINED on
152 master when combined with taskloop.
153 (c_parser_omp_parallel): Don't set OMP_PARALLEL_COMBINED on
154 parallel master when not combined with taskloop.
155
a8daf9a1
GA
1562021-05-18 Richard Biener <rguenther@suse.de>
157
158 PR c/100522
159 * gimple-parser.c (c_parser_gimple_postfix_expression_after_primary):
160 Diagnose calls to non-functions.
161 (c_parser_gimple_statement): Diagnose unexpected assignment RHS.
162
a7ffc1ef
GA
1632021-05-17 Richard Biener <rguenther@suse.de>
164
165 PR c/100625
166 * gimple-parser.c (c_parser_gimple_label): Avoid building
167 a GIMPLE label with NULL label decl.
168
f9af11c7
GA
1692021-05-13 Martin Sebor <msebor@redhat.com>
170
171 PR c/100550
172 * c-decl.c (get_parm_array_spec): Avoid erroneous VLA bounds.
173
0ff3a0f2
GA
1742021-05-12 Marcel Vollweiler <marcel@codesourcery.com>
175
176 * c-parser.c (c_parser_omp_clause_map): Support map-type-modifier
177 'close'.
178
aa891c56
GA
1792021-05-10 Martin Liska <mliska@suse.cz>
180
181 * c-aux-info.c (affix_data_type): Use startswith
182 function instead of strncmp.
183 * c-typeck.c (build_function_call_vec): Likewise.
184 * gimple-parser.c (c_parser_gimple_parse_bb_spec): Likewise.
185
62d87a32
GA
1862021-05-07 Eric Botcazou <ebotcazou@adacore.com>
187
188 * c-typeck.c (build_unary_op) <ADDR_EXPR>: Do not issue an error
189 on the address of a pointer field in a record with reverse SSO.
190
99e8df7a
GA
1912021-05-04 Tobias Burnus <tobias@codesourcery.com>
192
193 * c-typeck.c (c_finish_omp_clauses): Accept float + complex
194 for || and && reductions.
195
3c8e539d
GA
1962021-04-29 Joseph Myers <joseph@codesourcery.com>
197
198 * c-typeck.c (function_types_compatible_p): For C2X, treat
199 unprototyped function as compatible with non-variadic prototyped
200 function even if some argument types are changed by the default
201 argument promotions.
202
ee351f7f
GA
2032021-04-15 Martin Sebor <msebor@redhat.com>
204
205 PR c/99420
206 PR c/99972
207 * c-decl.c (pushdecl): Always propagate type attribute.
208
2092021-04-15 Richard Sandiford <richard.sandiford@arm.com>
210
211 PR c/98852
212 * c-typeck.c (c_common_type): Do not drop attributes that
213 affect type identity.
214
1d54b138
GA
2152021-04-10 Jakub Jelinek <jakub@redhat.com>
216
217 PR c/99990
218 * c-decl.c (finish_decl): Don't overwrite TREE_TYPE of
219 error_mark_node.
220
4493b1c1
GA
2212021-03-25 Jakub Jelinek <jakub@redhat.com>
222
223 PR c++/99565
224 * c-typeck.c (build_conditional_expr): Pass OEP_ADDRESS_OF_SAME_FIELD
225 to operand_equal_p.
226
5f256a70
GA
2272021-03-19 Jakub Jelinek <jakub@redhat.com>
228
229 PR c/99588
230 * c-typeck.c (mark_exp_read): Recognize what build_atomic_assign
231 with modifycode NOP_EXPR produces and mark the _Atomic var as read
232 if found.
233 (build_atomic_assign): For modifycode of NOP_EXPR, use COMPOUND_EXPRs
234 rather than STATEMENT_LIST. Otherwise call mark_exp_read on lhs.
235 Set TREE_SIDE_EFFECTS on the TARGET_EXPR.
236
3c5b6d24
GA
2372021-03-15 Tobias Burnus <tobias@codesourcery.com>
238
239 PR c++/99509
240 * c-decl.c (finish_decl): For 'omp declare target implicit' vars,
241 ensure that the varpool node is marked as offloadable.
242
ceae9533
GA
2432021-03-05 Tobias Burnus <tobias@codesourcery.com>
244
245 PR c/99137
246 * c-parser.c (c_parser_oacc_clause_async): Reject comma expressions.
247
4028d01a
GA
2482021-02-24 Martin Sebor <msebor@redhat.com>
249
250 PR middle-end/97172
251 * c-decl.c (free_attr_access_data): Clear attribute arg spec.
252
bf81237e
GA
2532021-02-18 Jakub Jelinek <jakub@redhat.com>
254
255 PR c/99136
256 * c-typeck.c (c_finish_return): Don't wrap retval into
257 EXCESS_PRECISION_EXPR in functions that return void.
258
0c5cdb31
GA
2592021-02-11 Marek Polacek <polacek@redhat.com>
260
261 * c-parser.c (c_parser_if_statement): Use vec_free.
262
a19dd5e6
GA
2632021-02-04 Martin Sebor <msebor@redhat.com>
264
265 PR c/97882
266 * c-decl.c (locate_old_decl): Add type to diagnostic output.
267 (diagnose_mismatched_decls): Same.
268 (start_function): Introduce temporaries for better readability.
269 * c-typeck.c (comptypes_internal): Only consider complete enum
270 types in comparisons with integers.
271
f7884fb1
GA
2722021-02-01 Martin Sebor <msebor@redhat.com>
273
274 PR middle-end/97172
275 * c-decl.c (free_attr_access_data): New function.
276 (c_parse_final_cleanups): Call free_attr_access_data.
277
59cf67d1
GA
2782021-01-16 Kwok Cheung Yeung <kcy@codesourcery.com>
279
280 * c-parser.c (c_parser_omp_clause_detach): New.
281 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_DETACH clause.
282 (OMP_TASK_CLAUSE_MASK): Add mask for PRAGMA_OMP_CLAUSE_DETACH.
283 * c-typeck.c (c_finish_omp_clauses): Handle PRAGMA_OMP_CLAUSE_DETACH
284 clause. Prevent use of detach with mergeable and overriding the
285 data sharing mode of the event handle.
286
2f7f0d32
GA
2872021-01-15 Jakub Jelinek <jakub@redhat.com>
288
289 * c-typeck.c (c_finish_omp_clauses): For reduction build array with
290 unqualified element type and then call c_build_qualified_type on the
291 ARRAY_TYPE.
292
7d187e4f
GA
2932021-01-07 Richard Biener <rguenther@suse.de>
294
295 * gimple-parser.c (c_parser_gimple_compound_statement): Only
296 reallocate loop array if it is too small.
297
eefe499f
GA
2982020-12-16 Martin Uecker <muecker@gwdg.de>
299
300 PR c/98047
301 * c-typeck.c (build_modify_expr): Drop qualifiers.
302
3032020-12-16 Martin Uecker <muecker@gwdg.de>
304
305 PR c/98260
306 * c-parser.c (c_parser_expression): Look into
307 nop expression when marking expressions as read.
308
d52945ce
GA
3092020-12-14 Martin Liska <mliska@suse.cz>
310
311 PR sanitizer/98204
312 * c-typeck.c (pointer_diff): Do not emit a top-level
313 sanitization.
314 (build_binary_op): Likewise.
315
ca2bd949
GA
3162020-12-09 Tobias Burnus <tobias@codesourcery.com>
317
318 * c-parser.c (c_parser_omp_allocate): New.
319 (c_parser_omp_construct): Call it.
320
3212020-12-09 Richard Biener <rguenther@suse.de>
322
323 PR c/98200
324 * gimple-parser.c (c_parser_gimple_postfix_expression): Return
325 early on error.
326
bc8a7013
GA
3272020-12-07 Martin Uecker <muecker@gwdg.de>
328
329 PR c/97981
330 * c-typeck.c (convert_lvalue_to_rvalue): Move the code
331 that drops qualifiers to the end of the function.
332
d48df6f2
GA
3332020-11-26 Martin Uecker <muecker@gwdg.de>
334
335 PR c/65455
336 PR c/92935
337 * c-parser.c (c_parser_declaration_or_fndef): Remove
338 redundant code to drop qualifiers of _Atomic types for __auto_type.
339 (c_parser_typeof_specifier): Do not drop qualifiers of _Atomic
340 types for __typeof__.
341
1e2c9a27
GA
3422020-11-24 Jakub Jelinek <jakub@redhat.com>
343
344 PR c/97958
345 * c-parser.c (c_parser_binary_expression): For omp atomic binary
346 expressions, use make_node instead of build2 to avoid checking build2
347 performs.
348
8e6198d0
GA
3492020-11-23 Joseph Myers <joseph@codesourcery.com>
350
351 PR c/95630
352 * c-typeck.c (build_binary_op): Use pedwarn_c99 with OPT_Wpedantic
353 for comparisons of complete and incomplete pointers.
354
7a97e2fc
GA
3552020-11-21 Aaron Sawdey <acsawdey@linux.ibm.com>
356
357 * c-aux-info.c (gen_type): Support opaque types.
358
82e5048e
GA
3592020-11-20 Martin Sebor <msebor@redhat.com>
360
361 PR middle-end/97879
362 * c-decl.c (start_function): Set ATTR_FLAG_INTERNAL in flags.
363
3642020-11-20 Jakub Jelinek <jakub@redhat.com>
365
366 PR other/97911
367 * Make-lang.in (c.serial): Change from goal to a variable.
368 (.PHONY): Drop c.serial.
369
3702020-11-20 Martin Uecker <muecker@gwdg.de>
371
372 * c-typeck.c (convert_lvalue_to_rvalue): Drop qualifiers.
373
d62586ee
GA
3742020-11-19 Jakub Jelinek <jakub@redhat.com>
375
376 PR c/97860
377 * c-decl.c (get_parm_array_spec): Bail out of nelts is
378 error_operand_p.
379
25bb75f8
GA
3802020-11-18 Jakub Jelinek <jakub@redhat.com>
381
382 * Make-lang.in (c.serial): New goal.
383 (.PHONY): Add c.serial c.prev.
384 (cc1$(exeext)): Call LINK_PROGRESS.
385
77f67db2
GA
3862020-11-13 Vladimir N. Makarov <vmakarov@redhat.com>
387
388 * c-parser.c (c_parser_asm_statement): Parse outputs for asm
389 goto too.
390 * c-typeck.c (build_asm_expr): Remove an assert checking output
391 absence for asm goto.
392
3932020-11-13 Jakub Jelinek <jakub@redhat.com>
394
395 * c-typeck.c (c_finish_omp_clauses): Don't clear
396 OMP_CLAUSE_REDUCTION_INSCAN unless reduction_seen == -2.
397
3982020-11-13 Iain Sandoe <iain@sandoe.co.uk>
399
400 PR objc/77404
401 * c-parser.c (c_parser_objc_class_definition): Pass the
402 location of the class name to the interface declaration.
403
bb622641
GA
4042020-11-10 Strager Neds <strager.nds@gmail.com>
405
406 * c-decl.c (merge_decls): Use new overload of
407 set_decl_section_name.
408
4092020-11-10 Chung-Lin Tang <cltang@codesourcery.com>
410
411 * c-parser.c (c_parser_omp_target_data): Add use of
412 new c_omp_adjust_map_clauses function. Add GOMP_MAP_ATTACH_DETACH as
413 handled map clause kind.
414 (c_parser_omp_target_enter_data): Likewise.
415 (c_parser_omp_target_exit_data): Likewise.
416 (c_parser_omp_target): Likewise.
417 * c-typeck.c (handle_omp_array_sections): Adjust COMPONENT_REF case to
418 use GOMP_MAP_ATTACH_DETACH map kind for C_ORT_OMP region type.
419 (c_finish_omp_clauses): Adjust bitmap checks to allow struct decl and
420 same struct field access to co-exist on OpenMP construct.
421
2da7ee05
GA
4222020-11-07 Martin Uecker <muecker@gwdg.de>
423
424 * c-parser.c (c_parser_label): Implement mixing of labels and code.
425 (c_parser_all_labels): Likewise.
426
44cab2d8
GA
4272020-11-06 Iain Sandoe <iain@sandoe.co.uk>
428
429 * c-parser.c (c_parser_objc_at_property_declaration):
430 Improve parsing fidelity. Associate better location info
431 with @property attributes. Clean up the interface to
432 objc_add_property_declaration ().
433
4342020-11-06 Nathan Sidwell <nathan@acm.org>
435
436 * c-decl.c (diagnose_mismatched_decls): Rename
437 DECL_IS_BUILTIN->DECL_IS_UNDECLARED_BUILTIN.
438 (warn_if_shadowing, implicitly_declare, names_builtin_p)
439 (collect_source_refs): Likewise.
440 * c-typeck.c (inform_declaration, inform_for_arg)
441 (convert_for_assignment): Likewise.
442
4432020-11-06 Tobias Burnus <tobias@codesourcery.com>
444
445 * c-parser.c (c_parser_omp_atomic): Add openacc parameter and update
446 OpenACC matching.
447 (c_parser_omp_construct): Update call.
448
35c125cb
GA
4492020-11-04 Jakub Jelinek <jakub@redhat.com>
450
451 PR c++/97670
452 * c-typeck.c (c_finish_omp_clauses): Look through array reductions to
453 find underlying decl to clear in the aligned_head bitmap.
454
4552020-11-04 Joseph Myers <joseph@codesourcery.com>
456
457 * c-decl.c (handle_nodiscard_attribute): New.
458 (std_attribute_table): Add nodiscard.
459 * c-parser.c (c_parser_std_attribute): Expect argument to
460 nodiscard attribute to be a string. Do not special-case ignoring
461 nodiscard.
462 * c-typeck.c (maybe_warn_nodiscard): New.
463 (build_compound_expr, emit_side_effect_warnings): Call
464 maybe_warn_nodiscard.
465 (c_process_expr_stmt, c_finish_stmt_expr): Also call
466 emit_side_effect_warnings if warn_unused_result.
467
4f0606fe
GA
4682020-10-29 Asher Gordon <AsDaGo@posteo.net>
469
470 * c-typeck.c (free_all_tagged_tu_seen_up_to): Replace free
471 with XDELETE.
472 (finish_init): Likewise.
473 (pop_init_level): Likewise.
474
e93aae4a
GA
4752020-10-28 Joseph Myers <joseph@codesourcery.com>
476
477 * c-decl.c (store_parm_decls_newstyle): Use pedwarn_c11 not
478 error_at for omitted parameter name.
479
4802020-10-28 Jakub Jelinek <jakub@redhat.com>
481
482 * c-parser.c (c_parser_omp_clause_name): Handle allocate.
483 (c_parser_omp_clause_allocate): New function.
484 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_ALLOCATE.
485 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
486 OMP_PARALLEL_CLAUSE_MASK, OMP_SINGLE_CLAUSE_MASK,
487 OMP_TASK_CLAUSE_MASK, OMP_TASKGROUP_CLAUSE_MASK,
488 OMP_DISTRIBUTE_CLAUSE_MASK, OMP_TEAMS_CLAUSE_MASK,
489 OMP_TARGET_CLAUSE_MASK, OMP_TASKLOOP_CLAUSE_MASK): Add
490 PRAGMA_OMP_CLAUSE_ALLOCATE.
491 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_ALLOCATE.
492
89bb01e7
GA
4932020-10-27 Joseph Myers <joseph@codesourcery.com>
494
495 * c-parser.c (c_parser_std_attribute_specifier): Allow duplicate
496 standard attributes.
497
efe71fcc
GA
4982020-10-23 Marek Polacek <polacek@redhat.com>
499
500 PR c++/91741
501 * c-parser.c (c_parser_binary_expression): Implement -Wsizeof-array-div.
502 (c_parser_postfix_expression): Set PAREN_SIZEOF_EXPR.
503 (c_parser_expr_list): Handle PAREN_SIZEOF_EXPR like SIZEOF_EXPR.
504 * c-tree.h (char_type_p): Declare.
505 * c-typeck.c (char_type_p): No longer static.
506
5072020-10-23 Martin Sebor <msebor@redhat.com>
508
509 PR middle-end/97552
510 * c-decl.c (get_parm_array_spec): Handle static VLA parameters.
511
2fe5b7d1
GA
5122020-09-19 Martin Sebor <msebor@redhat.com>
513
514 PR c/50584
515 * c-decl.c (lookup_last_decl): Define new function.
516 (c_decl_attributes): Call it.
517 (start_decl): Add argument and use it.
518 (finish_decl): Call build_attr_access_from_parms and decl_attributes.
519 (get_parm_array_spec): Define new function.
520 (push_parm_decl): Call get_parm_array_spec.
521 (start_function): Call warn_parm_array_mismatch. Build attribute
522 access and add it to current function.
523 * c-parser.c (c_parser_declaration_or_fndef): Diagnose mismatches
524 in forms of array parameters.
525 * c-tree.h (start_decl): Add argument.
526
5272020-09-19 Sandra Loosemore <sandra@codesourcery.com>
528
529 * c-decl.c (c_break_label, c_cont_label): Delete, and replace
530 with...
531 (in_statement): New.
532 (start_function): Adjust for above change.
533 (c_push_function_context, c_pop_function_context): Likewise.
534 * c-lang.h (struct language_function): Likewise.
535 * c-objc-common.h (LANG_HOOKS_BLOCK_MAY_FALLTHRU): Define.
536 * c-parser.c (objc_foreach_break_label, objc_foreach_continue_label):
537 New.
538 (c_parser_statement_after_labels): Adjust calls to c_finish_bc_stmt.
539 (c_parser_switch_statement): Adjust break/switch context handling
540 and calls to renamed functions.
541 (c_parser_while_statement): Adjust break/switch context handling and
542 build a WHILE_STMT.
543 (c_parser_do_statement): Ditto, with DO_STMT respectively.
544 (c_parser_for_statement): Ditto, with FOR_STMT respectively.
545 (c_parser_omp_for_loop): Adjust break/switch context handling.
546 * c-tree.h (c_break_label, c_cont_label): Delete.
547 (IN_SWITCH_STMT, IN_ITERATION_STMT): Define.
548 (IN_OMP_BLOCK, IN_OMP_FOR, IN_OBJC_FOREACH): Define.
549 (in_statement, switch_statement_break_seen_p): Declare.
550 (c_start_case, c_finish_case): Renamed to...
551 (c_start_switch, c_finish_switch).
552 (c_finish_bc_stmt): Adjust arguments.
553 * c-typeck.c (build_function_call_vec): Don't try to print
554 statements with %qE format.
555 (struct c_switch): Rename switch_expr field to switch_stmt.
556 Add break_stmt_seen_p field.
557 (c_start_case): Rename to c_start_switch. Build a SWITCH_STMT
558 instead of a SWITCH_EXPR. Update for changes to struct c_switch.
559 (do_case): Update for changes to struct c_switch.
560 (c_finish_case): Rename to c_finish_switch. Update for changes to
561 struct c_switch and change of representation from SWITCH_EXPR to
562 SWITCH_STMT.
563 (c_finish_loop): Delete.
564 (c_finish_bc_stmt): Update to reflect changes to break/continue
565 state representation. Build a BREAK_STMT or CONTINUE_STMT instead
566 of a GOTO_EXPR except for objc foreach loops.
567
e1a4a8a0
GA
5682020-09-01 Jakub Jelinek <jakub@redhat.com>
569
570 PR c++/96867
571 * c-typeck.c (handle_omp_array_sections_1): Test C_ARRAY_PARAMETER
572 only on PARM_DECLs.
573
8f7ea26a
GA
5742020-08-28 Martin Sebor <msebor@redhat.com>
575
576 PR c/96596
577 * c-decl.c (match_builtin_function_types): Avoid dealing with erroneous
578 argument type.
579
8b394f01
GA
5802020-08-27 Martin Liska <mliska@suse.cz>
581
582 * gimple-parser.c (c_parser_gimple_compound_statement): Set exact argument of a vector
583 growth function to true.
584
db0f6efe
GA
5852020-08-25 Tobias Burnus <tobias@codesourcery.com>
586
587 PR c/96678
588 * c-typeck.c (handle_omp_array_sections_1): Talk about
589 array function parameter in the error message.
590
5c265693
GA
5912020-08-18 Jakub Jelinek <jakub@redhat.com>
592
593 PR c/96571
594 * c-parser.c (c_parser_generic_selection): Change match_found from bool
595 to int, holding index of the match. Call mark_exp_read on the selector
596 expression and on expressions other than the selected one.
597
4967ca2f
GA
5982020-08-01 Richard Sandiford <richard.sandiford@arm.com>
599
600 PR c/96377
601 * c-typeck.c (process_init_element): Split test for whether to
602 recurse into a record, union or array into...
603 (initialize_elementwise_p): ...this new function. Don't recurse
604 into a vector type if the initialization value is also a vector.
605
48cc2e46
GA
6062020-07-31 Richard Biener <rguenther@suse.de>
607
608 PR debug/96383
609 * c-objc-common.h (LANG_HOOKS_FINALIZE_EARLY_DEBUG):
610 Define to c_common_finalize_early_debug.
611
3ea9abca
GA
6122020-07-22 Tobias Burnus <tobias@codesourcery.com>
613
614 * c-parser.c (c_parser_omp_clause_hint): Require nonnegative hint clause.
615 (c_parser_omp_critical): Permit hint(0) clause without named critical.
616 (c_parser_omp_construct): Don't assert if error_mark_node is returned.
617
30430061
GA
6182020-07-21 Sunil K Pandey <skpgkp2@gmail.com>
619
620 PR target/95237
621 * c-decl.c (finish_decl): Call target hook
622 lower_local_decl_alignment to lower local decl alignment.
623
3f8ca9cb
GA
6242020-07-09 Julian Brown <julian@codesourcery.com>
625 Thomas Schwinge <thomas@codesourcery.com>
626
627 PR middle-end/95270
628 * c-typeck.c (c_finish_omp_clauses): Set OMP_CLAUSE_SIZE (bias) to zero
629 for standalone attach/detach clauses.
630
a82c4c4c 6312020-07-08 Eric Botcazou <ebotcazou@adacore.com>
50873cc5
GA
632
633 * c-typeck.c (convert_for_assignment): If -Wscalar-storage-order is
634 set, warn for conversion between pointers that point to incompatible
635 scalar storage orders.
636
f60ee68d
GA
6372020-07-07 Kaipeng Zhou <zhoukaipeng3@huawei.com>
638
639 * c-parser.c (c_parser_statement_after_labels): Pass correct
640 parameters to c_parser_do_statement.
641
56638b9b
GA
6422020-06-16 Jakub Jelinek <jakub@redhat.com>
643
644 * c-parser.c (c_parser_expr_no_commas): Save, clear and restore
645 c_in_omp_for.
646 (c_parser_omp_for_loop): Set c_in_omp_for around some calls to avoid
647 premature c_fully_fold. Defer explicit c_fully_fold calls to after
648 c_finish_omp_for.
649 * c-tree.h (c_in_omp_for): Declare.
650 * c-typeck.c (c_in_omp_for): Define.
651 (build_modify_expr): Avoid c_fully_fold if c_in_omp_for.
652 (digest_init): Likewise.
653 (build_binary_op): Likewise.
654
6552020-06-16 Jakub Jelinek <jakub@redhat.com>
656
657 * c-parser.c (c_parser_omp_clause_schedule): Reject modifier separated
658 from kind by comma rather than colon.
659
1a59f3db
GA
6602020-06-05 Mark Wielaard <mark@klomp.org>
661
662 * c-decl.c (implicit_decl_warning): When warned and olddecl is
663 an undeclared builtin, then add a fixit header hint, if found.
664 (implicitly_declare): Add OPT_Wbuiltin_declaration_mismatch to
665 warning_at about implicit builtin declaration type mismatch.
666
9a5b7438
GA
6672020-06-03 Mark Wielaard <mark@klomp.org>
668
669 * c-parser.c (struct c_parser): Add seen_string_literal
670 bitfield.
671 (c_parser_consume_token): Reset seen_string_literal.
672 (c_parser_error_richloc): Add name_hint if seen_string_literal
673 and next token is a CPP_NAME and we have a missing header
674 suggestion for the name.
675 (c_parser_string_literal): Set seen_string_literal.
676
6772020-06-03 Mark Wielaard <mark@klomp.org>
678
679 * c-parser.c (c_parser_postfix_expression_after_primary): Add
680 scope with matching_parens after CPP_OPEN_PAREN.
681
6822020-06-03 Tobias Burnus <tobias@codesourcery.com>
683
684 * c-objc-common.h (LANG_HOOKS_OMP_PREDETERMINED_MAPPING): Redefine.
685
53ffb43a
GA
6862020-05-28 Nicolas Bértolo <nicolasbertolo@gmail.com>
687
688 * Make-lang.in: Remove extra slash.
689
8f66f175
ML
6902020-05-19 Martin Liska <mliska@suse.cz>
691
692 * c-parser.c: Fix typo.
693
49ddde69
JJ
6942020-05-14 Jakub Jelinek <jakub@redhat.com>
695
696 * c-parser.c (c_parser_omp_target): Set cfun->has_omp_target.
697
eb72dc66
RB
6982020-05-07 Richard Biener <rguenther@suse.de>
699
700 PR middle-end/94703
701 * gimple-parser.c (c_parser_parse_ssa_name): Do not set
702 DECL_GIMPLE_REG_P.
703
bf915591
JJ
7042020-04-30 Jakub Jelinek <jakub@redhat.com>
705
706 PR c/94842
707 * c-decl.c (set_labels_context_r): In addition to context-less
708 LABEL_DECLs adjust also LABEL_DECLs with context equal to
709 parent function if any.
710 (store_parm_decls): Adjust comment.
711
e1113ffb
JJ
7122020-04-19 Jakub Jelinek <jakub@redhat.com>
713
714 PR objc/94637
715 * c-parser.c (c_parser_objc_selector_arg): Handle CPP_SCOPE like
716 two CPP_COLON tokens.
717
2e389749
JJ
7182020-04-17 Jakub Jelinek <jakub@redhat.com>
719
720 PR other/94629
721 * c-parser.c (c_parser_oacc_routine): Remove redundant assignment
722 to data.clauses.
723
2dc9294c
JJ
7242020-04-15 Jakub Jelinek <jakub@redhat.com>
725
726 PR c/94593
727 * c-parser.c (c_parser_pragma) <case PRAGMA_OMP_REQUIRES>: Reject
728 requires directive when not at file scope.
729
13e41d8b
TB
7302020-04-08 Tobias Burnus <tobias@codesourcery.com>
731
732 PR middle-end/94120
733 * c-decl.c (c_check_in_current_scope): New function.
734 * c-tree.h (c_check_in_current_scope): Declare it.
735 * c-parser.c (c_parser_oacc_declare): Add check that variables
736 are declared in the same scope as the directive. Fix handling
737 of namespace vars.
738
4df50a05
JJ
7392020-04-07 Jakub Jelinek <jakub@redhat.com>
740
741 PR c++/94512
742 * c-parser.c (c_parser_omp_parallel): Set OMP_PARALLEL_COMBINED
743 if c_parser_omp_master succeeded.
744
5db9e893
JJ
7452020-03-23 Jakub Jelinek <jakub@redhat.com>
746
747 PR gcov-profile/94029
748 PR c/94239
749 * c-parser.c (c_parser_declaration_or_fndef): Initialize endloc to
750 the function_start_locus location. Don't do that afterwards for the
751 __GIMPLE body parsing.
752
9def91e9
JJ
7532020-03-19 Jakub Jelinek <jakub@redhat.com>
754
755 PR gcov-profile/94029
756 * c-tree.h (finish_function): Add location_t argument defaulted to
757 input_location.
758 * c-parser.c (c_parser_compound_statement): Add endlocp argument and
759 set it to the locus of closing } if non-NULL.
760 (c_parser_compound_statement_nostart): Return locus of closing }.
761 (c_parser_parse_rtl_body): Likewise.
762 (c_parser_declaration_or_fndef): Propagate locus of closing } to
763 finish_function.
764 * c-decl.c (finish_function): Add end_loc argument, use it instead of
765 input_location to set function_end_locus.
766
046c5890
JJ
7672020-03-17 Jakub Jelinek <jakub@redhat.com>
768
769 PR c/94172
770 * c-tree.h (C_TYPE_INCOMPLETE_VARS): Define to TYPE_LANG_SLOT_1
771 instead of TYPE_VFIELD, and support it on {RECORD,UNION,ENUMERAL}_TYPE.
772 (TYPE_ACTUAL_ARG_TYPES): Check that it is only used on FUNCTION_TYPEs.
773 * c-decl.c (pushdecl): Push C_TYPE_INCOMPLETE_VARS also to
774 ENUMERAL_TYPEs.
775 (finish_incomplete_vars): New function, moved from finish_struct. Use
776 relayout_decl instead of layout_decl.
777 (finish_struct): Remove obsolete comment about C_TYPE_INCOMPLETE_VARS
778 being TYPE_VFIELD. Use finish_incomplete_vars.
779 (finish_enum): Clear C_TYPE_INCOMPLETE_VARS. Call
780 finish_incomplete_vars.
781 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
782 also on ENUMERAL_TYPEs.
783
c015ff8c
JJ
7842020-03-16 Jakub Jelinek <jakub@redhat.com>
785
786 PR c/94179
787 * c-fold.c (c_fully_fold_internal): Handle MEM_REF.
788
f2e9fe5f
MS
7892020-03-13 Martin Sebor <msebor@redhat.com>
790
791 PR c/94040
792 * c-decl.c (builtin_structptr_type_count): New constant.
793 (match_builtin_function_types): Reject decls that are incompatible
794 in types pointed to by pointers.
795 (diagnose_mismatched_decls): Adjust comments.
796
c9d70946
JM
7972020-03-05 Joseph Myers <joseph@codesourcery.com>
798
799 PR c/93577
800 * c-typeck.c (pop_init_level): Do not diagnose initializers as
801 empty when initialized type is error_mark_node.
802 (set_designator, process_init_element): Ignore initializers for
803 elements of a variable-size type or of error_mark_node.
804
726e292d
MS
8052020-03-01 Martin Sebor <msebor@redhat.com>
806
807 PR middle-end/93926
808 * c-decl.c (types_close_enough_to_match): New function.
809 (match_builtin_function_types):
810 (diagnose_mismatched_decls): Add missing inform call to a warning.
811
a499c2f8
MS
8122020-03-01 Martin Sebor <msebor@redhat.com>
813
814 PR c/93812
815 * c-typeck.c (build_functype_attribute_variant): New function.
816 (composite_type): Call it.
817
9c3da8cc
JJ
8182020-02-25 Jakub Jelinek <jakub@redhat.com>
819
820 PR other/93912
821 * gimple-parser.c (c_parser_gimple_parse_bb_spec_edge_probability):
822 Rename last argument from probablity to probability.
823
bacdd5e9
JJ
8242020-02-13 Jakub Jelinek <jakub@redhat.com>
825
826 PR c/93576
827 * c-decl.c (grokdeclarator): If this_size_varies, only push size into
828 *expr if it has side effects.
829
f9eb0973
JL
8302020-01-30 Jeff Law <law@redhat.com>
831
832 PR c/88660
833 * c-parser.c (c_parser_switch_statement): Make sure to request
834 marking the switch expr as used.
835
ac68e287
JM
8362020-01-22 Joseph Myers <joseph@codesourcery.com>
837
838 PR c/93348
839 * c-typeck.c (build_c_cast): Call remove_c_maybe_const_expr on
840 argument with integer operands.
841
852f0ae8
KK
8422020-01-16 Kerem Kat <keremkat@gmail.com>
843
844 PR c/92833
845 * c-parser.c (c_parser_consume_token): Fix peeked token stack pop
846 to support 4 available tokens.
847
e2346a33
JM
8482020-01-15 Joseph Myers <joseph@codesourcery.com>
849
850 PR c/93072
851 * c-decl.c (pushdecl): Use TREE_PUBLIC, not DECL_EXTERNAL, to
852 determine whether to set DECL_CONTEXT.
853
3d77686d
JM
8542020-01-13 Joseph Myers <joseph@codesourcery.com>
855
856 PR c/93241
857 * c-typeck.c (build_c_cast): Check for expressions with integer
858 operands that can occur in an unevaluated part of an integer
859 constant expression and call note_integer_operands as needed.
860
f74c4b2c
RB
8612019-01-08 Richard Biener <rguenther@suse.de>
862
863 PR middle-end/93199
864 * gimple-parser.c (c_parser_parse_gimple_body): Remove __PHI IFN
865 permanently.
866
8d9254fc
JJ
8672020-01-01 Jakub Jelinek <jakub@redhat.com>
868
869 Update copyright years.
870
39292e25
EB
8712019-12-20 Eric Botcazou <ebotcazou@adacore.com>
872
873 * c-decl.c (collect_source_ref_cb): Delete.
874 (for_each_global_decl): Rename into...
875 (collect_source_refs): ...this. Call collect_source_ref directly.
876 (c_parse_final_cleanups): Always call collect_source_ref on the main
877 input filename.
878
519d7496
JB
8792019-12-19 Julian Brown <julian@codesourcery.com>
880 Cesar Philippidis <cesar@codesourcery.com>
881
882 * c-parser.c (c_parser_omp_clause_name): Add parsing of attach and
883 detach clauses.
884 (c_parser_omp_variable_list): Add ALLOW_DEREF optional parameter.
885 Allow deref (->) in variable lists if true.
886 (c_parser_omp_var_list_parens): Add ALLOW_DEREF optional parameter.
887 Pass to c_parser_omp_variable_list.
888 (c_parser_oacc_data_clause): Support attach and detach clauses. Update
889 call to c_parser_omp_variable_list.
890 (c_parser_oacc_all_clauses): Support attach and detach clauses.
891 (OACC_DATA_CLAUSE_MASK, OACC_ENTER_DATA_CLAUSE_MASK,
892 OACC_KERNELS_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK,
893 OACC_SERIAL_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_ATTACH.
894 (OACC_EXIT_DATA_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_DETACH.
895 * c-typeck.c (handle_omp_array_sections_1): Reject subarrays for attach
896 and detach. Support deref.
897 (handle_omp_array_sections): Use GOMP_MAP_ATTACH_DETACH instead of
898 GOMP_MAP_ALWAYS_POINTER for OpenACC.
899 (c_oacc_check_attachments): New function.
900 (c_finish_omp_clauses): Check attach/detach arguments for being
901 pointers using above. Support deref.
902
a6163563
JB
9032019-12-19 Julian Brown <julian@codesourcery.com>
904 Maciej W. Rozycki <macro@codesourcery.com>
905 Tobias Burnus <tobias@codesourcery.com>
906 Thomas Schwinge <thomas@codesourcery.com>
907
908 * c-parser.c (c_parser_omp_clause_name): Support no_create.
909 (c_parser_oacc_data_clause): Likewise.
910 (c_parser_oacc_all_clauses): Likewise.
911 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
912 (OACC_PARALLEL_CLAUSE_MASK, OACC_SERIAL_CLAUSE_MASK): Add
913 PRAGMA_OACC_CLAUSE_NO_CREATE.
914 * c-typeck.c (handle_omp_array_sections): Support
915 GOMP_MAP_NO_ALLOC.
916
d68f5d45
DM
9172019-12-09 David Malcolm <dmalcolm@redhat.com>
918
919 * c-objc-common.c (range_label_for_type_mismatch::get_text):
920 Replace label_text ctor calls.
921
4691bf46
JM
9222019-12-04 Joseph Myers <joseph@codesourcery.com>
923
924 PR c/36941
925 PR c/88827
926 * c-typeck.c (convert_lvalue_to_rvalue): Call
927 require_complete_type for arguments not of void types.
928 (build_indirect_ref): Do not diagnose dereferencing pointers to
929 incomplete types.
930 * c-tree.h (C_TYPE_ERROR_REPORTED): Remove.
931
85d11957
JM
9322019-12-03 Joseph Myers <joseph@codesourcery.com>
933
934 PR c/88704
935 * c-decl.c (store_parm_decls_oldstyle): Diagnose use of [*] in
936 old-style parameter definitions.
937
4569f8b3
SL
9382019-12-01 Sandra Loosemore <sandra@codesourcery.com>
939
940 PR target/92499
941
942 * c-decl.c (flexible_array_type_p): Move to common code.
943
65ef05d0
RS
9442019-11-30 Richard Sandiford <richard.sandiford@arm.com>
945
946 * c-decl.c (start_decl): Allow initialization of variables whose
947 size is a POLY_INT_CST.
948 (finish_decl): Use verify_type_context to check whether the target
949 allows variables with a particular type to have static or thread-local
950 storage duration. Don't raise a second error if such variables do
951 not have a constant size.
952 (grokdeclarator): Use verify_type_context to check whether the
953 target allows fields or array elements to have a particular type.
954 * c-typeck.c (pointer_diff): Use verify_type_context to test whether
955 the target allows pointer difference for the types involved.
956 (build_unary_op): Likewise for pointer increment and decrement.
957
34b43828
JM
9582019-11-29 Joseph Myers <joseph@codesourcery.com>
959
960 * c-parser.c (struct c_parser): Add members raw_tokens and
961 raw_tokens_used.
962 (c_lex_one_token): Add argument raw. Handle lexing raw tokens and
963 using previously-lexed raw tokens.
964 (c_parser_peek_nth_token_raw)
965 (c_parser_check_balanced_raw_token_sequence): New functions.
966 (c_parser_nth_token_starts_std_attributes): Use
967 c_parser_check_balanced_raw_token_sequence for Objective-C.
968
5b8d9367
JM
9692019-11-25 Joseph Myers <joseph@codesourcery.com>
970
971 PR c/91985
972 * c-decl.c (finish_declspecs): Use int instead of decimal
973 floating-point types if decimal floating-point not supported.
974
1723e1be
JM
9752019-11-25 Joseph Myers <joseph@codesourcery.com>
976
977 * c-tree.h (struct c_declarator): Use a structure for id member.
978 * c-decl.c (grokdeclarator): Extract attributes from cdk_id
979 declarators at the start, not when handling individual declarators
980 later. Use u.id.id instead of u.id.
981 (grokfield): Use u.id.id instead of u.id.
982 (build_id_declarator): Set u.id.id and u.id.attrs.
983 (finish_declspecs): Handle postfix attributes in case of typedef
984 name or typeof used.
985 * c-parser.c (c_parser_direct_declarator)
986 (c_parser_direct_declarator_inner): Place declarator for
987 attributes inside that for function or array, not outside. Set
988 u.id.attrs for identifiers.
989 (c_parser_parameter_declaration): Use u.id.id instead of u.id.
990 * gimple-parser.c (c_parser_gimple_declaration): Use u.id.id
991 instead of u.id.
992
bdaf8be1
JJ
9932019-11-22 Jakub Jelinek <jakub@redhat.com>
994
995 PR c/90677
996 * c-decl.c (identifier_global_tag): Define.
997
3e00ba47
RB
9982019-11-20 Richard Biener <rguenther@suse.de>
999
1000 PR c/92088
1001 * c-decl.c (grokdeclarator): Prevent inlining of nested
1002 function with VLA arguments.
1003
8c5b727a
JM
10042019-11-20 Joseph Myers <joseph@codesourcery.com>
1005
1006 * c-decl.c (c_warn_type_attributes): New function.
1007 (groktypename, grokdeclarator, finish_declspecs): Call
1008 c_warn_type_attributes before applying attributes to types.
1009 * c-tree.h (c_warn_type_attributes): Declare.
1010
192961ff
JM
10112019-11-19 Joseph Myers <joseph@codesourcery.com>
1012
1013 * c-decl.c (c_warn_unused_attributes): Use pedwarn not warning for
1014 standard attributes.
1015 * c-parser.c (c_parser_std_attribute): Take argument for_tm. Use
1016 pedwarn for unknown standard attributes and return error_mark_node
1017 for them.
1018
20a38017
MM
10192019-11-18 Matthew Malcomson <matthew.malcomson@arm.com>
1020
1021 * c-parser.c (c_parser_parse_rtl_body): Always call
1022 run_rtl_passes, even if startwith pass is not provided.
1023
d5fbe5e0
JM
10242019-11-15 Joseph Myers <joseph@codesourcery.com>
1025
1026 * c-parser.c (c_parser_std_attribute_specifier): Diagnose
1027 duplicate standard attributes.
1028
97cc1187
JM
10292019-11-15 Joseph Myers <joseph@codesourcery.com>
1030
1031 * c-decl.c (std_attribute_table): Add maybe_unused.
1032
f8aea5e3
JM
10332019-11-15 Joseph Myers <joseph@codesourcery.com>
1034
1035 * c-decl.c (std_attribute_table): Add fallthrough.
1036 * c-parser.c (c_parser_declaration_or_fndef): Diagnose fallthrough
1037 attribute at top level.
1038
2cc94aa8
JM
10392019-11-15 Joseph Myers <joseph@codesourcery.com>
1040
1041 * c-decl.c (std_attribute_table): New.
1042 (c_init_decl_processing): Register attributes from
1043 std_attribute_table.
1044 * c-parser.c (c_parser_attribute_arguments): Add arguments
1045 require_string and allow_empty_args. All callers changed.
1046 (c_parser_std_attribute): Set require_string argument for
1047 "deprecated" attribute.
1048
7c5890cc
JM
10492019-11-14 Joseph Myers <joseph@codesourcery.com>
1050
1051 * c-parser.c (c_parser_postfix_expression)
1052 (c_parser_check_literal_zero): Handle CPP_UTF8CHAR.
1053 * gimple-parser.c (c_parser_gimple_postfix_expression): Likewise.
1054
e8738f4e
RS
10552019-11-14 Richard Sandiford <richard.sandiford@arm.com>
1056
1057 * c-typeck.c (build_conditional_expr): Use truth_type_for instead
1058 of build_same_sized_truth_vector_type.
1059 (build_vec_cmp): Likewise.
1060
b2417b59
JJ
10612019-11-14 Jakub Jelinek <jakub@redhat.com>
1062
bedb7f04
JJ
1063 * c-parser.c (c_parser_omp_context_selector): Don't require score
1064 argument to fit into shwi, just to be INTEGER_CST. Diagnose
1065 negative score.
1066
b2417b59
JJ
1067 * c-parser.c (c_parser_omp_context_selector): Rename
1068 CTX_PROPERTY_IDLIST to CTX_PROPERTY_NAME_LIST, add CTX_PROPERTY_ID.
1069 Use CTX_PROPERTY_ID for atomic_default_mem_order, only allow a single
1070 identifier in that. For CTX_PROPERTY_NAME_LIST, allow identifiers
1071 and string literals.
1072
4e03c3a7
JM
10732019-11-14 Joseph Myers <joseph@codesourcery.com>
1074
1075 * c-tree.h (enum c_typespec_kind): Add ctsk_tagref_attrs and
1076 ctsk_tagfirstref_attrs.
1077 (struct c_declspecs): Update description of attrs. Add
1078 postfix_attrs and non_std_attrs_seen_p. Increase size of
1079 typespec_kind bit-field.
1080 (c_warn_unused_attributes): New declaration.
1081 (parser_xref_tag): Update prototype.
1082 * c-decl.c (c_warn_unused_attributes): New function.
1083 (shadow_tag_warned): Handle ctsk_tagfirstref_attrs and
1084 ctsk_tagref_attrs. Handle attribute declarations.
1085 (check_compound_literal_type): Handle ctsk_tagfirstref_attrs.
1086 (grokdeclarator): Handle standard attributes.
1087 (parser_xref_tag): Add arguments have_std_attrs and attrs. Apply
1088 attributes to incomplete type reference.
1089 (xref_tag): Update call to parser_xref_tag.
1090 (declspecs_add_addrspace, declspecs_add_type)
1091 (declspecs_add_scspec, declspecs_add_attrs): Set
1092 non_std_attrs_seen_p.
1093 (finish_declspecs): Apply postfix standard attributes to type.
1094 * c-parser.c (c_token_starts_declspecs)
1095 (c_token_starts_declaration, c_parser_next_token_starts_declspecs)
1096 (c_parser_next_tokens_start_declaration): Update comments.
1097 (c_parser_consume_token, c_parser_consume_pragma): Handle moving
1098 parser->tokens[2] to parser->tokens[1].
1099 (c_parser_nth_token_starts_std_attributes)
1100 (c_parser_std_attribute_specifier_sequence): New functions.
1101 (c_parser_declaration_or_fndef): Add arguments have_attrs and
1102 attrs. All callers changed. Handle standard attributes.
1103 (c_parser_parms_declarator, c_parser_parms_list_declarator)
1104 (c_parser_parameter_declaration): Add argument have_gnu_attrs.
1105 All callers changed.
1106 (c_parser_declspecs): Add arguments start_std_attr_ok and
1107 end_std_attr_ok. All callers changed. Handle standard
1108 attributes.
1109 (c_parser_enum_specifier, c_parser_struct_or_union_specifier)
1110 (c_parser_direct_declarator, c_parser_direct_declarator_inner)
1111 (c_parser_compound_statement_nostart, c_parser_all_labels)
1112 (c_parser_label, c_parser_statement, c_parser_for_statement):
1113 Handle standard attributes.
1114 * c-parser.h (c_parser_declspecs): Update prototype.
1115 * gimple-parser.c (c_parser_gimple_declaration): Update call to
1116 c_parser_declspecs.
1117
0c29cac4
ML
11182019-11-12 Martin Liska <mliska@suse.cz>
1119
1120 * gimple-parser.c: Do not include params.h.
1121
028d4092
ML
11222019-11-12 Martin Liska <mliska@suse.cz>
1123
1124 * gimple-parser.c (c_parser_parse_gimple_body): Replace old parameter syntax
1125 with the new one, include opts.h if needed. Use SET_OPTION_IF_UNSET
1126 macro.
1127
62aee289
MR
11282019-11-12 Maciej W. Rozycki <macro@codesourcery.com>
1129 Frederik Harwath <frederik@codesourcery.com>
1130
1131 gcc/c/
1132 * c-parser.c (OACC_SERIAL_CLAUSE_MASK): New macro.
1133 (c_parser_oacc_kernels_parallel): Rename function to...
1134 (c_parser_oacc_compute): ... this. Handle PRAGMA_OACC_SERIAL.
1135 (c_parser_omp_construct): Update accordingly.
1136
1137
7cec9588
JJ
11382019-11-11 Jakub Jelinek <jakub@redhat.com>
1139
1140 * c-parser.c (c_parser_translation_unit): Diagnose declare target
1141 without corresponding end declare target.
1142
f486280c
RS
11432019-11-08 Richard Sandiford <richard.sandiford@arm.com>
1144
1145 * c-convert.c (convert): Only handle vector conversions if one of
1146 the types satisfies gnu_vector_type_p or if -flax-vector-conversions
1147 allows it.
1148 * c-typeck.c (build_array_ref): Only allow vector indexing if the
1149 vectors satisfy gnu_vector_type_p.
1150 (build_unary_op): Only allow unary operators to be applied to
1151 vectors if they satisfy gnu_vector_type_p.
1152 (digest_init): Only allow by-element initialization of vectors
1153 if they satisfy gnu_vector_type_p.
1154 (really_start_incremental_init): Likewise.
1155 (push_init_level): Likewise.
1156 (pop_init_level): Likewise.
1157 (process_init_element): Likewise.
1158 (build_binary_op): Only allow binary operators to be applied to
1159 vectors if they satisfy gnu_vector_type_p.
1160
017c6491
JM
11612019-11-08 Joseph Myers <joseph@codesourcery.com>
1162
1163 * c-decl.c (grokparms): Convert () in a function definition to
1164 (void) for C2x.
1165 (store_parm_decls_oldstyle): Pedwarn for C2x.
1166 (store_parm_decls): Update comment about () not generating a
1167 prototype.
1168
c01bd174
JM
11692019-11-07 Joseph Myers <joseph@codesourcery.com>
1170
1171 * c-parser.c (c_parser_attribute_arguments): New function.
1172 Factored out of c_parser_gnu_attribute.
1173 (c_parser_gnu_attribute): Use c_parser_attribute_arguments.
1174 (c_parser_balanced_token_sequence, c_parser_std_attribute)
1175 (c_parser_std_attribute_specifier): New functions.
1176 (c_parser_transaction_attributes): Use
1177 c_parser_std_attribute_specifier.
1178
471c5330
JM
11792019-11-07 Joseph Myers <joseph@codesourcery.com>
1180
1181 * c-parser.c (c_parser): Remove lex_untranslated_string. Add
1182 lex_joined_string and translate_strings_p.
1183 (c_lex_one_token): Pass 0 or C_LEX_STRING_NO_JOIN to
1184 c_lex_with_flags.
1185 (c_parser_string_literal): New function.
1186 (c_parser_static_assert_declaration_no_semi): Use
1187 c_parser_string_literal. Do not set lex_untranslated_string.
1188 (c_parser_asm_string_literal): Use c_parser_string_literal.
1189 (c_parser_simple_asm_expr): Do not set lex_untranslated_string.
1190 (c_parser_gnu_attributes): Set and restore translate_strings_p
1191 instead of lex_untranslated_string.
1192 (c_parser_asm_statement): Do not set lex_untranslated_string.
1193 (c_parser_asm_operands): Likewise.
1194 (c_parser_has_attribute_expression): Set and restore
1195 translate_strings_p instead of lex_untranslated_string.
1196 (c_parser_postfix_expression): Use c_parser_string_literal.
1197 (pragma_lex): Likewise.
1198 (c_parser_pragma_pch_preprocess): Set lex_joined_string.
1199 (c_parse_file): Set translate_strings_p.
1200 * gimple-parser.c (c_parser_gimple_postfix_expression)
1201 (c_parser_gimple_or_rtl_pass_list): Use c_parser_string_literal.
1202 * c-parser.c (c_parser_string_literal): Declare function.
1203
d0c464d2
JJ
12042019-11-02 Jakub Jelinek <jakub@redhat.com>
1205
1206 * c-parser.c (c_finish_omp_declare_variant): Use
1207 omp_get_context_selector instead of c_omp_get_context_selector.
1208
ac2cfa6c
RS
12092019-10-29 Richard Sandiford <richard.sandiford@arm.com>
1210
1211 * c-tree.h (c_simulate_enum_decl): Declare.
1212 * c-decl.c (c_simulate_enum_decl): New function.
1213 * c-objc-common.h (LANG_HOOKS_SIMULATE_ENUM_DECL): Define to the above.
1214
74078538
RS
12152019-10-29 Richard Sandiford <richard.sandiford@arm.com>
1216
1217 * c-tree.h (c_simulate_builtin_function_decl): Declare.
1218 * c-decl.c (c_simulate_builtin_function_decl): New function.
1219 * c-objc-common.h (LANG_HOOKS_SIMULATE_BUILTIN_FUNCTION_DECL): Define
1220 to the above.
1221
ad1539d5
MS
12222019-10-28 Martin Sebor <msebor@redhat.com>
1223
1224 PR c/66970
1225 * c-decl.c (names_builtin_p): Define a new function.
1226
cb73e4e7
RB
12272019-10-28 Richard Biener <rguenther@suse.de>
1228
1229 PR c/92249
1230 * gimple-parser.c (c_parser_parse_gimple_body): Make
1231 current_bb the entry block initially to easier recover
1232 from errors.
1233 (c_parser_gimple_compound_statement): Adjust.
1234
135df52c
JJ
12352019-10-24 Jakub Jelinek <jakub@redhat.com>
1236
1237 * c-parser.c (c_finish_omp_declare_variant): Use
1238 omp_context_selector_matches instead of
1239 c_omp_context_selector_matches.
1240 * c-decl.c (c_decl_attributes): Add "omp declare target block"
1241 attribute in between declare target and end declare target
1242 pragmas.
1243
783bfe5e
JM
12442019-10-15 Joseph Myers <joseph@codesourcery.com>
1245
1246 * c-parser.c (c_parser_attribute_any_word): Rename to
1247 c_parser_gnu_attribute_any_word. All callers changed.
1248 (c_parser_attribute): Rename to c_parser_gnu_attribute. All
1249 callers changed.
1250 (c_parser_attributes): Rename to c_parser_gnu_attributes. All
1251 callers changed.
1252 (c_parser_declaration_or_fndef, c_parser_declspecs)
1253 (c_parser_enum_specifier, c_parser_struct_or_union_specifier)
1254 (c_parser_struct_declaration, c_parser_declarator)
1255 (c_parser_gnu_attribute, c_parser_compound_statement)
1256 (c_parser_label, c_parser_statement, c_parser_objc_method_decl)
1257 (c_parser_transaction_attributes): Add "gnu-" prefix to names of
1258 attribute-related syntax productions.
1259
56898e43
RS
12602019-10-14 Richard Sandiford <richard.sandiford@arm.com>
1261
1262 * c-objc-common.c (useful_aka_type_p): Replace with...
1263 (get_aka_type): ...this new function. Given the original type,
1264 decide which aka type to print (if any). Only look through typedefs
1265 if user_facing_original_type_p.
1266 (print_type): Update accordingly.
1267
b9424661
JJ
12682019-10-14 Jakub Jelinek <jakub@redhat.com>
1269
1270 * c-parser.c (c_parser_omp_all_clauses): Change bool NESTED_P argument
1271 into int NESTED, if it is 2, diagnose missing commas in between
1272 clauses.
1273 (c_parser_omp_context_selector): Pass 2 as last argument to
1274 c_parser_omp_all_clauses.
1275
20de9568
JJ
12762019-10-12 Jakub Jelinek <jakub@redhat.com>
1277
1278 * c-parser.c (c_parser_omp_context_selector): Improve error recovery.
1279 For simd properties, put them directly into TREE_VALUE.
1280 (c_finish_omp_declare_variant): Call c_omp_mark_declare_variant.
1281 If c_omp_context_selector_matches is 0, don't add attribute, otherwise
1282 add "omp declare variant base" attribute rather than
1283 "omp declare variant".
1284
fe2bc27c
JM
12852019-10-11 Joseph Myers <joseph@codesourcery.com>
1286
1287 * c-decl.c (declspecs_add_type): Use pedwarn_c11 for DFP types.
1288
94e7f906
JJ
12892019-10-10 Jakub Jelinek <jakub@redhat.com>
1290
1291 * c-parser.c (c_parser_omp_all_clauses): Add NESTED_P argument, if
1292 true, terminate processing on closing paren and don't skip to end of
1293 pragma line.
1294 (c_parser_omp_declare_simd): Handle also declare variant.
1295 (omp_construct_selectors, omp_device_selectors,
1296 omp_implementation_selectors, omp_user_selectors): New variables.
1297 (c_parser_omp_context_selector,
1298 c_parser_omp_context_selector_specification,
1299 c_finish_omp_declare_variant): New functions.
1300 (c_finish_omp_declare_simd): Handle both declare simd and
1301 declare variant.
1302 (c_parser_omp_declare): Handle declare variant.
1303
93313b94
JM
13042019-10-02 Joseph Myers <joseph@codesourcery.com>
1305
1306 * c-parser.c (c_parser_asm_statement): Handle CPP_SCOPE like two
1307 CPP_COLON tokens.
1308
55879815
RS
13092019-10-01 Richard Sandiford <richard.sandiford@arm.com>
1310
1311 * c-objc-common.c (useful_aka_type_p): New function.
1312 (print_type): Use it to decide whether an aka type is worth printing.
1313
59bc434a
JJ
13142019-09-27 Jakub Jelinek <jakub@redhat.com>
1315
1316 PR c++/88203
1317 * c-parser.c (c_parser_predefined_identifier): New function.
1318 (c_parser_postfix_expression): Use it.
1319 (c_parser_omp_variable_list): Parse predefined identifiers.
1320 * c-typeck.c (c_finish_omp_clauses): Allow predefined variables
1321 in shared and firstprivate clauses, even when they are predetermined
1322 shared.
1323
c6447c20
RS
13242019-09-27 Richard Sandiford <richard.sandiford@arm.com>
1325
1326 * c-typeck.c (build_function_call_vec): Take the original function
1327 decl as an optional final parameter. Pass all built-in calls to
1328 check_builtin_function_arguments.
1329
522da4c2
EB
13302019-09-20 Eric Botcazou <ebotcazou@adacore.com>
1331
1332 PR c/91815
1333 * c-decl.c (pushdecl): In C detect duplicate declarations across scopes
1334 of identifiers in the external scope only for variables and functions.
1335
68e2c199
PK
13362019-09-04 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1337
1338 PR c/78736
1339 * c-typeck.c (convert_for_assignment): Handle Wenum-conversion.
1340
22f8849d
IS
13412019-08-23 Iain Sandoe <iain@sandoe.co.uk>
1342
1343 PR pch/61250
1344 * c-parser.c (c_parse_file): Call c_common_no_more_pch ()
1345 after determining that the first token is not
1346 PRAGMA_GCC_PCH_PREPROCESS.
1347
db376f45
EB
13482019-08-22 Eric Botcazou <ebotcazou@adacore.com>
1349
1350 * c-parser.c (c_parser_declaration_or_fndef): Set DECL_ARGUMENTS of a
1351 FUNCTION_DECL to the right value in the presence of nested declarators.
1352
4d732405
RS
13532019-08-13 Richard Sandiford <richard.sandiford@arm.com>
1354
1355 PR middle-end/91421
1356 * c-decl.c (merge_decls): Use copy_decl_built_in_function.
1357
cb1180d5
RS
13582019-08-13 Richard Sandiford <richard.sandiford@arm.com>
1359
1360 PR middle-end/91421
1361 * c-decl.c (header_for_builtin_fn): Take a FUNCTION_DECL instead
1362 of a built_in_function.
1363 (diagnose_mismatched_decls, implicitly_declare): Update accordingly.
1364
77eb117f
JJ
13652019-08-10 Jakub Jelinek <jakub@redhat.com>
1366
1367 * c-parser.c (c_parser_omp_clause_name): Parse device_type.
1368 (c_parser_omp_clause_device_type): New function.
1369 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_DEVICE_TYPE.
1370 (OMP_DECLARE_TARGET_CLAUSE_MASK): Add PRAGMA_OMP_CLAUSE_DEVICE_TYPE.
1371 (c_parser_omp_declare_target): Handle device_type clauses. Remove
1372 diagnostics for declare target with clauses nested in clause-less
1373 declare target declaration-definition-seq.
1374 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_DEVICE_TYPE.
1375
2c3b8bad
JJ
13762019-08-09 Jakub Jelinek <jakub@redhat.com>
1377
bb522e2e
JJ
1378 * c-parser.c (check_no_duplicate_clause): Simplify using
1379 omp_find_clause.
1380 (c_parser_omp_clause_if): Fix up printing of target {enter,exit} data
1381 directive name modifiers.
1382 (c_parser_omp_clause_proc_bind): Check for duplicate proc_bind clause.
1383
2c3b8bad
JJ
1384 PR c/91401
1385 * c-parser.c (c_parser_omp_clause_dist_schedule): Fix up typos in the
1386 check_no_duplicate_clause call. Comment it out, instead emit a
1387 warning for duplicate dist_schedule clauses.
1388
99769e7f
RS
13892019-08-08 Richard Sandiford <richard.sandiford@arm.com>
1390
1391 * c-decl.c (finish_enum): Clear C_TYPE_BEING_DEFINED.
1392
8860d270
JJ
13932019-08-08 Jakub Jelinek <jakub@redhat.com>
1394
1395 * c-typeck.c (c_finish_omp_clauses): For C_ORT_OMP
1396 OMP_CLAUSE_USE_DEVICE_* clauses use oacc_reduction_head bitmap
1397 instead of generic_head to track duplicates.
1398
398e3feb
JJ
13992019-08-07 Jakub Jelinek <jakub@redhat.com>
1400
1401 * c-parser.c (c_parser_omp_clause_name): Parse use_device_addr clause.
1402 (c_parser_omp_clause_use_device_addr): New function.
1403 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR.
1404 (OMP_TARGET_DATA_CLAUSE_MASK): Add PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR.
1405 (c_parser_omp_target_data): Handle PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR
1406 like PRAGMA_OMP_CLAUSE_USE_DEVICE_PTR, adjust diagnostics about no
1407 map or use_device_* clauses.
1408 * c-typeck.c (c_finish_omp_clauses): For OMP_CLAUSE_USE_DEVICE_PTR
1409 in OpenMP, require pointer type rather than pointer or array type.
1410 Handle OMP_CLAUSE_USE_DEVICE_ADDR.
1411
a28351e7
JJ
14122019-07-31 Jakub Jelinek <jakub@redhat.com>
1413
1414 PR c/91192
1415 * c-parser.c (c_parser_sizeof_expression): Call set_c_expr_source_range
1416 even if finish is UNKNOWN_LOCATION, just use start as finish in that
1417 case.
1418
6343b6bf
ML
14192019-07-25 Martin Liska <mliska@suse.cz>
1420 Dominik Infuhr <dominik.infuehr@theobroma-systems.com>
1421
1422 PR c++/23383
1423 * c-decl.c (merge_decls): Merge OPERATOR_DELETE flag.
1424
cb50701e
ML
14252019-07-25 Martin Liska <mliska@suse.cz>
1426
1427 * c-decl.c (merge_decls): Use new macros
1428 (e.g. DECL_SET_LAMBDA_FUNCTION and DECL_LAMBDA_FUNCTION_P).
1429
62e3e66f
RB
14302019-07-23 Richard Biener <rguenther@suse.de>
1431
1432 PR tree-optimization/83518
1433 * gimple-parser.c (c_parser_parse_gimple_body): When we have
1434 a CFG also rebuild cgraph edges.
1435
554a530f
JJ
14362019-07-20 Jakub Jelinek <jakub@redhat.com>
1437
1438 * c-parser.c (c_parser_omp_clause_name): Handle bind clause.
1439 (c_parser_omp_clause_bind): New function.
1440 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_BIND.
1441 (OMP_LOOP_CLAUSE_MASK): Define.
1442 (c_parser_omp_loop): New function.
1443 (c_parser_omp_parallel, c_parser_omp_teams): Handle parsing of
1444 loop combined with parallel or teams.
1445 (c_parser_omp_construct): Handle PRAGMA_OMP_LOOP.
1446 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_BIND.
1447
d119bf79
RS
14482019-07-18 Richard Sandiford <richard.sandiford@arm.com>
1449
1450 PR c/53633
1451 * c-decl.c (finish_function): Check targetm.warn_func_return
1452 before issuing a -Wreturn-type warning.
1453
ab20d992 14542019-07-12 Alexandre Oliva <oliva@adacore.com>
fdc1f343
AO
1455
1456 * gimple-parser.c (c_parser_gimple_try_stmt): New.
1457 (c_parser_compound_statement): Call it.
1458
1fdd6f04
JJ
14592019-07-12 Jakub Jelinek <jakub@redhat.com>
1460
1461 * c-parser.c (c_parser_omp_clause_name): Handle order clause.
1462 (c_parser_omp_clause_order): New function.
1463 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_ORDER.
1464 (OMP_SIMD_CLAUSE_MASK, OMP_FOR_CLAUSE_MASK): Add
1465 PRAGMA_OMP_CLAUSE_ORDER.
1466 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_ORDER.
1467
8389386c
RB
14682019-07-10 Richard Biener <rguenther@suse.de>
1469
1470 * gimple-parser.c (c_parser_gimple_postfix_expression): Support
1471 _Literal (int *) &x for address literals.
1472
99b1c316
MS
14732019-07-09 Martin Sebor <msebor@redhat.com>
1474
1475 PR c++/61339
1476 * c-decl.c (xref_tag): Change class-key of PODs to struct and others
1477 to class.
1478 (field_decl_cmp): Same.
1479 * c-parser.c (c_parser_struct_or_union_specifier): Same.
1480 * c-tree.h: Same.
1481 * gimple-parser.c (c_parser_gimple_compound_statement): Same.
1482
6c1dae73
MS
14832019-07-09 Martin Sebor <msebor@redhat.com>
1484
1485 PR c++/61339
1486 * c-decl.c: Change class-key from class to struct and vice versa
1487 to match convention and avoid -Wclass-is-pod and -Wstruct-no-pod.
1488 * gimple-parser.c: Same.
1489
69b5279e
RB
14902019-07-01 Richard Biener <rguenther@suse.de>
1491
1492 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
1493 _Literal (char *) &"foo" for address literals pointing to
1494 STRING_CSTs.
1495
ab20d992
JJ
14962019-06-25 Jozef Lawrynowicz <jozef.l@mittosystems.com>
1497
1498 * c-parser.c (c_parse_init): Create keyword for "__intN__" type.
1499 * c-decl.c (declspecs_add_type): Don't pedwarn about "__intN" ISO
1500 C incompatibility if alternate "__intN__" form is used.
1501
1e3d475e
MS
15022019-06-24 Martin Sebor <msebor@redhat.com>
1503
1504 * c-typeck.c (build_binary_op): Hyphenate floating-point.
1505
bf38f7e9
JJ
15062019-06-10 Jakub Jelinek <jakub@redhat.com>
1507
1508 * c-parser.c (c_parser_pragma): Reject PRAGMA_OMP_SCAN.
1509 (c_parser_omp_clause_reduction): Don't sorry_at on inscan reductions.
1510 (c_parser_omp_scan_loop_body): New function.
1511 (c_parser_omp_for_loop): Call c_parser_omp_scan_loop_body if there are
1512 inscan reduction clauses.
1513 * c-typeck.c (c_finish_omp_clauses): Reject mixing inscan with
1514 non-inscan reductions on the same construct, or inscan reductions with
1515 ordered or schedule clauses, or inscan array reductions.
1516
65985d78
MS
15172019-06-05 Martin Sebor <msebor@redhat.com>
1518
1519 PR c/90737
1520 * c-typeck.c (c_finish_return): Only consider functions returning
1521 pointers as candidates for -Wreturn-local-addr.
1522
0ecf545c
MS
15232019-06-05 Martin Sebor <msebor@redhat.com>
1524
1525 * c-decl.c (start_decl): Adjust quoting and hyphenation
1526 in diagnostics.
1527 (finish_decl): Same.
1528 (finish_enum): Same.
1529 (start_function): Same.
1530 (declspecs_add_type): Same.
1531 * c-parser.c (warn_for_abs): Same.
1532 * c-typeck.c (build_binary_op): Same.
1533
e03436e7
TS
15342019-05-17 Thomas Schwinge <thomas@codesourcery.com>
1535
b48f44bf
TS
1536 PR c/89433
1537 * c-parser.c (c_finish_oacc_routine): Rework checking if already
1538 marked with an OpenACC 'routine' directive.
1539
5bf04509
TS
1540 PR c/89433
1541 * c-parser.c (c_parser_oacc_routine): Normalize order of clauses.
1542 (c_finish_oacc_routine): Call oacc_verify_routine_clauses.
1543
e03436e7
TS
1544 PR c/89433
1545 * c-parser.c (c_finish_oacc_routine): Refer to OpenACC 'routine'
1546 clauses from "omp declare target" attribute.
1547
a9c697b8
MS
15482019-05-16 Martin Sebor <msebor@redhat.com>
1549
ab20d992
JJ
1550 * c-decl.c (start_decl): Quote keywords, operators, and
1551 types in diagnostics.
1552 (finish_decl): Same.
1553 * c-parser.c (c_parser_asm_statement): Same.
1554 (c_parser_conditional_expression): Same.
1555 (c_parser_transaction_cancel): Same.
1556 * c-typeck.c (c_common_type): Same.
1557 (build_conditional_expr): Same.
1558 (digest_init): Same.
1559 (process_init_element): Same.
1560 (build_binary_op): Same.
a9c697b8 1561
c4499192
RB
15622019-05-17 Richard Biener <rguenther@suse.de>
1563
1564 * gimple-parser.c (c_parser_gimple_statement): Handle __VEC_PERM.
1565 (c_parser_gimple_unary_expression): Likewise.
1566 (c_parser_gimple_parentized_ternary_expression): New function.
1567
adfe6e4b
RB
15682019-05-16 Richard Biener <rguenther@suse.de>
1569
1570 * gimple-parser.c (c_parser_gimple_statement): Handle __BIT_INSERT.
1571 (c_parser_gimple_unary_expression): Likewise.
1572
186dabf2
RB
15732019-05-15 Richard Biener <rguenther@suse.de>
1574
1575 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
1576 __BIT_FIELD_REF.
1577
1158c5b4
RB
15782019-05-14 Richard Biener <rguenther@suse.de>
1579
1580 * gimple-parser.c (c_parser_gimple_statement): Remove
1581 questionable auto-promotion to VIEW_CONVERT_EXPR.
1582 (c_parser_gimple_typespec): Split out from __MEM parsing.
1583 (c_parser_gimple_postfix_expression): Handle __VIEW_CONVERT.
1584 * tree-pretty-print.c (dump_generic_node): Dump VIEW_CONVERT_EXPR
1585 as __VIEW_CONVERT with -gimple.
1586
fd4485aa
ML
15872019-05-09 Martin Liska <mliska@suse.cz>
1588
1589 * gimple-parser.c (c_parser_gimple_statement): Support __MIN and
1590 __MAX.
1591 (c_parser_gimple_unary_expression): Parse also binary expression
1592 __MIN and __MAX.
1593 (c_parser_gimple_parentized_binary_expression): New function.
1594
d276406a
ML
15952019-05-09 Martin Liska <mliska@suse.cz>
1596
1597 * gimple-parser.c (struct gimple_parser): Add probability.
1598 for gimple_parser_edge.
1599 (gimple_parser::push_edge): Add new argument probability.
1600 (c_parser_gimple_parse_bb_spec): Parse also probability
1601 if present.
1602 (c_parser_parse_gimple_body): Set edge probability.
1603 (c_parser_gimple_compound_statement): Consume token
1604 before calling c_parser_gimple_goto_stmt.
1605 Parse BB counts.
1606 (c_parser_gimple_statement): Pass new argument.
1607 (c_parser_gimple_goto_stmt): Likewise.
1608 (c_parser_gimple_if_stmt): Likewise.
1609 (c_parser_gimple_or_rtl_pass_list): Parse hot_bb_threshold.
1610 * c-parser.c (c_parser_declaration_or_fndef): Pass
1611 hot_bb_threshold argument.
1612 * c-tree.h (struct c_declspecs): Add hot_bb_threshold
1613 field.
1614 (c_parser_gimple_parse_bb_spec_edge_probability): New.
1615
f179b64e
JJ
16162019-04-26 Jakub Jelinek <jakub@redhat.com>
1617
1618 PR debug/90197
1619 * c-tree.h (c_finish_loop): Add 2 further location_t arguments.
1620 * c-parser.c (c_parser_while_statement): Adjust c_finish_loop caller.
1621 (c_parser_do_statement): Likewise.
1622 (c_parser_for_statement): Likewise. Formatting fixes.
1623 * c-typeck.c (c_finish_loop): Add COND_LOCUS and INCR_LOCUS arguments,
1624 emit DEBUG_BEGIN_STMTs if needed.
1625
e7178413
JJ
16262019-04-19 Jakub Jelinek <jakub@redhat.com>
1627
c280b7ee
JJ
1628 PR c/89888
1629 * c-typeck.c (struct c_switch): Remove outside_range_p member.
1630 (c_start_case): Don't clear it.
1631 (do_case): Adjust c_add_case_label caller.
1632 (c_finish_case): Adjust c_do_switch_warnings caller.
1633
e7178413
JJ
1634 PR c++/90108
1635 * c-decl.c (merge_decls): If remove is main variant and
1636 DECL_ORIGINAL_TYPE is some other type, remove a DECL_ORIGINAL_TYPE
1637 variant that has newdecl as TYPE_NAME if any.
1638
60a2c645
JJ
16392019-04-12 Jakub Jelinek <jakub@redhat.com>
1640
1641 PR c/89933
1642 * c-decl.c (merge_decls): When newdecl's type is its main variant,
1643 don't try to remove it from the variant list, but instead assert
1644 it has no variants.
1645
2a82beaa
RB
16462019-04-01 Richard Biener <rguenther@suse.de>
1647
1648 PR c/71598
1649 * c-tree.h (c_get_alias_set): Declare.
1650 * c-objc-common.h (LANG_HOOKS_GET_ALIAS_SET): Use c_get_alias_set.
1651 * c-objc-common.c (c_get_alias_set): Treat enumeral types
1652 as the underlying integer type.
1653
bec1da64
MS
16542019-03-19 Martin Sebor <msebor@redhat.com>
1655
1656 PR tree-optimization/89688
1657 * c-decl.c (finish_decl): Call braced_lists_to_string for more
1658 kinds of initializers.
1659
855cd9b1
JJ
16602019-03-19 Jakub Jelinek <jakub@redhat.com>
1661
1662 PR c/89734
1663 * c-decl.c (grokdeclarator): Call c_build_qualified_type on function
1664 return type even if quals_used is 0. Formatting fixes.
1665
baa09dc5
RB
16662019-03-14 Richard Biener <rguenther@suse.de>
1667
1668 * c-tree.h (enum c_declspec_il): New.
1669 (struct c_declspecs): Merge gimple_p and rtl_p into declspec_il
1670 enum bitfield.
1671 * c-parser.c (c_parser_declaration_or_fndef): Adjust accordingly.
1672 Pass start pass and declspec_il to c_parser_parse_gimple_body.
1673 (c_parser_declspecs): Adjust.
1674 * gimple-parser.c: Include cfg.h, cfghooks.h, cfganal.h, tree-cfg.h,
1675 gimple-iterator.h, cfgloop.h, tree-phinodes.h, tree-into-ssa.h
1676 and bitmap.h.
1677 (struct gimple_parser): New.
1678 (gimple_parser::push_edge): New method.
1679 (c_parser_gimple_parse_bb_spec): New helper.
1680 (c_parser_parse_gimple_body): Get start pass and IL specification.
1681 Initialize SSA and CFG.
1682 (c_parser_gimple_compound_statement): Handle CFG and SSA build.
1683 Build a gimple_parser parsing state and pass it along.
1684 (c_parser_gimple_statement): Change intermittend __PHI internal
1685 function argument for the edge.
1686 (c_parser_gimple_or_rtl_pass_list): Handle ssa, cfg flags.
1687 (c_parser_gimple_goto_stmt): Record edges to build.
1688 (c_parser_gimple_if_stmt): Likewise.
1689 * gimple-parser.h (c_parser_parse_gimple_body): Adjust.
1690 (c_parser_gimple_or_rtl_pass_list): Likewise.
1691
a3f9f006
ML
16922019-03-11 Martin Liska <mliska@suse.cz>
1693
1694 * c-decl.c (check_for_loop_decls): Wrap an option name
1695 in a string format message and fix GNU coding style.
1696 * c-parser.c (c_parser_declspecs): Likewise.
1697
1db01ff9
JJ
16982019-03-08 Jakub Jelinek <jakub@redhat.com>
1699
1700 PR tree-optimization/89550
1701 * c-decl.c (finish_function): Only set TREE_NO_WARNING if warning_at
1702 returned true.
1703 (c_write_global_declarations_1): Only set TREE_NO_WARNING if pedwarn
1704 or warning returned true.
1705
66dcb747
JJ
17062019-02-28 Jakub Jelinek <jakub@redhat.com>
1707
1708 PR c/89525
1709 * c-typeck.c (convert_arguments): Call inform_declaration only if
1710 the previous warning_at call returned true.
1711
2263c9f2
TS
17122019-02-22 Thomas Schwinge <thomas@codesourcery.com>
1713
1714 * c-parser.c (c_parser_oacc_shape_clause): Add loc formal
1715 parameter. Adjust all users.
1716 (c_parser_oacc_simple_clause): Replace parser with loc formal
1717 parameter. Adjust all users.
1718
ab20d992 17192019-02-19 Chung-Lin Tang <cltang@codesourcery.com>
19695f4d
CLT
1720
1721 PR c/87924
1722 * c-parser.c (c_parser_oacc_clause_wait): Add representation of wait
1723 clause without argument as 'wait (GOMP_ASYNC_NOVAL)', adjust comments.
1724
5f88ba10
JJ
17252019-02-15 Jakub Jelinek <jakub@redhat.com>
1726
1727 PR c/89340
1728 * c-decl.c (start_function): Clear TREE_PUBLIC on nested functions
1729 before c_decl_attributes rather than after it.
1730
cfc30fd1
JJ
17312019-02-06 Jakub Jelinek <jakub@redhat.com>
1732
1733 PR c/89211
1734 * c-parser.c (c_parser_declaration_or_fndef): Don't update
1735 DECL_ARGUMENTS of d if it has been defined already. Use a single if
1736 instead of 3 nested ifs.
1737
fbe83e6b
JM
17382019-02-06 Joseph Myers <joseph@codesourcery.com>
1739
1740 PR c/88584
1741 * c-decl.c (finish_decl): Do not complete array types for arrays
1742 with external linkage not at file scope.
1743
f461f938
RB
17442019-02-05 Richard Biener <rguenther@suse.de>
1745
1746 PR c/88606
1747 * c-decl.c (finish_struct): Reset TYPE_TRANSPARENT_AGGR on
1748 all type variants when not supported.
1749
fe509359
JJ
17502019-01-30 Jakub Jelinek <jakub@redhat.com>
1751
1752 PR c/89061
1753 * c-tree.h (C_DECL_COMPOUND_LITERAL_P): Define.
1754 * c-decl.c (decl_jump_unsafe): Return false for
1755 C_DECL_COMPOUND_LITERAL_P decls.
1756 (build_compound_literal): Set C_DECL_COMPOUND_LITERAL_P.
1757
6a335b96
JJ
17582019-01-29 Jakub Jelinek <jakub@redhat.com>
1759
f4b7e754
JJ
1760 PR c/89045
1761 * c-decl.c (build_compound_literal): Don't pushdecl if in parameter
1762 scope.
1763
6a335b96
JJ
1764 PR c/86125
1765 * c-decl.c (last_fileptr_type): Remove.
1766 (last_structptr_types): New variable.
1767 (match_builtin_function_types): Compare TYPE_MAIN_VARIANT of
1768 {old,new}rettype instead of the types themselves. Assert
1769 last_structptr_types array has the same number of elements
1770 as builtin_structptr_types array. Use TYPE_MAIN_VARIANT for
1771 argument oldtype and newtype. Instead of handling
1772 just fileptr_type_node specially, handle all builtin_structptr_types
1773 pointer nodes. Formatting fix.
1774
d8b5a1a0
MS
17752019-01-24 Martin Sebor <msebor@redhat.com>
1776
1777 PR c/86125
1778 PR c/88886
1779 PR middle-end/86308
1780 * c-decl.c (match_builtin_function_types): Add arguments.
1781 (diagnose_mismatched_decls): Diagnose mismatched declarations
1782 of built-ins more strictly.
1783
e21c4491
JJ
17842019-01-24 Jakub Jelinek <jakub@redhat.com>
1785
1786 PR c++/88976
1787 * c-typeck.c (c_finish_omp_cancel): Diagnose more than one if
1788 on #pragma omp cancel with different modifiers.
1789
420183d9
L
17902019-01-18 H.J. Lu <hongjiu.lu@intel.com>
1791
1792 PR c/51628
1793 PR c/88664
1794 * c-typeck.c (convert_for_assignment): Upate the
1795 warn_for_address_or_pointer_of_packed_member call.
1796
17ad43dd
TH
17972019-01-16 Tom Honermann <tom@honermann.net>
1798 Jason Merrill <jason@redhat.com>
1799
1800 * c-typeck.c (digest_init): Revised the error message produced for
1801 ill-formed cases of array initialization with a string literal.
1802 (error_init): Make variadic.
1803
5f07d78a
JJ
18042019-01-12 Jakub Jelinek <jakub@redhat.com>
1805
1806 * c-typeck.c (convert_for_assignment): Fix a comment typo.
1807
c4581bbf
JJ
18082019-01-07 Jakub Jelinek <jakub@redhat.com>
1809
1810 PR c/88701
1811 * c-decl.c (build_compound_literal): If not TREE_STATIC, only pushdecl
1812 if current_function_decl is non-NULL.
1813
65c5b1eb
JM
18142019-01-07 Joseph Myers <joseph@codesourcery.com>
1815
1816 PR c/88720
1817 PR c/88726
1818 * c-decl.c (pop_scope): Use TREE_PUBLIC and b->nested to determine
1819 whether a function is nested, not DECL_EXTERNAL. Diagnose inline
1820 functions declared but never defined only for external scope, not
1821 for other scopes.
1822
d8fcab68
JJ
18232019-01-07 Jakub Jelinek <jakub@redhat.com>
1824
1825 PR c++/85052
1826 * c-parser.c (c_parser_postfix_expression): Parse
1827 __builtin_convertvector.
1828
a5544970
JJ
18292019-01-01 Jakub Jelinek <jakub@redhat.com>
1830
1831 Update copyright years.
1832
da77eace
L
18332018-12-20 H.J. Lu <hongjiu.lu@intel.com>
1834
1835 PR c/51628
1836 * c-typeck.c (convert_for_assignment): Call
1837 warn_for_address_or_pointer_of_packed_member.
1838
1edf8866
SB
18392018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
1840
1841 * c-parser.c (c_parser_asm_statement) <RID_CONST, RID_RESTRICT>: Give
1842 a more specific error message (instead of just falling through).
1843
db4fd626
SB
18442018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
1845
1846 * c-parser.c (c_parser_asm_statement): Keep track of the location each
1847 asm qualifier is first seen; use that to give nicer "duplicate asm
1848 qualifier" messages. Delete 'quals" variable, instead pass the
1849 "is_volatile_ flag to build_asm_stmt directly.
1850 * c-tree.h (build_asm_stmt): Make the first arg bool instead of tree.
1851 * c-typeck.c (build_asm_stmt): Ditto; adjust.
1852
9c9cfcbb
SB
18532018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
1854
1855 * c-parser.c (c_parser_asm_statement): Rewrite the loop to work without
1856 "done" boolean variable.
1857
a14feb3c
DM
18582018-12-19 David Malcolm <dmalcolm@redhat.com>
1859
1860 PR c++/87504
1861 * c-typeck.c (class maybe_range_label_for_tree_type_mismatch):
1862 Move from here to gcc-rich-location.h and gcc-rich-location.c.
1863 (build_binary_op): Use struct op_location_t and
1864 class binary_op_rich_location.
1865
6d939173
JJ
18662018-12-11 Jakub Jelinek <jakub@redhat.com>
1867
1868 PR sanitizer/88426
1869 * c-convert.c (convert): Call c_fully_fold before calling
1870 ubsan_instrument_float_cast.
1871
b7055028
SB
18722018-12-08 Segher Boessenkool <segher@kernel.crashing.org>
1873
1874 * c-parser (c_parser_asm_statement) [RID_INLINE]: Delete stray line
1875 setting "quals".
1876
5b76e75f
SB
18772018-12-06 Segher Boessenkool <segher@kernel.crashing.org>
1878
1879 * c-parser.c (c_parser_asm_statement): Detect the inline keyword
1880 after asm. Pass a flag for it to build_asm_expr.
1881 * c-tree.h (build_asm_expr): Update declaration.
1882 * c-typeck.c (build_asm_stmt): Add is_inline parameter. Use it to
1883 set ASM_INLINE_P.
1884
30bd42b9
SB
18852018-12-06 Segher Boessenkool <segher@kernel.crashing.org>
1886
1887 PR inline-asm/55681
1888 * c-parser.c (c_parser_asm_statement): Update grammar. Allow any
1889 combination of volatile and goto, in any order, without repetitions.
1890
9df6c0e4
JB
18912018-12-04 James Norris <jnorris@codesourcery.com>
1892 Cesar Philippidis <cesar@codesourcery.com>
1893 Julian Brown <julian@codesourcery.com>
1894
1895 * c-parser.c (c_parser_oacc_wait_list): Remove dead diagnostic
1896 code.
1897
f44697b7
RB
18982018-11-30 Richard Biener <rguenther@suse.de>
1899
1900 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
1901 _Literal (type) { ... } as empty aggregate or vector constructor.
1902
550dfbdc
MS
19032018-11-29 Martin Sebor <msebor@redhat.com>
1904
1905 PR c/88091
1906 * c-typeck.c (convert_argument): Add a parameter. Adjust indentation.
1907 (convert_arguments): Add comments. Pass additional argument to
1908 the function above.
1909
673670da
MS
19102018-11-29 Martin Sebor <msebor@redhat.com>
1911
1912 PR c/88172
1913 PR testsuite/88208
1914 * c-decl.c (declspec_add_alignas): Adjust call to check_user_alignment.
1915
db1d09b0
MS
19162018-11-23 Martin Sebor <msebor@redhat.com>
1917
1918 PR testsuite/88098
1919 * c-typeck.c (convert_arguments): Call builtin_decl_explicit instead.
1920 (maybe_warn_builtin_no_proto_arg): Handle short enum to int promotion.
1921
98f08eb8
MS
19222018-11-20 Martin Sebor <msebor@redhat.com>
1923
1924 * c-parser.c (c_parser_has_attribute_expression): New function.
1925 (c_parser_attribute): New function.
1926 (c_parser_attributes): Move code into c_parser_attribute.
1927 (c_parser_unary_expression): Handle RID_HAS_ATTRIBUTE_EXPRESSION.
1928
cd5da983
MS
19292018-11-15 Martin Sebor <msebor@redhat.com>
1930
1931 PR c/83656
1932 * c-decl.c (header_for_builtin_fn): Declare.
1933 (diagnose_mismatched_decls): Diagnose declarations of built-in
1934 functions without a prototype.
1935 * c-typeck.c (maybe_warn_builtin_no_proto_arg): New function.
1936 (convert_argument): Same.
1937 (convert_arguments): Factor code out into convert_argument.
1938 Detect mismatches between built-in formal arguments in calls
1939 to built-in without prototype.
1940 (build_conditional_expr): Same.
1941 (type_or_builtin_type): New function.
1942 (convert_for_assignment): Add argument. Conditionally issue
1943 warnings instead of errors for mismatches.
1944
620e594b
DM
19452018-11-13 David Malcolm <dmalcolm@redhat.com>
1946
1947 * c-decl.c: Replace "source_location" with "location_t".
1948 * c-tree.h: Likewise.
1949 * c-typeck.c: Likewise.
1950 * gimple-parser.c: Likewise.
1951
3179ebae
JJ
19522018-11-09 Jakub Jelinek <jakub@redhat.com>
1953
81a227c6
JJ
1954 * c-parser.c (c_parser_omp_clause_final): Use
1955 c_parser_expr_no_commas, convert_lvalue_to_rvalue,
1956 c_objc_common_truthvalue_conversion, c_fully_fold and parentheses
1957 parsing instead of c_parser_paren_condition.
1958 (c_parser_omp_clause_if): Use c_parser_expr_no_commas,
1959 convert_lvalue_to_rvalue, c_objc_common_truthvalue_conversion and
1960 c_fully_fold instead of c_parser_condition.
1961 (c_parser_omp_clause_num_threads, c_parser_omp_clause_num_tasks,
1962 c_parser_omp_clause_grainsize, c_parser_omp_clause_priority,
1963 c_parser_omp_clause_hint, c_parser_omp_clause_num_teams,
1964 c_parser_omp_clause_thread_limit, c_parser_omp_clause_linear): Use
1965 c_parser_expr_no_commas instead of c_parser_expression.
1966
98c91c56
JJ
1967 * c-parser.c (c_parser_omp_clause_reduction): Call sorry_at on
1968 reduction clause with inscan modifier.
1969
3179ebae
JJ
1970 * c-parser.c (c_parser_omp_requires): Call sorry_at on requires
1971 clauses other than atomic_default_mem_order.
1972
28567c40
JJ
19732018-11-08 Jakub Jelinek <jakub@redhat.com>
1974
1975 * c-parser.c: Include memmode.h.
1976 (c_parser_omp_depobj, c_parser_omp_requires): New functions.
1977 (c_parser_pragma): Handle PRAGMA_OMP_DEPOBJ and PRAGMA_OMP_REQUIRES.
1978 (c_parser_omp_clause_name): Handle nontemporal, in_reduction and
1979 task_reduction clauses.
1980 (c_parser_omp_variable_list): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION.
1981 For OMP_CLAUSE_DEPEND, parse clause operands as either an array
1982 section, or lvalue assignment expression.
1983 (c_parser_omp_clause_if): Handle cancel and simd modifiers.
1984 (c_parser_omp_clause_lastprivate): Parse optional
1985 conditional: modifier.
1986 (c_parser_omp_clause_hint): Require constant integer expression rather
1987 than just integer expression.
1988 (c_parser_omp_clause_defaultmap): Parse new kinds of defaultmap
1989 clause.
1990 (c_parser_omp_clause_reduction): Add IS_OMP and KIND arguments.
1991 Parse reduction modifiers. Pass KIND to c_parser_omp_variable_list.
1992 (c_parser_omp_clause_nontemporal, c_parser_omp_iterators): New
1993 functions.
1994 (c_parser_omp_clause_depend): Parse iterator modifier and handle
1995 iterators. Parse mutexinoutset and depobj kinds.
1996 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_reduction
1997 callers.
1998 (c_parser_omp_all_clauses): Likewise. Handle
1999 PRAGMA_OMP_CLAUSE_NONTEMPORAL and
2000 PRAGMA_OMP_CLAUSE_{IN,TASK}_REDUCTION.
2001 (c_parser_omp_atomic): Parse hint and memory order clauses. Handle
2002 default memory order from requires directive if any. Adjust
2003 c_finish_omp_atomic caller.
2004 (c_parser_omp_critical): Allow comma in between (name) and hint clause.
2005 (c_parser_omp_flush): Parse flush with memory-order-clause.
2006 (c_parser_omp_for_loop): Allow NE_EXPR even in
2007 OpenMP loops, adjust c_finish_omp_for caller.
2008 (OMP_SIMD_CLAUSE_MASK): Add if and nontemporal clauses.
2009 (c_parser_omp_master): Add p_name, mask and cclauses arguments.
2010 Allow to be called while parsing combined parallel master.
2011 Parse combined master taskloop{, simd}.
2012 (c_parser_omp_parallel): Parse combined
2013 parallel master{, taskloop{, simd}} constructs.
2014 (OMP_TASK_CLAUSE_MASK): Add in_reduction clause.
2015 (OMP_TASKGROUP_CLAUSE_MASK): Define.
2016 (c_parser_omp_taskgroup): Add LOC argument. Parse taskgroup clauses.
2017 (OMP_TASKWAIT_CLAUSE_MASK): Define.
2018 (c_parser_omp_taskwait): Handle taskwait with depend clauses.
2019 (c_parser_omp_teams): Force a BIND_EXPR with BLOCK
2020 around teams body. Use SET_EXPR_LOCATION.
2021 (c_parser_omp_target_data): Allow target data
2022 with only use_device_ptr clauses.
2023 (c_parser_omp_target): Use SET_EXPR_LOCATION. Set
2024 OMP_REQUIRES_TARGET_USED bit in omp_requires_mask.
2025 (c_parser_omp_requires): New function.
2026 (c_finish_taskloop_clauses): New function.
2027 (OMP_TASKLOOP_CLAUSE_MASK): Add reduction and in_reduction clauses.
2028 (c_parser_omp_taskloop): Use c_finish_taskloop_clauses. Add forward
2029 declaration. Disallow in_reduction clause when combined with parallel
2030 master.
2031 (c_parser_omp_construct): Adjust c_parser_omp_master and
2032 c_parser_omp_taskgroup callers.
2033 * c-typeck.c (c_finish_omp_cancel): Diagnose if clause with modifier
2034 other than cancel.
2035 (handle_omp_array_sections_1): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION
2036 like OMP_CLAUSE_REDUCTION.
2037 (handle_omp_array_sections): Likewise. Call save_expr on array
2038 reductions before calling build_index_type. Handle depend clauses
2039 with iterators.
2040 (struct c_find_omp_var_s): New type.
2041 (c_find_omp_var_r, c_omp_finish_iterators): New functions.
2042 (c_finish_omp_clauses): Don't diagnose nonmonotonic clause
2043 with static, runtime or auto schedule kinds. Call save_expr for whole
2044 array reduction sizes. Diagnose reductions with zero sized elements
2045 or variable length structures. Diagnose nogroup clause used with
2046 reduction clause(s). Handle depend clause with
2047 OMP_CLAUSE_DEPEND_DEPOBJ. Diagnose bit-fields. Require
2048 omp_depend_t type for OMP_CLAUSE_DEPEND_DEPOBJ kinds and
2049 some different type for other kinds. Use build_unary_op with
2050 ADDR_EXPR and build_indirect_ref instead of c_mark_addressable.
2051 Handle depend clauses with iterators. Remove no longer needed special
2052 case that predetermined const qualified vars may be specified in
2053 firstprivate clause. Complain if const qualified vars are mentioned
2054 in data-sharing clauses other than firstprivate or shared. Use
2055 error_at with OMP_CLAUSE_LOCATION (c) as first argument instead of
2056 error. Formatting fix. Handle OMP_CLAUSE_NONTEMPORAL and
2057 OMP_CLAUSE_{IN,TASK}_REDUCTION. Allow any lvalue as
2058 OMP_CLAUSE_DEPEND operand (besides array section), adjust diagnostics.
2059
7e2de6df
DM
20602018-10-29 David Malcolm <dmalcolm@redhat.com>
2061
2062 * c-decl.c (implicit_decl_warning): Update "is there a suggestion"
2063 logic for change to name_hint::operator bool.
2064 (undeclared_variable): Likewise.
2065 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
2066 (c_parser_parameter_declaration): Likewise.
2067
9f936c86
JM
20682018-10-17 Joseph Myers <joseph@codesourcery.com>
2069
2070 * c-errors.c (pedwarn_c11): New function.
2071 * c-parser.c (disable_extension_diagnostics): Save
2072 warn_c11_c2x_compat and set it to 0.
2073 (restore_extension_diagnostics): Restore warn_c11_c2x_compat.
2074 (c_parser_static_assert_declaration_no_semi): Handle
2075 _Static_assert without string constant.
2076 * c-tree.h (pedwarn_c11): New prototype.
2077
033eb567
DM
20782018-10-17 David Malcolm <dmalcolm@redhat.com>
2079
2080 * Make-lang.in (selftest-c): New.
2081 (C_SELFTEST_FLAGS, C_SELFTEST_DEPS, s-selftest-c, selftest-c-gdb)
2082 (selftest-gdb, selftest-c-valgrind, selftest-valgrind): Move here
2083 from gcc/Makefile.in.
2084
0edf3afe
RB
20852018-10-02 Richard Biener <rguenther@suse.de>
2086
2087 * c-decl.c (warn_if_shadowing): Do not test DECL_FROM_INLINE.
2088
8313a764
JM
20892018-09-26 Joseph Myers <joseph@codesourcery.com>
2090
2091 PR c/87390
2092 * c-typeck.c (build_binary_op): Use excess precision for
2093 comparisons of integers and floating-point for C11 and later.
2094
ce6f0888
MJ
20952018-09-26 Martin Jambor <mjambor@suse.cz>
2096
2097 PR c/87347
2098 * c-parser.c (warn_for_abs): Bail out if TYPE_ARG_TYPES is NULL. Fix
ab20d992 2099 comment.
ce6f0888 2100
9c4a4b3c
DM
21012018-09-17 David Malcolm <dmalcolm@redhat.com>
2102
2103 * c-objc-common.c (range_label_for_type_mismatch::get_text):
2104 Update for new param.
2105 * c-typeck.c (maybe_range_label_for_tree_type_mismatch::get_text):
2106 Likewise.
2107
80c6d1f4
MJ
21082018-09-17 Martin Jambor <mjambor@suse.cz>
2109
2110 PR c/63886
2111 * c-parser.c: (warn_for_abs): New function.
2112 (c_parser_postfix_expression_after_primary): Call it.
2113
4a426e36
BE
21142018-09-13 Bernd Edlinger <bernd.edlinger@hotmail.de>
2115
2116 * c-typeck.c (digest_init): Shorten overlength strings.
2117
6d900107
BE
21182018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
2119
2120 * c-decl.c (finish_decl): Call complete_flexible_array_elts.
2121
b5764229
BE
21222018-09-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
2123
2124 * c-decl.c (finish_decl): Call braced_list_to_string here ...
2125 * c-parser.c (c_parser_declaration_or_fndef): ... instead of here.
2126
22eea6b2
AM
21272018-08-30 Alexander Monakov <amonakov@ispras.ru>
2128
2129 * gimple-parser.c (c_parser_gimple_binary_expression): Accept infix
2130 "__MULT_HIGHPART" for MULT_HIGHPART_EXPR.
2131
85204e23
DM
21322018-08-27 David Malcolm <dmalcolm@redhat.com>
2133
2134 PR 87091
2135 * c-decl.c (implicitly_declare): Update call to
2136 maybe_add_include_fixit to suggest overriding the location, as it
2137 is for a note.
2138 * c-objc-common.c (c_tree_printer): Update for conversion of
2139 show_caret_p to a tri-state.
2140
3d78e008
ML
21412018-08-27 Martin Liska <mliska@suse.cz>
2142
2143 * c-decl.c (locate_old_decl): Use new function
92a285c1
ML
2144 fndecl_built_in_p and remove check for FUNCTION_DECL if
2145 possible.
3d78e008
ML
2146 (diagnose_mismatched_decls): Likewise.
2147 (merge_decls): Likewise.
2148 (warn_if_shadowing): Likewise.
2149 (pushdecl): Likewise.
2150 (implicitly_declare): Likewise.
2151 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
2152 * c-tree.h (C_DECL_ISNT_PROTOTYPE): Likewise.
2153 * c-typeck.c (build_function_call_vec): Likewise.
2154 (convert_arguments): Likewise.
2155
097f82ec
DM
21562018-08-20 David Malcolm <dmalcolm@redhat.com>
2157
2158 PR other/84889
2159 * c-decl.c (pushtag): Add auto_diagnostic_group instance.
2160 (diagnose_mismatched_decls): Likewise, in various places.
2161 (warn_if_shadowing): Likewise.
2162 (implicit_decl_warning): Likewise.
2163 (implicitly_declare): Likewise.
2164 (undeclared_variable): Likewise.
2165 (declare_label): Likewise.
2166 (grokdeclarator): Likewise.
2167 (start_function): Likewise.
2168 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
2169 (c_parser_parameter_declaration): Likewise.
2170 (c_parser_binary_expression): Likewise.
2171 * c-typeck.c (c_expr_sizeof_expr): Likewise.
2172 (parser_build_binary_op): Likewise.
2173 (build_unary_op): Likewise.
2174 (error_init): Likewise.
2175 (pedwarn_init): Likewise.
2176 (warning_init): Likewise.
2177 (convert_for_assignment): Likewise.
2178
96e6ae57
DM
21792018-08-15 David Malcolm <dmalcolm@redhat.com>
2180
2181 * c-objc-common.c: Include "gcc-rich-location.h".
2182 (c_tree_printer): Move implemenation of '%T' to...
2183 (print_type): ...this new function.
2184 (range_label_for_type_mismatch::get_text): New function.
2185 * c-typeck.c (convert_for_assignment): Add type labels to the rhs
2186 range for the various ic_argpass cases.
2187 (class maybe_range_label_for_tree_type_mismatch): New class.
2188 (build_binary_op): Use it when calling binary_op_error.
2189
0cd020ae 21902018-08-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
ab20d992 2191
0cd020ae
PK
2192 * c-decl.c (start_decl): Do not warn if variables is named as main
2193 and is a local variable.
2194
72733314
IS
21952018-08-15 Iain Sandoe <iain@sandoe.co.uk>
2196
2197 PR c/19315
2198 * c-decl.c (finish_decl): Don't add the 'extern' storage class to
2199 objects of unknown size.
2200
23aa9f7c
MS
22012018-08-13 Martin Sebor <msebor@redhat.com>
2202
2203 PR tree-optimization/71625
2204 * c-parser.c (c_parser_declaration_or_fndef): Call
2205 braced_list_to_string.
2206
e5e7e50d
BH
22072018-08-03 Bogdan Harjoc <harjoc@gmail.com>
2208
2209 PR c/86690
2210 * c-typeck.c (lookup_field): Do not use TYPE_LANG_SPECIFIC after
2211 errors.
2212
8a45b051
MS
22132018-08-01 Martin Sebor <msebor@redhat.com>
2214
2215 PR tree-optimization/86650
2216 * c-objc-common.c (c_tree_printer): Move usage of EXPR_LOCATION (t)
2217 and TREE_BLOCK (t) from within percent_K_format to this callsite.
2218
5922dcb5
JJ
22192018-08-01 Jakub Jelinek <jakub@redhat.com>
2220
2221 PR c/85704
2222 * c-typeck.c (init_field_decl_cmp): New function.
2223 (output_pending_init_elements): Use it for field comparisons
2224 instead of pure bit_position comparisons.
2225
9b452033
JJ
22262018-07-12 Jakub Jelinek <jakub@redhat.com>
2227
2228 * c-decl.c (c_decl_attributes): Don't diagnose vars without mappable
2229 type here, instead add "omp declare target implicit" attribute.
2230 (finish_decl): Diagnose vars without mappable type here.
2231
ab20d992
JJ
22322018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
2233 Thomas Schwinge <thomas@codesourcery.com>
829c6349
CLT
2234 Cesar Philippidis <cesar@codesourcery.com>
2235
2236 * c-parser.c (c_parser_omp_clause_name): Add support for finalize
2237 and if_present. Make present_or_{copy,copyin,copyout,create} aliases
2238 to their non-present_or_* counterparts. Make 'self' an alias to
2239 PRAGMA_OACC_CLAUSE_HOST.
2240 (c_parser_oacc_data_clause): Update GOMP mappings for
2241 PRAGMA_OACC_CLAUSE_{COPY,COPYIN,COPYOUT,CREATE,DELETE}. Remove
2242 PRAGMA_OACC_CLAUSE_{SELF,PRESENT_OR_*}.
2243 (c_parser_oacc_all_clauses): Handle finalize and if_present clauses.
2244 Remove support for present_or_* clauses.
2245 (OACC_KERNELS_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
2246 (OACC_PARALLEL_CLAUSE_MASK): Likewise.
2247 (OACC_DECLARE_CLAUSE_MASK): Likewise.
2248 (OACC_DATA_CLAUSE_MASK): Likewise.
2249 (OACC_ENTER_DATA_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
2250 (OACC_EXIT_DATA_CLAUSE_MASK): Add FINALIZE clause.
2251 (OACC_UPDATE_CLAUSE_MASK): Remove SELF, add IF_PRESENT.
2252 (c_parser_oacc_declare): Remove PRESENT_OR_* clauses.
2253 * c-typeck.c (c_finish_omp_clauses): Handle IF_PRESENT and FINALIZE.
2254
e197e64e
KV
22552018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
2256
2257 * c-typeck.c (build_unary_op): Handle ABSU_EXPR;
2258 * gimple-parser.c (c_parser_gimple_statement): Likewise.
2259 (c_parser_gimple_unary_expression): Likewise.
2260
487f2f61
JJ
22612018-06-15 Jakub Jelinek <jakub@redhat.com>
2262
2263 PR c/86093
2264 * c-typeck.c (pointer_diff): Cast both pointers to unqualified types
2265 before doing POINTER_DIFF_EXPR.
2266
e4d44a37
MP
22672018-06-07 Marek Polacek <polacek@redhat.com>
2268
2269 PR c/85318
2270 * c-decl.c (check_for_loop_decls): Add -Wc90-c99-compat warning about
2271 for loop initial declarations.
2272
b67b9225
DP
22732018-05-30 David Pagan <dave.pagan@oracle.com>
2274
2275 PR c/55976
2276 * c-decl.c (grokdeclarator): Update check for return type warnings.
2277 (start_function): Likewise.
2278 (finish_function): Likewise.
2279 * c-typeck.c (c_finish_return): Update check for return type warnings.
2280 Pass OPT_Wreturn_type to pedwarn when appropriate.
2281
c566cc9f
RS
22822018-05-18 Richard Sandiford <richard.sandiford@linaro.org>
2283
2284 * gimple-parser.c (c_parser_gimple_postfix_expression): Remove
2285 __FMA_EXPR handlng.
2286
e4f81565
RS
22872018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
2288
2289 * gimple-parser.c: Include internal-fn.h.
2290 (c_parser_gimple_statement): Treat a leading CPP_DOT as a call.
2291 (c_parser_gimple_call_internal): New function.
2292 (c_parser_gimple_postfix_expression): Use it to handle CPP_DOT.
2293 Fix typos in comment.
2294
79e7b1fe
JJ
22952018-05-10 Jakub Jelinek <jakub@redhat.com>
2296
2297 PR c++/85662
2298 * c-fold.c (c_fully_fold_internal): Use fold_offsetof rather than
2299 fold_offsetof_1, pass TREE_TYPE (expr) as TYPE to it and drop the
2300 fold_convert_loc.
2301 * c-typeck.c (build_unary_op): Use fold_offsetof rather than
2302 fold_offsetof_1, pass argtype as TYPE to it and drop the
2303 fold_convert_loc.
2304
f7584c81
DP
23052018-05-02 David Pagan <dave.pagan@oracle.com>
2306
2307 PR c/30552
2308 * c-decl.c (old_style_parameter_scope): New function.
2309 * c-parser.c (c_parser_postfix_expression): Check for statement
2310 expressions in old-style function parameter list declarations.
2311 * c-parser.h (old_style_parameter_scope): New extern declaration.
2312
b33a0cb3
JJ
23132018-04-25 Jakub Jelinek <jakub@redhat.com>
2314
2315 PR sanitizer/84307
2316 * c-decl.c (build_compound_literal): Call pushdecl (decl) even when
2317 it is not TREE_STATIC.
2318 * c-typeck.c (c_mark_addressable) <case COMPOUND_LITERAL_EXPR>: Mark
2319 not just the COMPOUND_LITERAL_EXPR node itself addressable, but also
2320 its COMPOUND_LITERAL_EXPR_DECL.
2321
c5c5822a
JM
23222018-03-21 Joseph Myers <joseph@codesourcery.com>
2323
2324 * c-parser.c (c_parser_postfix_expression): For __builtin_tgmath
2325 where all functions return the same _FloatN or _FloatNx type,
2326 treat integer types as _Float64 instead of double.
2327
aa1c9429
JJ
23282018-03-21 Jakub Jelinek <jakub@redhat.com>
2329
2330 PR c/84999
2331 * c-typeck.c (build_binary_op): If c_common_type_for_size fails when
2332 building vector comparison, diagnose it and return error_mark_node.
2333
9bb45a95
JJ
23342018-03-15 Jakub Jelinek <jakub@redhat.com>
2335
2336 PR c/84853
2337 * c-typeck.c (build_binary_op) <case RSHIFT_EXPR, case LSHIFT_EXPR>:
2338 If code1 is INTEGER_TYPE, only allow code0 VECTOR_TYPE if it has
2339 INTEGER_TYPE element type.
2340
ada6bad9
DP
23412018-03-13 David Pagan <dave.pagan@oracle.com>
2342
2343 PR c/46921
2344 * c-typeck.c (output_init_element): Ensure field initializer
2345 expression is always evaluated if there are side effects.
2346
849bbdb9
JJ
23472018-03-06 Jakub Jelinek <jakub@redhat.com>
2348
2349 PR c/84721
2350 * c-parser.c (add_debug_begin_stmt): Don't add DEBUG_BEGIN_STMT if
2351 !building_stmt_list_p ().
2352
d74641bd
RS
23532018-02-13 Richard Sandiford <richard.sandiford@linaro.org>
2354
2355 PR c/84305
2356 * c-decl.c (grokdeclarator): Create an anonymous TYPE_DECL
2357 in PARM and TYPENAME contexts too, but attach it to a BIND_EXPR
2358 and include the BIND_EXPR in the list of things that need to be
2359 pre-evaluated.
2360
0444aa9c
NS
23612018-02-09 Nathan Sidwell <nathan@acm.org>
2362
2363 PR c/84293
2364 * c-typeck.c (build_indirect_ref, build_c_cast): Pass expr location
2365 to strict_aliasing_warning.
2366
7c30b12a
PC
23672018-02-02 Paolo Carlini <paolo.carlini@oracle.com>
2368
2369 * c-typeck.c (really_start_incremental_init, push_init_level,
2370 set_nonincremental_init, output_init_element, process_init_element):
2371 Use DECL_UNNAMED_BIT_FIELD.
2372
2be4dfcb
MP
23732018-01-31 Marek Polacek <polacek@redhat.com>
2374
2375 PR c/81779
2376 * c-parser.c (c_parser_compound_statement_nostart): Call
2377 expansion_point_location_if_in_system_header.
2378
bb9869d5
DM
23792018-01-17 David Malcolm <dmalcolm@redhat.com>
2380
2381 PR c++/83814
2382 * c-fold.c (fold_for_warn): Move from c-common.c, reducing to just
2383 the C part.
2384
b4923738
JJ
23852018-01-13 Jakub Jelinek <jakub@redhat.com>
2386
2387 PR c/83801
2388 * c-tree.h (decl_constant_value_1): Add a bool argument.
2389 * c-typeck.c (decl_constant_value_1): Add IN_INIT argument, allow
2390 returning a CONSTRUCTOR if it is true. Use error_operand_p.
2391 (decl_constant_value): Adjust caller.
2392 * c-fold.c (c_fully_fold_internal): If in_init, pass true to
2393 decl_constant_value_1 as IN_INIT. Otherwise, punt if
2394 decl_constant_value returns initializer that has BLKmode or
2395 array type.
2396 (c_fully_fold_internal) <case COMPONENT_REF>: Fold if !lval.
2397
928686b1
RS
23982018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
2399 Alan Hayward <alan.hayward@arm.com>
2400 David Sherwood <david.sherwood@arm.com>
2401
2402 * c-typeck.c (comptypes_internal, build_binary_op): Handle polynomial
2403 TYPE_VECTOR_SUBPARTS.
2404
85ec4feb
JJ
24052018-01-03 Jakub Jelinek <jakub@redhat.com>
2406
2407 Update copyright years.
2408
913884f7
JJ
24092018-01-01 Jakub Jelinek <jakub@redhat.com>
2410
2411 PR c/83595
2412 * c-parser.c (c_parser_braced_init, c_parser_initelt,
2413 c_parser_conditional_expression, c_parser_cast_expression,
2414 c_parser_sizeof_expression, c_parser_alignof_expression,
2415 c_parser_postfix_expression, c_parser_omp_declare_reduction,
2416 c_parser_transaction_expression): Use set_error () method instead
2417 of setting value member to error_mark_node.
2418
c6cfa2bf
MM
24192017-12-28 Michael Meissner <meissner@linux.vnet.ibm.com>
2420
2421 * c-decl.c (header_for_builtin_fn): Add integer rounding _Float<N>
2422 and _Float<N>X built-in functions.
2423
11d29d63
JJ
24242017-12-22 Jakub Jelinek <jakub@redhat.com>
2425
14ec014e
JJ
2426 PR debug/83550
2427 * c-decl.c (finish_struct): Set DECL_SOURCE_LOCATION on
2428 TYPE_STUB_DECL and call rest_of_type_compilation before processing
2429 incomplete vars rather than after it.
2430
11d29d63
JJ
2431 PR debug/83547
2432 * c-typeck.c (c_finish_stmt_expr): Ignore !TREE_SIDE_EFFECTS as
2433 indicator of ({ }), instead skip all trailing DEBUG_BEGIN_STMTs first,
2434 and consider empty ones if there are no other stmts. For
2435 -Wunused-value walk all statements before the one only followed by
2436 DEBUG_BEGIN_STMTs.
2437
170a8bd6 24382017-12-22 Mike Stump <mikestump@comcast.net>
92a285c1 2439 Eric Botcazou <ebotcazou@adacore.com>
170a8bd6
EB
2440
2441 * c-parser.c (c_parser_while_statement): Add unroll parameter and
2442 build ANNOTATE_EXPR if present. Add 3rd operand to ANNOTATE_EXPR.
2443 (c_parser_do_statement): Likewise.
2444 (c_parser_for_statement): Likewise.
2445 (c_parser_statement_after_labels): Adjust calls to above.
2446 (c_parse_pragma_ivdep): New static function.
2447 (c_parser_pragma_unroll): Likewise.
2448 (c_parser_pragma) <PRAGMA_IVDEP>: Add support for pragma Unroll.
2449 <PRAGMA_UNROLL>: New case.
2450
01512446
JJ
24512017-12-19 Jakub Jelinek <jakub@redhat.com>
2452
2453 * c-typeck.c (comptypes_internal, function_types_compatible_p,
2454 perform_integral_promotions, digest_init): Replace Yoda conditions
2455 with typical order conditions.
2456 * c-decl.c (check_bitfield_type_and_width): Likewise.
2457
c65e18d3
BE
24582017-12-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
2459
2460 * c-typeck.c (c_safe_arg_type_equiv_p,
2461 c_safe_function_type_cast_p): New function.
2462 (build_c_cast): Implement -Wcast-function-type.
2463
b7280579
RB
24642017-12-14 Richard Biener <rguenther@suse.de>
2465
2466 PR c/83415
2467 * c-fold.c (c_fully_fold_internal): Treat VIEW_CONVERT_EXPR
2468 like REALPART_EXPR for the behavior of whether its operand
2469 is an lvalue.
2470
49e6a6c0
MP
24712017-12-12 Marek Polacek <polacek@redhat.com>
2472
2473 PR c/82679
2474 * c-decl.c (grokdeclarator): Check declspecs insted of atomicp.
2475
ab20d992 24762017-12-12 Alexandre Oliva <aoliva@redhat.com>
96a95ac1
AO
2477
2478 * c-objc-common.h (LANG_HOOKS_EMITS_BEGIN_STMT): Redefine as true.
2479 * c-parser.c (add_debug_begin_stmt): New.
2480 (c_parser_declaration_or_fndef): Call it.
2481 (c_parser_compound_statement_nostart): Likewise.
2482 (c_parser_statement_after_labels): Likewise.
2483 * c-typeck (c_finish_stmt_expr): Skip begin stmts markers.
2484
4b2b493f
JM
24852017-12-07 Joseph Myers <joseph@codesourcery.com>
2486
2487 * c-decl.c (build_compound_literal): Add parameter alignas_align
2488 and set alignment of decl if nonzero.
2489 * c-parser.c (c_keyword_starts_typename): Allow RID_ALIGNAS.
2490 (c_parser_declspecs): Allow RID_ALIGNAS to follow a type, like a
2491 qualifier.
2492 (c_parser_struct_declaration): Update syntax comment.
2493 (c_parser_type_name): Add alignas_ok argument and pass it to
2494 c_parser_declspecs.
2495 (c_parser_cast_expression): Pass true to c_parser_type_name and
2496 give error if a cast used an _Alignas specifier.
2497 (c_parser_sizeof_expression): Pass true to c_parser_type_name and
2498 give error if sizeof (type-name) used an _Alignas specifier.
2499 (c_parser_alignof_expression): Pass true to c_parser_type_name and
2500 give error if _Alignof (type-name) used an _Alignas specifier.
2501 (c_parser_postfix_expression_after_paren_type): Check specified
2502 alignment for a compound literal and pass it to
2503 build_compound_literal.
2504 * c-parser.h (c_parser_type_name): Update prototype.
2505 * c-tree.h (build_compound_literal): Update prototype.
2506
5d9ae53d
MS
25072017-12-07 Martin Sebor <msebor@redhat.com>
2508
2509 PR c/81544
2510 * c-decl.c (c_decl_attributes): Look up existing declaration and
2511 pass it to decl_attributes.
2512
c79144f8
DM
25132017-12-06 David Malcolm <dmalcolm@redhat.com>
2514
2515 PR c/83236
2516 * c-decl.c (lookup_name_fuzzy): Don't suggest names that are
2517 reserved for use by the implementation.
2518
613bc14f
DM
25192017-12-06 David Malcolm <dmalcolm@redhat.com>
2520
2521 * c-decl.c: Include "c-family/c-spellcheck.h".
2522
05abad4c
ML
25232017-12-05 Martin Liska <mliska@suse.cz>
2524 Jakub Jelinek <jakub@redhat.com>
2525
2526 * c-typeck.c (pointer_diff): Add new argument and instrument
2527 pointer subtraction.
2528 (build_binary_op): Similar for pointer comparison.
2529
cc6534d4
JJ
25302017-12-01 Jakub Jelinek <jakub@redhat.com>
2531
65791f42
JJ
2532 PR c/79153
2533 * c-parser.c: Include tree-iterator.h.
2534 (c_parser_switch_statement): Emit LABEL_EXPR for the break label
2535 into SWITCH_BODY instead of after it and set SWITCH_BREAK_LABEL_P
2536 on it.
2537
cc6534d4
JJ
2538 PR c/83222
2539 * c-tree.h (decl_constant_value_1): Declare.
2540 * c-typeck.c (decl_constant_value_1): New function.
2541 (decl_constant_value): Use it.
2542 * c-fold.c (c_fully_fold_internal): If in_init, use
2543 decl_constant_value_1 instead of decl_constant_value.
2544
5de73c05
JJ
25452017-11-30 Jakub Jelinek <jakub@redhat.com>
2546
2547 * c-parser.c (c_parser_postfix_expression): Use ; instead of ;;.
2548
058f0b9e
JJ
25492017-11-28 Jakub Jelinek <jakub@redhat.com>
2550
2551 PR sanitizer/81275
2552 * c-typeck.c (c_finish_case): Set SWITCH_ALL_CASES_P if
2553 c_switch_covers_all_cases_p returns true.
2554
5e9d6aa4 25552017-11-28 Julia Koval <julia.koval@intel.com>
92a285c1 2556 Sebastian Peryt <sebastian.peryt@intel.com>
5e9d6aa4
JK
2557
2558 * Make-lang.in (c/c-array-notation.o): Remove.
2559 * c-array-notation.c: Delete.
2560 * c-decl.c: Remove cilkplus condition.
2561 * c-parser.c (c_parser_cilk_simd, c_parser_cilk_for,
2562 c_parser_cilk_verify_simd, c_parser_array_notation,
2563 c_parser_cilk_clause_vectorlength, c_parser_cilk_grainsize,
2564 c_parser_cilk_simd_fn_vector_attrs,
2565 c_finish_cilk_simd_fn_tokens): Delete.
2566 (c_parser_declaration_or_fndef): Remove cilkplus condition.
2567 (c_parser_direct_declarator_inner): Ditto.
2568 (CILK_SIMD_FN_CLAUSE_MASK): Delete.
2569 (c_parser_attributes, c_parser_compound_statement,
2570 c_parser_statement_after_labels, c_parser_if_statement,
2571 c_parser_switch_statement, c_parser_while_statement,
2572 c_parser_do_statement, c_parser_for_statement,
2573 c_parser_unary_expression, c_parser_postfix_expression,
2574 c_parser_postfix_expression_after_primary,
2575 c_parser_pragma, c_parser_omp_clause_name, c_parser_omp_all_clauses,
2576 c_parser_omp_for_loop, c_finish_omp_declare_simd): Remove cilkplus
2577 support.
2578 * c-typeck.c (build_array_ref, build_function_call_vec,
2579 convert_arguments,
2580 lvalue_p, build_compound_expr, c_finish_return, c_finish_if_stmt,
2581 c_finish_loop, build_binary_op): Remove cilkplus support.
2582
9e851845
JJ
25832017-11-28 Jakub Jelinek <jakub@redhat.com>
2584
2585 * c-typeck.c (c_start_case): Build SWITCH_EXPR using build2 instead
2586 of build3.
2587
ab20d992 25882017-11-14 Boris Kolpackov <boris@codesynthesis.com>
8c7dbea9
BK
2589
2590 * Make-lang.in (c.install-plugin): Install backend import library.
2591
41521dee
JJ
25922017-11-23 Jakub Jelinek <jakub@redhat.com>
2593
2594 * c-parser.c (c_parser_omp_declare_simd): Reject declare simd in
2595 pragma_stmt context.
2596
ac9effed
EB
25972017-11-23 Mike Stump <mikestump@comcast.net>
2598 Eric Botcazou <ebotcazou@adacore.com>
2599
2600 * c-parser.c (c_parser_while_statement): Pass 3rd operand to
2601 ANNOTATE_EXPR.
2602 (c_parser_do_statement): Likewise.
2603 (c_parser_for_statement): Likewise.
2604
ce95abc4
DM
26052017-11-22 David Malcolm <dmalcolm@redhat.com>
2606
2607 PR c++/62170
2608 * c-objc-common.c (c_tree_printer): Convert penultimate param from
2609 bool to bool *. Within '%T' handling, if showing an "aka", use
2610 "quoted" param to add appropriate quoting.
2611
974aedcc
MP
26122017-11-22 Marek Polacek <polacek@redhat.com>
2613
2614 PR c++/60336
2615 PR middle-end/67239
2616 PR target/68355
2617 * c-decl.c (grokdeclarator): Set DECL_PADDING_P on unnamed bit-fields.
2618
d4300cc6
DM
26192017-11-21 David Malcolm <dmalcolm@redhat.com>
2620
2621 PR c/83056
2622 * c-decl.c (lookup_name_fuzzy): Don't suggest names that came from
2623 earlier failed lookups.
2624
1af4ebf5
MG
26252017-11-21 Marc Glisse <marc.glisse@inria.fr>
2626
2627 * c-fold.c (c_fully_fold_internal): Handle POINTER_DIFF_EXPR.
2628 * c-typeck.c (pointer_diff): Use POINTER_DIFF_EXPR.
2629
26edace6
DM
26302017-11-20 David Malcolm <dmalcolm@redhat.com>
2631
2632 PR c/81404
2633 * c-decl.c: Include "c-family/known-headers.h".
2634 (get_c_name_hint): Rename to get_stdlib_header_for_name and move
2635 to known-headers.cc.
2636 (class suggest_missing_header): Move to known-header.h.
2637 (lookup_name_fuzzy): Call get_c_stdlib_header_for_name rather
2638 than get_c_name_hint.
2639
b1212255
DM
26402017-11-20 David Malcolm <dmalcolm@redhat.com>
2641
2642 * c-decl.c (get_c_name_hint): New function.
2643 (class suggest_missing_header): New class.
2644 (lookup_name_fuzzy): Call get_c_name_hint and use it to
2645 suggest missing headers to the user.
2646
6c7a259b
DM
26472017-11-20 David Malcolm <dmalcolm@redhat.com>
2648
2649 * c-decl.c: Define INCLUDE_UNIQUE_PTR before including system.h.
2650 Include "c-family/name-hint.h"
2651 (implicit_decl_warning): Convert "hint" from
2652 const char * to name_hint. Pass location to
2653 lookup_name_fuzzy. Suppress any deferred diagnostic if the
2654 warning was not printed.
2655 (undeclared_variable): Likewise for "guessed_id".
2656 (lookup_name_fuzzy): Convert return type from const char *
2657 to name_hint. Add location_t param.
2658 * c-parser.c: Define INCLUDE_UNIQUE_PTR before including system.h.
2659 Include "c-family/name-hint.h"
2660 (c_parser_declaration_or_fndef): Convert "hint" from
2661 const char * to name_hint. Pass location to lookup_name_fuzzy.
2662 (c_parser_parameter_declaration): Likewise.
2663
f9c59f7e
JJ
26642017-11-19 Jakub Jelinek <jakub@redhat.com>
2665
2666 PR c/66618
2667 PR c/69960
2668 * c-parser.c (c_parser_omp_atomic): Pass true as LVAL to c_fully_fold
2669 where needed.
2670 * c-typeck.c (build_unary_op, build_modify_expr, build_asm_expr,
2671 handle_omp_array_sections): Likewise.
2672 (digest_init): Don't call decl_constant_value_for_optimization.
2673 * c-tree.h (decl_constant_value_for_optimization): Removed.
2674 * c-fold.c (c_fold_array_ref): New function.
2675 (c_fully_fold_internal): Add LVAL argument, propagate it through
2676 recursive calls. For VAR_P call decl_constant_value and
2677 unshare if not LVAL and either optimizing or IN_INIT. Remove
2678 decl_constant_value_for_optimization calls. If IN_INIT and not LVAL,
2679 fold ARRAY_REF with STRING_CST and INTEGER_CST operands.
2680 (c_fully_fold): Add LVAL argument, pass it through to
2681 c_fully_fold_internal.
2682 (decl_constant_value_for_optimization): Removed.
2683
3ca0dc60
JM
26842017-11-15 Joseph Myers <joseph@codesourcery.com>
2685
2686 PR c/81156
2687 * c-parser.c (check_tgmath_function): New function.
2688 (enum tgmath_parm_kind): New enum.
2689 (c_parser_postfix_expression): Handle __builtin_tgmath.
2690
64a5912c
DM
26912017-10-31 David Malcolm <dmalcolm@redhat.com>
2692
2693 * c-decl.c (implicit_decl_warning): Update for renaming of
2694 pedwarn_at_rich_loc and warning_at_rich_loc.
2695 (implicitly_declare): Likewise for renaming of inform_at_rich_loc.
2696 (undeclared_variable): Likewise for renaming of error_at_rich_loc.
2697 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
2698 (c_parser_struct_or_union_specifier): Likewise for renaming of
2699 pedwarn_at_rich_loc.
2700 (c_parser_parameter_declaration): Likewise for renaming of
2701 error_at_rich_loc.
2702 * c-typeck.c (build_component_ref): Likewise.
2703 (build_unary_op): Likewise for renaming of inform_at_rich_loc.
2704 (pop_init_level): Likewise for renaming of warning_at_rich_loc.
2705 (set_init_label): Likewise for renaming of error_at_rich_loc.
2706
c1136864
RB
27072017-10-30 Richard Biener <rguenther@suse.de>
2708
2709 * gimple-parser.c (c_parser_gimple_statement): Parse conditional
2710 stmts.
2711
ee5fd23a
MM
27122017-10-27 Michael Meissner <meissner@linux.vnet.ibm.com>
2713
2714 * c-decl.c (header_for_builtin_fn): Add support for copysign, fma,
2715 fmax, fmin, and sqrt _Float<N> and _Float<N>X variants.
2716
1a59ccf2
DM
27172017-10-25 David Malcolm <dmalcolm@redhat.com>
2718
2719 PR c/7356
2720 * c-parser.c (c_parser_declaration_or_fndef): Detect missing
2721 semicolons.
2722
bc1a75dd
JJ
27232017-10-25 Jakub Jelinek <jakub@redhat.com>
2724
2725 PR libstdc++/81706
2726 * c-decl.c (merge_decls): Copy "omp declare simd" attributes from
2727 newdecl to corresponding __builtin_ if any.
2728
ff1ff960
PC
27292017-10-24 Paolo Carlini <paolo.carlini@oracle.com>
2730
2731 PR c++/82466
2732 * c-decl.c (diagnose_mismatched_decls): Use
2733 OPT_Wbuiltin_declaration_mismatch.
2734
62e1c678
DM
27352017-10-12 David Malcolm <dmalcolm@redhat.com>
2736
2737 * c-parser.c (c_parser_require): Add "type_is_unique" param and
2738 use it to guard calls to maybe_suggest_missing_token_insertion.
2739 (c_parser_parms_list_declarator): Override default value of new
2740 "type_is_unique" param to c_parser_require.
2741 (c_parser_asm_statement): Likewise.
2742 * c-parser.h (c_parser_require): Add "type_is_unique" param,
2743 defaulting to true.
2744
a92f6726
NS
27452017-10-11 Nathan Sidwell <nathan@acm.org>
2746
2747 * c-decl.c (grokdeclarator): Check HAS_DECL_ASSEMBLER_NAME_P too.
2748
8e6cdc90
RS
27492017-10-10 Richard Sandiford <richard.sandiford@linaro.org>
2750
2751 * c-parser.c (c_parser_cilk_clause_vectorlength): Use wi::to_wide when
2752 operating on trees as wide_ints.
2753 * c-typeck.c (build_c_cast, c_finish_omp_clauses): Likewise.
2754 (c_tree_equal): Likewise.
2755
8139a48e
DM
27562017-10-04 David Malcolm <dmalcolm@redhat.com>
2757
2758 * c-decl.c (push_parm_decl): Store c_parm's location into the
2759 PARAM_DECL.
2760 (build_c_parm): Add "loc" param and store it within the c_parm.
2761 * c-parser.c (struct c_parser): Add "last_token_location" field.
2762 (c_parser_consume_token): Store location of the token into the
2763 new field.
2764 (c_parser_declaration_or_fndef): Store params into DECL_ARGUMENTS
2765 when handling a FUNCTION_DECL, if it doesn't already have them.
2766 (c_parser_parameter_declaration): Generate a location for the
2767 parameter, and pass it to the call to build_c_parm.
2768 * c-tree.h (struct c_parm): Add field "loc".
2769 (build_c_parm): Add location_t param.
2770 * c-typeck.c (get_fndecl_argument_location): New function.
2771 (inform_for_arg): New function.
2772 (convert_for_assignment): Use inform_for_arg when dealing with
2773 ic_argpass.
2774
2a389958
JJ
27752017-09-29 Jakub Jelinek <jakub@redhat.com>
2776
7d386d45
JJ
2777 * c-decl.c (grokfield): Use SET_DECL_C_BIT_FIELD here if
2778 width is non-NULL.
2779 (finish_struct): Test DECL_C_BIT_FIELD instead of DECL_INITIAL,
2780 don't SET_DECL_C_BIT_FIELD here.
2781
2a389958
JJ
2782 PR c/82340
2783 * c-decl.c (build_compound_literal): Use c_apply_type_quals_to_decl
2784 instead of trying to set just TREE_READONLY manually.
2785
ebc6a85e
TV
27862017-09-16 Tom de Vries <tom@codesourcery.com>
2787
2788 PR c/81875
2789 * c-parser.c (c_parser_omp_for_loop): Fold only operands of cond, not
2790 cond itself.
2791
bb75facd
JM
27922017-09-15 Joseph Myers <joseph@codesourcery.com>
2793
2794 PR c/82071
2795 * c-typeck.c (ep_convert_and_check): Just call convert_and_check
2796 for C11.
2797 (build_conditional_expr): For C11, generate result with excess
2798 precision when one argument is an integer and the other is of a
2799 type using excess precision.
2800
1d933576
BE
28012017-09-15 Bernd Edlinger <bernd.edlinger@hotmail.de>
2802
2803 * c-typeck.c (build_c_cast): Implement -Wcast-align=strict.
2804
267bbb6f
MP
28052017-09-13 Marek Polacek <polacek@redhat.com>
2806
2807 PR c/82167
2808 * c-typeck.c (c_expr_sizeof_expr): Use the type of expr.value rather
2809 than expr.original_type.
2810
6836632e
NS
28112017-09-12 Nathan Sidwell <nathan@acm.org>
2812
2813 * c-decl.c (field_decl_cmp, resort_data, resort_field_decl_cmp,
2814 resort_sorted_fields): Moved from c-family/c-common.c.
2815 * c-lang.h (struct sorted_fields_type): Moved from c-family/c-common.h.
2816
e035be33
JM
28172017-09-01 Joseph Myers <joseph@codesourcery.com>
2818
2819 PR c/82071
2820 * c-typeck.c (build_atomic_assign): Handle argument with excess
2821 precision. Ensure any EXCESS_PRECISION_EXPR is present in
2822 argument passed to build_binary_op and convert_for_assignment but
2823 not for call to c_fully_fold.
2824 (build_modify_expr): Do not remove EXCESS_PRECISION_EXPR early.
2825 Ensure build_binary_op is called with argument with original
2826 semantic type. Avoid calling c_fully_fold with an
2827 EXCESS_PRECISION_EXPR from build_binary_op.
2828
d2e05fcb
JJ
28292017-09-01 Jakub Jelinek <jakub@redhat.com>
2830
2831 PR c/81887
2832 * c-parser.c (c_parser_omp_ordered): Handle -fopenmp-simd.
2833
b397965c
RS
28342017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
2835 Alan Hayward <alan.hayward@arm.com>
2836 David Sherwood <david.sherwood@arm.com>
2837
2838 * c-typeck.c (build_binary_op): Use SCALAR_TYPE_MODE.
2839 (c_common_type): Likewise. Use as_a <scalar_mode> when setting
2840 m1 and m2 to the signed equivalent of a fixed-point
2841 SCALAR_TYPE_MODE.
2842
14e18d71
DM
28432017-08-24 David Malcolm <dmalcolm@redhat.com>
2844
2845 * c-tree.h (c_expr::get_location) Use EXPR_HAS_LOCATION rather
2846 than CAN_HAVE_LOCATION_P when determining whether to use the
2847 location_t value within "value".
2848
7f204c0f
DM
28492017-08-21 David Malcolm <dmalcolm@redhat.com>
2850
2851 * c-parser.c (c_parser_expr_list): Use c_expr::get_location ()
2852 rather than peeking the location of the first token.
2853 * c-tree.h (c_expr::get_location): New method.
2854
2f687306
DM
28552017-08-21 David Malcolm <dmalcolm@redhat.com>
2856
2857 * c-typeck.c (build_function_call_vec): Pass arg_loc to call
2858 to check_function_arguments.
2859
3e7b80d7
MP
28602017-08-18 Marek Polacek <polacek@redhat.com>
2861
2862 * c-parser.c (c_parser_postfix_expression): Remove unused code. Update
2863 commentary.
2864
00aa1fa2
L
28652017-08-18 H.J. Lu <hongjiu.lu@intel.com>
2866
2867 PR c/53037
2868 * c-decl.c (merge_decls): Also merge DECL_WARN_IF_NOT_ALIGN.
2869 (check_bitfield_type_and_width): Don't allow bit-field with
2870 warn_if_not_aligned type.
2871
da67acb9
MS
28722017-08-14 Martin Sebor <msebor@redhat.com>
2873
2874 PR c/81117
2875 * c-objc-common.c (c_objc_common_init): Handle 'G'.
2876
bb85aa74
MP
28772017-08-11 Marek Polacek <polacek@redhat.com>
2878
2879 PR c/81795
2880 * c-decl.c (pushtag): Only print inform if the warning was printed.
2881 (grokdeclarator): Likewise.
2882
32129a17
DM
28832017-08-10 David Malcolm <dmalcolm@redhat.com>
2884
2885 * c-parser.c (c_parser_error): Rename to...
2886 (c_parser_error_richloc): ...this, making static, and adding
2887 "richloc" parameter, passing it to the c_parse_error call,
2888 rather than calling c_parser_set_source_position_from_token.
2889 (c_parser_error): Reintroduce, reimplementing in terms of the
2890 above, converting return type from void to bool.
2891 (class token_pair): New class.
2892 (struct matching_paren_traits): New struct.
2893 (matching_parens): New typedef.
2894 (struct matching_brace_traits): New struct.
2895 (matching_braces): New typedef.
2896 (get_matching_symbol): New function.
2897 (c_parser_require): Add param MATCHING_LOCATION, using it to
2898 highlight matching "opening" tokens for missing "closing" tokens.
2899 (c_parser_skip_until_found): Likewise.
2900 (c_parser_static_assert_declaration_no_semi): Convert explicit
2901 parsing of CPP_OPEN_PAREN and CPP_CLOSE_PAREN to use of
2902 class matching_parens, so that the pertinent open parenthesis is
2903 highlighted when there are problems locating the close
2904 parenthesis.
2905 (c_parser_struct_or_union_specifier): Likewise.
2906 (c_parser_typeof_specifier): Likewise.
2907 (c_parser_alignas_specifier): Likewise.
2908 (c_parser_simple_asm_expr): Likewise.
2909 (c_parser_braced_init): Likewise, for matching_braces.
2910 (c_parser_paren_condition): Likewise, for matching_parens.
2911 (c_parser_switch_statement): Likewise.
2912 (c_parser_for_statement): Likewise.
2913 (c_parser_asm_statement): Likewise.
2914 (c_parser_asm_operands): Likewise.
2915 (c_parser_cast_expression): Likewise.
2916 (c_parser_sizeof_expression): Likewise.
2917 (c_parser_alignof_expression): Likewise.
2918 (c_parser_generic_selection): Likewise.
2919 (c_parser_postfix_expression): Likewise for cases RID_VA_ARG,
2920 RID_OFFSETOF, RID_TYPES_COMPATIBLE_P, RID_AT_SELECTOR,
2921 RID_AT_PROTOCOL, RID_AT_ENCODE, reindenting as necessary.
2922 In case CPP_OPEN_PAREN, pass loc_open_paren to the
2923 c_parser_skip_until_found call.
2924 (c_parser_objc_class_definition): Use class matching_parens as
2925 above.
2926 (c_parser_objc_method_decl): Likewise.
2927 (c_parser_objc_try_catch_finally_statement): Likewise.
2928 (c_parser_objc_synchronized_statement): Likewise.
2929 (c_parser_objc_at_property_declaration): Likewise.
2930 (c_parser_oacc_wait_list): Likewise.
2931 (c_parser_omp_var_list_parens): Likewise.
2932 (c_parser_omp_clause_collapse): Likewise.
2933 (c_parser_omp_clause_default): Likewise.
2934 (c_parser_omp_clause_if): Likewise.
2935 (c_parser_omp_clause_num_threads): Likewise.
2936 (c_parser_omp_clause_num_tasks): Likewise.
2937 (c_parser_omp_clause_grainsize): Likewise.
2938 (c_parser_omp_clause_priority): Likewise.
2939 (c_parser_omp_clause_hint): Likewise.
2940 (c_parser_omp_clause_defaultmap): Likewise.
2941 (c_parser_oacc_single_int_clause): Likewise.
2942 (c_parser_omp_clause_ordered): Likewise.
2943 (c_parser_omp_clause_reduction): Likewise.
2944 (c_parser_omp_clause_schedule): Likewise.
2945 (c_parser_omp_clause_num_teams): Likewise.
2946 (c_parser_omp_clause_thread_limit): Likewise.
2947 (c_parser_omp_clause_aligned): Likewise.
2948 (c_parser_omp_clause_linear): Likewise.
2949 (c_parser_omp_clause_safelen): Likewise.
2950 (c_parser_omp_clause_simdlen): Likewise.
2951 (c_parser_omp_clause_depend): Likewise.
2952 (c_parser_omp_clause_map): Likewise.
2953 (c_parser_omp_clause_device): Likewise.
2954 (c_parser_omp_clause_dist_schedule): Likewise.
2955 (c_parser_omp_clause_proc_bind): Likewise.
2956 (c_parser_omp_clause_uniform): Likewise.
2957 (c_parser_omp_for_loop): Likewise.
2958 (c_parser_cilk_clause_vectorlength): Likewise.
2959 (c_parser_cilk_clause_linear): Likewise.
2960 (c_parser_transaction_expression): Likewise.
2961 * c-parser.h (c_parser_require): Add param matching_location with
2962 default UNKNOWN_LOCATION.
2963 (c_parser_error): Convert return type from void to bool.
2964 (c_parser_skip_until_found): Add param matching_location with
2965 default UNKNOWN_LOCATION.
2966
30af3a2b
MP
29672017-08-09 Marek Polacek <polacek@redhat.com>
2968
2969 * c-decl.c (build_enumerator): Use true/false instead of 1/0.
2970 * c-tree.h (build_external_ref): Update declaration.
2971 * c-typeck.c (build_array_ref): Use true/false instead of 1/0.
2972 (build_external_ref): Change the type of a parameter to bool.
2973 (parser_build_binary_op): Use true/false instead of 1/0.
2974 (pointer_diff): Likewise.
2975 (build_modify_expr): Likewise.
2976 (set_designator): Change the type of a parameter to bool.
2977 (set_init_index): Use true/false instead of 1/0.
2978 (set_init_label): Likewise.
2979 (output_init_element): Change the type of a parameter to bool.
2980 (output_pending_init_elements): Use true/false instead of 1/0.
2981 (process_init_element): Likewise.
2982 (build_binary_op): Change the type of a parameter to bool.
2983
296c53ac
MP
29842017-08-09 Marek Polacek <polacek@redhat.com>
2985
2986 PR c/81233
2987 * c-typeck.c (pedwarn_init): Make the function take a variable list.
2988 Call emit_diagnostic_valist instead of pedwarn.
2989 (convert_for_assignment): Unroll the PEDWARN_FOR_ASSIGNMENT macro.
2990 Print the relevant types in diagnostics.
2991
a32c8316
MP
29922017-08-09 Marek Polacek <polacek@redhat.com>
2993
2994 PR c/81417
2995 * c-array-notation.c (fix_builtin_array_notation_fn): Update calls to
ab20d992 2996 build_conditional_expr.
a32c8316
MP
2997 * c-parser.c (c_parser_conditional_expression): Create locations for
2998 EXP1 and EXP2 from their source ranges. Pass the locations down to
2999 build_conditional_expr.
3000 * c-tree.h (build_conditional_expr): Update declaration.
3001 * c-typeck.c (build_conditional_expr): Add location_t parameters.
3002 For -Wsign-compare, also print the types.
3003
314e6352
ML
30042017-08-08 Martin Liska <mliska@suse.cz>
3005
3006 * c-convert.c: Include header files.
3007 * c-typeck.c: Likewise.
3008
577eec56
ML
30092017-08-07 Martin Liska <mliska@suse.cz>
3010
3011 * c-parser.c (c_parser_attributes): Canonicalize name of an
3012 attribute.
3013
f7b6353a
MP
30142017-08-02 Marek Polacek <polacek@redhat.com>
3015
3016 PR c/81289
3017 * c-parser.c (c_parser_unary_expression): Use set_error.
3018
8a6eab34
MP
3019 PR c/81448
3020 PR c/81306
3021 * c-warn.c (warn_for_multistatement_macros): Prevent bogus
3022 warnings. Avoid walking MACRO_MAP_LOCATIONS.
3023
ab20d992 30242017-07-31 Jan Hubicka <hubicka@ucw.cz>
7fef86d3
JH
3025 Martin Liska <mliska@suse.cz>
3026
3027 * c-typeck.c (c_finish_goto_label): Build gimple predict
f7b6353a 3028 statement.
7fef86d3 3029
f34ebeb2
ML
30302017-07-31 Martin Liska <mliska@suse.cz>
3031
3032 PR sanitize/81530
3033 * c-convert.c (convert): Guard condition with flag_sanitize_p
3034 also with current_function_decl non-null equality.
3035 * c-decl.c (grokdeclarator): Likewise.
3036 * c-typeck.c (build_binary_op): Likewise.
3037
8595f67b
MP
30382017-07-25 Marek Polacek <polacek@redhat.com>
3039
3040 * c-decl.c (grokfield): Remove local variable.
3041
d49718d6
MP
30422017-07-25 Marek Polacek <polacek@redhat.com>
3043
3044 PR c/81364
3045 * c-parser.c (c_parser_else_body): Don't warn about multistatement
3046 macro expansion if the body is in { }.
3047 (c_parser_while_statement): Likewise.
3048 (c_parser_for_statement): Likewise.
3049
ff22eb12
NS
30502017-07-18 Nathan Sidwell <nathan@acm.org>
3051
3052 * c-parser.c (c_parser_array_notation): Use TYPE_{MIN,MAX}_VALUE.
3053
eea77d1f
DM
30542017-07-14 David Malcolm <dmalcolm@redhat.com>
3055
3056 * c-decl.c (implicitly_declare): When suggesting a missing
3057 #include, provide a fix-it hint.
3058
b6f43128
DM
30592017-07-06 David Malcolm <dmalcolm@redhat.com>
3060
3061 * c-lang.c (selftest::run_c_tests): Move body to c_family_tests,
3062 and call that instead.
3063 * c-tree.h (selftest::run_c_tests): New decl.
3064
3e2becc4
MP
30652017-06-26 Marek Polacek <polacek@redhat.com>
3066
3067 PR c/80116
3068 * c-parser.c (c_parser_if_body): Set the location of the
3069 body of the conditional after parsing all the labels. Call
3070 warn_for_multistatement_macros.
3071 (c_parser_else_body): Likewise.
3072 (c_parser_switch_statement): Likewise.
3073 (c_parser_while_statement): Likewise.
3074 (c_parser_for_statement): Likewise.
3075 (c_parser_statement): Add a default argument. Save the location
3076 after labels have been parsed.
3077 (c_parser_c99_block_statement): Likewise.
3078
343ae898
RB
30792017-06-19 Richard Biener <rguenther@suse.de>
3080
3081 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
3082 negated _Literals to parse _Literal (int) -1.
3083
45b2222a
ML
30842017-06-13 Martin Liska <mliska@suse.cz>
3085
3086 PR sanitize/78204
3087 * c-convert.c (convert): Use sanitize_flags_p.
3088 * c-decl.c (grokdeclarator): Likewise.
3089 * c-typeck.c (convert_for_assignment): Likewise.
3090 (c_finish_return): Likewise.
3091 (build_binary_op): Likewise.
3092
8ab7005b
JJ
30932017-06-08 Jakub Jelinek <jakub@redhat.com>
3094
3095 PR c/81006
3096 * c-typeck.c (handle_omp_array_sections_1): Convert TYPE_MAX_VALUE
3097 to sizetype before size_binop.
3098
363dc72c
JJ
30992017-06-07 Jakub Jelinek <jakub@redhat.com>
3100
3101 * gimple-parser.c (c_parser_parse_gimple_body): Use TDI_gimple instead
3102 of TDI_generic.
3103
dc949728
MP
31042017-06-06 Marek Polacek <polacek@redhat.com>
3105
3106 PR c/79983
3107 * c-decl.c (start_struct): Use the location of TYPE_STUB_DECL of
3108 ref.
3109 (start_enum): Use the location of TYPE_STUB_DECL of enumtype.
3110
40ffd95f
BE
31112017-06-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
3112
3113 * c-parser.c (c_parser_binary_expression): Implement the
3114 -Wsizeof_pointer_div warning.
3115 (c_parser_postfix_expression): Allow SIZEOF_EXPR as expr.original_code
3116 from a parenthesized expression.
3117 (c_parser_expr_list): Use c_last_sizeof_loc.
3118 * c-tree.h (c_last_sizeof_loc): New external.
3119 * c-typeck.c (c_last_sizeof_loc): New variable.
3120 (c_expr_sizeof_expr, c_expr_sizeof_type): Assign c_last_sizeof_loc.
3121
9fc5e7a4
MM
31222017-05-31 Mikhail Maltsev <maltsevm@gmail.com>
3123
3124 PR testsuite/80580
3125 * gimple-parser.c (c_parser_gimple_if_stmt): Check for empty labels.
3126
f012c8ef
DM
31272017-05-30 David Malcolm <dmalcolm@redhat.com>
3128
3129 * c-objc-common.c (c_tree_printer): Gain bool and const char **
3130 parameters.
3131
3cd211af
MS
31322017-05-24 Martin Sebor <msebor@redhat.com>
3133
3134 PR c/80731
3135 * c-fold.c (c_fully_fold_internal): Adjust.
3136 * c-typeck.c (parser_build_unary_op): Adjust.
3137
fd71a9a2
TS
31382017-05-23 Thomas Schwinge <thomas@codesourcery.com>
3139
3140 * c-parser.c (OACC_KERNELS_CLAUSE_MASK): Add
3141 "PRAGMA_OACC_CLAUSE_NUM_GANGS", "PRAGMA_OACC_CLAUSE_NUM_WORKERS",
3142 "VECTOR_LENGTH".
3143
92fa0f9e
MP
31442017-05-23 Marek Polacek <polacek@redhat.com>
3145
3146 * c-parser.c (c_parser_compound_statement_nostart): Remove redundant
3147 quotes.
3148
d11c168a
JJ
31492017-05-22 Jakub Jelinek <jakub@redhat.com>
3150
3151 * c-fold.c (c_fully_fold_internal): Save the c_fully_fold_internal
3152 result for SAVE_EXPR operand and set SAVE_EXPR_FOLDED_P even if
3153 it returned invariant. Call tree_invariant_p unconditionally
3154 afterwards to decide whether to return expr or op0.
3155
58aca9d9
NS
31562017-05-22 Nathan Sidwell <nathan@acm.org>
3157
3158 * c-decl.c (c_parse_final_cleanups): Drop TDI_tu handling.
3159
7fd549d2
TS
31602017-05-19 Thomas Schwinge <thomas@codesourcery.com>
3161
3162 * c-parser.c (c_parser_omp_clause_default): Handle
3163 "OMP_CLAUSE_DEFAULT_PRESENT".
3164
6ecd2339
BE
31652017-05-18 Bernd Edlinger <bernd.edlinger@hotmail.de>
3166
3167 * config-lang.in (gtfiles): Add c-family/c-format.c.
3168
8a57ecff
NS
31692017-05-18 Nathan Sidwell <nathan@acm.org>
3170
3171 * c-decl.c (pushdecl_top_level): Delete unused function.
3172
6574d78e
MP
31732017-05-18 Marek Polacek <polacek@redhat.com>
3174
3175 * c-decl.c (match_builtin_function_types): Use NULL_TREE instead of 0.
3176 (check_earlier_gotos): Likewise.
3177 (define_label): Likewise.
3178 (pending_xref_error): Likewise.
3179 (smallest_type_quals_location): Likewise.
3180 (grokdeclarator): Likewise.
3181 (grokparms): Likewise.
3182 (identifier_global_value): Likewise.
3183 * c-typeck.c (set_nonincremental_init_from_string): Likewise.
3184 (find_init_member): Likewise.
3185
e3455240
MP
31862017-05-18 Marek Polacek <polacek@redhat.com>
3187
3188 * c-decl.c (start_decl): Use false/true instead of 0/1.
3189 (grokdeclarator): Likewise.
3190 (finish_struct): Likewise.
3191 (start_function): Change the return type to bool. Use false/true
3192 instead of 0/1.
3193 (declspecs_add_qual): Use UNKNOWN_LOCATION instead of 0.
3194 * c-tree.h (start_function): Update.
3195 * c-typeck.c (same_translation_unit_p): Change the return type to bool.
3196 (set_designator): Change the return type to bool. Use false/true
3197 instead of 0/1.
3198
3fa8871b
MP
31992017-05-17 Marek Polacek <polacek@redhat.com>
3200
3201 * c-decl.c: Use NULL_TREE instead of 0 where appropriate.
3202 * c-typeck.c: Likewise.
3203
142473df
MP
32042017-05-17 Marek Polacek <polacek@redhat.com>
3205
3206 PR sanitizer/80659
3207 * c-decl.c (build_compound_literal): Set DECL_ARTIFICIAL and
3208 DECL_IGNORED_P even for non-static compound literals.
3209
1a817418
ML
32102017-05-17 Martin Liska <mliska@suse.cz>
3211
3212 * c-decl.c (c_parse_final_cleanups): Introduce dump_flags_t type and
3213 use it instead of int type.
3214
b2fa0a8b
MP
32152017-05-17 Marek Polacek <polacek@redhat.com>
3216
3217 * c-convert.c (convert): Replace c_save_expr with save_expr. Don't
3218 call c_fully_fold.
3219 (convert) <case COMPLEX_TYPE>: Remove special handling of COMPLEX_TYPEs.
ab20d992 3220 * c-decl.c (grokdeclarator): Replace c_save_expr with save_expr.
b2fa0a8b
MP
3221 * c-fold.c (c_fully_fold_internal): Handle SAVE_EXPR.
3222 * c-parser.c (c_parser_declaration_or_fndef): Replace c_save_expr with
3223 save_expr.
3224 (c_parser_conditional_expression): Likewise.
3225 * c-tree.h (SAVE_EXPR_FOLDED_P): Define.
3226 * c-typeck.c (build_modify_expr): Replace c_save_expr with save_expr.
3227 (process_init_element): Likewise.
3228 (build_binary_op): Likewise.
3229 (handle_omp_array_sections_1): Likewise.
3230
1e47f02b
TS
32312017-05-12 Thomas Schwinge <thomas@codesourcery.com>
3232
3233 * c-parser.c (c_parser_omp_clause_num_gangs)
3234 (c_parser_omp_clause_num_workers)
3235 (c_parser_omp_clause_vector_length): Merge functions into...
3236 (c_parser_oacc_single_int_clause): ... this new function. Adjust
3237 all users.
3238
c24e924f
NS
32392017-05-11 Nathan Sidwell <nathan@acm.org>
3240
3241 * gimple-parser.c: Don't #include tree-dump.h.
3242
c587104e
MM
32432017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
3244
3245 PR testsuite/80580
3246 * gimple-parser.c (c_parser_parse_ssa_name): Validate SSA name base.
3247
67ac9a9d
MM
32482017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
3249
3250 PR testsuite/80580
3251 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
3252 incorrect __MEM syntax.
3253
ac4eb40f
MM
32542017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
3255
3256 PR testsuite/80580
3257 * gimple-parser.c (c_parser_gimple_unary_expression): Check argument
3258 type of unary '*'.
3259
641da50a
NS
32602017-05-09 Nathan Sidwell <nathan@acm.org>
3261
3262 * c-tree.h (pushdecl): Declare.
3263
56d35585
DM
32642017-05-05 David Malcolm <dmalcolm@redhat.com>
3265
3266 * c-decl.c (warn_defaults_to): Replace report_diagnostic
3267 with diagnostic_report_diagnostic.
3268 * c-errors.c (pedwarn_c99): Likewise.
3269 (pedwarn_c90): Likewise.
3270
815d9cc6
XR
32712017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn>
3272
92a285c1 3273 PR c++/80038
815d9cc6
XR
3274 * c-gimplify.c (c_gimplify_expr): Remove calls to
3275 cilk_gimplifY_call_params_in_spawned_fn.
3276
1c4ea66f
DM
32772017-04-25 David Malcolm <dmalcolm@redhat.com>
3278
3279 * c-parser.c (c_parser_struct_or_union_specifier): Add fix-it
3280 hint for removing extra semicolon.
3281
666f7903
JJ
32822017-04-21 Jakub Jelinek <jakub@redhat.com>
3283
3284 PR c/80468
3285 * c-decl.c (finish_declspecs) <case cts_int_n>: If int_n_idx is not
3286 enabled, set specs->type to integer_type_node.
3287
5764ee3c
JW
32882017-04-03 Jonathan Wakely <jwakely@redhat.com>
3289
3290 * c-array-notation.c: Fix typo in comment.
3291
10fa8dfb
MP
32922017-03-29 Marek Polacek <polacek@redhat.com>
3293
3294 PR c/79730
3295 * c-decl.c (finish_decl): Check VAR_P.
3296
a9e4a1a5
JJ
32972017-03-27 Jakub Jelinek <jakub@redhat.com>
3298
3299 PR middle-end/80162
3300 * c-tree.h (c_mark_addressable): Add array_ref_p argument.
3301 * c-typeck.c (c_mark_addressable): Likewise. Look through
3302 VIEW_CONVERT_EXPR unless array_ref_p and VCE is from VECTOR_TYPE
3303 to ARRAY_TYPE.
3304 (build_array_ref): Pass true as array_ref_p to c_mark_addressable.
3305
ee3ff394
MP
33062017-03-23 Marek Polacek <polacek@redhat.com>
3307
3308 * c-tree.h: Remove a C_RID_YYCODE reference.
3309
4d1b8e70
JJ
33102017-03-21 Jakub Jelinek <jakub@redhat.com>
3311
3312 PR c/80097
3313 * c-typeck.c (build_binary_op): Add EXCESS_PRECISION_EXPR only around
3314 optional COMPOUND_EXPR with ubsan instrumentation.
3315
31dc71a8
MP
33162017-03-17 Marek Polacek <polacek@redhat.com>
3317
3318 * c-parser.c: Add C11 references.
3319
d579c385
MP
33202017-03-15 Marek Polacek <polacek@redhat.com>
3321
3322 * c-parser.c (c_parser_enum_specifier): Remove redundant line.
3323
85059a38
MP
33242017-03-11 Marek Polacek <polacek@redhat.com>
3325
3326 * c-decl.c (implicit_decl_warning): Add a comment. Fix formatting.
3327
2f6f187a
DM
33282017-03-10 David Malcolm <dmalcolm@redhat.com>
3329
3330 PR translation/79848
3331 * c-decl.c (declspecs_add_type): Simplify uses of "%<%s%>" to
3332 "%qs".
3333 * c-parser.c (c_parser_oacc_shape_clause): Likewise.
3334
36618428
MP
33352017-03-09 Marek Polacek <polacek@redhat.com>
3336
3337 PR sanitizer/79757
3338 * c-parser.c (c_parser_declaration_or_fndef): Don't sanitize old-style
3339 parameter declarations with initializers.
3340
01e5af5a
JJ
33412017-03-09 Jakub Jelinek <jakub@redhat.com>
3342
3343 PR c/79969
3344 * c-decl.c (start_enum): Adjust DECL_SOURCE_LOCATION of
3345 TYPE_STUB_DECL.
3346
a71dbc63
JJ
33472017-03-07 Jakub Jelinek <jakub@redhat.com>
3348
3349 PR c/79834
3350 * c-parser.c (c_parser_pragma): Use error_at instead of c_parser_error
3351 for "may only be used in compound statements" diagnostics, change it
3352 such that the same translatable string is used for all pragmas. For
3353 PRAGMA_OACC_WAIT use "acc wait" rather than "acc enter data" in the
3354 diagnostics.
3355 (c_parser_omp_cancellation_point, c_parser_omp_target_update,
3356 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Change
3357 "may only be used in compound statements" diagnostics, such that the
3358 same translatable string is used for all pragmas.
3359
1ff4bae6
MP
33602017-03-04 Marek Polacek <polacek@redhat.com>
3361
3362 PR c/79847
3363 * c-decl.c (implicit_decl_warning): Add missing space.
3364
7f5a7d78
MP
33652017-03-03 Marek Polacek <polacek@redhat.com>
3366
3367 PR c/79758
3368 * c-decl.c (store_parm_decls_oldstyle): Check if the element of
3369 current_function_prototype_arg_types is error_mark_node. Fix
3370 formatting. Use TREE_VALUE instead of TREE_TYPE.
3371
883c8f06
JJ
33722017-03-03 Jakub Jelinek <jakub@redhat.com>
3373
79c9b7a8
JJ
3374 PR c/79837
3375 * c-parser.c (c_parser_omp_clause_reduction): Don't mention
3376 %<min%> or %<max%> in the diagnostics, instead mention identifier.
3377 (c_parser_omp_declare_reduction): Don't mention %<min%> in the
3378 diagnostics.
3379
883c8f06
JJ
3380 PR c/79836
3381 * c-parser.c (c_parser_generic_selection): Use %<_Generic%>
3382 instead of %<_Generic>.
3383 (c_parser_omp_ordered): Use %<depend%> instead of %<depend>.
3384 (c_parser_omp_target_exit_data): Use %<release%> instead of
3385 %<release>.
3386
324ff1a0
JJ
33872017-02-28 Jakub Jelinek <jakub@redhat.com>
3388
3389 * c-parser.c (c_parser_asm_statement): Use cond ? G_("...") : G_("...")
3390 instead of just cond ? "..." : "...".
3391 (c_parser_oacc_enter_exit_data): Use %s and ternary operator only
3392 for "enter"/"exit" keyword.
3393 (c_finish_oacc_routine): Don't use %s to supply portions of the
3394 message.
3395
4227c9ad
JJ
33962017-02-24 Jakub Jelinek <jakub@redhat.com>
3397
3398 PR c++/79588
3399 * c-parser.c (c_parser_postfix_expression_after_primary): Don't
3400 handle -Wrestrict here.
3401 * c-typeck.c (build_function_call_vec): Adjust
3402 check_function_arguments caller.
3403
5d972e66
RB
34042017-02-23 Richard Biener <rguenther@suse.de>
3405
3406 PR c/79684
3407 * gimple-parser.c (c_parser_gimple_statement): Use set_error
3408 to initialize c_exprs to return.
3409 (c_parser_gimple_binary_expression): Likewise.
3410 (c_parser_gimple_unary_expression): Likewise.
3411 (c_parser_gimple_postfix_expression): Likewise.
3412
61ac5ebe
MP
34132017-02-22 Marek Polacek <polacek@redhat.com>
3414
3415 PR c/79662
3416 * c-typeck.c (convert_arguments): Handle error_mark_node.
3417
41d1b0b1
PK
34182017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3419
3420 * gimple-parser.c (c_parser_gimple_postfix_expression): Check return
3421 value of c_parser_parse_ssa_name against error_mark_node and emit
3422 error if ssa name is anonymous and written as default definition.
3423
eab1f169
PK
34242017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3425
3426 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
3427 FMA_EXPR.
3428
bcac0b4d
JJ
34292017-02-16 Jakub Jelinek <jakub@redhat.com>
3430
3431 PR c++/79512
3432 * c-parser.c (c_parser_omp_target): For -fopenmp-simd
3433 ignore #pragma omp target even when not followed by identifier.
3434
1be33173
PK
34352017-02-14 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3436
3437 * gimpler-parser.c (c_parser_gimple_statement): Handle ABS_EXPR.
3438 (c_parser_gimple_unary_expression): Likewise.
3439
aa326bfb
JJ
34402017-02-13 Jakub Jelinek <jakub@redhat.com>
3441
3442 * c-parser.c (c_parser_oacc_declare): Add missing space in
3443 diagnostics.
3444
8a398bc5
PK
34452017-02-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3446
3447 PR c/79478
3448 * gimple-parser.c (c_parser_gimple_postfix_expression): Call
3449 set_c_expr_source_range when parsing ssa-name.
3450
3dcde5ef 34512017-02-10 Prasad Ghangal <prasad.ghangal@gmail.com>
ab20d992 3452 Richard Biener <rguenther@suse.de>
3dcde5ef
PG
3453
3454 * gimple-parser.c (c_parser_gimple_binary_expression): Avoid
3455 building IL when arguments are error_mark_node.
3456 (c_parser_gimple_unary_expression): Likewise.
3457 (c_parser_gimple_if_stmt): Likewise.
3458 (c_parser_gimple_switch_stmt): Likewise.
3459 (c_parser_gimple_return_stmt): Likewise.
3460 (c_parser_parse_ssa_name): When name lookup fails do not build
3461 an SSA name. Use undeclared rather than not declared in error
3462 reporting.
3463
192b048b
MP
34642017-02-09 Marek Polacek <polacek@redhat.com>
3465
3466 PR c/79428
3467 * c-parser.c (c_parser_omp_ordered): Call c_parser_skip_to_pragma_eol
3468 instead of c_parser_skip_until_found.
3469
56f71478
JJ
34702017-02-09 Jakub Jelinek <jakub@redhat.com>
3471
3472 PR c/79431
3473 * c-parser.c (c_parser_omp_declare_target): Don't invoke
3474 symtab_node::get on automatic variables.
3475
02889d23
CLT
34762016-02-09 Nathan Sidwell <nathan@codesourcery.com>
3477 Chung-Lin Tang <cltang@codesourcery.com>
3478
3479 * c-parser.c (c_parser_omp_clause_collapse): Disallow tile.
3480 (c_parser_oacc_clause_tile): Disallow collapse. Fix parsing and
3481 semantic checking.
3482 * c-parser.c (c_parser_omp_for_loop): Accept tiling constructs.
3483
7af4b20d
RB
34842017-02-07 Richard Biener <rguenther@suse.de>
3485
3486 * gimple-parser.c (c_parser_gimple_expr_list): Simplify.
3487 (c_parser_gimple_postfix_expression_after_primary):
3488 Do not use c_build_function_call_vec to avoid folding and promotion.
3489 Simplify.
3490
e5e391d6
MO
34912017-01-25 Maxim Ostapenko <m.ostapenko@samsung.com>
3492
3493 PR lto/79061
3494 * c-decl.c (pop_scope): Pass main_input_filename to
3495 build_translation_unit_decl.
3496
c2e84327
DM
34972017-01-24 David Malcolm <dmalcolm@redhat.com>
3498
3499 * c-parser.c: Include "read-rtl-function.h" and
3500 "run-rtl-passes.h".
3501 (c_parser_declaration_or_fndef): Rename "gimple-pass-list" in
3502 grammar to gimple-or-rtl-pass-list. Add rtl-function-definition
3503 production. Update for renaming of field "gimple_pass" to
3504 "gimple_or_rtl_pass". If __RTL was seen, call
3505 c_parser_parse_rtl_body. Convert a timevar_push/pop pair
3506 to an auto_timevar, to cope with early exit.
3507 (c_parser_declspecs): Update RID_GIMPLE handling for renaming of
3508 field "gimple_pass" to "gimple_or_rtl_pass", and for renaming of
3509 c_parser_gimple_pass_list to c_parser_gimple_or_rtl_pass_list.
3510 Handle RID_RTL.
3511 (c_parser_parse_rtl_body): New function.
3512 * c-tree.h (enum c_declspec_word): Add cdw_rtl.
3513 (struct c_declspecs): Rename field "gimple_pass" to
3514 "gimple_or_rtl_pass". Add field "rtl_p".
3515 * gimple-parser.c (c_parser_gimple_pass_list): Rename to...
3516 (c_parser_gimple_or_rtl_pass_list): ...this, updating accordingly.
3517 * gimple-parser.h (c_parser_gimple_pass_list): Rename to...
3518 (c_parser_gimple_or_rtl_pass_list): ...this.
3519
2ebd93e1
MP
35202017-01-20 Marek Polacek <polacek@redhat.com>
3521
3522 PR c/64279
3523 * c-typeck.c (build_conditional_expr): Warn about duplicated branches.
3524
b1c95bb5
RB
35252017-01-13 Richard Biener <rguenther@suse.de>
3526
3527 * gimple-parser.c (c_parser_gimple_compound_statement): Handle
3528 nops.
3529
25329913
RB
35302017-01-13 Richard Biener <rguenther@suse.de>
3531
3532 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
3533 _Literal ( type-name ) number.
3534
6bb4ea5c
RB
35352017-01-12 Richard Biener <rguenther@suse.de>
3536
3537 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
3538 __MEM.
3539
6b5b4e9c
JJ
35402017-01-11 Jakub Jelinek <jakub@redhat.com>
3541
3542 PR c++/72813
3543 * c-decl.c (pop_file_scope): Set flag_syntax_only to 1 after writing
3544 PCH file.
3545
e3252775
RB
35462017-01-11 Richard Biener <rguenther@suse.de>
3547
3548 PR bootstrap/79052
3549 * gimple-parser.c (c_parser_gimple_switch_stmt): Add missing
3550 returns on parse errors.
3551
a9342885
MP
35522017-01-04 Marek Polacek <polacek@redhat.com>
3553
3554 PR c++/64767
3555 * c-parser.c (c_parser_postfix_expression): Mark zero character
3556 constants by setting original_type in c_expr.
3557 * c-typeck.c (parser_build_binary_op): Warn when a pointer is compared
3558 with a zero character constant.
3559 (char_type_p): New function.
3560
5dd9a9d0
DM
35612017-01-04 David Malcolm <dmalcolm@redhat.com>
3562
3563 * c-parser.c (c_parser_declaration_or_fndef): Create a
3564 rich_location at init_loc and parse it to start_init.
3565 (last_init_list_comma): New global.
3566 (c_parser_braced_init): Update last_init_list_comma when parsing
3567 commas. Pass it to pop_init_level. Pass location of closing
3568 brace to pop_init_level.
3569 (c_parser_postfix_expression_after_paren_type): Create a
3570 rich_location at type_loc and parse it to start_init.
3571 (c_parser_omp_declare_reduction): Likewise for loc.
3572 * c-tree.h (start_init): Add rich_location * param.
3573 (pop_init_level): Add location_t param.
3574 * c-typeck.c (struct initializer_stack): Add field
3575 "missing_brace_richloc".
3576 (start_init): Add richloc param, use it to initialize
3577 the stack node's missing_brace_richloc.
3578 (last_init_list_comma): New decl.
3579 (finish_implicit_inits): Pass last_init_list_comma to
3580 pop_init_level.
3581 (push_init_level): When finding missing open braces, add fix-it
3582 hints to the richloc.
3583 (pop_init_level): Add "insert_before" param and pass it
3584 when calling pop_init_level. Add fixits about missing
3585 close braces to any richloc. Use the richloc for the
3586 -Wmissing-braces warning.
3587 (set_designator): Pass last_init_list_comma to pop_init_level.
3588 (process_init_element): Likewise.
3589
cbe34bb5
JJ
35902017-01-01 Jakub Jelinek <jakub@redhat.com>
3591
3592 Update copyright years.
3593
d17680f3
JJ
35942016-12-21 Jakub Jelinek <jakub@redhat.com>
3595
0dba7960
JJ
3596 PR bootstrap/78817
3597 * c-typeck.c (build_function_call_vec): If check_function_arguments
3598 returns true, set TREE_NO_WARNING on CALL_EXPR.
3599
d17680f3
JJ
3600 PR c/77767
3601 * c-decl.c (grokdeclarator): If *expr is non-NULL, append expression
3602 to *expr instead of overwriting it.
3603
aa90531e
RB
36042016-12-20 Richard Biener <rguenther@suse.de>
3605
3606 * gimple-parser.c (c_parser_gimple_compound_statement): Improve
3607 error recovery.
3608 (c_parser_gimple_statement): Only build assigns for non-error
3609 stmts.
3610 (c_parser_gimple_postfix_expression_after): Improve error recovery.
3611
629b3d75
MJ
36122016-12-14 Martin Jambor <mjambor@suse.cz>
3613
3614 * c-parser.c: Include omp-general.h and omp-offload.h instead of
3615 omp-low.h.
3616 (c_finish_oacc_routine): Adjusted call to
3617 get_oacc_fn_attrib, build_oacc_routine_dims and replace_oacc_fn_attrib
3618 to use their new names.
3619 (c_parser_oacc_enter_exit_data): Adjusted call to find_omp_clause to
3620 use its new name.
3621 (c_parser_oacc_update): Likewise.
3622 (c_parser_omp_simd): Likewise.
3623 (c_parser_omp_target_update): Likewise.
3624 * c-typeck.c: Include omp-general.h instead of omp-low.h.
3625 (c_finish_omp_cancel): Adjusted call to find_omp_clause to use its new
3626 name.
3627 (c_finish_omp_cancellation_point): Likewise.
3628 * gimple-parser.c: Do not include omp-low.h
3629
c5af52eb
CP
36302016-12-02 Cesar Philippidis <cesar@codesourcery.com>
3631 James Norris <jnorris@codesourcery.com>
3632
3633 * c-parser.c (c_parser_pragma): Error when PRAGMA_OACC_{ENTER_DATA,
3634 EXIT_DATA,WAIT} are not used in compound statements.
3635 (c_parser_oacc_enter_exit_data): Update diagnostics.
3636
48330c93
BE
36372016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
3638
3639 PR c++/71973
3640 * c-decl.c (diagnose_mismatched_decls): Use
3641 OPT_Wbuiltin_declaration_mismatch here too.
3642
899ca90e 36432016-11-18 Richard Sandiford <richard.sandiford@arm.com>
48330c93
BE
3644 Alan Hayward <alan.hayward@arm.com>
3645 David Sherwood <david.sherwood@arm.com>
899ca90e
RS
3646
3647 * c-decl.c (merge_decls): Use SET_DECL_MODE.
3648 (make_label, finish_struct): Likewise.
3649
1ee62b92 36502016-11-14 Prasad Ghangal <prasad.ghangal@gmail.com>
8e745a17 3651 Richard Biener <rguenther@suse.de>
22b15758 3652
8e745a17
JJ
3653 * Make-lang.in (C_AND_OBJC_OBJS): Add gimple-parser.o.
3654 * config-lang.in (gtfiles): Add c/c-parser.h.
3655 * c-tree.h (enum c_declspec_word): Add cdw_gimple.
3656 (struct c_declspecs): Add gimple_pass member and gimple_p flag.
3657 * c-parser.c (enum c_id_kind, struct c_token,
3658 c_parser_next_token_is, c_parser_next_token_is_not,
3659 c_parser_next_token_is_keyword,
3660 enum c_lookahead_kind, enum c_dtr_syn, enum c_parser_prec):
3661 Split out to ...
3662 * c-parser.h: ... new header.
3663 * c-parser.c: Include c-parser.h and gimple-parser.h.
1ee62b92 3664 (c_parser_peek_token, c_parser_peek_2nd_token,
8e745a17
JJ
3665 c_token_starts_typename, c_parser_next_token_starts_declspecs,
3666 c_parser_next_tokens_start_declaration, c_parser_consume_token,
3667 c_parser_error, c_parser_require, c_parser_skip_until_found,
3668 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
3669 c_parser_type_name): Export.
3670 (c_parser_tokens_buf): New function.
3671 (c_parser_error): Likewise.
3672 (c_parser_set_error): Likewise.
3673 (c_parser_declspecs): Handle RID_GIMPLE.
1ee62b92
PG
3674 (c_parser_declaration_or_fndef): Parse __GIMPLE marked body
3675 via c_parser_parse_gimple_body.
8e745a17
JJ
3676 * c-parser.h (c_parser_peek_token, c_parser_peek_2nd_token,
3677 c_token_starts_typename, c_parser_next_token_starts_declspecs,
3678 c_parser_next_tokens_start_declaration, c_parser_consume_token,
3679 c_parser_error, c_parser_require, c_parser_skip_until_found,
3680 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
3681 c_parser_type_name): Declare.
1ee62b92
PG
3682 (struct c_parser): Declare forward.
3683 (c_parser_tokens_buf): Declare.
8e745a17
JJ
3684 (c_parser_error): Likewise.
3685 (c_parser_set_error): Likewise.
3686 * gimple-parser.c: New file.
3687 * gimple-parser.h: Likewise.
1ee62b92 3688
22b15758
UB
36892016-11-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3690
3691 PR c/35503
3692 * c-parser.c (c_parser_postfix_expression_after_primary): Call
3693 warn_for_restrict.
3694
84ff4775
LCW
36952016-09-11 Le-Chun Wu <lcwu@google.com>
3696 Mark Wielaard <mjw@redhat.com>
3697
3698 * c-decl.c (warn_if_shadowing): Use the warning code corresponding
3699 to the given -Wshadow= variant.
3700
4d0cdd0c
TP
37012016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
3702
3703 * c-typeck.c: Include memmodel.h.
3704
1202f33e
JJ
37052016-10-13 Jakub Jelinek <jakub@redhat.com>
3706
3707 PR target/77957
3708 * c-objc-common.h (LANG_HOOKS_GETDECLS): Use hook_tree_void_null
3709 instead of lhd_return_null_tree_v.
3710
8a14afd0
BS
37112016-10-07 Bernd Schmidt <bschmidt@redhat.com>
3712
3713 PR c++/69733
3714 * c-decl.c (smallest_type_quals_location): New static function.
3715 (grokdeclarator): Try to find the correct location for an ignored
3716 qualifier.
3717
81fea426
MP
37182016-09-26 Marek Polacek <polacek@redhat.com>
3719
3720 PR c/7652
3721 * c-decl.c (pop_scope): Add gcc_fallthrough.
3722
37232016-09-26 Marek Polacek <polacek@redhat.com>
3724
3725 PR c/7652
3726 * c-parser.c (struct c_token): Add flags field.
3727 (c_lex_one_token): Pass it to c_lex_with_flags.
3728 (c_parser_declaration_or_fndef): Turn __attribute__((fallthrough));
3729 into IFN_FALLTHROUGH.
3730 (c_parser_label): Set FALLTHROUGH_LABEL_P on labels. Handle
3731 attribute fallthrough after a case label or default label.
3732 (c_parser_statement_after_labels): Handle RID_ATTRIBUTE.
3733
9a2300e9
MP
37342016-09-24 Marek Polacek <polacek@redhat.com>
3735
3736 PR c/77490
3737 * c-typeck.c (build_unary_op): Warn about bit not on expressions that
3738 have boolean value. Warn about ++/-- on booleans.
3739
7de76362
JJ
37402016-09-23 Jakub Jelinek <jakub@redhat.com>
3741
3742 * c-parser.c (incomplete_record_decls): Remove unnecessary
3743 = vNULL initialization of file scope vec.
3744
5b73d2ab
MP
37452016-09-16 Marek Polacek <polacek@redhat.com>
3746
3747 * c-typeck.c (lvalue_p): Use true and false instead of 1 and 0.
3748
e51fbec3
MP
37492016-09-14 Marek Polacek <polacek@redhat.com>
3750
3751 * c-array-notation.c (create_cmp_incr): Use false instead of 0.
3752 (fix_array_notation_expr): Likewise.
3753 * c-decl.c (finish_decl): Likewise.
3754 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
3755 * c-typeck.c (array_to_pointer_conversion): Use true instead of 1.
3756 (function_to_pointer_conversion): Use false instead of 0.
3757 (convert_lvalue_to_rvalue): Likewise.
3758 (parser_build_unary_op): Likewise.
3759 (build_atomic_assign): Likewise.
3760 (build_unary_op): Change nonconvert parameter type to bool, use
3761 true/false instead of 1/0.
3762 (build_binary_op): Use true instead of 1.
3763
254830ba
DM
37642016-09-13 David Malcolm <dmalcolm@redhat.com>
3765
3766 * c-parser.c (c_parser_declaration_or_fndef): Update for renaming
3767 of add_fixit_insert to add_fixit_insert_before.
3768
4c13ba17
MP
37692016-09-13 Marek Polacek <polacek@redhat.com>
3770
3771 * c-typeck.c (build_unary_op): Rename FLAG parameter to NOCONVERT. Use
3772 it.
3773
54dcdb88
BE
37742016-09-12 Bernd Edlinger <bernd.edlinger@hotmail.de>
3775
3776 PR c++/77496
3777 * c-parser.c (c_parser_conditional_expression): Pass the rightmost
3778 COMPOUND_EXPR to warn_for_omitted_condop.
3779
e5106e27
DM
37802016-09-07 David Malcolm <dmalcolm@redhat.com>
3781
3782 * c-lang.c (LANG_HOOKS_GET_SUBSTRING_LOCATION): Use
3783 c_get_substring_location for this new langhook.
3784
9dc5773f
JJ
37852016-09-02 Jakub Jelinek <jakub@redhat.com>
3786
3787 PR c/65467
3788 * c-parser.c (c_parser_declspecs): Don't sorry about _Atomic if
3789 flag_openmp.
3790 (c_parser_omp_variable_list): Use convert_lvalue_to_rvalue
3791 instead of mark_exp_read on low_bound/length expression.
3792 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_threads,
3793 c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
3794 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
3795 c_parser_omp_clause_num_workers, c_parser_oacc_shape_clause,
3796 c_parser_oacc_clause_tile, c_parser_omp_clause_schedule,
3797 c_parser_omp_clause_vector_length, c_parser_omp_clause_num_teams,
3798 c_parser_omp_clause_thread_limit, c_parser_omp_clause_aligned,
3799 c_parser_omp_clause_linear, c_parser_omp_clause_safelen,
3800 c_parser_omp_clause_simdlen, c_parser_omp_clause_device,
3801 c_parser_omp_clause_dist_schedule): Use convert_lvalue_to_rvalue
3802 instead of mark_expr_read.
3803 (c_parser_omp_declare_reduction): Reject _Atomic qualified types.
3804 * c-objc-common.h (LANG_HOOKS_OMP_CLAUSE_COPY_CTOR,
3805 LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP): Redefine.
3806 * c-tree.h (c_omp_clause_copy_ctor): New prototype.
3807 * c-typeck.c (handle_omp_array_sections_1): Diagnose _Atomic qualified
3808 array section bases outside of depend clause, for depend clause
3809 use convert_lvalue_to_rvalue on the base.
3810 (c_finish_omp_clauses): Reject _Atomic qualified vars in reduction,
3811 linear, aligned, map, to and from clauses.
3812 (c_omp_clause_copy_ctor): New function.
3813
295844f6
MP
38142016-09-01 Marek Polacek <polacek@redhat.com>
3815
3816 PR c/7652
3817 * c-typeck.c (composite_type): Add FALLTHRU comment.
3818
089af25c
DM
38192016-08-31 David Malcolm <dmalcolm@redhat.com>
3820
3821 * c-parser.c (c_parser_declaration_or_fndef): Add trailing space
3822 to the insertion fixits for "struct", "union", and "enum".
3823
f9087798
DM
38242016-08-30 David Malcolm <dmalcolm@redhat.com>
3825
3826 * c-decl.c (implicit_decl_warning): Use add_fixit_replace
3827 rather than add_fixit_misspelled_id.
3828 (undeclared_variable): Likewise.
3829 * c-parser.c (c_parser_declaration_or_fndef): Likewise. Remove
3830 now-redundant "here" params from add_fixit_insert method calls.
3831 (c_parser_parameter_declaration): Likewise.
3832 * c-typeck.c (build_component_ref): Remove now-redundant range
3833 param from add_fixit_replace method calls.
3834
ebef225f
MP
38352016-08-25 Marek Polacek <polacek@redhat.com>
3836
3837 * c-typeck.c (parser_build_binary_op): Pass LHS to
3838 warn_logical_not_parentheses.
3839
fe377a48
MP
38402016-08-25 Marek Polacek <polacek@redhat.com>
3841
3842 PR c/77323
3843 * c-decl.c (declspecs_add_type): Set typespec_word even when __intN
3844 or _FloatN or _FloatNx is not supported.
3845 (finish_declspecs): Set type to integer_type_node when _FloatN or
3846 _FloatNx is not supported.
3847
c65699ef
JM
38482016-08-19 Joseph Myers <joseph@codesourcery.com>
3849
3850 PR c/32187
3851 * c-tree.h (cts_floatn_nx): New enum c_typespec_keyword value.
3852 (struct c_declspecs): Add field floatn_nx_idx.
3853 * c-decl.c (declspecs_add_type, finish_declspecs): Handle _FloatN
3854 and _FloatNx type specifiers.
3855 * c-parser.c (c_keyword_starts_typename, c_token_starts_declspecs)
3856 (c_parser_declspecs, c_parser_attribute_any_word)
3857 (c_parser_objc_selector): Use CASE_RID_FLOATN_NX.
3858 * c-typeck.c (c_common_type): Handle _FloatN and _FloatNx types.
3859 (convert_arguments): Avoid promoting _FloatN and _FloatNx types
3860 narrower than double.
3861
2f1364c2
JJ
38622016-08-12 Jakub Jelinek <jakub@redhat.com>
3863 Martin Liska <mliska@suse.cz>
3864
3865 PR c/67410
3866 * c-typeck.c (set_nonincremental_init_from_string): Use / instead of
3867 % to determine val element to change. Assert that
3868 wchar_bytes * charwidth fits into val array.
3869
191816a3
MP
38702016-08-12 Marek Polacek <polacek@redhat.com>
3871
3872 PR c/7652
3873 * c-parser.c (c_parser_external_declaration): Add FALLTHRU.
3874 (c_parser_postfix_expression): Likewise.
3875 * c-typeck.c (build_unary_op): Adjust fall through comment.
3876 (c_mark_addressable): Likewise.
3877
b95a64bb
JJ
38782016-08-11 Jakub Jelinek <jakub@redhat.com>
3879
3880 PR c/72816
3881 * c-decl.c (grokdeclarator): When adding TYPE_DOMAIN for flexible
3882 array member through typedef, for orig_qual_indirect == 0 clear
3883 orig_qual_type.
3884
895aa8e1
DM
38852016-08-08 David Malcolm <dmalcolm@redhat.com>
3886
3887 PR c/64955
3888 * c-lang.c (LANG_HOOKS_RUN_LANG_SELFTESTS): If CHECKING_P, wire
3889 this up to selftest::run_c_tests.
3890 (selftest::run_c_tests): New function.
3891
0b212d8c
TS
38922016-08-04 Thomas Schwinge <thomas@codesourcery.com>
3893
ae9281fc
TS
3894 * c-parser.c (struct oacc_routine_data): Add error_seen and
3895 fndecl_seen members.
3896 (c_finish_oacc_routine): Use these.
3897 (c_parser_declaration_or_fndef): Adjust.
3898 (c_parser_oacc_routine): Likewise. Support more C language
3899 constructs, and improve diagnostics. Move pragma context
3900 checking...
3901 (c_parser_pragma): ... here.
3902
0b212d8c
TS
3903 * c-parser.c (struct oacc_routine_data): New.
3904 (c_parser_declaration_or_fndef, c_parser_oacc_routine): Use it.
3905 Simplify code.
3906 (c_finish_oacc_routine): Likewise. Don't attach clauses to "omp
3907 declare target" attribute.
3908
76e2c821
JB
39092016-08-01 Jan Beulich <jbeulich@suse.com>
3910
3911 * c-fold.c (c_fully_fold_internal): Also emit shift count
3912 warnings for vector types.
3913 * c-typeck.c (build_binary_op): Likewise.
3914
f618a472
MP
39152016-07-29 Marek Polacek <polacek@redhat.com>
3916
3917 PR c/71742
3918 * c-decl.c (finish_struct): Rephrase an error message.
3919
efd0786f
MP
3920 PR c/71853
3921 * c-parser.c (c_parser_switch_statement): Initialize ce.original_type
3922 to error node for invalid code.
3923
e00dceaf
MP
3924 PR c/71573
3925 * c-decl.c (implicitly_declare): Return decl early not only for
3926 error_mark_nodes, but for anything that is not a FUNCTION_DECL.
3927
673a107a
JJ
39282016-07-29 Jakub Jelinek <jakub@redhat.com>
3929
3930 PR c/71969
3931 * c-decl.c (finish_function): Only set DECL_DISREGARD_INLINE_LIMITS
3932 on GNU extern inline functions.
3933
a5b5c8b6
MP
39342016-07-29 Marek Polacek <polacek@redhat.com>
3935
3936 PR c/71583
3937 * c-parser.c (c_parser_postfix_expression_after_paren_type): Also
3938 check expr.value.
3939
e3fe09c1
UB
39402016-07-22 Uros Bizjak <ubizjak@gmail.com>
3941
3942 * c-typeck.c: Use HOST_WIDE_INT_1 instead of (HOST_WIDE_INT) 1,
3943
7c8f7eaa
DM
39442016-07-20 David Malcolm <dmalcolm@redhat.com>
3945
3946 * c-decl.c (struct edit_distance_traits<cpp_hashnode *>): Move to
3947 spellcheck-tree.h
3948 (best_macro_match): Likewise, converting from a typedef to a
3949 subclass.
3950 (find_closest_macro_cpp_cb): Move to spellcheck-tree.c.
3951 (lookup_name_fuzzy): Update for change of best_macro_match to a
3952 subclass with a ctor that calls cpp_forall_identifiers.
3953
de6a69ee
DM
39542016-07-20 David Malcolm <dmalcolm@redhat.com>
3955
3956 * c-decl.c (implicit_decl_warning): Update for conversion of
3957 return type of lookup_name_fuzzy to const char *.
3958 (undeclared_variable): Likewise.
3959 (lookup_name_fuzzy): Convert return type from tree to
3960 const char *.
3961 * c-parser.c (c_parser_declaration_or_fndef): Update for
3962 conversion of return type of lookup_name_fuzzy to const char *.
3963 (c_parser_parameter_declaration): Likewise.
3964
b1c9c068
CP
39652016-07-15 Cesar Philippidis <cesar@codesourcery.com>
3966
3967 * c-parser.c (c_parser_oacc_declare): Don't scan for
3968 GOMP_MAP_POINTER.
3969 * c-typeck.c (handle_omp_array_sections): Mark data clauses with
3970 GOMP_MAP_FORCE_{PRESENT,TO,FROM,TOFROM} as potentially having
3971 zero-length subarrays.
3972
ddbbcb19
JJ
39732016-07-15 Jakub Jelinek <jakub@redhat.com>
3974
3975 PR c/71858
3976 * c-decl.c (implicit_decl_warning): Use FUZZY_LOOKUP_FUNCTION_NAME
3977 instead of FUZZY_LOOKUP_NAME.
3978 (lookup_name_fuzzy): For FUZZY_LOOKUP_FUNCTION_NAME consider
3979 FUNCTION_DECLs, {VAR,PARM}_DECLs function pointers and macros.
3980
dd36b877
JJ
39812016-07-14 Jakub Jelinek <jakub@redhat.com>
3982
3983 PR c/71858
3984 * c-decl.c (lookup_name_fuzzy): Ignore binding->invisible.
3985
8c681247
TS
39862016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
3987
3988 * c-parser.c (c_parser_generic_selection): Make type of variable
3989 auto_vec.
3990 (c_parser_omp_declare_simd): Likewise.
3991
bf4fa671
TS
39922016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
3993
3994 * c-decl.c (struct c_struct_parse_info): Change member types
3995 from vec to auto_vec.
3996 (start_struct): Adjust.
3997 (finish_struct): Likewise.
3998
557e8c49
JJ
39992016-07-02 Jakub Jelinek <jakub@redhat.com>
4000
4001 PR c/71719
4002 * c-typeck.c (mark_exp_read): Handle VIEW_CONVERT_EXPR.
4003
54d19c3b
TS
40042016-06-29 Thomas Schwinge <thomas@codesourcery.com>
4005
4006 * c-parser.c (c_parser_pragma) <PRAGMA_OMP_CANCELLATION_POINT>:
4007 Move pragma context checking into...
4008 (c_parser_omp_cancellation_point): ... here, and improve
4009 diagnostic messages.
4010 * c-typeck.c (c_finish_omp_cancel)
4011 (c_finish_omp_cancellation_point): Improve diagnostic messages.
4012
152ef731
JJ
40132016-06-29 Jakub Jelinek <jakub@redhat.com>
4014
4015 PR c/71685
4016 * c-typeck.c (c_build_qualified_type): Don't clear
4017 C_TYPE_INCOMPLETE_VARS for the main variant.
4018
40192016-06-28 Martin Sebor <msebor@redhat.com>
4378d117
MS
4020
4021 PR c/71552
4022 * c-typeck.c (output_init_element): Diagnose incompatible types
4023 before non-constant initializers.
4024
e9ac1f86
JJ
40252016-06-28 Jakub Jelinek <jakub@redhat.com>
4026
4027 * Make-lang.in: Don't cat ../stage_current if it does not exist.
4028
277d7ee0
AK
40292016-06-23 Andi Kleen <ak@linux.intel.com>
4030
4031 * Make-lang.in: Add support for autofdo.
4032
1a4f11c8
DM
40332016-06-22 David Malcolm <dmalcolm@redhat.com>
4034
4035 PR c/70339
4036 * c-decl.c: Include spellcheck-tree.h and gcc-rich-location.h.
4037 (implicit_decl_warning): When issuing warnings for implicit
4038 declarations, attempt to provide a suggestion via
4039 lookup_name_fuzzy.
4040 (undeclared_variable): Likewise when issuing errors.
4041 (lookup_name_in_scope): Likewise.
4042 (struct edit_distance_traits<cpp_hashnode *>): New struct.
4043 (best_macro_match): New typedef.
4044 (find_closest_macro_cpp_cb): New function.
4045 (lookup_name_fuzzy): New function.
4046 * c-parser.c: Include gcc-rich-location.h.
4047 (c_token_starts_typename): Split out case CPP_KEYWORD into...
4048 (c_keyword_starts_typename): ...this new function.
4049 (c_parser_declaration_or_fndef): When issuing errors about
4050 missing "struct" etc, add a fixit. For other kinds of errors,
4051 attempt to provide a suggestion via lookup_name_fuzzy.
4052 (c_parser_parms_declarator): When looking ahead to detect typos in
4053 type names, also reject CPP_KEYWORD.
4054 (c_parser_parameter_declaration): When issuing errors about
4055 unknown type names, attempt to provide a suggestion via
4056 lookup_name_fuzzy.
4057 * c-tree.h (c_keyword_starts_typename): New prototype.
4058
5a578671
JM
40592016-06-20 Joseph Myers <joseph@codesourcery.com>
4060
4061 PR c/71601
4062 * c-typeck.c (build_conditional_expr): Return error_mark_node if
4063 c_common_type returns error_mark_node.
4064
3f8257db 40652016-06-19 Martin Sebor <msebor@redhat.com>
aa0db437
MS
4066
4067 PR c/69507
4068 * c-parser.c (c_parser_alignof_expression): Avoid diagnosing
4069 __alignof__ (expression).
4070
6a3f203c
DM
40712016-06-14 David Malcolm <dmalcolm@redhat.com>
4072
4073 * c-typeck.c: Include spellcheck-tree.h rather than spellcheck.h.
4074
264757fb
DM
40752016-06-14 David Malcolm <dmalcolm@redhat.com>
4076
4077 * c-typeck.c (build_component_ref): Simplify fixit code by
4078 using gcc_rich_location::add_fixit_misspelled_id.
4079 (set_init_label): Likewise.
4080
f7e4f2e3
DM
40812016-06-13 David Malcolm <dmalcolm@redhat.com>
4082
4083 * c-parser.c (c_parser_initelt): Provide location of name for new
4084 location_t param of set_init_label.
4085 * c-tree.h (set_init_label): Add location_t param.
4086 * c-typeck.c (set_init_index): Add "fieldname_loc" location_t
4087 param and use it when issuing error messages about unrecognized
4088 field names. Attempt to provide a fixit hint if appropriate,
4089 otherwise update the error message to provide the type name.
4090
4b1ffdb1
TS
40912016-06-10 Thomas Schwinge <thomas@codesourcery.com>
4092
4093 PR c/71381
4094 * c-parser.c (c_parser_omp_variable_list) <OMP_CLAUSE__CACHE_>:
4095 Loosen checking.
4096
44a845ca
MS
40972016-06-08 Martin Sebor <msebor@redhat.com>
4098 Jakub Jelinek <jakub@redhat.com>
4099
4100 PR c++/70507
4101 PR c/68120
4102 * c-typeck.c (convert_arguments): Don't promote last argument
4103 of BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
4104
92a5f2ba
MP
41052016-06-08 Marek Polacek <polacek@redhat.com>
4106
4107 PR c/71418
4108 * c-decl.c (grokdeclarator): Check TYPE_P.
4109
08203f73
MP
4110 PR c/71426
4111 * c-decl.c (get_parm_info): Don't crash on an assert on invalid
4112 code.
4113
6ffd47b7
DM
41142016-06-07 David Malcolm <dmalcolm@redhat.com>
4115
4116 * c-parser.c (c_parser_postfix_expression): In __builtin_offsetof
4117 and structure element reference, capture the location of the
4118 element name token and pass it to build_component_ref.
4119 (c_parser_postfix_expression_after_primary): Likewise for
4120 structure element dereference.
4121 (c_parser_omp_variable_list): Likewise for
4122 OMP_CLAUSE_{_CACHE, MAP, FROM, TO},
4123 * c-tree.h (build_component_ref): Add location_t param.
4124 * c-typeck.c (build_component_ref): Add location_t param
4125 COMPONENT_LOC. Use it, if available, when issuing hints about
4126 mispelled member names to provide a fixit replacement hint.
4127
1f40cff3
MP
41282016-06-06 Marek Polacek <polacek@redhat.com>
4129
4130 PR c/71362
4131 * c-parser.c (c_parser_direct_declarator): Set location.
4132
5545a907
MP
41332016-06-06 Marek Polacek <polacek@redhat.com>
4134
4135 * c-typeck.c (comptypes_internal): Handle comparisons of
4136 INTEGER_TYPE, FIXED_POINT_TYPE, and REAL_TYPE nodes. Don't check
4137 TYPE_REF_CAN_ALIAS_ALL.
4138
b605f663
CLT
41392016-06-03 Chung-Lin Tang <cltang@codesourcery.com>
4140
4141 * c-typeck.c (c_finish_omp_clauses): Mark OpenACC reduction
4142 arguments as addressable when async clause exists.
4143
00631022
JJ
41442016-05-30 Jakub Jelinek <jakub@redhat.com>
4145
4146 PR c++/71349
4147 * c-parser.c (c_parser_omp_for): Don't disallow nowait clause
4148 when combined with target construct.
4149
7211a097
JJ
41502016-05-26 Jakub Jelinek <jakub@redhat.com>
4151
4152 * c-parser.c (c_parser_omp_clause_schedule): Warn if
4153 OMP_CLAUSE_SCHEDULE_CHUNK_EXPR is known not to be positive.
4154
95efe6b6
MP
41552016-05-25 Marek Polacek <polacek@redhat.com>
4156
4157 PR c/71265
4158 * c-decl.c (c_make_fname_decl): Don't check seen_error.
4159
a23faf7a
MP
4160 PR c/71266
4161 * c-decl.c (store_parm_decls_oldstyle): Skip non-PARM_DECLs.
4162
e46c7770
CP
41632016-05-24 Cesar Philippidis <cesar@codesourcery.com>
4164
4165 * c-parser.c (c_parser_oacc_declare): Add support for
4166 GOMP_MAP_FIRSTPRIVATE_POINTER.
4167 * c-typeck.c (handle_omp_array_sections_1): Replace bool is_omp
4168 argument with enum c_omp_region_type ort.
4169 (handle_omp_array_sections): Likewise. Update call to
4170 handle_omp_array_sections_1.
4171 (c_finish_omp_clauses): Add specific errors and warning messages for
4172 OpenACC. Use firsrtprivate pointers for OpenACC subarrays. Update
4173 call to handle_omp_array_sections.
4174
a04e69c0
TS
41752016-05-24 Thomas Schwinge <thomas@codesourcery.com>
4176
4177 * c-parser.c (c_parser_oacc_routine): Tighten syntax checks.
4178
f17a223d
RB
41792016-05-24 Richard Biener <rguenther@suse.de>
4180
4181 PR middle-end/70434
4182 PR c/69504
4183 * c-typeck.c (build_array_ref): Do not complain about indexing
4184 non-lvalue vectors. Adjust for function name change.
4185
79063edd
MS
41862016-05-20 Martin Sebor <msebor@redhat.com>
4187
4188 PR c/71115
4189 * c-typeck.c (error_init): Use
4190 expansion_point_location_if_in_system_header.
4191 (warning_init): Same.
4192
8a40fef3
DM
41932016-05-19 David Malcolm <dmalcolm@redhat.com>
4194
4195 PR c/71171
4196 * c-parser.c (c_parser_generic_selection): Use c_expr::set_error
4197 in error-handling.
4198 (c_parser_postfix_expression): Likewise.
4199 * c-tree.h (c_expr::set_error): New method.
4200 * c-typeck.c (parser_build_binary_op): In error-handling, ensure
4201 that result's range is initialized.
4202
e9892350
JG
42032016-05-17 James Greenhalgh <james.greenhalgh@arm.com>
4204
4205 * c-typeck.c (parser_build_unary_op): Fix formatting.
4206
8fad45f5
MW
42072016-05-16 Matthew Wahab <matthew.wahab@arm.com>
4208
4209 * c-decl.c (grokdeclarator): Remove errmsg and use of
4210 targetm.invalid_return_type.
4211 (grokparms): Remove errmsg and use of
4212 targetm.invalid_parameter_type.
4213
aa4b467b
JM
42142016-05-13 Joseph Myers <joseph@codesourcery.com>
4215
4216 * c-decl.c (grokdeclarator): For C11, discard qualifiers on
4217 function return type.
4218
4f2e1536
MP
42192016-05-12 Marek Polacek <polacek@redhat.com>
4220
4221 PR c/70756
4222 * c-decl.c (build_compound_literal): Pass LOC down to
4223 c_incomplete_type_error.
4224 * c-tree.h (require_complete_type): Adjust declaration.
4225 (c_incomplete_type_error): Likewise.
4226 * c-typeck.c (require_complete_type): Add location parameter, pass it
4227 down to c_incomplete_type_error.
4228 (c_incomplete_type_error): Add location parameter, pass it down to
4229 error_at.
4230 (build_component_ref): Pass location down to c_incomplete_type_error.
4231 (default_conversion): Pass location down to require_complete_type.
4232 (build_array_ref): Likewise.
4233 (build_function_call_vec): Likewise.
4234 (convert_arguments): Likewise.
4235 (build_unary_op): Likewise.
4236 (build_c_cast): Likewise.
4237 (build_modify_expr): Likewise.
4238 (convert_for_assignment): Likewise.
4239 (c_finish_omp_clauses): Likewise.
4240
d6e83a8d
MM
42412016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
4242
4243 PR c/43651
4244 * c-decl.c (declspecs_add_qual): Warn when -Wduplicate-decl-specifier
4245 is enabled.
4246 * c-errors.c (pedwarn_c90): Return true if warned.
4247 * c-tree.h (pedwarn_c90): Change return type to bool.
4248 (enum c_declspec_word): Add new enumerator cdw_atomic.
4249
5c3a10fb
MP
42502016-05-11 Marek Polacek <polacek@redhat.com>
4251
4252 PR c++/71024
4253 * c-decl.c (diagnose_mismatched_decls): Factor out code to
4254 diagnose_mismatched_attributes and call it.
4255
cf68d92c
MP
42562016-05-10 Marek Polacek <polacek@redhat.com>
4257
4258 PR c/70255
4259 * c-decl.c (diagnose_mismatched_decls): Warn for optimize attribute
4260 on a declaration following the definition.
4261
351f85c5
JJ
42622016-05-05 Jakub Jelinek <jakub@redhat.com>
4263
4264 * c-parser.c (c_parser_switch_statement): Add IF_P argument,
4265 parse it through to c_parser_c99_block_statement.
4266 (c_parser_statement_after_labels): Adjust c_parser_switch_statement
4267 caller.
4268
deef7113
MP
42692016-05-04 Marek Polacek <polacek@redhat.com>
4270
4271 * c-parser.c (c_parser_if_statement): Replace OPT_Wparentheses with
4272 OPT_Wdangling_else.
4273
de55efd5
MP
42742016-05-04 Marek Polacek <polacek@redhat.com>
4275
4276 PR c/48778
4277 * c-typeck.c (build_binary_op): Don't issue -Waddress warnings
4278 for macro expansions.
4279
79ce98bc
MP
42802016-05-03 Marek Polacek <polacek@redhat.com>
4281
4282 PR c/70859
4283 * c-typeck.c (build_function_call_vec): Pass LOC and ARG_LOC down to
4284 check_builtin_function_arguments.
4285
fb2647aa
RB
42862016-05-03 Richard Biener <rguenther@suse.de>
4287
4288 * Make-lang.in (cc1-checksum.c): For stage-final re-use
4289 the checksum from the previous stage.
4290
77886428
CP
42912016-05-02 Cesar Philippidis <cesar@codesourcery.com>
4292
4293 * c-parser.c (c_parser_oacc_all_clauses): Update call to
4294 c_finish_omp_clauses.
4295 (c_parser_omp_all_clauses): Likewise.
4296 (c_parser_oacc_cache): Likewise.
4297 (c_parser_oacc_loop): Likewise.
4298 (omp_split_clauses): Likewise.
4299 (c_parser_omp_declare_target): Likewise.
4300 (c_parser_cilk_all_clauses): Likewise.
4301 (c_parser_cilk_for): Likewise.
4302 * c-typeck.c (c_finish_omp_clauses): Replace bool arguments
4303 is_omp, declare_simd, and is_cilk with enum c_omp_region_type ort.
4304
7176a4a0
MP
43052016-05-02 Marek Polacek <polacek@redhat.com>
4306
4307 PR c/70851
4308 * c-decl.c (grokdeclarator): Diagnose when array's size has an
4309 incomplete type.
4310
e7ff0319
CP
43112016-04-29 Cesar Philippidis <cesar@codesourcery.com>
4312
4313 PR middle-end/70626
4314 * c-parser.c (c_parser_oacc_loop): Don't augment mask with
4315 OACC_LOOP_CLAUSE_MASK.
4316 (c_parser_oacc_kernels_parallel): Update call to
4317 c_oacc_split_loop_clauses.
4318
9f405ce1
AM
43192016-04-28 Andrew MacLeod <amacleod@redhat.com>
4320
4321 * c-array-notation.c (fix_builtin_array_notation_fn): Fix final
4322 argument to build_modify_expr in two cases.
4323
c1e1f433
BS
43242016-04-27 Bernd Schmidt <bschmidt@redhat.com>
4325
4326 * c-parser.c (c_parser_postfix_expression_after_primary): Call
4327 warn_for_memset instead of warning directly here.
4328
2448a956
MP
43292016-04-26 Marek Polacek <polacek@redhat.com>
4330
4331 PR c/67784
4332 * c-parser.c (c_parser_maybe_reclassify_token): New function factored
4333 out of ...
4334 (c_parser_for_statement): ... here.
4335 (c_parser_if_statement): Use it.
4336 (c_parser_switch_statement): Use it.
4337 (c_parser_while_statement): Use it.
4338
b02a5e26
MP
4339 PR c/70791
4340 * c-decl.c (pushdecl): Pass LOCUS down to warning.
4341
477d4906
IV
43422016-04-20 Ilya Verbin <ilya.verbin@intel.com>
4343
4344 PR c++/69363
4345 * c-parser.c (c_parser_cilk_all_clauses): Use c_finish_omp_clauses
4346 instead of c_finish_cilk_clauses.
4347 * c-tree.h (c_finish_omp_clauses): Add new default argument.
4348 * c-typeck.c (c_finish_omp_clauses): Add new argument. Allow
4349 floating-point variables in the linear clause for Cilk Plus.
4350
fe37c7af
MM
43512016-04-18 Michael Matz <matz@suse.de>
4352
4353 * c-decl.c (merge_decls): Use SET_DECL_ALIGN and SET_TYPE_ALIGN.
4354 (grokdeclarator, parser_xref_tag, finish_enum): Use SET_TYPE_ALIGN.
4355
949505a9
MP
43562016-04-15 Marek Polacek <polacek@redhat.com>
4357
4358 PR c/70671
4359 * c-typeck.c (build_unary_op): Pass location down to error and
4360 warning call.
4361
dda1bf61
JJ
43622016-04-15 Jakub Jelinek <jakub@redhat.com>
4363
4364 PR c/70436
4365 * c-parser.c (c_parser_pragma): Add IF_P argument, pass it down
4366 where needed.
4367 (c_parser_external_declaration, c_parser_struct_or_union_specifier,
4368 c_parser_parameter_declaration, c_parser_compound_statement_nostart,
4369 c_parser_objc_class_instance_variables, c_parser_objc_methodprotolist):
4370 Adjust c_parser_pragma callers.
4371 (c_parser_statement_after_labels): Likewise. Adjust c_parser_cilk_for
4372 caller.
4373 (c_parser_omp_structured_block): Add IF_P argument, pass it down to
4374 c_parser_statement.
4375 (c_parser_oacc_data, c_parser_oacc_host_data, c_parser_oacc_loop,
4376 c_parser_oacc_kernels_parallel, c_parser_omp_critical,
4377 c_parser_omp_simd, c_parser_omp_for, c_parser_omp_master,
4378 c_parser_omp_ordered, c_parser_omp_parallel, c_parser_omp_single,
4379 c_parser_omp_task, c_parser_omp_taskgroup, c_parser_omp_distribute,
4380 c_parser_omp_teams, c_parser_omp_target_data, c_parser_omp_target,
4381 c_parser_omp_taskloop, c_parser_omp_construct, c_parser_cilk_grainsize,
4382 c_parser_cilk_simd, c_parser_cilk_for): Add IF_P argument, pass it
4383 down where needed.
4384 (c_parser_omp_for_loop): Likewise. Clear IF_P if nbraces.
4385 (c_parser_omp_sections_scope): Adjust c_parser_omp_structured_block
4386 calls.
4387
99cd9857
MP
43882016-04-13 Marek Polacek <polacek@redhat.com>
4389
4390 PR c/70436
4391 * c-parser.c (c_parser_statement_after_labels): Add IF_P argument and
4392 adjust callers.
4393 (c_parser_statement): Likewise.
4394 (c_parser_c99_block_statement): Likewise.
4395 (c_parser_while_statement): Likewise.
4396 (c_parser_for_statement): Likewise.
4397 (c_parser_if_body): Don't set IF_P here.
4398 (c_parser_if_statement): Add IF_P argument. Set IF_P here. Warn
4399 about dangling else here.
4400 * c-tree.h (c_finish_if_stmt): Adjust declaration.
4401 * c-typeck.c (c_finish_if_stmt): Remove NESTED_IF parameter. Don't
4402 warn about dangling else here.
4403
f13355da
MP
44042016-04-04 Marek Polacek <polacek@redhat.com>
4405
4406 PR c/70307
4407 * c-fold.c (c_fully_fold_internal): Handle VEC_COND_EXPR.
4408
5fde6a45
MP
44092016-03-31 Marek Polacek <polacek@redhat.com>
4410
4411 PR c/70297
4412 * c-decl.c (merge_decls): Also set TYPE_ALIGN and TYPE_USER_ALIGN.
4413
4bbf545b
DM
44142016-03-18 David Malcolm <dmalcolm@redhat.com>
4415
4416 PR c/70281
4417 * c-parser.c (c_parser_postfix_expression): Set the source range
4418 for uses of "__builtin_types_compatible_p".
4419
fcc2b74f
JJ
44202016-03-17 Jakub Jelinek <jakub@redhat.com>
4421
4422 PR c/70280
4423 * c-typeck.c (composite_type): Don't count void_list_node
4424 into len, if the list is terminated by void_list_node, start
4425 with void_list_node instead of NULL for newargs. Stop
4426 at void_list_node.
4427
ab4c578f
MP
44282016-03-16 Marek Polacek <polacek@redhat.com>
4429
4430 PR c/70093
4431 * c-typeck.c (build_function_call_vec): Create a TARGET_EXPR for
4432 nested functions returning VM types.
4433
96b3c82d
CP
44342016-03-09 Cesar Philippidis <cesar@codesourcery.com>
4435
4436 * c-parser.c (c_parser_oacc_loop): Update cclauses and clauses
4437 when calling c_finish_omp_clauses.
4438
29b9828f
BS
44392016-03-04 Bernd Schmidt <bschmidt@redhat.com>
4440
4441 PR c/69824
4442 * c-decl.c (get_parm_info): Don't queue implicit function declarations
4443 for later.
4444
7ff6ca38
MP
44452016-03-04 Marek Polacek <polacek@redhat.com>
4446
4447 PR c/69798
4448 * c-parser.c (c_parser_postfix_expression): Call
4449 c_parser_cast_expression rather than c_parser_postfix_expression.
4450
686e2237
JJ
44512016-03-01 Jakub Jelinek <jakub@redhat.com>
4452
4453 PR c/69796
4454 PR c/69974
4455 * c-parser.c (c_parser_translation_unit): Don't change TREE_TYPE
4456 of incomplete decls to error_mark_node.
4457
0b05329b
MP
44582016-02-24 Marek Polacek <polacek@redhat.com>
4459
4460 PR c/69819
4461 * c-decl.c (finish_decl): Don't update the copy of the type of a
4462 different decl type.
4463
067fbd8b
JJ
44642016-02-23 Jakub Jelinek <jakub@redhat.com>
4465
4466 PR objc/69844
4467 * c-parser.c (c_parser_for_statement): Properly handle ObjC classes
4468 in id_kind reclassification.
4469
bf14eba2
JJ
44702016-02-16 Jakub Jelinek <jakub@redhat.com>
4471
4472 PR c/69835
4473 * c-typeck.c (build_binary_op): Revert 2015-09-09 change.
4474
ba539195
JN
44752016-02-16 James Norris <jnorris@codesourcery.com>
4476
4477 PR c/64748
4478 * c-parser.c (c_parser_oacc_data_clause_deviceptr): Allow parms.
4479
16595a1f
BS
44802016-02-12 Bernd Schmidt <bschmidt@redhat.com>
4481
f48dfe98
BS
4482 * c-decl.c (build_null_declspecs): Zero the entire struct.
4483
16595a1f
BS
4484 PR c/69522
4485 * c-parser.c (c_parser_braced_init): New arg outer_obstack. All
4486 callers changed. If nested_p is true, use it to call
4487 finish_implicit_inits.
4488 * c-tree.h (finish_implicit_inits): Declare.
4489 * c-typeck.c (finish_implicit_inits): New function. Move code
4490 from ...
4491 (push_init_level): ... here.
4492 (set_designator, process_init_element): Call finish_implicit_inits.
4493
66756373
JJ
44942016-02-11 Jakub Jelinek <jakub@redhat.com>
4495
4496 PR c/69768
4497 * c-typeck.c (parser_build_binary_op): Strip nops from integer_zerop
4498 arguments for -Waddress warning.
4499
1066e9b5
JJ
45002016-02-04 Jakub Jelinek <jakub@redhat.com>
4501
4502 PR c/69669
4503 * c-decl.c (finish_enum): When honoring mode attribute,
4504 make sure to use proper TYPE_MIN_VALUE and TYPE_MAX_VALUE.
4505
3a5d2ba4
JJ
45062016-01-29 Jakub Jelinek <jakub@redhat.com>
4507
4508 PR debug/69518
4509 * c-decl.c (finish_struct): Clear C_TYPE_INCOMPLETE_VARS in
4510 all type variants, not just TYPE_MAIN_VARIANT.
4511
cbdd8ae0
JJ
45122016-01-27 Jakub Jelinek <jakub@redhat.com>
4513
4514 PR debug/66869
4515 * c-decl.c (c_write_global_declarations_1): Warn with
4516 warn_unused_function if static prototype without definition
4517 is not C_DECL_USED.
4518
fa74a4bc
MP
45192016-01-27 Marek Polacek <polacek@redhat.com>
4520
4521 PR c/68062
4522 * c-typeck.c (build_binary_op) [EQ_EXPR, GE_EXPR]: Promote operand
4523 to unsigned, if needed. Add -Wsign-compare warning.
4524
13f92e8d
JJ
45252016-01-26 Jakub Jelinek <jakub@redhat.com>
4526
4527 PR tree-optimization/69483
4528 * c-parser.c (c_parser_translation_unit): Use FOR_EACH_VEC_ELT.
4529
cd8e73dc 45302016-01-20 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
d25c7690
PK
4531
4532 PR c/24293
4533 * c-tree.h (incomplete_record_decls): Declare.
4534 * c-parser.c (incomplete_record_decls): Define.
4535 (c_parser_translation_unit): Iterate through incomplete_record_decls and
4536 report error if any decl has zero size.
4537 * c-decl.c (finish_decl): Append static decl with incomplete struct/union
4538 or enum type to incomplete_record_decls.
4539
e6d6ec9e
TV
45402016-01-14 Tom de Vries <tom@codesourcery.com>
4541
4542 PR tree-optimization/68773
4543 * c-parser.c (c_parser_oacc_declare, c_parser_omp_declare_target): Don't
4544 set force_output.
4545
00083992
MP
45462016-01-14 Marek Polacek <polacek@redhat.com>
4547
4548 PR c/69262
4549 * c-decl.c (grokdeclarator): Provide more information for invalid
4550 array declarations.
4551
7443cf13
DM
45522016-01-06 David Malcolm <dmalcolm@redhat.com>
4553
4554 * c-parser.c (c_parser_unary_expression): For dereferences, build
4555 a combined location before calling build_indirect_ref, so that
4556 error reports cover the full range, manually updating the c_expr
4557 src_range.
4558
6b131d5b
MP
45592016-01-06 Marek Polacek <polacek@redhat.com>
4560
4561 PR sanitizer/69099
4562 * c-convert.c (convert) [INTEGER_TYPE]: Drop ARG. Don't pass ARG to
4563 ubsan_instrument_float_cast. Fold EXPR. Use NULL_TREE instead of
4564 NULL.
4565
818ab71a
JJ
45662016-01-04 Jakub Jelinek <jakub@redhat.com>
4567
4568 Update copyright years.
4569
2fe0a208
MP
45702016-01-04 Marek Polacek <polacek@redhat.com>
4571
4572 PR c/68908
4573 * c-typeck.c (build_atomic_assign): Improve commentary. Add
4574 optimization to use __atomic_fetch_* built-in if possible.
4575
c7b48c8a
TS
45762015-12-23 Thomas Schwinge <thomas@codesourcery.com>
4577
4578 * c-parser.c (c_parser_oacc_clause_use_device): Merge function
4579 into...
4580 (c_parser_omp_clause_use_device_ptr): ... this function. Adjust
4581 all users.
4582
fda5652f
MP
45832015-12-22 Marek Polacek <polacek@redhat.com>
4584
4585 PR c/69002
4586 * c-typeck.c (build_component_ref): Warn when acessing elements of
4587 atomic structures or unions.
4588
745e411d
DM
45892015-12-21 David Malcolm <dmalcolm@redhat.com>
4590
4591 * c-typeck.c: Include "gcc-rich-location.h".
4592 (build_binary_op): In the two places that call binary_op_error,
4593 create a gcc_rich_location and populate it with the location of
4594 the binary op and its two operands.
4595
94c40e19
DM
45962015-12-16 David Malcolm <dmalcolm@redhat.com>
4597
4598 * c-parser.c (c_parser_statement_after_labels): When calling
4599 c_finish_return, Use the return expression's location if it has
4600 one, falling back to the location of the first token within it.
4601 * c-typeck.c (c_finish_return): When issuing warnings about
4602 the incorrect presence/absence of a return value, issue a note
4603 showing the declaration of the function.
4604
de67c4c3
DM
46052015-12-16 David Malcolm <dmalcolm@redhat.com>
4606
4607 * c-parser.c (struct c_parser): Expand array "tokens_buf" from 2
4608 to 4.
4609 (c_parser_peek_nth_token): New function.
4610 (c_parser_peek_conflict_marker): New function.
4611 (c_parser_error): Detect conflict markers and report them as such.
4612
a10704e1
DM
46132015-12-16 David Malcolm <dmalcolm@redhat.com>
4614
4615 * c-parser.c (c_parser_postfix_expression): Use EXPR_LOC_OR_LOC
4616 to preserve range information for the primary expression
4617 in the call to c_parser_postfix_expression_after_primary.
4618
8062bca6
DM
46192015-12-16 David Malcolm <dmalcolm@redhat.com>
4620
4621 * c-parser.c (c_parser_static_assert_declaration_no_semi): Use the
4622 expression location, falling back on the first token location,
4623 rather than always using the latter.
4624
d06f8b75
MP
46252015-12-16 Marek Polacek <polacek@redhat.com>
4626
4627 PR c/64637
4628 * c-typeck.c (c_process_expr_stmt): Use location of the expression if
4629 available.
4630
2994fb91
MP
46312015-12-15 Marek Polacek <polacek@redhat.com>
4632
4633 PR c/68907
4634 * c-typeck.c (build_atomic_assign): Set TREE_NO_WARNING on an
4635 artificial decl.
4636
a1b93f8d
DM
46372015-12-08 David Malcolm <dmalcolm@redhat.com>
4638
4639 * c-parser.c (c_parser_alignof_expression): Capture location of
4640 closing parenthesis (if any), or of end of unary expression, and
4641 use it to build a src_range for the expression.
4642
46c6e1e2
DM
46432015-12-08 David Malcolm <dmalcolm@redhat.com>
4644
4645 PR c/68757
4646 * c-parser.c (c_parser_get_builtin_args): Add
4647 "out_close_paren_loc" param, and write back to it.
4648 (c_parser_postfix_expression): Capture the closing
4649 parenthesis location for RID_CHOOSE_EXPR,
4650 RID_BUILTIN_CALL_WITH_STATIC_CHAIN, RID_BUILTIN_COMPLEX,
4651 RID_BUILTIN_SHUFFLE and use it to set the source range
4652 for such expressions; within RID_BUILTIN_COMPLEX set
4653 the underlying location.
4654
66189108
MP
46552015-12-07 Marek Polacek <polacek@redhat.com>
4656
4657 PR c/68668
4658 * c-decl.c (grokdeclarator): If ORIG_QUAL_INDIRECT is indirect, use
4659 TREE_TYPE of ORIG_QUAL_TYPE, otherwise decrement ORIG_QUAL_INDIRECT.
4660
f187980b
EB
46612015-12-04 Eric Botcazou <ebotcazou@adacore.com>
4662
4663 * c-tree.h (c_build_va_arg): Adjust prototype.
4664 * c-parser.c (c_parser_postfix_expression): Adjust call to above.
4665 * c-typeck.c (c_build_va_arg): Rename LOC parameter to LOC2, add LOC1
4666 parameter, adjust throughout and issue an error if EXPR is a component
4667 with reverse storage order.
4668
4250754e
JM
46692015-12-02 Jason Merrill <jason@redhat.com>
4670
4671 * c-fold.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
4672 (c_fully_fold_internal, decl_constant_value_for_optimization):
4673 Move from c-common.c.
4674 * c-tree.h: Declare decl_constant_value_for_optimization.
4675 * Make-lang.in (C_AND_OBJC_OBJS): Add c-fold.o.
4676
e9e32ee6
JM
46772015-12-02 Joseph Myers <joseph@codesourcery.com>
4678
4679 PR c/68162
4680 * c-decl.c (grokdeclarator): Set first_non_attr_kind before
4681 following link from declarator to next declarator. Track original
4682 qualified type and pass it to c_build_qualified_type.
4683 * c-typeck.c (c_build_qualified_type): Add arguments
4684 orig_qual_type and orig_qual_indirect.
4685
ff7a55bf
TS
46862015-12-02 Thomas Schwinge <thomas@codesourcery.com>
4687
4688 * c-parser.c (c_parser_omp_clause_name)
4689 (c_parser_oacc_all_clauses): Alphabetical sorting.
4690
657e4e47
JJ
46912015-12-02 Jakub Jelinek <jakub@redhat.com>
4692
4693 PR c/68533
4694 * c-decl.c (get_parm_info): Use b->locus instead of input_location
4695 for diagnostics.
4696
37d5ad46
JB
46972015-12-01 Julian Brown <julian@codesourcery.com>
4698 Cesar Philippidis <cesar@codesourcery.com>
4699 James Norris <James_Norris@mentor.com>
4700
4701 * c-parser.c (c_parser_omp_clause_name): Add use_device support.
4702 (c_parser_oacc_clause_use_device): New function.
4703 (c_parser_oacc_all_clauses): Add use_device support.
4704 (OACC_HOST_DATA_CLAUSE_MASK): New macro.
4705 (c_parser_oacc_host_data): New function.
4706 (c_parser_omp_construct): Add host_data support.
4707 * c-tree.h (c_finish_oacc_host_data): Add prototype.
4708 * c-typeck.c (c_finish_oacc_host_data): New function.
4709 (c_finish_omp_clauses): Add use_device support.
4710
a4850ce9
JH
47112015-11-29 Jan Hubicka <hubicka@ucw.cz>
4712
4713 PR c/67106
4714 * c-decl.c: Set TYPE_PACKED in variants.
4715
b58d3df2
ML
47162015-11-27 Martin Liska <mliska@suse.cz>
4717
4718 PR c++/68312
4719 * c-array-notation.c (fix_builtin_array_notation_fn):
4720 Use release_vec_vec instead of vec::release.
4721 (build_array_notation_expr): Likewise.
4722 (fix_conditional_array_notations_1): Likewise.
4723 (fix_array_notation_expr): Likewise.
4724 (fix_array_notation_call_expr): Likewise.
4725
aec17bfe
JJ
47262015-11-27 Jakub Jelinek <jakub@redhat.com>
4727
4728 PR c/63326
4729 * c-parser.c (c_parser_compound_statement_nostart): If
4730 last_label is true, use pragma_stmt instead of pragma_compound
4731 as second c_parser_pragma argument.
4732 (c_parser_omp_ordered, c_parser_omp_target_update,
4733 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Pass
4734 false as second argument to c_parser_skip_to_pragma_eol after
4735 diagnosing standalone directives used in pragma_stmt context.
4736
688c4de0
IV
47372015-11-24 Ilya Verbin <ilya.verbin@intel.com>
4738
4739 * c-parser.c (c_parser_oacc_declare): Replace "ifdef ENABLE_OFFLOADING"
4740 with "if (ENABLE_OFFLOADING)".
4741
cbd03aee
DM
47422015-11-23 David Malcolm <dmalcolm@redhat.com>
4743
4744 PR objc/68438
4745 * c-parser.c (c_parser_postfix_expression): Set up source ranges
4746 for various Objective-C constructs: Class.name syntax,
4747 @selector(), @protocol(), @encode(), and [] message syntax.
4748
a87a86e1
DM
47492015-11-20 David Malcolm <dmalcolm@redhat.com>
4750
4751 PR 62314
4752 * c-typeck.c (should_suggest_deref_p): New function.
4753 (build_component_ref): Special-case POINTER_TYPE when
4754 generating a "not a structure of union" error message, and
4755 suggest a "->" rather than a ".", providing a fix-it hint.
4756
8ece8dfb
DM
47572015-11-19 David Malcolm <dmalcolm@redhat.com>
4758
4759 * c-typeck.c (lookup_field_fuzzy): Move determination of closest
4760 candidate into a new function, find_closest_identifier.
4761
433068cc
MP
47622015-11-19 Marek Polacek <polacek@redhat.com>
4763
4764 PR c/68412
4765 * c-typeck.c (parser_build_binary_op): Properly handle
4766 C_MAYBE_CONST_EXPR before calling warn_tautological_cmp.
4767
bef08b71
DM
47682015-11-17 David Malcolm <dmalcolm@redhat.com>
4769
4770 * c-parser.c (set_c_expr_source_range): Bulletproof both
4771 overloaded implementations against NULL expr->value.
4772 (c_parser_braced_init): Set src_range for "ret" to a sane pair of
4773 values.
4774 (c_parser_unary_expression): Likewise when handling addresses of
4775 labels.
4776 (c_parser_postfix_expression): Likewise for statement expressions,
4777 for __FUNCTION__, __PRETTY_FUNCTION_ and __func__ keywords, for
4778 __builtin_va_arg, and for __builtin_offset_of.
4779 (c_parser_postfix_expression_after_paren_type): Initialize expr's
4780 src_range using the range of the braced initializer.
4781 (c_parser_transaction_expression): Set src_range for "ret" to a
4782 sane pair of values.
4783
fff77217
KY
47842015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
4785
4786 * c-parser.c (c_finish_omp_declare_simd): Look for
4787 "simd" attribute as well. Update error message.
4788
1d899da2
TS
47892015-11-14 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
4790
4791 * c-parser.c (c_parser_omp_declare_target): Adjust.
4792
e4606348
JJ
47932015-11-14 Jakub Jelinek <jakub@redhat.com>
4794
4795 * c-typeck.c (c_finish_omp_clauses): Don't mark
4796 GOMP_MAP_FIRSTPRIVATE_POINTER decls addressable.
4797
3e636daf
MP
47982015-11-14 Marek Polacek <polacek@redhat.com>
4799
4800 * c-decl.c: Use RECORD_OR_UNION_TYPE_P throughout.
4801 * c-typeck.c: Likewise.
4802
ebedc9a3
DM
48032015-11-13 David Malcolm <dmalcolm@redhat.com>
4804
4805 * c-decl.c (warn_defaults_to): Pass line_table to
4806 rich_location ctor.
4807 * c-errors.c (pedwarn_c99): Likewise.
4808 (pedwarn_c90): Likewise.
4809 * c-parser.c (set_c_expr_source_range): New functions.
4810 (c_token::get_range): New method.
4811 (c_token::get_finish): New method.
4812 (c_parser_expr_no_commas): Call set_c_expr_source_range on the ret
4813 based on the range from the start of the LHS to the end of the
4814 RHS.
4815 (c_parser_conditional_expression): Likewise, based on the range
4816 from the start of the cond.value to the end of exp2.value.
4817 (c_parser_binary_expression): Call set_c_expr_source_range on
4818 the stack values for TRUTH_ANDIF_EXPR and TRUTH_ORIF_EXPR.
4819 (c_parser_cast_expression): Call set_c_expr_source_range on ret
4820 based on the cast_loc through to the end of the expr.
4821 (c_parser_unary_expression): Likewise, based on the
4822 op_loc through to the end of op.
4823 (c_parser_sizeof_expression) Likewise, based on the start of the
4824 sizeof token through to either the closing paren or the end of
4825 expr.
4826 (c_parser_postfix_expression): Likewise, using the token range,
4827 or from the open paren through to the close paren for
4828 parenthesized expressions.
4829 (c_parser_postfix_expression_after_primary): Likewise, for
4830 various kinds of expression.
4831 * c-tree.h (struct c_expr): Add field "src_range".
4832 (c_expr::get_start): New method.
4833 (c_expr::get_finish): New method.
4834 (set_c_expr_source_range): New decls.
4835 * c-typeck.c (parser_build_unary_op): Call set_c_expr_source_range
4836 on ret for prefix unary ops.
4837 (parser_build_binary_op): Likewise, running from the start of
4838 arg1.value through to the end of arg2.value.
4839
ec8b536f
MP
48402015-11-13 Marek Polacek <polacek@redhat.com>
4841
4842 PR c/68320
4843 * c-parser.c (c_parser_for_statement): Treat unknown tokens as IDs.
4844
277fe616
DM
48452015-11-13 David Malcolm <dmalcolm@redhat.com>
4846
4847 * c-typeck.c: Include spellcheck.h.
4848 (lookup_field_fuzzy_find_candidates): New function.
4849 (lookup_field_fuzzy): New function.
4850 (build_component_ref): If the field was not found, try using
4851 lookup_field_fuzzy and potentially offer a suggestion.
4852
6e232ba4
JN
48532015-11-12 James Norris <jnorris@codesourcery.com>
4854 Joseph Myers <joseph@codesourcery.com>
4855
4856 * c-parser.c (c_parser_pragma): Handle PRAGMA_OACC_DECLARE.
4857 (c_parser_omp_clause_name): Handle 'device_resident' clause.
4858 (c_parser_oacc_data_clause): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
4859 and PRAGMA_OMP_CLAUSE_LINK.
4860 (c_parser_oacc_all_clauses): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
4861 and PRAGMA_OACC_CLAUSE_LINK.
4862 (OACC_DECLARE_CLAUSE_MASK): New definition.
4863 (c_parser_oacc_declare): New function.
4864
9be4f715
MP
48652015-11-12 Marek Polacek <polacek@redhat.com>
4866
4867 PR c/67784
4868 * c-parser.c (c_parser_for_statement): Reclassify the token in
4869 a correct scope.
4870
e78bede6
MP
48712015-11-11 Marek Polacek <polacek@redhat.com>
4872
4873 PR c/68107
4874 PR c++/68266
4875 * c-decl.c (grokdeclarator): Call valid_array_size_p. Remove code
4876 checking the size of an array.
4877
69f293c9
AM
48782015-11-11 Andrew MacLeod <amacleod@redhat.com>
4879
4880 * c-array-notation.c: Remove unused header files.
4881 * c-aux-info.c: Likewise.
4882 * c-convert.c: Likewise.
4883 * c-decl.c: Likewise.
4884 * c-errors.c: Likewise.
4885 * c-lang.c: Likewise.
4886 * c-objc-common.c: Likewise.
4887 * c-parser.c: Likewise.
4888 * c-typeck.c: Likewise.
4889 * gccspec.c: Likewise.
4890
3a40d81d
NS
48912015-11-09 Thomas Schwinge <thomas@codesourcery.com>
4892 Cesar Philippidis <cesar@codesourcery.com>
4893 James Norris <jnorris@codesourcery.com>
4894 Julian Brown <julian@codesourcery.com>
4895 Nathan Sidwell <nathan@codesourcery.com>
4896
3a40d81d
NS
4897 * c-parser.c (c_parser_declaration_or_fndef): Add OpenACC
4898 routine arg.
4899 (c_parser_declaration_or_fndef): Call c_finish_oacc_routine.
4900 (c_parser_pragma): Parse 'acc routine'.
4901 (OACC_ROUTINE_CLAUSE_MARK): Define.
4902 (c_parser_oacc_routine, (c_finish_oacc_routine): New.
4903
fc402eec
AA
49042015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
4905
4906 PR debug/67192
4907 * c-typeck.c (c_finish_loop): For unconditional loops, set the
4908 location of the backward-goto to the start of the loop body.
4909
f6b0b3db
AA
49102015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
4911
4912 PR debug/67192
4913 * c-parser.c (c_parser_while_statement): Finish the loop before
4914 parsing ahead for misleading indentation.
4915 (c_parser_for_statement): Likewise.
4916
ee45a32d
EB
49172015-11-08 Eric Botcazou <ebotcazou@adacore.com>
4918
4919 * c-decl.c (finish_struct): If the structure has reverse storage
4920 order, rewrite the type of array fields with scalar component. Call
4921 maybe_apply_pragma_scalar_storage_order on entry.
4922 * c-typeck.c (build_unary_op) <ADDR_EXPR>: Remove left-overs. Issue
4923 errors on bit-fields and reverse SSO here and not...
4924 (c_mark_addressable): ...here.
4925 (output_init_element): Adjust call to initializer_constant_valid_p.
4926 (c_build_qualified_type): Propagate TYPE_REVERSE_STORAGE_ORDER.
4927
8a645150
DM
49282015-11-06 David Malcolm <dmalcolm@redhat.com>
4929
4930 * c-decl.c (warn_defaults_to): Update for change in signature
4931 of diagnostic_set_info.
4932 * c-errors.c (pedwarn_c99): Likewise.
4933 (pedwarn_c90): Likewise.
4934 * c-objc-common.c (c_tree_printer): Update for new "caret_p" param
4935 for textinfo::set_location.
4936
7a5e4956
CP
49372015-11-05 Cesar Philippidis <cesar@codesourcery.com>
4938 Thomas Schwinge <thomas@codesourcery.com>
4939 James Norris <jnorris@codesourcery.com>
4940
4941 * c-parser.c (c_parser_omp_clause_name): Add support for
4942 PRAGMA_OACC_CLAUSE_INDEPENDENT and PRAGMA_OACC_CLAUSE_TILE.
4943 (c_parser_omp_clause_default): Add is_oacc argument. Handle
4944 default(none) in OpenACC.
4945 (c_parser_oacc_shape_clause): Allow pointer variables as gang static
4946 arguments.
4947 (c_parser_oacc_clause_tile): New function.
4948 (c_parser_oacc_all_clauses): Add support for OMP_CLAUSE_DEFAULT,
4949 OMP_CLAUSE_INDEPENDENT and OMP_CLAUSE_TILE.
4950 (OACC_LOOP_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_{PRIVATE,INDEPENDENT,
4951 TILE}.
4952 (OACC_KERNELS_MASK): Add PRAGMA_OACC_CLAUSE_DEFAULT.
4953 (OACC_PARALLEL_MASK): Add PRAGMA_OACC_CLAUSE_{DEFAULT,PRIVATE,
4954 FIRSTPRIVATE}.
4955 (c_parser_omp_all_clauses): Update call to c_parser_omp_clause_default.
4956 (c_parser_oacc_update): Update the error message for missing clauses.
4957 * c-typeck.c (c_finish_omp_clauses): Add support for OMP_CLAUSE_TILE
4958 and OMP_CLAUSE_INDEPENDENT.
4959
bfcfbfa0
MP
49602015-11-05 Marek Polacek <polacek@redhat.com>
4961
4962 PR c/68090
4963 * c-parser.c (c_parser_postfix_expression_after_paren_type): Don't
4964 deal with pre-evaluation on invalid types.
4965
e01d41e5
JJ
49662015-11-05 Jakub Jelinek <jakub@redhat.com>
4967 Ilya Verbin <ilya.verbin@intel.com>
4968
4969 * c-parser.c: Include context.h and gimple-expr.h.
4970 (c_parser_omp_clause_schedule): Parse schedule modifiers, diagnose
4971 monotonic together with nonmonotonic.
4972 (c_parser_omp_for_loop): Call c_omp_check_loop_iv. Call add_stmt here.
4973 (OMP_DISTRIBUTE_CLAUSE_MASK): Add lastprivate clause.
4974 (c_parser_omp_target_data, c_parser_omp_target_enter_data,
4975 c_parser_omp_target_exit_data): Allow GOMP_MAP_ALWAYS_POINTER.
4976 (c_parser_omp_target): Likewise. Evaluate num_teams and thread_limit
4977 expressions on combined target teams before the target.
4978 (c_parser_omp_declare_target): If decl has "omp declare target" or
4979 "omp declare target link" attribute, and cgraph or varpool node already
4980 exists, then set corresponding flags. Call c_finish_omp_clauses
4981 in the parenthesized extended-list syntax case.
4982 * c-decl.c (c_decl_attributes): Don't diagnose block scope vars inside
4983 declare target.
4984 * c-typeck.c (handle_omp_array_sections_1): Allow non-zero low-bound
4985 on OMP_CLAUSE_REDUCTION array sections.
4986 (handle_omp_array_sections): Encode low-bound into the MEM_REF, either
4987 into the constant offset, or for variable low-bound using
4988 POINTER_PLUS_EXPR. For structure element based array sections use
4989 GOMP_MAP_ALWAYS_POINTER instead of GOMP_MAP_FIRSTPRIVATE_POINTER.
4990 (c_finish_omp_clauses): Drop generic_field_head, structure
4991 elements are now always mapped even as array section bases,
4992 diagnose same var in data sharing and mapping clauses. Diagnose if
4993 linear step on declare simd is neither a constant nor a uniform
4994 parameter. Look through POINTER_PLUS_EXPR for array section
4995 reductions. Diagnose the same var or function appearing multiple
4996 times on the same directive. Fix up wording for the to clause if t
4997 is neither a FUNCTION_DECL nor a VAR_DECL. Diagnose nonmonotonic
4998 modifier on kinds other than dynamic or guided or nonmonotonic
4999 modifier together with ordered clause.
5000
4bf9e5a8
TS
50012015-11-03 Thomas Schwinge <thomas@codesourcery.com>
5002 Chung-Lin Tang <cltang@codesourcery.com>
5003
5004 * c-parser.c (c_parser_omp_construct): Handle PRAGMA_OACC_ATOMIC.
5005
2adfab87
AM
50062015-10-29 Andrew MacLeod <amacleod@redhat.com>
5007
5008 * c-array-notation.c: Reorder #include's and remove duplicates.
5009 * c-aux-info.c: Likewise.
5010 * c-convert.c: Likewise.
5011 * c-decl.c: Likewise.
5012 * c-errors.c: Likewise.
5013 * c-lang.c: Likewise.
5014 * c-objc-common.c: Likewise.
5015 * c-parser.c: Likewise.
5016 * c-typeck.c: Likewise.
5017
e922069e
JW
50182015-10-26 Jim Wilson <jim.wilson@linaro.org>
5019
5020 PR debug/66068
5021 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
5022 after calling build_qualified_type.
5023
765dd391
CP
50242015-10-27 Cesar Philippidis <cesar@codesourcery.com>
5025 Thomas Schwinge <thomas@codesourcery.com>
5026 James Norris <jnorris@codesourcery.com>
5027 Joseph Myers <joseph@codesourcery.com>
5028 Julian Brown <julian@codesourcery.com>
5029 Bernd Schmidt <bschmidt@redhat.com>
5030
5031 * c-parser.c (c_parser_oacc_shape_clause): New.
5032 (c_parser_oacc_simple_clause): New.
5033 (c_parser_oacc_all_clauses): Add auto, gang, seq, vector, worker.
5034 (OACC_LOOP_CLAUSE_MASK): Add gang, worker, vector, auto, seq.
5035
88bae6f4
TS
50362015-10-27 Thomas Schwinge <thomas@codesourcery.com>
5037 James Norris <jnorris@codesourcery.com>
5038 Cesar Philippidis <cesar@codesourcery.com>
5039
5040 PR c/64765
5041 PR c/64880
5042 * c-parser.c (c_parser_oacc_loop): Add mask, cclauses formal
5043 parameters, and handle these. Adjust all users.
5044 (c_parser_oacc_kernels, c_parser_oacc_parallel): Merge functions
5045 into...
5046 (c_parser_oacc_kernels_parallel): ... this new function. Adjust
5047 all users.
5048 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels): Don't
5049 declare functions.
5050 (c_finish_omp_construct): Declare function.
5051 * c-typeck.c (c_finish_oacc_parallel, c_finish_oacc_kernels):
5052 Merge functions into...
5053 (c_finish_omp_construct): ... this new function.
5054
a8fc2579
RB
50552015-10-22 Richard Biener <rguenther@suse.de>
5056
5057 * c-typeck.c (c_finish_omp_clauses): Properly convert operands
5058 before folding a MINUS_EXPR.
5059
e9122ef6
MP
50602015-10-21 Marek Polacek <polacek@redhat.com>
5061
5062 PR c/68024
5063 * c-decl.c (start_function): Warn about vararg functions without
5064 a prototype.
5065
9f47c7e5
IE
50662015-10-21 Ilya Enkovich <enkovich.gnu@gmail.com>
5067
5068 * c-typeck.c (build_conditional_expr): Use boolean vector
5069 type for vector comparison.
5070 (build_vec_cmp): New.
5071 (build_binary_op): Use build_vec_cmp for comparison.
5072
fa60eeb9
MP
50732015-10-20 Marek Polacek <polacek@redhat.com>
5074
5075 * c-parser.c (is_cilkplus_vector_p): Don't define here.
5076
2c7020eb
MP
50772015-10-20 Marek Polacek <polacek@redhat.com>
5078
5079 PR c/67964
5080 * c-parser.c (c_parser_attributes): Break out of the loop if the
5081 token after an attribute isn't a comma.
5082
d9a6bd32
JJ
50832015-10-13 Jakub Jelinek <jakub@redhat.com>
5084 Aldy Hernandez <aldyh@redhat.com>
5085
5086 * c-parser.c (c_parser_pragma): Handle PRAGMA_OMP_ORDERED here.
5087 (c_parser_omp_clause_name): Handle OpenMP 4.5 clauses.
5088 (c_parser_omp_variable_list): Handle structure elements for
5089 map, to and from clauses. Handle array sections in reduction
5090 clause. Formatting fixes.
5091 (c_parser_omp_clause_if): Add IS_OMP argument, handle parsing of
5092 if clause modifiers.
5093 (c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
5094 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
5095 c_parser_omp_clause_defaultmap, c_parser_omp_clause_use_device_ptr,
5096 c_parser_omp_clause_is_device_ptr): New functions.
5097 (c_parser_omp_clause_ordered): Parse optional parameter.
5098 (c_parser_omp_clause_reduction): Handle array reductions.
5099 (c_parser_omp_clause_schedule): Parse optional simd modifier.
5100 (c_parser_omp_clause_nogroup, c_parser_omp_clause_orderedkind): New
5101 functions.
5102 (c_parser_omp_clause_linear): Parse linear clause modifiers.
5103 (c_parser_omp_clause_depend_sink): New function.
5104 (c_parser_omp_clause_depend): Parse source/sink depend kinds.
5105 (c_parser_omp_clause_map): Parse release/delete map kinds and
5106 optional always modifier.
5107 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_if
5108 and c_finish_omp_clauses callers.
5109 (c_parser_omp_all_clauses): Likewise. Parse OpenMP 4.5 clauses.
5110 Parse "to" as OMP_CLAUSE_TO_DECLARE if on declare target directive.
5111 (c_parser_oacc_cache): Adjust c_finish_omp_clauses caller.
5112 (OMP_CRITICAL_CLAUSE_MASK): Define.
5113 (c_parser_omp_critical): Parse critical clauses.
5114 (c_parser_omp_for_loop): Handle doacross loops, adjust
5115 c_finish_omp_for and c_finish_omp_clauses callers.
5116 (OMP_SIMD_CLAUSE_MASK): Add simdlen clause.
5117 (c_parser_omp_simd): Allow ordered clause if it has no parameter.
5118 (OMP_FOR_CLAUSE_MASK): Add linear clause.
5119 (c_parser_omp_for): Disallow ordered clause when combined with
5120 distribute. Disallow linear clause when combined with distribute
5121 and not combined with simd.
5122 (OMP_ORDERED_CLAUSE_MASK, OMP_ORDERED_DEPEND_CLAUSE_MASK): Define.
5123 (c_parser_omp_ordered): Add CONTEXT argument, remove LOC argument,
5124 parse clauses and if depend clause is found, don't parse a body.
5125 (c_parser_omp_parallel): Disallow copyin clause on target parallel.
5126 Allow target parallel without for after it.
5127 (OMP_TASK_CLAUSE_MASK): Add priority clause.
5128 (OMP_TARGET_DATA_CLAUSE_MASK): Add use_device_ptr clause.
5129 (c_parser_omp_target_data): Diagnose no map clauses or clauses with
5130 invalid kinds.
5131 (OMP_TARGET_UPDATE_CLAUSE_MASK): Add depend and nowait clauses.
5132 (OMP_TARGET_ENTER_DATA_CLAUSE_MASK,
5133 OMP_TARGET_EXIT_DATA_CLAUSE_MASK): Define.
5134 (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): New
5135 functions.
5136 (OMP_TARGET_CLAUSE_MASK): Add depend, nowait, private, firstprivate,
5137 defaultmap and is_device_ptr clauses.
5138 (c_parser_omp_target): Parse target parallel and target simd. Set
5139 OMP_TARGET_COMBINED on combined constructs. Parse target enter data
5140 and target exit data. Diagnose invalid map kinds.
5141 (OMP_DECLARE_TARGET_CLAUSE_MASK): Define.
5142 (c_parser_omp_declare_target): Parse OpenMP 4.5 forms of this
5143 construct.
5144 (c_parser_omp_declare_reduction): Use STRIP_NOPS when checking for
5145 &omp_priv.
5146 (OMP_TASKLOOP_CLAUSE_MASK): Define.
5147 (c_parser_omp_taskloop): New function.
5148 (c_parser_omp_construct): Don't handle PRAGMA_OMP_ORDERED here,
5149 handle PRAGMA_OMP_TASKLOOP.
5150 (c_parser_cilk_for): Adjust c_finish_omp_clauses callers.
5151 * c-tree.h (c_finish_omp_clauses): Add two new arguments.
5152 * c-typeck.c (handle_omp_array_sections_1): Fix comment typo.
5153 Add IS_OMP argument, handle structure element bases, diagnose
5154 bitfields, pass IS_OMP recursively, diagnose known zero length
5155 array sections in depend clauses, handle array sections in reduction
5156 clause, diagnose negative length even for pointers.
5157 (handle_omp_array_sections): Add IS_OMP argument, use auto_vec for
5158 types, pass IS_OMP down to handle_omp_array_sections_1, handle
5159 array sections in reduction clause, set
5160 OMP_CLAUSE_MAP_MAYBE_ZERO_LENGTH_ARRAY_SECTION if map could be zero
5161 length array section, use GOMP_MAP_FIRSTPRIVATE_POINTER for IS_OMP.
5162 (c_finish_omp_clauses): Add IS_OMP and DECLARE_SIMD arguments.
5163 Handle new OpenMP 4.5 clauses and new restrictions for the old ones.
5164
21ba0cea
MP
51652015-10-06 Marek Polacek <polacek@redhat.com>
5166
5167 * c-parser.c (c_parser_statement_after_labels): Use
5168 protected_set_expr_location.
5169 (c_parser_omp_clause_num_gangs): Likewise.
5170 (c_parser_omp_clause_num_threads): Likewise.
5171 (c_parser_omp_clause_num_workers): Likewise.
5172 (c_parser_omp_clause_vector_length): Likewise.
5173 (c_parser_omp_clause_num_teams): Likewise.
5174 (c_parser_omp_clause_thread_limit): Likewise.
5175 * c-typeck.c (build_c_cast): Likewise.
5176 (c_cast_expr): Likewise.
5177
624d31fe
RS
51782015-10-05 Richard Sandiford <richard.sandiford@arm.com>
5179
5180 * c-typeck.c (c_tree_equal): Use real_equal instead of
5181 REAL_VALUES_EQUAL.
5182
b8fd7909
JM
51832015-10-04 Jason Merrill <jason@redhat.com>
5184
5185 * c-parser.c (c_lex_one_token): Handle @synchronized.
5186 * c-decl.c (match_builtin_function_types): A declaration of a built-in
5187 can change whether the function is transaction_safe.
5188
1c7485af
MP
51892015-10-02 Marek Polacek <polacek@redhat.com>
5190
5191 PR c/67730
5192 * c-typeck.c (convert_for_assignment): Use the expansion point
5193 location throughout.
5194
3e3b8d63
MP
51952015-10-02 Marek Polacek <polacek@redhat.com>
5196
5197 PR c/64249
5198 * c-parser.c (c_parser_statement_after_labels): Add CHAIN parameter
5199 and pass it down to c_parser_if_statement.
5200 (c_parser_else_body): Add CHAIN parameter and pass it down to
5201 c_parser_statement_after_labels.
5202 (c_parser_if_statement): Add CHAIN parameter. Add code to warn about
5203 duplicated if-else-if conditions.
5204
aabef2de
MP
52052015-10-01 Marek Polacek <polacek@redhat.com>
5206
5207 * c-typeck.c (convert_for_assignment): Improve commentary.
5208
de8ddd5f
MP
52092015-09-30 Marek Polacek <polacek@redhat.com>
5210
5211 PR c/67730
5212 * c-typeck.c (c_finish_return): Use the expansion point location for
5213 certain "return with value" warnings.
5214
c4914de6
MLI
52152015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
5216
5217 * c-parser.c (pragma_lex): Add loc argument.
5218
0e36f5c7
MP
52192015-09-15 Marek Polacek <polacek@redhat.com>
5220
5221 PR c/67580
5222 * c-decl.c (tag_exists_p): New function.
5223 * c-parser.c (c_parser_declaration_or_fndef): Give a hint when
5224 struct/union/enum keywords are missing.
5225 * c-tree.h (tag_exists_p): Declare.
5226
2f3bb934
MP
52272015-09-15 Marek Polacek <polacek@redhat.com>
5228
5229 * c-decl.c (lookup_label): Return NULL_TREE instead of 0.
5230 (lookup_tag): Change the type of THISLEVEL_ONLY to bool.
5231 Return NULL_TREE instead of 0.
5232 (lookup_name): Return NULL_TREE instead of 0.
5233 (lookup_name_in_scope): Likewise.
5234 (shadow_tag_warned): Use true instead of 1 and NULL_TREE instead of 0.
5235 (parser_xref_tag): Use false instead of 0.
5236 (start_struct): Use true instead of 1.
5237 (start_enum): Use true instead of 1 and NULL_TREE instead of 0.
5238
aa256c4a
MP
52392015-09-14 Marek Polacek <polacek@redhat.com>
5240
5241 * c-typeck.c (set_nonincremental_init_from_string): Use
5242 HOST_WIDE_INT_M1U when shifting a negative value.
5243
dbb68221
MW
52442015-09-09 Mark Wielaard <mjw@redhat.com>
5245
5246 * c-typeck.c (build_binary_op): Check and warn when nonnull arg
5247 parm against NULL.
5248
a8a098ac
JJ
52492015-09-10 Jakub Jelinek <jakub@redhat.com>
5250
5251 PR c/67502
5252 * c-parser.c (c_parser_omp_for_loop): Emit DECL_EXPR stmts
5253 into OMP_FOR_PRE_BODY rather than before the loop.
5254
f4b189d5
JJ
52552015-09-09 Jakub Jelinek <jakub@redhat.com>
5256
0bb99c11
JJ
5257 PR c/67501
5258 * c-parser.c (c_parser_oacc_all_clauses,
5259 c_parser_omp_all_clauses): Remove invalid clause from
5260 list of clauses even if parser->error is set.
5261
fce5e5e3
JJ
5262 PR c/67500
5263 * c-parser.c (c_parser_omp_clause_aligned,
5264 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen): Fix up
5265 test for errors.
5266 * c-decl.c (temp_pop_parm_decls): Allow b->decl equal to
5267 error_mark_node.
5268
f4b189d5
JJ
5269 PR c/67495
5270 * c-parser.c (c_parser_omp_atomic): Use c_parser_cast_expression
5271 instead of c_parser_unary_expression. If the result is !lvalue_p,
5272 wrap the result of c_fully_fold into NON_LVALUE_EXPR.
5273
b2aaf235
MP
52742015-09-04 Marek Polacek <polacek@redhat.com>
5275
5276 PR sanitizer/67279
5277 * c-typeck.c (build_binary_op): Don't instrument static initializers.
5278
1807ffc1
MS
52792015-09-03 Martin Sebor <msebor@redhat.com>
5280
5281 PR c/66516
8b652e65
JJ
5282 * c-typeck.c (convert_arguments, parser_build_unary_op,
5283 build_conditional_expr, c_cast_expr, convert_for_assignment,
5284 build_binary_op, _objc_common_truthvalue_conversion): Call
1807ffc1
MS
5285 reject_gcc_builtin.
5286 (c_decl_implicit): Define.
5287
d04ff417
MP
52882015-09-02 Marek Polacek <polacek@redhat.com>
5289
5290 PR c/67432
5291 * c-parser.c (c_parser_enum_specifier): Give a better error for
5292 an empty enum.
5293
a79683d5
TS
52942015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
5295
5296 * c-aux-info.c, c-parser.c, c-tree.h: Remove useless typedefs.
5297
191a6b94
MP
52982015-08-12 Marek Polacek <polacek@redhat.com>
5299
5300 * c-decl.c (grokdeclarator): Call error_at instead of error and pass
5301 LOC to it.
5302
420a9d9b
MP
53032015-08-03 Marek Polacek <polacek@redhat.com>
5304
5305 PR c/67088
5306 * c-decl.c (check_bitfield_type_and_width): Add location parameter.
5307 Use it.
5308 (grokdeclarator): Pass LOC down to check_bitfield_type_and_width.
5309
992118a1
PP
53102015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
5311
5312 * c-parser.c (c_parser_if_body): Take token_indent_info
5313 argument. Call warn_for_misleading_indentation even when the
5314 body is a semicolon. Extract token_indent_infos corresponding
5315 to the guard, body and next tokens. Adjust call to
5316 warn_for_misleading_indentation accordingly.
5317 (c_parser_else_body): Likewise.
5318 (c_parser_if_statement): Likewise.
5319 (c_parser_while_statement): Likewise.
5320 (c_parser_for_statement): Likewise.
5321
46308474
LFSM
53222015-07-28 Luis Felipe Strano Moraes <luis.strano@gmail.com>
5323 Manuel López-Ibáñez <manu@gcc.gnu.org>
5324
5325 * c-decl.c (get_parm_info): Remove static var. Update warning
5326 message.
5327
05b28fd6
MP
53282015-07-27 Marek Polacek <polacek@redhat.com>
5329
5330 PR c++/66555
5331 PR c/54979
5332 * c-typeck.c (parser_build_binary_op): Call warn_tautological_cmp.
5333
451b5e48
MP
53342015-07-20 Marek Polacek <polacek@redhat.com>
5335
5336 PR c++/55095
5337 * c-typeck.c (digest_init): Pass OPT_Wpedantic to pedwarn_init.
5338 (build_binary_op): Warn about left shift overflows.
5339
1916bcb5
AM
53402015-07-09 Andrew MacLeod <amacleod@redhat.com>
5341
5342 * c-array-notation.c: Adjust includes for flags.h changes.
5343 * c-objc-common.c: Likewise.
5344
c7131fb2
AM
53452015-07-07 Andrew MacLeod <amacleod@redhat.com>
5346
5347 * c-array-notation.c: Adjust includes.
5348 * c-aux-info.c: Likewise.
5349 * c-convert.c: Likewise.
5350 * c-decl.c: Likewise.
5351 * c-errors.c: Likewise.
5352 * c-lang.c: Likewise.
5353 * c-objc-common.c: Likewise.
5354 * c-parser.c: Likewise.
5355 * c-typeck.c: Likewise.
5356
da2e71c9
MLI
53572015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
5358
5359 PR fortran/66605
5360 * c-decl.c (finish_function): Call do_warn_unused_parameter.
5361
b155cfd9
MP
53622015-06-29 Marek Polacek <polacek@redhat.com>
5363
5364 PR c/66322
5365 * c-typeck.c (struct c_switch): Add BOOL_COND_P and OUTSIDE_RANGE_P.
5366 (c_start_case): Set BOOL_COND_P and OUTSIDE_RANGE_P. Don't warn
5367 about -Wswitch-bool here.
5368 (do_case): Update c_add_case_label call.
5369 (c_finish_case): Update c_do_switch_warnings call.
5370
31521951
MP
53712015-06-27 Marek Polacek <polacek@redhat.com>
5372
5373 * c-typeck.c: Use VECTOR_TYPE_P throughout.
5374
22d03525
MP
53752015-06-26 Marek Polacek <polacek@redhat.com>
5376
5377 * c-array-notation.c (fix_builtin_array_notation_fn): Use
5378 INDIRECT_REF_P.
5379 * c-typeck.c (array_to_pointer_conversion): Likewise.
5380 (build_unary_op): Likewise.
5381 (c_finish_return): Likewise.
5382
f0889939
AM
53832015-06-25 Andrew MacLeod <amacleod@redhat.com>
5384
5385 * c-decl.c: Remove ipa-ref.h and plugin-api.h from include list.
5386 * c-parser.c: Likewise.
5387
8d67ee55
RS
53882015-06-25 Richard Sandiford <richard.sandiford@arm.com>
5389
5390 * c-decl.c (detect_field_duplicates_hash): Use nofree_ptr_hash
5391 instead of pointer_hash.
5392 (detect_field_duplicates): Likewise.
5393
0ae9bd27
MP
53942015-06-25 Marek Polacek <polacek@redhat.com>
5395
5396 * c-array-notation.c: Use VAR_P throughout.
5397 * c-decl.c: Likewise.
5398 * c-objc-common.c: Likewise.
5399 * c-parser.c: Likewise.
5400 * c-typeck.c: Likewise.
5401
62f9079a
MP
54022015-06-25 Marek Polacek <polacek@redhat.com>
5403
5404 * c-decl.c: Use is_global_var throughout.
5405 * c-parser.c: Likewise.
5406 * c-typeck.c: Likewise.
5407
abb226c9
AM
54082015-06-17 Andrew MacLeod <amacleod@redhat.com>
5409
5410 * c-array-notation.c: Do not include input.h, line-map.h or is-a.h.
5411 * c-aux-info.c: Likewise.
5412 * c-convert.c: Likewise.
5413 * c-decl.c: Likewise.
5414 * c-errors.c: Likewise.
5415 * c-lang.c: Likewise.
5416 * c-objc-common.c: Likewise.
5417 * c-parser.c: Likewise.
5418 * c-typeck.c: Likewise.
5419
8cbababc
JH
54202015-06-11 Jan Hubicka <hubicka@ucw.cz>
5421
5422 PR middle-end/66325
5423 * c-decl.c (start_enum): Set TYPE_PACKED consistently among type
5424 variants.
5425
a0349665
PMR
54262015-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
5427
5428 * c-decl.c (pop_scope): Register the main translation unit
5429 through the new debug hook.
5430
13fdf2e2
AM
54312015-06-08 Andrew MacLeod <amacleod@redhat.com>
5432
5433 * c-array-notation.c : Adjust include files.
5434 * c-aux-info.c : Likewise.
5435 * c-convert.c : Likewise.
5436 * c-decl.c : Likewise.
5437 * c-errors.c : Likewise.
5438 * c-lang.c : Likewise.
5439 * c-lang.h : Likewise.
5440 * c-objc-common.c : Likewise.
5441 * c-parser.c : Likewise.
5442 * c-typeck.c : Likewise.
5443
d7438551
AH
54442015-06-05 Aldy Hernandez <aldyh@redhat.com>
5445
5446 * c-decl.c (finish_struct): Save C_TYPE_INCOMPLETE_VARS and
5447 immediately clobber it.
5448 (c_write_global_declarations_1): Remove call to
5449 check_global_declaration_1.
5450 (c_write_global_declarations_2): Remove.
5451 (c_write_final_cleanups): Rename from c_write_global_declarations.
5452 Remove call to finalize_compilation_unit.
5453 Remove calls to debugging hooks.
5454 * c-objc-common.c: Adjust comment for c_warn_unused_global_decl.
5455 * c-objc-common.h: Remove LANG_HOOKS_WRITE_GLOBALS.
5456 * c-tree.h: Remove c_write_global_declarations.
5457
ecb9f223
AM
54582015-06-04 Andrew MacLeod <amacleod@redhat.com>
5459
5460 * c-array-notation.c: Adjust includes for restructured coretypes.h.
5461 * c-aux-info.c: Likewise.
5462 * c-convert.c: Likewise.
5463 * c-decl.c: Likewise.
5464 * c-errors.c: Likewise.
5465 * c-lang.c: Likewise.
5466 * c-objc-common.c: Likewise.
5467 * c-parser.c: Likewise.
5468 * c-typeck.c: Likewise.
5469
9482b620
MP
54702015-06-04 Marek Polacek <polacek@redhat.com>
5471
5472 PR c/66341
5473 * c-typeck.c (build_c_cast): Wrap VALUE into NON_LVALUE_EXPR if
5474 it is a lvalue.
5475
bc51ace3
PK
54762015-06-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
5477
5478 * c-decl.c (warn_cxx_compat_finish_struct): New parameters code, record_loc.
5479 Warn for empty struct.
5480 (finish_struct): Pass TREE_CODE(t) and loc to warn_cxx_compat_finish_struct.
5481
ea5b45b6
AT
54822015-06-02 Andres Tiraboschi <andres.tiraboschi@tallertechnologies.com>
5483
5484 * c-decl.c (start_function): Call plugin before parsing.
5485 (finish_function): Call plugin after parsing.
5486
c2d47482
PK
54872015-06-02 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
5488
5489 PR c/49551
5490 * c-decl.c (merge_decls): Merge DECL_COMMON.
5491
a95492ab
JW
54922015-05-22 Jim Wilson <jim.wilson@linaro.org>
5493
5494 * Make-lang.in (check_gcc_pallelize): Define.
5495
fd5c817a
MP
54962015-05-22 Marek Polacek <polacek@redhat.com>
5497
5498 PR c/47043
5499 * c-parser.c (c_parser_enum_specifier): Parse and apply enumerator
5500 attributes.
5501
c7b70a3c
MP
55022015-05-21 Marek Polacek <polacek@redhat.com>
5503
5504 * c-typeck.c (inform_declaration): Use DECL_IS_BUILTIN instead of
5505 DECL_BUILT_IN.
5506
21b634ae
MP
55072015-05-20 Marek Polacek <polacek@redhat.com>
5508
5509 * c-decl.c: Use VAR_OR_FUNCTION_DECL_P throughout.
5510 * c-typeck.c: Likewise.
5511
296a8c2f
MP
55122015-05-19 Marek Polacek <polacek@redhat.com>
5513
5514 * c-typeck.c (start_init): Use AGGREGATE_TYPE_P.
5515
41b37d5e
JJ
55162015-05-19 Jakub Jelinek <jakub@redhat.com>
5517
5518 PR middle-end/66199
5519 * c-parser.c (c_parser_omp_for_loop): Don't add
5520 OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
5521 OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
5522 (c_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
5523 constructs.
5524
fab27f52
MM
55252015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
5526
5527 * c-typeck.c (build_array_ref): Use std::swap instead of explicit
296a8c2f 5528 swaps.
fab27f52 5529
40de31cf
MLI
55302015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
5531
5532 PR fortran/44054
5533 * c-objc-common.c (c_tree_printer): Replace locus pointer with
5534 accessor function.
5535
3aa3c9fc
MP
55362015-05-14 Marek Polacek <polacek@redhat.com>
5537
5538 PR c/66066
5539 PR c/66127
5540 * c-typeck.c (digest_init): Call pedwarn_init with OPT_Wpedantic
5541 rather than with 0.
5542
c3388e62
DM
55432015-05-12 David Malcolm <dmalcolm@redhat.com>
5544
5545 * c-parser.c (c_parser_if_body): Add param "if_loc", use it
5546 to add a call to warn_for_misleading_indentation.
5547 (c_parser_else_body): Likewise, adding param "else_loc".
5548 (c_parser_if_statement): Check for misleading indentation.
5549 (c_parser_while_statement): Likewise.
5550 (c_parser_for_statement): Likewise.
5551
755e528f
MP
55522015-05-08 Marek Polacek <polacek@redhat.com>
5553
5554 PR c/64918
5555 * c-typeck.c (add_pending_init): Use OPT_Woverride_init_side_effects.
5556 (output_init_element): Likewise.
5557
0173bd2a
MP
55582015-05-07 Marek Polacek <polacek@redhat.com>
5559
5560 PR c/65179
5561 * c-typeck.c (build_binary_op): Warn when left shifting a negative
5562 value.
5563
9babc352
MP
55642015-04-30 Marek Polacek <polacek@redhat.com>
5565
5566 * c-typeck.c (set_init_label): Call error_at instead of error and
5567 pass LOC to it.
5568
ac9f18db
MP
5569 * c-typeck.c (c_incomplete_type_error): Refactor to use %qT. Print
5570 the type of a decl.
5571
ec3fba51
MP
5572 * c-typeck.c (c_build_va_arg): Clarify the error message.
5573
b811915d
TS
55742015-04-29 Thomas Schwinge <thomas@codesourcery.com>
5575
5576 * c-parser.c (c_parser_oacc_enter_exit_data): Use
5577 OMP_STANDALONE_CLAUSES.
5578
f3075008
MP
55792015-04-28 Marek Polacek <polacek@redhat.com>
5580
5581 * c-parser.c (c_parser_binary_expression): Remove duplicate line.
5582
4e81b788
MP
55832015-04-28 Marek Polacek <polacek@redhat.com>
5584
5585 PR c/65901
5586 * c-typeck.c (c_build_va_arg): Require TYPE be a complete type.
5587
6c1db78e
MP
55882015-04-25 Marek Polacek <polacek@redhat.com>
5589
5590 PR c/52085
5591 * c-decl.c (finish_enum): Copy over TYPE_ALIGN. Also check for "mode"
5592 attribute.
5593
5c4abbb8
MP
55942015-04-23 Marek Polacek <polacek@redhat.com>
5595
5596 PR c/65345
5597 * c-decl.c (set_labels_context_r): New function.
5598 (store_parm_decls): Call it via walk_tree_without_duplicates.
5599 * c-typeck.c (convert_lvalue_to_rvalue): Use create_tmp_var_raw
5600 instead of create_tmp_var. Build TARGET_EXPR instead of
5601 COMPOUND_EXPR.
5602 (build_atomic_assign): Use create_tmp_var_raw instead of
5603 create_tmp_var. Build TARGET_EXPRs instead of MODIFY_EXPR.
5604
06aca1d5
IV
56052015-04-20 Ilya Verbin <ilya.verbin@intel.com>
5606
5607 * c-parser.c (c_parser_oacc_enter_exit_data): Remove excess semicolon.
5608 (c_parser_omp_target_update): Add missed %> to error_at ().
5609
8fba1830
BRF
56102015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
5611
5612 PR target/55143
5613 * c-decl.c (c_default_pointer_mode): Remove definition.
5614 * c-tree.h (c_default_pointer_mode): Remove declaration.
5615
62021f64
TB
56162015-03-27 Tobias Burnus <burnus@net-b.de>
5617
5618 PR c/65586
5619 * c-parser.c (c_parser_skip_to_pragma_eol): Optionally, don't
5620 error out.
5621 (c_parser_omp_for, c_parser_omp_parallel, c_parser_omp_distribute,
5622 c_parser_omp_teams, c_parser_omp_target, c_parser_omp_declare):
5623 Update calls to not error for skipped omp pragmas with -fopenmp-simd.
5624
9b65e171
JJ
56252015-03-19 Jakub Jelinek <jakub@redhat.com>
5626
5627 * c-decl.c (c_decl_attributes): Also add "omp declare target"
5628 attribute for DECL_EXTERNAL VAR_DECLs.
5629
17958621
JJ
56302015-03-11 Jakub Jelinek <jakub@redhat.com>
5631
5632 * c-parser.c (c_parse_init): Don't call xstrdup on get_identifier
5633 argument.
5634
7ccb1a11
JJ
56352015-03-10 Jakub Jelinek <jakub@redhat.com>
5636
5637 PR c/65120
5638 * c-typeck.c (parser_build_binary_op): Check for tcc_comparison
5639 before preparing arguments to warn_logical_not_parentheses.
5640
01177669
JJ
56412015-03-09 Jakub Jelinek <jakub@redhat.com>
5642
5643 PR c/65120
5644 * c-typeck.c (parser_build_binary_op): Don't warn for
5645 !!x == y or !b == y where b is _Bool.
5646
802ac282
MP
56472015-03-09 Marek Polacek <polacek@redhat.com>
5648
5649 * c-convert.c (convert): Make use of do_ubsan_in_current_function.
5650 * c-decl.c (grokdeclarator): Likewise.
5651 * c-typeck.c (build_binary_op): Likewise.
5652
e5165b60
MP
56532015-02-27 Marek Polacek <polacek@redhat.com>
5654
5655 PR c/65228
5656 * c-decl.c (start_decl): Return NULL_TREE if decl is an error node.
5657
065d214c
MP
56582015-02-14 Marek Polacek <polacek@redhat.com>
5659
5660 PR c/64768
5661 * c-decl.c (grokdeclarator): Set the range of a flexible array member
5662 declared through a typedef name.
5663
e5d9235b
MP
56642015-02-13 Marek Polacek <polacek@redhat.com>
5665
5666 PR c/65050
5667 * c-decl.c (grokdeclarator): Print also the type when giving
5668 the error message about array's incomplete element type.
5669
fa01ffcc
JJ
56702015-02-11 Jakub Jelinek <jakub@redhat.com>
5671
5672 PR c/64824
5673 * c-parser.c (c_parser_binary_expression): Fix OpenMP stack[sp].prec
5674 check in the POP macro.
5675
c3e38a03
MP
56762015-02-09 Marek Polacek <polacek@redhat.com>
5677
5678 PR c/64856
5679 * c-typeck.c (process_init_element): Don't always wrap
5680 COMPOUND_LITERAL_EXPR in a SAVE_EXPR in C99 mode when
5681 initializing a range of elements.
5682
4886ec8e
JJ
56832015-02-04 Jakub Jelinek <jakub@redhat.com>
5684
5685 PR c/64824
5686 PR c/64868
5687 * c-parser.c (c_parser_omp_atomic): Handle RDIV_EXPR.
5688
c3e38a03 56892015-02-02 Bruno Loff <bruno.loff@gmail.com>
a4bb6959
BL
5690
5691 * c-parser.c (c_parser_declspecs): Call invoke_plugin_callbacks after
5692 processing enum declaration.
5693
7b33f0c8
MP
56942015-01-29 Marek Polacek <polacek@redhat.com>
5695
5696 PR c/64709
5697 * c-typeck.c (pop_init_level): If constructor_elements has
5698 exactly one element with integer_zerop value, set constructor_zeroinit
5699 to 1. Remove braces around warning_init call.
5700
dea63e49
JJ
57012015-01-27 Jakub Jelinek <jakub@redhat.com>
5702
5703 PR c/64766
5704 * c-typeck.c (store_init_value): Don't overwrite DECL_INITIAL
5705 of FUNCTION_DECLs with error_mark_node.
5706
d38f7dce
JJ
57072015-01-26 Jakub Jelinek <jakub@redhat.com>
5708
5709 PR c/64778
5710 * c-typeck.c (convert_arguments): Return -1 if there are
5711 error_args, even if we've diagnosed too many arguments.
5712
cbf5d0e7
RB
57132015-01-21 Richard Biener <rguenther@suse.de>
5714
5715 PR middle-end/64313
5716 * c-decl.c (merge_decls): Call set_builtin_decl_declared_p
5717 for builtins the user declared correctly.
5718
41dbbb37
TS
57192015-01-15 Thomas Schwinge <thomas@codesourcery.com>
5720 Bernd Schmidt <bernds@codesourcery.com>
5721 Cesar Philippidis <cesar@codesourcery.com>
5722 James Norris <jnorris@codesourcery.com>
5723 Jakub Jelinek <jakub@redhat.com>
5724 Ilmir Usmanov <i.usmanov@samsung.com>
5725
5726 * c-parser.c: Include "gomp-constants.h".
5727 (c_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
5728 omp_clause_map_kind. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
5729 Use OMP_CLAUSE_SET_MAP_KIND.
5730 (c_parser_pragma): Handle PRAGMA_OACC_ENTER_DATA,
5731 PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_UPDATE.
5732 (c_parser_omp_construct): Handle PRAGMA_OACC_CACHE,
5733 PRAGMA_OACC_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP,
5734 PRAGMA_OACC_PARALLEL, PRAGMA_OACC_WAIT.
5735 (c_parser_omp_clause_name): Handle "auto", "async", "copy",
5736 "copyout", "create", "delete", "deviceptr", "gang", "host",
5737 "num_gangs", "num_workers", "present", "present_or_copy", "pcopy",
5738 "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
5739 "present_or_create", "pcreate", "seq", "self", "vector",
5740 "vector_length", "wait", "worker".
5741 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
5742 (OACC_ENTER_DATA_CLAUSE_MASK, OACC_EXIT_DATA_CLAUSE_MASK)
5743 (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
5744 (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
5745 (c_parser_omp_variable_list): Handle OMP_CLAUSE__CACHE_.
5746 (c_parser_oacc_wait_list, c_parser_oacc_data_clause)
5747 (c_parser_oacc_data_clause_deviceptr)
5748 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_workers)
5749 (c_parser_oacc_clause_async, c_parser_oacc_clause_wait)
5750 (c_parser_omp_clause_vector_length, c_parser_oacc_all_clauses)
5751 (c_parser_oacc_cache, c_parser_oacc_data, c_parser_oacc_kernels)
5752 (c_parser_oacc_enter_exit_data, c_parser_oacc_loop)
5753 (c_parser_oacc_parallel, c_parser_oacc_update)
5754 (c_parser_oacc_wait): New functions.
5755 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels)
5756 (c_finish_oacc_data): New prototypes.
5757 * c-typeck.c: Include "gomp-constants.h".
5758 (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR. Use
5759 GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use
5760 OMP_CLAUSE_SET_MAP_KIND.
5761 (c_finish_oacc_parallel, c_finish_oacc_kernels)
5762 (c_finish_oacc_data): New functions.
5763 (c_finish_omp_clauses): Handle OMP_CLAUSE__CACHE_,
5764 OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS,
5765 OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_ASYNC, OMP_CLAUSE_WAIT,
5766 OMP_CLAUSE_AUTO, OMP_CLAUSE_SEQ, OMP_CLAUSE_GANG,
5767 OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR, and OMP_CLAUSE_MAP's
5768 GOMP_MAP_FORCE_DEVICEPTR.
5769
adfac8df
JJ
57702015-01-09 Michael Collison <michael.collison@linaro.org>
5771
5772 * c-array-notation.c: Include hash-set.h, machmode.h,
5773 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
5774 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
5775 * c-aux-info.c: Ditto.
5776 * c-convert.c: Ditto.
5777 * c-decl.c: Ditto.
5778 * c-errors.c: Ditto.
5779 * c-lang.c: Dittoxs.
5780 * c-objc-common.c: Ditto.
5781 * c-parser.c: Ditto.
5782 * c-typeck.c: Include hash-set.h, machmode.h,
5783 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
5784 fold-const.h, wide-int.h, inchash.h, real.h and
5785 fixed-value.h due to flattening of tree.h.
5786
2cc901dc
MP
57872015-01-07 Marek Polacek <polacek@redhat.com>
5788
5789 PR c/64417
5790 * c-typeck.c (process_init_element): Disallow initialization of
5791 a flexible array member with a string constant if the structure
5792 is in an array.
5793
5624e564
JJ
57942015-01-05 Jakub Jelinek <jakub@redhat.com>
5795
e5341100
JJ
5796 PR sanitizer/64344
5797 * c-typeck.c (convert_for_assignment, c_finish_return): For
5798 -fsanitize=float-cast-overflow casts from REAL_TYPE to integer/enum
5799 types also set in_late_binary_op around convert call.
5800 * c-convert.c (convert): For -fsanitize=float-cast-overflow REAL_TYPE
5801 to integral type casts, if not in_late_binary_op, pass c_fully_fold
5802 result on expr as last argument to ubsan_instrument_float_cast,
5803 if in_late_binary_op, don't use c_save_expr but save_expr.
5804
5624e564
JJ
5805 Update copyright years.
5806
5bd012f8
MP
58072015-01-05 Marek Polacek <polacek@redhat.com>
5808
5809 PR c/64423
5810 * c-typeck.c (build_array_ref): Pass loc down to
5811 warn_array_subscript_with_type_char.
5812
3f8257db 58132014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
768952be
MU
5814
5815 * c-typeck.c: New behavious for pointers to arrays with qualifiers
8e745a17 5816 (common-pointer-type): For pointers to arrays take qualifiers from
768952be 5817 element type.
8e745a17 5818 (build_conditional_expr): Add warnings for lost qualifiers.
768952be 5819 (comp-target-types): Allow pointers to arrays with different qualifiers.
8e745a17 5820 (convert-for-assignment): Adapt warnings for discarded qualifiers. Add
768952be 5821 WARNING_FOR_QUALIFIERS macro and rename WARN_FOR_QUALIFIERS
8e745a17 5822 to PEDWARN_FOR_QUALIFIERS.
768952be 5823
8f94a8c4
JJ
58242014-12-17 Jakub Jelinek <jakub@redhat.com>
5825
5826 PR sanitizer/64289
5827 * c-convert.c: Include ubsan.h.
5828 (convert): For real -> integral casts and
5829 -fsanitize=float-cast-overflow don't call convert_to_integer, but
5830 instead instrument the float cast directly.
5831
b731b390
JJ
58322014-11-29 Jakub Jelinek <jakub@redhat.com>
5833
5834 * c-typeck.c (convert_lvalue_to_rvalue, build_atomic_assign,
5835 c_finish_stmt_expr): Remove NULL last argument from
5836 create_tmp_var_raw and create_tmp_var calls.
5837 * c-array-notation.c (fix_builtin_array_notation_fn,
5838 build_array_notation_expr, fix_conditional_array_notations_1,
5839 fix_array_notation_expr, fix_array_notation_call_expr): Likewise.
5840
541e35a6
MP
58412014-11-28 Marek Polacek <polacek@redhat.com>
5842
5843 PR c/63862
5844 * c-typeck.c (build_binary_op) <RSHIFT_EXPR, LSHIFT_EXPR>: Don't
5845 convert the right operand to integer type.
5846
b286be94
MP
58472014-11-25 Marek Polacek <polacek@redhat.com>
5848
5849 PR c/63877
5850 * c-decl.c (start_function): Disable -Wmissing-declarations warning
5851 for inline functions.
5852
aa7da51a
JJ
58532014-11-21 Jakub Jelinek <jakub@redhat.com>
5854
5855 PR target/63764
5856 * c-typeck.c (build_array_ref): Adjust
5857 convert_vector_to_pointer_for_subscript caller. If it returns true,
5858 call non_lvalue_loc on the result.
5859
d876207f
RB
58602014-11-11 Richard Biener <rguenther@suse.de>
5861
5862 * c-decl.c (c_init_decl_processing): Do not set pedantic_lvalues
5863 to true.
5864
e5e44252
AK
58652014-11-10 Andi Kleen <ak@linux.intel.com>
5866
5867 PR c/60804
5868 * c-parser.c (c_parser_statement_after_labels): Call
5869 check_no_cilk.
5870 (c_parser_if_statement): Dito.
5871 (c_parser_switch_statement): Dito.
5872 (c_parser_while_statement): Dito.
5873 (c_parser_do_statement): Dito.
5874 (c_parser_for_statement): Dito.
5875 * c-typeck.c (c_finish_loop): Dito.
5876
13c21655
PC
58772014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
5878
5879 * c-typeck.c (build_binary_op): Use OPT_Wshift_count_negative and
5880 OPT_Wshift_count_overflow in the warnings.
5881
2d51fcef
MP
58822014-10-30 Marek Polacek <polacek@redhat.com>
5883
5884 * c-objc-common.c (c_tree_printer) <case 'T'>: For a typedef name,
5885 print the stripped version as well, if they're not the same.
5886
ef4bddc2
RS
58872014-10-29 Richard Sandiford <richard.sandiford@arm.com>
5888
5889 * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from
5890 machine_mode.
5891
c582198b
AM
58922014-10-28 Andrew MacLeod <amacleod@redhat.com>
5893
5894 * c-decl.c: Adjust include files.
5895 * c-parser.c: Ditto.
5896
ddc8de03
PM
58972014-10-27 Phil Muldoon <pmuldoon@redhat.com>
5898 Tom Tromey <tromey@redhat.com>
5899
5900 * c-tree.h (enum c_oracle_request): New.
5901 (c_binding_oracle_function): New typedef.
5902 (c_binding_oracle, c_pushtag, c_bind): Declare.
5903 * c-decl.c (c_binding_oracle): New global.
5904 (I_SYMBOL_CHECKED): New macro.
5905 (i_symbol_binding): New function.
5906 (I_SYMBOL_BINDING, I_SYMBOL_DECL): Redefine.
5907 (I_TAG_CHECKED): New macro.
5908 (i_tag_binding): New function.
5909 (I_TAG_BINDING, I_TAG_DECL): Redefine.
5910 (I_LABEL_CHECKED): New macro.
5911 (i_label_binding): New function.
5912 (I_LABEL_BINDING, I_LABEL_DECL): Redefine.
5913 (c_print_identifier): Save and restore c_binding_oracle.
5914 (c_pushtag, c_bind): New functions.
5915
60393bbc
AM
59162014-10-27 Andrew MacLeod <amacleod@redhat.com>
5917
5918 * c-typeck.c: Adjust include files.
5919
d723bb7c
MLI
59202014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
5921
5922 PR c++/53061
5923 * c-objc-common.c (c_objc_common_init): Do not do diagnostics
5924 initialization here...
5925 (c_initialize_diagnostics): ... but here. Set defaults after
5926 building pretty-printer.
5927
1bc5a451
MP
59282014-10-23 Marek Polacek <polacek@redhat.com>
5929
5930 PR c/63626
5931 * c-decl.c (pop_scope): Don't print warning in external_scope.
5932
4435bb92
MP
59332014-10-19 Marek Polacek <polacek@redhat.com>
5934
5935 PR c/63567
5936 * c-typeck.c (output_init_element): Allow initializing objects with
5937 static storage duration with compound literals even in C99 and add
5938 pedwarn for it.
5939
7278465e
MP
59402014-10-17 Marek Polacek <polacek@redhat.com>
5941
5942 PR c/63567
5943 * c-typeck.c (digest_init): Allow initializing objects with static
5944 storage duration with compound literals even in C99 and add pedwarn
5945 for it.
5946
d9b7be2e
MP
59472014-10-17 Marek Polacek <polacek@redhat.com>
5948
5949 PR c/63543
5950 * c-tree.h (C_TYPE_ERROR_REPORTED): Define.
5951 * c-typeck.c (build_indirect_ref): Don't print the "dereferencing..."
5952 error multiple times. Print the type.
5953
f406ae1f
MP
59542014-10-17 Marek Polacek <polacek@redhat.com>
5955
5956 PR c/63549
5957 * c-typeck.c (build_array_ref): Bail if the index in an incomplete
5958 type.
5959
92574c7c
MP
59602014-10-17 Marek Polacek <polacek@redhat.com>
5961
5962 * c-decl.c (grokdeclarator): Use OPT_Wimplicit_int unconditionally.
5963 (start_function): Use OPT_Wimplicit_int instead of 0.
5964 (store_parm_decls_oldstyle): Likewise.
5965
1bc4a978
MT
59662014-10-17 Alan Modra <amodra@gmail.com>
5967
5968 PR middle-end/61848
5969 * c-decl.c (merge_decls): Don't merge section name or tls model
5970 to newdecl symtab node, instead merge to olddecl. Override
5971 existing olddecl section name. Set tls_model for all thread-local
5972 vars, not just OMP thread-private ones. Remove incorrect comment.
5973
83685514
AM
59742014-10-16 Andrew MacLeod <amacleod@redhat.com>
5975
5976 * c-decl.c: Adjust include files.
5977
78a7c317
DD
59782014-10-14 DJ Delorie <dj@redhat.com>
5979
5980 * c-parser.c (c_parse_init): Add RID entries for each __intN.
5981 (c_token_starts_typename): Check all __intN, not just __int128.
5982 (c_token_starts_declspecs): Likewise.
5983 (c_parser_declspecs): Likewise.
5984 (c_parser_attribute_any_word): Likewise.
5985 (c_parser_objc_selector): Likewise.
5986 * c-tree.h (c_typespec_keyword): cts_int128 -> cts_int_n.
5987 (struct c_declspecs): Add int_n_idx field to record *which* __intN
5988 is specified.
5989 * c-decl.c (declspecs_add_type): Check for all __intN, not just
5990 __int128.
5991 (finish_declspecs): Likewise.
5992
74d98c1e
AB
59932014-10-13 Anthony Brandon <anthony.brandon@gmail.com>
5994
8e745a17 5995 * c-parser.c (c_parser_all_labels): New function to replace
74d98c1e 5996 the duplicate code.
8e745a17 5997 (c_parser_statement): Call the new function.
74d98c1e 5998
84937de2
MP
59992014-10-09 Marek Polacek <polacek@redhat.com>
6000
6001 PR c/63480
6002 * c-typeck.c (pop_init_level): Don't warn about initializing
6003 with { }.
6004
0382aaa0
MP
60052014-10-07 Marek Polacek <polacek@redhat.com>
6006
6007 PR c/59717
6008 * c-decl.c (header_for_builtin_fn): New function.
6009 (implicitly_declare): Suggest which header to include.
6010
7a0ca710
MP
60112014-10-07 Marek Polacek <polacek@redhat.com>
6012
6013 * c-convert.c (convert): Use error_operand_p.
6014 * c-typeck.c (require_complete_type): Likewise.
6015 (really_atomic_lvalue): Likewise.
6016 (digest_init): Likewise.
6017 (handle_omp_array_sections_1): Likewise.
6018
6bc8a126
MP
60192014-10-03 Marek Polacek <polacek@redhat.com>
6020
6021 PR c/63453
6022 * c-decl.c (pop_scope): Don't warn about "inline function declared
6023 but never defined" for functions marked with gnu_inline attribute.
6024
d90c0a59
JJ
60252014-09-25 Jakub Jelinek <jakub@redhat.com>
6026
6027 PR c++/63249
6028 * c-parser.c (c_parser_omp_variable_list): Call mark_exp_read
6029 on low_bound and length.
6030
083e891e
MP
60312014-09-24 Marek Polacek <polacek@redhat.com>
6032
6033 PR c/61405
6034 PR c/53874
6035 * c-parser.c: Don't define CPP_KEYWORD.
6036 (c_parser_switch_statement): Pass original type to c_finish_case.
6037 * c-tree.h (c_finish_case): Update declaration.
6038 * c-typeck.c (c_finish_case): Add TYPE parameter. Pass it
6039 conditionally to c_do_switch_warnings.
6040
8d95fe25
MP
60412014-09-03 Marek Polacek <polacek@redhat.com>
6042
6043 PR c/62024
6044 * c-parser.c (c_parser_static_assert_declaration_no_semi): Strip no-op
6045 conversions.
6046
9a771876
JJ
60472014-09-02 Jakub Jelinek <jakub@redhat.com>
6048 Balaji V. Iyer <balaji.v.iyer@intel.com>
6049 Igor Zamyatin <igor.zamyatin@intel.com>
6050
6051 * c-parser.c (c_parser_cilk_for): New function.
6052 (c_parser_cilk_grainsize): Likewise.
6053 (c_get_temp_regvar): Likewise.
6054 (c_parser_statement_after_labels): Added RID_CILK_FOR case.
6055 (c_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
6056 (c_parser_omp_for_loop): Added CILK_FOR and CILK_SIMD checks.
6057 * c-typeck.c (c_finish_omp_clauses): Added OMP_CLAUSE__CILK_FOR_COUNT_
6058 case.
6059
b7679d96
CG
60602014-08-27 Chen Gang <gang.chen.5i5j@gmail.com>
6061
6062 * c-aux-info.c (gen_type): Resize 'buff' from 10 to 23 bytes,
6063 with using HOST_WIDE_INT without truncation to 'int'
6064
59ea0364
MP
60652014-08-22 Marek Polacek <polacek@redhat.com>
6066
6067 PR c++/62199
6068 * c-typeck.c (parser_build_binary_op): Adjust call to
6069 warn_logical_not_parentheses.
6070
671a475e
IZ
60712014-08-22 Igor Zamyatin <igor.zamyatin@intel.com>
6072
6073 PR other/62008
6074 * c-parser.c (c_parser_array_notation): Check for correct
6075 type of an array added.
6076
04159acf
MP
60772014-08-19 Marek Polacek <polacek@redhat.com>
6078
6079 PR c++/62153
6080 * c-typeck.c (build_binary_op): If either operand of a comparison
6081 is a boolean expression, call maybe_warn_bool_compare.
6082
c77935ee
PP
60832014-08-19 Patrick Palka <ppalka@gcc.gnu.org>
6084
6085 PR c/45584
6086 * c-typeck.c (build_c_cast): Do a conversion even when the
6087 TYPE_MAIN_VARIANTs are the same.
6088
35aff4fb
MP
60892014-08-19 Marek Polacek <polacek@redhat.com>
6090
6091 * c-decl.c (diagnose_mismatched_decls): Unconditionally call
6092 pedwarn_c99 instead of pedwarn.
6093 (grokfield): Likewise.
6094 (warn_defaults_to): New function.
6095 (grokdeclarator): Call warn_defaults_to instead of pedwarn_c99.
6096 Unconditionally call pedwarn_c99 instead of pedwarn.
6097 (start_function): Call warn_defaults_to instead of pedwarn_c99.
6098 (declspecs_add_scspec): Call pedwarn_c99 instead of pedwarn, don't
6099 check flag_isoc11 before.
6100 * c-errors.c (pedwarn_c99): Change the return type to bool.
6101 Handle -Wc99-c11-compat.
6102 * c-parser.c (disable_extension_diagnostics): Handle
6103 warn_c99_c11_compat.
6104 (restore_extension_diagnostics): Likewise.
6105 (c_parser_static_assert_declaration_no_semi): Call pedwarn_c99
6106 instead of pedwarn, don't check flag_isoc11 before.
6107 (c_parser_declspecs): Likewise.
6108 (c_parser_alignas_specifier): Likewise.
6109 (c_parser_alignof_expression): Likewise.
6110 (c_parser_generic_selection): Likewise.
6111 * c-tree.h (pedwarn_c99): Update declaration.
6112 * c-typeck.c (c_finish_return): Call pedwarn or warning_at instead
6113 of pedwarn_c99.
6114
177cce46
MP
61152014-08-19 Marek Polacek <polacek@redhat.com>
6116
6117 * c-decl.c (warn_variable_length_array): Pass OPT_Wvla unconditionally
6118 to pedwarn_c90.
6119 * c-errors.c: Include "opts.h".
6120 (pedwarn_c90): Rewrite to handle -Wno-c90-c99-compat better.
6121 * c-parser.c (disable_extension_diagnostics): Handle negative value
6122 of warn_c90_c99_compat, too.
6123 (restore_extension_diagnostics): Likewise.
6124 (c_parser_compound_statement_nostart): Pass
6125 OPT_Wdeclaration_after_statement unconditionally to pedwarn_c90.
6126
6dc99c33
MP
61272014-08-12 Marek Polacek <polacek@redhat.com>
6128
6129 * c-parser.c (c_parser_postfix_expression) <case RID_FUNCTION_NAME>:
6130 Add pedwarn.
6131 (c_parser_postfix_expression) <case RID_PRETTY_FUNCTION_NAME>:
6132 Likewise.
6133 (c_parser_postfix_expression) <case RID_C99_FUNCTION_NAME>: Likewise.
6134
3f8257db 61352014-08-10 Marek Polacek <polacek@redhat.com>
f3bede71
MP
6136
6137 PR c/51849
6138 * c-decl.c (build_array_declarator): Remove check for !flag_isoc99.
6139 Call pedwarn_c90 instead of pedwarn.
6140 (check_bitfield_type_and_width): Likewise.
6141 (declspecs_add_qual): Likewise.
6142 (declspecs_add_type): Likewise.
6143 (warn_variable_length_array): Unify function for -pedantic and -Wvla.
6144 Adjust to only call pedwarn_c90.
6145 (grokdeclarator): Remove pedantic && !flag_isoc99 check. Call
6146 pedwarn_c90 instead of pedwarn.
6147 * c-errors.c (pedwarn_c90): Handle -Wc90-c99-compat.
6148 * c-parser.c (disable_extension_diagnostics): Handle
6149 warn_c90_c99_compat.
6150 (restore_extension_diagnostics): Likewise.
6151 (c_parser_enum_specifier): Remove check for !flag_isoc99. Call
6152 pedwarn_c90 instead of pedwarn.
6153 (c_parser_initelt): Likewise.
6154 (c_parser_postfix_expression): Likewise.
6155 (c_parser_postfix_expression_after_paren_type): Likewise.
6156 (c_parser_compound_statement_nostart): Remove check for !flag_isoc99.
6157 * c-tree.h: Fix formatting.
6158 * c-typeck.c (build_array_ref): Remove check for !flag_isoc99. Call
6159 pedwarn_c90 instead of pedwarn.
6160
9f25a338
TS
61612014-08-07 Trevor Saunders <tsaunders@mozilla.com>
6162
6163 * c-typeck.c: Remove include of pointer-set.h.
6164
044331a8
MP
61652014-08-07 Marek Polacek <polacek@redhat.com>
6166
6167 * c-typeck.c (pointer_diff): Remove P - (P + CST) optimization.
6168
b787e7a2
TS
61692014-08-02 Trevor Saunders <tsaunders@mozilla.com>
6170
6171 * c-typeck.c: Use hash_map instead of pointer_map.
6172
6e2830c3
TS
61732014-08-02 Trevor Saunders <tsaunders@mozilla.com>
6174
6175 * c-decl.c: Use hash_set instead of pointer_set.
6176
a7ee52fb
IZ
61772014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
6178
6179 PR middle-end/61455
6180 * c-array-notation.c (expand_array_notations): Handling
6181 of DECL_EXPR added.
6182
b4dfdc11
MG
61832014-07-31 Marc Glisse <marc.glisse@inria.fr>
6184
6185 PR c++/60517
6186 * c-typeck.c (c_finish_return): Return 0 instead of the address of
6187 a local variable.
6188
976d5a22
TT
61892014-07-30 Tom Tromey <tromey@redhat.com>
6190
6191 * c-typeck.c (struct constructor_stack) <designator_depth>: New
6192 field.
6193 (really_start_incremental_init, push_init_level): Initialize
6194 designator_depth.
6195 (pop_init_level): Set global designator_depth.
6196 (process_init_element): Check for designated_init attribute.
6197
30281de2
MP
61982014-07-20 Marek Polacek <polacek@redhat.com>
6199
6200 PR c/61852
6201 * c-decl.c (implicit_decl_warning): Add location_t parameter. Use it.
6202 (implicitly_declare): Pass location to implicit_decl_warning.
6203
b108f48f
JJ
62042014-07-14 Jakub Jelinek <jakub@redhat.com>
6205
6206 PR middle-end/61294
6207 * c-parser.c (c_parser_expr_list): Add new argument literal_zero_mask.
6208 If non-NULL, call c_parser_check_literal_zero.
6209 (c_parser_check_literal_zero): New function.
6210 (c_parser_postfix_expression_after_primary): Adjust
6211 c_parser_expr_list caller, handle -Wmemset-transposed-args.
6212
773ec47f
MP
62132014-07-06 Marek Polacek <polacek@redhat.com>
6214
6215 PR c/6940
6216 * c-decl.c (grokdeclarator): Set C_ARRAY_PARAMETER.
6217 * c-tree.h (C_ARRAY_PARAMETER): Define.
6218 * c-typeck.c (c_expr_sizeof_expr): Warn when using sizeof on an array
6219 function parameter.
6220
22e1cf1c 62212014-07-02 Jan Hubicka <hubicka@ucw.cz>
3f8257db 6222 Chen Gang <gang.chen.5i5j@gmail.com>
22e1cf1c
JH
6223
6224 * c-decl.c (duplicate_decls): CLear DECL_STRUCT_FUNCTION before
6225 releasing symbol.
6226
52ec0ea3
MP
62272014-07-01 Marek Polacek <polacek@redhat.com>
6228
6229 * c-typeck.c (convert_for_assignment): Pass OPT_Wint_conversion
6230 instead of 0 to WARN_FOR_ASSIGNMENT.
6231
d5c3d343
MP
62322014-07-01 Marek Polacek <polacek@redhat.com>
6233
6234 PR c/58286
6235 * c-typeck.c (convert_for_assignment): Pass
6236 OPT_Wincompatible_pointer_types instead of 0 to WARN_FOR_ASSIGNMENT.
6237
6a7253a4
MP
62382014-06-30 Marek Polacek <polacek@redhat.com>
6239
6240 * c-decl.c (grokdeclarator): Don't instrument VLAs if the function
6241 has no_sanitize_undefined attribute.
6242
5e88a8f4
IZ
62432014-06-30 Igor Zamyatin <igor.zamyatin@intel.com>
6244
6245 PR middle-end/57541
6246 * c-array-notation.c (fix_builtin_array_notation_fn):
6247 Check for 0 arguments in builtin call. Check that bultin argument is
6248 correct.
6249 * c-parser.c (c_parser_array_notation): Check for incorrect initial
6250 index.
6251
9698b078
SH
62522014-06-27 Sebastian Huber <sebastian.huber@embedded-brains.de>
6253
6254 * c-parser.c (c_parser_declaration_or_fndef): Discard all type
6255 qualifiers in __auto_type for atomic types.
6256 (c_parser_typeof_specifier): Discard all type qualifiers in
6257 __typeof__ for atomic types.
6258
6e07c515
MP
62592014-06-25 Marek Polacek <polacek@redhat.com>
6260
6261 PR c/61162
6262 * c-parser.c (c_parser_statement_after_labels): Pass the location of
6263 the return expression to c_finish_return.
6264
da6f124d
JJ
62652014-06-25 Jakub Jelinek <jakub@redhat.com>
6266
6267 * c-typeck.c (c_finish_omp_clauses): Make sure
6268 OMP_CLAUSE_LINEAR_STEP has correct type.
6269
c203e8a7
TS
62702014-06-24 Trevor Saunders <tsaunders@mozilla.com>
6271
6272 * c-decl.c: Adjust.
6273
56ad0e38
JJ
62742014-06-24 Jakub Jelinek <jakub@redhat.com>
6275
6276 * c-parser.c (c_parser_omp_for_loop): For
6277 #pragma omp parallel for simd move lastprivate clause from parallel
6278 to for rather than simd.
6279
47c2554f
MP
62802014-06-23 Marek Polacek <polacek@redhat.com>
6281
6282 * c-typeck.c (parser_build_binary_op): Don't call
6283 warn_logical_not_parentheses if the RHS is TRUTH_NOT_EXPR.
6284
56363ffd
JH
62852014-06-15 Jan Hubicka <hubicka@ucw.cz>
6286
6287 * c-parser.c (c_parser_omp_threadprivate): Likewise.
6288 * c-decl.c (merge_decls): Likewise.
6289
d7ff7ae5
MP
62902014-06-09 Marek Polacek <polacek@redhat.com>
6291
6292 PR c/36446
6293 * c-typeck.c (error_init): Call inform instead of error_at.
6294 (pedwarn_init): Call inform instead of pedwarn.
6295 (warning_init): Call inform instead of warning_at.
6296
24d047a3
JH
62972014-06-07 Jan Hubicka <hubicka@ucw.cz>
6298
6299 * c-decl.c (merge_decls): Use set_decl_section_name.
6300 (duplicate_decls): Remove node if it exists.
6301
9bac5cbb
G
63022014-06-05 S. Gilles <sgilles@terpmail.umd.edu>
6303
6304 PR c/53119
6305 * c-typeck.c (push_init_level, process_init_element,
6306 pop_init_level): Correct check for zero initialization, move
6307 missing brace warning to respect zero initialization.
6308
8ffcdea8
MP
63092014-06-05 Marek Polacek <polacek@redhat.com>
6310
6311 PR c/56724
6312 * c-typeck.c (convert_for_assignment): Use expr_loc for ic_argpass.
6313
742938c9
MP
63142014-06-05 Marek Polacek <polacek@redhat.com>
6315
6316 PR c/49706
6317 * c-typeck.c (parser_build_binary_op): Warn when logical not is used
ab20d992 6318 on the left hand side operand of a comparison.
742938c9 6319
6447c55d
MP
63202014-06-05 Marek Polacek <polacek@redhat.com>
6321
6322 PR c/48062
6323 * c-decl.c (warn_if_shadowing): Call inform instead of warning_at.
6324 Print note only if the warning was printed.
6325
9dc7743c
IZ
63262014-06-04 Igor Zamyatin <igor.zamyatin@intel.com>
6327
6328 PR c/58942
6329 * c-array-notation.c (fix_builtin_array_notation_fn): Handle the case
6330 with a pointer.
6331
fedfecef
MP
63322014-06-03 Marek Polacek <polacek@redhat.com>
6333
6334 PR c/60439
6335 * c-parser.c (c_parser_switch_statement): Pass explicit_cast_p to
6336 c_start_case.
6337 * c-tree.h (c_start_case): Update.
6338 * c-typeck.c (c_start_case): Add new boolean parameter. Warn if
6339 switch condition has boolean value.
6340
9b2b7279
AM
63412014-06-02 Andrew MacLeod <amacleod@redhat.com>
6342
6343 * c-decl.c: Include builtins.h.
6344 * c-parser.c: Likewise.
6345
5c1bc275
MP
63462014-05-27 Marek Polacek <polacek@redhat.com>
6347
6348 PR c/56724
6349 * c-typeck.c (convert_arguments): Get location of a parameter. Change
6350 error and warning calls to error_at and warning_at. Pass location of
6351 a parameter to it. Call warning_at with OPT_Wtraditional_conversion.
6352 (convert_for_assignment): Add parameter to WARN_FOR_ASSIGNMENT and
6353 WARN_FOR_QUALIFIERS. Pass expr_loc to those.
6354
97563bc8
IZ
63552014-05-26 Igor Zamyatin <igor.zamyatin@intel.com>
6356
6357 PR c/61191
6358 * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid
6359 function parameters.
6360
aede2c10
JH
63612014-05-23 Jan Hubicka <hubicka@ucw.cz>
6362
6363 * c-decl.c (merge_decls): Preserve symtab node pointers.
6364 (duplicate_decls): Free new decl.
6365
edbba2ce
TS
63662014-05-23 Thomas Schwinge <thomas@codesourcery.com>
6367
f3316c6d
TS
6368 * c-typeck.c (c_finish_omp_clauses): Remove duplicated variable
6369 initialization.
6370
edbba2ce
TS
6371 * c-parser.c (c_parser_omp_target): Return bool values.
6372
68c81f24
TS
63732014-05-22 Thomas Schwinge <thomas@codesourcery.com>
6374
6375 * c-parser.c (c_parser_omp_clause_thread_limit): Rename
6376 num_teams_loc variable to num_thread_limit_loc.
6377
632f2871
RS
63782014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
6379
6380 * c-array-notation.c (expand_array_notations): Use void_node
6381 instead of void_zero_node.
6382
766090c2
TS
63832014-05-17 Trevor Saunders <tsaunders@mozilla.com>
6384
6385 * c-decl.c (finish_struct): Adjust.
6386 (finish_enum): Likewise.
6387 (bind): Adjust.
6388 (record_inline_static): Likewise.
6389 (push_scope): Likewise.
6390 (make_label): Likewise.
6391 (lookup_label_for_goto): Likewise.
6392 (finish_struct): Likewise.
6393 (finish_enum): Likewise.
6394 (store_parm_decls): Likewise.
6395 (c_push_function_context): Likewise.
6396 * c-lang.h: Remove usage of variable_size gty attribute.
6397 * c-parser.c (c_parse_init): Adjust.
6398 (c_parse_file): Likewise.
6399
2b107f6b
MP
64002014-05-13 Marek Polacek <polacek@redhat.com>
6401
6402 PR c/61162
6403 * c-typeck.c (convert_for_assignment): Pass location to
6404 WARN_FOR_ASSIGNMENT instead of input_location.
6405
d033409e
MP
64062014-05-10 Marek Polacek <polacek@redhat.com>
6407
6408 * c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
6409 maybe_warn_string_init.
6410 (c_parser_postfix_expression_after_paren_type): Pass type_loc to
6411 maybe_warn_string_init.
6412 * c-tree.h (maybe_warn_string_init): Update declaration.
6413 * c-typeck.c (maybe_warn_string_init): Add location parameter.
6414 Call pedwarn_init with loc instead of with input_location.
6415 (digest_init): Pass init_loc to maybe_warn_string_init.
6416 (pop_init_level): Call pedwarn_init with loc instead of with
6417 input_location.
6418 (set_init_index): Likewise.
6419 (process_init_element): Likewise.
6420
ea58ef42
MP
64212014-05-09 Marek Polacek <polacek@redhat.com>
6422
6423 PR c/61096
6424 * c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level.
6425 (c_parser_initelt): Pass location to set_init_label. Pass array index
6426 location to set_init_index.
6427 * c-tree.h (push_init_level): Update declaration.
6428 (pop_init_level): Likewise.
6429 (set_init_index): Likewise.
6430 (set_init_label): Likewise.
6431 * c-typeck.c (error_init): Add location parameter. Call error_at
6432 instead of error.
6433 (digest_init): Pass init_loc to error_init.
6434 (really_start_incremental_init):
6435 (push_init_level): Add location parameter. Pass loc to pop_init_level
6436 and error_init.
6437 (pop_init_level): Likewise.
6438 (set_designator): Add location parameter. Pass loc to pop_init_level,
6439 push_init_level, and error_init.
6440 (set_init_index): Add location parameter. Pass loc to error_init and
6441 set_designator.
6442 (set_init_label): Likewise.
6443 (output_init_element): Pass loc to error_init.
6444 (process_init_element): Pass loc to error_init, pop_init_level,
6445 pedwarn_init, and push_init_level.
6446
661a0813
MP
64472014-05-09 Marek Polacek <polacek@redhat.com>
6448
6449 PR c/50459
6450 * c-parser.c (c_parser_attributes): Parse the arguments as an
6451 expression-list if the attribute takes identifier.
6452
2793eeab
MP
64532014-05-08 Marek Polacek <polacek@redhat.com>
6454
6455 PR c/61053
6456 * c-decl.c (grokdeclarator): Use min_align_of_type instead of
6457 TYPE_ALIGN_UNIT.
6458
f827930a
MP
64592014-05-08 Marek Polacek <polacek@redhat.com>
6460
6461 PR c/61077
6462 * c-decl.c (start_function): Warn for _Atomic-qualified return type
6463 of main.
6464
1d60af08
KZ
64652014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
6466 Mike Stump <mikestump@comcast.net>
6467 Richard Sandiford <rdsandiford@googlemail.com>
6468
6469 * c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN.
6470 (finish_enum): Use wide-int interfaces.
6471 * c-parser.c (c_parser_cilk_clause_vectorlength): Likewise.
6472 * c-typeck.c (build_c_cast): Likewise.
6473 (set_nonincremental_init_from_string): Likewise.
6474 (c_tree_equal): Likewise.
6475
a0e24419
MP
64762014-05-02 Marek Polacek <polacek@redhat.com>
6477
6478 PR c/25801
6479 * c-typeck.c (c_size_in_bytes): Update comment. Don't call error.
6480 Return size_one_node when the type is not complete.
6481 (pointer_diff): Remove comment.
6482 (build_unary_op): Improve error messages.
6483
19fc9faa
MP
64842014-05-02 Marek Polacek <polacek@redhat.com>
6485
6486 * c-typeck.c (c_finish_return): Separate warning_at calls.
6487
63bc4e87
MP
64882014-05-02 Marek Polacek <polacek@redhat.com>
6489
6490 * c-tree.h (error_init): Remove declaration.
6491 (pedwarn_init): Likewise.
6492 * c-typeck.c (error_init): Make static and move above.
6493 (pedwarn_init): Likewise.
6494 (warning_init): Move above.
6495 (maybe_warn_string_init): Likewise.
6496
4bd2511b
JL
64972014-05-01 Jeff Law <law@redhat.com>
6498
6499 Revert:
6500
6501 2014-04-24 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
6502 * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
6503 avoid goto.
6504
6a358dcb
MP
65052014-05-02 Marek Polacek <polacek@redhat.com>
6506
6507 PR c/60784
6508 * c-typeck.c (push_init_level): Set constructor_designated to
6509 p->designated for structures.
6510
ae5ebda4
MP
65112014-05-01 Marek Polacek <polacek@redhat.com>
6512
6513 PR c/60915
6514 * c-parser.c (c_parser_declaration_or_fndef): Give better error if
6515 function-definition has an attribute after the declarator.
6516
96b40f8d
MP
65172014-05-01 Marek Polacek <polacek@redhat.com>
6518
6519 PR c/60257
6520 * c-typeck.c (warning_init): Add location_t parameter. Call
6521 warning_at instead of warning.
6522 (push_init_level): Pass input_location to warning_init.
6523 (add_pending_init): Add location_t parameter. Pass loc to
6524 warning_init.
6525 (set_nonincremental_init): Pass input_location to add_pending_init.
6526 (set_nonincremental_init_from_string): Likewise.
6527 (output_init_element): Pass loc to warning_init and to
6528 add_pending_init.
6529
32e00768
MP
65302014-05-01 Marek Polacek <polacek@redhat.com>
6531
6532 PR c/43395
6533 * c-typeck.c (c_finish_return): Distinguish between label and variable
6534 when warning about returning local address.
6535
c9379ce2
MP
65362014-05-01 Marek Polacek <polacek@redhat.com>
6537
6538 PR c/29467
6539 * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
6540 in C89 mode.
6541
d00887e8
MP
65422014-05-01 Marek Polacek <polacek@redhat.com>
6543
6544 PR c/43245
6545 * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
6546 instead of 0 to WARN_FOR_QUALIFIERS.
6547
5436fa2e
MP
65482014-05-01 Marek Polacek <polacek@redhat.com>
6549
6550 PR c/56989
6551 * c-typeck.c (default_conversion): Use better location for
6552 error call.
6553
f8ed5150
MP
65542014-04-30 Marek Polacek <polacek@redhat.com>
6555
6556 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
6557 also when SANITIZE_FLOAT_DIVIDE is on.
6558
8337d1db
MP
65592014-04-30 Marek Polacek <polacek@redhat.com>
6560
6561 PR c/60139
6562 * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
6563 and pedwarn_init. Use loc insted of input_location.
6564
c4bdc42f
MP
65652014-04-30 Marek Polacek <polacek@redhat.com>
6566
6567 PR c/60351
6568 * c-typeck.c (build_binary_op): Use location when warning about
6569 shift count.
6570
45484dcf
MP
65712014-04-25 Marek Polacek <polacek@redhat.com>
6572
6573 PR c/18079
6574 * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
6575 always_inline/noinline and hot/cold attributes.
6576
34cf811f
MP
65772014-04-25 Marek Polacek <polacek@redhat.com>
6578
6579 PR c/60114
6580 * c-parser.c (c_parser_initelt): Pass input_location to
6581 process_init_element.
6582 (c_parser_initval): Pass loc to process_init_element.
6583 * c-tree.h (process_init_element): Adjust declaration.
6584 * c-typeck.c (push_init_level): Pass input_location to
6585 process_init_element.
6586 (pop_init_level): Likewise.
6587 (set_designator): Likewise.
6588 (output_init_element): Add location_t parameter. Pass loc to
6589 digest_init.
6590 (output_pending_init_elements): Pass input_location to
6591 output_init_element.
6592 (process_init_element): Add location_t parameter. Pass loc to
6593 output_init_element.
6594
42056eac
JJ
65952014-04-24 Jakub Jelinek <jakub@redhat.com>
6596
6597 * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
6598 atomic-clause, allow comma in between atomic-clause and
6599 seq_cst.
6600
e162a134
JJ
66012014-04-22 Jakub Jelinek <jakub@redhat.com>
6602
6603 PR c/59073
6604 * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
6605 fails, don't set OM_PARALLEL_COMBINED and return NULL.
6606
2f6babac
IZ
66072014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
6608
6609 PR middle-end/60469
6610 * c-array-notation.c (fix_builtin_array_notation_fn): Use
6611 create_tmp_var instead build_decl for creating temps.
6612 (build_array_notation_expr): Likewise.
6613 (fix_conditional_array_notations_1): Likewise.
6614 (fix_array_notation_expr): Likewise.
6615 (fix_array_notation_call_expr): Likewise.
6616
8edbfaa6
JJ
66172014-03-28 Jakub Jelinek <jakub@redhat.com>
6618
6619 PR c++/60689
6620 * c-tree.h (c_build_function_call_vec): New prototype.
6621 * c-typeck.c (build_function_call_vec): Don't call
6622 resolve_overloaded_builtin here.
6623 (c_build_function_call_vec): New wrapper function around
6624 build_function_call_vec. Call resolve_overloaded_builtin here.
6625 (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
6626 Call c_build_function_call_vec instead of build_function_call_vec.
6627 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
6628 * c-decl.c (finish_decl): Likewise.
6629
7485aeea
MLI
66302014-03-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
6631
6632 PR c/55383
6633 * c-typeck.c: Use correct format string in cast-qual warning
6634
b17a8b07
TS
66352014-03-07 Thomas Schwinge <thomas@codesourcery.com>
6636
6637 * c-decl.c (c_decl_attributes): Use
6638 lang_hooks.types.omp_mappable_type.
6639 * c-typeck.c (c_finish_omp_clauses): Likewise.
6640
3af9c5e9
MP
66412014-03-06 Marek Polacek <polacek@redhat.com>
6642
6643 PR c/60197
6644 * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
6645 of checking tree code.
6646
1c9f5f33
PK
66472014-02-19 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
6648
6649 * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
6650 (c_parser_parameter_declaration): Likewise.
6651
cc28fc7f
MP
66522014-02-19 Marek Polacek <polacek@redhat.com>
6653
6654 PR c/60195
6655 * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
6656 Call mark_exp_read on exp.value.
6657 (build_atomic_assign): Set TREE_NO_WARNING on val and old. Set
6658 TREE_ADDRESSABLE on old instead of val.
6659 (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
6660
b581c05c
PK
66612014-02-07 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
6662
6663 * c-parser.c (c_parser_get_builtin_args): Replace calls to
6664 C_EXPR_APPEND by vec_safe_push.
6665 * c-tree.h (C_EXPR_APPEND): Remove.
6666
81e5eca8
MP
66672014-01-31 Marek Polacek <polacek@redhat.com>
6668
6669 PR c/59963
6670 * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
6671 build_function_call_vec.
6672 (build_function_call): Likewise.
6673 (build_atomic_assign): Likewise.
6674 (build_function_call_vec): Add arg_loc parameter. Use it.
6675 (convert_arguments): Likewise.
6676 (convert_for_assignment): Rename rhs_loc to expr_loc.
6677 * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
6678 (c_parser_objc_keywordexpr): Likewise.
6679 (c_parser_postfix_expression_after_primary): Call
6680 build_function_call_vec with expr_loc rather than op_loc.
6681 Call c_parser_expr_list to fill arg_loc. Pass arg_loc to
6682 build_function_call_vec.
6683 (c_parser_expr_list): Add locations parameter. Fill it with locations
6684 of function arguments.
6685 * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
6686
68fca595
MP
66872014-01-30 Marek Polacek <polacek@redhat.com>
6688
6689 PR c/59940
6690 * c-typeck.c (build_function_call_vec): Use loc parameter.
6691 (convert_arguments): Add location parameter. Use it.
6692 (ep_convert_and_check): Likewise.
6693 (build_atomic_assign): Adjust convert_for_assignment call.
6694 (build_modify_expr): Likewise.
6695 (digest_init): Likewise.
6696 (c_finish_return): Likewise.
6697 (build_conditional_expr): Adjust ep_convert_and_check calls.
6698 (convert_for_assignment): Add rhs_loc parameter. Use it.
6699 (build_binary_op): Adjust convert_and_check and ep_convert_and_check
6700 calls.
6701
fa337f3a
RB
67022014-01-30 Richard Biener <rguenther@suse.de>
6703
6704 PR c/59905
6705 * c-typeck.c (build_function_call_vec): Do not replace calls
6706 to a function via an incompatible type with a runtime abort.
6707
b72271b9
BI
67082014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
6709
6710 * c-parser.c (c_parser_declaration_or_fndef): Replaced
6711 flag_enable_cilkplus with flag_cilkplus.
6712 (c_parser_direct_declarator_inner): Likewise.
6713 (c_parser_attribute_any_word): Likewise.
6714 (c_parser_attributes): Likewise.
6715 (c_parser_compound_statement): Likewise.
6716 (c_parser_statement_after_labels): Likewise.
6717 (c_parser_if_statement): Likewise.
6718 (c_parser_switch_statement): Likewise.
6719 (c_parser_do_statement): Likewise.
6720 (c_parser_for_statement): Likewise.
6721 (c_parser_unary_expression): Likewise.
6722 (c_parser_postfix_expression): Likewise.
6723 (c_parser_postfix_expression_after_primary): Likewise.
6724 (c_parser_postfix_expression_after_primary): Likewise.
6725 (c_parser_omp_clause_name): Likewise.
6726 (c_finish_omp_declare_simd): Likewise.
6727 (c_parser_cilk_verify_simd): Likewise.
6728 * c-typeck.c (build_array_ref): Likewise.
6729 (build_function_call_vec): Likewise.
6730 (convert_arguments): Likewise.
6731 (build_compound_expr): Likewise.
6732 (c_finish_return): Likewise.
6733 (c_finish_if_stmt): Likewise.
6734 (c_finish_loop): Likewise.
6735 (build_binary_op): Likewise.
6736
393e8e8b
MP
67372014-01-23 Marek Polacek <polacek@redhat.com>
6738
6739 PR c/59846
6740 * c-typeck.c (parser_build_binary_op): Use location instead of
6741 input_location.
6742 (build_binary_op): Pass location to shorten_compare.
6743
f04dda30
MP
67442014-01-23 Marek Polacek <polacek@redhat.com>
6745
6746 PR c/58346
6747 * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
6748 an empty aggregate.
6749
789eadcd
MP
67502014-01-23 Marek Polacek <polacek@redhat.com>
6751
6752 PR c/59871
6753 * c-typeck.c (build_compound_expr): Warn even for right-hand operand
6754 of a comma expression.
6755 (emit_side_effect_warnings): Likewise.
6756
40f14e9f
BI
67572014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
6758
6759 PR c/59825
6760 * c-array-notation.c (expand_array_notation_exprs): Rewrote this
6761 function to use walk_tree and moved a lot of its functionality to
6762 expand_array_notations.
6763 (expand_array_notations): New function.
6764
74558dd9
BI
67652014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
6766
6767 * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
6768 attribute an attribute without value.
6769
652fea39
JJ
67702014-01-23 Jakub Jelinek <jakub@redhat.com>
6771
6772 PR middle-end/58809
6773 * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
6774 BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
6775
f34f1c87
MP
67762014-01-22 Marek Polacek <polacek@redhat.com>
6777
6778 PR c/59891
6779 * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
6780 of remove_c_maybe_const_expr on op1 and op2.
6781
241f845a
JJ
67822014-01-15 Jakub Jelinek <jakub@redhat.com>
6783
6784 PR c/58943
6785 * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
6786 effects, preevaluate rhs using SAVE_EXPR first.
6787
9a74f20c
BI
67882014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
6789
6790 PR c++/59631
6791 * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
6792 statements with if-elseif statements.
6793
96066ce1
MP
67942014-01-06 Marek Polacek <polacek@redhat.com>
6795
6796 PR c/57773
6797 * c-decl.c (check_bitfield_type_and_width): Warn for implementation
6798 defined bit-field types only in ISO C.
6799
23a5b65a
RS
68002014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
6801
6802 Update copyright years
6803
f9030485
RS
68042014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
6805
6806 * c-array-notation.c: Use the standard form for the copyright notice.
6807
41958c28
BI
68082013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
6809
6810 * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
6811 (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
6812 field in parser is not empty. If not-empty, call the function
6813 c_parser_finish_omp_declare_simd.
6814 (c_parser_cilk_clause_vectorlength): Modified function to be shared
6815 between SIMD-enabled functions and #pragma simd. Added new parameter.
6816 (c_parser_cilk_all_clauses): Modified the usage of the function
6817 c_parser_cilk_clause_vectorlength as mentioned above.
6818 (c_parser_cilk_simd_fn_vector_attrs): New function.
6819 (c_finish_cilk_simd_fn_tokens): Likewise.
6820 (is_cilkplus_vector_p): Likewise.
6821 (c_parser_omp_clause_name): Added checking for "vectorlength,"
6822 "nomask," and "mask" strings in clause name.
6823 (c_parser_omp_all_clauses): Added 3 new case statements:
6824 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
6825 PRAGMA_CILK_CLAUSE_NOMASK.
6826 (c_parser_attributes): Added a cilk_simd_fn_tokens parameter. Added a
6827 check for vector attribute and if so call the function
6828 c_parser_cilk_simd_fn_vector_attrs. Also, when Cilk plus is enabled,
6829 called the function c_finish_cilk_simd_fn_tokens.
6830 (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
6831 parser field is non-empty. If so, parse them as you would parse
6832 the omp declare simd pragma.
6833 (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
6834 Added a check when step is a parameter and flag it as error.
6835 (CILK_SIMD_FN_CLAUSE_MASK): New #define.
6836 (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
6837 pragma_omp_clause.
6838
cef0fd0e
TS
68392013-12-17 Thomas Schwinge <thomas@codesourcery.com>
6840
6841 * c-parser.c (c_parser_omp_parallel): Fix description.
6842
12893402
BI
68432013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
6844
6845 * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
6846 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
6847 (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
6848 * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
6849
296674db
JM
68502013-12-04 Joseph Myers <joseph@codesourcery.com>
6851
6852 PR c/52023
6853 * c-parser.c (c_parser_alignas_specifier): Use
6854 c_sizeof_or_alignof_type instead of c_alignof.
6855 (c_parser_alignof_expression): Likewise, with min_alignof
6856 parameter depending on alignof spelling used.
6857
edd28054
MP
68582013-12-04 Marek Polacek <polacek@redhat.com>
6859
6860 PR c/54113
6861 * c-decl.c (start_function): Don't warn for missing prototype for
6862 inline functions.
6863
da0fc454
MP
68642013-12-03 Marek Polacek <polacek@redhat.com>
6865
6866 PR c/59351
6867 * c-decl.c (build_compound_literal): Allow compound literals with
6868 empty initial value.
6869
4c2ecab0
JM
68702013-12-02 Joseph Myers <joseph@codesourcery.com>
6871
6872 PR c/58235
6873 * c-typeck.c (build_modify_expr): Diagnose assignment to
6874 expression with array type.
6875
340baef7
JM
68762013-11-29 Joseph Myers <joseph@codesourcery.com>
6877
6878 PR c/42262
6879 * c-typeck.c (process_init_element): Do not treat a string as
6880 initializing a whole array when used with a designator for an
6881 individual element.
6882
6763b9f7
JM
68832013-11-29 Joseph Myers <joseph@codesourcery.com>
6884
6885 PR c/57574
6886 * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
6887 an inline function following a static declaration.
6888
e7bd1de1
JJ
68892013-11-28 Jakub Jelinek <jakub@redhat.com>
6890
6891 PR c/59310
6892 * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
6893 to p_name before calling c_parser_omp_teams instead of after.
6894 (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
6895 argument. Remove unused p_name variable.
6896
0136f8f0
AH
68972013-11-27 Aldy Hernandez <aldyh@redhat.com>
6898 Jakub Jelinek <jakub@redhat.com>
6899
6900 * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
6901 external_scope is NULL.
6902
241b71bb
TV
69032013-11-27 Tom de Vries <tom@codesourcery.com>
6904 Marc Glisse <marc.glisse@inria.fr>
6905
6906 PR c++/59032
6907 * c-typeck.c (build_unary_op): Allow vector increment and decrement.
6908
2fb9a547
AM
69092013-11-22 Andrew MacLeod <amacleod@redhat.com>
6910
6911 * c-typeck.c: Add required include files from gimple.h.
6912
8400e75e
DM
69132013-11-22 David Malcolm <dmalcolm@redhat.com>
6914
6915 * c-decl.c (define_label, shadow_tag_warned)
6916 (check_bitfield_type_and_width, grokdeclarator, grokparms,
6917 store_parm_decls_newstyle, store_parm_decls_oldstyle)
6918 (declspecs_add_type): Remove use of in_system_header macro.
6919 * c-parser.c (c_parser_unary_expression): Likewise.
6920 * c-typeck.c (store_init_value, process_init_element)
6921 (c_start_case): Likewise.
6922
6923 * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
6924 macro.
6925
6926 * c-parser.c (c_parser_set_source_position_from_token): Remove
6927 reference to in_system_header from comment.
6928
386b1f1f
RS
69292013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
6930
6931 * c-decl.c (grokdeclarator): Update comment to refer to
6932 tree_to_[su]hwi rather than tree_low_cst.
6933
ae7e9ddd
RS
69342013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
6935
6936 * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
6937 tree_to_uhwi throughout.
6938
9439e9a1
RS
69392013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
6940
6941 * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
6942 throughout.
6943
9541ffee
RS
69442013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
6945
6946 * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
6947 throughout.
6948
c02065fc
AH
69492013-11-15 Aldy Hernandez <aldyh@redhat.com>
6950
6951 * c-parser.c (c_parser_cilk_simd): New.
6952 (c_parser_cilk_verify_simd): New.
6953 (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
6954 (c_parser_omp_for_loop): Add case for NE_EXPR.
6955 Set c_break_label for CILK_SIMD.
6956 (c_parser_cilk_clause_vectorlength): New.
6957 (c_parser_cilk_clause_linear): New.
6958 (c_parser_cilk_clause_name): New.
6959 (c_parser_cilk_all_clauses): New.
6960 * c-typeck.c (build_unary_op): Pass location argument to
6961 readonly_error.
6962 (build_modify_expr): Same.
6963 (build_asm_expr): Same.
6964 (c_finish_bc_stmt): Error on break/continue in loops.
6965
18f429e2
AM
69662013-11-14 Andrew MacLeod <amacleod@redhat.com>
6967
6968 * c-typeck.c: Include only gimplify.h and gimple.h as needed.
6969
d8a2d370
DN
69702013-11-14 Diego Novillo <dnovillo@google.com>
6971
6972 * c-decl.c: Include print-tree.h.
6973 Include stor-layout.h.
6974 Include varasm.h.
6975 Include attribs.h.
6976 Include stringpool.h.
6977 * c-lang.c: Include fold-const.h.
6978 * c-parser.c: Include stringpool.h.
6979 Include attribs.h.
6980 Include stor-layout.h.
6981 Include varasm.h.
6982 Include trans-mem.h.
6983 * c-typeck.c: Include stor-layout.h.
6984 Include trans-mem.h.
6985 Include varasm.h.
6986 Include stmt.h.
6987
38b7bc7f
JM
69882013-11-13 Joseph Myers <joseph@codesourcery.com>
6989
6990 * c-tree.h (c_typespec_keyword): Add cts_auto_type.
6991 * c-decl.c (declspecs_add_type, finish_declspecs): Handle
6992 __auto_type.
6993 * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
6994 (c_parser_attribute_any_word, c_parser_objc_selector): Handle
6995 RID_AUTO_TYPE.
6996 (c_parser_declspecs): Take argument AUTO_TYPE_OK.
6997 (c_parser_declaration_or_fndef, c_parser_struct_declaration)
6998 (c_parser_declarator, c_parser_direct_declarator_inner)
6999 (c_parser_parameter_declaration, c_parser_type_name): All callers
7000 changed.
7001 (c_parser_declaration_or_fndef): Handle declarations with type
7002 determined from the initializer.
7003
45b0be94
AM
70042013-11-12 Andrew MacLeod <amacleod@redhat.com>
7005
18f429e2 7006 * c-typeck.c: Include gimplify.h.
45b0be94 7007
582d9b50
JM
70082013-11-12 Joseph Myers <joseph@codesourcery.com>
7009
7010 * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
7011 * c-parser.c (c_parser_declspecs): Mention _Thread_local in
7012 comment.
7013 * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
7014 or _Thread_local as appropriate in diagnostics.
7015 (build_null_declspecs): Initialize ret->thread_gnu_p.
7016 (declspecs_add_scspec): Handle either __thread or _Thread_local
7017 for RID_THREAD. Diagnose _Thread_local for pre-C11 standards if
7018 pedantic. Do not disallow _Thread_local extern and _Thread_local
7019 static.
7020
267bac10
JM
70212013-11-07 Joseph Myers <joseph@codesourcery.com>
7022 Andrew MacLeod <amacleod@redhat.com>
7023
7024 * c-aux-info.c (gen_type): Handle atomic qualifier.
7025 * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
7026 qualifiers when compating types.
7027 (shadow_tag_warned): Handle atomic_p in declspecs.
7028 (quals_from_declspecs): Likewise.
7029 (start_decl): Use c_type_promotes_to when promoting argument
7030 types.
7031 (grokdeclarator): Handle _Atomic.
7032 (get_parm_info): Diagnose any qualifier on "void" as only
7033 parameter.
7034 (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
7035 comparing types. Use c_type_promotes_to when promoting argument
7036 types.
7037 (finish_function): Use c_type_promotes_to when promoting argument
7038 types.
7039 (build_null_declspecs): Handle atomic_p in declspecs.
7040 (declspecs_add_qual): Handle RID_ATOMIC.
7041 * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
7042 (c_token_starts_declspecs): Handle RID_ATOMIC.
7043 (c_parser_declspecs): Handle atomic type specifiers and
7044 qualifiers.
7045 (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
7046 from types of expressions with atomic type.
7047 (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
7048 (c_parser_attribute_any_word): Handle RID_ATOMIC.
7049 (c_parser_initializer, c_parser_initelt, c_parser_initval)
7050 (c_parser_statement_after_labels, c_parser_switch_statement)
7051 (c_parser_for_statement, c_parser_expr_no_commas)
7052 (c_parser_conditional_expression, c_parser_binary_expression)
7053 (c_parser_cast_expression, c_parser_unary_expression)
7054 (c_parser_postfix_expression)
7055 (c_parser_postfix_expression_after_primary, c_parser_expression):
7056 Use convert_lvalue_to_rvalue.
7057 (c_parser_expression_conv, c_parser_expr_list): Document
7058 conversion of lvalues to rvalues. Use convert_lvalue_to_rvalue.
7059 (c_parser_objc_synchronized_statement): Use
7060 convert_lvalue_to_rvalue.
7061 (c_parser_objc_selector): Handle RID_ATOMIC.
7062 (c_parser_objc_receiver, c_parser_array_notation): Use
7063 convert_lvalue_to_rvalue.
7064 * c-tree.h (ctsk_typeof): Adjust comment to mention use for
7065 _Atomic (type-name).
7066 (struct c_declspecs): Add atomic_p field.
7067 (convert_lvalue_to_rvalue): Declare.
7068 * c-typeck.c (c_type_promotes_to): Promote atomic types to
7069 corresponding atomic types.
7070 (qualify_type): Don't add _Atomic qualifiers from second argument.
7071 (comp_target_types): Do not allow _Atomic mismatches.
7072 (type_lists_compatible_p): Do not remove atomic qualifiers when
7073 comparing types.
7074 (really_atomic_lvalue, convert_lvalue_to_rvalue)
7075 (build_atomic_assign): New functions.
7076 (build_unary_op): Use build_atomic_assign for atomic increment and
7077 decrement.
7078 (build_conditional_expr): Do not treat _Atomic void as a qualified
7079 version of void.
7080 (build_modify_expr): Use build_atomic_assign for atomic LHS.
7081 (find_anonymous_field_with_type, convert_to_anonymous_field)
7082 (convert_for_assignment): Do not remove atomic qualifiers when
7083 comparing types.
7084 (digest_init): Do not accept initialization of arrays of atomic
7085 elements by string constants.
7086 (build_asm_expr): Use convert_lvalue_to_rvalue.
7087 (build_binary_op): Do not treat _Atomic void as a qualified
7088 version of void.
7089
0c249d4b
DD
70902013-11-06 DJ Delorie <dj@redhat.com>
7091
7092 * c-decl.c (locate_old_decl): If a previous conflicting decl is
7093 both explicit and builtin, print the location of the explicit one.
7094
6d7f7e0a
TB
70952013-11-05 Tobias Burnus <burnus@net-b.de>
7096
7097 * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
7098 c_parser_omp_distribute, c_parser_omp_teams,
7099 c_parser_omp_target, c_parser_omp_declare): Handle
7100 -fopenmp-simd.
7101
b906f4ca
MP
71022013-11-03 Marek Polacek <polacek@redhat.com>
7103
7104 * c-decl.c (grokdeclarator): Add VLA instrumentation.
7105
ee1d5a02
JJ
71062013-11-01 Jakub Jelinek <jakub@redhat.com>
7107
7108 * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
7109 check_dup_generic at the end, unless remove is true.
7110 (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
7111 remove = true;.
7112 (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
7113
5a9785fb
JJ
71142013-10-31 Jakub Jelinek <jakub@redhat.com>
7115
7116 * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
7117 with decl that is not pointer nor array.
7118
939b37da
BI
71192013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
7120
7121 * c-decl.c (finish_function): Added a call for insert_cilk_frame when
7122 a spawning function is found.
7123 * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
7124 (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
7125 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
7126 * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
7127 case.
7128 (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
7129 * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
7130 expr.
7131 (c_finish_return): Added a check to reject _Cilk_spawn in return
7132 expression.
7133 (build_cilk_spawn): New function.
7134 (build_cilk_sync): Likewise.
7135 * Makefile.in (c-decl.o): Added cilk.h in dependency list.
ab20d992 7136
d4af74d4
TB
71372013-10-27 Tobias Burnus <burnus@net-b.de>
7138
7139 PR other/33426
7140 * c-parser.c (c_parser_while_statement, c_parser_while_statement,
7141 c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
7142 (c_parser_statement_after_labels): Update calls.
7143
d73749df 71442013-10-24 Tobias Burnus <burnus@net-b.de>
8170608b
TB
7145
7146 PR other/33426
7147 * c-parser.c (c_parser_pragma, c_parser_for_statement):
7148 Handle PRAGMA_IVDEP.
7149 (c_parser_statement_after_labels): Update call.
7150
f28aa681
MP
71512013-10-24 Marek Polacek <polacek@redhat.com>
7152
7153 * c-parser.c (c_parser_struct_declaration): Add a comment.
7154 (c_parser_declarator): Don't allow _Alignas here.
7155
0645c1a2
AM
71562013-10-17 Andrew MacLeod <amacleod@redhat.com>
7157
7158 * c-parser.c: Include omp-low.h.
7159 * c-typeck.c: Likewise.
7160
568a31f2
MP
71612013-10-17 Marek Polacek <polacek@redhat.com>
7162
7163 PR c/58267
7164 * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
7165 Document syntax of the array-declarator.
7166 (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
7167 are not permitted.
7168 (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
7169 (c_parser_struct_declaration): Likewise.
7170 (c_parser_declarator): Likewise.
7171 (c_parser_direct_declarator_inner): Likewise.
7172 (c_parser_parameter_declaration): Likewise.
7173 (c_parser_type_name): Likewise.
7174
acf0174b
JJ
71752013-10-11 Jakub Jelinek <jakub@redhat.com>
7176
7177 * c-lang.h (current_omp_declare_target_attribute): New extern
7178 decl.
7179 * c-parser.c: Include c-lang.h.
7180 (struct c_parser): Change tokens to c_token *.
7181 Add tokens_buf field. Change tokens_avail type to unsigned int.
7182 (c_parser_consume_token): If parser->tokens isn't
7183 &parser->tokens_buf[0], increment parser->tokens.
7184 (c_parser_consume_pragma): Likewise.
7185 (enum pragma_context): Add pragma_struct and pragma_param.
7186 (c_parser_external_declaration): Adjust
7187 c_parser_declaration_or_fndef caller.
7188 (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
7189 argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
7190 Adjust recursive call.
7191 (c_parser_struct_or_union_specifier): Use pragma_struct instead
7192 of pragma_external.
7193 (c_parser_parameter_declaration): Use pragma_param instead of
7194 pragma_external.
7195 (c_parser_compound_statement_nostart, c_parser_label,
7196 c_parser_for_statement): Adjust
7197 c_parser_declaration_or_fndef callers.
7198 (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
7199 it through to c_parser_conditional_expression.
7200 (c_parser_conditional_expression): Add omp_atomic_lhs argument,
7201 pass it through to c_parser_binary_expression. Adjust recursive
7202 call.
7203 (c_parser_binary_expression): Remove prec argument, add
7204 omp_atomic_lhs argument instead. Always start from PREC_NONE, if
7205 omp_atomic_lhs is non-NULL and one of the arguments of toplevel
7206 binop matches it, use build2 instead of parser_build_binary_op.
7207 (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
7208 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
7209 PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
7210 Handle pragma_struct and pragma_param the same as pragma_external.
7211 (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
7212 (c_parser_omp_variable_list): Parse array sections for
7213 OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
7214 (c_parser_omp_clause_collapse): Fully fold collapse expression.
7215 (c_parser_omp_clause_reduction): Handle user defined reductions.
7216 (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
7217 c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
7218 c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
7219 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
7220 c_parser_omp_clause_depend, c_parser_omp_clause_map,
7221 c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
7222 c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
7223 c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
7224 (c_parser_omp_all_clauses): Add finish_p argument. Don't call
7225 c_finish_omp_clauses if it is false. Handle new OpenMP 4.0 clauses.
7226 (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
7227 present to c_finish_omp_atomic. Handle OpenMP 4.0 atomic forms.
7228 (c_parser_omp_for_loop): Add CODE argument, pass it through
7229 to c_finish_omp_for. Change last argument to cclauses,
7230 and adjust uses to grab parallel clauses from the array of all
7231 the split clauses. Adjust c_parser_binary_expression,
7232 c_parser_declaration_or_fndef and c_finish_omp_for callers.
7233 (omp_split_clauses): New function.
7234 (c_parser_omp_simd): New function.
7235 (c_parser_omp_for): Add p_name, mask and cclauses arguments.
7236 Allow the function to be called also when parsing combined constructs,
7237 and call c_parser_omp_simd when parsing for simd.
7238 (c_parser_omp_sections_scope): If section-sequence doesn't start with
7239 #pragma omp section, require exactly one structured-block instead of
7240 sequence of statements.
7241 (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
7242 Allow the function to be called also when parsing combined constructs.
7243 (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
7244 Allow the function to be called also when parsing combined
7245 constructs.
7246 (c_parser_omp_taskgroup, c_parser_omp_cancel,
7247 c_parser_omp_cancellation_point, c_parser_omp_distribute,
7248 c_parser_omp_teams, c_parser_omp_target_data,
7249 c_parser_omp_target_update, c_parser_omp_target,
7250 c_parser_omp_declare_simd, c_finish_omp_declare_simd,
7251 c_parser_omp_declare_target, c_parser_omp_end_declare_target,
7252 c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
7253 (c_parser_omp_construct): Add p_name and mask vars. Handle
7254 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
7255 PRAGMA_OMP_TEAMS. Adjust c_parser_omp_for, c_parser_omp_parallel
7256 and c_parser_omp_sections callers.
7257 (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
7258 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
7259 OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
7260 (OMP_PARALLEL_CLAUSE_MASK): Likewise. Add OMP_CLAUSE_PROC_BIND.
7261 (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. Add
7262 OMP_CLAUSE_DEPEND.
7263 (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
7264 OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
7265 OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
7266 OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
7267 OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
7268 * c-typeck.c: Include tree-inline.h.
7269 (c_finish_omp_cancel, c_finish_omp_cancellation_point,
7270 handle_omp_array_sections_1, handle_omp_array_sections,
7271 c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
7272 (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
7273 user defined reductions.
7274 (c_tree_equal): New function.
7275 * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
7276 c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
7277 c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
7278 c_check_omp_declare_reduction_r): New prototypes.
7279 * c-decl.c (current_omp_declare_target_attribute): New variable.
7280 (c_decl_attributes): New function.
7281 (start_decl, start_function): Use it instead of decl_attributes.
7282 (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
7283 c_omp_reduction_decl, c_omp_reduction_lookup,
7284 c_check_omp_declare_reduction_r): New functions.
7285
0a6c2227
TT
72862013-09-25 Tom Tromey <tromey@redhat.com>
7287
7288 * Make-lang.in (c/gccspec.o): Remove.
7289 (CFLAGS-c/gccspec.o): New variable.
7290 (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
7291 (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
7292 (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
7293
f3bc55f0
TT
72942013-09-25 Tom Tromey <tromey@redhat.com>
7295
7296 * Make-lang.in (c/gccspec.o): Don't use subshell.
7297
a24d975c
MP
72982013-09-18 Marek Polacek <polacek@redhat.com>
7299
7300 PR sanitize/58443
7301 * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
7302 Remove unnecessary check.
7303
ce6923c5
MP
73042013-09-18 Marek Polacek <polacek@redhat.com>
7305
7306 PR sanitizer/58411
7307 * c-typeck.c (build_binary_op): Don't sanitize function if it has the
7308 no_sanitize_undefined attribute.
7309
a1e51df9
KT
73102013-09-13 Kai Tietz <ktietz@redhat.com>
7311
7312 PR target/57848
7313 * c-decl.c (c_builtin_function_ext_scope): Remove
7314 wrong assumption that it is never called on prexisting
7315 symbol.
7316
0af94e6f
JR
73172013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
7318
7319 * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
7320
20059c8b
GDR
73212013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
7322
7323 * c-objc-common.c (c_tree_printer): Tidy.
7324
de5a5fa1
MP
73252013-08-30 Marek Polacek <polacek@redhat.com>
7326
7327 * c-typeck.c (build_binary_op): Add division by zero and shift
7328 instrumentation.
7329
2531a1d9 73302013-08-26 Joern Rennecke <joern.rennecke@embecosm.com>
0fdd4508 7331 Joseph Myers <joseph@codesourcery.com>
2531a1d9 7332
6e2bcc98 7333 PR c/35649
2531a1d9
JR
7334 * c-typeck.c (c_common_type): Prefer double_type_node over
7335 other REAL_TYPE types with the same precision.
7336 (convert_arguments): Likewise.
7337
025311c4
GDR
73382013-08-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
7339
7340 * c-objc-common.c (c_tree_printer): Document the nature of the cast.
7341 (c_initialize_diagnostics): Call a destructor for the early printer.
7342
da6ca2b5
GDR
73432013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
7344
7345 * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
7346 printer initialization.
7347
318cda85 73482013-08-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
da6ca2b5 7349
318cda85
BI
7350 PR c/57490
7351 * c-array-notation.c (fix_conditional_array_notations_1): Added a
7352 check for truth values.
7353 (expand_array_notation_exprs): Added truth values case. Removed an
7354 unwanted else. Added for-loop to walk through subtrees in default
7355 case.
7356
b066401f
GDR
73572013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
7358
7359 * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
7360
fb48aadc
JM
73612013-07-23 Joseph Myers <joseph@codesourcery.com>
7362
7363 * c-parser.c (struct c_generic_association): Fix typo.
7364
433cc7b0
TT
73652013-07-23 Tom Tromey <tromey@redhat.com>
7366 Joseph Myers <joseph@codesourcery.com>
7367
7368 * c-parser.c (struct c_generic_association): New.
7369 (c_generic_association_d): New typedef.
7370 (c_parser_generic_selection): New function.
7371 (c_parser_postfix_expression): Handle RID_GENERIC.
7372
26d40c3d
JM
73732013-07-13 Jason Merrill <jason@redhat.com>
7374
7375 PR c++/57793
7376 * c-decl.c (finish_struct): Check for too-large class.
7377
ecdbd01a 73782013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
40d3d530
JR
7379
7380 PR c/57821
7381 * c-typeck.c (set_init_index): When folding, check for index overflow.
7382
1141ed3f
BI
73832013-06-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
7384
7385 * c-parser.c (c_parser_array_notation): Removed rejection of array
7386 notations in an array of function pointers.
7387
713b46fa
BI
73882013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
7389
7390 * c-array-notation.c (make_triplet_val_inv): New function.
7391 (create_cmp_incr): Likewise.
7392 (create_array_refs): Likewise.
7393 (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
7394 Also modularized common parts between functions and called the function.
7395 (build_array_notation_expr): Likewise.
7396 (fix_conditional_array_notations_1): Likewise.
7397 (fix_array_notation_expr): Likewise.
7398 (fix_array_notation_call_expr): Likewise.
7399
92f20202
MP
74002013-06-18 Marek Polacek <polacek@redhat.com>
7401
7402 PR c/57630
7403 * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
7404
73a23b06
BI
74052013-06-12 Balaji V. Iyer <balaji.v.iyer@intel.com>
7406
7407 * c-array-notation.c (build_array_notation_expr): Reject array notation
7408 mismatch between LHS and RHS even inside a call_expr. Also, removed
7409 a couple while statements that were dead code.
7410
00b8517d
BI
74112013-06-10 Balaji V. Iyer <balaji.v.iyer@intel.com>
7412
7413 * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
7414 excessive precision expressions in function parameters. Also removed
7415 couple unwanted while statements.
7416
1509bdda
BI
74172013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
7418
7419 * c-array-notation.c (expand_array_notation_exprs): Added
7420 ARRAY_NOTATION_REF case.
ab20d992 7421
d60f1706
BI
74222013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
7423
7424 * c-array-notation.c (length_mismatch_in_expr_p): Moved this
7425 function to c-family/array-notation-common.c.
7426 (is_cilkplus_reduce_builtin): Likewise.
7427 (find_rank): Likewise.
7428 (extract_array_notation_exprs): Likewise.
7429 (replace_array_notations): Likewise.
7430 (find_inv_trees): Likewise.
7431 (replace_inv_trees): Likewise.
7432 (contains_array_notation_expr): Likewise.
7433 (find_correct_array_notation_type): Likewise.
7434 (replace_invariant_exprs): Initialized additional_tcodes to NULL.
7435 (struct inv_list): Moved this to c-family/array-notation-common.c.
7436 * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
ab20d992 7437
6d6efbb3
BI
74382013-06-05 Balaji V. Iyer <balaji.v.iyer@intel.com>
7439
7440 * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
7441 reduction functions outside the for-loop. Added a check if the fundecl
7442 is non-NULL. Finally, removed an unwanted if-statement, and made the
7443 body unconditional.
7444
25c22937
BI
74452013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
7446
7447 * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
7448 condition of the if-statement matches the rank of else-block and then-
7449 block when array notations are used.
7450 * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
7451 expression after the entire function body is parsed.
7452 (c_parser_expr_no_commas): Delayed creating array notation expressions
7453 to the end of function parsing.
7454 * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
7455 whole if-statement instead of just the condition.
ab20d992 7456 (expand_array_notation_exprs): Added MODIFY_EXPR case.
25c22937 7457
edd25645
BI
74582013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
7459
7460 PR c/57474
7461 * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
7462 array to NULL_TREE if they are unused. Also added a check for the
7463 field to be NULL before its fields are used in future.
ab20d992 7464
065ce7f1
RO
74652013-05-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
7466
7467 PR bootstrap/57450
7468 * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
7469 (build_array_notation_expr): Likewise.
7470
36536d79
BI
74712013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
7472
7473 * c-typeck.c (build_array_ref): Added a check to see if array's
7474 index is greater than one. If true, then emit an error.
7475 (build_function_call_vec): Exclude error reporting and checking
7476 for builtin array-notation functions.
7477 (convert_arguments): Likewise.
7478 (c_finish_return): Added a check for array notations as a return
7479 expression. If true, then emit an error.
7480 (c_finish_loop): Added a check for array notations in a loop
7481 condition. If true then emit an error.
7482 (lvalue_p): Added a ARRAY_NOTATION_REF case.
7483 (build_binary_op): Added a check for array notation expr inside
7484 op1 and op0. If present, we call another function to find correct
7485 type.
7486 * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
7487 * c-parser.c (c_parser_compound_statement): Check if array
7488 notation code is used in tree, if so, then transform them into
7489 appropriate C code.
7490 (c_parser_expr_no_commas): Check if array notation is used in LHS
7491 or RHS, if so, then build array notation expression instead of
7492 regular modify.
7493 (c_parser_postfix_expression_after_primary): Added a check for
7494 colon(s) after square braces, if so then handle it like an array
7495 notation. Also, break up array notations in unary op if found.
7496 (c_parser_direct_declarator_inner): Added a check for array
7497 notation.
7498 (c_parser_compound_statement): Added a check for array notation in
7499 a stmt. If one is present, then expand array notation expr.
7500 (c_parser_if_statement): Likewise.
7501 (c_parser_switch_statement): Added a check for array notations in
7502 a switch statement's condition. If true, then output an error.
7503 (c_parser_while_statement): Similarly, but for a while.
7504 (c_parser_do_statement): Similarly, but for a do-while.
7505 (c_parser_for_statement): Similarly, but for a for-loop.
7506 (c_parser_unary_expression): Check if array notation is used in a
7507 pre-increment or pre-decrement expression. If true, then expand
7508 them.
7509 (c_parser_array_notation): New function.
7510 * c-array-notation.c: New file.
7511 * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
ab20d992 7512
cd192ccc
MS
75132013-05-23 Mike Stump <mikestump@comcast.net>
7514
7515 * c-typeck.c (convert_for_assignment): Handle references to memory
7516 spaces better.
7517
427b248d
JM
75182013-05-16 Jason Merrill <jason@redhat.com>
7519
7520 * Make-lang.in (cc1$(exeext)): Use link mutex.
7521
44d90fe1
PC
75222013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
7523
7524 * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
7525 to simply use OPT_Wpointer_arith.
7526 (build_unary_op): Likewise.
7527
4e7d7b3d
JJ
75282013-04-03 Jakub Jelinek <jakub@redhat.com>
7529
7530 PR c/19449
7531 * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
7532 argument. If set, or it temporarily for parsing of the first
7533 argument into force_folding_builtin_constant_p.
7534 (c_parser_postfix_expression): Adjust callers.
7535
839b422f
RB
75362013-03-21 Richard Biener <rguenther@suse.de>
7537
7538 * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
7539 instead of DECL_DEBUG_EXPR_IS_FROM. Guard properly.
7540
2ee028f1
MP
75412013-02-12 Marek Polacek <polacek@redhat.com>
7542
7543 PR c/44938
7544 * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
7545 origtypes to NULL.
7546
8824edff
JJ
75472013-01-24 Jakub Jelinek <jakub@redhat.com>
7548
7549 PR c/56078
7550 * c-typeck.c (set_nonincremental_init_from_string): If
7551 constructor_max_index is NULL, treat it as if tree_int_cst_lt
7552 returned false.
7553 (process_init_element): Likewise.
7554
eadd3d0d
JJ
75552012-12-20 Jakub Jelinek <jakub@redhat.com>
7556
7557 PR c++/55619
7558 * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
7559 argument, don't call default_function_array_conversion
7560 nor c_fully_fold here.
7561 (c_parser_asm_statement): Adjust callers.
7562 * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
7563 and outputs here, and call default_function_array_conversion
7564 on inputs that don't need to be addressable.
7565
f8a93a2e
JJ
75662012-12-18 Jakub Jelinek <jakub@redhat.com>
7567
7568 PR c/39464
7569 * c-typeck.c (convert_for_assignment): For -Wpointer-sign
7570 warning require that both c_common_unsigned_type as well as
7571 c_common_signed_type is the same for both mvl and mvr types.
7572
9771b263
DN
75732012-11-16 Diego Novillo <dnovillo@google.com>
7574
7575 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
7576
7577 * c-common.c: Use new vec API in vec.h.
7578 * c-common.h: Likewise.
7579 * c-gimplify.c: Likewise.
7580 * c-pragma.c: Likewise.
7581 * c-pretty-print.c: Likewise.
7582 * c-pretty-print.h: Likewise.
7583 * c-semantics.c: Likewise.
7584 * c-decl.c: Likewise.
7585 * c-parser.c: Likewise.
7586 * c-tree.h: Likewise.
7587 * c-typeck.c: Likewise.
7588
880661a4
JW
75892012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
7590
7591 PR c++/54930
7592 * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
7593
077d1abe
MLI
75942012-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
7595
7596 PR c/53066
7597 * c-decl.c (warn_if_shadowing): Do not warn if a variable
7598 shadows a function, unless the variable is a function or a
7599 pointer-to-function.
7600
3a785c97
JJ
76012012-10-12 Jakub Jelinek <jakub@redhat.com>
7602
7603 PR c/54381
7604 * c-parser.c (struct c_tree_loc_pair): Removed.
7605 (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
7606 add location_t * and tree * arguments, fill in array of 3
7607 sizeof_arg trees and corresponding locs.
7608 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
7609 c_parser_expr_list callers.
7610 (c_parser_postfix_expression_after_primary): Likewise. Pass
7611 array of 3 sizeof_arg trees and locs (corresponding to first
7612 3 arguments) to sizeof_pointer_memaccess_warning.
7613
703c8606
LC
76142012-10-09 Lawrence Crowl <crowl@google.com>
7615
7616 * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
7617 * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
7618 hash table.
7619
5d9de0d0
PC
76202012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
7621
7622 PR c++/54194
7623 * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
7624 call.
7625
a212e43f
MG
76262012-10-09 Marc Glisse <marc.glisse@inria.fr>
7627
7628 PR c++/54427
7629 * c-typeck.c: Include c-common.h.
7630 (enum stv_conv): Moved to c-common.h.
7631 (scalar_to_vector): Moved to c-common.c.
7632 (build_binary_op): Adapt to scalar_to_vector's new prototype.
7633 * Make-lang.in: c-typeck.c depends on c-common.h.
7634
3b78de56
AC
76352012-10-04 Arnaud Charlet <charlet@adacore.com>
7636
7637 * c-decl.c (c_write_global_declarations): Fix handling of
7638 -fdump-ada-spec*.
7639
78c60e3d
SS
76402012-09-30 Sharad Singhai <singhai@google.com>
7641
7642 * c-decl.c (c_write_global_declarations): Use a different method
7643 to determine if the dump has ben initialized.
7644
9f33203d
JM
76452012-09-14 Joseph Myers <joseph@codesourcery.com>
7646
7647 PR c/54552
7648 * c-typeck.c (c_cast_expr): When casting to a type requiring
7649 C_MAYBE_CONST_EXPR to be created, pass the inner expression to
7650 c_fully_fold first.
7651
a27d595d
JM
76522012-09-14 Joseph Myers <joseph@codesourcery.com>
7653
7654 PR c/54103
7655 * c-typeck.c (build_unary_op): Pass original argument of
7656 TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
7657 any C_MAYBE_CONST_EXPR, if it has integer operands.
7658 (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
7659 TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
7660 to c_objc_common_truthvalue_conversion, then remove any
7661 C_MAYBE_CONST_EXPR, if they have integer operands. Use
7662 c_objc_common_truthvalue_conversion not
7663 c_common_truthvalue_conversion.
7664 (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
7665 call note_integer_operands for arguments with integer operands
7666 that are not integer constants.
7667
9feb29df
JJ
76682012-09-13 Jakub Jelinek <jakub@redhat.com>
7669
7670 PR c/54559
7671 * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
7672 COMPLEX_TYPE with in_late_binary_op set temporarily to true.
7673
d409320c
JJ
76742012-08-31 Jakub Jelinek <jakub@redhat.com>
7675
7676 PR c/54428
7677 * c-convert.c (convert): Don't call fold_convert_loc if
7678 TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
7679 is a COMPLEX_EXPR. Remove TYPE_MAIN_VARIANT check from
7680 COMPLEX_TYPE -> COMPLEX_TYPE conversion.
7681
6265d07c
JJ
76822012-08-24 Jakub Jelinek <jakub@redhat.com>
7683
7684 PR c/54355
7685 * c-decl.c (c_parser_label): Pass true as nested and fix up comments
7686 for nested and empty_ok arguments in the call to
7687 c_parser_declaration_or_fndef.
7688
1a4049e7
JJ
76892012-08-17 Jakub Jelinek <jakub@redhat.com>
7690
7691 * c-tree.h (c_last_sizeof_arg): Declare.
7692 * c-parser.c (struct c_tree_loc_pair): New type.
7693 (c_parser_expr_list): Add sizeof_arg argument. Fill it in if
7694 non-NULL.
7695 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
7696 (c_parser_postfix_expression_after_primary): Likewise. Call
7697 sizeof_pointer_memaccess_warning if needed.
7698 (sizeof_ptr_memacc_comptypes): New function.
7699 * c-typeck.c (c_last_sizeof_arg): New global variable.
7700 (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
7701
0229aee9
UB
77022012-07-24 Uros Bizjak <ubizjak@gmail.com>
7703
7704 * c-lang.h (lang_decl): Add variable_size GTY option.
7705
7ee2468b
SB
77062012-07-16 Steven Bosscher <steven@gcc.gnu.org>
7707
7708 * c-decl.c: Include dumpfile.h instead of tree-dump.h.
7709 * Make-lang.in: Fix dependencies.
7710
d4a10d0a
SB
77112012-06-29 Steven Bosscher <steven@gcc.gnu.org>
7712
7713 * Make-lang.in: New file, rules migrated from gcc/Makefile.in
7714 and add language Makefile hooks.
7715 * config-lang.in: New file.
7716 * c-config-lang.in: Moved from gcc/config-lang.in to here, and
7717 add the required "normal" config-lang.in rules.
7718 * c-lang.h: Moved from gcc/ to here.
7719 * c-tree.h: Likewise.
7720 * c-objc-common.c: Likewise.
7721 * c-objc-common.h: Likewise.
7722 * c-typeck.c: Likewise.
7723 * c-convert.c: Likewise.
7724 * c-lang.c: Likewise.
7725 * c-aux-info.c: Likewise.
7726 * c-errors.c: Likewise.
7727 * gccspec.c: Likewise.
7728 * c-decl.c: Likewise. Include gt-c-c-decl.h, not gt-c-decl.h.
7729 * c-parser.c: Likewise. Include gt-c-c-parser.h, not gt-c-parser.h.
7730\f
c48514be 7731Copyright (C) 2012-2021 Free Software Foundation, Inc.
d4a10d0a
SB
7732
7733Copying and distribution of this file, with or without modification,
7734are permitted in any medium without royalty provided the copyright
7735notice and this notice are preserved.