]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/c/ChangeLog
openmp: Fix up cp/parser.c build with GCC 4.8 to 6
[thirdparty/gcc.git] / gcc / c / ChangeLog
CommitLineData
f92f4778
GA
12021-08-06 Tamar Christina <tamar.christina@arm.com>
2
3 * c-decl.c (c_simulate_enum_decl): Pass vec<> by pointer.
4 * c-tree.h (c_simulate_enum_decl): Likewise.
5
62021-08-06 Martin Sebor <msebor@redhat.com>
7
8 * c-parser.c (c_parser_declaration_or_fndef): Adjust by-value function
9 vec arguments to by-reference.
10 (c_finish_omp_declare_simd): Same.
11 (c_parser_compound_statement_nostart): Same.
12 (c_parser_for_statement): Same.
13 (c_parser_objc_methodprotolist): Same.
14 (c_parser_oacc_routine): Same.
15 (c_parser_omp_for_loop): Same.
16 (c_parser_omp_declare_simd): Same.
17
419c6c68
GA
182021-07-21 Thomas Schwinge <thomas@codesourcery.com>
19 Joseph Myers <joseph@codesourcery.com>
20 Cesar Philippidis <cesar@codesourcery.com>
21
22 * c-parser.c (c_parser_omp_clause_name): Handle 'nohost'.
23 (c_parser_oacc_all_clauses): Handle 'PRAGMA_OACC_CLAUSE_NOHOST'.
24 (OACC_ROUTINE_CLAUSE_MASK): Add 'PRAGMA_OACC_CLAUSE_NOHOST'.
25 * c-typeck.c (c_finish_omp_clauses): Handle 'OMP_CLAUSE_NOHOST'.
26
92d45509
GA
272021-07-20 Martin Sebor <msebor@redhat.com>
28
29 * c-tree.h (c_build_function_call_vec): Adjust by-value argument to
30 by-const-reference.
31 * c-typeck.c (c_build_function_call_vec): Same.
32
d97d71a1
GA
332021-07-15 Martin Sebor <msebor@redhat.com>
34
35 PR c/101289
36 PR c/97548
37 * c-decl.c (get_parm_array_spec): Strip nops.
38
6fba0eea
GA
392021-07-06 Martin Sebor <msebor@redhat.com>
40
41 * c-objc-common.c (c_tree_printer): Remove support for %G and %K.
42
7a60a6e8
GA
432021-07-02 Jakub Jelinek <jakub@redhat.com>
44
45 PR c/101297
46 * c-parser.c (c_parser_omp_atomic): Consume comma only if it
47 appears before a CPP_NAME.
48
90708f87
GA
492021-06-25 Martin Sebor <msebor@redhat.com>
50
51 * c-decl.c (pop_scope): Replace direct uses of TREE_NO_WARNING with
52 warning_suppressed_p, suppress_warning, and copy_no_warning.
53 (diagnose_mismatched_decls): Same.
54 (duplicate_decls): Same.
55 (grokdeclarator): Same.
56 (finish_function): Same.
57 (c_write_global_declarations_1): Same.
58 * c-fold.c (c_fully_fold_internal): Same.
59 * c-parser.c (c_parser_expr_no_commas): Same.
60 (c_parser_postfix_expression): Same.
61 * c-typeck.c (array_to_pointer_conversion): Same.
62 (function_to_pointer_conversion): Same.
63 (default_function_array_conversion): Same.
64 (convert_lvalue_to_rvalue): Same.
65 (default_conversion): Same.
66 (build_indirect_ref): Same.
67 (build_function_call_vec): Same.
68 (build_atomic_assign): Same.
69 (build_unary_op): Same.
70 (c_finish_return): Same.
71 (emit_side_effect_warnings): Same.
72 (c_finish_stmt_expr): Same.
73 (c_omp_clause_copy_ctor): Same.
74
9aa8327e
GA
752021-06-24 Jakub Jelinek <jakub@redhat.com>
76
77 PR c/101176
78 * c-parser.c (c_parser_has_attribute_expression): Set source range for
79 the result.
80
812021-06-24 Jakub Jelinek <jakub@redhat.com>
82
83 PR c/101171
84 * c-typeck.c (build_c_cast): Don't call note_integer_operands on
85 error_mark_node.
86
872021-06-24 Jakub Jelinek <jakub@redhat.com>
88
89 * c-parser.c (omp_split_clauses): Pass C_ORT_OMP_TARGET instead of
90 C_ORT_OMP for clauses on target construct.
91 (OMP_TARGET_CLAUSE_MASK): Add in_reduction clause.
92 (c_parser_omp_target): For non-combined target add
93 map (always, tofrom:) clauses for OMP_CLAUSE_IN_REDUCTION. Pass
94 C_ORT_OMP_TARGET to c_finish_omp_clauses.
95 * c-typeck.c (handle_omp_array_sections): Adjust ort handling
96 for addition of C_ORT_OMP_TARGET and simplify, mapping clauses are
97 never present on C_ORT_*DECLARE_SIMD.
98 (c_finish_omp_clauses): Likewise. Handle OMP_CLAUSE_IN_REDUCTION
99 on C_ORT_OMP_TARGET, set OMP_CLAUSE_MAP_IN_REDUCTION on
100 corresponding map clauses.
101
2f080224
GA
1022021-06-21 Jakub Jelinek <jakub@redhat.com>
103
104 PR inline-asm/100785
105 * c-typeck.c (c_mark_addressable): Diagnose trying to make
106 bit-fields addressable.
107
ede6c356
GA
1082021-06-15 Robin Dapp <rdapp@linux.ibm.com>
109
110 * c-decl.c (merge_decls): Copy DECL_USER_ALIGN if DECL_ALIGN is
111 similar.
112
8dc48181
GA
1132021-06-14 Tobias Burnus <tobias@codesourcery.com>
114
115 PR c/100913
116 * c-parser.c (c_parser_omp_clause_affinity): No need to set iterator
117 var in the error case.
118
438aac59
GA
1192021-06-07 Eric Botcazou <ebotcazou@adacore.com>
120
121 PR c/100920
122 * c-typeck.c (convert_for_assignment): Test fndecl_built_in_p to
123 spot built-in functions.
124
7d6987e9
GA
1252021-06-06 Jakub Jelinek <jakub@redhat.com>
126
127 PR c/100902
128 * c-parser.c (c_parser_omp_target): Call c_omp_adjust_map_clauses
129 even when target is combined with other constructs.
130
1312021-06-06 Eric Botcazou <ebotcazou@adacore.com>
132
133 PR c/100920
134 * c-decl.c (finish_struct): Fix thinko in previous change.
135 * c-typeck.c (convert_for_assignment): Do not warn on pointer
136 assignment and initialization for storage order purposes if the
137 RHS is a call to a DECL_IS_MALLOC function.
138
600f90cb
GA
1392021-06-04 Martin Sebor <msebor@redhat.com>
140
141 PR c/100783
142 * c-objc-common.c (print_type): Handle erroneous types.
143
440c8a0a
GA
1442021-06-03 Jakub Jelinek <jakub@redhat.com>
145
146 PR c++/100859
147 * c-typeck.c (c_finish_omp_clauses): Move OMP_CLAUSE_AFFINITY
148 after depend only cases.
149
ee682192
GA
1502021-05-31 Richard Biener <rguenther@suse.de>
151
152 PR c++/88601
153 * c-decl.c (names_builtin_p): Handle RID_BUILTIN_SHUFFLEVECTOR.
154 * c-parser.c (c_parser_postfix_expression): Likewise.
155
48166757
GA
1562021-05-28 Richard Biener <rguenther@suse.de>
157
158 PR c/100803
159 * gimple-parser.c (c_parser_gimple_paren_condition): Diagnose
160 invalid if conditions.
161
1622021-05-28 Jakub Jelinek <jakub@redhat.com>
163
164 PR middle-end/99928
165 * c-typeck.c (handle_omp_array_sections): Copy OMP_CLAUSE_MAP_IMPLICIT.
166 (c_finish_omp_clauses): Move not just OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT
167 marked clauses last, but also OMP_CLAUSE_MAP_IMPLICIT. Add
168 map_firstprivate_head bitmap, set it for GOMP_MAP_FIRSTPRIVATE_POINTER
169 maps and silently remove OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT if it is
170 present too. For OMP_CLAUSE_MAP_IMPLICIT silently remove the clause
171 if present in map_head, map_field_head or map_firstprivate_head
172 bitmaps.
173
1742021-05-28 Tobias Burnus <tobias@codesourcery.com>
175
176 * c-parser.c (c_parser_omp_clause_affinity): New.
177 (c_parser_omp_clause_name, c_parser_omp_variable_list,
178 c_parser_omp_all_clauses, OMP_TASK_CLAUSE_MASK): Handle affinity clause.
179 * c-typeck.c (handle_omp_array_sections_1, handle_omp_array_sections,
180 c_finish_omp_clauses): Likewise.
181
01c59ef2
GA
1822021-05-26 Eric Botcazou <ebotcazou@adacore.com>
183
184 PR c/100653
185 * c-decl.c (finish_struct): Warn for a union containing an aggregate
186 field with a differing scalar storage order.
187
2832d51b
GA
1882021-05-21 Jakub Jelinek <jakub@redhat.com>
189
190 PR middle-end/99928
191 * c-typeck.c (c_finish_omp_clauses): Move firstprivate clauses with
192 OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT to the end of the chain. Don't error
193 if a decl is mentioned both in map clause and in such firstprivate
194 clause unless OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT_TARGET is also set.
195
65f32e5d
GA
1962021-05-19 Jakub Jelinek <jakub@redhat.com>
197
198 PR middle-end/99928
199 * c-parser.c (c_parser_omp_master): Set OMP_MASTER_COMBINED on
200 master when combined with taskloop.
201 (c_parser_omp_parallel): Don't set OMP_PARALLEL_COMBINED on
202 parallel master when not combined with taskloop.
203
a8daf9a1
GA
2042021-05-18 Richard Biener <rguenther@suse.de>
205
206 PR c/100522
207 * gimple-parser.c (c_parser_gimple_postfix_expression_after_primary):
208 Diagnose calls to non-functions.
209 (c_parser_gimple_statement): Diagnose unexpected assignment RHS.
210
a7ffc1ef
GA
2112021-05-17 Richard Biener <rguenther@suse.de>
212
213 PR c/100625
214 * gimple-parser.c (c_parser_gimple_label): Avoid building
215 a GIMPLE label with NULL label decl.
216
f9af11c7
GA
2172021-05-13 Martin Sebor <msebor@redhat.com>
218
219 PR c/100550
220 * c-decl.c (get_parm_array_spec): Avoid erroneous VLA bounds.
221
0ff3a0f2
GA
2222021-05-12 Marcel Vollweiler <marcel@codesourcery.com>
223
224 * c-parser.c (c_parser_omp_clause_map): Support map-type-modifier
225 'close'.
226
aa891c56
GA
2272021-05-10 Martin Liska <mliska@suse.cz>
228
229 * c-aux-info.c (affix_data_type): Use startswith
230 function instead of strncmp.
231 * c-typeck.c (build_function_call_vec): Likewise.
232 * gimple-parser.c (c_parser_gimple_parse_bb_spec): Likewise.
233
62d87a32
GA
2342021-05-07 Eric Botcazou <ebotcazou@adacore.com>
235
236 * c-typeck.c (build_unary_op) <ADDR_EXPR>: Do not issue an error
237 on the address of a pointer field in a record with reverse SSO.
238
99e8df7a
GA
2392021-05-04 Tobias Burnus <tobias@codesourcery.com>
240
241 * c-typeck.c (c_finish_omp_clauses): Accept float + complex
242 for || and && reductions.
243
3c8e539d
GA
2442021-04-29 Joseph Myers <joseph@codesourcery.com>
245
246 * c-typeck.c (function_types_compatible_p): For C2X, treat
247 unprototyped function as compatible with non-variadic prototyped
248 function even if some argument types are changed by the default
249 argument promotions.
250
ee351f7f
GA
2512021-04-15 Martin Sebor <msebor@redhat.com>
252
253 PR c/99420
254 PR c/99972
255 * c-decl.c (pushdecl): Always propagate type attribute.
256
2572021-04-15 Richard Sandiford <richard.sandiford@arm.com>
258
259 PR c/98852
260 * c-typeck.c (c_common_type): Do not drop attributes that
261 affect type identity.
262
1d54b138
GA
2632021-04-10 Jakub Jelinek <jakub@redhat.com>
264
265 PR c/99990
266 * c-decl.c (finish_decl): Don't overwrite TREE_TYPE of
267 error_mark_node.
268
4493b1c1
GA
2692021-03-25 Jakub Jelinek <jakub@redhat.com>
270
271 PR c++/99565
272 * c-typeck.c (build_conditional_expr): Pass OEP_ADDRESS_OF_SAME_FIELD
273 to operand_equal_p.
274
5f256a70
GA
2752021-03-19 Jakub Jelinek <jakub@redhat.com>
276
277 PR c/99588
278 * c-typeck.c (mark_exp_read): Recognize what build_atomic_assign
279 with modifycode NOP_EXPR produces and mark the _Atomic var as read
280 if found.
281 (build_atomic_assign): For modifycode of NOP_EXPR, use COMPOUND_EXPRs
282 rather than STATEMENT_LIST. Otherwise call mark_exp_read on lhs.
283 Set TREE_SIDE_EFFECTS on the TARGET_EXPR.
284
3c5b6d24
GA
2852021-03-15 Tobias Burnus <tobias@codesourcery.com>
286
287 PR c++/99509
288 * c-decl.c (finish_decl): For 'omp declare target implicit' vars,
289 ensure that the varpool node is marked as offloadable.
290
ceae9533
GA
2912021-03-05 Tobias Burnus <tobias@codesourcery.com>
292
293 PR c/99137
294 * c-parser.c (c_parser_oacc_clause_async): Reject comma expressions.
295
4028d01a
GA
2962021-02-24 Martin Sebor <msebor@redhat.com>
297
298 PR middle-end/97172
299 * c-decl.c (free_attr_access_data): Clear attribute arg spec.
300
bf81237e
GA
3012021-02-18 Jakub Jelinek <jakub@redhat.com>
302
303 PR c/99136
304 * c-typeck.c (c_finish_return): Don't wrap retval into
305 EXCESS_PRECISION_EXPR in functions that return void.
306
0c5cdb31
GA
3072021-02-11 Marek Polacek <polacek@redhat.com>
308
309 * c-parser.c (c_parser_if_statement): Use vec_free.
310
a19dd5e6
GA
3112021-02-04 Martin Sebor <msebor@redhat.com>
312
313 PR c/97882
314 * c-decl.c (locate_old_decl): Add type to diagnostic output.
315 (diagnose_mismatched_decls): Same.
316 (start_function): Introduce temporaries for better readability.
317 * c-typeck.c (comptypes_internal): Only consider complete enum
318 types in comparisons with integers.
319
f7884fb1
GA
3202021-02-01 Martin Sebor <msebor@redhat.com>
321
322 PR middle-end/97172
323 * c-decl.c (free_attr_access_data): New function.
324 (c_parse_final_cleanups): Call free_attr_access_data.
325
59cf67d1
GA
3262021-01-16 Kwok Cheung Yeung <kcy@codesourcery.com>
327
328 * c-parser.c (c_parser_omp_clause_detach): New.
329 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_DETACH clause.
330 (OMP_TASK_CLAUSE_MASK): Add mask for PRAGMA_OMP_CLAUSE_DETACH.
331 * c-typeck.c (c_finish_omp_clauses): Handle PRAGMA_OMP_CLAUSE_DETACH
332 clause. Prevent use of detach with mergeable and overriding the
333 data sharing mode of the event handle.
334
2f7f0d32
GA
3352021-01-15 Jakub Jelinek <jakub@redhat.com>
336
337 * c-typeck.c (c_finish_omp_clauses): For reduction build array with
338 unqualified element type and then call c_build_qualified_type on the
339 ARRAY_TYPE.
340
7d187e4f
GA
3412021-01-07 Richard Biener <rguenther@suse.de>
342
343 * gimple-parser.c (c_parser_gimple_compound_statement): Only
344 reallocate loop array if it is too small.
345
eefe499f
GA
3462020-12-16 Martin Uecker <muecker@gwdg.de>
347
348 PR c/98047
349 * c-typeck.c (build_modify_expr): Drop qualifiers.
350
3512020-12-16 Martin Uecker <muecker@gwdg.de>
352
353 PR c/98260
354 * c-parser.c (c_parser_expression): Look into
355 nop expression when marking expressions as read.
356
d52945ce
GA
3572020-12-14 Martin Liska <mliska@suse.cz>
358
359 PR sanitizer/98204
360 * c-typeck.c (pointer_diff): Do not emit a top-level
361 sanitization.
362 (build_binary_op): Likewise.
363
ca2bd949
GA
3642020-12-09 Tobias Burnus <tobias@codesourcery.com>
365
366 * c-parser.c (c_parser_omp_allocate): New.
367 (c_parser_omp_construct): Call it.
368
3692020-12-09 Richard Biener <rguenther@suse.de>
370
371 PR c/98200
372 * gimple-parser.c (c_parser_gimple_postfix_expression): Return
373 early on error.
374
bc8a7013
GA
3752020-12-07 Martin Uecker <muecker@gwdg.de>
376
377 PR c/97981
378 * c-typeck.c (convert_lvalue_to_rvalue): Move the code
379 that drops qualifiers to the end of the function.
380
d48df6f2
GA
3812020-11-26 Martin Uecker <muecker@gwdg.de>
382
383 PR c/65455
384 PR c/92935
385 * c-parser.c (c_parser_declaration_or_fndef): Remove
386 redundant code to drop qualifiers of _Atomic types for __auto_type.
387 (c_parser_typeof_specifier): Do not drop qualifiers of _Atomic
388 types for __typeof__.
389
1e2c9a27
GA
3902020-11-24 Jakub Jelinek <jakub@redhat.com>
391
392 PR c/97958
393 * c-parser.c (c_parser_binary_expression): For omp atomic binary
394 expressions, use make_node instead of build2 to avoid checking build2
395 performs.
396
8e6198d0
GA
3972020-11-23 Joseph Myers <joseph@codesourcery.com>
398
399 PR c/95630
400 * c-typeck.c (build_binary_op): Use pedwarn_c99 with OPT_Wpedantic
401 for comparisons of complete and incomplete pointers.
402
7a97e2fc
GA
4032020-11-21 Aaron Sawdey <acsawdey@linux.ibm.com>
404
405 * c-aux-info.c (gen_type): Support opaque types.
406
82e5048e
GA
4072020-11-20 Martin Sebor <msebor@redhat.com>
408
409 PR middle-end/97879
410 * c-decl.c (start_function): Set ATTR_FLAG_INTERNAL in flags.
411
4122020-11-20 Jakub Jelinek <jakub@redhat.com>
413
414 PR other/97911
415 * Make-lang.in (c.serial): Change from goal to a variable.
416 (.PHONY): Drop c.serial.
417
4182020-11-20 Martin Uecker <muecker@gwdg.de>
419
420 * c-typeck.c (convert_lvalue_to_rvalue): Drop qualifiers.
421
d62586ee
GA
4222020-11-19 Jakub Jelinek <jakub@redhat.com>
423
424 PR c/97860
425 * c-decl.c (get_parm_array_spec): Bail out of nelts is
426 error_operand_p.
427
25bb75f8
GA
4282020-11-18 Jakub Jelinek <jakub@redhat.com>
429
430 * Make-lang.in (c.serial): New goal.
431 (.PHONY): Add c.serial c.prev.
432 (cc1$(exeext)): Call LINK_PROGRESS.
433
77f67db2
GA
4342020-11-13 Vladimir N. Makarov <vmakarov@redhat.com>
435
436 * c-parser.c (c_parser_asm_statement): Parse outputs for asm
437 goto too.
438 * c-typeck.c (build_asm_expr): Remove an assert checking output
439 absence for asm goto.
440
4412020-11-13 Jakub Jelinek <jakub@redhat.com>
442
443 * c-typeck.c (c_finish_omp_clauses): Don't clear
444 OMP_CLAUSE_REDUCTION_INSCAN unless reduction_seen == -2.
445
4462020-11-13 Iain Sandoe <iain@sandoe.co.uk>
447
448 PR objc/77404
449 * c-parser.c (c_parser_objc_class_definition): Pass the
450 location of the class name to the interface declaration.
451
bb622641
GA
4522020-11-10 Strager Neds <strager.nds@gmail.com>
453
454 * c-decl.c (merge_decls): Use new overload of
455 set_decl_section_name.
456
4572020-11-10 Chung-Lin Tang <cltang@codesourcery.com>
458
459 * c-parser.c (c_parser_omp_target_data): Add use of
460 new c_omp_adjust_map_clauses function. Add GOMP_MAP_ATTACH_DETACH as
461 handled map clause kind.
462 (c_parser_omp_target_enter_data): Likewise.
463 (c_parser_omp_target_exit_data): Likewise.
464 (c_parser_omp_target): Likewise.
465 * c-typeck.c (handle_omp_array_sections): Adjust COMPONENT_REF case to
466 use GOMP_MAP_ATTACH_DETACH map kind for C_ORT_OMP region type.
467 (c_finish_omp_clauses): Adjust bitmap checks to allow struct decl and
468 same struct field access to co-exist on OpenMP construct.
469
2da7ee05
GA
4702020-11-07 Martin Uecker <muecker@gwdg.de>
471
472 * c-parser.c (c_parser_label): Implement mixing of labels and code.
473 (c_parser_all_labels): Likewise.
474
44cab2d8
GA
4752020-11-06 Iain Sandoe <iain@sandoe.co.uk>
476
477 * c-parser.c (c_parser_objc_at_property_declaration):
478 Improve parsing fidelity. Associate better location info
479 with @property attributes. Clean up the interface to
480 objc_add_property_declaration ().
481
4822020-11-06 Nathan Sidwell <nathan@acm.org>
483
484 * c-decl.c (diagnose_mismatched_decls): Rename
485 DECL_IS_BUILTIN->DECL_IS_UNDECLARED_BUILTIN.
486 (warn_if_shadowing, implicitly_declare, names_builtin_p)
487 (collect_source_refs): Likewise.
488 * c-typeck.c (inform_declaration, inform_for_arg)
489 (convert_for_assignment): Likewise.
490
4912020-11-06 Tobias Burnus <tobias@codesourcery.com>
492
493 * c-parser.c (c_parser_omp_atomic): Add openacc parameter and update
494 OpenACC matching.
495 (c_parser_omp_construct): Update call.
496
35c125cb
GA
4972020-11-04 Jakub Jelinek <jakub@redhat.com>
498
499 PR c++/97670
500 * c-typeck.c (c_finish_omp_clauses): Look through array reductions to
501 find underlying decl to clear in the aligned_head bitmap.
502
5032020-11-04 Joseph Myers <joseph@codesourcery.com>
504
505 * c-decl.c (handle_nodiscard_attribute): New.
506 (std_attribute_table): Add nodiscard.
507 * c-parser.c (c_parser_std_attribute): Expect argument to
508 nodiscard attribute to be a string. Do not special-case ignoring
509 nodiscard.
510 * c-typeck.c (maybe_warn_nodiscard): New.
511 (build_compound_expr, emit_side_effect_warnings): Call
512 maybe_warn_nodiscard.
513 (c_process_expr_stmt, c_finish_stmt_expr): Also call
514 emit_side_effect_warnings if warn_unused_result.
515
4f0606fe
GA
5162020-10-29 Asher Gordon <AsDaGo@posteo.net>
517
518 * c-typeck.c (free_all_tagged_tu_seen_up_to): Replace free
519 with XDELETE.
520 (finish_init): Likewise.
521 (pop_init_level): Likewise.
522
e93aae4a
GA
5232020-10-28 Joseph Myers <joseph@codesourcery.com>
524
525 * c-decl.c (store_parm_decls_newstyle): Use pedwarn_c11 not
526 error_at for omitted parameter name.
527
5282020-10-28 Jakub Jelinek <jakub@redhat.com>
529
530 * c-parser.c (c_parser_omp_clause_name): Handle allocate.
531 (c_parser_omp_clause_allocate): New function.
532 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_ALLOCATE.
533 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
534 OMP_PARALLEL_CLAUSE_MASK, OMP_SINGLE_CLAUSE_MASK,
535 OMP_TASK_CLAUSE_MASK, OMP_TASKGROUP_CLAUSE_MASK,
536 OMP_DISTRIBUTE_CLAUSE_MASK, OMP_TEAMS_CLAUSE_MASK,
537 OMP_TARGET_CLAUSE_MASK, OMP_TASKLOOP_CLAUSE_MASK): Add
538 PRAGMA_OMP_CLAUSE_ALLOCATE.
539 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_ALLOCATE.
540
89bb01e7
GA
5412020-10-27 Joseph Myers <joseph@codesourcery.com>
542
543 * c-parser.c (c_parser_std_attribute_specifier): Allow duplicate
544 standard attributes.
545
efe71fcc
GA
5462020-10-23 Marek Polacek <polacek@redhat.com>
547
548 PR c++/91741
549 * c-parser.c (c_parser_binary_expression): Implement -Wsizeof-array-div.
550 (c_parser_postfix_expression): Set PAREN_SIZEOF_EXPR.
551 (c_parser_expr_list): Handle PAREN_SIZEOF_EXPR like SIZEOF_EXPR.
552 * c-tree.h (char_type_p): Declare.
553 * c-typeck.c (char_type_p): No longer static.
554
5552020-10-23 Martin Sebor <msebor@redhat.com>
556
557 PR middle-end/97552
558 * c-decl.c (get_parm_array_spec): Handle static VLA parameters.
559
2fe5b7d1
GA
5602020-09-19 Martin Sebor <msebor@redhat.com>
561
562 PR c/50584
563 * c-decl.c (lookup_last_decl): Define new function.
564 (c_decl_attributes): Call it.
565 (start_decl): Add argument and use it.
566 (finish_decl): Call build_attr_access_from_parms and decl_attributes.
567 (get_parm_array_spec): Define new function.
568 (push_parm_decl): Call get_parm_array_spec.
569 (start_function): Call warn_parm_array_mismatch. Build attribute
570 access and add it to current function.
571 * c-parser.c (c_parser_declaration_or_fndef): Diagnose mismatches
572 in forms of array parameters.
573 * c-tree.h (start_decl): Add argument.
574
5752020-09-19 Sandra Loosemore <sandra@codesourcery.com>
576
577 * c-decl.c (c_break_label, c_cont_label): Delete, and replace
578 with...
579 (in_statement): New.
580 (start_function): Adjust for above change.
581 (c_push_function_context, c_pop_function_context): Likewise.
582 * c-lang.h (struct language_function): Likewise.
583 * c-objc-common.h (LANG_HOOKS_BLOCK_MAY_FALLTHRU): Define.
584 * c-parser.c (objc_foreach_break_label, objc_foreach_continue_label):
585 New.
586 (c_parser_statement_after_labels): Adjust calls to c_finish_bc_stmt.
587 (c_parser_switch_statement): Adjust break/switch context handling
588 and calls to renamed functions.
589 (c_parser_while_statement): Adjust break/switch context handling and
590 build a WHILE_STMT.
591 (c_parser_do_statement): Ditto, with DO_STMT respectively.
592 (c_parser_for_statement): Ditto, with FOR_STMT respectively.
593 (c_parser_omp_for_loop): Adjust break/switch context handling.
594 * c-tree.h (c_break_label, c_cont_label): Delete.
595 (IN_SWITCH_STMT, IN_ITERATION_STMT): Define.
596 (IN_OMP_BLOCK, IN_OMP_FOR, IN_OBJC_FOREACH): Define.
597 (in_statement, switch_statement_break_seen_p): Declare.
598 (c_start_case, c_finish_case): Renamed to...
599 (c_start_switch, c_finish_switch).
600 (c_finish_bc_stmt): Adjust arguments.
601 * c-typeck.c (build_function_call_vec): Don't try to print
602 statements with %qE format.
603 (struct c_switch): Rename switch_expr field to switch_stmt.
604 Add break_stmt_seen_p field.
605 (c_start_case): Rename to c_start_switch. Build a SWITCH_STMT
606 instead of a SWITCH_EXPR. Update for changes to struct c_switch.
607 (do_case): Update for changes to struct c_switch.
608 (c_finish_case): Rename to c_finish_switch. Update for changes to
609 struct c_switch and change of representation from SWITCH_EXPR to
610 SWITCH_STMT.
611 (c_finish_loop): Delete.
612 (c_finish_bc_stmt): Update to reflect changes to break/continue
613 state representation. Build a BREAK_STMT or CONTINUE_STMT instead
614 of a GOTO_EXPR except for objc foreach loops.
615
e1a4a8a0
GA
6162020-09-01 Jakub Jelinek <jakub@redhat.com>
617
618 PR c++/96867
619 * c-typeck.c (handle_omp_array_sections_1): Test C_ARRAY_PARAMETER
620 only on PARM_DECLs.
621
8f7ea26a
GA
6222020-08-28 Martin Sebor <msebor@redhat.com>
623
624 PR c/96596
625 * c-decl.c (match_builtin_function_types): Avoid dealing with erroneous
626 argument type.
627
8b394f01
GA
6282020-08-27 Martin Liska <mliska@suse.cz>
629
630 * gimple-parser.c (c_parser_gimple_compound_statement): Set exact argument of a vector
631 growth function to true.
632
db0f6efe
GA
6332020-08-25 Tobias Burnus <tobias@codesourcery.com>
634
635 PR c/96678
636 * c-typeck.c (handle_omp_array_sections_1): Talk about
637 array function parameter in the error message.
638
5c265693
GA
6392020-08-18 Jakub Jelinek <jakub@redhat.com>
640
641 PR c/96571
642 * c-parser.c (c_parser_generic_selection): Change match_found from bool
643 to int, holding index of the match. Call mark_exp_read on the selector
644 expression and on expressions other than the selected one.
645
4967ca2f
GA
6462020-08-01 Richard Sandiford <richard.sandiford@arm.com>
647
648 PR c/96377
649 * c-typeck.c (process_init_element): Split test for whether to
650 recurse into a record, union or array into...
651 (initialize_elementwise_p): ...this new function. Don't recurse
652 into a vector type if the initialization value is also a vector.
653
48cc2e46
GA
6542020-07-31 Richard Biener <rguenther@suse.de>
655
656 PR debug/96383
657 * c-objc-common.h (LANG_HOOKS_FINALIZE_EARLY_DEBUG):
658 Define to c_common_finalize_early_debug.
659
3ea9abca
GA
6602020-07-22 Tobias Burnus <tobias@codesourcery.com>
661
662 * c-parser.c (c_parser_omp_clause_hint): Require nonnegative hint clause.
663 (c_parser_omp_critical): Permit hint(0) clause without named critical.
664 (c_parser_omp_construct): Don't assert if error_mark_node is returned.
665
30430061
GA
6662020-07-21 Sunil K Pandey <skpgkp2@gmail.com>
667
668 PR target/95237
669 * c-decl.c (finish_decl): Call target hook
670 lower_local_decl_alignment to lower local decl alignment.
671
3f8ca9cb
GA
6722020-07-09 Julian Brown <julian@codesourcery.com>
673 Thomas Schwinge <thomas@codesourcery.com>
674
675 PR middle-end/95270
676 * c-typeck.c (c_finish_omp_clauses): Set OMP_CLAUSE_SIZE (bias) to zero
677 for standalone attach/detach clauses.
678
a82c4c4c 6792020-07-08 Eric Botcazou <ebotcazou@adacore.com>
50873cc5
GA
680
681 * c-typeck.c (convert_for_assignment): If -Wscalar-storage-order is
682 set, warn for conversion between pointers that point to incompatible
683 scalar storage orders.
684
f60ee68d
GA
6852020-07-07 Kaipeng Zhou <zhoukaipeng3@huawei.com>
686
687 * c-parser.c (c_parser_statement_after_labels): Pass correct
688 parameters to c_parser_do_statement.
689
56638b9b
GA
6902020-06-16 Jakub Jelinek <jakub@redhat.com>
691
692 * c-parser.c (c_parser_expr_no_commas): Save, clear and restore
693 c_in_omp_for.
694 (c_parser_omp_for_loop): Set c_in_omp_for around some calls to avoid
695 premature c_fully_fold. Defer explicit c_fully_fold calls to after
696 c_finish_omp_for.
697 * c-tree.h (c_in_omp_for): Declare.
698 * c-typeck.c (c_in_omp_for): Define.
699 (build_modify_expr): Avoid c_fully_fold if c_in_omp_for.
700 (digest_init): Likewise.
701 (build_binary_op): Likewise.
702
7032020-06-16 Jakub Jelinek <jakub@redhat.com>
704
705 * c-parser.c (c_parser_omp_clause_schedule): Reject modifier separated
706 from kind by comma rather than colon.
707
1a59f3db
GA
7082020-06-05 Mark Wielaard <mark@klomp.org>
709
710 * c-decl.c (implicit_decl_warning): When warned and olddecl is
711 an undeclared builtin, then add a fixit header hint, if found.
712 (implicitly_declare): Add OPT_Wbuiltin_declaration_mismatch to
713 warning_at about implicit builtin declaration type mismatch.
714
9a5b7438
GA
7152020-06-03 Mark Wielaard <mark@klomp.org>
716
717 * c-parser.c (struct c_parser): Add seen_string_literal
718 bitfield.
719 (c_parser_consume_token): Reset seen_string_literal.
720 (c_parser_error_richloc): Add name_hint if seen_string_literal
721 and next token is a CPP_NAME and we have a missing header
722 suggestion for the name.
723 (c_parser_string_literal): Set seen_string_literal.
724
7252020-06-03 Mark Wielaard <mark@klomp.org>
726
727 * c-parser.c (c_parser_postfix_expression_after_primary): Add
728 scope with matching_parens after CPP_OPEN_PAREN.
729
7302020-06-03 Tobias Burnus <tobias@codesourcery.com>
731
732 * c-objc-common.h (LANG_HOOKS_OMP_PREDETERMINED_MAPPING): Redefine.
733
53ffb43a
GA
7342020-05-28 Nicolas Bértolo <nicolasbertolo@gmail.com>
735
736 * Make-lang.in: Remove extra slash.
737
8f66f175
ML
7382020-05-19 Martin Liska <mliska@suse.cz>
739
740 * c-parser.c: Fix typo.
741
49ddde69
JJ
7422020-05-14 Jakub Jelinek <jakub@redhat.com>
743
744 * c-parser.c (c_parser_omp_target): Set cfun->has_omp_target.
745
eb72dc66
RB
7462020-05-07 Richard Biener <rguenther@suse.de>
747
748 PR middle-end/94703
749 * gimple-parser.c (c_parser_parse_ssa_name): Do not set
750 DECL_GIMPLE_REG_P.
751
bf915591
JJ
7522020-04-30 Jakub Jelinek <jakub@redhat.com>
753
754 PR c/94842
755 * c-decl.c (set_labels_context_r): In addition to context-less
756 LABEL_DECLs adjust also LABEL_DECLs with context equal to
757 parent function if any.
758 (store_parm_decls): Adjust comment.
759
e1113ffb
JJ
7602020-04-19 Jakub Jelinek <jakub@redhat.com>
761
762 PR objc/94637
763 * c-parser.c (c_parser_objc_selector_arg): Handle CPP_SCOPE like
764 two CPP_COLON tokens.
765
2e389749
JJ
7662020-04-17 Jakub Jelinek <jakub@redhat.com>
767
768 PR other/94629
769 * c-parser.c (c_parser_oacc_routine): Remove redundant assignment
770 to data.clauses.
771
2dc9294c
JJ
7722020-04-15 Jakub Jelinek <jakub@redhat.com>
773
774 PR c/94593
775 * c-parser.c (c_parser_pragma) <case PRAGMA_OMP_REQUIRES>: Reject
776 requires directive when not at file scope.
777
13e41d8b
TB
7782020-04-08 Tobias Burnus <tobias@codesourcery.com>
779
780 PR middle-end/94120
781 * c-decl.c (c_check_in_current_scope): New function.
782 * c-tree.h (c_check_in_current_scope): Declare it.
783 * c-parser.c (c_parser_oacc_declare): Add check that variables
784 are declared in the same scope as the directive. Fix handling
785 of namespace vars.
786
4df50a05
JJ
7872020-04-07 Jakub Jelinek <jakub@redhat.com>
788
789 PR c++/94512
790 * c-parser.c (c_parser_omp_parallel): Set OMP_PARALLEL_COMBINED
791 if c_parser_omp_master succeeded.
792
5db9e893
JJ
7932020-03-23 Jakub Jelinek <jakub@redhat.com>
794
795 PR gcov-profile/94029
796 PR c/94239
797 * c-parser.c (c_parser_declaration_or_fndef): Initialize endloc to
798 the function_start_locus location. Don't do that afterwards for the
799 __GIMPLE body parsing.
800
9def91e9
JJ
8012020-03-19 Jakub Jelinek <jakub@redhat.com>
802
803 PR gcov-profile/94029
804 * c-tree.h (finish_function): Add location_t argument defaulted to
805 input_location.
806 * c-parser.c (c_parser_compound_statement): Add endlocp argument and
807 set it to the locus of closing } if non-NULL.
808 (c_parser_compound_statement_nostart): Return locus of closing }.
809 (c_parser_parse_rtl_body): Likewise.
810 (c_parser_declaration_or_fndef): Propagate locus of closing } to
811 finish_function.
812 * c-decl.c (finish_function): Add end_loc argument, use it instead of
813 input_location to set function_end_locus.
814
046c5890
JJ
8152020-03-17 Jakub Jelinek <jakub@redhat.com>
816
817 PR c/94172
818 * c-tree.h (C_TYPE_INCOMPLETE_VARS): Define to TYPE_LANG_SLOT_1
819 instead of TYPE_VFIELD, and support it on {RECORD,UNION,ENUMERAL}_TYPE.
820 (TYPE_ACTUAL_ARG_TYPES): Check that it is only used on FUNCTION_TYPEs.
821 * c-decl.c (pushdecl): Push C_TYPE_INCOMPLETE_VARS also to
822 ENUMERAL_TYPEs.
823 (finish_incomplete_vars): New function, moved from finish_struct. Use
824 relayout_decl instead of layout_decl.
825 (finish_struct): Remove obsolete comment about C_TYPE_INCOMPLETE_VARS
826 being TYPE_VFIELD. Use finish_incomplete_vars.
827 (finish_enum): Clear C_TYPE_INCOMPLETE_VARS. Call
828 finish_incomplete_vars.
829 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
830 also on ENUMERAL_TYPEs.
831
c015ff8c
JJ
8322020-03-16 Jakub Jelinek <jakub@redhat.com>
833
834 PR c/94179
835 * c-fold.c (c_fully_fold_internal): Handle MEM_REF.
836
f2e9fe5f
MS
8372020-03-13 Martin Sebor <msebor@redhat.com>
838
839 PR c/94040
840 * c-decl.c (builtin_structptr_type_count): New constant.
841 (match_builtin_function_types): Reject decls that are incompatible
842 in types pointed to by pointers.
843 (diagnose_mismatched_decls): Adjust comments.
844
c9d70946
JM
8452020-03-05 Joseph Myers <joseph@codesourcery.com>
846
847 PR c/93577
848 * c-typeck.c (pop_init_level): Do not diagnose initializers as
849 empty when initialized type is error_mark_node.
850 (set_designator, process_init_element): Ignore initializers for
851 elements of a variable-size type or of error_mark_node.
852
726e292d
MS
8532020-03-01 Martin Sebor <msebor@redhat.com>
854
855 PR middle-end/93926
856 * c-decl.c (types_close_enough_to_match): New function.
857 (match_builtin_function_types):
858 (diagnose_mismatched_decls): Add missing inform call to a warning.
859
a499c2f8
MS
8602020-03-01 Martin Sebor <msebor@redhat.com>
861
862 PR c/93812
863 * c-typeck.c (build_functype_attribute_variant): New function.
864 (composite_type): Call it.
865
9c3da8cc
JJ
8662020-02-25 Jakub Jelinek <jakub@redhat.com>
867
868 PR other/93912
869 * gimple-parser.c (c_parser_gimple_parse_bb_spec_edge_probability):
870 Rename last argument from probablity to probability.
871
bacdd5e9
JJ
8722020-02-13 Jakub Jelinek <jakub@redhat.com>
873
874 PR c/93576
875 * c-decl.c (grokdeclarator): If this_size_varies, only push size into
876 *expr if it has side effects.
877
f9eb0973
JL
8782020-01-30 Jeff Law <law@redhat.com>
879
880 PR c/88660
881 * c-parser.c (c_parser_switch_statement): Make sure to request
882 marking the switch expr as used.
883
ac68e287
JM
8842020-01-22 Joseph Myers <joseph@codesourcery.com>
885
886 PR c/93348
887 * c-typeck.c (build_c_cast): Call remove_c_maybe_const_expr on
888 argument with integer operands.
889
852f0ae8
KK
8902020-01-16 Kerem Kat <keremkat@gmail.com>
891
892 PR c/92833
893 * c-parser.c (c_parser_consume_token): Fix peeked token stack pop
894 to support 4 available tokens.
895
e2346a33
JM
8962020-01-15 Joseph Myers <joseph@codesourcery.com>
897
898 PR c/93072
899 * c-decl.c (pushdecl): Use TREE_PUBLIC, not DECL_EXTERNAL, to
900 determine whether to set DECL_CONTEXT.
901
3d77686d
JM
9022020-01-13 Joseph Myers <joseph@codesourcery.com>
903
904 PR c/93241
905 * c-typeck.c (build_c_cast): Check for expressions with integer
906 operands that can occur in an unevaluated part of an integer
907 constant expression and call note_integer_operands as needed.
908
f74c4b2c
RB
9092019-01-08 Richard Biener <rguenther@suse.de>
910
911 PR middle-end/93199
912 * gimple-parser.c (c_parser_parse_gimple_body): Remove __PHI IFN
913 permanently.
914
8d9254fc
JJ
9152020-01-01 Jakub Jelinek <jakub@redhat.com>
916
917 Update copyright years.
918
39292e25
EB
9192019-12-20 Eric Botcazou <ebotcazou@adacore.com>
920
921 * c-decl.c (collect_source_ref_cb): Delete.
922 (for_each_global_decl): Rename into...
923 (collect_source_refs): ...this. Call collect_source_ref directly.
924 (c_parse_final_cleanups): Always call collect_source_ref on the main
925 input filename.
926
519d7496
JB
9272019-12-19 Julian Brown <julian@codesourcery.com>
928 Cesar Philippidis <cesar@codesourcery.com>
929
930 * c-parser.c (c_parser_omp_clause_name): Add parsing of attach and
931 detach clauses.
932 (c_parser_omp_variable_list): Add ALLOW_DEREF optional parameter.
933 Allow deref (->) in variable lists if true.
934 (c_parser_omp_var_list_parens): Add ALLOW_DEREF optional parameter.
935 Pass to c_parser_omp_variable_list.
936 (c_parser_oacc_data_clause): Support attach and detach clauses. Update
937 call to c_parser_omp_variable_list.
938 (c_parser_oacc_all_clauses): Support attach and detach clauses.
939 (OACC_DATA_CLAUSE_MASK, OACC_ENTER_DATA_CLAUSE_MASK,
940 OACC_KERNELS_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK,
941 OACC_SERIAL_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_ATTACH.
942 (OACC_EXIT_DATA_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_DETACH.
943 * c-typeck.c (handle_omp_array_sections_1): Reject subarrays for attach
944 and detach. Support deref.
945 (handle_omp_array_sections): Use GOMP_MAP_ATTACH_DETACH instead of
946 GOMP_MAP_ALWAYS_POINTER for OpenACC.
947 (c_oacc_check_attachments): New function.
948 (c_finish_omp_clauses): Check attach/detach arguments for being
949 pointers using above. Support deref.
950
a6163563
JB
9512019-12-19 Julian Brown <julian@codesourcery.com>
952 Maciej W. Rozycki <macro@codesourcery.com>
953 Tobias Burnus <tobias@codesourcery.com>
954 Thomas Schwinge <thomas@codesourcery.com>
955
956 * c-parser.c (c_parser_omp_clause_name): Support no_create.
957 (c_parser_oacc_data_clause): Likewise.
958 (c_parser_oacc_all_clauses): Likewise.
959 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
960 (OACC_PARALLEL_CLAUSE_MASK, OACC_SERIAL_CLAUSE_MASK): Add
961 PRAGMA_OACC_CLAUSE_NO_CREATE.
962 * c-typeck.c (handle_omp_array_sections): Support
963 GOMP_MAP_NO_ALLOC.
964
d68f5d45
DM
9652019-12-09 David Malcolm <dmalcolm@redhat.com>
966
967 * c-objc-common.c (range_label_for_type_mismatch::get_text):
968 Replace label_text ctor calls.
969
4691bf46
JM
9702019-12-04 Joseph Myers <joseph@codesourcery.com>
971
972 PR c/36941
973 PR c/88827
974 * c-typeck.c (convert_lvalue_to_rvalue): Call
975 require_complete_type for arguments not of void types.
976 (build_indirect_ref): Do not diagnose dereferencing pointers to
977 incomplete types.
978 * c-tree.h (C_TYPE_ERROR_REPORTED): Remove.
979
85d11957
JM
9802019-12-03 Joseph Myers <joseph@codesourcery.com>
981
982 PR c/88704
983 * c-decl.c (store_parm_decls_oldstyle): Diagnose use of [*] in
984 old-style parameter definitions.
985
4569f8b3
SL
9862019-12-01 Sandra Loosemore <sandra@codesourcery.com>
987
988 PR target/92499
989
990 * c-decl.c (flexible_array_type_p): Move to common code.
991
65ef05d0
RS
9922019-11-30 Richard Sandiford <richard.sandiford@arm.com>
993
994 * c-decl.c (start_decl): Allow initialization of variables whose
995 size is a POLY_INT_CST.
996 (finish_decl): Use verify_type_context to check whether the target
997 allows variables with a particular type to have static or thread-local
998 storage duration. Don't raise a second error if such variables do
999 not have a constant size.
1000 (grokdeclarator): Use verify_type_context to check whether the
1001 target allows fields or array elements to have a particular type.
1002 * c-typeck.c (pointer_diff): Use verify_type_context to test whether
1003 the target allows pointer difference for the types involved.
1004 (build_unary_op): Likewise for pointer increment and decrement.
1005
34b43828
JM
10062019-11-29 Joseph Myers <joseph@codesourcery.com>
1007
1008 * c-parser.c (struct c_parser): Add members raw_tokens and
1009 raw_tokens_used.
1010 (c_lex_one_token): Add argument raw. Handle lexing raw tokens and
1011 using previously-lexed raw tokens.
1012 (c_parser_peek_nth_token_raw)
1013 (c_parser_check_balanced_raw_token_sequence): New functions.
1014 (c_parser_nth_token_starts_std_attributes): Use
1015 c_parser_check_balanced_raw_token_sequence for Objective-C.
1016
5b8d9367
JM
10172019-11-25 Joseph Myers <joseph@codesourcery.com>
1018
1019 PR c/91985
1020 * c-decl.c (finish_declspecs): Use int instead of decimal
1021 floating-point types if decimal floating-point not supported.
1022
1723e1be
JM
10232019-11-25 Joseph Myers <joseph@codesourcery.com>
1024
1025 * c-tree.h (struct c_declarator): Use a structure for id member.
1026 * c-decl.c (grokdeclarator): Extract attributes from cdk_id
1027 declarators at the start, not when handling individual declarators
1028 later. Use u.id.id instead of u.id.
1029 (grokfield): Use u.id.id instead of u.id.
1030 (build_id_declarator): Set u.id.id and u.id.attrs.
1031 (finish_declspecs): Handle postfix attributes in case of typedef
1032 name or typeof used.
1033 * c-parser.c (c_parser_direct_declarator)
1034 (c_parser_direct_declarator_inner): Place declarator for
1035 attributes inside that for function or array, not outside. Set
1036 u.id.attrs for identifiers.
1037 (c_parser_parameter_declaration): Use u.id.id instead of u.id.
1038 * gimple-parser.c (c_parser_gimple_declaration): Use u.id.id
1039 instead of u.id.
1040
bdaf8be1
JJ
10412019-11-22 Jakub Jelinek <jakub@redhat.com>
1042
1043 PR c/90677
1044 * c-decl.c (identifier_global_tag): Define.
1045
3e00ba47
RB
10462019-11-20 Richard Biener <rguenther@suse.de>
1047
1048 PR c/92088
1049 * c-decl.c (grokdeclarator): Prevent inlining of nested
1050 function with VLA arguments.
1051
8c5b727a
JM
10522019-11-20 Joseph Myers <joseph@codesourcery.com>
1053
1054 * c-decl.c (c_warn_type_attributes): New function.
1055 (groktypename, grokdeclarator, finish_declspecs): Call
1056 c_warn_type_attributes before applying attributes to types.
1057 * c-tree.h (c_warn_type_attributes): Declare.
1058
192961ff
JM
10592019-11-19 Joseph Myers <joseph@codesourcery.com>
1060
1061 * c-decl.c (c_warn_unused_attributes): Use pedwarn not warning for
1062 standard attributes.
1063 * c-parser.c (c_parser_std_attribute): Take argument for_tm. Use
1064 pedwarn for unknown standard attributes and return error_mark_node
1065 for them.
1066
20a38017
MM
10672019-11-18 Matthew Malcomson <matthew.malcomson@arm.com>
1068
1069 * c-parser.c (c_parser_parse_rtl_body): Always call
1070 run_rtl_passes, even if startwith pass is not provided.
1071
d5fbe5e0
JM
10722019-11-15 Joseph Myers <joseph@codesourcery.com>
1073
1074 * c-parser.c (c_parser_std_attribute_specifier): Diagnose
1075 duplicate standard attributes.
1076
97cc1187
JM
10772019-11-15 Joseph Myers <joseph@codesourcery.com>
1078
1079 * c-decl.c (std_attribute_table): Add maybe_unused.
1080
f8aea5e3
JM
10812019-11-15 Joseph Myers <joseph@codesourcery.com>
1082
1083 * c-decl.c (std_attribute_table): Add fallthrough.
1084 * c-parser.c (c_parser_declaration_or_fndef): Diagnose fallthrough
1085 attribute at top level.
1086
2cc94aa8
JM
10872019-11-15 Joseph Myers <joseph@codesourcery.com>
1088
1089 * c-decl.c (std_attribute_table): New.
1090 (c_init_decl_processing): Register attributes from
1091 std_attribute_table.
1092 * c-parser.c (c_parser_attribute_arguments): Add arguments
1093 require_string and allow_empty_args. All callers changed.
1094 (c_parser_std_attribute): Set require_string argument for
1095 "deprecated" attribute.
1096
7c5890cc
JM
10972019-11-14 Joseph Myers <joseph@codesourcery.com>
1098
1099 * c-parser.c (c_parser_postfix_expression)
1100 (c_parser_check_literal_zero): Handle CPP_UTF8CHAR.
1101 * gimple-parser.c (c_parser_gimple_postfix_expression): Likewise.
1102
e8738f4e
RS
11032019-11-14 Richard Sandiford <richard.sandiford@arm.com>
1104
1105 * c-typeck.c (build_conditional_expr): Use truth_type_for instead
1106 of build_same_sized_truth_vector_type.
1107 (build_vec_cmp): Likewise.
1108
b2417b59
JJ
11092019-11-14 Jakub Jelinek <jakub@redhat.com>
1110
bedb7f04
JJ
1111 * c-parser.c (c_parser_omp_context_selector): Don't require score
1112 argument to fit into shwi, just to be INTEGER_CST. Diagnose
1113 negative score.
1114
b2417b59
JJ
1115 * c-parser.c (c_parser_omp_context_selector): Rename
1116 CTX_PROPERTY_IDLIST to CTX_PROPERTY_NAME_LIST, add CTX_PROPERTY_ID.
1117 Use CTX_PROPERTY_ID for atomic_default_mem_order, only allow a single
1118 identifier in that. For CTX_PROPERTY_NAME_LIST, allow identifiers
1119 and string literals.
1120
4e03c3a7
JM
11212019-11-14 Joseph Myers <joseph@codesourcery.com>
1122
1123 * c-tree.h (enum c_typespec_kind): Add ctsk_tagref_attrs and
1124 ctsk_tagfirstref_attrs.
1125 (struct c_declspecs): Update description of attrs. Add
1126 postfix_attrs and non_std_attrs_seen_p. Increase size of
1127 typespec_kind bit-field.
1128 (c_warn_unused_attributes): New declaration.
1129 (parser_xref_tag): Update prototype.
1130 * c-decl.c (c_warn_unused_attributes): New function.
1131 (shadow_tag_warned): Handle ctsk_tagfirstref_attrs and
1132 ctsk_tagref_attrs. Handle attribute declarations.
1133 (check_compound_literal_type): Handle ctsk_tagfirstref_attrs.
1134 (grokdeclarator): Handle standard attributes.
1135 (parser_xref_tag): Add arguments have_std_attrs and attrs. Apply
1136 attributes to incomplete type reference.
1137 (xref_tag): Update call to parser_xref_tag.
1138 (declspecs_add_addrspace, declspecs_add_type)
1139 (declspecs_add_scspec, declspecs_add_attrs): Set
1140 non_std_attrs_seen_p.
1141 (finish_declspecs): Apply postfix standard attributes to type.
1142 * c-parser.c (c_token_starts_declspecs)
1143 (c_token_starts_declaration, c_parser_next_token_starts_declspecs)
1144 (c_parser_next_tokens_start_declaration): Update comments.
1145 (c_parser_consume_token, c_parser_consume_pragma): Handle moving
1146 parser->tokens[2] to parser->tokens[1].
1147 (c_parser_nth_token_starts_std_attributes)
1148 (c_parser_std_attribute_specifier_sequence): New functions.
1149 (c_parser_declaration_or_fndef): Add arguments have_attrs and
1150 attrs. All callers changed. Handle standard attributes.
1151 (c_parser_parms_declarator, c_parser_parms_list_declarator)
1152 (c_parser_parameter_declaration): Add argument have_gnu_attrs.
1153 All callers changed.
1154 (c_parser_declspecs): Add arguments start_std_attr_ok and
1155 end_std_attr_ok. All callers changed. Handle standard
1156 attributes.
1157 (c_parser_enum_specifier, c_parser_struct_or_union_specifier)
1158 (c_parser_direct_declarator, c_parser_direct_declarator_inner)
1159 (c_parser_compound_statement_nostart, c_parser_all_labels)
1160 (c_parser_label, c_parser_statement, c_parser_for_statement):
1161 Handle standard attributes.
1162 * c-parser.h (c_parser_declspecs): Update prototype.
1163 * gimple-parser.c (c_parser_gimple_declaration): Update call to
1164 c_parser_declspecs.
1165
0c29cac4
ML
11662019-11-12 Martin Liska <mliska@suse.cz>
1167
1168 * gimple-parser.c: Do not include params.h.
1169
028d4092
ML
11702019-11-12 Martin Liska <mliska@suse.cz>
1171
1172 * gimple-parser.c (c_parser_parse_gimple_body): Replace old parameter syntax
1173 with the new one, include opts.h if needed. Use SET_OPTION_IF_UNSET
1174 macro.
1175
62aee289
MR
11762019-11-12 Maciej W. Rozycki <macro@codesourcery.com>
1177 Frederik Harwath <frederik@codesourcery.com>
1178
1179 gcc/c/
1180 * c-parser.c (OACC_SERIAL_CLAUSE_MASK): New macro.
1181 (c_parser_oacc_kernels_parallel): Rename function to...
1182 (c_parser_oacc_compute): ... this. Handle PRAGMA_OACC_SERIAL.
1183 (c_parser_omp_construct): Update accordingly.
1184
1185
7cec9588
JJ
11862019-11-11 Jakub Jelinek <jakub@redhat.com>
1187
1188 * c-parser.c (c_parser_translation_unit): Diagnose declare target
1189 without corresponding end declare target.
1190
f486280c
RS
11912019-11-08 Richard Sandiford <richard.sandiford@arm.com>
1192
1193 * c-convert.c (convert): Only handle vector conversions if one of
1194 the types satisfies gnu_vector_type_p or if -flax-vector-conversions
1195 allows it.
1196 * c-typeck.c (build_array_ref): Only allow vector indexing if the
1197 vectors satisfy gnu_vector_type_p.
1198 (build_unary_op): Only allow unary operators to be applied to
1199 vectors if they satisfy gnu_vector_type_p.
1200 (digest_init): Only allow by-element initialization of vectors
1201 if they satisfy gnu_vector_type_p.
1202 (really_start_incremental_init): Likewise.
1203 (push_init_level): Likewise.
1204 (pop_init_level): Likewise.
1205 (process_init_element): Likewise.
1206 (build_binary_op): Only allow binary operators to be applied to
1207 vectors if they satisfy gnu_vector_type_p.
1208
017c6491
JM
12092019-11-08 Joseph Myers <joseph@codesourcery.com>
1210
1211 * c-decl.c (grokparms): Convert () in a function definition to
1212 (void) for C2x.
1213 (store_parm_decls_oldstyle): Pedwarn for C2x.
1214 (store_parm_decls): Update comment about () not generating a
1215 prototype.
1216
c01bd174
JM
12172019-11-07 Joseph Myers <joseph@codesourcery.com>
1218
1219 * c-parser.c (c_parser_attribute_arguments): New function.
1220 Factored out of c_parser_gnu_attribute.
1221 (c_parser_gnu_attribute): Use c_parser_attribute_arguments.
1222 (c_parser_balanced_token_sequence, c_parser_std_attribute)
1223 (c_parser_std_attribute_specifier): New functions.
1224 (c_parser_transaction_attributes): Use
1225 c_parser_std_attribute_specifier.
1226
471c5330
JM
12272019-11-07 Joseph Myers <joseph@codesourcery.com>
1228
1229 * c-parser.c (c_parser): Remove lex_untranslated_string. Add
1230 lex_joined_string and translate_strings_p.
1231 (c_lex_one_token): Pass 0 or C_LEX_STRING_NO_JOIN to
1232 c_lex_with_flags.
1233 (c_parser_string_literal): New function.
1234 (c_parser_static_assert_declaration_no_semi): Use
1235 c_parser_string_literal. Do not set lex_untranslated_string.
1236 (c_parser_asm_string_literal): Use c_parser_string_literal.
1237 (c_parser_simple_asm_expr): Do not set lex_untranslated_string.
1238 (c_parser_gnu_attributes): Set and restore translate_strings_p
1239 instead of lex_untranslated_string.
1240 (c_parser_asm_statement): Do not set lex_untranslated_string.
1241 (c_parser_asm_operands): Likewise.
1242 (c_parser_has_attribute_expression): Set and restore
1243 translate_strings_p instead of lex_untranslated_string.
1244 (c_parser_postfix_expression): Use c_parser_string_literal.
1245 (pragma_lex): Likewise.
1246 (c_parser_pragma_pch_preprocess): Set lex_joined_string.
1247 (c_parse_file): Set translate_strings_p.
1248 * gimple-parser.c (c_parser_gimple_postfix_expression)
1249 (c_parser_gimple_or_rtl_pass_list): Use c_parser_string_literal.
1250 * c-parser.c (c_parser_string_literal): Declare function.
1251
d0c464d2
JJ
12522019-11-02 Jakub Jelinek <jakub@redhat.com>
1253
1254 * c-parser.c (c_finish_omp_declare_variant): Use
1255 omp_get_context_selector instead of c_omp_get_context_selector.
1256
ac2cfa6c
RS
12572019-10-29 Richard Sandiford <richard.sandiford@arm.com>
1258
1259 * c-tree.h (c_simulate_enum_decl): Declare.
1260 * c-decl.c (c_simulate_enum_decl): New function.
1261 * c-objc-common.h (LANG_HOOKS_SIMULATE_ENUM_DECL): Define to the above.
1262
74078538
RS
12632019-10-29 Richard Sandiford <richard.sandiford@arm.com>
1264
1265 * c-tree.h (c_simulate_builtin_function_decl): Declare.
1266 * c-decl.c (c_simulate_builtin_function_decl): New function.
1267 * c-objc-common.h (LANG_HOOKS_SIMULATE_BUILTIN_FUNCTION_DECL): Define
1268 to the above.
1269
ad1539d5
MS
12702019-10-28 Martin Sebor <msebor@redhat.com>
1271
1272 PR c/66970
1273 * c-decl.c (names_builtin_p): Define a new function.
1274
cb73e4e7
RB
12752019-10-28 Richard Biener <rguenther@suse.de>
1276
1277 PR c/92249
1278 * gimple-parser.c (c_parser_parse_gimple_body): Make
1279 current_bb the entry block initially to easier recover
1280 from errors.
1281 (c_parser_gimple_compound_statement): Adjust.
1282
135df52c
JJ
12832019-10-24 Jakub Jelinek <jakub@redhat.com>
1284
1285 * c-parser.c (c_finish_omp_declare_variant): Use
1286 omp_context_selector_matches instead of
1287 c_omp_context_selector_matches.
1288 * c-decl.c (c_decl_attributes): Add "omp declare target block"
1289 attribute in between declare target and end declare target
1290 pragmas.
1291
783bfe5e
JM
12922019-10-15 Joseph Myers <joseph@codesourcery.com>
1293
1294 * c-parser.c (c_parser_attribute_any_word): Rename to
1295 c_parser_gnu_attribute_any_word. All callers changed.
1296 (c_parser_attribute): Rename to c_parser_gnu_attribute. All
1297 callers changed.
1298 (c_parser_attributes): Rename to c_parser_gnu_attributes. All
1299 callers changed.
1300 (c_parser_declaration_or_fndef, c_parser_declspecs)
1301 (c_parser_enum_specifier, c_parser_struct_or_union_specifier)
1302 (c_parser_struct_declaration, c_parser_declarator)
1303 (c_parser_gnu_attribute, c_parser_compound_statement)
1304 (c_parser_label, c_parser_statement, c_parser_objc_method_decl)
1305 (c_parser_transaction_attributes): Add "gnu-" prefix to names of
1306 attribute-related syntax productions.
1307
56898e43
RS
13082019-10-14 Richard Sandiford <richard.sandiford@arm.com>
1309
1310 * c-objc-common.c (useful_aka_type_p): Replace with...
1311 (get_aka_type): ...this new function. Given the original type,
1312 decide which aka type to print (if any). Only look through typedefs
1313 if user_facing_original_type_p.
1314 (print_type): Update accordingly.
1315
b9424661
JJ
13162019-10-14 Jakub Jelinek <jakub@redhat.com>
1317
1318 * c-parser.c (c_parser_omp_all_clauses): Change bool NESTED_P argument
1319 into int NESTED, if it is 2, diagnose missing commas in between
1320 clauses.
1321 (c_parser_omp_context_selector): Pass 2 as last argument to
1322 c_parser_omp_all_clauses.
1323
20de9568
JJ
13242019-10-12 Jakub Jelinek <jakub@redhat.com>
1325
1326 * c-parser.c (c_parser_omp_context_selector): Improve error recovery.
1327 For simd properties, put them directly into TREE_VALUE.
1328 (c_finish_omp_declare_variant): Call c_omp_mark_declare_variant.
1329 If c_omp_context_selector_matches is 0, don't add attribute, otherwise
1330 add "omp declare variant base" attribute rather than
1331 "omp declare variant".
1332
fe2bc27c
JM
13332019-10-11 Joseph Myers <joseph@codesourcery.com>
1334
1335 * c-decl.c (declspecs_add_type): Use pedwarn_c11 for DFP types.
1336
94e7f906
JJ
13372019-10-10 Jakub Jelinek <jakub@redhat.com>
1338
1339 * c-parser.c (c_parser_omp_all_clauses): Add NESTED_P argument, if
1340 true, terminate processing on closing paren and don't skip to end of
1341 pragma line.
1342 (c_parser_omp_declare_simd): Handle also declare variant.
1343 (omp_construct_selectors, omp_device_selectors,
1344 omp_implementation_selectors, omp_user_selectors): New variables.
1345 (c_parser_omp_context_selector,
1346 c_parser_omp_context_selector_specification,
1347 c_finish_omp_declare_variant): New functions.
1348 (c_finish_omp_declare_simd): Handle both declare simd and
1349 declare variant.
1350 (c_parser_omp_declare): Handle declare variant.
1351
93313b94
JM
13522019-10-02 Joseph Myers <joseph@codesourcery.com>
1353
1354 * c-parser.c (c_parser_asm_statement): Handle CPP_SCOPE like two
1355 CPP_COLON tokens.
1356
55879815
RS
13572019-10-01 Richard Sandiford <richard.sandiford@arm.com>
1358
1359 * c-objc-common.c (useful_aka_type_p): New function.
1360 (print_type): Use it to decide whether an aka type is worth printing.
1361
59bc434a
JJ
13622019-09-27 Jakub Jelinek <jakub@redhat.com>
1363
1364 PR c++/88203
1365 * c-parser.c (c_parser_predefined_identifier): New function.
1366 (c_parser_postfix_expression): Use it.
1367 (c_parser_omp_variable_list): Parse predefined identifiers.
1368 * c-typeck.c (c_finish_omp_clauses): Allow predefined variables
1369 in shared and firstprivate clauses, even when they are predetermined
1370 shared.
1371
c6447c20
RS
13722019-09-27 Richard Sandiford <richard.sandiford@arm.com>
1373
1374 * c-typeck.c (build_function_call_vec): Take the original function
1375 decl as an optional final parameter. Pass all built-in calls to
1376 check_builtin_function_arguments.
1377
522da4c2
EB
13782019-09-20 Eric Botcazou <ebotcazou@adacore.com>
1379
1380 PR c/91815
1381 * c-decl.c (pushdecl): In C detect duplicate declarations across scopes
1382 of identifiers in the external scope only for variables and functions.
1383
68e2c199
PK
13842019-09-04 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1385
1386 PR c/78736
1387 * c-typeck.c (convert_for_assignment): Handle Wenum-conversion.
1388
22f8849d
IS
13892019-08-23 Iain Sandoe <iain@sandoe.co.uk>
1390
1391 PR pch/61250
1392 * c-parser.c (c_parse_file): Call c_common_no_more_pch ()
1393 after determining that the first token is not
1394 PRAGMA_GCC_PCH_PREPROCESS.
1395
db376f45
EB
13962019-08-22 Eric Botcazou <ebotcazou@adacore.com>
1397
1398 * c-parser.c (c_parser_declaration_or_fndef): Set DECL_ARGUMENTS of a
1399 FUNCTION_DECL to the right value in the presence of nested declarators.
1400
4d732405
RS
14012019-08-13 Richard Sandiford <richard.sandiford@arm.com>
1402
1403 PR middle-end/91421
1404 * c-decl.c (merge_decls): Use copy_decl_built_in_function.
1405
cb1180d5
RS
14062019-08-13 Richard Sandiford <richard.sandiford@arm.com>
1407
1408 PR middle-end/91421
1409 * c-decl.c (header_for_builtin_fn): Take a FUNCTION_DECL instead
1410 of a built_in_function.
1411 (diagnose_mismatched_decls, implicitly_declare): Update accordingly.
1412
77eb117f
JJ
14132019-08-10 Jakub Jelinek <jakub@redhat.com>
1414
1415 * c-parser.c (c_parser_omp_clause_name): Parse device_type.
1416 (c_parser_omp_clause_device_type): New function.
1417 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_DEVICE_TYPE.
1418 (OMP_DECLARE_TARGET_CLAUSE_MASK): Add PRAGMA_OMP_CLAUSE_DEVICE_TYPE.
1419 (c_parser_omp_declare_target): Handle device_type clauses. Remove
1420 diagnostics for declare target with clauses nested in clause-less
1421 declare target declaration-definition-seq.
1422 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_DEVICE_TYPE.
1423
2c3b8bad
JJ
14242019-08-09 Jakub Jelinek <jakub@redhat.com>
1425
bb522e2e
JJ
1426 * c-parser.c (check_no_duplicate_clause): Simplify using
1427 omp_find_clause.
1428 (c_parser_omp_clause_if): Fix up printing of target {enter,exit} data
1429 directive name modifiers.
1430 (c_parser_omp_clause_proc_bind): Check for duplicate proc_bind clause.
1431
2c3b8bad
JJ
1432 PR c/91401
1433 * c-parser.c (c_parser_omp_clause_dist_schedule): Fix up typos in the
1434 check_no_duplicate_clause call. Comment it out, instead emit a
1435 warning for duplicate dist_schedule clauses.
1436
99769e7f
RS
14372019-08-08 Richard Sandiford <richard.sandiford@arm.com>
1438
1439 * c-decl.c (finish_enum): Clear C_TYPE_BEING_DEFINED.
1440
8860d270
JJ
14412019-08-08 Jakub Jelinek <jakub@redhat.com>
1442
1443 * c-typeck.c (c_finish_omp_clauses): For C_ORT_OMP
1444 OMP_CLAUSE_USE_DEVICE_* clauses use oacc_reduction_head bitmap
1445 instead of generic_head to track duplicates.
1446
398e3feb
JJ
14472019-08-07 Jakub Jelinek <jakub@redhat.com>
1448
1449 * c-parser.c (c_parser_omp_clause_name): Parse use_device_addr clause.
1450 (c_parser_omp_clause_use_device_addr): New function.
1451 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR.
1452 (OMP_TARGET_DATA_CLAUSE_MASK): Add PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR.
1453 (c_parser_omp_target_data): Handle PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR
1454 like PRAGMA_OMP_CLAUSE_USE_DEVICE_PTR, adjust diagnostics about no
1455 map or use_device_* clauses.
1456 * c-typeck.c (c_finish_omp_clauses): For OMP_CLAUSE_USE_DEVICE_PTR
1457 in OpenMP, require pointer type rather than pointer or array type.
1458 Handle OMP_CLAUSE_USE_DEVICE_ADDR.
1459
a28351e7
JJ
14602019-07-31 Jakub Jelinek <jakub@redhat.com>
1461
1462 PR c/91192
1463 * c-parser.c (c_parser_sizeof_expression): Call set_c_expr_source_range
1464 even if finish is UNKNOWN_LOCATION, just use start as finish in that
1465 case.
1466
6343b6bf
ML
14672019-07-25 Martin Liska <mliska@suse.cz>
1468 Dominik Infuhr <dominik.infuehr@theobroma-systems.com>
1469
1470 PR c++/23383
1471 * c-decl.c (merge_decls): Merge OPERATOR_DELETE flag.
1472
cb50701e
ML
14732019-07-25 Martin Liska <mliska@suse.cz>
1474
1475 * c-decl.c (merge_decls): Use new macros
1476 (e.g. DECL_SET_LAMBDA_FUNCTION and DECL_LAMBDA_FUNCTION_P).
1477
62e3e66f
RB
14782019-07-23 Richard Biener <rguenther@suse.de>
1479
1480 PR tree-optimization/83518
1481 * gimple-parser.c (c_parser_parse_gimple_body): When we have
1482 a CFG also rebuild cgraph edges.
1483
554a530f
JJ
14842019-07-20 Jakub Jelinek <jakub@redhat.com>
1485
1486 * c-parser.c (c_parser_omp_clause_name): Handle bind clause.
1487 (c_parser_omp_clause_bind): New function.
1488 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_BIND.
1489 (OMP_LOOP_CLAUSE_MASK): Define.
1490 (c_parser_omp_loop): New function.
1491 (c_parser_omp_parallel, c_parser_omp_teams): Handle parsing of
1492 loop combined with parallel or teams.
1493 (c_parser_omp_construct): Handle PRAGMA_OMP_LOOP.
1494 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_BIND.
1495
d119bf79
RS
14962019-07-18 Richard Sandiford <richard.sandiford@arm.com>
1497
1498 PR c/53633
1499 * c-decl.c (finish_function): Check targetm.warn_func_return
1500 before issuing a -Wreturn-type warning.
1501
ab20d992 15022019-07-12 Alexandre Oliva <oliva@adacore.com>
fdc1f343
AO
1503
1504 * gimple-parser.c (c_parser_gimple_try_stmt): New.
1505 (c_parser_compound_statement): Call it.
1506
1fdd6f04
JJ
15072019-07-12 Jakub Jelinek <jakub@redhat.com>
1508
1509 * c-parser.c (c_parser_omp_clause_name): Handle order clause.
1510 (c_parser_omp_clause_order): New function.
1511 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_ORDER.
1512 (OMP_SIMD_CLAUSE_MASK, OMP_FOR_CLAUSE_MASK): Add
1513 PRAGMA_OMP_CLAUSE_ORDER.
1514 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_ORDER.
1515
8389386c
RB
15162019-07-10 Richard Biener <rguenther@suse.de>
1517
1518 * gimple-parser.c (c_parser_gimple_postfix_expression): Support
1519 _Literal (int *) &x for address literals.
1520
99b1c316
MS
15212019-07-09 Martin Sebor <msebor@redhat.com>
1522
1523 PR c++/61339
1524 * c-decl.c (xref_tag): Change class-key of PODs to struct and others
1525 to class.
1526 (field_decl_cmp): Same.
1527 * c-parser.c (c_parser_struct_or_union_specifier): Same.
1528 * c-tree.h: Same.
1529 * gimple-parser.c (c_parser_gimple_compound_statement): Same.
1530
6c1dae73
MS
15312019-07-09 Martin Sebor <msebor@redhat.com>
1532
1533 PR c++/61339
1534 * c-decl.c: Change class-key from class to struct and vice versa
1535 to match convention and avoid -Wclass-is-pod and -Wstruct-no-pod.
1536 * gimple-parser.c: Same.
1537
69b5279e
RB
15382019-07-01 Richard Biener <rguenther@suse.de>
1539
1540 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
1541 _Literal (char *) &"foo" for address literals pointing to
1542 STRING_CSTs.
1543
ab20d992
JJ
15442019-06-25 Jozef Lawrynowicz <jozef.l@mittosystems.com>
1545
1546 * c-parser.c (c_parse_init): Create keyword for "__intN__" type.
1547 * c-decl.c (declspecs_add_type): Don't pedwarn about "__intN" ISO
1548 C incompatibility if alternate "__intN__" form is used.
1549
1e3d475e
MS
15502019-06-24 Martin Sebor <msebor@redhat.com>
1551
1552 * c-typeck.c (build_binary_op): Hyphenate floating-point.
1553
bf38f7e9
JJ
15542019-06-10 Jakub Jelinek <jakub@redhat.com>
1555
1556 * c-parser.c (c_parser_pragma): Reject PRAGMA_OMP_SCAN.
1557 (c_parser_omp_clause_reduction): Don't sorry_at on inscan reductions.
1558 (c_parser_omp_scan_loop_body): New function.
1559 (c_parser_omp_for_loop): Call c_parser_omp_scan_loop_body if there are
1560 inscan reduction clauses.
1561 * c-typeck.c (c_finish_omp_clauses): Reject mixing inscan with
1562 non-inscan reductions on the same construct, or inscan reductions with
1563 ordered or schedule clauses, or inscan array reductions.
1564
65985d78
MS
15652019-06-05 Martin Sebor <msebor@redhat.com>
1566
1567 PR c/90737
1568 * c-typeck.c (c_finish_return): Only consider functions returning
1569 pointers as candidates for -Wreturn-local-addr.
1570
0ecf545c
MS
15712019-06-05 Martin Sebor <msebor@redhat.com>
1572
1573 * c-decl.c (start_decl): Adjust quoting and hyphenation
1574 in diagnostics.
1575 (finish_decl): Same.
1576 (finish_enum): Same.
1577 (start_function): Same.
1578 (declspecs_add_type): Same.
1579 * c-parser.c (warn_for_abs): Same.
1580 * c-typeck.c (build_binary_op): Same.
1581
e03436e7
TS
15822019-05-17 Thomas Schwinge <thomas@codesourcery.com>
1583
b48f44bf
TS
1584 PR c/89433
1585 * c-parser.c (c_finish_oacc_routine): Rework checking if already
1586 marked with an OpenACC 'routine' directive.
1587
5bf04509
TS
1588 PR c/89433
1589 * c-parser.c (c_parser_oacc_routine): Normalize order of clauses.
1590 (c_finish_oacc_routine): Call oacc_verify_routine_clauses.
1591
e03436e7
TS
1592 PR c/89433
1593 * c-parser.c (c_finish_oacc_routine): Refer to OpenACC 'routine'
1594 clauses from "omp declare target" attribute.
1595
a9c697b8
MS
15962019-05-16 Martin Sebor <msebor@redhat.com>
1597
ab20d992
JJ
1598 * c-decl.c (start_decl): Quote keywords, operators, and
1599 types in diagnostics.
1600 (finish_decl): Same.
1601 * c-parser.c (c_parser_asm_statement): Same.
1602 (c_parser_conditional_expression): Same.
1603 (c_parser_transaction_cancel): Same.
1604 * c-typeck.c (c_common_type): Same.
1605 (build_conditional_expr): Same.
1606 (digest_init): Same.
1607 (process_init_element): Same.
1608 (build_binary_op): Same.
a9c697b8 1609
c4499192
RB
16102019-05-17 Richard Biener <rguenther@suse.de>
1611
1612 * gimple-parser.c (c_parser_gimple_statement): Handle __VEC_PERM.
1613 (c_parser_gimple_unary_expression): Likewise.
1614 (c_parser_gimple_parentized_ternary_expression): New function.
1615
adfe6e4b
RB
16162019-05-16 Richard Biener <rguenther@suse.de>
1617
1618 * gimple-parser.c (c_parser_gimple_statement): Handle __BIT_INSERT.
1619 (c_parser_gimple_unary_expression): Likewise.
1620
186dabf2
RB
16212019-05-15 Richard Biener <rguenther@suse.de>
1622
1623 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
1624 __BIT_FIELD_REF.
1625
1158c5b4
RB
16262019-05-14 Richard Biener <rguenther@suse.de>
1627
1628 * gimple-parser.c (c_parser_gimple_statement): Remove
1629 questionable auto-promotion to VIEW_CONVERT_EXPR.
1630 (c_parser_gimple_typespec): Split out from __MEM parsing.
1631 (c_parser_gimple_postfix_expression): Handle __VIEW_CONVERT.
1632 * tree-pretty-print.c (dump_generic_node): Dump VIEW_CONVERT_EXPR
1633 as __VIEW_CONVERT with -gimple.
1634
fd4485aa
ML
16352019-05-09 Martin Liska <mliska@suse.cz>
1636
1637 * gimple-parser.c (c_parser_gimple_statement): Support __MIN and
1638 __MAX.
1639 (c_parser_gimple_unary_expression): Parse also binary expression
1640 __MIN and __MAX.
1641 (c_parser_gimple_parentized_binary_expression): New function.
1642
d276406a
ML
16432019-05-09 Martin Liska <mliska@suse.cz>
1644
1645 * gimple-parser.c (struct gimple_parser): Add probability.
1646 for gimple_parser_edge.
1647 (gimple_parser::push_edge): Add new argument probability.
1648 (c_parser_gimple_parse_bb_spec): Parse also probability
1649 if present.
1650 (c_parser_parse_gimple_body): Set edge probability.
1651 (c_parser_gimple_compound_statement): Consume token
1652 before calling c_parser_gimple_goto_stmt.
1653 Parse BB counts.
1654 (c_parser_gimple_statement): Pass new argument.
1655 (c_parser_gimple_goto_stmt): Likewise.
1656 (c_parser_gimple_if_stmt): Likewise.
1657 (c_parser_gimple_or_rtl_pass_list): Parse hot_bb_threshold.
1658 * c-parser.c (c_parser_declaration_or_fndef): Pass
1659 hot_bb_threshold argument.
1660 * c-tree.h (struct c_declspecs): Add hot_bb_threshold
1661 field.
1662 (c_parser_gimple_parse_bb_spec_edge_probability): New.
1663
f179b64e
JJ
16642019-04-26 Jakub Jelinek <jakub@redhat.com>
1665
1666 PR debug/90197
1667 * c-tree.h (c_finish_loop): Add 2 further location_t arguments.
1668 * c-parser.c (c_parser_while_statement): Adjust c_finish_loop caller.
1669 (c_parser_do_statement): Likewise.
1670 (c_parser_for_statement): Likewise. Formatting fixes.
1671 * c-typeck.c (c_finish_loop): Add COND_LOCUS and INCR_LOCUS arguments,
1672 emit DEBUG_BEGIN_STMTs if needed.
1673
e7178413
JJ
16742019-04-19 Jakub Jelinek <jakub@redhat.com>
1675
c280b7ee
JJ
1676 PR c/89888
1677 * c-typeck.c (struct c_switch): Remove outside_range_p member.
1678 (c_start_case): Don't clear it.
1679 (do_case): Adjust c_add_case_label caller.
1680 (c_finish_case): Adjust c_do_switch_warnings caller.
1681
e7178413
JJ
1682 PR c++/90108
1683 * c-decl.c (merge_decls): If remove is main variant and
1684 DECL_ORIGINAL_TYPE is some other type, remove a DECL_ORIGINAL_TYPE
1685 variant that has newdecl as TYPE_NAME if any.
1686
60a2c645
JJ
16872019-04-12 Jakub Jelinek <jakub@redhat.com>
1688
1689 PR c/89933
1690 * c-decl.c (merge_decls): When newdecl's type is its main variant,
1691 don't try to remove it from the variant list, but instead assert
1692 it has no variants.
1693
2a82beaa
RB
16942019-04-01 Richard Biener <rguenther@suse.de>
1695
1696 PR c/71598
1697 * c-tree.h (c_get_alias_set): Declare.
1698 * c-objc-common.h (LANG_HOOKS_GET_ALIAS_SET): Use c_get_alias_set.
1699 * c-objc-common.c (c_get_alias_set): Treat enumeral types
1700 as the underlying integer type.
1701
bec1da64
MS
17022019-03-19 Martin Sebor <msebor@redhat.com>
1703
1704 PR tree-optimization/89688
1705 * c-decl.c (finish_decl): Call braced_lists_to_string for more
1706 kinds of initializers.
1707
855cd9b1
JJ
17082019-03-19 Jakub Jelinek <jakub@redhat.com>
1709
1710 PR c/89734
1711 * c-decl.c (grokdeclarator): Call c_build_qualified_type on function
1712 return type even if quals_used is 0. Formatting fixes.
1713
baa09dc5
RB
17142019-03-14 Richard Biener <rguenther@suse.de>
1715
1716 * c-tree.h (enum c_declspec_il): New.
1717 (struct c_declspecs): Merge gimple_p and rtl_p into declspec_il
1718 enum bitfield.
1719 * c-parser.c (c_parser_declaration_or_fndef): Adjust accordingly.
1720 Pass start pass and declspec_il to c_parser_parse_gimple_body.
1721 (c_parser_declspecs): Adjust.
1722 * gimple-parser.c: Include cfg.h, cfghooks.h, cfganal.h, tree-cfg.h,
1723 gimple-iterator.h, cfgloop.h, tree-phinodes.h, tree-into-ssa.h
1724 and bitmap.h.
1725 (struct gimple_parser): New.
1726 (gimple_parser::push_edge): New method.
1727 (c_parser_gimple_parse_bb_spec): New helper.
1728 (c_parser_parse_gimple_body): Get start pass and IL specification.
1729 Initialize SSA and CFG.
1730 (c_parser_gimple_compound_statement): Handle CFG and SSA build.
1731 Build a gimple_parser parsing state and pass it along.
1732 (c_parser_gimple_statement): Change intermittend __PHI internal
1733 function argument for the edge.
1734 (c_parser_gimple_or_rtl_pass_list): Handle ssa, cfg flags.
1735 (c_parser_gimple_goto_stmt): Record edges to build.
1736 (c_parser_gimple_if_stmt): Likewise.
1737 * gimple-parser.h (c_parser_parse_gimple_body): Adjust.
1738 (c_parser_gimple_or_rtl_pass_list): Likewise.
1739
a3f9f006
ML
17402019-03-11 Martin Liska <mliska@suse.cz>
1741
1742 * c-decl.c (check_for_loop_decls): Wrap an option name
1743 in a string format message and fix GNU coding style.
1744 * c-parser.c (c_parser_declspecs): Likewise.
1745
1db01ff9
JJ
17462019-03-08 Jakub Jelinek <jakub@redhat.com>
1747
1748 PR tree-optimization/89550
1749 * c-decl.c (finish_function): Only set TREE_NO_WARNING if warning_at
1750 returned true.
1751 (c_write_global_declarations_1): Only set TREE_NO_WARNING if pedwarn
1752 or warning returned true.
1753
66dcb747
JJ
17542019-02-28 Jakub Jelinek <jakub@redhat.com>
1755
1756 PR c/89525
1757 * c-typeck.c (convert_arguments): Call inform_declaration only if
1758 the previous warning_at call returned true.
1759
2263c9f2
TS
17602019-02-22 Thomas Schwinge <thomas@codesourcery.com>
1761
1762 * c-parser.c (c_parser_oacc_shape_clause): Add loc formal
1763 parameter. Adjust all users.
1764 (c_parser_oacc_simple_clause): Replace parser with loc formal
1765 parameter. Adjust all users.
1766
ab20d992 17672019-02-19 Chung-Lin Tang <cltang@codesourcery.com>
19695f4d
CLT
1768
1769 PR c/87924
1770 * c-parser.c (c_parser_oacc_clause_wait): Add representation of wait
1771 clause without argument as 'wait (GOMP_ASYNC_NOVAL)', adjust comments.
1772
5f88ba10
JJ
17732019-02-15 Jakub Jelinek <jakub@redhat.com>
1774
1775 PR c/89340
1776 * c-decl.c (start_function): Clear TREE_PUBLIC on nested functions
1777 before c_decl_attributes rather than after it.
1778
cfc30fd1
JJ
17792019-02-06 Jakub Jelinek <jakub@redhat.com>
1780
1781 PR c/89211
1782 * c-parser.c (c_parser_declaration_or_fndef): Don't update
1783 DECL_ARGUMENTS of d if it has been defined already. Use a single if
1784 instead of 3 nested ifs.
1785
fbe83e6b
JM
17862019-02-06 Joseph Myers <joseph@codesourcery.com>
1787
1788 PR c/88584
1789 * c-decl.c (finish_decl): Do not complete array types for arrays
1790 with external linkage not at file scope.
1791
f461f938
RB
17922019-02-05 Richard Biener <rguenther@suse.de>
1793
1794 PR c/88606
1795 * c-decl.c (finish_struct): Reset TYPE_TRANSPARENT_AGGR on
1796 all type variants when not supported.
1797
fe509359
JJ
17982019-01-30 Jakub Jelinek <jakub@redhat.com>
1799
1800 PR c/89061
1801 * c-tree.h (C_DECL_COMPOUND_LITERAL_P): Define.
1802 * c-decl.c (decl_jump_unsafe): Return false for
1803 C_DECL_COMPOUND_LITERAL_P decls.
1804 (build_compound_literal): Set C_DECL_COMPOUND_LITERAL_P.
1805
6a335b96
JJ
18062019-01-29 Jakub Jelinek <jakub@redhat.com>
1807
f4b7e754
JJ
1808 PR c/89045
1809 * c-decl.c (build_compound_literal): Don't pushdecl if in parameter
1810 scope.
1811
6a335b96
JJ
1812 PR c/86125
1813 * c-decl.c (last_fileptr_type): Remove.
1814 (last_structptr_types): New variable.
1815 (match_builtin_function_types): Compare TYPE_MAIN_VARIANT of
1816 {old,new}rettype instead of the types themselves. Assert
1817 last_structptr_types array has the same number of elements
1818 as builtin_structptr_types array. Use TYPE_MAIN_VARIANT for
1819 argument oldtype and newtype. Instead of handling
1820 just fileptr_type_node specially, handle all builtin_structptr_types
1821 pointer nodes. Formatting fix.
1822
d8b5a1a0
MS
18232019-01-24 Martin Sebor <msebor@redhat.com>
1824
1825 PR c/86125
1826 PR c/88886
1827 PR middle-end/86308
1828 * c-decl.c (match_builtin_function_types): Add arguments.
1829 (diagnose_mismatched_decls): Diagnose mismatched declarations
1830 of built-ins more strictly.
1831
e21c4491
JJ
18322019-01-24 Jakub Jelinek <jakub@redhat.com>
1833
1834 PR c++/88976
1835 * c-typeck.c (c_finish_omp_cancel): Diagnose more than one if
1836 on #pragma omp cancel with different modifiers.
1837
420183d9
L
18382019-01-18 H.J. Lu <hongjiu.lu@intel.com>
1839
1840 PR c/51628
1841 PR c/88664
1842 * c-typeck.c (convert_for_assignment): Upate the
1843 warn_for_address_or_pointer_of_packed_member call.
1844
17ad43dd
TH
18452019-01-16 Tom Honermann <tom@honermann.net>
1846 Jason Merrill <jason@redhat.com>
1847
1848 * c-typeck.c (digest_init): Revised the error message produced for
1849 ill-formed cases of array initialization with a string literal.
1850 (error_init): Make variadic.
1851
5f07d78a
JJ
18522019-01-12 Jakub Jelinek <jakub@redhat.com>
1853
1854 * c-typeck.c (convert_for_assignment): Fix a comment typo.
1855
c4581bbf
JJ
18562019-01-07 Jakub Jelinek <jakub@redhat.com>
1857
1858 PR c/88701
1859 * c-decl.c (build_compound_literal): If not TREE_STATIC, only pushdecl
1860 if current_function_decl is non-NULL.
1861
65c5b1eb
JM
18622019-01-07 Joseph Myers <joseph@codesourcery.com>
1863
1864 PR c/88720
1865 PR c/88726
1866 * c-decl.c (pop_scope): Use TREE_PUBLIC and b->nested to determine
1867 whether a function is nested, not DECL_EXTERNAL. Diagnose inline
1868 functions declared but never defined only for external scope, not
1869 for other scopes.
1870
d8fcab68
JJ
18712019-01-07 Jakub Jelinek <jakub@redhat.com>
1872
1873 PR c++/85052
1874 * c-parser.c (c_parser_postfix_expression): Parse
1875 __builtin_convertvector.
1876
a5544970
JJ
18772019-01-01 Jakub Jelinek <jakub@redhat.com>
1878
1879 Update copyright years.
1880
da77eace
L
18812018-12-20 H.J. Lu <hongjiu.lu@intel.com>
1882
1883 PR c/51628
1884 * c-typeck.c (convert_for_assignment): Call
1885 warn_for_address_or_pointer_of_packed_member.
1886
1edf8866
SB
18872018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
1888
1889 * c-parser.c (c_parser_asm_statement) <RID_CONST, RID_RESTRICT>: Give
1890 a more specific error message (instead of just falling through).
1891
db4fd626
SB
18922018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
1893
1894 * c-parser.c (c_parser_asm_statement): Keep track of the location each
1895 asm qualifier is first seen; use that to give nicer "duplicate asm
1896 qualifier" messages. Delete 'quals" variable, instead pass the
1897 "is_volatile_ flag to build_asm_stmt directly.
1898 * c-tree.h (build_asm_stmt): Make the first arg bool instead of tree.
1899 * c-typeck.c (build_asm_stmt): Ditto; adjust.
1900
9c9cfcbb
SB
19012018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
1902
1903 * c-parser.c (c_parser_asm_statement): Rewrite the loop to work without
1904 "done" boolean variable.
1905
a14feb3c
DM
19062018-12-19 David Malcolm <dmalcolm@redhat.com>
1907
1908 PR c++/87504
1909 * c-typeck.c (class maybe_range_label_for_tree_type_mismatch):
1910 Move from here to gcc-rich-location.h and gcc-rich-location.c.
1911 (build_binary_op): Use struct op_location_t and
1912 class binary_op_rich_location.
1913
6d939173
JJ
19142018-12-11 Jakub Jelinek <jakub@redhat.com>
1915
1916 PR sanitizer/88426
1917 * c-convert.c (convert): Call c_fully_fold before calling
1918 ubsan_instrument_float_cast.
1919
b7055028
SB
19202018-12-08 Segher Boessenkool <segher@kernel.crashing.org>
1921
1922 * c-parser (c_parser_asm_statement) [RID_INLINE]: Delete stray line
1923 setting "quals".
1924
5b76e75f
SB
19252018-12-06 Segher Boessenkool <segher@kernel.crashing.org>
1926
1927 * c-parser.c (c_parser_asm_statement): Detect the inline keyword
1928 after asm. Pass a flag for it to build_asm_expr.
1929 * c-tree.h (build_asm_expr): Update declaration.
1930 * c-typeck.c (build_asm_stmt): Add is_inline parameter. Use it to
1931 set ASM_INLINE_P.
1932
30bd42b9
SB
19332018-12-06 Segher Boessenkool <segher@kernel.crashing.org>
1934
1935 PR inline-asm/55681
1936 * c-parser.c (c_parser_asm_statement): Update grammar. Allow any
1937 combination of volatile and goto, in any order, without repetitions.
1938
9df6c0e4
JB
19392018-12-04 James Norris <jnorris@codesourcery.com>
1940 Cesar Philippidis <cesar@codesourcery.com>
1941 Julian Brown <julian@codesourcery.com>
1942
1943 * c-parser.c (c_parser_oacc_wait_list): Remove dead diagnostic
1944 code.
1945
f44697b7
RB
19462018-11-30 Richard Biener <rguenther@suse.de>
1947
1948 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
1949 _Literal (type) { ... } as empty aggregate or vector constructor.
1950
550dfbdc
MS
19512018-11-29 Martin Sebor <msebor@redhat.com>
1952
1953 PR c/88091
1954 * c-typeck.c (convert_argument): Add a parameter. Adjust indentation.
1955 (convert_arguments): Add comments. Pass additional argument to
1956 the function above.
1957
673670da
MS
19582018-11-29 Martin Sebor <msebor@redhat.com>
1959
1960 PR c/88172
1961 PR testsuite/88208
1962 * c-decl.c (declspec_add_alignas): Adjust call to check_user_alignment.
1963
db1d09b0
MS
19642018-11-23 Martin Sebor <msebor@redhat.com>
1965
1966 PR testsuite/88098
1967 * c-typeck.c (convert_arguments): Call builtin_decl_explicit instead.
1968 (maybe_warn_builtin_no_proto_arg): Handle short enum to int promotion.
1969
98f08eb8
MS
19702018-11-20 Martin Sebor <msebor@redhat.com>
1971
1972 * c-parser.c (c_parser_has_attribute_expression): New function.
1973 (c_parser_attribute): New function.
1974 (c_parser_attributes): Move code into c_parser_attribute.
1975 (c_parser_unary_expression): Handle RID_HAS_ATTRIBUTE_EXPRESSION.
1976
cd5da983
MS
19772018-11-15 Martin Sebor <msebor@redhat.com>
1978
1979 PR c/83656
1980 * c-decl.c (header_for_builtin_fn): Declare.
1981 (diagnose_mismatched_decls): Diagnose declarations of built-in
1982 functions without a prototype.
1983 * c-typeck.c (maybe_warn_builtin_no_proto_arg): New function.
1984 (convert_argument): Same.
1985 (convert_arguments): Factor code out into convert_argument.
1986 Detect mismatches between built-in formal arguments in calls
1987 to built-in without prototype.
1988 (build_conditional_expr): Same.
1989 (type_or_builtin_type): New function.
1990 (convert_for_assignment): Add argument. Conditionally issue
1991 warnings instead of errors for mismatches.
1992
620e594b
DM
19932018-11-13 David Malcolm <dmalcolm@redhat.com>
1994
1995 * c-decl.c: Replace "source_location" with "location_t".
1996 * c-tree.h: Likewise.
1997 * c-typeck.c: Likewise.
1998 * gimple-parser.c: Likewise.
1999
3179ebae
JJ
20002018-11-09 Jakub Jelinek <jakub@redhat.com>
2001
81a227c6
JJ
2002 * c-parser.c (c_parser_omp_clause_final): Use
2003 c_parser_expr_no_commas, convert_lvalue_to_rvalue,
2004 c_objc_common_truthvalue_conversion, c_fully_fold and parentheses
2005 parsing instead of c_parser_paren_condition.
2006 (c_parser_omp_clause_if): Use c_parser_expr_no_commas,
2007 convert_lvalue_to_rvalue, c_objc_common_truthvalue_conversion and
2008 c_fully_fold instead of c_parser_condition.
2009 (c_parser_omp_clause_num_threads, c_parser_omp_clause_num_tasks,
2010 c_parser_omp_clause_grainsize, c_parser_omp_clause_priority,
2011 c_parser_omp_clause_hint, c_parser_omp_clause_num_teams,
2012 c_parser_omp_clause_thread_limit, c_parser_omp_clause_linear): Use
2013 c_parser_expr_no_commas instead of c_parser_expression.
2014
98c91c56
JJ
2015 * c-parser.c (c_parser_omp_clause_reduction): Call sorry_at on
2016 reduction clause with inscan modifier.
2017
3179ebae
JJ
2018 * c-parser.c (c_parser_omp_requires): Call sorry_at on requires
2019 clauses other than atomic_default_mem_order.
2020
28567c40
JJ
20212018-11-08 Jakub Jelinek <jakub@redhat.com>
2022
2023 * c-parser.c: Include memmode.h.
2024 (c_parser_omp_depobj, c_parser_omp_requires): New functions.
2025 (c_parser_pragma): Handle PRAGMA_OMP_DEPOBJ and PRAGMA_OMP_REQUIRES.
2026 (c_parser_omp_clause_name): Handle nontemporal, in_reduction and
2027 task_reduction clauses.
2028 (c_parser_omp_variable_list): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION.
2029 For OMP_CLAUSE_DEPEND, parse clause operands as either an array
2030 section, or lvalue assignment expression.
2031 (c_parser_omp_clause_if): Handle cancel and simd modifiers.
2032 (c_parser_omp_clause_lastprivate): Parse optional
2033 conditional: modifier.
2034 (c_parser_omp_clause_hint): Require constant integer expression rather
2035 than just integer expression.
2036 (c_parser_omp_clause_defaultmap): Parse new kinds of defaultmap
2037 clause.
2038 (c_parser_omp_clause_reduction): Add IS_OMP and KIND arguments.
2039 Parse reduction modifiers. Pass KIND to c_parser_omp_variable_list.
2040 (c_parser_omp_clause_nontemporal, c_parser_omp_iterators): New
2041 functions.
2042 (c_parser_omp_clause_depend): Parse iterator modifier and handle
2043 iterators. Parse mutexinoutset and depobj kinds.
2044 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_reduction
2045 callers.
2046 (c_parser_omp_all_clauses): Likewise. Handle
2047 PRAGMA_OMP_CLAUSE_NONTEMPORAL and
2048 PRAGMA_OMP_CLAUSE_{IN,TASK}_REDUCTION.
2049 (c_parser_omp_atomic): Parse hint and memory order clauses. Handle
2050 default memory order from requires directive if any. Adjust
2051 c_finish_omp_atomic caller.
2052 (c_parser_omp_critical): Allow comma in between (name) and hint clause.
2053 (c_parser_omp_flush): Parse flush with memory-order-clause.
2054 (c_parser_omp_for_loop): Allow NE_EXPR even in
2055 OpenMP loops, adjust c_finish_omp_for caller.
2056 (OMP_SIMD_CLAUSE_MASK): Add if and nontemporal clauses.
2057 (c_parser_omp_master): Add p_name, mask and cclauses arguments.
2058 Allow to be called while parsing combined parallel master.
2059 Parse combined master taskloop{, simd}.
2060 (c_parser_omp_parallel): Parse combined
2061 parallel master{, taskloop{, simd}} constructs.
2062 (OMP_TASK_CLAUSE_MASK): Add in_reduction clause.
2063 (OMP_TASKGROUP_CLAUSE_MASK): Define.
2064 (c_parser_omp_taskgroup): Add LOC argument. Parse taskgroup clauses.
2065 (OMP_TASKWAIT_CLAUSE_MASK): Define.
2066 (c_parser_omp_taskwait): Handle taskwait with depend clauses.
2067 (c_parser_omp_teams): Force a BIND_EXPR with BLOCK
2068 around teams body. Use SET_EXPR_LOCATION.
2069 (c_parser_omp_target_data): Allow target data
2070 with only use_device_ptr clauses.
2071 (c_parser_omp_target): Use SET_EXPR_LOCATION. Set
2072 OMP_REQUIRES_TARGET_USED bit in omp_requires_mask.
2073 (c_parser_omp_requires): New function.
2074 (c_finish_taskloop_clauses): New function.
2075 (OMP_TASKLOOP_CLAUSE_MASK): Add reduction and in_reduction clauses.
2076 (c_parser_omp_taskloop): Use c_finish_taskloop_clauses. Add forward
2077 declaration. Disallow in_reduction clause when combined with parallel
2078 master.
2079 (c_parser_omp_construct): Adjust c_parser_omp_master and
2080 c_parser_omp_taskgroup callers.
2081 * c-typeck.c (c_finish_omp_cancel): Diagnose if clause with modifier
2082 other than cancel.
2083 (handle_omp_array_sections_1): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION
2084 like OMP_CLAUSE_REDUCTION.
2085 (handle_omp_array_sections): Likewise. Call save_expr on array
2086 reductions before calling build_index_type. Handle depend clauses
2087 with iterators.
2088 (struct c_find_omp_var_s): New type.
2089 (c_find_omp_var_r, c_omp_finish_iterators): New functions.
2090 (c_finish_omp_clauses): Don't diagnose nonmonotonic clause
2091 with static, runtime or auto schedule kinds. Call save_expr for whole
2092 array reduction sizes. Diagnose reductions with zero sized elements
2093 or variable length structures. Diagnose nogroup clause used with
2094 reduction clause(s). Handle depend clause with
2095 OMP_CLAUSE_DEPEND_DEPOBJ. Diagnose bit-fields. Require
2096 omp_depend_t type for OMP_CLAUSE_DEPEND_DEPOBJ kinds and
2097 some different type for other kinds. Use build_unary_op with
2098 ADDR_EXPR and build_indirect_ref instead of c_mark_addressable.
2099 Handle depend clauses with iterators. Remove no longer needed special
2100 case that predetermined const qualified vars may be specified in
2101 firstprivate clause. Complain if const qualified vars are mentioned
2102 in data-sharing clauses other than firstprivate or shared. Use
2103 error_at with OMP_CLAUSE_LOCATION (c) as first argument instead of
2104 error. Formatting fix. Handle OMP_CLAUSE_NONTEMPORAL and
2105 OMP_CLAUSE_{IN,TASK}_REDUCTION. Allow any lvalue as
2106 OMP_CLAUSE_DEPEND operand (besides array section), adjust diagnostics.
2107
7e2de6df
DM
21082018-10-29 David Malcolm <dmalcolm@redhat.com>
2109
2110 * c-decl.c (implicit_decl_warning): Update "is there a suggestion"
2111 logic for change to name_hint::operator bool.
2112 (undeclared_variable): Likewise.
2113 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
2114 (c_parser_parameter_declaration): Likewise.
2115
9f936c86
JM
21162018-10-17 Joseph Myers <joseph@codesourcery.com>
2117
2118 * c-errors.c (pedwarn_c11): New function.
2119 * c-parser.c (disable_extension_diagnostics): Save
2120 warn_c11_c2x_compat and set it to 0.
2121 (restore_extension_diagnostics): Restore warn_c11_c2x_compat.
2122 (c_parser_static_assert_declaration_no_semi): Handle
2123 _Static_assert without string constant.
2124 * c-tree.h (pedwarn_c11): New prototype.
2125
033eb567
DM
21262018-10-17 David Malcolm <dmalcolm@redhat.com>
2127
2128 * Make-lang.in (selftest-c): New.
2129 (C_SELFTEST_FLAGS, C_SELFTEST_DEPS, s-selftest-c, selftest-c-gdb)
2130 (selftest-gdb, selftest-c-valgrind, selftest-valgrind): Move here
2131 from gcc/Makefile.in.
2132
0edf3afe
RB
21332018-10-02 Richard Biener <rguenther@suse.de>
2134
2135 * c-decl.c (warn_if_shadowing): Do not test DECL_FROM_INLINE.
2136
8313a764
JM
21372018-09-26 Joseph Myers <joseph@codesourcery.com>
2138
2139 PR c/87390
2140 * c-typeck.c (build_binary_op): Use excess precision for
2141 comparisons of integers and floating-point for C11 and later.
2142
ce6f0888
MJ
21432018-09-26 Martin Jambor <mjambor@suse.cz>
2144
2145 PR c/87347
2146 * c-parser.c (warn_for_abs): Bail out if TYPE_ARG_TYPES is NULL. Fix
ab20d992 2147 comment.
ce6f0888 2148
9c4a4b3c
DM
21492018-09-17 David Malcolm <dmalcolm@redhat.com>
2150
2151 * c-objc-common.c (range_label_for_type_mismatch::get_text):
2152 Update for new param.
2153 * c-typeck.c (maybe_range_label_for_tree_type_mismatch::get_text):
2154 Likewise.
2155
80c6d1f4
MJ
21562018-09-17 Martin Jambor <mjambor@suse.cz>
2157
2158 PR c/63886
2159 * c-parser.c: (warn_for_abs): New function.
2160 (c_parser_postfix_expression_after_primary): Call it.
2161
4a426e36
BE
21622018-09-13 Bernd Edlinger <bernd.edlinger@hotmail.de>
2163
2164 * c-typeck.c (digest_init): Shorten overlength strings.
2165
6d900107
BE
21662018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
2167
2168 * c-decl.c (finish_decl): Call complete_flexible_array_elts.
2169
b5764229
BE
21702018-09-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
2171
2172 * c-decl.c (finish_decl): Call braced_list_to_string here ...
2173 * c-parser.c (c_parser_declaration_or_fndef): ... instead of here.
2174
22eea6b2
AM
21752018-08-30 Alexander Monakov <amonakov@ispras.ru>
2176
2177 * gimple-parser.c (c_parser_gimple_binary_expression): Accept infix
2178 "__MULT_HIGHPART" for MULT_HIGHPART_EXPR.
2179
85204e23
DM
21802018-08-27 David Malcolm <dmalcolm@redhat.com>
2181
2182 PR 87091
2183 * c-decl.c (implicitly_declare): Update call to
2184 maybe_add_include_fixit to suggest overriding the location, as it
2185 is for a note.
2186 * c-objc-common.c (c_tree_printer): Update for conversion of
2187 show_caret_p to a tri-state.
2188
3d78e008
ML
21892018-08-27 Martin Liska <mliska@suse.cz>
2190
2191 * c-decl.c (locate_old_decl): Use new function
92a285c1
ML
2192 fndecl_built_in_p and remove check for FUNCTION_DECL if
2193 possible.
3d78e008
ML
2194 (diagnose_mismatched_decls): Likewise.
2195 (merge_decls): Likewise.
2196 (warn_if_shadowing): Likewise.
2197 (pushdecl): Likewise.
2198 (implicitly_declare): Likewise.
2199 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
2200 * c-tree.h (C_DECL_ISNT_PROTOTYPE): Likewise.
2201 * c-typeck.c (build_function_call_vec): Likewise.
2202 (convert_arguments): Likewise.
2203
097f82ec
DM
22042018-08-20 David Malcolm <dmalcolm@redhat.com>
2205
2206 PR other/84889
2207 * c-decl.c (pushtag): Add auto_diagnostic_group instance.
2208 (diagnose_mismatched_decls): Likewise, in various places.
2209 (warn_if_shadowing): Likewise.
2210 (implicit_decl_warning): Likewise.
2211 (implicitly_declare): Likewise.
2212 (undeclared_variable): Likewise.
2213 (declare_label): Likewise.
2214 (grokdeclarator): Likewise.
2215 (start_function): Likewise.
2216 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
2217 (c_parser_parameter_declaration): Likewise.
2218 (c_parser_binary_expression): Likewise.
2219 * c-typeck.c (c_expr_sizeof_expr): Likewise.
2220 (parser_build_binary_op): Likewise.
2221 (build_unary_op): Likewise.
2222 (error_init): Likewise.
2223 (pedwarn_init): Likewise.
2224 (warning_init): Likewise.
2225 (convert_for_assignment): Likewise.
2226
96e6ae57
DM
22272018-08-15 David Malcolm <dmalcolm@redhat.com>
2228
2229 * c-objc-common.c: Include "gcc-rich-location.h".
2230 (c_tree_printer): Move implemenation of '%T' to...
2231 (print_type): ...this new function.
2232 (range_label_for_type_mismatch::get_text): New function.
2233 * c-typeck.c (convert_for_assignment): Add type labels to the rhs
2234 range for the various ic_argpass cases.
2235 (class maybe_range_label_for_tree_type_mismatch): New class.
2236 (build_binary_op): Use it when calling binary_op_error.
2237
0cd020ae 22382018-08-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
ab20d992 2239
0cd020ae
PK
2240 * c-decl.c (start_decl): Do not warn if variables is named as main
2241 and is a local variable.
2242
72733314
IS
22432018-08-15 Iain Sandoe <iain@sandoe.co.uk>
2244
2245 PR c/19315
2246 * c-decl.c (finish_decl): Don't add the 'extern' storage class to
2247 objects of unknown size.
2248
23aa9f7c
MS
22492018-08-13 Martin Sebor <msebor@redhat.com>
2250
2251 PR tree-optimization/71625
2252 * c-parser.c (c_parser_declaration_or_fndef): Call
2253 braced_list_to_string.
2254
e5e7e50d
BH
22552018-08-03 Bogdan Harjoc <harjoc@gmail.com>
2256
2257 PR c/86690
2258 * c-typeck.c (lookup_field): Do not use TYPE_LANG_SPECIFIC after
2259 errors.
2260
8a45b051
MS
22612018-08-01 Martin Sebor <msebor@redhat.com>
2262
2263 PR tree-optimization/86650
2264 * c-objc-common.c (c_tree_printer): Move usage of EXPR_LOCATION (t)
2265 and TREE_BLOCK (t) from within percent_K_format to this callsite.
2266
5922dcb5
JJ
22672018-08-01 Jakub Jelinek <jakub@redhat.com>
2268
2269 PR c/85704
2270 * c-typeck.c (init_field_decl_cmp): New function.
2271 (output_pending_init_elements): Use it for field comparisons
2272 instead of pure bit_position comparisons.
2273
9b452033
JJ
22742018-07-12 Jakub Jelinek <jakub@redhat.com>
2275
2276 * c-decl.c (c_decl_attributes): Don't diagnose vars without mappable
2277 type here, instead add "omp declare target implicit" attribute.
2278 (finish_decl): Diagnose vars without mappable type here.
2279
ab20d992
JJ
22802018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
2281 Thomas Schwinge <thomas@codesourcery.com>
829c6349
CLT
2282 Cesar Philippidis <cesar@codesourcery.com>
2283
2284 * c-parser.c (c_parser_omp_clause_name): Add support for finalize
2285 and if_present. Make present_or_{copy,copyin,copyout,create} aliases
2286 to their non-present_or_* counterparts. Make 'self' an alias to
2287 PRAGMA_OACC_CLAUSE_HOST.
2288 (c_parser_oacc_data_clause): Update GOMP mappings for
2289 PRAGMA_OACC_CLAUSE_{COPY,COPYIN,COPYOUT,CREATE,DELETE}. Remove
2290 PRAGMA_OACC_CLAUSE_{SELF,PRESENT_OR_*}.
2291 (c_parser_oacc_all_clauses): Handle finalize and if_present clauses.
2292 Remove support for present_or_* clauses.
2293 (OACC_KERNELS_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
2294 (OACC_PARALLEL_CLAUSE_MASK): Likewise.
2295 (OACC_DECLARE_CLAUSE_MASK): Likewise.
2296 (OACC_DATA_CLAUSE_MASK): Likewise.
2297 (OACC_ENTER_DATA_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
2298 (OACC_EXIT_DATA_CLAUSE_MASK): Add FINALIZE clause.
2299 (OACC_UPDATE_CLAUSE_MASK): Remove SELF, add IF_PRESENT.
2300 (c_parser_oacc_declare): Remove PRESENT_OR_* clauses.
2301 * c-typeck.c (c_finish_omp_clauses): Handle IF_PRESENT and FINALIZE.
2302
e197e64e
KV
23032018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
2304
2305 * c-typeck.c (build_unary_op): Handle ABSU_EXPR;
2306 * gimple-parser.c (c_parser_gimple_statement): Likewise.
2307 (c_parser_gimple_unary_expression): Likewise.
2308
487f2f61
JJ
23092018-06-15 Jakub Jelinek <jakub@redhat.com>
2310
2311 PR c/86093
2312 * c-typeck.c (pointer_diff): Cast both pointers to unqualified types
2313 before doing POINTER_DIFF_EXPR.
2314
e4d44a37
MP
23152018-06-07 Marek Polacek <polacek@redhat.com>
2316
2317 PR c/85318
2318 * c-decl.c (check_for_loop_decls): Add -Wc90-c99-compat warning about
2319 for loop initial declarations.
2320
b67b9225
DP
23212018-05-30 David Pagan <dave.pagan@oracle.com>
2322
2323 PR c/55976
2324 * c-decl.c (grokdeclarator): Update check for return type warnings.
2325 (start_function): Likewise.
2326 (finish_function): Likewise.
2327 * c-typeck.c (c_finish_return): Update check for return type warnings.
2328 Pass OPT_Wreturn_type to pedwarn when appropriate.
2329
c566cc9f
RS
23302018-05-18 Richard Sandiford <richard.sandiford@linaro.org>
2331
2332 * gimple-parser.c (c_parser_gimple_postfix_expression): Remove
2333 __FMA_EXPR handlng.
2334
e4f81565
RS
23352018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
2336
2337 * gimple-parser.c: Include internal-fn.h.
2338 (c_parser_gimple_statement): Treat a leading CPP_DOT as a call.
2339 (c_parser_gimple_call_internal): New function.
2340 (c_parser_gimple_postfix_expression): Use it to handle CPP_DOT.
2341 Fix typos in comment.
2342
79e7b1fe
JJ
23432018-05-10 Jakub Jelinek <jakub@redhat.com>
2344
2345 PR c++/85662
2346 * c-fold.c (c_fully_fold_internal): Use fold_offsetof rather than
2347 fold_offsetof_1, pass TREE_TYPE (expr) as TYPE to it and drop the
2348 fold_convert_loc.
2349 * c-typeck.c (build_unary_op): Use fold_offsetof rather than
2350 fold_offsetof_1, pass argtype as TYPE to it and drop the
2351 fold_convert_loc.
2352
f7584c81
DP
23532018-05-02 David Pagan <dave.pagan@oracle.com>
2354
2355 PR c/30552
2356 * c-decl.c (old_style_parameter_scope): New function.
2357 * c-parser.c (c_parser_postfix_expression): Check for statement
2358 expressions in old-style function parameter list declarations.
2359 * c-parser.h (old_style_parameter_scope): New extern declaration.
2360
b33a0cb3
JJ
23612018-04-25 Jakub Jelinek <jakub@redhat.com>
2362
2363 PR sanitizer/84307
2364 * c-decl.c (build_compound_literal): Call pushdecl (decl) even when
2365 it is not TREE_STATIC.
2366 * c-typeck.c (c_mark_addressable) <case COMPOUND_LITERAL_EXPR>: Mark
2367 not just the COMPOUND_LITERAL_EXPR node itself addressable, but also
2368 its COMPOUND_LITERAL_EXPR_DECL.
2369
c5c5822a
JM
23702018-03-21 Joseph Myers <joseph@codesourcery.com>
2371
2372 * c-parser.c (c_parser_postfix_expression): For __builtin_tgmath
2373 where all functions return the same _FloatN or _FloatNx type,
2374 treat integer types as _Float64 instead of double.
2375
aa1c9429
JJ
23762018-03-21 Jakub Jelinek <jakub@redhat.com>
2377
2378 PR c/84999
2379 * c-typeck.c (build_binary_op): If c_common_type_for_size fails when
2380 building vector comparison, diagnose it and return error_mark_node.
2381
9bb45a95
JJ
23822018-03-15 Jakub Jelinek <jakub@redhat.com>
2383
2384 PR c/84853
2385 * c-typeck.c (build_binary_op) <case RSHIFT_EXPR, case LSHIFT_EXPR>:
2386 If code1 is INTEGER_TYPE, only allow code0 VECTOR_TYPE if it has
2387 INTEGER_TYPE element type.
2388
ada6bad9
DP
23892018-03-13 David Pagan <dave.pagan@oracle.com>
2390
2391 PR c/46921
2392 * c-typeck.c (output_init_element): Ensure field initializer
2393 expression is always evaluated if there are side effects.
2394
849bbdb9
JJ
23952018-03-06 Jakub Jelinek <jakub@redhat.com>
2396
2397 PR c/84721
2398 * c-parser.c (add_debug_begin_stmt): Don't add DEBUG_BEGIN_STMT if
2399 !building_stmt_list_p ().
2400
d74641bd
RS
24012018-02-13 Richard Sandiford <richard.sandiford@linaro.org>
2402
2403 PR c/84305
2404 * c-decl.c (grokdeclarator): Create an anonymous TYPE_DECL
2405 in PARM and TYPENAME contexts too, but attach it to a BIND_EXPR
2406 and include the BIND_EXPR in the list of things that need to be
2407 pre-evaluated.
2408
0444aa9c
NS
24092018-02-09 Nathan Sidwell <nathan@acm.org>
2410
2411 PR c/84293
2412 * c-typeck.c (build_indirect_ref, build_c_cast): Pass expr location
2413 to strict_aliasing_warning.
2414
7c30b12a
PC
24152018-02-02 Paolo Carlini <paolo.carlini@oracle.com>
2416
2417 * c-typeck.c (really_start_incremental_init, push_init_level,
2418 set_nonincremental_init, output_init_element, process_init_element):
2419 Use DECL_UNNAMED_BIT_FIELD.
2420
2be4dfcb
MP
24212018-01-31 Marek Polacek <polacek@redhat.com>
2422
2423 PR c/81779
2424 * c-parser.c (c_parser_compound_statement_nostart): Call
2425 expansion_point_location_if_in_system_header.
2426
bb9869d5
DM
24272018-01-17 David Malcolm <dmalcolm@redhat.com>
2428
2429 PR c++/83814
2430 * c-fold.c (fold_for_warn): Move from c-common.c, reducing to just
2431 the C part.
2432
b4923738
JJ
24332018-01-13 Jakub Jelinek <jakub@redhat.com>
2434
2435 PR c/83801
2436 * c-tree.h (decl_constant_value_1): Add a bool argument.
2437 * c-typeck.c (decl_constant_value_1): Add IN_INIT argument, allow
2438 returning a CONSTRUCTOR if it is true. Use error_operand_p.
2439 (decl_constant_value): Adjust caller.
2440 * c-fold.c (c_fully_fold_internal): If in_init, pass true to
2441 decl_constant_value_1 as IN_INIT. Otherwise, punt if
2442 decl_constant_value returns initializer that has BLKmode or
2443 array type.
2444 (c_fully_fold_internal) <case COMPONENT_REF>: Fold if !lval.
2445
928686b1
RS
24462018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
2447 Alan Hayward <alan.hayward@arm.com>
2448 David Sherwood <david.sherwood@arm.com>
2449
2450 * c-typeck.c (comptypes_internal, build_binary_op): Handle polynomial
2451 TYPE_VECTOR_SUBPARTS.
2452
85ec4feb
JJ
24532018-01-03 Jakub Jelinek <jakub@redhat.com>
2454
2455 Update copyright years.
2456
913884f7
JJ
24572018-01-01 Jakub Jelinek <jakub@redhat.com>
2458
2459 PR c/83595
2460 * c-parser.c (c_parser_braced_init, c_parser_initelt,
2461 c_parser_conditional_expression, c_parser_cast_expression,
2462 c_parser_sizeof_expression, c_parser_alignof_expression,
2463 c_parser_postfix_expression, c_parser_omp_declare_reduction,
2464 c_parser_transaction_expression): Use set_error () method instead
2465 of setting value member to error_mark_node.
2466
c6cfa2bf
MM
24672017-12-28 Michael Meissner <meissner@linux.vnet.ibm.com>
2468
2469 * c-decl.c (header_for_builtin_fn): Add integer rounding _Float<N>
2470 and _Float<N>X built-in functions.
2471
11d29d63
JJ
24722017-12-22 Jakub Jelinek <jakub@redhat.com>
2473
14ec014e
JJ
2474 PR debug/83550
2475 * c-decl.c (finish_struct): Set DECL_SOURCE_LOCATION on
2476 TYPE_STUB_DECL and call rest_of_type_compilation before processing
2477 incomplete vars rather than after it.
2478
11d29d63
JJ
2479 PR debug/83547
2480 * c-typeck.c (c_finish_stmt_expr): Ignore !TREE_SIDE_EFFECTS as
2481 indicator of ({ }), instead skip all trailing DEBUG_BEGIN_STMTs first,
2482 and consider empty ones if there are no other stmts. For
2483 -Wunused-value walk all statements before the one only followed by
2484 DEBUG_BEGIN_STMTs.
2485
170a8bd6 24862017-12-22 Mike Stump <mikestump@comcast.net>
92a285c1 2487 Eric Botcazou <ebotcazou@adacore.com>
170a8bd6
EB
2488
2489 * c-parser.c (c_parser_while_statement): Add unroll parameter and
2490 build ANNOTATE_EXPR if present. Add 3rd operand to ANNOTATE_EXPR.
2491 (c_parser_do_statement): Likewise.
2492 (c_parser_for_statement): Likewise.
2493 (c_parser_statement_after_labels): Adjust calls to above.
2494 (c_parse_pragma_ivdep): New static function.
2495 (c_parser_pragma_unroll): Likewise.
2496 (c_parser_pragma) <PRAGMA_IVDEP>: Add support for pragma Unroll.
2497 <PRAGMA_UNROLL>: New case.
2498
01512446
JJ
24992017-12-19 Jakub Jelinek <jakub@redhat.com>
2500
2501 * c-typeck.c (comptypes_internal, function_types_compatible_p,
2502 perform_integral_promotions, digest_init): Replace Yoda conditions
2503 with typical order conditions.
2504 * c-decl.c (check_bitfield_type_and_width): Likewise.
2505
c65e18d3
BE
25062017-12-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
2507
2508 * c-typeck.c (c_safe_arg_type_equiv_p,
2509 c_safe_function_type_cast_p): New function.
2510 (build_c_cast): Implement -Wcast-function-type.
2511
b7280579
RB
25122017-12-14 Richard Biener <rguenther@suse.de>
2513
2514 PR c/83415
2515 * c-fold.c (c_fully_fold_internal): Treat VIEW_CONVERT_EXPR
2516 like REALPART_EXPR for the behavior of whether its operand
2517 is an lvalue.
2518
49e6a6c0
MP
25192017-12-12 Marek Polacek <polacek@redhat.com>
2520
2521 PR c/82679
2522 * c-decl.c (grokdeclarator): Check declspecs insted of atomicp.
2523
ab20d992 25242017-12-12 Alexandre Oliva <aoliva@redhat.com>
96a95ac1
AO
2525
2526 * c-objc-common.h (LANG_HOOKS_EMITS_BEGIN_STMT): Redefine as true.
2527 * c-parser.c (add_debug_begin_stmt): New.
2528 (c_parser_declaration_or_fndef): Call it.
2529 (c_parser_compound_statement_nostart): Likewise.
2530 (c_parser_statement_after_labels): Likewise.
2531 * c-typeck (c_finish_stmt_expr): Skip begin stmts markers.
2532
4b2b493f
JM
25332017-12-07 Joseph Myers <joseph@codesourcery.com>
2534
2535 * c-decl.c (build_compound_literal): Add parameter alignas_align
2536 and set alignment of decl if nonzero.
2537 * c-parser.c (c_keyword_starts_typename): Allow RID_ALIGNAS.
2538 (c_parser_declspecs): Allow RID_ALIGNAS to follow a type, like a
2539 qualifier.
2540 (c_parser_struct_declaration): Update syntax comment.
2541 (c_parser_type_name): Add alignas_ok argument and pass it to
2542 c_parser_declspecs.
2543 (c_parser_cast_expression): Pass true to c_parser_type_name and
2544 give error if a cast used an _Alignas specifier.
2545 (c_parser_sizeof_expression): Pass true to c_parser_type_name and
2546 give error if sizeof (type-name) used an _Alignas specifier.
2547 (c_parser_alignof_expression): Pass true to c_parser_type_name and
2548 give error if _Alignof (type-name) used an _Alignas specifier.
2549 (c_parser_postfix_expression_after_paren_type): Check specified
2550 alignment for a compound literal and pass it to
2551 build_compound_literal.
2552 * c-parser.h (c_parser_type_name): Update prototype.
2553 * c-tree.h (build_compound_literal): Update prototype.
2554
5d9ae53d
MS
25552017-12-07 Martin Sebor <msebor@redhat.com>
2556
2557 PR c/81544
2558 * c-decl.c (c_decl_attributes): Look up existing declaration and
2559 pass it to decl_attributes.
2560
c79144f8
DM
25612017-12-06 David Malcolm <dmalcolm@redhat.com>
2562
2563 PR c/83236
2564 * c-decl.c (lookup_name_fuzzy): Don't suggest names that are
2565 reserved for use by the implementation.
2566
613bc14f
DM
25672017-12-06 David Malcolm <dmalcolm@redhat.com>
2568
2569 * c-decl.c: Include "c-family/c-spellcheck.h".
2570
05abad4c
ML
25712017-12-05 Martin Liska <mliska@suse.cz>
2572 Jakub Jelinek <jakub@redhat.com>
2573
2574 * c-typeck.c (pointer_diff): Add new argument and instrument
2575 pointer subtraction.
2576 (build_binary_op): Similar for pointer comparison.
2577
cc6534d4
JJ
25782017-12-01 Jakub Jelinek <jakub@redhat.com>
2579
65791f42
JJ
2580 PR c/79153
2581 * c-parser.c: Include tree-iterator.h.
2582 (c_parser_switch_statement): Emit LABEL_EXPR for the break label
2583 into SWITCH_BODY instead of after it and set SWITCH_BREAK_LABEL_P
2584 on it.
2585
cc6534d4
JJ
2586 PR c/83222
2587 * c-tree.h (decl_constant_value_1): Declare.
2588 * c-typeck.c (decl_constant_value_1): New function.
2589 (decl_constant_value): Use it.
2590 * c-fold.c (c_fully_fold_internal): If in_init, use
2591 decl_constant_value_1 instead of decl_constant_value.
2592
5de73c05
JJ
25932017-11-30 Jakub Jelinek <jakub@redhat.com>
2594
2595 * c-parser.c (c_parser_postfix_expression): Use ; instead of ;;.
2596
058f0b9e
JJ
25972017-11-28 Jakub Jelinek <jakub@redhat.com>
2598
2599 PR sanitizer/81275
2600 * c-typeck.c (c_finish_case): Set SWITCH_ALL_CASES_P if
2601 c_switch_covers_all_cases_p returns true.
2602
5e9d6aa4 26032017-11-28 Julia Koval <julia.koval@intel.com>
92a285c1 2604 Sebastian Peryt <sebastian.peryt@intel.com>
5e9d6aa4
JK
2605
2606 * Make-lang.in (c/c-array-notation.o): Remove.
2607 * c-array-notation.c: Delete.
2608 * c-decl.c: Remove cilkplus condition.
2609 * c-parser.c (c_parser_cilk_simd, c_parser_cilk_for,
2610 c_parser_cilk_verify_simd, c_parser_array_notation,
2611 c_parser_cilk_clause_vectorlength, c_parser_cilk_grainsize,
2612 c_parser_cilk_simd_fn_vector_attrs,
2613 c_finish_cilk_simd_fn_tokens): Delete.
2614 (c_parser_declaration_or_fndef): Remove cilkplus condition.
2615 (c_parser_direct_declarator_inner): Ditto.
2616 (CILK_SIMD_FN_CLAUSE_MASK): Delete.
2617 (c_parser_attributes, c_parser_compound_statement,
2618 c_parser_statement_after_labels, c_parser_if_statement,
2619 c_parser_switch_statement, c_parser_while_statement,
2620 c_parser_do_statement, c_parser_for_statement,
2621 c_parser_unary_expression, c_parser_postfix_expression,
2622 c_parser_postfix_expression_after_primary,
2623 c_parser_pragma, c_parser_omp_clause_name, c_parser_omp_all_clauses,
2624 c_parser_omp_for_loop, c_finish_omp_declare_simd): Remove cilkplus
2625 support.
2626 * c-typeck.c (build_array_ref, build_function_call_vec,
2627 convert_arguments,
2628 lvalue_p, build_compound_expr, c_finish_return, c_finish_if_stmt,
2629 c_finish_loop, build_binary_op): Remove cilkplus support.
2630
9e851845
JJ
26312017-11-28 Jakub Jelinek <jakub@redhat.com>
2632
2633 * c-typeck.c (c_start_case): Build SWITCH_EXPR using build2 instead
2634 of build3.
2635
ab20d992 26362017-11-14 Boris Kolpackov <boris@codesynthesis.com>
8c7dbea9
BK
2637
2638 * Make-lang.in (c.install-plugin): Install backend import library.
2639
41521dee
JJ
26402017-11-23 Jakub Jelinek <jakub@redhat.com>
2641
2642 * c-parser.c (c_parser_omp_declare_simd): Reject declare simd in
2643 pragma_stmt context.
2644
ac9effed
EB
26452017-11-23 Mike Stump <mikestump@comcast.net>
2646 Eric Botcazou <ebotcazou@adacore.com>
2647
2648 * c-parser.c (c_parser_while_statement): Pass 3rd operand to
2649 ANNOTATE_EXPR.
2650 (c_parser_do_statement): Likewise.
2651 (c_parser_for_statement): Likewise.
2652
ce95abc4
DM
26532017-11-22 David Malcolm <dmalcolm@redhat.com>
2654
2655 PR c++/62170
2656 * c-objc-common.c (c_tree_printer): Convert penultimate param from
2657 bool to bool *. Within '%T' handling, if showing an "aka", use
2658 "quoted" param to add appropriate quoting.
2659
974aedcc
MP
26602017-11-22 Marek Polacek <polacek@redhat.com>
2661
2662 PR c++/60336
2663 PR middle-end/67239
2664 PR target/68355
2665 * c-decl.c (grokdeclarator): Set DECL_PADDING_P on unnamed bit-fields.
2666
d4300cc6
DM
26672017-11-21 David Malcolm <dmalcolm@redhat.com>
2668
2669 PR c/83056
2670 * c-decl.c (lookup_name_fuzzy): Don't suggest names that came from
2671 earlier failed lookups.
2672
1af4ebf5
MG
26732017-11-21 Marc Glisse <marc.glisse@inria.fr>
2674
2675 * c-fold.c (c_fully_fold_internal): Handle POINTER_DIFF_EXPR.
2676 * c-typeck.c (pointer_diff): Use POINTER_DIFF_EXPR.
2677
26edace6
DM
26782017-11-20 David Malcolm <dmalcolm@redhat.com>
2679
2680 PR c/81404
2681 * c-decl.c: Include "c-family/known-headers.h".
2682 (get_c_name_hint): Rename to get_stdlib_header_for_name and move
2683 to known-headers.cc.
2684 (class suggest_missing_header): Move to known-header.h.
2685 (lookup_name_fuzzy): Call get_c_stdlib_header_for_name rather
2686 than get_c_name_hint.
2687
b1212255
DM
26882017-11-20 David Malcolm <dmalcolm@redhat.com>
2689
2690 * c-decl.c (get_c_name_hint): New function.
2691 (class suggest_missing_header): New class.
2692 (lookup_name_fuzzy): Call get_c_name_hint and use it to
2693 suggest missing headers to the user.
2694
6c7a259b
DM
26952017-11-20 David Malcolm <dmalcolm@redhat.com>
2696
2697 * c-decl.c: Define INCLUDE_UNIQUE_PTR before including system.h.
2698 Include "c-family/name-hint.h"
2699 (implicit_decl_warning): Convert "hint" from
2700 const char * to name_hint. Pass location to
2701 lookup_name_fuzzy. Suppress any deferred diagnostic if the
2702 warning was not printed.
2703 (undeclared_variable): Likewise for "guessed_id".
2704 (lookup_name_fuzzy): Convert return type from const char *
2705 to name_hint. Add location_t param.
2706 * c-parser.c: Define INCLUDE_UNIQUE_PTR before including system.h.
2707 Include "c-family/name-hint.h"
2708 (c_parser_declaration_or_fndef): Convert "hint" from
2709 const char * to name_hint. Pass location to lookup_name_fuzzy.
2710 (c_parser_parameter_declaration): Likewise.
2711
f9c59f7e
JJ
27122017-11-19 Jakub Jelinek <jakub@redhat.com>
2713
2714 PR c/66618
2715 PR c/69960
2716 * c-parser.c (c_parser_omp_atomic): Pass true as LVAL to c_fully_fold
2717 where needed.
2718 * c-typeck.c (build_unary_op, build_modify_expr, build_asm_expr,
2719 handle_omp_array_sections): Likewise.
2720 (digest_init): Don't call decl_constant_value_for_optimization.
2721 * c-tree.h (decl_constant_value_for_optimization): Removed.
2722 * c-fold.c (c_fold_array_ref): New function.
2723 (c_fully_fold_internal): Add LVAL argument, propagate it through
2724 recursive calls. For VAR_P call decl_constant_value and
2725 unshare if not LVAL and either optimizing or IN_INIT. Remove
2726 decl_constant_value_for_optimization calls. If IN_INIT and not LVAL,
2727 fold ARRAY_REF with STRING_CST and INTEGER_CST operands.
2728 (c_fully_fold): Add LVAL argument, pass it through to
2729 c_fully_fold_internal.
2730 (decl_constant_value_for_optimization): Removed.
2731
3ca0dc60
JM
27322017-11-15 Joseph Myers <joseph@codesourcery.com>
2733
2734 PR c/81156
2735 * c-parser.c (check_tgmath_function): New function.
2736 (enum tgmath_parm_kind): New enum.
2737 (c_parser_postfix_expression): Handle __builtin_tgmath.
2738
64a5912c
DM
27392017-10-31 David Malcolm <dmalcolm@redhat.com>
2740
2741 * c-decl.c (implicit_decl_warning): Update for renaming of
2742 pedwarn_at_rich_loc and warning_at_rich_loc.
2743 (implicitly_declare): Likewise for renaming of inform_at_rich_loc.
2744 (undeclared_variable): Likewise for renaming of error_at_rich_loc.
2745 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
2746 (c_parser_struct_or_union_specifier): Likewise for renaming of
2747 pedwarn_at_rich_loc.
2748 (c_parser_parameter_declaration): Likewise for renaming of
2749 error_at_rich_loc.
2750 * c-typeck.c (build_component_ref): Likewise.
2751 (build_unary_op): Likewise for renaming of inform_at_rich_loc.
2752 (pop_init_level): Likewise for renaming of warning_at_rich_loc.
2753 (set_init_label): Likewise for renaming of error_at_rich_loc.
2754
c1136864
RB
27552017-10-30 Richard Biener <rguenther@suse.de>
2756
2757 * gimple-parser.c (c_parser_gimple_statement): Parse conditional
2758 stmts.
2759
ee5fd23a
MM
27602017-10-27 Michael Meissner <meissner@linux.vnet.ibm.com>
2761
2762 * c-decl.c (header_for_builtin_fn): Add support for copysign, fma,
2763 fmax, fmin, and sqrt _Float<N> and _Float<N>X variants.
2764
1a59ccf2
DM
27652017-10-25 David Malcolm <dmalcolm@redhat.com>
2766
2767 PR c/7356
2768 * c-parser.c (c_parser_declaration_or_fndef): Detect missing
2769 semicolons.
2770
bc1a75dd
JJ
27712017-10-25 Jakub Jelinek <jakub@redhat.com>
2772
2773 PR libstdc++/81706
2774 * c-decl.c (merge_decls): Copy "omp declare simd" attributes from
2775 newdecl to corresponding __builtin_ if any.
2776
ff1ff960
PC
27772017-10-24 Paolo Carlini <paolo.carlini@oracle.com>
2778
2779 PR c++/82466
2780 * c-decl.c (diagnose_mismatched_decls): Use
2781 OPT_Wbuiltin_declaration_mismatch.
2782
62e1c678
DM
27832017-10-12 David Malcolm <dmalcolm@redhat.com>
2784
2785 * c-parser.c (c_parser_require): Add "type_is_unique" param and
2786 use it to guard calls to maybe_suggest_missing_token_insertion.
2787 (c_parser_parms_list_declarator): Override default value of new
2788 "type_is_unique" param to c_parser_require.
2789 (c_parser_asm_statement): Likewise.
2790 * c-parser.h (c_parser_require): Add "type_is_unique" param,
2791 defaulting to true.
2792
a92f6726
NS
27932017-10-11 Nathan Sidwell <nathan@acm.org>
2794
2795 * c-decl.c (grokdeclarator): Check HAS_DECL_ASSEMBLER_NAME_P too.
2796
8e6cdc90
RS
27972017-10-10 Richard Sandiford <richard.sandiford@linaro.org>
2798
2799 * c-parser.c (c_parser_cilk_clause_vectorlength): Use wi::to_wide when
2800 operating on trees as wide_ints.
2801 * c-typeck.c (build_c_cast, c_finish_omp_clauses): Likewise.
2802 (c_tree_equal): Likewise.
2803
8139a48e
DM
28042017-10-04 David Malcolm <dmalcolm@redhat.com>
2805
2806 * c-decl.c (push_parm_decl): Store c_parm's location into the
2807 PARAM_DECL.
2808 (build_c_parm): Add "loc" param and store it within the c_parm.
2809 * c-parser.c (struct c_parser): Add "last_token_location" field.
2810 (c_parser_consume_token): Store location of the token into the
2811 new field.
2812 (c_parser_declaration_or_fndef): Store params into DECL_ARGUMENTS
2813 when handling a FUNCTION_DECL, if it doesn't already have them.
2814 (c_parser_parameter_declaration): Generate a location for the
2815 parameter, and pass it to the call to build_c_parm.
2816 * c-tree.h (struct c_parm): Add field "loc".
2817 (build_c_parm): Add location_t param.
2818 * c-typeck.c (get_fndecl_argument_location): New function.
2819 (inform_for_arg): New function.
2820 (convert_for_assignment): Use inform_for_arg when dealing with
2821 ic_argpass.
2822
2a389958
JJ
28232017-09-29 Jakub Jelinek <jakub@redhat.com>
2824
7d386d45
JJ
2825 * c-decl.c (grokfield): Use SET_DECL_C_BIT_FIELD here if
2826 width is non-NULL.
2827 (finish_struct): Test DECL_C_BIT_FIELD instead of DECL_INITIAL,
2828 don't SET_DECL_C_BIT_FIELD here.
2829
2a389958
JJ
2830 PR c/82340
2831 * c-decl.c (build_compound_literal): Use c_apply_type_quals_to_decl
2832 instead of trying to set just TREE_READONLY manually.
2833
ebc6a85e
TV
28342017-09-16 Tom de Vries <tom@codesourcery.com>
2835
2836 PR c/81875
2837 * c-parser.c (c_parser_omp_for_loop): Fold only operands of cond, not
2838 cond itself.
2839
bb75facd
JM
28402017-09-15 Joseph Myers <joseph@codesourcery.com>
2841
2842 PR c/82071
2843 * c-typeck.c (ep_convert_and_check): Just call convert_and_check
2844 for C11.
2845 (build_conditional_expr): For C11, generate result with excess
2846 precision when one argument is an integer and the other is of a
2847 type using excess precision.
2848
1d933576
BE
28492017-09-15 Bernd Edlinger <bernd.edlinger@hotmail.de>
2850
2851 * c-typeck.c (build_c_cast): Implement -Wcast-align=strict.
2852
267bbb6f
MP
28532017-09-13 Marek Polacek <polacek@redhat.com>
2854
2855 PR c/82167
2856 * c-typeck.c (c_expr_sizeof_expr): Use the type of expr.value rather
2857 than expr.original_type.
2858
6836632e
NS
28592017-09-12 Nathan Sidwell <nathan@acm.org>
2860
2861 * c-decl.c (field_decl_cmp, resort_data, resort_field_decl_cmp,
2862 resort_sorted_fields): Moved from c-family/c-common.c.
2863 * c-lang.h (struct sorted_fields_type): Moved from c-family/c-common.h.
2864
e035be33
JM
28652017-09-01 Joseph Myers <joseph@codesourcery.com>
2866
2867 PR c/82071
2868 * c-typeck.c (build_atomic_assign): Handle argument with excess
2869 precision. Ensure any EXCESS_PRECISION_EXPR is present in
2870 argument passed to build_binary_op and convert_for_assignment but
2871 not for call to c_fully_fold.
2872 (build_modify_expr): Do not remove EXCESS_PRECISION_EXPR early.
2873 Ensure build_binary_op is called with argument with original
2874 semantic type. Avoid calling c_fully_fold with an
2875 EXCESS_PRECISION_EXPR from build_binary_op.
2876
d2e05fcb
JJ
28772017-09-01 Jakub Jelinek <jakub@redhat.com>
2878
2879 PR c/81887
2880 * c-parser.c (c_parser_omp_ordered): Handle -fopenmp-simd.
2881
b397965c
RS
28822017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
2883 Alan Hayward <alan.hayward@arm.com>
2884 David Sherwood <david.sherwood@arm.com>
2885
2886 * c-typeck.c (build_binary_op): Use SCALAR_TYPE_MODE.
2887 (c_common_type): Likewise. Use as_a <scalar_mode> when setting
2888 m1 and m2 to the signed equivalent of a fixed-point
2889 SCALAR_TYPE_MODE.
2890
14e18d71
DM
28912017-08-24 David Malcolm <dmalcolm@redhat.com>
2892
2893 * c-tree.h (c_expr::get_location) Use EXPR_HAS_LOCATION rather
2894 than CAN_HAVE_LOCATION_P when determining whether to use the
2895 location_t value within "value".
2896
7f204c0f
DM
28972017-08-21 David Malcolm <dmalcolm@redhat.com>
2898
2899 * c-parser.c (c_parser_expr_list): Use c_expr::get_location ()
2900 rather than peeking the location of the first token.
2901 * c-tree.h (c_expr::get_location): New method.
2902
2f687306
DM
29032017-08-21 David Malcolm <dmalcolm@redhat.com>
2904
2905 * c-typeck.c (build_function_call_vec): Pass arg_loc to call
2906 to check_function_arguments.
2907
3e7b80d7
MP
29082017-08-18 Marek Polacek <polacek@redhat.com>
2909
2910 * c-parser.c (c_parser_postfix_expression): Remove unused code. Update
2911 commentary.
2912
00aa1fa2
L
29132017-08-18 H.J. Lu <hongjiu.lu@intel.com>
2914
2915 PR c/53037
2916 * c-decl.c (merge_decls): Also merge DECL_WARN_IF_NOT_ALIGN.
2917 (check_bitfield_type_and_width): Don't allow bit-field with
2918 warn_if_not_aligned type.
2919
da67acb9
MS
29202017-08-14 Martin Sebor <msebor@redhat.com>
2921
2922 PR c/81117
2923 * c-objc-common.c (c_objc_common_init): Handle 'G'.
2924
bb85aa74
MP
29252017-08-11 Marek Polacek <polacek@redhat.com>
2926
2927 PR c/81795
2928 * c-decl.c (pushtag): Only print inform if the warning was printed.
2929 (grokdeclarator): Likewise.
2930
32129a17
DM
29312017-08-10 David Malcolm <dmalcolm@redhat.com>
2932
2933 * c-parser.c (c_parser_error): Rename to...
2934 (c_parser_error_richloc): ...this, making static, and adding
2935 "richloc" parameter, passing it to the c_parse_error call,
2936 rather than calling c_parser_set_source_position_from_token.
2937 (c_parser_error): Reintroduce, reimplementing in terms of the
2938 above, converting return type from void to bool.
2939 (class token_pair): New class.
2940 (struct matching_paren_traits): New struct.
2941 (matching_parens): New typedef.
2942 (struct matching_brace_traits): New struct.
2943 (matching_braces): New typedef.
2944 (get_matching_symbol): New function.
2945 (c_parser_require): Add param MATCHING_LOCATION, using it to
2946 highlight matching "opening" tokens for missing "closing" tokens.
2947 (c_parser_skip_until_found): Likewise.
2948 (c_parser_static_assert_declaration_no_semi): Convert explicit
2949 parsing of CPP_OPEN_PAREN and CPP_CLOSE_PAREN to use of
2950 class matching_parens, so that the pertinent open parenthesis is
2951 highlighted when there are problems locating the close
2952 parenthesis.
2953 (c_parser_struct_or_union_specifier): Likewise.
2954 (c_parser_typeof_specifier): Likewise.
2955 (c_parser_alignas_specifier): Likewise.
2956 (c_parser_simple_asm_expr): Likewise.
2957 (c_parser_braced_init): Likewise, for matching_braces.
2958 (c_parser_paren_condition): Likewise, for matching_parens.
2959 (c_parser_switch_statement): Likewise.
2960 (c_parser_for_statement): Likewise.
2961 (c_parser_asm_statement): Likewise.
2962 (c_parser_asm_operands): Likewise.
2963 (c_parser_cast_expression): Likewise.
2964 (c_parser_sizeof_expression): Likewise.
2965 (c_parser_alignof_expression): Likewise.
2966 (c_parser_generic_selection): Likewise.
2967 (c_parser_postfix_expression): Likewise for cases RID_VA_ARG,
2968 RID_OFFSETOF, RID_TYPES_COMPATIBLE_P, RID_AT_SELECTOR,
2969 RID_AT_PROTOCOL, RID_AT_ENCODE, reindenting as necessary.
2970 In case CPP_OPEN_PAREN, pass loc_open_paren to the
2971 c_parser_skip_until_found call.
2972 (c_parser_objc_class_definition): Use class matching_parens as
2973 above.
2974 (c_parser_objc_method_decl): Likewise.
2975 (c_parser_objc_try_catch_finally_statement): Likewise.
2976 (c_parser_objc_synchronized_statement): Likewise.
2977 (c_parser_objc_at_property_declaration): Likewise.
2978 (c_parser_oacc_wait_list): Likewise.
2979 (c_parser_omp_var_list_parens): Likewise.
2980 (c_parser_omp_clause_collapse): Likewise.
2981 (c_parser_omp_clause_default): Likewise.
2982 (c_parser_omp_clause_if): Likewise.
2983 (c_parser_omp_clause_num_threads): Likewise.
2984 (c_parser_omp_clause_num_tasks): Likewise.
2985 (c_parser_omp_clause_grainsize): Likewise.
2986 (c_parser_omp_clause_priority): Likewise.
2987 (c_parser_omp_clause_hint): Likewise.
2988 (c_parser_omp_clause_defaultmap): Likewise.
2989 (c_parser_oacc_single_int_clause): Likewise.
2990 (c_parser_omp_clause_ordered): Likewise.
2991 (c_parser_omp_clause_reduction): Likewise.
2992 (c_parser_omp_clause_schedule): Likewise.
2993 (c_parser_omp_clause_num_teams): Likewise.
2994 (c_parser_omp_clause_thread_limit): Likewise.
2995 (c_parser_omp_clause_aligned): Likewise.
2996 (c_parser_omp_clause_linear): Likewise.
2997 (c_parser_omp_clause_safelen): Likewise.
2998 (c_parser_omp_clause_simdlen): Likewise.
2999 (c_parser_omp_clause_depend): Likewise.
3000 (c_parser_omp_clause_map): Likewise.
3001 (c_parser_omp_clause_device): Likewise.
3002 (c_parser_omp_clause_dist_schedule): Likewise.
3003 (c_parser_omp_clause_proc_bind): Likewise.
3004 (c_parser_omp_clause_uniform): Likewise.
3005 (c_parser_omp_for_loop): Likewise.
3006 (c_parser_cilk_clause_vectorlength): Likewise.
3007 (c_parser_cilk_clause_linear): Likewise.
3008 (c_parser_transaction_expression): Likewise.
3009 * c-parser.h (c_parser_require): Add param matching_location with
3010 default UNKNOWN_LOCATION.
3011 (c_parser_error): Convert return type from void to bool.
3012 (c_parser_skip_until_found): Add param matching_location with
3013 default UNKNOWN_LOCATION.
3014
30af3a2b
MP
30152017-08-09 Marek Polacek <polacek@redhat.com>
3016
3017 * c-decl.c (build_enumerator): Use true/false instead of 1/0.
3018 * c-tree.h (build_external_ref): Update declaration.
3019 * c-typeck.c (build_array_ref): Use true/false instead of 1/0.
3020 (build_external_ref): Change the type of a parameter to bool.
3021 (parser_build_binary_op): Use true/false instead of 1/0.
3022 (pointer_diff): Likewise.
3023 (build_modify_expr): Likewise.
3024 (set_designator): Change the type of a parameter to bool.
3025 (set_init_index): Use true/false instead of 1/0.
3026 (set_init_label): Likewise.
3027 (output_init_element): Change the type of a parameter to bool.
3028 (output_pending_init_elements): Use true/false instead of 1/0.
3029 (process_init_element): Likewise.
3030 (build_binary_op): Change the type of a parameter to bool.
3031
296c53ac
MP
30322017-08-09 Marek Polacek <polacek@redhat.com>
3033
3034 PR c/81233
3035 * c-typeck.c (pedwarn_init): Make the function take a variable list.
3036 Call emit_diagnostic_valist instead of pedwarn.
3037 (convert_for_assignment): Unroll the PEDWARN_FOR_ASSIGNMENT macro.
3038 Print the relevant types in diagnostics.
3039
a32c8316
MP
30402017-08-09 Marek Polacek <polacek@redhat.com>
3041
3042 PR c/81417
3043 * c-array-notation.c (fix_builtin_array_notation_fn): Update calls to
ab20d992 3044 build_conditional_expr.
a32c8316
MP
3045 * c-parser.c (c_parser_conditional_expression): Create locations for
3046 EXP1 and EXP2 from their source ranges. Pass the locations down to
3047 build_conditional_expr.
3048 * c-tree.h (build_conditional_expr): Update declaration.
3049 * c-typeck.c (build_conditional_expr): Add location_t parameters.
3050 For -Wsign-compare, also print the types.
3051
314e6352
ML
30522017-08-08 Martin Liska <mliska@suse.cz>
3053
3054 * c-convert.c: Include header files.
3055 * c-typeck.c: Likewise.
3056
577eec56
ML
30572017-08-07 Martin Liska <mliska@suse.cz>
3058
3059 * c-parser.c (c_parser_attributes): Canonicalize name of an
3060 attribute.
3061
f7b6353a
MP
30622017-08-02 Marek Polacek <polacek@redhat.com>
3063
3064 PR c/81289
3065 * c-parser.c (c_parser_unary_expression): Use set_error.
3066
8a6eab34
MP
3067 PR c/81448
3068 PR c/81306
3069 * c-warn.c (warn_for_multistatement_macros): Prevent bogus
3070 warnings. Avoid walking MACRO_MAP_LOCATIONS.
3071
ab20d992 30722017-07-31 Jan Hubicka <hubicka@ucw.cz>
7fef86d3
JH
3073 Martin Liska <mliska@suse.cz>
3074
3075 * c-typeck.c (c_finish_goto_label): Build gimple predict
f7b6353a 3076 statement.
7fef86d3 3077
f34ebeb2
ML
30782017-07-31 Martin Liska <mliska@suse.cz>
3079
3080 PR sanitize/81530
3081 * c-convert.c (convert): Guard condition with flag_sanitize_p
3082 also with current_function_decl non-null equality.
3083 * c-decl.c (grokdeclarator): Likewise.
3084 * c-typeck.c (build_binary_op): Likewise.
3085
8595f67b
MP
30862017-07-25 Marek Polacek <polacek@redhat.com>
3087
3088 * c-decl.c (grokfield): Remove local variable.
3089
d49718d6
MP
30902017-07-25 Marek Polacek <polacek@redhat.com>
3091
3092 PR c/81364
3093 * c-parser.c (c_parser_else_body): Don't warn about multistatement
3094 macro expansion if the body is in { }.
3095 (c_parser_while_statement): Likewise.
3096 (c_parser_for_statement): Likewise.
3097
ff22eb12
NS
30982017-07-18 Nathan Sidwell <nathan@acm.org>
3099
3100 * c-parser.c (c_parser_array_notation): Use TYPE_{MIN,MAX}_VALUE.
3101
eea77d1f
DM
31022017-07-14 David Malcolm <dmalcolm@redhat.com>
3103
3104 * c-decl.c (implicitly_declare): When suggesting a missing
3105 #include, provide a fix-it hint.
3106
b6f43128
DM
31072017-07-06 David Malcolm <dmalcolm@redhat.com>
3108
3109 * c-lang.c (selftest::run_c_tests): Move body to c_family_tests,
3110 and call that instead.
3111 * c-tree.h (selftest::run_c_tests): New decl.
3112
3e2becc4
MP
31132017-06-26 Marek Polacek <polacek@redhat.com>
3114
3115 PR c/80116
3116 * c-parser.c (c_parser_if_body): Set the location of the
3117 body of the conditional after parsing all the labels. Call
3118 warn_for_multistatement_macros.
3119 (c_parser_else_body): Likewise.
3120 (c_parser_switch_statement): Likewise.
3121 (c_parser_while_statement): Likewise.
3122 (c_parser_for_statement): Likewise.
3123 (c_parser_statement): Add a default argument. Save the location
3124 after labels have been parsed.
3125 (c_parser_c99_block_statement): Likewise.
3126
343ae898
RB
31272017-06-19 Richard Biener <rguenther@suse.de>
3128
3129 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
3130 negated _Literals to parse _Literal (int) -1.
3131
45b2222a
ML
31322017-06-13 Martin Liska <mliska@suse.cz>
3133
3134 PR sanitize/78204
3135 * c-convert.c (convert): Use sanitize_flags_p.
3136 * c-decl.c (grokdeclarator): Likewise.
3137 * c-typeck.c (convert_for_assignment): Likewise.
3138 (c_finish_return): Likewise.
3139 (build_binary_op): Likewise.
3140
8ab7005b
JJ
31412017-06-08 Jakub Jelinek <jakub@redhat.com>
3142
3143 PR c/81006
3144 * c-typeck.c (handle_omp_array_sections_1): Convert TYPE_MAX_VALUE
3145 to sizetype before size_binop.
3146
363dc72c
JJ
31472017-06-07 Jakub Jelinek <jakub@redhat.com>
3148
3149 * gimple-parser.c (c_parser_parse_gimple_body): Use TDI_gimple instead
3150 of TDI_generic.
3151
dc949728
MP
31522017-06-06 Marek Polacek <polacek@redhat.com>
3153
3154 PR c/79983
3155 * c-decl.c (start_struct): Use the location of TYPE_STUB_DECL of
3156 ref.
3157 (start_enum): Use the location of TYPE_STUB_DECL of enumtype.
3158
40ffd95f
BE
31592017-06-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
3160
3161 * c-parser.c (c_parser_binary_expression): Implement the
3162 -Wsizeof_pointer_div warning.
3163 (c_parser_postfix_expression): Allow SIZEOF_EXPR as expr.original_code
3164 from a parenthesized expression.
3165 (c_parser_expr_list): Use c_last_sizeof_loc.
3166 * c-tree.h (c_last_sizeof_loc): New external.
3167 * c-typeck.c (c_last_sizeof_loc): New variable.
3168 (c_expr_sizeof_expr, c_expr_sizeof_type): Assign c_last_sizeof_loc.
3169
9fc5e7a4
MM
31702017-05-31 Mikhail Maltsev <maltsevm@gmail.com>
3171
3172 PR testsuite/80580
3173 * gimple-parser.c (c_parser_gimple_if_stmt): Check for empty labels.
3174
f012c8ef
DM
31752017-05-30 David Malcolm <dmalcolm@redhat.com>
3176
3177 * c-objc-common.c (c_tree_printer): Gain bool and const char **
3178 parameters.
3179
3cd211af
MS
31802017-05-24 Martin Sebor <msebor@redhat.com>
3181
3182 PR c/80731
3183 * c-fold.c (c_fully_fold_internal): Adjust.
3184 * c-typeck.c (parser_build_unary_op): Adjust.
3185
fd71a9a2
TS
31862017-05-23 Thomas Schwinge <thomas@codesourcery.com>
3187
3188 * c-parser.c (OACC_KERNELS_CLAUSE_MASK): Add
3189 "PRAGMA_OACC_CLAUSE_NUM_GANGS", "PRAGMA_OACC_CLAUSE_NUM_WORKERS",
3190 "VECTOR_LENGTH".
3191
92fa0f9e
MP
31922017-05-23 Marek Polacek <polacek@redhat.com>
3193
3194 * c-parser.c (c_parser_compound_statement_nostart): Remove redundant
3195 quotes.
3196
d11c168a
JJ
31972017-05-22 Jakub Jelinek <jakub@redhat.com>
3198
3199 * c-fold.c (c_fully_fold_internal): Save the c_fully_fold_internal
3200 result for SAVE_EXPR operand and set SAVE_EXPR_FOLDED_P even if
3201 it returned invariant. Call tree_invariant_p unconditionally
3202 afterwards to decide whether to return expr or op0.
3203
58aca9d9
NS
32042017-05-22 Nathan Sidwell <nathan@acm.org>
3205
3206 * c-decl.c (c_parse_final_cleanups): Drop TDI_tu handling.
3207
7fd549d2
TS
32082017-05-19 Thomas Schwinge <thomas@codesourcery.com>
3209
3210 * c-parser.c (c_parser_omp_clause_default): Handle
3211 "OMP_CLAUSE_DEFAULT_PRESENT".
3212
6ecd2339
BE
32132017-05-18 Bernd Edlinger <bernd.edlinger@hotmail.de>
3214
3215 * config-lang.in (gtfiles): Add c-family/c-format.c.
3216
8a57ecff
NS
32172017-05-18 Nathan Sidwell <nathan@acm.org>
3218
3219 * c-decl.c (pushdecl_top_level): Delete unused function.
3220
6574d78e
MP
32212017-05-18 Marek Polacek <polacek@redhat.com>
3222
3223 * c-decl.c (match_builtin_function_types): Use NULL_TREE instead of 0.
3224 (check_earlier_gotos): Likewise.
3225 (define_label): Likewise.
3226 (pending_xref_error): Likewise.
3227 (smallest_type_quals_location): Likewise.
3228 (grokdeclarator): Likewise.
3229 (grokparms): Likewise.
3230 (identifier_global_value): Likewise.
3231 * c-typeck.c (set_nonincremental_init_from_string): Likewise.
3232 (find_init_member): Likewise.
3233
e3455240
MP
32342017-05-18 Marek Polacek <polacek@redhat.com>
3235
3236 * c-decl.c (start_decl): Use false/true instead of 0/1.
3237 (grokdeclarator): Likewise.
3238 (finish_struct): Likewise.
3239 (start_function): Change the return type to bool. Use false/true
3240 instead of 0/1.
3241 (declspecs_add_qual): Use UNKNOWN_LOCATION instead of 0.
3242 * c-tree.h (start_function): Update.
3243 * c-typeck.c (same_translation_unit_p): Change the return type to bool.
3244 (set_designator): Change the return type to bool. Use false/true
3245 instead of 0/1.
3246
3fa8871b
MP
32472017-05-17 Marek Polacek <polacek@redhat.com>
3248
3249 * c-decl.c: Use NULL_TREE instead of 0 where appropriate.
3250 * c-typeck.c: Likewise.
3251
142473df
MP
32522017-05-17 Marek Polacek <polacek@redhat.com>
3253
3254 PR sanitizer/80659
3255 * c-decl.c (build_compound_literal): Set DECL_ARTIFICIAL and
3256 DECL_IGNORED_P even for non-static compound literals.
3257
1a817418
ML
32582017-05-17 Martin Liska <mliska@suse.cz>
3259
3260 * c-decl.c (c_parse_final_cleanups): Introduce dump_flags_t type and
3261 use it instead of int type.
3262
b2fa0a8b
MP
32632017-05-17 Marek Polacek <polacek@redhat.com>
3264
3265 * c-convert.c (convert): Replace c_save_expr with save_expr. Don't
3266 call c_fully_fold.
3267 (convert) <case COMPLEX_TYPE>: Remove special handling of COMPLEX_TYPEs.
ab20d992 3268 * c-decl.c (grokdeclarator): Replace c_save_expr with save_expr.
b2fa0a8b
MP
3269 * c-fold.c (c_fully_fold_internal): Handle SAVE_EXPR.
3270 * c-parser.c (c_parser_declaration_or_fndef): Replace c_save_expr with
3271 save_expr.
3272 (c_parser_conditional_expression): Likewise.
3273 * c-tree.h (SAVE_EXPR_FOLDED_P): Define.
3274 * c-typeck.c (build_modify_expr): Replace c_save_expr with save_expr.
3275 (process_init_element): Likewise.
3276 (build_binary_op): Likewise.
3277 (handle_omp_array_sections_1): Likewise.
3278
1e47f02b
TS
32792017-05-12 Thomas Schwinge <thomas@codesourcery.com>
3280
3281 * c-parser.c (c_parser_omp_clause_num_gangs)
3282 (c_parser_omp_clause_num_workers)
3283 (c_parser_omp_clause_vector_length): Merge functions into...
3284 (c_parser_oacc_single_int_clause): ... this new function. Adjust
3285 all users.
3286
c24e924f
NS
32872017-05-11 Nathan Sidwell <nathan@acm.org>
3288
3289 * gimple-parser.c: Don't #include tree-dump.h.
3290
c587104e
MM
32912017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
3292
3293 PR testsuite/80580
3294 * gimple-parser.c (c_parser_parse_ssa_name): Validate SSA name base.
3295
67ac9a9d
MM
32962017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
3297
3298 PR testsuite/80580
3299 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
3300 incorrect __MEM syntax.
3301
ac4eb40f
MM
33022017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
3303
3304 PR testsuite/80580
3305 * gimple-parser.c (c_parser_gimple_unary_expression): Check argument
3306 type of unary '*'.
3307
641da50a
NS
33082017-05-09 Nathan Sidwell <nathan@acm.org>
3309
3310 * c-tree.h (pushdecl): Declare.
3311
56d35585
DM
33122017-05-05 David Malcolm <dmalcolm@redhat.com>
3313
3314 * c-decl.c (warn_defaults_to): Replace report_diagnostic
3315 with diagnostic_report_diagnostic.
3316 * c-errors.c (pedwarn_c99): Likewise.
3317 (pedwarn_c90): Likewise.
3318
815d9cc6
XR
33192017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn>
3320
92a285c1 3321 PR c++/80038
815d9cc6
XR
3322 * c-gimplify.c (c_gimplify_expr): Remove calls to
3323 cilk_gimplifY_call_params_in_spawned_fn.
3324
1c4ea66f
DM
33252017-04-25 David Malcolm <dmalcolm@redhat.com>
3326
3327 * c-parser.c (c_parser_struct_or_union_specifier): Add fix-it
3328 hint for removing extra semicolon.
3329
666f7903
JJ
33302017-04-21 Jakub Jelinek <jakub@redhat.com>
3331
3332 PR c/80468
3333 * c-decl.c (finish_declspecs) <case cts_int_n>: If int_n_idx is not
3334 enabled, set specs->type to integer_type_node.
3335
5764ee3c
JW
33362017-04-03 Jonathan Wakely <jwakely@redhat.com>
3337
3338 * c-array-notation.c: Fix typo in comment.
3339
10fa8dfb
MP
33402017-03-29 Marek Polacek <polacek@redhat.com>
3341
3342 PR c/79730
3343 * c-decl.c (finish_decl): Check VAR_P.
3344
a9e4a1a5
JJ
33452017-03-27 Jakub Jelinek <jakub@redhat.com>
3346
3347 PR middle-end/80162
3348 * c-tree.h (c_mark_addressable): Add array_ref_p argument.
3349 * c-typeck.c (c_mark_addressable): Likewise. Look through
3350 VIEW_CONVERT_EXPR unless array_ref_p and VCE is from VECTOR_TYPE
3351 to ARRAY_TYPE.
3352 (build_array_ref): Pass true as array_ref_p to c_mark_addressable.
3353
ee3ff394
MP
33542017-03-23 Marek Polacek <polacek@redhat.com>
3355
3356 * c-tree.h: Remove a C_RID_YYCODE reference.
3357
4d1b8e70
JJ
33582017-03-21 Jakub Jelinek <jakub@redhat.com>
3359
3360 PR c/80097
3361 * c-typeck.c (build_binary_op): Add EXCESS_PRECISION_EXPR only around
3362 optional COMPOUND_EXPR with ubsan instrumentation.
3363
31dc71a8
MP
33642017-03-17 Marek Polacek <polacek@redhat.com>
3365
3366 * c-parser.c: Add C11 references.
3367
d579c385
MP
33682017-03-15 Marek Polacek <polacek@redhat.com>
3369
3370 * c-parser.c (c_parser_enum_specifier): Remove redundant line.
3371
85059a38
MP
33722017-03-11 Marek Polacek <polacek@redhat.com>
3373
3374 * c-decl.c (implicit_decl_warning): Add a comment. Fix formatting.
3375
2f6f187a
DM
33762017-03-10 David Malcolm <dmalcolm@redhat.com>
3377
3378 PR translation/79848
3379 * c-decl.c (declspecs_add_type): Simplify uses of "%<%s%>" to
3380 "%qs".
3381 * c-parser.c (c_parser_oacc_shape_clause): Likewise.
3382
36618428
MP
33832017-03-09 Marek Polacek <polacek@redhat.com>
3384
3385 PR sanitizer/79757
3386 * c-parser.c (c_parser_declaration_or_fndef): Don't sanitize old-style
3387 parameter declarations with initializers.
3388
01e5af5a
JJ
33892017-03-09 Jakub Jelinek <jakub@redhat.com>
3390
3391 PR c/79969
3392 * c-decl.c (start_enum): Adjust DECL_SOURCE_LOCATION of
3393 TYPE_STUB_DECL.
3394
a71dbc63
JJ
33952017-03-07 Jakub Jelinek <jakub@redhat.com>
3396
3397 PR c/79834
3398 * c-parser.c (c_parser_pragma): Use error_at instead of c_parser_error
3399 for "may only be used in compound statements" diagnostics, change it
3400 such that the same translatable string is used for all pragmas. For
3401 PRAGMA_OACC_WAIT use "acc wait" rather than "acc enter data" in the
3402 diagnostics.
3403 (c_parser_omp_cancellation_point, c_parser_omp_target_update,
3404 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Change
3405 "may only be used in compound statements" diagnostics, such that the
3406 same translatable string is used for all pragmas.
3407
1ff4bae6
MP
34082017-03-04 Marek Polacek <polacek@redhat.com>
3409
3410 PR c/79847
3411 * c-decl.c (implicit_decl_warning): Add missing space.
3412
7f5a7d78
MP
34132017-03-03 Marek Polacek <polacek@redhat.com>
3414
3415 PR c/79758
3416 * c-decl.c (store_parm_decls_oldstyle): Check if the element of
3417 current_function_prototype_arg_types is error_mark_node. Fix
3418 formatting. Use TREE_VALUE instead of TREE_TYPE.
3419
883c8f06
JJ
34202017-03-03 Jakub Jelinek <jakub@redhat.com>
3421
79c9b7a8
JJ
3422 PR c/79837
3423 * c-parser.c (c_parser_omp_clause_reduction): Don't mention
3424 %<min%> or %<max%> in the diagnostics, instead mention identifier.
3425 (c_parser_omp_declare_reduction): Don't mention %<min%> in the
3426 diagnostics.
3427
883c8f06
JJ
3428 PR c/79836
3429 * c-parser.c (c_parser_generic_selection): Use %<_Generic%>
3430 instead of %<_Generic>.
3431 (c_parser_omp_ordered): Use %<depend%> instead of %<depend>.
3432 (c_parser_omp_target_exit_data): Use %<release%> instead of
3433 %<release>.
3434
324ff1a0
JJ
34352017-02-28 Jakub Jelinek <jakub@redhat.com>
3436
3437 * c-parser.c (c_parser_asm_statement): Use cond ? G_("...") : G_("...")
3438 instead of just cond ? "..." : "...".
3439 (c_parser_oacc_enter_exit_data): Use %s and ternary operator only
3440 for "enter"/"exit" keyword.
3441 (c_finish_oacc_routine): Don't use %s to supply portions of the
3442 message.
3443
4227c9ad
JJ
34442017-02-24 Jakub Jelinek <jakub@redhat.com>
3445
3446 PR c++/79588
3447 * c-parser.c (c_parser_postfix_expression_after_primary): Don't
3448 handle -Wrestrict here.
3449 * c-typeck.c (build_function_call_vec): Adjust
3450 check_function_arguments caller.
3451
5d972e66
RB
34522017-02-23 Richard Biener <rguenther@suse.de>
3453
3454 PR c/79684
3455 * gimple-parser.c (c_parser_gimple_statement): Use set_error
3456 to initialize c_exprs to return.
3457 (c_parser_gimple_binary_expression): Likewise.
3458 (c_parser_gimple_unary_expression): Likewise.
3459 (c_parser_gimple_postfix_expression): Likewise.
3460
61ac5ebe
MP
34612017-02-22 Marek Polacek <polacek@redhat.com>
3462
3463 PR c/79662
3464 * c-typeck.c (convert_arguments): Handle error_mark_node.
3465
41d1b0b1
PK
34662017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3467
3468 * gimple-parser.c (c_parser_gimple_postfix_expression): Check return
3469 value of c_parser_parse_ssa_name against error_mark_node and emit
3470 error if ssa name is anonymous and written as default definition.
3471
eab1f169
PK
34722017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3473
3474 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
3475 FMA_EXPR.
3476
bcac0b4d
JJ
34772017-02-16 Jakub Jelinek <jakub@redhat.com>
3478
3479 PR c++/79512
3480 * c-parser.c (c_parser_omp_target): For -fopenmp-simd
3481 ignore #pragma omp target even when not followed by identifier.
3482
1be33173
PK
34832017-02-14 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3484
3485 * gimpler-parser.c (c_parser_gimple_statement): Handle ABS_EXPR.
3486 (c_parser_gimple_unary_expression): Likewise.
3487
aa326bfb
JJ
34882017-02-13 Jakub Jelinek <jakub@redhat.com>
3489
3490 * c-parser.c (c_parser_oacc_declare): Add missing space in
3491 diagnostics.
3492
8a398bc5
PK
34932017-02-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3494
3495 PR c/79478
3496 * gimple-parser.c (c_parser_gimple_postfix_expression): Call
3497 set_c_expr_source_range when parsing ssa-name.
3498
3dcde5ef 34992017-02-10 Prasad Ghangal <prasad.ghangal@gmail.com>
ab20d992 3500 Richard Biener <rguenther@suse.de>
3dcde5ef
PG
3501
3502 * gimple-parser.c (c_parser_gimple_binary_expression): Avoid
3503 building IL when arguments are error_mark_node.
3504 (c_parser_gimple_unary_expression): Likewise.
3505 (c_parser_gimple_if_stmt): Likewise.
3506 (c_parser_gimple_switch_stmt): Likewise.
3507 (c_parser_gimple_return_stmt): Likewise.
3508 (c_parser_parse_ssa_name): When name lookup fails do not build
3509 an SSA name. Use undeclared rather than not declared in error
3510 reporting.
3511
192b048b
MP
35122017-02-09 Marek Polacek <polacek@redhat.com>
3513
3514 PR c/79428
3515 * c-parser.c (c_parser_omp_ordered): Call c_parser_skip_to_pragma_eol
3516 instead of c_parser_skip_until_found.
3517
56f71478
JJ
35182017-02-09 Jakub Jelinek <jakub@redhat.com>
3519
3520 PR c/79431
3521 * c-parser.c (c_parser_omp_declare_target): Don't invoke
3522 symtab_node::get on automatic variables.
3523
02889d23
CLT
35242016-02-09 Nathan Sidwell <nathan@codesourcery.com>
3525 Chung-Lin Tang <cltang@codesourcery.com>
3526
3527 * c-parser.c (c_parser_omp_clause_collapse): Disallow tile.
3528 (c_parser_oacc_clause_tile): Disallow collapse. Fix parsing and
3529 semantic checking.
3530 * c-parser.c (c_parser_omp_for_loop): Accept tiling constructs.
3531
7af4b20d
RB
35322017-02-07 Richard Biener <rguenther@suse.de>
3533
3534 * gimple-parser.c (c_parser_gimple_expr_list): Simplify.
3535 (c_parser_gimple_postfix_expression_after_primary):
3536 Do not use c_build_function_call_vec to avoid folding and promotion.
3537 Simplify.
3538
e5e391d6
MO
35392017-01-25 Maxim Ostapenko <m.ostapenko@samsung.com>
3540
3541 PR lto/79061
3542 * c-decl.c (pop_scope): Pass main_input_filename to
3543 build_translation_unit_decl.
3544
c2e84327
DM
35452017-01-24 David Malcolm <dmalcolm@redhat.com>
3546
3547 * c-parser.c: Include "read-rtl-function.h" and
3548 "run-rtl-passes.h".
3549 (c_parser_declaration_or_fndef): Rename "gimple-pass-list" in
3550 grammar to gimple-or-rtl-pass-list. Add rtl-function-definition
3551 production. Update for renaming of field "gimple_pass" to
3552 "gimple_or_rtl_pass". If __RTL was seen, call
3553 c_parser_parse_rtl_body. Convert a timevar_push/pop pair
3554 to an auto_timevar, to cope with early exit.
3555 (c_parser_declspecs): Update RID_GIMPLE handling for renaming of
3556 field "gimple_pass" to "gimple_or_rtl_pass", and for renaming of
3557 c_parser_gimple_pass_list to c_parser_gimple_or_rtl_pass_list.
3558 Handle RID_RTL.
3559 (c_parser_parse_rtl_body): New function.
3560 * c-tree.h (enum c_declspec_word): Add cdw_rtl.
3561 (struct c_declspecs): Rename field "gimple_pass" to
3562 "gimple_or_rtl_pass". Add field "rtl_p".
3563 * gimple-parser.c (c_parser_gimple_pass_list): Rename to...
3564 (c_parser_gimple_or_rtl_pass_list): ...this, updating accordingly.
3565 * gimple-parser.h (c_parser_gimple_pass_list): Rename to...
3566 (c_parser_gimple_or_rtl_pass_list): ...this.
3567
2ebd93e1
MP
35682017-01-20 Marek Polacek <polacek@redhat.com>
3569
3570 PR c/64279
3571 * c-typeck.c (build_conditional_expr): Warn about duplicated branches.
3572
b1c95bb5
RB
35732017-01-13 Richard Biener <rguenther@suse.de>
3574
3575 * gimple-parser.c (c_parser_gimple_compound_statement): Handle
3576 nops.
3577
25329913
RB
35782017-01-13 Richard Biener <rguenther@suse.de>
3579
3580 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
3581 _Literal ( type-name ) number.
3582
6bb4ea5c
RB
35832017-01-12 Richard Biener <rguenther@suse.de>
3584
3585 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
3586 __MEM.
3587
6b5b4e9c
JJ
35882017-01-11 Jakub Jelinek <jakub@redhat.com>
3589
3590 PR c++/72813
3591 * c-decl.c (pop_file_scope): Set flag_syntax_only to 1 after writing
3592 PCH file.
3593
e3252775
RB
35942017-01-11 Richard Biener <rguenther@suse.de>
3595
3596 PR bootstrap/79052
3597 * gimple-parser.c (c_parser_gimple_switch_stmt): Add missing
3598 returns on parse errors.
3599
a9342885
MP
36002017-01-04 Marek Polacek <polacek@redhat.com>
3601
3602 PR c++/64767
3603 * c-parser.c (c_parser_postfix_expression): Mark zero character
3604 constants by setting original_type in c_expr.
3605 * c-typeck.c (parser_build_binary_op): Warn when a pointer is compared
3606 with a zero character constant.
3607 (char_type_p): New function.
3608
5dd9a9d0
DM
36092017-01-04 David Malcolm <dmalcolm@redhat.com>
3610
3611 * c-parser.c (c_parser_declaration_or_fndef): Create a
3612 rich_location at init_loc and parse it to start_init.
3613 (last_init_list_comma): New global.
3614 (c_parser_braced_init): Update last_init_list_comma when parsing
3615 commas. Pass it to pop_init_level. Pass location of closing
3616 brace to pop_init_level.
3617 (c_parser_postfix_expression_after_paren_type): Create a
3618 rich_location at type_loc and parse it to start_init.
3619 (c_parser_omp_declare_reduction): Likewise for loc.
3620 * c-tree.h (start_init): Add rich_location * param.
3621 (pop_init_level): Add location_t param.
3622 * c-typeck.c (struct initializer_stack): Add field
3623 "missing_brace_richloc".
3624 (start_init): Add richloc param, use it to initialize
3625 the stack node's missing_brace_richloc.
3626 (last_init_list_comma): New decl.
3627 (finish_implicit_inits): Pass last_init_list_comma to
3628 pop_init_level.
3629 (push_init_level): When finding missing open braces, add fix-it
3630 hints to the richloc.
3631 (pop_init_level): Add "insert_before" param and pass it
3632 when calling pop_init_level. Add fixits about missing
3633 close braces to any richloc. Use the richloc for the
3634 -Wmissing-braces warning.
3635 (set_designator): Pass last_init_list_comma to pop_init_level.
3636 (process_init_element): Likewise.
3637
cbe34bb5
JJ
36382017-01-01 Jakub Jelinek <jakub@redhat.com>
3639
3640 Update copyright years.
3641
d17680f3
JJ
36422016-12-21 Jakub Jelinek <jakub@redhat.com>
3643
0dba7960
JJ
3644 PR bootstrap/78817
3645 * c-typeck.c (build_function_call_vec): If check_function_arguments
3646 returns true, set TREE_NO_WARNING on CALL_EXPR.
3647
d17680f3
JJ
3648 PR c/77767
3649 * c-decl.c (grokdeclarator): If *expr is non-NULL, append expression
3650 to *expr instead of overwriting it.
3651
aa90531e
RB
36522016-12-20 Richard Biener <rguenther@suse.de>
3653
3654 * gimple-parser.c (c_parser_gimple_compound_statement): Improve
3655 error recovery.
3656 (c_parser_gimple_statement): Only build assigns for non-error
3657 stmts.
3658 (c_parser_gimple_postfix_expression_after): Improve error recovery.
3659
629b3d75
MJ
36602016-12-14 Martin Jambor <mjambor@suse.cz>
3661
3662 * c-parser.c: Include omp-general.h and omp-offload.h instead of
3663 omp-low.h.
3664 (c_finish_oacc_routine): Adjusted call to
3665 get_oacc_fn_attrib, build_oacc_routine_dims and replace_oacc_fn_attrib
3666 to use their new names.
3667 (c_parser_oacc_enter_exit_data): Adjusted call to find_omp_clause to
3668 use its new name.
3669 (c_parser_oacc_update): Likewise.
3670 (c_parser_omp_simd): Likewise.
3671 (c_parser_omp_target_update): Likewise.
3672 * c-typeck.c: Include omp-general.h instead of omp-low.h.
3673 (c_finish_omp_cancel): Adjusted call to find_omp_clause to use its new
3674 name.
3675 (c_finish_omp_cancellation_point): Likewise.
3676 * gimple-parser.c: Do not include omp-low.h
3677
c5af52eb
CP
36782016-12-02 Cesar Philippidis <cesar@codesourcery.com>
3679 James Norris <jnorris@codesourcery.com>
3680
3681 * c-parser.c (c_parser_pragma): Error when PRAGMA_OACC_{ENTER_DATA,
3682 EXIT_DATA,WAIT} are not used in compound statements.
3683 (c_parser_oacc_enter_exit_data): Update diagnostics.
3684
48330c93
BE
36852016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
3686
3687 PR c++/71973
3688 * c-decl.c (diagnose_mismatched_decls): Use
3689 OPT_Wbuiltin_declaration_mismatch here too.
3690
899ca90e 36912016-11-18 Richard Sandiford <richard.sandiford@arm.com>
48330c93
BE
3692 Alan Hayward <alan.hayward@arm.com>
3693 David Sherwood <david.sherwood@arm.com>
899ca90e
RS
3694
3695 * c-decl.c (merge_decls): Use SET_DECL_MODE.
3696 (make_label, finish_struct): Likewise.
3697
1ee62b92 36982016-11-14 Prasad Ghangal <prasad.ghangal@gmail.com>
8e745a17 3699 Richard Biener <rguenther@suse.de>
22b15758 3700
8e745a17
JJ
3701 * Make-lang.in (C_AND_OBJC_OBJS): Add gimple-parser.o.
3702 * config-lang.in (gtfiles): Add c/c-parser.h.
3703 * c-tree.h (enum c_declspec_word): Add cdw_gimple.
3704 (struct c_declspecs): Add gimple_pass member and gimple_p flag.
3705 * c-parser.c (enum c_id_kind, struct c_token,
3706 c_parser_next_token_is, c_parser_next_token_is_not,
3707 c_parser_next_token_is_keyword,
3708 enum c_lookahead_kind, enum c_dtr_syn, enum c_parser_prec):
3709 Split out to ...
3710 * c-parser.h: ... new header.
3711 * c-parser.c: Include c-parser.h and gimple-parser.h.
1ee62b92 3712 (c_parser_peek_token, c_parser_peek_2nd_token,
8e745a17
JJ
3713 c_token_starts_typename, c_parser_next_token_starts_declspecs,
3714 c_parser_next_tokens_start_declaration, c_parser_consume_token,
3715 c_parser_error, c_parser_require, c_parser_skip_until_found,
3716 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
3717 c_parser_type_name): Export.
3718 (c_parser_tokens_buf): New function.
3719 (c_parser_error): Likewise.
3720 (c_parser_set_error): Likewise.
3721 (c_parser_declspecs): Handle RID_GIMPLE.
1ee62b92
PG
3722 (c_parser_declaration_or_fndef): Parse __GIMPLE marked body
3723 via c_parser_parse_gimple_body.
8e745a17
JJ
3724 * c-parser.h (c_parser_peek_token, c_parser_peek_2nd_token,
3725 c_token_starts_typename, c_parser_next_token_starts_declspecs,
3726 c_parser_next_tokens_start_declaration, c_parser_consume_token,
3727 c_parser_error, c_parser_require, c_parser_skip_until_found,
3728 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
3729 c_parser_type_name): Declare.
1ee62b92
PG
3730 (struct c_parser): Declare forward.
3731 (c_parser_tokens_buf): Declare.
8e745a17
JJ
3732 (c_parser_error): Likewise.
3733 (c_parser_set_error): Likewise.
3734 * gimple-parser.c: New file.
3735 * gimple-parser.h: Likewise.
1ee62b92 3736
22b15758
UB
37372016-11-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3738
3739 PR c/35503
3740 * c-parser.c (c_parser_postfix_expression_after_primary): Call
3741 warn_for_restrict.
3742
84ff4775
LCW
37432016-09-11 Le-Chun Wu <lcwu@google.com>
3744 Mark Wielaard <mjw@redhat.com>
3745
3746 * c-decl.c (warn_if_shadowing): Use the warning code corresponding
3747 to the given -Wshadow= variant.
3748
4d0cdd0c
TP
37492016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
3750
3751 * c-typeck.c: Include memmodel.h.
3752
1202f33e
JJ
37532016-10-13 Jakub Jelinek <jakub@redhat.com>
3754
3755 PR target/77957
3756 * c-objc-common.h (LANG_HOOKS_GETDECLS): Use hook_tree_void_null
3757 instead of lhd_return_null_tree_v.
3758
8a14afd0
BS
37592016-10-07 Bernd Schmidt <bschmidt@redhat.com>
3760
3761 PR c++/69733
3762 * c-decl.c (smallest_type_quals_location): New static function.
3763 (grokdeclarator): Try to find the correct location for an ignored
3764 qualifier.
3765
81fea426
MP
37662016-09-26 Marek Polacek <polacek@redhat.com>
3767
3768 PR c/7652
3769 * c-decl.c (pop_scope): Add gcc_fallthrough.
3770
37712016-09-26 Marek Polacek <polacek@redhat.com>
3772
3773 PR c/7652
3774 * c-parser.c (struct c_token): Add flags field.
3775 (c_lex_one_token): Pass it to c_lex_with_flags.
3776 (c_parser_declaration_or_fndef): Turn __attribute__((fallthrough));
3777 into IFN_FALLTHROUGH.
3778 (c_parser_label): Set FALLTHROUGH_LABEL_P on labels. Handle
3779 attribute fallthrough after a case label or default label.
3780 (c_parser_statement_after_labels): Handle RID_ATTRIBUTE.
3781
9a2300e9
MP
37822016-09-24 Marek Polacek <polacek@redhat.com>
3783
3784 PR c/77490
3785 * c-typeck.c (build_unary_op): Warn about bit not on expressions that
3786 have boolean value. Warn about ++/-- on booleans.
3787
7de76362
JJ
37882016-09-23 Jakub Jelinek <jakub@redhat.com>
3789
3790 * c-parser.c (incomplete_record_decls): Remove unnecessary
3791 = vNULL initialization of file scope vec.
3792
5b73d2ab
MP
37932016-09-16 Marek Polacek <polacek@redhat.com>
3794
3795 * c-typeck.c (lvalue_p): Use true and false instead of 1 and 0.
3796
e51fbec3
MP
37972016-09-14 Marek Polacek <polacek@redhat.com>
3798
3799 * c-array-notation.c (create_cmp_incr): Use false instead of 0.
3800 (fix_array_notation_expr): Likewise.
3801 * c-decl.c (finish_decl): Likewise.
3802 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
3803 * c-typeck.c (array_to_pointer_conversion): Use true instead of 1.
3804 (function_to_pointer_conversion): Use false instead of 0.
3805 (convert_lvalue_to_rvalue): Likewise.
3806 (parser_build_unary_op): Likewise.
3807 (build_atomic_assign): Likewise.
3808 (build_unary_op): Change nonconvert parameter type to bool, use
3809 true/false instead of 1/0.
3810 (build_binary_op): Use true instead of 1.
3811
254830ba
DM
38122016-09-13 David Malcolm <dmalcolm@redhat.com>
3813
3814 * c-parser.c (c_parser_declaration_or_fndef): Update for renaming
3815 of add_fixit_insert to add_fixit_insert_before.
3816
4c13ba17
MP
38172016-09-13 Marek Polacek <polacek@redhat.com>
3818
3819 * c-typeck.c (build_unary_op): Rename FLAG parameter to NOCONVERT. Use
3820 it.
3821
54dcdb88
BE
38222016-09-12 Bernd Edlinger <bernd.edlinger@hotmail.de>
3823
3824 PR c++/77496
3825 * c-parser.c (c_parser_conditional_expression): Pass the rightmost
3826 COMPOUND_EXPR to warn_for_omitted_condop.
3827
e5106e27
DM
38282016-09-07 David Malcolm <dmalcolm@redhat.com>
3829
3830 * c-lang.c (LANG_HOOKS_GET_SUBSTRING_LOCATION): Use
3831 c_get_substring_location for this new langhook.
3832
9dc5773f
JJ
38332016-09-02 Jakub Jelinek <jakub@redhat.com>
3834
3835 PR c/65467
3836 * c-parser.c (c_parser_declspecs): Don't sorry about _Atomic if
3837 flag_openmp.
3838 (c_parser_omp_variable_list): Use convert_lvalue_to_rvalue
3839 instead of mark_exp_read on low_bound/length expression.
3840 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_threads,
3841 c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
3842 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
3843 c_parser_omp_clause_num_workers, c_parser_oacc_shape_clause,
3844 c_parser_oacc_clause_tile, c_parser_omp_clause_schedule,
3845 c_parser_omp_clause_vector_length, c_parser_omp_clause_num_teams,
3846 c_parser_omp_clause_thread_limit, c_parser_omp_clause_aligned,
3847 c_parser_omp_clause_linear, c_parser_omp_clause_safelen,
3848 c_parser_omp_clause_simdlen, c_parser_omp_clause_device,
3849 c_parser_omp_clause_dist_schedule): Use convert_lvalue_to_rvalue
3850 instead of mark_expr_read.
3851 (c_parser_omp_declare_reduction): Reject _Atomic qualified types.
3852 * c-objc-common.h (LANG_HOOKS_OMP_CLAUSE_COPY_CTOR,
3853 LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP): Redefine.
3854 * c-tree.h (c_omp_clause_copy_ctor): New prototype.
3855 * c-typeck.c (handle_omp_array_sections_1): Diagnose _Atomic qualified
3856 array section bases outside of depend clause, for depend clause
3857 use convert_lvalue_to_rvalue on the base.
3858 (c_finish_omp_clauses): Reject _Atomic qualified vars in reduction,
3859 linear, aligned, map, to and from clauses.
3860 (c_omp_clause_copy_ctor): New function.
3861
295844f6
MP
38622016-09-01 Marek Polacek <polacek@redhat.com>
3863
3864 PR c/7652
3865 * c-typeck.c (composite_type): Add FALLTHRU comment.
3866
089af25c
DM
38672016-08-31 David Malcolm <dmalcolm@redhat.com>
3868
3869 * c-parser.c (c_parser_declaration_or_fndef): Add trailing space
3870 to the insertion fixits for "struct", "union", and "enum".
3871
f9087798
DM
38722016-08-30 David Malcolm <dmalcolm@redhat.com>
3873
3874 * c-decl.c (implicit_decl_warning): Use add_fixit_replace
3875 rather than add_fixit_misspelled_id.
3876 (undeclared_variable): Likewise.
3877 * c-parser.c (c_parser_declaration_or_fndef): Likewise. Remove
3878 now-redundant "here" params from add_fixit_insert method calls.
3879 (c_parser_parameter_declaration): Likewise.
3880 * c-typeck.c (build_component_ref): Remove now-redundant range
3881 param from add_fixit_replace method calls.
3882
ebef225f
MP
38832016-08-25 Marek Polacek <polacek@redhat.com>
3884
3885 * c-typeck.c (parser_build_binary_op): Pass LHS to
3886 warn_logical_not_parentheses.
3887
fe377a48
MP
38882016-08-25 Marek Polacek <polacek@redhat.com>
3889
3890 PR c/77323
3891 * c-decl.c (declspecs_add_type): Set typespec_word even when __intN
3892 or _FloatN or _FloatNx is not supported.
3893 (finish_declspecs): Set type to integer_type_node when _FloatN or
3894 _FloatNx is not supported.
3895
c65699ef
JM
38962016-08-19 Joseph Myers <joseph@codesourcery.com>
3897
3898 PR c/32187
3899 * c-tree.h (cts_floatn_nx): New enum c_typespec_keyword value.
3900 (struct c_declspecs): Add field floatn_nx_idx.
3901 * c-decl.c (declspecs_add_type, finish_declspecs): Handle _FloatN
3902 and _FloatNx type specifiers.
3903 * c-parser.c (c_keyword_starts_typename, c_token_starts_declspecs)
3904 (c_parser_declspecs, c_parser_attribute_any_word)
3905 (c_parser_objc_selector): Use CASE_RID_FLOATN_NX.
3906 * c-typeck.c (c_common_type): Handle _FloatN and _FloatNx types.
3907 (convert_arguments): Avoid promoting _FloatN and _FloatNx types
3908 narrower than double.
3909
2f1364c2
JJ
39102016-08-12 Jakub Jelinek <jakub@redhat.com>
3911 Martin Liska <mliska@suse.cz>
3912
3913 PR c/67410
3914 * c-typeck.c (set_nonincremental_init_from_string): Use / instead of
3915 % to determine val element to change. Assert that
3916 wchar_bytes * charwidth fits into val array.
3917
191816a3
MP
39182016-08-12 Marek Polacek <polacek@redhat.com>
3919
3920 PR c/7652
3921 * c-parser.c (c_parser_external_declaration): Add FALLTHRU.
3922 (c_parser_postfix_expression): Likewise.
3923 * c-typeck.c (build_unary_op): Adjust fall through comment.
3924 (c_mark_addressable): Likewise.
3925
b95a64bb
JJ
39262016-08-11 Jakub Jelinek <jakub@redhat.com>
3927
3928 PR c/72816
3929 * c-decl.c (grokdeclarator): When adding TYPE_DOMAIN for flexible
3930 array member through typedef, for orig_qual_indirect == 0 clear
3931 orig_qual_type.
3932
895aa8e1
DM
39332016-08-08 David Malcolm <dmalcolm@redhat.com>
3934
3935 PR c/64955
3936 * c-lang.c (LANG_HOOKS_RUN_LANG_SELFTESTS): If CHECKING_P, wire
3937 this up to selftest::run_c_tests.
3938 (selftest::run_c_tests): New function.
3939
0b212d8c
TS
39402016-08-04 Thomas Schwinge <thomas@codesourcery.com>
3941
ae9281fc
TS
3942 * c-parser.c (struct oacc_routine_data): Add error_seen and
3943 fndecl_seen members.
3944 (c_finish_oacc_routine): Use these.
3945 (c_parser_declaration_or_fndef): Adjust.
3946 (c_parser_oacc_routine): Likewise. Support more C language
3947 constructs, and improve diagnostics. Move pragma context
3948 checking...
3949 (c_parser_pragma): ... here.
3950
0b212d8c
TS
3951 * c-parser.c (struct oacc_routine_data): New.
3952 (c_parser_declaration_or_fndef, c_parser_oacc_routine): Use it.
3953 Simplify code.
3954 (c_finish_oacc_routine): Likewise. Don't attach clauses to "omp
3955 declare target" attribute.
3956
76e2c821
JB
39572016-08-01 Jan Beulich <jbeulich@suse.com>
3958
3959 * c-fold.c (c_fully_fold_internal): Also emit shift count
3960 warnings for vector types.
3961 * c-typeck.c (build_binary_op): Likewise.
3962
f618a472
MP
39632016-07-29 Marek Polacek <polacek@redhat.com>
3964
3965 PR c/71742
3966 * c-decl.c (finish_struct): Rephrase an error message.
3967
efd0786f
MP
3968 PR c/71853
3969 * c-parser.c (c_parser_switch_statement): Initialize ce.original_type
3970 to error node for invalid code.
3971
e00dceaf
MP
3972 PR c/71573
3973 * c-decl.c (implicitly_declare): Return decl early not only for
3974 error_mark_nodes, but for anything that is not a FUNCTION_DECL.
3975
673a107a
JJ
39762016-07-29 Jakub Jelinek <jakub@redhat.com>
3977
3978 PR c/71969
3979 * c-decl.c (finish_function): Only set DECL_DISREGARD_INLINE_LIMITS
3980 on GNU extern inline functions.
3981
a5b5c8b6
MP
39822016-07-29 Marek Polacek <polacek@redhat.com>
3983
3984 PR c/71583
3985 * c-parser.c (c_parser_postfix_expression_after_paren_type): Also
3986 check expr.value.
3987
e3fe09c1
UB
39882016-07-22 Uros Bizjak <ubizjak@gmail.com>
3989
3990 * c-typeck.c: Use HOST_WIDE_INT_1 instead of (HOST_WIDE_INT) 1,
3991
7c8f7eaa
DM
39922016-07-20 David Malcolm <dmalcolm@redhat.com>
3993
3994 * c-decl.c (struct edit_distance_traits<cpp_hashnode *>): Move to
3995 spellcheck-tree.h
3996 (best_macro_match): Likewise, converting from a typedef to a
3997 subclass.
3998 (find_closest_macro_cpp_cb): Move to spellcheck-tree.c.
3999 (lookup_name_fuzzy): Update for change of best_macro_match to a
4000 subclass with a ctor that calls cpp_forall_identifiers.
4001
de6a69ee
DM
40022016-07-20 David Malcolm <dmalcolm@redhat.com>
4003
4004 * c-decl.c (implicit_decl_warning): Update for conversion of
4005 return type of lookup_name_fuzzy to const char *.
4006 (undeclared_variable): Likewise.
4007 (lookup_name_fuzzy): Convert return type from tree to
4008 const char *.
4009 * c-parser.c (c_parser_declaration_or_fndef): Update for
4010 conversion of return type of lookup_name_fuzzy to const char *.
4011 (c_parser_parameter_declaration): Likewise.
4012
b1c9c068
CP
40132016-07-15 Cesar Philippidis <cesar@codesourcery.com>
4014
4015 * c-parser.c (c_parser_oacc_declare): Don't scan for
4016 GOMP_MAP_POINTER.
4017 * c-typeck.c (handle_omp_array_sections): Mark data clauses with
4018 GOMP_MAP_FORCE_{PRESENT,TO,FROM,TOFROM} as potentially having
4019 zero-length subarrays.
4020
ddbbcb19
JJ
40212016-07-15 Jakub Jelinek <jakub@redhat.com>
4022
4023 PR c/71858
4024 * c-decl.c (implicit_decl_warning): Use FUZZY_LOOKUP_FUNCTION_NAME
4025 instead of FUZZY_LOOKUP_NAME.
4026 (lookup_name_fuzzy): For FUZZY_LOOKUP_FUNCTION_NAME consider
4027 FUNCTION_DECLs, {VAR,PARM}_DECLs function pointers and macros.
4028
dd36b877
JJ
40292016-07-14 Jakub Jelinek <jakub@redhat.com>
4030
4031 PR c/71858
4032 * c-decl.c (lookup_name_fuzzy): Ignore binding->invisible.
4033
8c681247
TS
40342016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
4035
4036 * c-parser.c (c_parser_generic_selection): Make type of variable
4037 auto_vec.
4038 (c_parser_omp_declare_simd): Likewise.
4039
bf4fa671
TS
40402016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
4041
4042 * c-decl.c (struct c_struct_parse_info): Change member types
4043 from vec to auto_vec.
4044 (start_struct): Adjust.
4045 (finish_struct): Likewise.
4046
557e8c49
JJ
40472016-07-02 Jakub Jelinek <jakub@redhat.com>
4048
4049 PR c/71719
4050 * c-typeck.c (mark_exp_read): Handle VIEW_CONVERT_EXPR.
4051
54d19c3b
TS
40522016-06-29 Thomas Schwinge <thomas@codesourcery.com>
4053
4054 * c-parser.c (c_parser_pragma) <PRAGMA_OMP_CANCELLATION_POINT>:
4055 Move pragma context checking into...
4056 (c_parser_omp_cancellation_point): ... here, and improve
4057 diagnostic messages.
4058 * c-typeck.c (c_finish_omp_cancel)
4059 (c_finish_omp_cancellation_point): Improve diagnostic messages.
4060
152ef731
JJ
40612016-06-29 Jakub Jelinek <jakub@redhat.com>
4062
4063 PR c/71685
4064 * c-typeck.c (c_build_qualified_type): Don't clear
4065 C_TYPE_INCOMPLETE_VARS for the main variant.
4066
40672016-06-28 Martin Sebor <msebor@redhat.com>
4378d117
MS
4068
4069 PR c/71552
4070 * c-typeck.c (output_init_element): Diagnose incompatible types
4071 before non-constant initializers.
4072
e9ac1f86
JJ
40732016-06-28 Jakub Jelinek <jakub@redhat.com>
4074
4075 * Make-lang.in: Don't cat ../stage_current if it does not exist.
4076
277d7ee0
AK
40772016-06-23 Andi Kleen <ak@linux.intel.com>
4078
4079 * Make-lang.in: Add support for autofdo.
4080
1a4f11c8
DM
40812016-06-22 David Malcolm <dmalcolm@redhat.com>
4082
4083 PR c/70339
4084 * c-decl.c: Include spellcheck-tree.h and gcc-rich-location.h.
4085 (implicit_decl_warning): When issuing warnings for implicit
4086 declarations, attempt to provide a suggestion via
4087 lookup_name_fuzzy.
4088 (undeclared_variable): Likewise when issuing errors.
4089 (lookup_name_in_scope): Likewise.
4090 (struct edit_distance_traits<cpp_hashnode *>): New struct.
4091 (best_macro_match): New typedef.
4092 (find_closest_macro_cpp_cb): New function.
4093 (lookup_name_fuzzy): New function.
4094 * c-parser.c: Include gcc-rich-location.h.
4095 (c_token_starts_typename): Split out case CPP_KEYWORD into...
4096 (c_keyword_starts_typename): ...this new function.
4097 (c_parser_declaration_or_fndef): When issuing errors about
4098 missing "struct" etc, add a fixit. For other kinds of errors,
4099 attempt to provide a suggestion via lookup_name_fuzzy.
4100 (c_parser_parms_declarator): When looking ahead to detect typos in
4101 type names, also reject CPP_KEYWORD.
4102 (c_parser_parameter_declaration): When issuing errors about
4103 unknown type names, attempt to provide a suggestion via
4104 lookup_name_fuzzy.
4105 * c-tree.h (c_keyword_starts_typename): New prototype.
4106
5a578671
JM
41072016-06-20 Joseph Myers <joseph@codesourcery.com>
4108
4109 PR c/71601
4110 * c-typeck.c (build_conditional_expr): Return error_mark_node if
4111 c_common_type returns error_mark_node.
4112
3f8257db 41132016-06-19 Martin Sebor <msebor@redhat.com>
aa0db437
MS
4114
4115 PR c/69507
4116 * c-parser.c (c_parser_alignof_expression): Avoid diagnosing
4117 __alignof__ (expression).
4118
6a3f203c
DM
41192016-06-14 David Malcolm <dmalcolm@redhat.com>
4120
4121 * c-typeck.c: Include spellcheck-tree.h rather than spellcheck.h.
4122
264757fb
DM
41232016-06-14 David Malcolm <dmalcolm@redhat.com>
4124
4125 * c-typeck.c (build_component_ref): Simplify fixit code by
4126 using gcc_rich_location::add_fixit_misspelled_id.
4127 (set_init_label): Likewise.
4128
f7e4f2e3
DM
41292016-06-13 David Malcolm <dmalcolm@redhat.com>
4130
4131 * c-parser.c (c_parser_initelt): Provide location of name for new
4132 location_t param of set_init_label.
4133 * c-tree.h (set_init_label): Add location_t param.
4134 * c-typeck.c (set_init_index): Add "fieldname_loc" location_t
4135 param and use it when issuing error messages about unrecognized
4136 field names. Attempt to provide a fixit hint if appropriate,
4137 otherwise update the error message to provide the type name.
4138
4b1ffdb1
TS
41392016-06-10 Thomas Schwinge <thomas@codesourcery.com>
4140
4141 PR c/71381
4142 * c-parser.c (c_parser_omp_variable_list) <OMP_CLAUSE__CACHE_>:
4143 Loosen checking.
4144
44a845ca
MS
41452016-06-08 Martin Sebor <msebor@redhat.com>
4146 Jakub Jelinek <jakub@redhat.com>
4147
4148 PR c++/70507
4149 PR c/68120
4150 * c-typeck.c (convert_arguments): Don't promote last argument
4151 of BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
4152
92a5f2ba
MP
41532016-06-08 Marek Polacek <polacek@redhat.com>
4154
4155 PR c/71418
4156 * c-decl.c (grokdeclarator): Check TYPE_P.
4157
08203f73
MP
4158 PR c/71426
4159 * c-decl.c (get_parm_info): Don't crash on an assert on invalid
4160 code.
4161
6ffd47b7
DM
41622016-06-07 David Malcolm <dmalcolm@redhat.com>
4163
4164 * c-parser.c (c_parser_postfix_expression): In __builtin_offsetof
4165 and structure element reference, capture the location of the
4166 element name token and pass it to build_component_ref.
4167 (c_parser_postfix_expression_after_primary): Likewise for
4168 structure element dereference.
4169 (c_parser_omp_variable_list): Likewise for
4170 OMP_CLAUSE_{_CACHE, MAP, FROM, TO},
4171 * c-tree.h (build_component_ref): Add location_t param.
4172 * c-typeck.c (build_component_ref): Add location_t param
4173 COMPONENT_LOC. Use it, if available, when issuing hints about
4174 mispelled member names to provide a fixit replacement hint.
4175
1f40cff3
MP
41762016-06-06 Marek Polacek <polacek@redhat.com>
4177
4178 PR c/71362
4179 * c-parser.c (c_parser_direct_declarator): Set location.
4180
5545a907
MP
41812016-06-06 Marek Polacek <polacek@redhat.com>
4182
4183 * c-typeck.c (comptypes_internal): Handle comparisons of
4184 INTEGER_TYPE, FIXED_POINT_TYPE, and REAL_TYPE nodes. Don't check
4185 TYPE_REF_CAN_ALIAS_ALL.
4186
b605f663
CLT
41872016-06-03 Chung-Lin Tang <cltang@codesourcery.com>
4188
4189 * c-typeck.c (c_finish_omp_clauses): Mark OpenACC reduction
4190 arguments as addressable when async clause exists.
4191
00631022
JJ
41922016-05-30 Jakub Jelinek <jakub@redhat.com>
4193
4194 PR c++/71349
4195 * c-parser.c (c_parser_omp_for): Don't disallow nowait clause
4196 when combined with target construct.
4197
7211a097
JJ
41982016-05-26 Jakub Jelinek <jakub@redhat.com>
4199
4200 * c-parser.c (c_parser_omp_clause_schedule): Warn if
4201 OMP_CLAUSE_SCHEDULE_CHUNK_EXPR is known not to be positive.
4202
95efe6b6
MP
42032016-05-25 Marek Polacek <polacek@redhat.com>
4204
4205 PR c/71265
4206 * c-decl.c (c_make_fname_decl): Don't check seen_error.
4207
a23faf7a
MP
4208 PR c/71266
4209 * c-decl.c (store_parm_decls_oldstyle): Skip non-PARM_DECLs.
4210
e46c7770
CP
42112016-05-24 Cesar Philippidis <cesar@codesourcery.com>
4212
4213 * c-parser.c (c_parser_oacc_declare): Add support for
4214 GOMP_MAP_FIRSTPRIVATE_POINTER.
4215 * c-typeck.c (handle_omp_array_sections_1): Replace bool is_omp
4216 argument with enum c_omp_region_type ort.
4217 (handle_omp_array_sections): Likewise. Update call to
4218 handle_omp_array_sections_1.
4219 (c_finish_omp_clauses): Add specific errors and warning messages for
4220 OpenACC. Use firsrtprivate pointers for OpenACC subarrays. Update
4221 call to handle_omp_array_sections.
4222
a04e69c0
TS
42232016-05-24 Thomas Schwinge <thomas@codesourcery.com>
4224
4225 * c-parser.c (c_parser_oacc_routine): Tighten syntax checks.
4226
f17a223d
RB
42272016-05-24 Richard Biener <rguenther@suse.de>
4228
4229 PR middle-end/70434
4230 PR c/69504
4231 * c-typeck.c (build_array_ref): Do not complain about indexing
4232 non-lvalue vectors. Adjust for function name change.
4233
79063edd
MS
42342016-05-20 Martin Sebor <msebor@redhat.com>
4235
4236 PR c/71115
4237 * c-typeck.c (error_init): Use
4238 expansion_point_location_if_in_system_header.
4239 (warning_init): Same.
4240
8a40fef3
DM
42412016-05-19 David Malcolm <dmalcolm@redhat.com>
4242
4243 PR c/71171
4244 * c-parser.c (c_parser_generic_selection): Use c_expr::set_error
4245 in error-handling.
4246 (c_parser_postfix_expression): Likewise.
4247 * c-tree.h (c_expr::set_error): New method.
4248 * c-typeck.c (parser_build_binary_op): In error-handling, ensure
4249 that result's range is initialized.
4250
e9892350
JG
42512016-05-17 James Greenhalgh <james.greenhalgh@arm.com>
4252
4253 * c-typeck.c (parser_build_unary_op): Fix formatting.
4254
8fad45f5
MW
42552016-05-16 Matthew Wahab <matthew.wahab@arm.com>
4256
4257 * c-decl.c (grokdeclarator): Remove errmsg and use of
4258 targetm.invalid_return_type.
4259 (grokparms): Remove errmsg and use of
4260 targetm.invalid_parameter_type.
4261
aa4b467b
JM
42622016-05-13 Joseph Myers <joseph@codesourcery.com>
4263
4264 * c-decl.c (grokdeclarator): For C11, discard qualifiers on
4265 function return type.
4266
4f2e1536
MP
42672016-05-12 Marek Polacek <polacek@redhat.com>
4268
4269 PR c/70756
4270 * c-decl.c (build_compound_literal): Pass LOC down to
4271 c_incomplete_type_error.
4272 * c-tree.h (require_complete_type): Adjust declaration.
4273 (c_incomplete_type_error): Likewise.
4274 * c-typeck.c (require_complete_type): Add location parameter, pass it
4275 down to c_incomplete_type_error.
4276 (c_incomplete_type_error): Add location parameter, pass it down to
4277 error_at.
4278 (build_component_ref): Pass location down to c_incomplete_type_error.
4279 (default_conversion): Pass location down to require_complete_type.
4280 (build_array_ref): Likewise.
4281 (build_function_call_vec): Likewise.
4282 (convert_arguments): Likewise.
4283 (build_unary_op): Likewise.
4284 (build_c_cast): Likewise.
4285 (build_modify_expr): Likewise.
4286 (convert_for_assignment): Likewise.
4287 (c_finish_omp_clauses): Likewise.
4288
d6e83a8d
MM
42892016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
4290
4291 PR c/43651
4292 * c-decl.c (declspecs_add_qual): Warn when -Wduplicate-decl-specifier
4293 is enabled.
4294 * c-errors.c (pedwarn_c90): Return true if warned.
4295 * c-tree.h (pedwarn_c90): Change return type to bool.
4296 (enum c_declspec_word): Add new enumerator cdw_atomic.
4297
5c3a10fb
MP
42982016-05-11 Marek Polacek <polacek@redhat.com>
4299
4300 PR c++/71024
4301 * c-decl.c (diagnose_mismatched_decls): Factor out code to
4302 diagnose_mismatched_attributes and call it.
4303
cf68d92c
MP
43042016-05-10 Marek Polacek <polacek@redhat.com>
4305
4306 PR c/70255
4307 * c-decl.c (diagnose_mismatched_decls): Warn for optimize attribute
4308 on a declaration following the definition.
4309
351f85c5
JJ
43102016-05-05 Jakub Jelinek <jakub@redhat.com>
4311
4312 * c-parser.c (c_parser_switch_statement): Add IF_P argument,
4313 parse it through to c_parser_c99_block_statement.
4314 (c_parser_statement_after_labels): Adjust c_parser_switch_statement
4315 caller.
4316
deef7113
MP
43172016-05-04 Marek Polacek <polacek@redhat.com>
4318
4319 * c-parser.c (c_parser_if_statement): Replace OPT_Wparentheses with
4320 OPT_Wdangling_else.
4321
de55efd5
MP
43222016-05-04 Marek Polacek <polacek@redhat.com>
4323
4324 PR c/48778
4325 * c-typeck.c (build_binary_op): Don't issue -Waddress warnings
4326 for macro expansions.
4327
79ce98bc
MP
43282016-05-03 Marek Polacek <polacek@redhat.com>
4329
4330 PR c/70859
4331 * c-typeck.c (build_function_call_vec): Pass LOC and ARG_LOC down to
4332 check_builtin_function_arguments.
4333
fb2647aa
RB
43342016-05-03 Richard Biener <rguenther@suse.de>
4335
4336 * Make-lang.in (cc1-checksum.c): For stage-final re-use
4337 the checksum from the previous stage.
4338
77886428
CP
43392016-05-02 Cesar Philippidis <cesar@codesourcery.com>
4340
4341 * c-parser.c (c_parser_oacc_all_clauses): Update call to
4342 c_finish_omp_clauses.
4343 (c_parser_omp_all_clauses): Likewise.
4344 (c_parser_oacc_cache): Likewise.
4345 (c_parser_oacc_loop): Likewise.
4346 (omp_split_clauses): Likewise.
4347 (c_parser_omp_declare_target): Likewise.
4348 (c_parser_cilk_all_clauses): Likewise.
4349 (c_parser_cilk_for): Likewise.
4350 * c-typeck.c (c_finish_omp_clauses): Replace bool arguments
4351 is_omp, declare_simd, and is_cilk with enum c_omp_region_type ort.
4352
7176a4a0
MP
43532016-05-02 Marek Polacek <polacek@redhat.com>
4354
4355 PR c/70851
4356 * c-decl.c (grokdeclarator): Diagnose when array's size has an
4357 incomplete type.
4358
e7ff0319
CP
43592016-04-29 Cesar Philippidis <cesar@codesourcery.com>
4360
4361 PR middle-end/70626
4362 * c-parser.c (c_parser_oacc_loop): Don't augment mask with
4363 OACC_LOOP_CLAUSE_MASK.
4364 (c_parser_oacc_kernels_parallel): Update call to
4365 c_oacc_split_loop_clauses.
4366
9f405ce1
AM
43672016-04-28 Andrew MacLeod <amacleod@redhat.com>
4368
4369 * c-array-notation.c (fix_builtin_array_notation_fn): Fix final
4370 argument to build_modify_expr in two cases.
4371
c1e1f433
BS
43722016-04-27 Bernd Schmidt <bschmidt@redhat.com>
4373
4374 * c-parser.c (c_parser_postfix_expression_after_primary): Call
4375 warn_for_memset instead of warning directly here.
4376
2448a956
MP
43772016-04-26 Marek Polacek <polacek@redhat.com>
4378
4379 PR c/67784
4380 * c-parser.c (c_parser_maybe_reclassify_token): New function factored
4381 out of ...
4382 (c_parser_for_statement): ... here.
4383 (c_parser_if_statement): Use it.
4384 (c_parser_switch_statement): Use it.
4385 (c_parser_while_statement): Use it.
4386
b02a5e26
MP
4387 PR c/70791
4388 * c-decl.c (pushdecl): Pass LOCUS down to warning.
4389
477d4906
IV
43902016-04-20 Ilya Verbin <ilya.verbin@intel.com>
4391
4392 PR c++/69363
4393 * c-parser.c (c_parser_cilk_all_clauses): Use c_finish_omp_clauses
4394 instead of c_finish_cilk_clauses.
4395 * c-tree.h (c_finish_omp_clauses): Add new default argument.
4396 * c-typeck.c (c_finish_omp_clauses): Add new argument. Allow
4397 floating-point variables in the linear clause for Cilk Plus.
4398
fe37c7af
MM
43992016-04-18 Michael Matz <matz@suse.de>
4400
4401 * c-decl.c (merge_decls): Use SET_DECL_ALIGN and SET_TYPE_ALIGN.
4402 (grokdeclarator, parser_xref_tag, finish_enum): Use SET_TYPE_ALIGN.
4403
949505a9
MP
44042016-04-15 Marek Polacek <polacek@redhat.com>
4405
4406 PR c/70671
4407 * c-typeck.c (build_unary_op): Pass location down to error and
4408 warning call.
4409
dda1bf61
JJ
44102016-04-15 Jakub Jelinek <jakub@redhat.com>
4411
4412 PR c/70436
4413 * c-parser.c (c_parser_pragma): Add IF_P argument, pass it down
4414 where needed.
4415 (c_parser_external_declaration, c_parser_struct_or_union_specifier,
4416 c_parser_parameter_declaration, c_parser_compound_statement_nostart,
4417 c_parser_objc_class_instance_variables, c_parser_objc_methodprotolist):
4418 Adjust c_parser_pragma callers.
4419 (c_parser_statement_after_labels): Likewise. Adjust c_parser_cilk_for
4420 caller.
4421 (c_parser_omp_structured_block): Add IF_P argument, pass it down to
4422 c_parser_statement.
4423 (c_parser_oacc_data, c_parser_oacc_host_data, c_parser_oacc_loop,
4424 c_parser_oacc_kernels_parallel, c_parser_omp_critical,
4425 c_parser_omp_simd, c_parser_omp_for, c_parser_omp_master,
4426 c_parser_omp_ordered, c_parser_omp_parallel, c_parser_omp_single,
4427 c_parser_omp_task, c_parser_omp_taskgroup, c_parser_omp_distribute,
4428 c_parser_omp_teams, c_parser_omp_target_data, c_parser_omp_target,
4429 c_parser_omp_taskloop, c_parser_omp_construct, c_parser_cilk_grainsize,
4430 c_parser_cilk_simd, c_parser_cilk_for): Add IF_P argument, pass it
4431 down where needed.
4432 (c_parser_omp_for_loop): Likewise. Clear IF_P if nbraces.
4433 (c_parser_omp_sections_scope): Adjust c_parser_omp_structured_block
4434 calls.
4435
99cd9857
MP
44362016-04-13 Marek Polacek <polacek@redhat.com>
4437
4438 PR c/70436
4439 * c-parser.c (c_parser_statement_after_labels): Add IF_P argument and
4440 adjust callers.
4441 (c_parser_statement): Likewise.
4442 (c_parser_c99_block_statement): Likewise.
4443 (c_parser_while_statement): Likewise.
4444 (c_parser_for_statement): Likewise.
4445 (c_parser_if_body): Don't set IF_P here.
4446 (c_parser_if_statement): Add IF_P argument. Set IF_P here. Warn
4447 about dangling else here.
4448 * c-tree.h (c_finish_if_stmt): Adjust declaration.
4449 * c-typeck.c (c_finish_if_stmt): Remove NESTED_IF parameter. Don't
4450 warn about dangling else here.
4451
f13355da
MP
44522016-04-04 Marek Polacek <polacek@redhat.com>
4453
4454 PR c/70307
4455 * c-fold.c (c_fully_fold_internal): Handle VEC_COND_EXPR.
4456
5fde6a45
MP
44572016-03-31 Marek Polacek <polacek@redhat.com>
4458
4459 PR c/70297
4460 * c-decl.c (merge_decls): Also set TYPE_ALIGN and TYPE_USER_ALIGN.
4461
4bbf545b
DM
44622016-03-18 David Malcolm <dmalcolm@redhat.com>
4463
4464 PR c/70281
4465 * c-parser.c (c_parser_postfix_expression): Set the source range
4466 for uses of "__builtin_types_compatible_p".
4467
fcc2b74f
JJ
44682016-03-17 Jakub Jelinek <jakub@redhat.com>
4469
4470 PR c/70280
4471 * c-typeck.c (composite_type): Don't count void_list_node
4472 into len, if the list is terminated by void_list_node, start
4473 with void_list_node instead of NULL for newargs. Stop
4474 at void_list_node.
4475
ab4c578f
MP
44762016-03-16 Marek Polacek <polacek@redhat.com>
4477
4478 PR c/70093
4479 * c-typeck.c (build_function_call_vec): Create a TARGET_EXPR for
4480 nested functions returning VM types.
4481
96b3c82d
CP
44822016-03-09 Cesar Philippidis <cesar@codesourcery.com>
4483
4484 * c-parser.c (c_parser_oacc_loop): Update cclauses and clauses
4485 when calling c_finish_omp_clauses.
4486
29b9828f
BS
44872016-03-04 Bernd Schmidt <bschmidt@redhat.com>
4488
4489 PR c/69824
4490 * c-decl.c (get_parm_info): Don't queue implicit function declarations
4491 for later.
4492
7ff6ca38
MP
44932016-03-04 Marek Polacek <polacek@redhat.com>
4494
4495 PR c/69798
4496 * c-parser.c (c_parser_postfix_expression): Call
4497 c_parser_cast_expression rather than c_parser_postfix_expression.
4498
686e2237
JJ
44992016-03-01 Jakub Jelinek <jakub@redhat.com>
4500
4501 PR c/69796
4502 PR c/69974
4503 * c-parser.c (c_parser_translation_unit): Don't change TREE_TYPE
4504 of incomplete decls to error_mark_node.
4505
0b05329b
MP
45062016-02-24 Marek Polacek <polacek@redhat.com>
4507
4508 PR c/69819
4509 * c-decl.c (finish_decl): Don't update the copy of the type of a
4510 different decl type.
4511
067fbd8b
JJ
45122016-02-23 Jakub Jelinek <jakub@redhat.com>
4513
4514 PR objc/69844
4515 * c-parser.c (c_parser_for_statement): Properly handle ObjC classes
4516 in id_kind reclassification.
4517
bf14eba2
JJ
45182016-02-16 Jakub Jelinek <jakub@redhat.com>
4519
4520 PR c/69835
4521 * c-typeck.c (build_binary_op): Revert 2015-09-09 change.
4522
ba539195
JN
45232016-02-16 James Norris <jnorris@codesourcery.com>
4524
4525 PR c/64748
4526 * c-parser.c (c_parser_oacc_data_clause_deviceptr): Allow parms.
4527
16595a1f
BS
45282016-02-12 Bernd Schmidt <bschmidt@redhat.com>
4529
f48dfe98
BS
4530 * c-decl.c (build_null_declspecs): Zero the entire struct.
4531
16595a1f
BS
4532 PR c/69522
4533 * c-parser.c (c_parser_braced_init): New arg outer_obstack. All
4534 callers changed. If nested_p is true, use it to call
4535 finish_implicit_inits.
4536 * c-tree.h (finish_implicit_inits): Declare.
4537 * c-typeck.c (finish_implicit_inits): New function. Move code
4538 from ...
4539 (push_init_level): ... here.
4540 (set_designator, process_init_element): Call finish_implicit_inits.
4541
66756373
JJ
45422016-02-11 Jakub Jelinek <jakub@redhat.com>
4543
4544 PR c/69768
4545 * c-typeck.c (parser_build_binary_op): Strip nops from integer_zerop
4546 arguments for -Waddress warning.
4547
1066e9b5
JJ
45482016-02-04 Jakub Jelinek <jakub@redhat.com>
4549
4550 PR c/69669
4551 * c-decl.c (finish_enum): When honoring mode attribute,
4552 make sure to use proper TYPE_MIN_VALUE and TYPE_MAX_VALUE.
4553
3a5d2ba4
JJ
45542016-01-29 Jakub Jelinek <jakub@redhat.com>
4555
4556 PR debug/69518
4557 * c-decl.c (finish_struct): Clear C_TYPE_INCOMPLETE_VARS in
4558 all type variants, not just TYPE_MAIN_VARIANT.
4559
cbdd8ae0
JJ
45602016-01-27 Jakub Jelinek <jakub@redhat.com>
4561
4562 PR debug/66869
4563 * c-decl.c (c_write_global_declarations_1): Warn with
4564 warn_unused_function if static prototype without definition
4565 is not C_DECL_USED.
4566
fa74a4bc
MP
45672016-01-27 Marek Polacek <polacek@redhat.com>
4568
4569 PR c/68062
4570 * c-typeck.c (build_binary_op) [EQ_EXPR, GE_EXPR]: Promote operand
4571 to unsigned, if needed. Add -Wsign-compare warning.
4572
13f92e8d
JJ
45732016-01-26 Jakub Jelinek <jakub@redhat.com>
4574
4575 PR tree-optimization/69483
4576 * c-parser.c (c_parser_translation_unit): Use FOR_EACH_VEC_ELT.
4577
cd8e73dc 45782016-01-20 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
d25c7690
PK
4579
4580 PR c/24293
4581 * c-tree.h (incomplete_record_decls): Declare.
4582 * c-parser.c (incomplete_record_decls): Define.
4583 (c_parser_translation_unit): Iterate through incomplete_record_decls and
4584 report error if any decl has zero size.
4585 * c-decl.c (finish_decl): Append static decl with incomplete struct/union
4586 or enum type to incomplete_record_decls.
4587
e6d6ec9e
TV
45882016-01-14 Tom de Vries <tom@codesourcery.com>
4589
4590 PR tree-optimization/68773
4591 * c-parser.c (c_parser_oacc_declare, c_parser_omp_declare_target): Don't
4592 set force_output.
4593
00083992
MP
45942016-01-14 Marek Polacek <polacek@redhat.com>
4595
4596 PR c/69262
4597 * c-decl.c (grokdeclarator): Provide more information for invalid
4598 array declarations.
4599
7443cf13
DM
46002016-01-06 David Malcolm <dmalcolm@redhat.com>
4601
4602 * c-parser.c (c_parser_unary_expression): For dereferences, build
4603 a combined location before calling build_indirect_ref, so that
4604 error reports cover the full range, manually updating the c_expr
4605 src_range.
4606
6b131d5b
MP
46072016-01-06 Marek Polacek <polacek@redhat.com>
4608
4609 PR sanitizer/69099
4610 * c-convert.c (convert) [INTEGER_TYPE]: Drop ARG. Don't pass ARG to
4611 ubsan_instrument_float_cast. Fold EXPR. Use NULL_TREE instead of
4612 NULL.
4613
818ab71a
JJ
46142016-01-04 Jakub Jelinek <jakub@redhat.com>
4615
4616 Update copyright years.
4617
2fe0a208
MP
46182016-01-04 Marek Polacek <polacek@redhat.com>
4619
4620 PR c/68908
4621 * c-typeck.c (build_atomic_assign): Improve commentary. Add
4622 optimization to use __atomic_fetch_* built-in if possible.
4623
c7b48c8a
TS
46242015-12-23 Thomas Schwinge <thomas@codesourcery.com>
4625
4626 * c-parser.c (c_parser_oacc_clause_use_device): Merge function
4627 into...
4628 (c_parser_omp_clause_use_device_ptr): ... this function. Adjust
4629 all users.
4630
fda5652f
MP
46312015-12-22 Marek Polacek <polacek@redhat.com>
4632
4633 PR c/69002
4634 * c-typeck.c (build_component_ref): Warn when acessing elements of
4635 atomic structures or unions.
4636
745e411d
DM
46372015-12-21 David Malcolm <dmalcolm@redhat.com>
4638
4639 * c-typeck.c: Include "gcc-rich-location.h".
4640 (build_binary_op): In the two places that call binary_op_error,
4641 create a gcc_rich_location and populate it with the location of
4642 the binary op and its two operands.
4643
94c40e19
DM
46442015-12-16 David Malcolm <dmalcolm@redhat.com>
4645
4646 * c-parser.c (c_parser_statement_after_labels): When calling
4647 c_finish_return, Use the return expression's location if it has
4648 one, falling back to the location of the first token within it.
4649 * c-typeck.c (c_finish_return): When issuing warnings about
4650 the incorrect presence/absence of a return value, issue a note
4651 showing the declaration of the function.
4652
de67c4c3
DM
46532015-12-16 David Malcolm <dmalcolm@redhat.com>
4654
4655 * c-parser.c (struct c_parser): Expand array "tokens_buf" from 2
4656 to 4.
4657 (c_parser_peek_nth_token): New function.
4658 (c_parser_peek_conflict_marker): New function.
4659 (c_parser_error): Detect conflict markers and report them as such.
4660
a10704e1
DM
46612015-12-16 David Malcolm <dmalcolm@redhat.com>
4662
4663 * c-parser.c (c_parser_postfix_expression): Use EXPR_LOC_OR_LOC
4664 to preserve range information for the primary expression
4665 in the call to c_parser_postfix_expression_after_primary.
4666
8062bca6
DM
46672015-12-16 David Malcolm <dmalcolm@redhat.com>
4668
4669 * c-parser.c (c_parser_static_assert_declaration_no_semi): Use the
4670 expression location, falling back on the first token location,
4671 rather than always using the latter.
4672
d06f8b75
MP
46732015-12-16 Marek Polacek <polacek@redhat.com>
4674
4675 PR c/64637
4676 * c-typeck.c (c_process_expr_stmt): Use location of the expression if
4677 available.
4678
2994fb91
MP
46792015-12-15 Marek Polacek <polacek@redhat.com>
4680
4681 PR c/68907
4682 * c-typeck.c (build_atomic_assign): Set TREE_NO_WARNING on an
4683 artificial decl.
4684
a1b93f8d
DM
46852015-12-08 David Malcolm <dmalcolm@redhat.com>
4686
4687 * c-parser.c (c_parser_alignof_expression): Capture location of
4688 closing parenthesis (if any), or of end of unary expression, and
4689 use it to build a src_range for the expression.
4690
46c6e1e2
DM
46912015-12-08 David Malcolm <dmalcolm@redhat.com>
4692
4693 PR c/68757
4694 * c-parser.c (c_parser_get_builtin_args): Add
4695 "out_close_paren_loc" param, and write back to it.
4696 (c_parser_postfix_expression): Capture the closing
4697 parenthesis location for RID_CHOOSE_EXPR,
4698 RID_BUILTIN_CALL_WITH_STATIC_CHAIN, RID_BUILTIN_COMPLEX,
4699 RID_BUILTIN_SHUFFLE and use it to set the source range
4700 for such expressions; within RID_BUILTIN_COMPLEX set
4701 the underlying location.
4702
66189108
MP
47032015-12-07 Marek Polacek <polacek@redhat.com>
4704
4705 PR c/68668
4706 * c-decl.c (grokdeclarator): If ORIG_QUAL_INDIRECT is indirect, use
4707 TREE_TYPE of ORIG_QUAL_TYPE, otherwise decrement ORIG_QUAL_INDIRECT.
4708
f187980b
EB
47092015-12-04 Eric Botcazou <ebotcazou@adacore.com>
4710
4711 * c-tree.h (c_build_va_arg): Adjust prototype.
4712 * c-parser.c (c_parser_postfix_expression): Adjust call to above.
4713 * c-typeck.c (c_build_va_arg): Rename LOC parameter to LOC2, add LOC1
4714 parameter, adjust throughout and issue an error if EXPR is a component
4715 with reverse storage order.
4716
4250754e
JM
47172015-12-02 Jason Merrill <jason@redhat.com>
4718
4719 * c-fold.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
4720 (c_fully_fold_internal, decl_constant_value_for_optimization):
4721 Move from c-common.c.
4722 * c-tree.h: Declare decl_constant_value_for_optimization.
4723 * Make-lang.in (C_AND_OBJC_OBJS): Add c-fold.o.
4724
e9e32ee6
JM
47252015-12-02 Joseph Myers <joseph@codesourcery.com>
4726
4727 PR c/68162
4728 * c-decl.c (grokdeclarator): Set first_non_attr_kind before
4729 following link from declarator to next declarator. Track original
4730 qualified type and pass it to c_build_qualified_type.
4731 * c-typeck.c (c_build_qualified_type): Add arguments
4732 orig_qual_type and orig_qual_indirect.
4733
ff7a55bf
TS
47342015-12-02 Thomas Schwinge <thomas@codesourcery.com>
4735
4736 * c-parser.c (c_parser_omp_clause_name)
4737 (c_parser_oacc_all_clauses): Alphabetical sorting.
4738
657e4e47
JJ
47392015-12-02 Jakub Jelinek <jakub@redhat.com>
4740
4741 PR c/68533
4742 * c-decl.c (get_parm_info): Use b->locus instead of input_location
4743 for diagnostics.
4744
37d5ad46
JB
47452015-12-01 Julian Brown <julian@codesourcery.com>
4746 Cesar Philippidis <cesar@codesourcery.com>
4747 James Norris <James_Norris@mentor.com>
4748
4749 * c-parser.c (c_parser_omp_clause_name): Add use_device support.
4750 (c_parser_oacc_clause_use_device): New function.
4751 (c_parser_oacc_all_clauses): Add use_device support.
4752 (OACC_HOST_DATA_CLAUSE_MASK): New macro.
4753 (c_parser_oacc_host_data): New function.
4754 (c_parser_omp_construct): Add host_data support.
4755 * c-tree.h (c_finish_oacc_host_data): Add prototype.
4756 * c-typeck.c (c_finish_oacc_host_data): New function.
4757 (c_finish_omp_clauses): Add use_device support.
4758
a4850ce9
JH
47592015-11-29 Jan Hubicka <hubicka@ucw.cz>
4760
4761 PR c/67106
4762 * c-decl.c: Set TYPE_PACKED in variants.
4763
b58d3df2
ML
47642015-11-27 Martin Liska <mliska@suse.cz>
4765
4766 PR c++/68312
4767 * c-array-notation.c (fix_builtin_array_notation_fn):
4768 Use release_vec_vec instead of vec::release.
4769 (build_array_notation_expr): Likewise.
4770 (fix_conditional_array_notations_1): Likewise.
4771 (fix_array_notation_expr): Likewise.
4772 (fix_array_notation_call_expr): Likewise.
4773
aec17bfe
JJ
47742015-11-27 Jakub Jelinek <jakub@redhat.com>
4775
4776 PR c/63326
4777 * c-parser.c (c_parser_compound_statement_nostart): If
4778 last_label is true, use pragma_stmt instead of pragma_compound
4779 as second c_parser_pragma argument.
4780 (c_parser_omp_ordered, c_parser_omp_target_update,
4781 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Pass
4782 false as second argument to c_parser_skip_to_pragma_eol after
4783 diagnosing standalone directives used in pragma_stmt context.
4784
688c4de0
IV
47852015-11-24 Ilya Verbin <ilya.verbin@intel.com>
4786
4787 * c-parser.c (c_parser_oacc_declare): Replace "ifdef ENABLE_OFFLOADING"
4788 with "if (ENABLE_OFFLOADING)".
4789
cbd03aee
DM
47902015-11-23 David Malcolm <dmalcolm@redhat.com>
4791
4792 PR objc/68438
4793 * c-parser.c (c_parser_postfix_expression): Set up source ranges
4794 for various Objective-C constructs: Class.name syntax,
4795 @selector(), @protocol(), @encode(), and [] message syntax.
4796
a87a86e1
DM
47972015-11-20 David Malcolm <dmalcolm@redhat.com>
4798
4799 PR 62314
4800 * c-typeck.c (should_suggest_deref_p): New function.
4801 (build_component_ref): Special-case POINTER_TYPE when
4802 generating a "not a structure of union" error message, and
4803 suggest a "->" rather than a ".", providing a fix-it hint.
4804
8ece8dfb
DM
48052015-11-19 David Malcolm <dmalcolm@redhat.com>
4806
4807 * c-typeck.c (lookup_field_fuzzy): Move determination of closest
4808 candidate into a new function, find_closest_identifier.
4809
433068cc
MP
48102015-11-19 Marek Polacek <polacek@redhat.com>
4811
4812 PR c/68412
4813 * c-typeck.c (parser_build_binary_op): Properly handle
4814 C_MAYBE_CONST_EXPR before calling warn_tautological_cmp.
4815
bef08b71
DM
48162015-11-17 David Malcolm <dmalcolm@redhat.com>
4817
4818 * c-parser.c (set_c_expr_source_range): Bulletproof both
4819 overloaded implementations against NULL expr->value.
4820 (c_parser_braced_init): Set src_range for "ret" to a sane pair of
4821 values.
4822 (c_parser_unary_expression): Likewise when handling addresses of
4823 labels.
4824 (c_parser_postfix_expression): Likewise for statement expressions,
4825 for __FUNCTION__, __PRETTY_FUNCTION_ and __func__ keywords, for
4826 __builtin_va_arg, and for __builtin_offset_of.
4827 (c_parser_postfix_expression_after_paren_type): Initialize expr's
4828 src_range using the range of the braced initializer.
4829 (c_parser_transaction_expression): Set src_range for "ret" to a
4830 sane pair of values.
4831
fff77217
KY
48322015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
4833
4834 * c-parser.c (c_finish_omp_declare_simd): Look for
4835 "simd" attribute as well. Update error message.
4836
1d899da2
TS
48372015-11-14 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
4838
4839 * c-parser.c (c_parser_omp_declare_target): Adjust.
4840
e4606348
JJ
48412015-11-14 Jakub Jelinek <jakub@redhat.com>
4842
4843 * c-typeck.c (c_finish_omp_clauses): Don't mark
4844 GOMP_MAP_FIRSTPRIVATE_POINTER decls addressable.
4845
3e636daf
MP
48462015-11-14 Marek Polacek <polacek@redhat.com>
4847
4848 * c-decl.c: Use RECORD_OR_UNION_TYPE_P throughout.
4849 * c-typeck.c: Likewise.
4850
ebedc9a3
DM
48512015-11-13 David Malcolm <dmalcolm@redhat.com>
4852
4853 * c-decl.c (warn_defaults_to): Pass line_table to
4854 rich_location ctor.
4855 * c-errors.c (pedwarn_c99): Likewise.
4856 (pedwarn_c90): Likewise.
4857 * c-parser.c (set_c_expr_source_range): New functions.
4858 (c_token::get_range): New method.
4859 (c_token::get_finish): New method.
4860 (c_parser_expr_no_commas): Call set_c_expr_source_range on the ret
4861 based on the range from the start of the LHS to the end of the
4862 RHS.
4863 (c_parser_conditional_expression): Likewise, based on the range
4864 from the start of the cond.value to the end of exp2.value.
4865 (c_parser_binary_expression): Call set_c_expr_source_range on
4866 the stack values for TRUTH_ANDIF_EXPR and TRUTH_ORIF_EXPR.
4867 (c_parser_cast_expression): Call set_c_expr_source_range on ret
4868 based on the cast_loc through to the end of the expr.
4869 (c_parser_unary_expression): Likewise, based on the
4870 op_loc through to the end of op.
4871 (c_parser_sizeof_expression) Likewise, based on the start of the
4872 sizeof token through to either the closing paren or the end of
4873 expr.
4874 (c_parser_postfix_expression): Likewise, using the token range,
4875 or from the open paren through to the close paren for
4876 parenthesized expressions.
4877 (c_parser_postfix_expression_after_primary): Likewise, for
4878 various kinds of expression.
4879 * c-tree.h (struct c_expr): Add field "src_range".
4880 (c_expr::get_start): New method.
4881 (c_expr::get_finish): New method.
4882 (set_c_expr_source_range): New decls.
4883 * c-typeck.c (parser_build_unary_op): Call set_c_expr_source_range
4884 on ret for prefix unary ops.
4885 (parser_build_binary_op): Likewise, running from the start of
4886 arg1.value through to the end of arg2.value.
4887
ec8b536f
MP
48882015-11-13 Marek Polacek <polacek@redhat.com>
4889
4890 PR c/68320
4891 * c-parser.c (c_parser_for_statement): Treat unknown tokens as IDs.
4892
277fe616
DM
48932015-11-13 David Malcolm <dmalcolm@redhat.com>
4894
4895 * c-typeck.c: Include spellcheck.h.
4896 (lookup_field_fuzzy_find_candidates): New function.
4897 (lookup_field_fuzzy): New function.
4898 (build_component_ref): If the field was not found, try using
4899 lookup_field_fuzzy and potentially offer a suggestion.
4900
6e232ba4
JN
49012015-11-12 James Norris <jnorris@codesourcery.com>
4902 Joseph Myers <joseph@codesourcery.com>
4903
4904 * c-parser.c (c_parser_pragma): Handle PRAGMA_OACC_DECLARE.
4905 (c_parser_omp_clause_name): Handle 'device_resident' clause.
4906 (c_parser_oacc_data_clause): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
4907 and PRAGMA_OMP_CLAUSE_LINK.
4908 (c_parser_oacc_all_clauses): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
4909 and PRAGMA_OACC_CLAUSE_LINK.
4910 (OACC_DECLARE_CLAUSE_MASK): New definition.
4911 (c_parser_oacc_declare): New function.
4912
9be4f715
MP
49132015-11-12 Marek Polacek <polacek@redhat.com>
4914
4915 PR c/67784
4916 * c-parser.c (c_parser_for_statement): Reclassify the token in
4917 a correct scope.
4918
e78bede6
MP
49192015-11-11 Marek Polacek <polacek@redhat.com>
4920
4921 PR c/68107
4922 PR c++/68266
4923 * c-decl.c (grokdeclarator): Call valid_array_size_p. Remove code
4924 checking the size of an array.
4925
69f293c9
AM
49262015-11-11 Andrew MacLeod <amacleod@redhat.com>
4927
4928 * c-array-notation.c: Remove unused header files.
4929 * c-aux-info.c: Likewise.
4930 * c-convert.c: Likewise.
4931 * c-decl.c: Likewise.
4932 * c-errors.c: Likewise.
4933 * c-lang.c: Likewise.
4934 * c-objc-common.c: Likewise.
4935 * c-parser.c: Likewise.
4936 * c-typeck.c: Likewise.
4937 * gccspec.c: Likewise.
4938
3a40d81d
NS
49392015-11-09 Thomas Schwinge <thomas@codesourcery.com>
4940 Cesar Philippidis <cesar@codesourcery.com>
4941 James Norris <jnorris@codesourcery.com>
4942 Julian Brown <julian@codesourcery.com>
4943 Nathan Sidwell <nathan@codesourcery.com>
4944
3a40d81d
NS
4945 * c-parser.c (c_parser_declaration_or_fndef): Add OpenACC
4946 routine arg.
4947 (c_parser_declaration_or_fndef): Call c_finish_oacc_routine.
4948 (c_parser_pragma): Parse 'acc routine'.
4949 (OACC_ROUTINE_CLAUSE_MARK): Define.
4950 (c_parser_oacc_routine, (c_finish_oacc_routine): New.
4951
fc402eec
AA
49522015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
4953
4954 PR debug/67192
4955 * c-typeck.c (c_finish_loop): For unconditional loops, set the
4956 location of the backward-goto to the start of the loop body.
4957
f6b0b3db
AA
49582015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
4959
4960 PR debug/67192
4961 * c-parser.c (c_parser_while_statement): Finish the loop before
4962 parsing ahead for misleading indentation.
4963 (c_parser_for_statement): Likewise.
4964
ee45a32d
EB
49652015-11-08 Eric Botcazou <ebotcazou@adacore.com>
4966
4967 * c-decl.c (finish_struct): If the structure has reverse storage
4968 order, rewrite the type of array fields with scalar component. Call
4969 maybe_apply_pragma_scalar_storage_order on entry.
4970 * c-typeck.c (build_unary_op) <ADDR_EXPR>: Remove left-overs. Issue
4971 errors on bit-fields and reverse SSO here and not...
4972 (c_mark_addressable): ...here.
4973 (output_init_element): Adjust call to initializer_constant_valid_p.
4974 (c_build_qualified_type): Propagate TYPE_REVERSE_STORAGE_ORDER.
4975
8a645150
DM
49762015-11-06 David Malcolm <dmalcolm@redhat.com>
4977
4978 * c-decl.c (warn_defaults_to): Update for change in signature
4979 of diagnostic_set_info.
4980 * c-errors.c (pedwarn_c99): Likewise.
4981 (pedwarn_c90): Likewise.
4982 * c-objc-common.c (c_tree_printer): Update for new "caret_p" param
4983 for textinfo::set_location.
4984
7a5e4956
CP
49852015-11-05 Cesar Philippidis <cesar@codesourcery.com>
4986 Thomas Schwinge <thomas@codesourcery.com>
4987 James Norris <jnorris@codesourcery.com>
4988
4989 * c-parser.c (c_parser_omp_clause_name): Add support for
4990 PRAGMA_OACC_CLAUSE_INDEPENDENT and PRAGMA_OACC_CLAUSE_TILE.
4991 (c_parser_omp_clause_default): Add is_oacc argument. Handle
4992 default(none) in OpenACC.
4993 (c_parser_oacc_shape_clause): Allow pointer variables as gang static
4994 arguments.
4995 (c_parser_oacc_clause_tile): New function.
4996 (c_parser_oacc_all_clauses): Add support for OMP_CLAUSE_DEFAULT,
4997 OMP_CLAUSE_INDEPENDENT and OMP_CLAUSE_TILE.
4998 (OACC_LOOP_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_{PRIVATE,INDEPENDENT,
4999 TILE}.
5000 (OACC_KERNELS_MASK): Add PRAGMA_OACC_CLAUSE_DEFAULT.
5001 (OACC_PARALLEL_MASK): Add PRAGMA_OACC_CLAUSE_{DEFAULT,PRIVATE,
5002 FIRSTPRIVATE}.
5003 (c_parser_omp_all_clauses): Update call to c_parser_omp_clause_default.
5004 (c_parser_oacc_update): Update the error message for missing clauses.
5005 * c-typeck.c (c_finish_omp_clauses): Add support for OMP_CLAUSE_TILE
5006 and OMP_CLAUSE_INDEPENDENT.
5007
bfcfbfa0
MP
50082015-11-05 Marek Polacek <polacek@redhat.com>
5009
5010 PR c/68090
5011 * c-parser.c (c_parser_postfix_expression_after_paren_type): Don't
5012 deal with pre-evaluation on invalid types.
5013
e01d41e5
JJ
50142015-11-05 Jakub Jelinek <jakub@redhat.com>
5015 Ilya Verbin <ilya.verbin@intel.com>
5016
5017 * c-parser.c: Include context.h and gimple-expr.h.
5018 (c_parser_omp_clause_schedule): Parse schedule modifiers, diagnose
5019 monotonic together with nonmonotonic.
5020 (c_parser_omp_for_loop): Call c_omp_check_loop_iv. Call add_stmt here.
5021 (OMP_DISTRIBUTE_CLAUSE_MASK): Add lastprivate clause.
5022 (c_parser_omp_target_data, c_parser_omp_target_enter_data,
5023 c_parser_omp_target_exit_data): Allow GOMP_MAP_ALWAYS_POINTER.
5024 (c_parser_omp_target): Likewise. Evaluate num_teams and thread_limit
5025 expressions on combined target teams before the target.
5026 (c_parser_omp_declare_target): If decl has "omp declare target" or
5027 "omp declare target link" attribute, and cgraph or varpool node already
5028 exists, then set corresponding flags. Call c_finish_omp_clauses
5029 in the parenthesized extended-list syntax case.
5030 * c-decl.c (c_decl_attributes): Don't diagnose block scope vars inside
5031 declare target.
5032 * c-typeck.c (handle_omp_array_sections_1): Allow non-zero low-bound
5033 on OMP_CLAUSE_REDUCTION array sections.
5034 (handle_omp_array_sections): Encode low-bound into the MEM_REF, either
5035 into the constant offset, or for variable low-bound using
5036 POINTER_PLUS_EXPR. For structure element based array sections use
5037 GOMP_MAP_ALWAYS_POINTER instead of GOMP_MAP_FIRSTPRIVATE_POINTER.
5038 (c_finish_omp_clauses): Drop generic_field_head, structure
5039 elements are now always mapped even as array section bases,
5040 diagnose same var in data sharing and mapping clauses. Diagnose if
5041 linear step on declare simd is neither a constant nor a uniform
5042 parameter. Look through POINTER_PLUS_EXPR for array section
5043 reductions. Diagnose the same var or function appearing multiple
5044 times on the same directive. Fix up wording for the to clause if t
5045 is neither a FUNCTION_DECL nor a VAR_DECL. Diagnose nonmonotonic
5046 modifier on kinds other than dynamic or guided or nonmonotonic
5047 modifier together with ordered clause.
5048
4bf9e5a8
TS
50492015-11-03 Thomas Schwinge <thomas@codesourcery.com>
5050 Chung-Lin Tang <cltang@codesourcery.com>
5051
5052 * c-parser.c (c_parser_omp_construct): Handle PRAGMA_OACC_ATOMIC.
5053
2adfab87
AM
50542015-10-29 Andrew MacLeod <amacleod@redhat.com>
5055
5056 * c-array-notation.c: Reorder #include's and remove duplicates.
5057 * c-aux-info.c: Likewise.
5058 * c-convert.c: Likewise.
5059 * c-decl.c: Likewise.
5060 * c-errors.c: Likewise.
5061 * c-lang.c: Likewise.
5062 * c-objc-common.c: Likewise.
5063 * c-parser.c: Likewise.
5064 * c-typeck.c: Likewise.
5065
e922069e
JW
50662015-10-26 Jim Wilson <jim.wilson@linaro.org>
5067
5068 PR debug/66068
5069 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
5070 after calling build_qualified_type.
5071
765dd391
CP
50722015-10-27 Cesar Philippidis <cesar@codesourcery.com>
5073 Thomas Schwinge <thomas@codesourcery.com>
5074 James Norris <jnorris@codesourcery.com>
5075 Joseph Myers <joseph@codesourcery.com>
5076 Julian Brown <julian@codesourcery.com>
5077 Bernd Schmidt <bschmidt@redhat.com>
5078
5079 * c-parser.c (c_parser_oacc_shape_clause): New.
5080 (c_parser_oacc_simple_clause): New.
5081 (c_parser_oacc_all_clauses): Add auto, gang, seq, vector, worker.
5082 (OACC_LOOP_CLAUSE_MASK): Add gang, worker, vector, auto, seq.
5083
88bae6f4
TS
50842015-10-27 Thomas Schwinge <thomas@codesourcery.com>
5085 James Norris <jnorris@codesourcery.com>
5086 Cesar Philippidis <cesar@codesourcery.com>
5087
5088 PR c/64765
5089 PR c/64880
5090 * c-parser.c (c_parser_oacc_loop): Add mask, cclauses formal
5091 parameters, and handle these. Adjust all users.
5092 (c_parser_oacc_kernels, c_parser_oacc_parallel): Merge functions
5093 into...
5094 (c_parser_oacc_kernels_parallel): ... this new function. Adjust
5095 all users.
5096 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels): Don't
5097 declare functions.
5098 (c_finish_omp_construct): Declare function.
5099 * c-typeck.c (c_finish_oacc_parallel, c_finish_oacc_kernels):
5100 Merge functions into...
5101 (c_finish_omp_construct): ... this new function.
5102
a8fc2579
RB
51032015-10-22 Richard Biener <rguenther@suse.de>
5104
5105 * c-typeck.c (c_finish_omp_clauses): Properly convert operands
5106 before folding a MINUS_EXPR.
5107
e9122ef6
MP
51082015-10-21 Marek Polacek <polacek@redhat.com>
5109
5110 PR c/68024
5111 * c-decl.c (start_function): Warn about vararg functions without
5112 a prototype.
5113
9f47c7e5
IE
51142015-10-21 Ilya Enkovich <enkovich.gnu@gmail.com>
5115
5116 * c-typeck.c (build_conditional_expr): Use boolean vector
5117 type for vector comparison.
5118 (build_vec_cmp): New.
5119 (build_binary_op): Use build_vec_cmp for comparison.
5120
fa60eeb9
MP
51212015-10-20 Marek Polacek <polacek@redhat.com>
5122
5123 * c-parser.c (is_cilkplus_vector_p): Don't define here.
5124
2c7020eb
MP
51252015-10-20 Marek Polacek <polacek@redhat.com>
5126
5127 PR c/67964
5128 * c-parser.c (c_parser_attributes): Break out of the loop if the
5129 token after an attribute isn't a comma.
5130
d9a6bd32
JJ
51312015-10-13 Jakub Jelinek <jakub@redhat.com>
5132 Aldy Hernandez <aldyh@redhat.com>
5133
5134 * c-parser.c (c_parser_pragma): Handle PRAGMA_OMP_ORDERED here.
5135 (c_parser_omp_clause_name): Handle OpenMP 4.5 clauses.
5136 (c_parser_omp_variable_list): Handle structure elements for
5137 map, to and from clauses. Handle array sections in reduction
5138 clause. Formatting fixes.
5139 (c_parser_omp_clause_if): Add IS_OMP argument, handle parsing of
5140 if clause modifiers.
5141 (c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
5142 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
5143 c_parser_omp_clause_defaultmap, c_parser_omp_clause_use_device_ptr,
5144 c_parser_omp_clause_is_device_ptr): New functions.
5145 (c_parser_omp_clause_ordered): Parse optional parameter.
5146 (c_parser_omp_clause_reduction): Handle array reductions.
5147 (c_parser_omp_clause_schedule): Parse optional simd modifier.
5148 (c_parser_omp_clause_nogroup, c_parser_omp_clause_orderedkind): New
5149 functions.
5150 (c_parser_omp_clause_linear): Parse linear clause modifiers.
5151 (c_parser_omp_clause_depend_sink): New function.
5152 (c_parser_omp_clause_depend): Parse source/sink depend kinds.
5153 (c_parser_omp_clause_map): Parse release/delete map kinds and
5154 optional always modifier.
5155 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_if
5156 and c_finish_omp_clauses callers.
5157 (c_parser_omp_all_clauses): Likewise. Parse OpenMP 4.5 clauses.
5158 Parse "to" as OMP_CLAUSE_TO_DECLARE if on declare target directive.
5159 (c_parser_oacc_cache): Adjust c_finish_omp_clauses caller.
5160 (OMP_CRITICAL_CLAUSE_MASK): Define.
5161 (c_parser_omp_critical): Parse critical clauses.
5162 (c_parser_omp_for_loop): Handle doacross loops, adjust
5163 c_finish_omp_for and c_finish_omp_clauses callers.
5164 (OMP_SIMD_CLAUSE_MASK): Add simdlen clause.
5165 (c_parser_omp_simd): Allow ordered clause if it has no parameter.
5166 (OMP_FOR_CLAUSE_MASK): Add linear clause.
5167 (c_parser_omp_for): Disallow ordered clause when combined with
5168 distribute. Disallow linear clause when combined with distribute
5169 and not combined with simd.
5170 (OMP_ORDERED_CLAUSE_MASK, OMP_ORDERED_DEPEND_CLAUSE_MASK): Define.
5171 (c_parser_omp_ordered): Add CONTEXT argument, remove LOC argument,
5172 parse clauses and if depend clause is found, don't parse a body.
5173 (c_parser_omp_parallel): Disallow copyin clause on target parallel.
5174 Allow target parallel without for after it.
5175 (OMP_TASK_CLAUSE_MASK): Add priority clause.
5176 (OMP_TARGET_DATA_CLAUSE_MASK): Add use_device_ptr clause.
5177 (c_parser_omp_target_data): Diagnose no map clauses or clauses with
5178 invalid kinds.
5179 (OMP_TARGET_UPDATE_CLAUSE_MASK): Add depend and nowait clauses.
5180 (OMP_TARGET_ENTER_DATA_CLAUSE_MASK,
5181 OMP_TARGET_EXIT_DATA_CLAUSE_MASK): Define.
5182 (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): New
5183 functions.
5184 (OMP_TARGET_CLAUSE_MASK): Add depend, nowait, private, firstprivate,
5185 defaultmap and is_device_ptr clauses.
5186 (c_parser_omp_target): Parse target parallel and target simd. Set
5187 OMP_TARGET_COMBINED on combined constructs. Parse target enter data
5188 and target exit data. Diagnose invalid map kinds.
5189 (OMP_DECLARE_TARGET_CLAUSE_MASK): Define.
5190 (c_parser_omp_declare_target): Parse OpenMP 4.5 forms of this
5191 construct.
5192 (c_parser_omp_declare_reduction): Use STRIP_NOPS when checking for
5193 &omp_priv.
5194 (OMP_TASKLOOP_CLAUSE_MASK): Define.
5195 (c_parser_omp_taskloop): New function.
5196 (c_parser_omp_construct): Don't handle PRAGMA_OMP_ORDERED here,
5197 handle PRAGMA_OMP_TASKLOOP.
5198 (c_parser_cilk_for): Adjust c_finish_omp_clauses callers.
5199 * c-tree.h (c_finish_omp_clauses): Add two new arguments.
5200 * c-typeck.c (handle_omp_array_sections_1): Fix comment typo.
5201 Add IS_OMP argument, handle structure element bases, diagnose
5202 bitfields, pass IS_OMP recursively, diagnose known zero length
5203 array sections in depend clauses, handle array sections in reduction
5204 clause, diagnose negative length even for pointers.
5205 (handle_omp_array_sections): Add IS_OMP argument, use auto_vec for
5206 types, pass IS_OMP down to handle_omp_array_sections_1, handle
5207 array sections in reduction clause, set
5208 OMP_CLAUSE_MAP_MAYBE_ZERO_LENGTH_ARRAY_SECTION if map could be zero
5209 length array section, use GOMP_MAP_FIRSTPRIVATE_POINTER for IS_OMP.
5210 (c_finish_omp_clauses): Add IS_OMP and DECLARE_SIMD arguments.
5211 Handle new OpenMP 4.5 clauses and new restrictions for the old ones.
5212
21ba0cea
MP
52132015-10-06 Marek Polacek <polacek@redhat.com>
5214
5215 * c-parser.c (c_parser_statement_after_labels): Use
5216 protected_set_expr_location.
5217 (c_parser_omp_clause_num_gangs): Likewise.
5218 (c_parser_omp_clause_num_threads): Likewise.
5219 (c_parser_omp_clause_num_workers): Likewise.
5220 (c_parser_omp_clause_vector_length): Likewise.
5221 (c_parser_omp_clause_num_teams): Likewise.
5222 (c_parser_omp_clause_thread_limit): Likewise.
5223 * c-typeck.c (build_c_cast): Likewise.
5224 (c_cast_expr): Likewise.
5225
624d31fe
RS
52262015-10-05 Richard Sandiford <richard.sandiford@arm.com>
5227
5228 * c-typeck.c (c_tree_equal): Use real_equal instead of
5229 REAL_VALUES_EQUAL.
5230
b8fd7909
JM
52312015-10-04 Jason Merrill <jason@redhat.com>
5232
5233 * c-parser.c (c_lex_one_token): Handle @synchronized.
5234 * c-decl.c (match_builtin_function_types): A declaration of a built-in
5235 can change whether the function is transaction_safe.
5236
1c7485af
MP
52372015-10-02 Marek Polacek <polacek@redhat.com>
5238
5239 PR c/67730
5240 * c-typeck.c (convert_for_assignment): Use the expansion point
5241 location throughout.
5242
3e3b8d63
MP
52432015-10-02 Marek Polacek <polacek@redhat.com>
5244
5245 PR c/64249
5246 * c-parser.c (c_parser_statement_after_labels): Add CHAIN parameter
5247 and pass it down to c_parser_if_statement.
5248 (c_parser_else_body): Add CHAIN parameter and pass it down to
5249 c_parser_statement_after_labels.
5250 (c_parser_if_statement): Add CHAIN parameter. Add code to warn about
5251 duplicated if-else-if conditions.
5252
aabef2de
MP
52532015-10-01 Marek Polacek <polacek@redhat.com>
5254
5255 * c-typeck.c (convert_for_assignment): Improve commentary.
5256
de8ddd5f
MP
52572015-09-30 Marek Polacek <polacek@redhat.com>
5258
5259 PR c/67730
5260 * c-typeck.c (c_finish_return): Use the expansion point location for
5261 certain "return with value" warnings.
5262
c4914de6
MLI
52632015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
5264
5265 * c-parser.c (pragma_lex): Add loc argument.
5266
0e36f5c7
MP
52672015-09-15 Marek Polacek <polacek@redhat.com>
5268
5269 PR c/67580
5270 * c-decl.c (tag_exists_p): New function.
5271 * c-parser.c (c_parser_declaration_or_fndef): Give a hint when
5272 struct/union/enum keywords are missing.
5273 * c-tree.h (tag_exists_p): Declare.
5274
2f3bb934
MP
52752015-09-15 Marek Polacek <polacek@redhat.com>
5276
5277 * c-decl.c (lookup_label): Return NULL_TREE instead of 0.
5278 (lookup_tag): Change the type of THISLEVEL_ONLY to bool.
5279 Return NULL_TREE instead of 0.
5280 (lookup_name): Return NULL_TREE instead of 0.
5281 (lookup_name_in_scope): Likewise.
5282 (shadow_tag_warned): Use true instead of 1 and NULL_TREE instead of 0.
5283 (parser_xref_tag): Use false instead of 0.
5284 (start_struct): Use true instead of 1.
5285 (start_enum): Use true instead of 1 and NULL_TREE instead of 0.
5286
aa256c4a
MP
52872015-09-14 Marek Polacek <polacek@redhat.com>
5288
5289 * c-typeck.c (set_nonincremental_init_from_string): Use
5290 HOST_WIDE_INT_M1U when shifting a negative value.
5291
dbb68221
MW
52922015-09-09 Mark Wielaard <mjw@redhat.com>
5293
5294 * c-typeck.c (build_binary_op): Check and warn when nonnull arg
5295 parm against NULL.
5296
a8a098ac
JJ
52972015-09-10 Jakub Jelinek <jakub@redhat.com>
5298
5299 PR c/67502
5300 * c-parser.c (c_parser_omp_for_loop): Emit DECL_EXPR stmts
5301 into OMP_FOR_PRE_BODY rather than before the loop.
5302
f4b189d5
JJ
53032015-09-09 Jakub Jelinek <jakub@redhat.com>
5304
0bb99c11
JJ
5305 PR c/67501
5306 * c-parser.c (c_parser_oacc_all_clauses,
5307 c_parser_omp_all_clauses): Remove invalid clause from
5308 list of clauses even if parser->error is set.
5309
fce5e5e3
JJ
5310 PR c/67500
5311 * c-parser.c (c_parser_omp_clause_aligned,
5312 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen): Fix up
5313 test for errors.
5314 * c-decl.c (temp_pop_parm_decls): Allow b->decl equal to
5315 error_mark_node.
5316
f4b189d5
JJ
5317 PR c/67495
5318 * c-parser.c (c_parser_omp_atomic): Use c_parser_cast_expression
5319 instead of c_parser_unary_expression. If the result is !lvalue_p,
5320 wrap the result of c_fully_fold into NON_LVALUE_EXPR.
5321
b2aaf235
MP
53222015-09-04 Marek Polacek <polacek@redhat.com>
5323
5324 PR sanitizer/67279
5325 * c-typeck.c (build_binary_op): Don't instrument static initializers.
5326
1807ffc1
MS
53272015-09-03 Martin Sebor <msebor@redhat.com>
5328
5329 PR c/66516
8b652e65
JJ
5330 * c-typeck.c (convert_arguments, parser_build_unary_op,
5331 build_conditional_expr, c_cast_expr, convert_for_assignment,
5332 build_binary_op, _objc_common_truthvalue_conversion): Call
1807ffc1
MS
5333 reject_gcc_builtin.
5334 (c_decl_implicit): Define.
5335
d04ff417
MP
53362015-09-02 Marek Polacek <polacek@redhat.com>
5337
5338 PR c/67432
5339 * c-parser.c (c_parser_enum_specifier): Give a better error for
5340 an empty enum.
5341
a79683d5
TS
53422015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
5343
5344 * c-aux-info.c, c-parser.c, c-tree.h: Remove useless typedefs.
5345
191a6b94
MP
53462015-08-12 Marek Polacek <polacek@redhat.com>
5347
5348 * c-decl.c (grokdeclarator): Call error_at instead of error and pass
5349 LOC to it.
5350
420a9d9b
MP
53512015-08-03 Marek Polacek <polacek@redhat.com>
5352
5353 PR c/67088
5354 * c-decl.c (check_bitfield_type_and_width): Add location parameter.
5355 Use it.
5356 (grokdeclarator): Pass LOC down to check_bitfield_type_and_width.
5357
992118a1
PP
53582015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
5359
5360 * c-parser.c (c_parser_if_body): Take token_indent_info
5361 argument. Call warn_for_misleading_indentation even when the
5362 body is a semicolon. Extract token_indent_infos corresponding
5363 to the guard, body and next tokens. Adjust call to
5364 warn_for_misleading_indentation accordingly.
5365 (c_parser_else_body): Likewise.
5366 (c_parser_if_statement): Likewise.
5367 (c_parser_while_statement): Likewise.
5368 (c_parser_for_statement): Likewise.
5369
46308474
LFSM
53702015-07-28 Luis Felipe Strano Moraes <luis.strano@gmail.com>
5371 Manuel López-Ibáñez <manu@gcc.gnu.org>
5372
5373 * c-decl.c (get_parm_info): Remove static var. Update warning
5374 message.
5375
05b28fd6
MP
53762015-07-27 Marek Polacek <polacek@redhat.com>
5377
5378 PR c++/66555
5379 PR c/54979
5380 * c-typeck.c (parser_build_binary_op): Call warn_tautological_cmp.
5381
451b5e48
MP
53822015-07-20 Marek Polacek <polacek@redhat.com>
5383
5384 PR c++/55095
5385 * c-typeck.c (digest_init): Pass OPT_Wpedantic to pedwarn_init.
5386 (build_binary_op): Warn about left shift overflows.
5387
1916bcb5
AM
53882015-07-09 Andrew MacLeod <amacleod@redhat.com>
5389
5390 * c-array-notation.c: Adjust includes for flags.h changes.
5391 * c-objc-common.c: Likewise.
5392
c7131fb2
AM
53932015-07-07 Andrew MacLeod <amacleod@redhat.com>
5394
5395 * c-array-notation.c: Adjust includes.
5396 * c-aux-info.c: Likewise.
5397 * c-convert.c: Likewise.
5398 * c-decl.c: Likewise.
5399 * c-errors.c: Likewise.
5400 * c-lang.c: Likewise.
5401 * c-objc-common.c: Likewise.
5402 * c-parser.c: Likewise.
5403 * c-typeck.c: Likewise.
5404
da2e71c9
MLI
54052015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
5406
5407 PR fortran/66605
5408 * c-decl.c (finish_function): Call do_warn_unused_parameter.
5409
b155cfd9
MP
54102015-06-29 Marek Polacek <polacek@redhat.com>
5411
5412 PR c/66322
5413 * c-typeck.c (struct c_switch): Add BOOL_COND_P and OUTSIDE_RANGE_P.
5414 (c_start_case): Set BOOL_COND_P and OUTSIDE_RANGE_P. Don't warn
5415 about -Wswitch-bool here.
5416 (do_case): Update c_add_case_label call.
5417 (c_finish_case): Update c_do_switch_warnings call.
5418
31521951
MP
54192015-06-27 Marek Polacek <polacek@redhat.com>
5420
5421 * c-typeck.c: Use VECTOR_TYPE_P throughout.
5422
22d03525
MP
54232015-06-26 Marek Polacek <polacek@redhat.com>
5424
5425 * c-array-notation.c (fix_builtin_array_notation_fn): Use
5426 INDIRECT_REF_P.
5427 * c-typeck.c (array_to_pointer_conversion): Likewise.
5428 (build_unary_op): Likewise.
5429 (c_finish_return): Likewise.
5430
f0889939
AM
54312015-06-25 Andrew MacLeod <amacleod@redhat.com>
5432
5433 * c-decl.c: Remove ipa-ref.h and plugin-api.h from include list.
5434 * c-parser.c: Likewise.
5435
8d67ee55
RS
54362015-06-25 Richard Sandiford <richard.sandiford@arm.com>
5437
5438 * c-decl.c (detect_field_duplicates_hash): Use nofree_ptr_hash
5439 instead of pointer_hash.
5440 (detect_field_duplicates): Likewise.
5441
0ae9bd27
MP
54422015-06-25 Marek Polacek <polacek@redhat.com>
5443
5444 * c-array-notation.c: Use VAR_P throughout.
5445 * c-decl.c: Likewise.
5446 * c-objc-common.c: Likewise.
5447 * c-parser.c: Likewise.
5448 * c-typeck.c: Likewise.
5449
62f9079a
MP
54502015-06-25 Marek Polacek <polacek@redhat.com>
5451
5452 * c-decl.c: Use is_global_var throughout.
5453 * c-parser.c: Likewise.
5454 * c-typeck.c: Likewise.
5455
abb226c9
AM
54562015-06-17 Andrew MacLeod <amacleod@redhat.com>
5457
5458 * c-array-notation.c: Do not include input.h, line-map.h or is-a.h.
5459 * c-aux-info.c: Likewise.
5460 * c-convert.c: Likewise.
5461 * c-decl.c: Likewise.
5462 * c-errors.c: Likewise.
5463 * c-lang.c: Likewise.
5464 * c-objc-common.c: Likewise.
5465 * c-parser.c: Likewise.
5466 * c-typeck.c: Likewise.
5467
8cbababc
JH
54682015-06-11 Jan Hubicka <hubicka@ucw.cz>
5469
5470 PR middle-end/66325
5471 * c-decl.c (start_enum): Set TYPE_PACKED consistently among type
5472 variants.
5473
a0349665
PMR
54742015-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
5475
5476 * c-decl.c (pop_scope): Register the main translation unit
5477 through the new debug hook.
5478
13fdf2e2
AM
54792015-06-08 Andrew MacLeod <amacleod@redhat.com>
5480
5481 * c-array-notation.c : Adjust include files.
5482 * c-aux-info.c : Likewise.
5483 * c-convert.c : Likewise.
5484 * c-decl.c : Likewise.
5485 * c-errors.c : Likewise.
5486 * c-lang.c : Likewise.
5487 * c-lang.h : Likewise.
5488 * c-objc-common.c : Likewise.
5489 * c-parser.c : Likewise.
5490 * c-typeck.c : Likewise.
5491
d7438551
AH
54922015-06-05 Aldy Hernandez <aldyh@redhat.com>
5493
5494 * c-decl.c (finish_struct): Save C_TYPE_INCOMPLETE_VARS and
5495 immediately clobber it.
5496 (c_write_global_declarations_1): Remove call to
5497 check_global_declaration_1.
5498 (c_write_global_declarations_2): Remove.
5499 (c_write_final_cleanups): Rename from c_write_global_declarations.
5500 Remove call to finalize_compilation_unit.
5501 Remove calls to debugging hooks.
5502 * c-objc-common.c: Adjust comment for c_warn_unused_global_decl.
5503 * c-objc-common.h: Remove LANG_HOOKS_WRITE_GLOBALS.
5504 * c-tree.h: Remove c_write_global_declarations.
5505
ecb9f223
AM
55062015-06-04 Andrew MacLeod <amacleod@redhat.com>
5507
5508 * c-array-notation.c: Adjust includes for restructured coretypes.h.
5509 * c-aux-info.c: Likewise.
5510 * c-convert.c: Likewise.
5511 * c-decl.c: Likewise.
5512 * c-errors.c: Likewise.
5513 * c-lang.c: Likewise.
5514 * c-objc-common.c: Likewise.
5515 * c-parser.c: Likewise.
5516 * c-typeck.c: Likewise.
5517
9482b620
MP
55182015-06-04 Marek Polacek <polacek@redhat.com>
5519
5520 PR c/66341
5521 * c-typeck.c (build_c_cast): Wrap VALUE into NON_LVALUE_EXPR if
5522 it is a lvalue.
5523
bc51ace3
PK
55242015-06-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
5525
5526 * c-decl.c (warn_cxx_compat_finish_struct): New parameters code, record_loc.
5527 Warn for empty struct.
5528 (finish_struct): Pass TREE_CODE(t) and loc to warn_cxx_compat_finish_struct.
5529
ea5b45b6
AT
55302015-06-02 Andres Tiraboschi <andres.tiraboschi@tallertechnologies.com>
5531
5532 * c-decl.c (start_function): Call plugin before parsing.
5533 (finish_function): Call plugin after parsing.
5534
c2d47482
PK
55352015-06-02 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
5536
5537 PR c/49551
5538 * c-decl.c (merge_decls): Merge DECL_COMMON.
5539
a95492ab
JW
55402015-05-22 Jim Wilson <jim.wilson@linaro.org>
5541
5542 * Make-lang.in (check_gcc_pallelize): Define.
5543
fd5c817a
MP
55442015-05-22 Marek Polacek <polacek@redhat.com>
5545
5546 PR c/47043
5547 * c-parser.c (c_parser_enum_specifier): Parse and apply enumerator
5548 attributes.
5549
c7b70a3c
MP
55502015-05-21 Marek Polacek <polacek@redhat.com>
5551
5552 * c-typeck.c (inform_declaration): Use DECL_IS_BUILTIN instead of
5553 DECL_BUILT_IN.
5554
21b634ae
MP
55552015-05-20 Marek Polacek <polacek@redhat.com>
5556
5557 * c-decl.c: Use VAR_OR_FUNCTION_DECL_P throughout.
5558 * c-typeck.c: Likewise.
5559
296a8c2f
MP
55602015-05-19 Marek Polacek <polacek@redhat.com>
5561
5562 * c-typeck.c (start_init): Use AGGREGATE_TYPE_P.
5563
41b37d5e
JJ
55642015-05-19 Jakub Jelinek <jakub@redhat.com>
5565
5566 PR middle-end/66199
5567 * c-parser.c (c_parser_omp_for_loop): Don't add
5568 OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
5569 OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
5570 (c_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
5571 constructs.
5572
fab27f52
MM
55732015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
5574
5575 * c-typeck.c (build_array_ref): Use std::swap instead of explicit
296a8c2f 5576 swaps.
fab27f52 5577
40de31cf
MLI
55782015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
5579
5580 PR fortran/44054
5581 * c-objc-common.c (c_tree_printer): Replace locus pointer with
5582 accessor function.
5583
3aa3c9fc
MP
55842015-05-14 Marek Polacek <polacek@redhat.com>
5585
5586 PR c/66066
5587 PR c/66127
5588 * c-typeck.c (digest_init): Call pedwarn_init with OPT_Wpedantic
5589 rather than with 0.
5590
c3388e62
DM
55912015-05-12 David Malcolm <dmalcolm@redhat.com>
5592
5593 * c-parser.c (c_parser_if_body): Add param "if_loc", use it
5594 to add a call to warn_for_misleading_indentation.
5595 (c_parser_else_body): Likewise, adding param "else_loc".
5596 (c_parser_if_statement): Check for misleading indentation.
5597 (c_parser_while_statement): Likewise.
5598 (c_parser_for_statement): Likewise.
5599
755e528f
MP
56002015-05-08 Marek Polacek <polacek@redhat.com>
5601
5602 PR c/64918
5603 * c-typeck.c (add_pending_init): Use OPT_Woverride_init_side_effects.
5604 (output_init_element): Likewise.
5605
0173bd2a
MP
56062015-05-07 Marek Polacek <polacek@redhat.com>
5607
5608 PR c/65179
5609 * c-typeck.c (build_binary_op): Warn when left shifting a negative
5610 value.
5611
9babc352
MP
56122015-04-30 Marek Polacek <polacek@redhat.com>
5613
5614 * c-typeck.c (set_init_label): Call error_at instead of error and
5615 pass LOC to it.
5616
ac9f18db
MP
5617 * c-typeck.c (c_incomplete_type_error): Refactor to use %qT. Print
5618 the type of a decl.
5619
ec3fba51
MP
5620 * c-typeck.c (c_build_va_arg): Clarify the error message.
5621
b811915d
TS
56222015-04-29 Thomas Schwinge <thomas@codesourcery.com>
5623
5624 * c-parser.c (c_parser_oacc_enter_exit_data): Use
5625 OMP_STANDALONE_CLAUSES.
5626
f3075008
MP
56272015-04-28 Marek Polacek <polacek@redhat.com>
5628
5629 * c-parser.c (c_parser_binary_expression): Remove duplicate line.
5630
4e81b788
MP
56312015-04-28 Marek Polacek <polacek@redhat.com>
5632
5633 PR c/65901
5634 * c-typeck.c (c_build_va_arg): Require TYPE be a complete type.
5635
6c1db78e
MP
56362015-04-25 Marek Polacek <polacek@redhat.com>
5637
5638 PR c/52085
5639 * c-decl.c (finish_enum): Copy over TYPE_ALIGN. Also check for "mode"
5640 attribute.
5641
5c4abbb8
MP
56422015-04-23 Marek Polacek <polacek@redhat.com>
5643
5644 PR c/65345
5645 * c-decl.c (set_labels_context_r): New function.
5646 (store_parm_decls): Call it via walk_tree_without_duplicates.
5647 * c-typeck.c (convert_lvalue_to_rvalue): Use create_tmp_var_raw
5648 instead of create_tmp_var. Build TARGET_EXPR instead of
5649 COMPOUND_EXPR.
5650 (build_atomic_assign): Use create_tmp_var_raw instead of
5651 create_tmp_var. Build TARGET_EXPRs instead of MODIFY_EXPR.
5652
06aca1d5
IV
56532015-04-20 Ilya Verbin <ilya.verbin@intel.com>
5654
5655 * c-parser.c (c_parser_oacc_enter_exit_data): Remove excess semicolon.
5656 (c_parser_omp_target_update): Add missed %> to error_at ().
5657
8fba1830
BRF
56582015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
5659
5660 PR target/55143
5661 * c-decl.c (c_default_pointer_mode): Remove definition.
5662 * c-tree.h (c_default_pointer_mode): Remove declaration.
5663
62021f64
TB
56642015-03-27 Tobias Burnus <burnus@net-b.de>
5665
5666 PR c/65586
5667 * c-parser.c (c_parser_skip_to_pragma_eol): Optionally, don't
5668 error out.
5669 (c_parser_omp_for, c_parser_omp_parallel, c_parser_omp_distribute,
5670 c_parser_omp_teams, c_parser_omp_target, c_parser_omp_declare):
5671 Update calls to not error for skipped omp pragmas with -fopenmp-simd.
5672
9b65e171
JJ
56732015-03-19 Jakub Jelinek <jakub@redhat.com>
5674
5675 * c-decl.c (c_decl_attributes): Also add "omp declare target"
5676 attribute for DECL_EXTERNAL VAR_DECLs.
5677
17958621
JJ
56782015-03-11 Jakub Jelinek <jakub@redhat.com>
5679
5680 * c-parser.c (c_parse_init): Don't call xstrdup on get_identifier
5681 argument.
5682
7ccb1a11
JJ
56832015-03-10 Jakub Jelinek <jakub@redhat.com>
5684
5685 PR c/65120
5686 * c-typeck.c (parser_build_binary_op): Check for tcc_comparison
5687 before preparing arguments to warn_logical_not_parentheses.
5688
01177669
JJ
56892015-03-09 Jakub Jelinek <jakub@redhat.com>
5690
5691 PR c/65120
5692 * c-typeck.c (parser_build_binary_op): Don't warn for
5693 !!x == y or !b == y where b is _Bool.
5694
802ac282
MP
56952015-03-09 Marek Polacek <polacek@redhat.com>
5696
5697 * c-convert.c (convert): Make use of do_ubsan_in_current_function.
5698 * c-decl.c (grokdeclarator): Likewise.
5699 * c-typeck.c (build_binary_op): Likewise.
5700
e5165b60
MP
57012015-02-27 Marek Polacek <polacek@redhat.com>
5702
5703 PR c/65228
5704 * c-decl.c (start_decl): Return NULL_TREE if decl is an error node.
5705
065d214c
MP
57062015-02-14 Marek Polacek <polacek@redhat.com>
5707
5708 PR c/64768
5709 * c-decl.c (grokdeclarator): Set the range of a flexible array member
5710 declared through a typedef name.
5711
e5d9235b
MP
57122015-02-13 Marek Polacek <polacek@redhat.com>
5713
5714 PR c/65050
5715 * c-decl.c (grokdeclarator): Print also the type when giving
5716 the error message about array's incomplete element type.
5717
fa01ffcc
JJ
57182015-02-11 Jakub Jelinek <jakub@redhat.com>
5719
5720 PR c/64824
5721 * c-parser.c (c_parser_binary_expression): Fix OpenMP stack[sp].prec
5722 check in the POP macro.
5723
c3e38a03
MP
57242015-02-09 Marek Polacek <polacek@redhat.com>
5725
5726 PR c/64856
5727 * c-typeck.c (process_init_element): Don't always wrap
5728 COMPOUND_LITERAL_EXPR in a SAVE_EXPR in C99 mode when
5729 initializing a range of elements.
5730
4886ec8e
JJ
57312015-02-04 Jakub Jelinek <jakub@redhat.com>
5732
5733 PR c/64824
5734 PR c/64868
5735 * c-parser.c (c_parser_omp_atomic): Handle RDIV_EXPR.
5736
c3e38a03 57372015-02-02 Bruno Loff <bruno.loff@gmail.com>
a4bb6959
BL
5738
5739 * c-parser.c (c_parser_declspecs): Call invoke_plugin_callbacks after
5740 processing enum declaration.
5741
7b33f0c8
MP
57422015-01-29 Marek Polacek <polacek@redhat.com>
5743
5744 PR c/64709
5745 * c-typeck.c (pop_init_level): If constructor_elements has
5746 exactly one element with integer_zerop value, set constructor_zeroinit
5747 to 1. Remove braces around warning_init call.
5748
dea63e49
JJ
57492015-01-27 Jakub Jelinek <jakub@redhat.com>
5750
5751 PR c/64766
5752 * c-typeck.c (store_init_value): Don't overwrite DECL_INITIAL
5753 of FUNCTION_DECLs with error_mark_node.
5754
d38f7dce
JJ
57552015-01-26 Jakub Jelinek <jakub@redhat.com>
5756
5757 PR c/64778
5758 * c-typeck.c (convert_arguments): Return -1 if there are
5759 error_args, even if we've diagnosed too many arguments.
5760
cbf5d0e7
RB
57612015-01-21 Richard Biener <rguenther@suse.de>
5762
5763 PR middle-end/64313
5764 * c-decl.c (merge_decls): Call set_builtin_decl_declared_p
5765 for builtins the user declared correctly.
5766
41dbbb37
TS
57672015-01-15 Thomas Schwinge <thomas@codesourcery.com>
5768 Bernd Schmidt <bernds@codesourcery.com>
5769 Cesar Philippidis <cesar@codesourcery.com>
5770 James Norris <jnorris@codesourcery.com>
5771 Jakub Jelinek <jakub@redhat.com>
5772 Ilmir Usmanov <i.usmanov@samsung.com>
5773
5774 * c-parser.c: Include "gomp-constants.h".
5775 (c_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
5776 omp_clause_map_kind. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
5777 Use OMP_CLAUSE_SET_MAP_KIND.
5778 (c_parser_pragma): Handle PRAGMA_OACC_ENTER_DATA,
5779 PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_UPDATE.
5780 (c_parser_omp_construct): Handle PRAGMA_OACC_CACHE,
5781 PRAGMA_OACC_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP,
5782 PRAGMA_OACC_PARALLEL, PRAGMA_OACC_WAIT.
5783 (c_parser_omp_clause_name): Handle "auto", "async", "copy",
5784 "copyout", "create", "delete", "deviceptr", "gang", "host",
5785 "num_gangs", "num_workers", "present", "present_or_copy", "pcopy",
5786 "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
5787 "present_or_create", "pcreate", "seq", "self", "vector",
5788 "vector_length", "wait", "worker".
5789 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
5790 (OACC_ENTER_DATA_CLAUSE_MASK, OACC_EXIT_DATA_CLAUSE_MASK)
5791 (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
5792 (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
5793 (c_parser_omp_variable_list): Handle OMP_CLAUSE__CACHE_.
5794 (c_parser_oacc_wait_list, c_parser_oacc_data_clause)
5795 (c_parser_oacc_data_clause_deviceptr)
5796 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_workers)
5797 (c_parser_oacc_clause_async, c_parser_oacc_clause_wait)
5798 (c_parser_omp_clause_vector_length, c_parser_oacc_all_clauses)
5799 (c_parser_oacc_cache, c_parser_oacc_data, c_parser_oacc_kernels)
5800 (c_parser_oacc_enter_exit_data, c_parser_oacc_loop)
5801 (c_parser_oacc_parallel, c_parser_oacc_update)
5802 (c_parser_oacc_wait): New functions.
5803 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels)
5804 (c_finish_oacc_data): New prototypes.
5805 * c-typeck.c: Include "gomp-constants.h".
5806 (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR. Use
5807 GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use
5808 OMP_CLAUSE_SET_MAP_KIND.
5809 (c_finish_oacc_parallel, c_finish_oacc_kernels)
5810 (c_finish_oacc_data): New functions.
5811 (c_finish_omp_clauses): Handle OMP_CLAUSE__CACHE_,
5812 OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS,
5813 OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_ASYNC, OMP_CLAUSE_WAIT,
5814 OMP_CLAUSE_AUTO, OMP_CLAUSE_SEQ, OMP_CLAUSE_GANG,
5815 OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR, and OMP_CLAUSE_MAP's
5816 GOMP_MAP_FORCE_DEVICEPTR.
5817
adfac8df
JJ
58182015-01-09 Michael Collison <michael.collison@linaro.org>
5819
5820 * c-array-notation.c: Include hash-set.h, machmode.h,
5821 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
5822 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
5823 * c-aux-info.c: Ditto.
5824 * c-convert.c: Ditto.
5825 * c-decl.c: Ditto.
5826 * c-errors.c: Ditto.
5827 * c-lang.c: Dittoxs.
5828 * c-objc-common.c: Ditto.
5829 * c-parser.c: Ditto.
5830 * c-typeck.c: Include hash-set.h, machmode.h,
5831 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
5832 fold-const.h, wide-int.h, inchash.h, real.h and
5833 fixed-value.h due to flattening of tree.h.
5834
2cc901dc
MP
58352015-01-07 Marek Polacek <polacek@redhat.com>
5836
5837 PR c/64417
5838 * c-typeck.c (process_init_element): Disallow initialization of
5839 a flexible array member with a string constant if the structure
5840 is in an array.
5841
5624e564
JJ
58422015-01-05 Jakub Jelinek <jakub@redhat.com>
5843
e5341100
JJ
5844 PR sanitizer/64344
5845 * c-typeck.c (convert_for_assignment, c_finish_return): For
5846 -fsanitize=float-cast-overflow casts from REAL_TYPE to integer/enum
5847 types also set in_late_binary_op around convert call.
5848 * c-convert.c (convert): For -fsanitize=float-cast-overflow REAL_TYPE
5849 to integral type casts, if not in_late_binary_op, pass c_fully_fold
5850 result on expr as last argument to ubsan_instrument_float_cast,
5851 if in_late_binary_op, don't use c_save_expr but save_expr.
5852
5624e564
JJ
5853 Update copyright years.
5854
5bd012f8
MP
58552015-01-05 Marek Polacek <polacek@redhat.com>
5856
5857 PR c/64423
5858 * c-typeck.c (build_array_ref): Pass loc down to
5859 warn_array_subscript_with_type_char.
5860
3f8257db 58612014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
768952be
MU
5862
5863 * c-typeck.c: New behavious for pointers to arrays with qualifiers
8e745a17 5864 (common-pointer-type): For pointers to arrays take qualifiers from
768952be 5865 element type.
8e745a17 5866 (build_conditional_expr): Add warnings for lost qualifiers.
768952be 5867 (comp-target-types): Allow pointers to arrays with different qualifiers.
8e745a17 5868 (convert-for-assignment): Adapt warnings for discarded qualifiers. Add
768952be 5869 WARNING_FOR_QUALIFIERS macro and rename WARN_FOR_QUALIFIERS
8e745a17 5870 to PEDWARN_FOR_QUALIFIERS.
768952be 5871
8f94a8c4
JJ
58722014-12-17 Jakub Jelinek <jakub@redhat.com>
5873
5874 PR sanitizer/64289
5875 * c-convert.c: Include ubsan.h.
5876 (convert): For real -> integral casts and
5877 -fsanitize=float-cast-overflow don't call convert_to_integer, but
5878 instead instrument the float cast directly.
5879
b731b390
JJ
58802014-11-29 Jakub Jelinek <jakub@redhat.com>
5881
5882 * c-typeck.c (convert_lvalue_to_rvalue, build_atomic_assign,
5883 c_finish_stmt_expr): Remove NULL last argument from
5884 create_tmp_var_raw and create_tmp_var calls.
5885 * c-array-notation.c (fix_builtin_array_notation_fn,
5886 build_array_notation_expr, fix_conditional_array_notations_1,
5887 fix_array_notation_expr, fix_array_notation_call_expr): Likewise.
5888
541e35a6
MP
58892014-11-28 Marek Polacek <polacek@redhat.com>
5890
5891 PR c/63862
5892 * c-typeck.c (build_binary_op) <RSHIFT_EXPR, LSHIFT_EXPR>: Don't
5893 convert the right operand to integer type.
5894
b286be94
MP
58952014-11-25 Marek Polacek <polacek@redhat.com>
5896
5897 PR c/63877
5898 * c-decl.c (start_function): Disable -Wmissing-declarations warning
5899 for inline functions.
5900
aa7da51a
JJ
59012014-11-21 Jakub Jelinek <jakub@redhat.com>
5902
5903 PR target/63764
5904 * c-typeck.c (build_array_ref): Adjust
5905 convert_vector_to_pointer_for_subscript caller. If it returns true,
5906 call non_lvalue_loc on the result.
5907
d876207f
RB
59082014-11-11 Richard Biener <rguenther@suse.de>
5909
5910 * c-decl.c (c_init_decl_processing): Do not set pedantic_lvalues
5911 to true.
5912
e5e44252
AK
59132014-11-10 Andi Kleen <ak@linux.intel.com>
5914
5915 PR c/60804
5916 * c-parser.c (c_parser_statement_after_labels): Call
5917 check_no_cilk.
5918 (c_parser_if_statement): Dito.
5919 (c_parser_switch_statement): Dito.
5920 (c_parser_while_statement): Dito.
5921 (c_parser_do_statement): Dito.
5922 (c_parser_for_statement): Dito.
5923 * c-typeck.c (c_finish_loop): Dito.
5924
13c21655
PC
59252014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
5926
5927 * c-typeck.c (build_binary_op): Use OPT_Wshift_count_negative and
5928 OPT_Wshift_count_overflow in the warnings.
5929
2d51fcef
MP
59302014-10-30 Marek Polacek <polacek@redhat.com>
5931
5932 * c-objc-common.c (c_tree_printer) <case 'T'>: For a typedef name,
5933 print the stripped version as well, if they're not the same.
5934
ef4bddc2
RS
59352014-10-29 Richard Sandiford <richard.sandiford@arm.com>
5936
5937 * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from
5938 machine_mode.
5939
c582198b
AM
59402014-10-28 Andrew MacLeod <amacleod@redhat.com>
5941
5942 * c-decl.c: Adjust include files.
5943 * c-parser.c: Ditto.
5944
ddc8de03
PM
59452014-10-27 Phil Muldoon <pmuldoon@redhat.com>
5946 Tom Tromey <tromey@redhat.com>
5947
5948 * c-tree.h (enum c_oracle_request): New.
5949 (c_binding_oracle_function): New typedef.
5950 (c_binding_oracle, c_pushtag, c_bind): Declare.
5951 * c-decl.c (c_binding_oracle): New global.
5952 (I_SYMBOL_CHECKED): New macro.
5953 (i_symbol_binding): New function.
5954 (I_SYMBOL_BINDING, I_SYMBOL_DECL): Redefine.
5955 (I_TAG_CHECKED): New macro.
5956 (i_tag_binding): New function.
5957 (I_TAG_BINDING, I_TAG_DECL): Redefine.
5958 (I_LABEL_CHECKED): New macro.
5959 (i_label_binding): New function.
5960 (I_LABEL_BINDING, I_LABEL_DECL): Redefine.
5961 (c_print_identifier): Save and restore c_binding_oracle.
5962 (c_pushtag, c_bind): New functions.
5963
60393bbc
AM
59642014-10-27 Andrew MacLeod <amacleod@redhat.com>
5965
5966 * c-typeck.c: Adjust include files.
5967
d723bb7c
MLI
59682014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
5969
5970 PR c++/53061
5971 * c-objc-common.c (c_objc_common_init): Do not do diagnostics
5972 initialization here...
5973 (c_initialize_diagnostics): ... but here. Set defaults after
5974 building pretty-printer.
5975
1bc5a451
MP
59762014-10-23 Marek Polacek <polacek@redhat.com>
5977
5978 PR c/63626
5979 * c-decl.c (pop_scope): Don't print warning in external_scope.
5980
4435bb92
MP
59812014-10-19 Marek Polacek <polacek@redhat.com>
5982
5983 PR c/63567
5984 * c-typeck.c (output_init_element): Allow initializing objects with
5985 static storage duration with compound literals even in C99 and add
5986 pedwarn for it.
5987
7278465e
MP
59882014-10-17 Marek Polacek <polacek@redhat.com>
5989
5990 PR c/63567
5991 * c-typeck.c (digest_init): Allow initializing objects with static
5992 storage duration with compound literals even in C99 and add pedwarn
5993 for it.
5994
d9b7be2e
MP
59952014-10-17 Marek Polacek <polacek@redhat.com>
5996
5997 PR c/63543
5998 * c-tree.h (C_TYPE_ERROR_REPORTED): Define.
5999 * c-typeck.c (build_indirect_ref): Don't print the "dereferencing..."
6000 error multiple times. Print the type.
6001
f406ae1f
MP
60022014-10-17 Marek Polacek <polacek@redhat.com>
6003
6004 PR c/63549
6005 * c-typeck.c (build_array_ref): Bail if the index in an incomplete
6006 type.
6007
92574c7c
MP
60082014-10-17 Marek Polacek <polacek@redhat.com>
6009
6010 * c-decl.c (grokdeclarator): Use OPT_Wimplicit_int unconditionally.
6011 (start_function): Use OPT_Wimplicit_int instead of 0.
6012 (store_parm_decls_oldstyle): Likewise.
6013
1bc4a978
MT
60142014-10-17 Alan Modra <amodra@gmail.com>
6015
6016 PR middle-end/61848
6017 * c-decl.c (merge_decls): Don't merge section name or tls model
6018 to newdecl symtab node, instead merge to olddecl. Override
6019 existing olddecl section name. Set tls_model for all thread-local
6020 vars, not just OMP thread-private ones. Remove incorrect comment.
6021
83685514
AM
60222014-10-16 Andrew MacLeod <amacleod@redhat.com>
6023
6024 * c-decl.c: Adjust include files.
6025
78a7c317
DD
60262014-10-14 DJ Delorie <dj@redhat.com>
6027
6028 * c-parser.c (c_parse_init): Add RID entries for each __intN.
6029 (c_token_starts_typename): Check all __intN, not just __int128.
6030 (c_token_starts_declspecs): Likewise.
6031 (c_parser_declspecs): Likewise.
6032 (c_parser_attribute_any_word): Likewise.
6033 (c_parser_objc_selector): Likewise.
6034 * c-tree.h (c_typespec_keyword): cts_int128 -> cts_int_n.
6035 (struct c_declspecs): Add int_n_idx field to record *which* __intN
6036 is specified.
6037 * c-decl.c (declspecs_add_type): Check for all __intN, not just
6038 __int128.
6039 (finish_declspecs): Likewise.
6040
74d98c1e
AB
60412014-10-13 Anthony Brandon <anthony.brandon@gmail.com>
6042
8e745a17 6043 * c-parser.c (c_parser_all_labels): New function to replace
74d98c1e 6044 the duplicate code.
8e745a17 6045 (c_parser_statement): Call the new function.
74d98c1e 6046
84937de2
MP
60472014-10-09 Marek Polacek <polacek@redhat.com>
6048
6049 PR c/63480
6050 * c-typeck.c (pop_init_level): Don't warn about initializing
6051 with { }.
6052
0382aaa0
MP
60532014-10-07 Marek Polacek <polacek@redhat.com>
6054
6055 PR c/59717
6056 * c-decl.c (header_for_builtin_fn): New function.
6057 (implicitly_declare): Suggest which header to include.
6058
7a0ca710
MP
60592014-10-07 Marek Polacek <polacek@redhat.com>
6060
6061 * c-convert.c (convert): Use error_operand_p.
6062 * c-typeck.c (require_complete_type): Likewise.
6063 (really_atomic_lvalue): Likewise.
6064 (digest_init): Likewise.
6065 (handle_omp_array_sections_1): Likewise.
6066
6bc8a126
MP
60672014-10-03 Marek Polacek <polacek@redhat.com>
6068
6069 PR c/63453
6070 * c-decl.c (pop_scope): Don't warn about "inline function declared
6071 but never defined" for functions marked with gnu_inline attribute.
6072
d90c0a59
JJ
60732014-09-25 Jakub Jelinek <jakub@redhat.com>
6074
6075 PR c++/63249
6076 * c-parser.c (c_parser_omp_variable_list): Call mark_exp_read
6077 on low_bound and length.
6078
083e891e
MP
60792014-09-24 Marek Polacek <polacek@redhat.com>
6080
6081 PR c/61405
6082 PR c/53874
6083 * c-parser.c: Don't define CPP_KEYWORD.
6084 (c_parser_switch_statement): Pass original type to c_finish_case.
6085 * c-tree.h (c_finish_case): Update declaration.
6086 * c-typeck.c (c_finish_case): Add TYPE parameter. Pass it
6087 conditionally to c_do_switch_warnings.
6088
8d95fe25
MP
60892014-09-03 Marek Polacek <polacek@redhat.com>
6090
6091 PR c/62024
6092 * c-parser.c (c_parser_static_assert_declaration_no_semi): Strip no-op
6093 conversions.
6094
9a771876
JJ
60952014-09-02 Jakub Jelinek <jakub@redhat.com>
6096 Balaji V. Iyer <balaji.v.iyer@intel.com>
6097 Igor Zamyatin <igor.zamyatin@intel.com>
6098
6099 * c-parser.c (c_parser_cilk_for): New function.
6100 (c_parser_cilk_grainsize): Likewise.
6101 (c_get_temp_regvar): Likewise.
6102 (c_parser_statement_after_labels): Added RID_CILK_FOR case.
6103 (c_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
6104 (c_parser_omp_for_loop): Added CILK_FOR and CILK_SIMD checks.
6105 * c-typeck.c (c_finish_omp_clauses): Added OMP_CLAUSE__CILK_FOR_COUNT_
6106 case.
6107
b7679d96
CG
61082014-08-27 Chen Gang <gang.chen.5i5j@gmail.com>
6109
6110 * c-aux-info.c (gen_type): Resize 'buff' from 10 to 23 bytes,
6111 with using HOST_WIDE_INT without truncation to 'int'
6112
59ea0364
MP
61132014-08-22 Marek Polacek <polacek@redhat.com>
6114
6115 PR c++/62199
6116 * c-typeck.c (parser_build_binary_op): Adjust call to
6117 warn_logical_not_parentheses.
6118
671a475e
IZ
61192014-08-22 Igor Zamyatin <igor.zamyatin@intel.com>
6120
6121 PR other/62008
6122 * c-parser.c (c_parser_array_notation): Check for correct
6123 type of an array added.
6124
04159acf
MP
61252014-08-19 Marek Polacek <polacek@redhat.com>
6126
6127 PR c++/62153
6128 * c-typeck.c (build_binary_op): If either operand of a comparison
6129 is a boolean expression, call maybe_warn_bool_compare.
6130
c77935ee
PP
61312014-08-19 Patrick Palka <ppalka@gcc.gnu.org>
6132
6133 PR c/45584
6134 * c-typeck.c (build_c_cast): Do a conversion even when the
6135 TYPE_MAIN_VARIANTs are the same.
6136
35aff4fb
MP
61372014-08-19 Marek Polacek <polacek@redhat.com>
6138
6139 * c-decl.c (diagnose_mismatched_decls): Unconditionally call
6140 pedwarn_c99 instead of pedwarn.
6141 (grokfield): Likewise.
6142 (warn_defaults_to): New function.
6143 (grokdeclarator): Call warn_defaults_to instead of pedwarn_c99.
6144 Unconditionally call pedwarn_c99 instead of pedwarn.
6145 (start_function): Call warn_defaults_to instead of pedwarn_c99.
6146 (declspecs_add_scspec): Call pedwarn_c99 instead of pedwarn, don't
6147 check flag_isoc11 before.
6148 * c-errors.c (pedwarn_c99): Change the return type to bool.
6149 Handle -Wc99-c11-compat.
6150 * c-parser.c (disable_extension_diagnostics): Handle
6151 warn_c99_c11_compat.
6152 (restore_extension_diagnostics): Likewise.
6153 (c_parser_static_assert_declaration_no_semi): Call pedwarn_c99
6154 instead of pedwarn, don't check flag_isoc11 before.
6155 (c_parser_declspecs): Likewise.
6156 (c_parser_alignas_specifier): Likewise.
6157 (c_parser_alignof_expression): Likewise.
6158 (c_parser_generic_selection): Likewise.
6159 * c-tree.h (pedwarn_c99): Update declaration.
6160 * c-typeck.c (c_finish_return): Call pedwarn or warning_at instead
6161 of pedwarn_c99.
6162
177cce46
MP
61632014-08-19 Marek Polacek <polacek@redhat.com>
6164
6165 * c-decl.c (warn_variable_length_array): Pass OPT_Wvla unconditionally
6166 to pedwarn_c90.
6167 * c-errors.c: Include "opts.h".
6168 (pedwarn_c90): Rewrite to handle -Wno-c90-c99-compat better.
6169 * c-parser.c (disable_extension_diagnostics): Handle negative value
6170 of warn_c90_c99_compat, too.
6171 (restore_extension_diagnostics): Likewise.
6172 (c_parser_compound_statement_nostart): Pass
6173 OPT_Wdeclaration_after_statement unconditionally to pedwarn_c90.
6174
6dc99c33
MP
61752014-08-12 Marek Polacek <polacek@redhat.com>
6176
6177 * c-parser.c (c_parser_postfix_expression) <case RID_FUNCTION_NAME>:
6178 Add pedwarn.
6179 (c_parser_postfix_expression) <case RID_PRETTY_FUNCTION_NAME>:
6180 Likewise.
6181 (c_parser_postfix_expression) <case RID_C99_FUNCTION_NAME>: Likewise.
6182
3f8257db 61832014-08-10 Marek Polacek <polacek@redhat.com>
f3bede71
MP
6184
6185 PR c/51849
6186 * c-decl.c (build_array_declarator): Remove check for !flag_isoc99.
6187 Call pedwarn_c90 instead of pedwarn.
6188 (check_bitfield_type_and_width): Likewise.
6189 (declspecs_add_qual): Likewise.
6190 (declspecs_add_type): Likewise.
6191 (warn_variable_length_array): Unify function for -pedantic and -Wvla.
6192 Adjust to only call pedwarn_c90.
6193 (grokdeclarator): Remove pedantic && !flag_isoc99 check. Call
6194 pedwarn_c90 instead of pedwarn.
6195 * c-errors.c (pedwarn_c90): Handle -Wc90-c99-compat.
6196 * c-parser.c (disable_extension_diagnostics): Handle
6197 warn_c90_c99_compat.
6198 (restore_extension_diagnostics): Likewise.
6199 (c_parser_enum_specifier): Remove check for !flag_isoc99. Call
6200 pedwarn_c90 instead of pedwarn.
6201 (c_parser_initelt): Likewise.
6202 (c_parser_postfix_expression): Likewise.
6203 (c_parser_postfix_expression_after_paren_type): Likewise.
6204 (c_parser_compound_statement_nostart): Remove check for !flag_isoc99.
6205 * c-tree.h: Fix formatting.
6206 * c-typeck.c (build_array_ref): Remove check for !flag_isoc99. Call
6207 pedwarn_c90 instead of pedwarn.
6208
9f25a338
TS
62092014-08-07 Trevor Saunders <tsaunders@mozilla.com>
6210
6211 * c-typeck.c: Remove include of pointer-set.h.
6212
044331a8
MP
62132014-08-07 Marek Polacek <polacek@redhat.com>
6214
6215 * c-typeck.c (pointer_diff): Remove P - (P + CST) optimization.
6216
b787e7a2
TS
62172014-08-02 Trevor Saunders <tsaunders@mozilla.com>
6218
6219 * c-typeck.c: Use hash_map instead of pointer_map.
6220
6e2830c3
TS
62212014-08-02 Trevor Saunders <tsaunders@mozilla.com>
6222
6223 * c-decl.c: Use hash_set instead of pointer_set.
6224
a7ee52fb
IZ
62252014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
6226
6227 PR middle-end/61455
6228 * c-array-notation.c (expand_array_notations): Handling
6229 of DECL_EXPR added.
6230
b4dfdc11
MG
62312014-07-31 Marc Glisse <marc.glisse@inria.fr>
6232
6233 PR c++/60517
6234 * c-typeck.c (c_finish_return): Return 0 instead of the address of
6235 a local variable.
6236
976d5a22
TT
62372014-07-30 Tom Tromey <tromey@redhat.com>
6238
6239 * c-typeck.c (struct constructor_stack) <designator_depth>: New
6240 field.
6241 (really_start_incremental_init, push_init_level): Initialize
6242 designator_depth.
6243 (pop_init_level): Set global designator_depth.
6244 (process_init_element): Check for designated_init attribute.
6245
30281de2
MP
62462014-07-20 Marek Polacek <polacek@redhat.com>
6247
6248 PR c/61852
6249 * c-decl.c (implicit_decl_warning): Add location_t parameter. Use it.
6250 (implicitly_declare): Pass location to implicit_decl_warning.
6251
b108f48f
JJ
62522014-07-14 Jakub Jelinek <jakub@redhat.com>
6253
6254 PR middle-end/61294
6255 * c-parser.c (c_parser_expr_list): Add new argument literal_zero_mask.
6256 If non-NULL, call c_parser_check_literal_zero.
6257 (c_parser_check_literal_zero): New function.
6258 (c_parser_postfix_expression_after_primary): Adjust
6259 c_parser_expr_list caller, handle -Wmemset-transposed-args.
6260
773ec47f
MP
62612014-07-06 Marek Polacek <polacek@redhat.com>
6262
6263 PR c/6940
6264 * c-decl.c (grokdeclarator): Set C_ARRAY_PARAMETER.
6265 * c-tree.h (C_ARRAY_PARAMETER): Define.
6266 * c-typeck.c (c_expr_sizeof_expr): Warn when using sizeof on an array
6267 function parameter.
6268
22e1cf1c 62692014-07-02 Jan Hubicka <hubicka@ucw.cz>
3f8257db 6270 Chen Gang <gang.chen.5i5j@gmail.com>
22e1cf1c
JH
6271
6272 * c-decl.c (duplicate_decls): CLear DECL_STRUCT_FUNCTION before
6273 releasing symbol.
6274
52ec0ea3
MP
62752014-07-01 Marek Polacek <polacek@redhat.com>
6276
6277 * c-typeck.c (convert_for_assignment): Pass OPT_Wint_conversion
6278 instead of 0 to WARN_FOR_ASSIGNMENT.
6279
d5c3d343
MP
62802014-07-01 Marek Polacek <polacek@redhat.com>
6281
6282 PR c/58286
6283 * c-typeck.c (convert_for_assignment): Pass
6284 OPT_Wincompatible_pointer_types instead of 0 to WARN_FOR_ASSIGNMENT.
6285
6a7253a4
MP
62862014-06-30 Marek Polacek <polacek@redhat.com>
6287
6288 * c-decl.c (grokdeclarator): Don't instrument VLAs if the function
6289 has no_sanitize_undefined attribute.
6290
5e88a8f4
IZ
62912014-06-30 Igor Zamyatin <igor.zamyatin@intel.com>
6292
6293 PR middle-end/57541
6294 * c-array-notation.c (fix_builtin_array_notation_fn):
6295 Check for 0 arguments in builtin call. Check that bultin argument is
6296 correct.
6297 * c-parser.c (c_parser_array_notation): Check for incorrect initial
6298 index.
6299
9698b078
SH
63002014-06-27 Sebastian Huber <sebastian.huber@embedded-brains.de>
6301
6302 * c-parser.c (c_parser_declaration_or_fndef): Discard all type
6303 qualifiers in __auto_type for atomic types.
6304 (c_parser_typeof_specifier): Discard all type qualifiers in
6305 __typeof__ for atomic types.
6306
6e07c515
MP
63072014-06-25 Marek Polacek <polacek@redhat.com>
6308
6309 PR c/61162
6310 * c-parser.c (c_parser_statement_after_labels): Pass the location of
6311 the return expression to c_finish_return.
6312
da6f124d
JJ
63132014-06-25 Jakub Jelinek <jakub@redhat.com>
6314
6315 * c-typeck.c (c_finish_omp_clauses): Make sure
6316 OMP_CLAUSE_LINEAR_STEP has correct type.
6317
c203e8a7
TS
63182014-06-24 Trevor Saunders <tsaunders@mozilla.com>
6319
6320 * c-decl.c: Adjust.
6321
56ad0e38
JJ
63222014-06-24 Jakub Jelinek <jakub@redhat.com>
6323
6324 * c-parser.c (c_parser_omp_for_loop): For
6325 #pragma omp parallel for simd move lastprivate clause from parallel
6326 to for rather than simd.
6327
47c2554f
MP
63282014-06-23 Marek Polacek <polacek@redhat.com>
6329
6330 * c-typeck.c (parser_build_binary_op): Don't call
6331 warn_logical_not_parentheses if the RHS is TRUTH_NOT_EXPR.
6332
56363ffd
JH
63332014-06-15 Jan Hubicka <hubicka@ucw.cz>
6334
6335 * c-parser.c (c_parser_omp_threadprivate): Likewise.
6336 * c-decl.c (merge_decls): Likewise.
6337
d7ff7ae5
MP
63382014-06-09 Marek Polacek <polacek@redhat.com>
6339
6340 PR c/36446
6341 * c-typeck.c (error_init): Call inform instead of error_at.
6342 (pedwarn_init): Call inform instead of pedwarn.
6343 (warning_init): Call inform instead of warning_at.
6344
24d047a3
JH
63452014-06-07 Jan Hubicka <hubicka@ucw.cz>
6346
6347 * c-decl.c (merge_decls): Use set_decl_section_name.
6348 (duplicate_decls): Remove node if it exists.
6349
9bac5cbb
G
63502014-06-05 S. Gilles <sgilles@terpmail.umd.edu>
6351
6352 PR c/53119
6353 * c-typeck.c (push_init_level, process_init_element,
6354 pop_init_level): Correct check for zero initialization, move
6355 missing brace warning to respect zero initialization.
6356
8ffcdea8
MP
63572014-06-05 Marek Polacek <polacek@redhat.com>
6358
6359 PR c/56724
6360 * c-typeck.c (convert_for_assignment): Use expr_loc for ic_argpass.
6361
742938c9
MP
63622014-06-05 Marek Polacek <polacek@redhat.com>
6363
6364 PR c/49706
6365 * c-typeck.c (parser_build_binary_op): Warn when logical not is used
ab20d992 6366 on the left hand side operand of a comparison.
742938c9 6367
6447c55d
MP
63682014-06-05 Marek Polacek <polacek@redhat.com>
6369
6370 PR c/48062
6371 * c-decl.c (warn_if_shadowing): Call inform instead of warning_at.
6372 Print note only if the warning was printed.
6373
9dc7743c
IZ
63742014-06-04 Igor Zamyatin <igor.zamyatin@intel.com>
6375
6376 PR c/58942
6377 * c-array-notation.c (fix_builtin_array_notation_fn): Handle the case
6378 with a pointer.
6379
fedfecef
MP
63802014-06-03 Marek Polacek <polacek@redhat.com>
6381
6382 PR c/60439
6383 * c-parser.c (c_parser_switch_statement): Pass explicit_cast_p to
6384 c_start_case.
6385 * c-tree.h (c_start_case): Update.
6386 * c-typeck.c (c_start_case): Add new boolean parameter. Warn if
6387 switch condition has boolean value.
6388
9b2b7279
AM
63892014-06-02 Andrew MacLeod <amacleod@redhat.com>
6390
6391 * c-decl.c: Include builtins.h.
6392 * c-parser.c: Likewise.
6393
5c1bc275
MP
63942014-05-27 Marek Polacek <polacek@redhat.com>
6395
6396 PR c/56724
6397 * c-typeck.c (convert_arguments): Get location of a parameter. Change
6398 error and warning calls to error_at and warning_at. Pass location of
6399 a parameter to it. Call warning_at with OPT_Wtraditional_conversion.
6400 (convert_for_assignment): Add parameter to WARN_FOR_ASSIGNMENT and
6401 WARN_FOR_QUALIFIERS. Pass expr_loc to those.
6402
97563bc8
IZ
64032014-05-26 Igor Zamyatin <igor.zamyatin@intel.com>
6404
6405 PR c/61191
6406 * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid
6407 function parameters.
6408
aede2c10
JH
64092014-05-23 Jan Hubicka <hubicka@ucw.cz>
6410
6411 * c-decl.c (merge_decls): Preserve symtab node pointers.
6412 (duplicate_decls): Free new decl.
6413
edbba2ce
TS
64142014-05-23 Thomas Schwinge <thomas@codesourcery.com>
6415
f3316c6d
TS
6416 * c-typeck.c (c_finish_omp_clauses): Remove duplicated variable
6417 initialization.
6418
edbba2ce
TS
6419 * c-parser.c (c_parser_omp_target): Return bool values.
6420
68c81f24
TS
64212014-05-22 Thomas Schwinge <thomas@codesourcery.com>
6422
6423 * c-parser.c (c_parser_omp_clause_thread_limit): Rename
6424 num_teams_loc variable to num_thread_limit_loc.
6425
632f2871
RS
64262014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
6427
6428 * c-array-notation.c (expand_array_notations): Use void_node
6429 instead of void_zero_node.
6430
766090c2
TS
64312014-05-17 Trevor Saunders <tsaunders@mozilla.com>
6432
6433 * c-decl.c (finish_struct): Adjust.
6434 (finish_enum): Likewise.
6435 (bind): Adjust.
6436 (record_inline_static): Likewise.
6437 (push_scope): Likewise.
6438 (make_label): Likewise.
6439 (lookup_label_for_goto): Likewise.
6440 (finish_struct): Likewise.
6441 (finish_enum): Likewise.
6442 (store_parm_decls): Likewise.
6443 (c_push_function_context): Likewise.
6444 * c-lang.h: Remove usage of variable_size gty attribute.
6445 * c-parser.c (c_parse_init): Adjust.
6446 (c_parse_file): Likewise.
6447
2b107f6b
MP
64482014-05-13 Marek Polacek <polacek@redhat.com>
6449
6450 PR c/61162
6451 * c-typeck.c (convert_for_assignment): Pass location to
6452 WARN_FOR_ASSIGNMENT instead of input_location.
6453
d033409e
MP
64542014-05-10 Marek Polacek <polacek@redhat.com>
6455
6456 * c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
6457 maybe_warn_string_init.
6458 (c_parser_postfix_expression_after_paren_type): Pass type_loc to
6459 maybe_warn_string_init.
6460 * c-tree.h (maybe_warn_string_init): Update declaration.
6461 * c-typeck.c (maybe_warn_string_init): Add location parameter.
6462 Call pedwarn_init with loc instead of with input_location.
6463 (digest_init): Pass init_loc to maybe_warn_string_init.
6464 (pop_init_level): Call pedwarn_init with loc instead of with
6465 input_location.
6466 (set_init_index): Likewise.
6467 (process_init_element): Likewise.
6468
ea58ef42
MP
64692014-05-09 Marek Polacek <polacek@redhat.com>
6470
6471 PR c/61096
6472 * c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level.
6473 (c_parser_initelt): Pass location to set_init_label. Pass array index
6474 location to set_init_index.
6475 * c-tree.h (push_init_level): Update declaration.
6476 (pop_init_level): Likewise.
6477 (set_init_index): Likewise.
6478 (set_init_label): Likewise.
6479 * c-typeck.c (error_init): Add location parameter. Call error_at
6480 instead of error.
6481 (digest_init): Pass init_loc to error_init.
6482 (really_start_incremental_init):
6483 (push_init_level): Add location parameter. Pass loc to pop_init_level
6484 and error_init.
6485 (pop_init_level): Likewise.
6486 (set_designator): Add location parameter. Pass loc to pop_init_level,
6487 push_init_level, and error_init.
6488 (set_init_index): Add location parameter. Pass loc to error_init and
6489 set_designator.
6490 (set_init_label): Likewise.
6491 (output_init_element): Pass loc to error_init.
6492 (process_init_element): Pass loc to error_init, pop_init_level,
6493 pedwarn_init, and push_init_level.
6494
661a0813
MP
64952014-05-09 Marek Polacek <polacek@redhat.com>
6496
6497 PR c/50459
6498 * c-parser.c (c_parser_attributes): Parse the arguments as an
6499 expression-list if the attribute takes identifier.
6500
2793eeab
MP
65012014-05-08 Marek Polacek <polacek@redhat.com>
6502
6503 PR c/61053
6504 * c-decl.c (grokdeclarator): Use min_align_of_type instead of
6505 TYPE_ALIGN_UNIT.
6506
f827930a
MP
65072014-05-08 Marek Polacek <polacek@redhat.com>
6508
6509 PR c/61077
6510 * c-decl.c (start_function): Warn for _Atomic-qualified return type
6511 of main.
6512
1d60af08
KZ
65132014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
6514 Mike Stump <mikestump@comcast.net>
6515 Richard Sandiford <rdsandiford@googlemail.com>
6516
6517 * c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN.
6518 (finish_enum): Use wide-int interfaces.
6519 * c-parser.c (c_parser_cilk_clause_vectorlength): Likewise.
6520 * c-typeck.c (build_c_cast): Likewise.
6521 (set_nonincremental_init_from_string): Likewise.
6522 (c_tree_equal): Likewise.
6523
a0e24419
MP
65242014-05-02 Marek Polacek <polacek@redhat.com>
6525
6526 PR c/25801
6527 * c-typeck.c (c_size_in_bytes): Update comment. Don't call error.
6528 Return size_one_node when the type is not complete.
6529 (pointer_diff): Remove comment.
6530 (build_unary_op): Improve error messages.
6531
19fc9faa
MP
65322014-05-02 Marek Polacek <polacek@redhat.com>
6533
6534 * c-typeck.c (c_finish_return): Separate warning_at calls.
6535
63bc4e87
MP
65362014-05-02 Marek Polacek <polacek@redhat.com>
6537
6538 * c-tree.h (error_init): Remove declaration.
6539 (pedwarn_init): Likewise.
6540 * c-typeck.c (error_init): Make static and move above.
6541 (pedwarn_init): Likewise.
6542 (warning_init): Move above.
6543 (maybe_warn_string_init): Likewise.
6544
4bd2511b
JL
65452014-05-01 Jeff Law <law@redhat.com>
6546
6547 Revert:
6548
6549 2014-04-24 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
6550 * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
6551 avoid goto.
6552
6a358dcb
MP
65532014-05-02 Marek Polacek <polacek@redhat.com>
6554
6555 PR c/60784
6556 * c-typeck.c (push_init_level): Set constructor_designated to
6557 p->designated for structures.
6558
ae5ebda4
MP
65592014-05-01 Marek Polacek <polacek@redhat.com>
6560
6561 PR c/60915
6562 * c-parser.c (c_parser_declaration_or_fndef): Give better error if
6563 function-definition has an attribute after the declarator.
6564
96b40f8d
MP
65652014-05-01 Marek Polacek <polacek@redhat.com>
6566
6567 PR c/60257
6568 * c-typeck.c (warning_init): Add location_t parameter. Call
6569 warning_at instead of warning.
6570 (push_init_level): Pass input_location to warning_init.
6571 (add_pending_init): Add location_t parameter. Pass loc to
6572 warning_init.
6573 (set_nonincremental_init): Pass input_location to add_pending_init.
6574 (set_nonincremental_init_from_string): Likewise.
6575 (output_init_element): Pass loc to warning_init and to
6576 add_pending_init.
6577
32e00768
MP
65782014-05-01 Marek Polacek <polacek@redhat.com>
6579
6580 PR c/43395
6581 * c-typeck.c (c_finish_return): Distinguish between label and variable
6582 when warning about returning local address.
6583
c9379ce2
MP
65842014-05-01 Marek Polacek <polacek@redhat.com>
6585
6586 PR c/29467
6587 * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
6588 in C89 mode.
6589
d00887e8
MP
65902014-05-01 Marek Polacek <polacek@redhat.com>
6591
6592 PR c/43245
6593 * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
6594 instead of 0 to WARN_FOR_QUALIFIERS.
6595
5436fa2e
MP
65962014-05-01 Marek Polacek <polacek@redhat.com>
6597
6598 PR c/56989
6599 * c-typeck.c (default_conversion): Use better location for
6600 error call.
6601
f8ed5150
MP
66022014-04-30 Marek Polacek <polacek@redhat.com>
6603
6604 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
6605 also when SANITIZE_FLOAT_DIVIDE is on.
6606
8337d1db
MP
66072014-04-30 Marek Polacek <polacek@redhat.com>
6608
6609 PR c/60139
6610 * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
6611 and pedwarn_init. Use loc insted of input_location.
6612
c4bdc42f
MP
66132014-04-30 Marek Polacek <polacek@redhat.com>
6614
6615 PR c/60351
6616 * c-typeck.c (build_binary_op): Use location when warning about
6617 shift count.
6618
45484dcf
MP
66192014-04-25 Marek Polacek <polacek@redhat.com>
6620
6621 PR c/18079
6622 * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
6623 always_inline/noinline and hot/cold attributes.
6624
34cf811f
MP
66252014-04-25 Marek Polacek <polacek@redhat.com>
6626
6627 PR c/60114
6628 * c-parser.c (c_parser_initelt): Pass input_location to
6629 process_init_element.
6630 (c_parser_initval): Pass loc to process_init_element.
6631 * c-tree.h (process_init_element): Adjust declaration.
6632 * c-typeck.c (push_init_level): Pass input_location to
6633 process_init_element.
6634 (pop_init_level): Likewise.
6635 (set_designator): Likewise.
6636 (output_init_element): Add location_t parameter. Pass loc to
6637 digest_init.
6638 (output_pending_init_elements): Pass input_location to
6639 output_init_element.
6640 (process_init_element): Add location_t parameter. Pass loc to
6641 output_init_element.
6642
42056eac
JJ
66432014-04-24 Jakub Jelinek <jakub@redhat.com>
6644
6645 * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
6646 atomic-clause, allow comma in between atomic-clause and
6647 seq_cst.
6648
e162a134
JJ
66492014-04-22 Jakub Jelinek <jakub@redhat.com>
6650
6651 PR c/59073
6652 * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
6653 fails, don't set OM_PARALLEL_COMBINED and return NULL.
6654
2f6babac
IZ
66552014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
6656
6657 PR middle-end/60469
6658 * c-array-notation.c (fix_builtin_array_notation_fn): Use
6659 create_tmp_var instead build_decl for creating temps.
6660 (build_array_notation_expr): Likewise.
6661 (fix_conditional_array_notations_1): Likewise.
6662 (fix_array_notation_expr): Likewise.
6663 (fix_array_notation_call_expr): Likewise.
6664
8edbfaa6
JJ
66652014-03-28 Jakub Jelinek <jakub@redhat.com>
6666
6667 PR c++/60689
6668 * c-tree.h (c_build_function_call_vec): New prototype.
6669 * c-typeck.c (build_function_call_vec): Don't call
6670 resolve_overloaded_builtin here.
6671 (c_build_function_call_vec): New wrapper function around
6672 build_function_call_vec. Call resolve_overloaded_builtin here.
6673 (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
6674 Call c_build_function_call_vec instead of build_function_call_vec.
6675 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
6676 * c-decl.c (finish_decl): Likewise.
6677
7485aeea
MLI
66782014-03-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
6679
6680 PR c/55383
6681 * c-typeck.c: Use correct format string in cast-qual warning
6682
b17a8b07
TS
66832014-03-07 Thomas Schwinge <thomas@codesourcery.com>
6684
6685 * c-decl.c (c_decl_attributes): Use
6686 lang_hooks.types.omp_mappable_type.
6687 * c-typeck.c (c_finish_omp_clauses): Likewise.
6688
3af9c5e9
MP
66892014-03-06 Marek Polacek <polacek@redhat.com>
6690
6691 PR c/60197
6692 * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
6693 of checking tree code.
6694
1c9f5f33
PK
66952014-02-19 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
6696
6697 * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
6698 (c_parser_parameter_declaration): Likewise.
6699
cc28fc7f
MP
67002014-02-19 Marek Polacek <polacek@redhat.com>
6701
6702 PR c/60195
6703 * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
6704 Call mark_exp_read on exp.value.
6705 (build_atomic_assign): Set TREE_NO_WARNING on val and old. Set
6706 TREE_ADDRESSABLE on old instead of val.
6707 (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
6708
b581c05c
PK
67092014-02-07 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
6710
6711 * c-parser.c (c_parser_get_builtin_args): Replace calls to
6712 C_EXPR_APPEND by vec_safe_push.
6713 * c-tree.h (C_EXPR_APPEND): Remove.
6714
81e5eca8
MP
67152014-01-31 Marek Polacek <polacek@redhat.com>
6716
6717 PR c/59963
6718 * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
6719 build_function_call_vec.
6720 (build_function_call): Likewise.
6721 (build_atomic_assign): Likewise.
6722 (build_function_call_vec): Add arg_loc parameter. Use it.
6723 (convert_arguments): Likewise.
6724 (convert_for_assignment): Rename rhs_loc to expr_loc.
6725 * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
6726 (c_parser_objc_keywordexpr): Likewise.
6727 (c_parser_postfix_expression_after_primary): Call
6728 build_function_call_vec with expr_loc rather than op_loc.
6729 Call c_parser_expr_list to fill arg_loc. Pass arg_loc to
6730 build_function_call_vec.
6731 (c_parser_expr_list): Add locations parameter. Fill it with locations
6732 of function arguments.
6733 * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
6734
68fca595
MP
67352014-01-30 Marek Polacek <polacek@redhat.com>
6736
6737 PR c/59940
6738 * c-typeck.c (build_function_call_vec): Use loc parameter.
6739 (convert_arguments): Add location parameter. Use it.
6740 (ep_convert_and_check): Likewise.
6741 (build_atomic_assign): Adjust convert_for_assignment call.
6742 (build_modify_expr): Likewise.
6743 (digest_init): Likewise.
6744 (c_finish_return): Likewise.
6745 (build_conditional_expr): Adjust ep_convert_and_check calls.
6746 (convert_for_assignment): Add rhs_loc parameter. Use it.
6747 (build_binary_op): Adjust convert_and_check and ep_convert_and_check
6748 calls.
6749
fa337f3a
RB
67502014-01-30 Richard Biener <rguenther@suse.de>
6751
6752 PR c/59905
6753 * c-typeck.c (build_function_call_vec): Do not replace calls
6754 to a function via an incompatible type with a runtime abort.
6755
b72271b9
BI
67562014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
6757
6758 * c-parser.c (c_parser_declaration_or_fndef): Replaced
6759 flag_enable_cilkplus with flag_cilkplus.
6760 (c_parser_direct_declarator_inner): Likewise.
6761 (c_parser_attribute_any_word): Likewise.
6762 (c_parser_attributes): Likewise.
6763 (c_parser_compound_statement): Likewise.
6764 (c_parser_statement_after_labels): Likewise.
6765 (c_parser_if_statement): Likewise.
6766 (c_parser_switch_statement): Likewise.
6767 (c_parser_do_statement): Likewise.
6768 (c_parser_for_statement): Likewise.
6769 (c_parser_unary_expression): Likewise.
6770 (c_parser_postfix_expression): Likewise.
6771 (c_parser_postfix_expression_after_primary): Likewise.
6772 (c_parser_postfix_expression_after_primary): Likewise.
6773 (c_parser_omp_clause_name): Likewise.
6774 (c_finish_omp_declare_simd): Likewise.
6775 (c_parser_cilk_verify_simd): Likewise.
6776 * c-typeck.c (build_array_ref): Likewise.
6777 (build_function_call_vec): Likewise.
6778 (convert_arguments): Likewise.
6779 (build_compound_expr): Likewise.
6780 (c_finish_return): Likewise.
6781 (c_finish_if_stmt): Likewise.
6782 (c_finish_loop): Likewise.
6783 (build_binary_op): Likewise.
6784
393e8e8b
MP
67852014-01-23 Marek Polacek <polacek@redhat.com>
6786
6787 PR c/59846
6788 * c-typeck.c (parser_build_binary_op): Use location instead of
6789 input_location.
6790 (build_binary_op): Pass location to shorten_compare.
6791
f04dda30
MP
67922014-01-23 Marek Polacek <polacek@redhat.com>
6793
6794 PR c/58346
6795 * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
6796 an empty aggregate.
6797
789eadcd
MP
67982014-01-23 Marek Polacek <polacek@redhat.com>
6799
6800 PR c/59871
6801 * c-typeck.c (build_compound_expr): Warn even for right-hand operand
6802 of a comma expression.
6803 (emit_side_effect_warnings): Likewise.
6804
40f14e9f
BI
68052014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
6806
6807 PR c/59825
6808 * c-array-notation.c (expand_array_notation_exprs): Rewrote this
6809 function to use walk_tree and moved a lot of its functionality to
6810 expand_array_notations.
6811 (expand_array_notations): New function.
6812
74558dd9
BI
68132014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
6814
6815 * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
6816 attribute an attribute without value.
6817
652fea39
JJ
68182014-01-23 Jakub Jelinek <jakub@redhat.com>
6819
6820 PR middle-end/58809
6821 * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
6822 BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
6823
f34f1c87
MP
68242014-01-22 Marek Polacek <polacek@redhat.com>
6825
6826 PR c/59891
6827 * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
6828 of remove_c_maybe_const_expr on op1 and op2.
6829
241f845a
JJ
68302014-01-15 Jakub Jelinek <jakub@redhat.com>
6831
6832 PR c/58943
6833 * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
6834 effects, preevaluate rhs using SAVE_EXPR first.
6835
9a74f20c
BI
68362014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
6837
6838 PR c++/59631
6839 * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
6840 statements with if-elseif statements.
6841
96066ce1
MP
68422014-01-06 Marek Polacek <polacek@redhat.com>
6843
6844 PR c/57773
6845 * c-decl.c (check_bitfield_type_and_width): Warn for implementation
6846 defined bit-field types only in ISO C.
6847
23a5b65a
RS
68482014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
6849
6850 Update copyright years
6851
f9030485
RS
68522014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
6853
6854 * c-array-notation.c: Use the standard form for the copyright notice.
6855
41958c28
BI
68562013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
6857
6858 * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
6859 (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
6860 field in parser is not empty. If not-empty, call the function
6861 c_parser_finish_omp_declare_simd.
6862 (c_parser_cilk_clause_vectorlength): Modified function to be shared
6863 between SIMD-enabled functions and #pragma simd. Added new parameter.
6864 (c_parser_cilk_all_clauses): Modified the usage of the function
6865 c_parser_cilk_clause_vectorlength as mentioned above.
6866 (c_parser_cilk_simd_fn_vector_attrs): New function.
6867 (c_finish_cilk_simd_fn_tokens): Likewise.
6868 (is_cilkplus_vector_p): Likewise.
6869 (c_parser_omp_clause_name): Added checking for "vectorlength,"
6870 "nomask," and "mask" strings in clause name.
6871 (c_parser_omp_all_clauses): Added 3 new case statements:
6872 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
6873 PRAGMA_CILK_CLAUSE_NOMASK.
6874 (c_parser_attributes): Added a cilk_simd_fn_tokens parameter. Added a
6875 check for vector attribute and if so call the function
6876 c_parser_cilk_simd_fn_vector_attrs. Also, when Cilk plus is enabled,
6877 called the function c_finish_cilk_simd_fn_tokens.
6878 (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
6879 parser field is non-empty. If so, parse them as you would parse
6880 the omp declare simd pragma.
6881 (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
6882 Added a check when step is a parameter and flag it as error.
6883 (CILK_SIMD_FN_CLAUSE_MASK): New #define.
6884 (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
6885 pragma_omp_clause.
6886
cef0fd0e
TS
68872013-12-17 Thomas Schwinge <thomas@codesourcery.com>
6888
6889 * c-parser.c (c_parser_omp_parallel): Fix description.
6890
12893402
BI
68912013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
6892
6893 * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
6894 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
6895 (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
6896 * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
6897
296674db
JM
68982013-12-04 Joseph Myers <joseph@codesourcery.com>
6899
6900 PR c/52023
6901 * c-parser.c (c_parser_alignas_specifier): Use
6902 c_sizeof_or_alignof_type instead of c_alignof.
6903 (c_parser_alignof_expression): Likewise, with min_alignof
6904 parameter depending on alignof spelling used.
6905
edd28054
MP
69062013-12-04 Marek Polacek <polacek@redhat.com>
6907
6908 PR c/54113
6909 * c-decl.c (start_function): Don't warn for missing prototype for
6910 inline functions.
6911
da0fc454
MP
69122013-12-03 Marek Polacek <polacek@redhat.com>
6913
6914 PR c/59351
6915 * c-decl.c (build_compound_literal): Allow compound literals with
6916 empty initial value.
6917
4c2ecab0
JM
69182013-12-02 Joseph Myers <joseph@codesourcery.com>
6919
6920 PR c/58235
6921 * c-typeck.c (build_modify_expr): Diagnose assignment to
6922 expression with array type.
6923
340baef7
JM
69242013-11-29 Joseph Myers <joseph@codesourcery.com>
6925
6926 PR c/42262
6927 * c-typeck.c (process_init_element): Do not treat a string as
6928 initializing a whole array when used with a designator for an
6929 individual element.
6930
6763b9f7
JM
69312013-11-29 Joseph Myers <joseph@codesourcery.com>
6932
6933 PR c/57574
6934 * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
6935 an inline function following a static declaration.
6936
e7bd1de1
JJ
69372013-11-28 Jakub Jelinek <jakub@redhat.com>
6938
6939 PR c/59310
6940 * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
6941 to p_name before calling c_parser_omp_teams instead of after.
6942 (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
6943 argument. Remove unused p_name variable.
6944
0136f8f0
AH
69452013-11-27 Aldy Hernandez <aldyh@redhat.com>
6946 Jakub Jelinek <jakub@redhat.com>
6947
6948 * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
6949 external_scope is NULL.
6950
241b71bb
TV
69512013-11-27 Tom de Vries <tom@codesourcery.com>
6952 Marc Glisse <marc.glisse@inria.fr>
6953
6954 PR c++/59032
6955 * c-typeck.c (build_unary_op): Allow vector increment and decrement.
6956
2fb9a547
AM
69572013-11-22 Andrew MacLeod <amacleod@redhat.com>
6958
6959 * c-typeck.c: Add required include files from gimple.h.
6960
8400e75e
DM
69612013-11-22 David Malcolm <dmalcolm@redhat.com>
6962
6963 * c-decl.c (define_label, shadow_tag_warned)
6964 (check_bitfield_type_and_width, grokdeclarator, grokparms,
6965 store_parm_decls_newstyle, store_parm_decls_oldstyle)
6966 (declspecs_add_type): Remove use of in_system_header macro.
6967 * c-parser.c (c_parser_unary_expression): Likewise.
6968 * c-typeck.c (store_init_value, process_init_element)
6969 (c_start_case): Likewise.
6970
6971 * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
6972 macro.
6973
6974 * c-parser.c (c_parser_set_source_position_from_token): Remove
6975 reference to in_system_header from comment.
6976
386b1f1f
RS
69772013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
6978
6979 * c-decl.c (grokdeclarator): Update comment to refer to
6980 tree_to_[su]hwi rather than tree_low_cst.
6981
ae7e9ddd
RS
69822013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
6983
6984 * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
6985 tree_to_uhwi throughout.
6986
9439e9a1
RS
69872013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
6988
6989 * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
6990 throughout.
6991
9541ffee
RS
69922013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
6993
6994 * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
6995 throughout.
6996
c02065fc
AH
69972013-11-15 Aldy Hernandez <aldyh@redhat.com>
6998
6999 * c-parser.c (c_parser_cilk_simd): New.
7000 (c_parser_cilk_verify_simd): New.
7001 (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
7002 (c_parser_omp_for_loop): Add case for NE_EXPR.
7003 Set c_break_label for CILK_SIMD.
7004 (c_parser_cilk_clause_vectorlength): New.
7005 (c_parser_cilk_clause_linear): New.
7006 (c_parser_cilk_clause_name): New.
7007 (c_parser_cilk_all_clauses): New.
7008 * c-typeck.c (build_unary_op): Pass location argument to
7009 readonly_error.
7010 (build_modify_expr): Same.
7011 (build_asm_expr): Same.
7012 (c_finish_bc_stmt): Error on break/continue in loops.
7013
18f429e2
AM
70142013-11-14 Andrew MacLeod <amacleod@redhat.com>
7015
7016 * c-typeck.c: Include only gimplify.h and gimple.h as needed.
7017
d8a2d370
DN
70182013-11-14 Diego Novillo <dnovillo@google.com>
7019
7020 * c-decl.c: Include print-tree.h.
7021 Include stor-layout.h.
7022 Include varasm.h.
7023 Include attribs.h.
7024 Include stringpool.h.
7025 * c-lang.c: Include fold-const.h.
7026 * c-parser.c: Include stringpool.h.
7027 Include attribs.h.
7028 Include stor-layout.h.
7029 Include varasm.h.
7030 Include trans-mem.h.
7031 * c-typeck.c: Include stor-layout.h.
7032 Include trans-mem.h.
7033 Include varasm.h.
7034 Include stmt.h.
7035
38b7bc7f
JM
70362013-11-13 Joseph Myers <joseph@codesourcery.com>
7037
7038 * c-tree.h (c_typespec_keyword): Add cts_auto_type.
7039 * c-decl.c (declspecs_add_type, finish_declspecs): Handle
7040 __auto_type.
7041 * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
7042 (c_parser_attribute_any_word, c_parser_objc_selector): Handle
7043 RID_AUTO_TYPE.
7044 (c_parser_declspecs): Take argument AUTO_TYPE_OK.
7045 (c_parser_declaration_or_fndef, c_parser_struct_declaration)
7046 (c_parser_declarator, c_parser_direct_declarator_inner)
7047 (c_parser_parameter_declaration, c_parser_type_name): All callers
7048 changed.
7049 (c_parser_declaration_or_fndef): Handle declarations with type
7050 determined from the initializer.
7051
45b0be94
AM
70522013-11-12 Andrew MacLeod <amacleod@redhat.com>
7053
18f429e2 7054 * c-typeck.c: Include gimplify.h.
45b0be94 7055
582d9b50
JM
70562013-11-12 Joseph Myers <joseph@codesourcery.com>
7057
7058 * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
7059 * c-parser.c (c_parser_declspecs): Mention _Thread_local in
7060 comment.
7061 * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
7062 or _Thread_local as appropriate in diagnostics.
7063 (build_null_declspecs): Initialize ret->thread_gnu_p.
7064 (declspecs_add_scspec): Handle either __thread or _Thread_local
7065 for RID_THREAD. Diagnose _Thread_local for pre-C11 standards if
7066 pedantic. Do not disallow _Thread_local extern and _Thread_local
7067 static.
7068
267bac10
JM
70692013-11-07 Joseph Myers <joseph@codesourcery.com>
7070 Andrew MacLeod <amacleod@redhat.com>
7071
7072 * c-aux-info.c (gen_type): Handle atomic qualifier.
7073 * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
7074 qualifiers when compating types.
7075 (shadow_tag_warned): Handle atomic_p in declspecs.
7076 (quals_from_declspecs): Likewise.
7077 (start_decl): Use c_type_promotes_to when promoting argument
7078 types.
7079 (grokdeclarator): Handle _Atomic.
7080 (get_parm_info): Diagnose any qualifier on "void" as only
7081 parameter.
7082 (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
7083 comparing types. Use c_type_promotes_to when promoting argument
7084 types.
7085 (finish_function): Use c_type_promotes_to when promoting argument
7086 types.
7087 (build_null_declspecs): Handle atomic_p in declspecs.
7088 (declspecs_add_qual): Handle RID_ATOMIC.
7089 * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
7090 (c_token_starts_declspecs): Handle RID_ATOMIC.
7091 (c_parser_declspecs): Handle atomic type specifiers and
7092 qualifiers.
7093 (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
7094 from types of expressions with atomic type.
7095 (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
7096 (c_parser_attribute_any_word): Handle RID_ATOMIC.
7097 (c_parser_initializer, c_parser_initelt, c_parser_initval)
7098 (c_parser_statement_after_labels, c_parser_switch_statement)
7099 (c_parser_for_statement, c_parser_expr_no_commas)
7100 (c_parser_conditional_expression, c_parser_binary_expression)
7101 (c_parser_cast_expression, c_parser_unary_expression)
7102 (c_parser_postfix_expression)
7103 (c_parser_postfix_expression_after_primary, c_parser_expression):
7104 Use convert_lvalue_to_rvalue.
7105 (c_parser_expression_conv, c_parser_expr_list): Document
7106 conversion of lvalues to rvalues. Use convert_lvalue_to_rvalue.
7107 (c_parser_objc_synchronized_statement): Use
7108 convert_lvalue_to_rvalue.
7109 (c_parser_objc_selector): Handle RID_ATOMIC.
7110 (c_parser_objc_receiver, c_parser_array_notation): Use
7111 convert_lvalue_to_rvalue.
7112 * c-tree.h (ctsk_typeof): Adjust comment to mention use for
7113 _Atomic (type-name).
7114 (struct c_declspecs): Add atomic_p field.
7115 (convert_lvalue_to_rvalue): Declare.
7116 * c-typeck.c (c_type_promotes_to): Promote atomic types to
7117 corresponding atomic types.
7118 (qualify_type): Don't add _Atomic qualifiers from second argument.
7119 (comp_target_types): Do not allow _Atomic mismatches.
7120 (type_lists_compatible_p): Do not remove atomic qualifiers when
7121 comparing types.
7122 (really_atomic_lvalue, convert_lvalue_to_rvalue)
7123 (build_atomic_assign): New functions.
7124 (build_unary_op): Use build_atomic_assign for atomic increment and
7125 decrement.
7126 (build_conditional_expr): Do not treat _Atomic void as a qualified
7127 version of void.
7128 (build_modify_expr): Use build_atomic_assign for atomic LHS.
7129 (find_anonymous_field_with_type, convert_to_anonymous_field)
7130 (convert_for_assignment): Do not remove atomic qualifiers when
7131 comparing types.
7132 (digest_init): Do not accept initialization of arrays of atomic
7133 elements by string constants.
7134 (build_asm_expr): Use convert_lvalue_to_rvalue.
7135 (build_binary_op): Do not treat _Atomic void as a qualified
7136 version of void.
7137
0c249d4b
DD
71382013-11-06 DJ Delorie <dj@redhat.com>
7139
7140 * c-decl.c (locate_old_decl): If a previous conflicting decl is
7141 both explicit and builtin, print the location of the explicit one.
7142
6d7f7e0a
TB
71432013-11-05 Tobias Burnus <burnus@net-b.de>
7144
7145 * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
7146 c_parser_omp_distribute, c_parser_omp_teams,
7147 c_parser_omp_target, c_parser_omp_declare): Handle
7148 -fopenmp-simd.
7149
b906f4ca
MP
71502013-11-03 Marek Polacek <polacek@redhat.com>
7151
7152 * c-decl.c (grokdeclarator): Add VLA instrumentation.
7153
ee1d5a02
JJ
71542013-11-01 Jakub Jelinek <jakub@redhat.com>
7155
7156 * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
7157 check_dup_generic at the end, unless remove is true.
7158 (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
7159 remove = true;.
7160 (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
7161
5a9785fb
JJ
71622013-10-31 Jakub Jelinek <jakub@redhat.com>
7163
7164 * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
7165 with decl that is not pointer nor array.
7166
939b37da
BI
71672013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
7168
7169 * c-decl.c (finish_function): Added a call for insert_cilk_frame when
7170 a spawning function is found.
7171 * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
7172 (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
7173 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
7174 * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
7175 case.
7176 (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
7177 * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
7178 expr.
7179 (c_finish_return): Added a check to reject _Cilk_spawn in return
7180 expression.
7181 (build_cilk_spawn): New function.
7182 (build_cilk_sync): Likewise.
7183 * Makefile.in (c-decl.o): Added cilk.h in dependency list.
ab20d992 7184
d4af74d4
TB
71852013-10-27 Tobias Burnus <burnus@net-b.de>
7186
7187 PR other/33426
7188 * c-parser.c (c_parser_while_statement, c_parser_while_statement,
7189 c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
7190 (c_parser_statement_after_labels): Update calls.
7191
d73749df 71922013-10-24 Tobias Burnus <burnus@net-b.de>
8170608b
TB
7193
7194 PR other/33426
7195 * c-parser.c (c_parser_pragma, c_parser_for_statement):
7196 Handle PRAGMA_IVDEP.
7197 (c_parser_statement_after_labels): Update call.
7198
f28aa681
MP
71992013-10-24 Marek Polacek <polacek@redhat.com>
7200
7201 * c-parser.c (c_parser_struct_declaration): Add a comment.
7202 (c_parser_declarator): Don't allow _Alignas here.
7203
0645c1a2
AM
72042013-10-17 Andrew MacLeod <amacleod@redhat.com>
7205
7206 * c-parser.c: Include omp-low.h.
7207 * c-typeck.c: Likewise.
7208
568a31f2
MP
72092013-10-17 Marek Polacek <polacek@redhat.com>
7210
7211 PR c/58267
7212 * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
7213 Document syntax of the array-declarator.
7214 (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
7215 are not permitted.
7216 (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
7217 (c_parser_struct_declaration): Likewise.
7218 (c_parser_declarator): Likewise.
7219 (c_parser_direct_declarator_inner): Likewise.
7220 (c_parser_parameter_declaration): Likewise.
7221 (c_parser_type_name): Likewise.
7222
acf0174b
JJ
72232013-10-11 Jakub Jelinek <jakub@redhat.com>
7224
7225 * c-lang.h (current_omp_declare_target_attribute): New extern
7226 decl.
7227 * c-parser.c: Include c-lang.h.
7228 (struct c_parser): Change tokens to c_token *.
7229 Add tokens_buf field. Change tokens_avail type to unsigned int.
7230 (c_parser_consume_token): If parser->tokens isn't
7231 &parser->tokens_buf[0], increment parser->tokens.
7232 (c_parser_consume_pragma): Likewise.
7233 (enum pragma_context): Add pragma_struct and pragma_param.
7234 (c_parser_external_declaration): Adjust
7235 c_parser_declaration_or_fndef caller.
7236 (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
7237 argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
7238 Adjust recursive call.
7239 (c_parser_struct_or_union_specifier): Use pragma_struct instead
7240 of pragma_external.
7241 (c_parser_parameter_declaration): Use pragma_param instead of
7242 pragma_external.
7243 (c_parser_compound_statement_nostart, c_parser_label,
7244 c_parser_for_statement): Adjust
7245 c_parser_declaration_or_fndef callers.
7246 (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
7247 it through to c_parser_conditional_expression.
7248 (c_parser_conditional_expression): Add omp_atomic_lhs argument,
7249 pass it through to c_parser_binary_expression. Adjust recursive
7250 call.
7251 (c_parser_binary_expression): Remove prec argument, add
7252 omp_atomic_lhs argument instead. Always start from PREC_NONE, if
7253 omp_atomic_lhs is non-NULL and one of the arguments of toplevel
7254 binop matches it, use build2 instead of parser_build_binary_op.
7255 (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
7256 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
7257 PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
7258 Handle pragma_struct and pragma_param the same as pragma_external.
7259 (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
7260 (c_parser_omp_variable_list): Parse array sections for
7261 OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
7262 (c_parser_omp_clause_collapse): Fully fold collapse expression.
7263 (c_parser_omp_clause_reduction): Handle user defined reductions.
7264 (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
7265 c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
7266 c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
7267 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
7268 c_parser_omp_clause_depend, c_parser_omp_clause_map,
7269 c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
7270 c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
7271 c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
7272 (c_parser_omp_all_clauses): Add finish_p argument. Don't call
7273 c_finish_omp_clauses if it is false. Handle new OpenMP 4.0 clauses.
7274 (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
7275 present to c_finish_omp_atomic. Handle OpenMP 4.0 atomic forms.
7276 (c_parser_omp_for_loop): Add CODE argument, pass it through
7277 to c_finish_omp_for. Change last argument to cclauses,
7278 and adjust uses to grab parallel clauses from the array of all
7279 the split clauses. Adjust c_parser_binary_expression,
7280 c_parser_declaration_or_fndef and c_finish_omp_for callers.
7281 (omp_split_clauses): New function.
7282 (c_parser_omp_simd): New function.
7283 (c_parser_omp_for): Add p_name, mask and cclauses arguments.
7284 Allow the function to be called also when parsing combined constructs,
7285 and call c_parser_omp_simd when parsing for simd.
7286 (c_parser_omp_sections_scope): If section-sequence doesn't start with
7287 #pragma omp section, require exactly one structured-block instead of
7288 sequence of statements.
7289 (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
7290 Allow the function to be called also when parsing combined constructs.
7291 (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
7292 Allow the function to be called also when parsing combined
7293 constructs.
7294 (c_parser_omp_taskgroup, c_parser_omp_cancel,
7295 c_parser_omp_cancellation_point, c_parser_omp_distribute,
7296 c_parser_omp_teams, c_parser_omp_target_data,
7297 c_parser_omp_target_update, c_parser_omp_target,
7298 c_parser_omp_declare_simd, c_finish_omp_declare_simd,
7299 c_parser_omp_declare_target, c_parser_omp_end_declare_target,
7300 c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
7301 (c_parser_omp_construct): Add p_name and mask vars. Handle
7302 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
7303 PRAGMA_OMP_TEAMS. Adjust c_parser_omp_for, c_parser_omp_parallel
7304 and c_parser_omp_sections callers.
7305 (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
7306 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
7307 OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
7308 (OMP_PARALLEL_CLAUSE_MASK): Likewise. Add OMP_CLAUSE_PROC_BIND.
7309 (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. Add
7310 OMP_CLAUSE_DEPEND.
7311 (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
7312 OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
7313 OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
7314 OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
7315 OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
7316 * c-typeck.c: Include tree-inline.h.
7317 (c_finish_omp_cancel, c_finish_omp_cancellation_point,
7318 handle_omp_array_sections_1, handle_omp_array_sections,
7319 c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
7320 (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
7321 user defined reductions.
7322 (c_tree_equal): New function.
7323 * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
7324 c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
7325 c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
7326 c_check_omp_declare_reduction_r): New prototypes.
7327 * c-decl.c (current_omp_declare_target_attribute): New variable.
7328 (c_decl_attributes): New function.
7329 (start_decl, start_function): Use it instead of decl_attributes.
7330 (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
7331 c_omp_reduction_decl, c_omp_reduction_lookup,
7332 c_check_omp_declare_reduction_r): New functions.
7333
0a6c2227
TT
73342013-09-25 Tom Tromey <tromey@redhat.com>
7335
7336 * Make-lang.in (c/gccspec.o): Remove.
7337 (CFLAGS-c/gccspec.o): New variable.
7338 (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
7339 (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
7340 (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
7341
f3bc55f0
TT
73422013-09-25 Tom Tromey <tromey@redhat.com>
7343
7344 * Make-lang.in (c/gccspec.o): Don't use subshell.
7345
a24d975c
MP
73462013-09-18 Marek Polacek <polacek@redhat.com>
7347
7348 PR sanitize/58443
7349 * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
7350 Remove unnecessary check.
7351
ce6923c5
MP
73522013-09-18 Marek Polacek <polacek@redhat.com>
7353
7354 PR sanitizer/58411
7355 * c-typeck.c (build_binary_op): Don't sanitize function if it has the
7356 no_sanitize_undefined attribute.
7357
a1e51df9
KT
73582013-09-13 Kai Tietz <ktietz@redhat.com>
7359
7360 PR target/57848
7361 * c-decl.c (c_builtin_function_ext_scope): Remove
7362 wrong assumption that it is never called on prexisting
7363 symbol.
7364
0af94e6f
JR
73652013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
7366
7367 * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
7368
20059c8b
GDR
73692013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
7370
7371 * c-objc-common.c (c_tree_printer): Tidy.
7372
de5a5fa1
MP
73732013-08-30 Marek Polacek <polacek@redhat.com>
7374
7375 * c-typeck.c (build_binary_op): Add division by zero and shift
7376 instrumentation.
7377
2531a1d9 73782013-08-26 Joern Rennecke <joern.rennecke@embecosm.com>
0fdd4508 7379 Joseph Myers <joseph@codesourcery.com>
2531a1d9 7380
6e2bcc98 7381 PR c/35649
2531a1d9
JR
7382 * c-typeck.c (c_common_type): Prefer double_type_node over
7383 other REAL_TYPE types with the same precision.
7384 (convert_arguments): Likewise.
7385
025311c4
GDR
73862013-08-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
7387
7388 * c-objc-common.c (c_tree_printer): Document the nature of the cast.
7389 (c_initialize_diagnostics): Call a destructor for the early printer.
7390
da6ca2b5
GDR
73912013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
7392
7393 * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
7394 printer initialization.
7395
318cda85 73962013-08-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
da6ca2b5 7397
318cda85
BI
7398 PR c/57490
7399 * c-array-notation.c (fix_conditional_array_notations_1): Added a
7400 check for truth values.
7401 (expand_array_notation_exprs): Added truth values case. Removed an
7402 unwanted else. Added for-loop to walk through subtrees in default
7403 case.
7404
b066401f
GDR
74052013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
7406
7407 * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
7408
fb48aadc
JM
74092013-07-23 Joseph Myers <joseph@codesourcery.com>
7410
7411 * c-parser.c (struct c_generic_association): Fix typo.
7412
433cc7b0
TT
74132013-07-23 Tom Tromey <tromey@redhat.com>
7414 Joseph Myers <joseph@codesourcery.com>
7415
7416 * c-parser.c (struct c_generic_association): New.
7417 (c_generic_association_d): New typedef.
7418 (c_parser_generic_selection): New function.
7419 (c_parser_postfix_expression): Handle RID_GENERIC.
7420
26d40c3d
JM
74212013-07-13 Jason Merrill <jason@redhat.com>
7422
7423 PR c++/57793
7424 * c-decl.c (finish_struct): Check for too-large class.
7425
ecdbd01a 74262013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
40d3d530
JR
7427
7428 PR c/57821
7429 * c-typeck.c (set_init_index): When folding, check for index overflow.
7430
1141ed3f
BI
74312013-06-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
7432
7433 * c-parser.c (c_parser_array_notation): Removed rejection of array
7434 notations in an array of function pointers.
7435
713b46fa
BI
74362013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
7437
7438 * c-array-notation.c (make_triplet_val_inv): New function.
7439 (create_cmp_incr): Likewise.
7440 (create_array_refs): Likewise.
7441 (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
7442 Also modularized common parts between functions and called the function.
7443 (build_array_notation_expr): Likewise.
7444 (fix_conditional_array_notations_1): Likewise.
7445 (fix_array_notation_expr): Likewise.
7446 (fix_array_notation_call_expr): Likewise.
7447
92f20202
MP
74482013-06-18 Marek Polacek <polacek@redhat.com>
7449
7450 PR c/57630
7451 * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
7452
73a23b06
BI
74532013-06-12 Balaji V. Iyer <balaji.v.iyer@intel.com>
7454
7455 * c-array-notation.c (build_array_notation_expr): Reject array notation
7456 mismatch between LHS and RHS even inside a call_expr. Also, removed
7457 a couple while statements that were dead code.
7458
00b8517d
BI
74592013-06-10 Balaji V. Iyer <balaji.v.iyer@intel.com>
7460
7461 * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
7462 excessive precision expressions in function parameters. Also removed
7463 couple unwanted while statements.
7464
1509bdda
BI
74652013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
7466
7467 * c-array-notation.c (expand_array_notation_exprs): Added
7468 ARRAY_NOTATION_REF case.
ab20d992 7469
d60f1706
BI
74702013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
7471
7472 * c-array-notation.c (length_mismatch_in_expr_p): Moved this
7473 function to c-family/array-notation-common.c.
7474 (is_cilkplus_reduce_builtin): Likewise.
7475 (find_rank): Likewise.
7476 (extract_array_notation_exprs): Likewise.
7477 (replace_array_notations): Likewise.
7478 (find_inv_trees): Likewise.
7479 (replace_inv_trees): Likewise.
7480 (contains_array_notation_expr): Likewise.
7481 (find_correct_array_notation_type): Likewise.
7482 (replace_invariant_exprs): Initialized additional_tcodes to NULL.
7483 (struct inv_list): Moved this to c-family/array-notation-common.c.
7484 * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
ab20d992 7485
6d6efbb3
BI
74862013-06-05 Balaji V. Iyer <balaji.v.iyer@intel.com>
7487
7488 * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
7489 reduction functions outside the for-loop. Added a check if the fundecl
7490 is non-NULL. Finally, removed an unwanted if-statement, and made the
7491 body unconditional.
7492
25c22937
BI
74932013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
7494
7495 * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
7496 condition of the if-statement matches the rank of else-block and then-
7497 block when array notations are used.
7498 * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
7499 expression after the entire function body is parsed.
7500 (c_parser_expr_no_commas): Delayed creating array notation expressions
7501 to the end of function parsing.
7502 * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
7503 whole if-statement instead of just the condition.
ab20d992 7504 (expand_array_notation_exprs): Added MODIFY_EXPR case.
25c22937 7505
edd25645
BI
75062013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
7507
7508 PR c/57474
7509 * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
7510 array to NULL_TREE if they are unused. Also added a check for the
7511 field to be NULL before its fields are used in future.
ab20d992 7512
065ce7f1
RO
75132013-05-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
7514
7515 PR bootstrap/57450
7516 * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
7517 (build_array_notation_expr): Likewise.
7518
36536d79
BI
75192013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
7520
7521 * c-typeck.c (build_array_ref): Added a check to see if array's
7522 index is greater than one. If true, then emit an error.
7523 (build_function_call_vec): Exclude error reporting and checking
7524 for builtin array-notation functions.
7525 (convert_arguments): Likewise.
7526 (c_finish_return): Added a check for array notations as a return
7527 expression. If true, then emit an error.
7528 (c_finish_loop): Added a check for array notations in a loop
7529 condition. If true then emit an error.
7530 (lvalue_p): Added a ARRAY_NOTATION_REF case.
7531 (build_binary_op): Added a check for array notation expr inside
7532 op1 and op0. If present, we call another function to find correct
7533 type.
7534 * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
7535 * c-parser.c (c_parser_compound_statement): Check if array
7536 notation code is used in tree, if so, then transform them into
7537 appropriate C code.
7538 (c_parser_expr_no_commas): Check if array notation is used in LHS
7539 or RHS, if so, then build array notation expression instead of
7540 regular modify.
7541 (c_parser_postfix_expression_after_primary): Added a check for
7542 colon(s) after square braces, if so then handle it like an array
7543 notation. Also, break up array notations in unary op if found.
7544 (c_parser_direct_declarator_inner): Added a check for array
7545 notation.
7546 (c_parser_compound_statement): Added a check for array notation in
7547 a stmt. If one is present, then expand array notation expr.
7548 (c_parser_if_statement): Likewise.
7549 (c_parser_switch_statement): Added a check for array notations in
7550 a switch statement's condition. If true, then output an error.
7551 (c_parser_while_statement): Similarly, but for a while.
7552 (c_parser_do_statement): Similarly, but for a do-while.
7553 (c_parser_for_statement): Similarly, but for a for-loop.
7554 (c_parser_unary_expression): Check if array notation is used in a
7555 pre-increment or pre-decrement expression. If true, then expand
7556 them.
7557 (c_parser_array_notation): New function.
7558 * c-array-notation.c: New file.
7559 * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
ab20d992 7560
cd192ccc
MS
75612013-05-23 Mike Stump <mikestump@comcast.net>
7562
7563 * c-typeck.c (convert_for_assignment): Handle references to memory
7564 spaces better.
7565
427b248d
JM
75662013-05-16 Jason Merrill <jason@redhat.com>
7567
7568 * Make-lang.in (cc1$(exeext)): Use link mutex.
7569
44d90fe1
PC
75702013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
7571
7572 * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
7573 to simply use OPT_Wpointer_arith.
7574 (build_unary_op): Likewise.
7575
4e7d7b3d
JJ
75762013-04-03 Jakub Jelinek <jakub@redhat.com>
7577
7578 PR c/19449
7579 * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
7580 argument. If set, or it temporarily for parsing of the first
7581 argument into force_folding_builtin_constant_p.
7582 (c_parser_postfix_expression): Adjust callers.
7583
839b422f
RB
75842013-03-21 Richard Biener <rguenther@suse.de>
7585
7586 * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
7587 instead of DECL_DEBUG_EXPR_IS_FROM. Guard properly.
7588
2ee028f1
MP
75892013-02-12 Marek Polacek <polacek@redhat.com>
7590
7591 PR c/44938
7592 * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
7593 origtypes to NULL.
7594
8824edff
JJ
75952013-01-24 Jakub Jelinek <jakub@redhat.com>
7596
7597 PR c/56078
7598 * c-typeck.c (set_nonincremental_init_from_string): If
7599 constructor_max_index is NULL, treat it as if tree_int_cst_lt
7600 returned false.
7601 (process_init_element): Likewise.
7602
eadd3d0d
JJ
76032012-12-20 Jakub Jelinek <jakub@redhat.com>
7604
7605 PR c++/55619
7606 * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
7607 argument, don't call default_function_array_conversion
7608 nor c_fully_fold here.
7609 (c_parser_asm_statement): Adjust callers.
7610 * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
7611 and outputs here, and call default_function_array_conversion
7612 on inputs that don't need to be addressable.
7613
f8a93a2e
JJ
76142012-12-18 Jakub Jelinek <jakub@redhat.com>
7615
7616 PR c/39464
7617 * c-typeck.c (convert_for_assignment): For -Wpointer-sign
7618 warning require that both c_common_unsigned_type as well as
7619 c_common_signed_type is the same for both mvl and mvr types.
7620
9771b263
DN
76212012-11-16 Diego Novillo <dnovillo@google.com>
7622
7623 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
7624
7625 * c-common.c: Use new vec API in vec.h.
7626 * c-common.h: Likewise.
7627 * c-gimplify.c: Likewise.
7628 * c-pragma.c: Likewise.
7629 * c-pretty-print.c: Likewise.
7630 * c-pretty-print.h: Likewise.
7631 * c-semantics.c: Likewise.
7632 * c-decl.c: Likewise.
7633 * c-parser.c: Likewise.
7634 * c-tree.h: Likewise.
7635 * c-typeck.c: Likewise.
7636
880661a4
JW
76372012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
7638
7639 PR c++/54930
7640 * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
7641
077d1abe
MLI
76422012-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
7643
7644 PR c/53066
7645 * c-decl.c (warn_if_shadowing): Do not warn if a variable
7646 shadows a function, unless the variable is a function or a
7647 pointer-to-function.
7648
3a785c97
JJ
76492012-10-12 Jakub Jelinek <jakub@redhat.com>
7650
7651 PR c/54381
7652 * c-parser.c (struct c_tree_loc_pair): Removed.
7653 (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
7654 add location_t * and tree * arguments, fill in array of 3
7655 sizeof_arg trees and corresponding locs.
7656 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
7657 c_parser_expr_list callers.
7658 (c_parser_postfix_expression_after_primary): Likewise. Pass
7659 array of 3 sizeof_arg trees and locs (corresponding to first
7660 3 arguments) to sizeof_pointer_memaccess_warning.
7661
703c8606
LC
76622012-10-09 Lawrence Crowl <crowl@google.com>
7663
7664 * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
7665 * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
7666 hash table.
7667
5d9de0d0
PC
76682012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
7669
7670 PR c++/54194
7671 * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
7672 call.
7673
a212e43f
MG
76742012-10-09 Marc Glisse <marc.glisse@inria.fr>
7675
7676 PR c++/54427
7677 * c-typeck.c: Include c-common.h.
7678 (enum stv_conv): Moved to c-common.h.
7679 (scalar_to_vector): Moved to c-common.c.
7680 (build_binary_op): Adapt to scalar_to_vector's new prototype.
7681 * Make-lang.in: c-typeck.c depends on c-common.h.
7682
3b78de56
AC
76832012-10-04 Arnaud Charlet <charlet@adacore.com>
7684
7685 * c-decl.c (c_write_global_declarations): Fix handling of
7686 -fdump-ada-spec*.
7687
78c60e3d
SS
76882012-09-30 Sharad Singhai <singhai@google.com>
7689
7690 * c-decl.c (c_write_global_declarations): Use a different method
7691 to determine if the dump has ben initialized.
7692
9f33203d
JM
76932012-09-14 Joseph Myers <joseph@codesourcery.com>
7694
7695 PR c/54552
7696 * c-typeck.c (c_cast_expr): When casting to a type requiring
7697 C_MAYBE_CONST_EXPR to be created, pass the inner expression to
7698 c_fully_fold first.
7699
a27d595d
JM
77002012-09-14 Joseph Myers <joseph@codesourcery.com>
7701
7702 PR c/54103
7703 * c-typeck.c (build_unary_op): Pass original argument of
7704 TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
7705 any C_MAYBE_CONST_EXPR, if it has integer operands.
7706 (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
7707 TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
7708 to c_objc_common_truthvalue_conversion, then remove any
7709 C_MAYBE_CONST_EXPR, if they have integer operands. Use
7710 c_objc_common_truthvalue_conversion not
7711 c_common_truthvalue_conversion.
7712 (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
7713 call note_integer_operands for arguments with integer operands
7714 that are not integer constants.
7715
9feb29df
JJ
77162012-09-13 Jakub Jelinek <jakub@redhat.com>
7717
7718 PR c/54559
7719 * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
7720 COMPLEX_TYPE with in_late_binary_op set temporarily to true.
7721
d409320c
JJ
77222012-08-31 Jakub Jelinek <jakub@redhat.com>
7723
7724 PR c/54428
7725 * c-convert.c (convert): Don't call fold_convert_loc if
7726 TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
7727 is a COMPLEX_EXPR. Remove TYPE_MAIN_VARIANT check from
7728 COMPLEX_TYPE -> COMPLEX_TYPE conversion.
7729
6265d07c
JJ
77302012-08-24 Jakub Jelinek <jakub@redhat.com>
7731
7732 PR c/54355
7733 * c-decl.c (c_parser_label): Pass true as nested and fix up comments
7734 for nested and empty_ok arguments in the call to
7735 c_parser_declaration_or_fndef.
7736
1a4049e7
JJ
77372012-08-17 Jakub Jelinek <jakub@redhat.com>
7738
7739 * c-tree.h (c_last_sizeof_arg): Declare.
7740 * c-parser.c (struct c_tree_loc_pair): New type.
7741 (c_parser_expr_list): Add sizeof_arg argument. Fill it in if
7742 non-NULL.
7743 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
7744 (c_parser_postfix_expression_after_primary): Likewise. Call
7745 sizeof_pointer_memaccess_warning if needed.
7746 (sizeof_ptr_memacc_comptypes): New function.
7747 * c-typeck.c (c_last_sizeof_arg): New global variable.
7748 (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
7749
0229aee9
UB
77502012-07-24 Uros Bizjak <ubizjak@gmail.com>
7751
7752 * c-lang.h (lang_decl): Add variable_size GTY option.
7753
7ee2468b
SB
77542012-07-16 Steven Bosscher <steven@gcc.gnu.org>
7755
7756 * c-decl.c: Include dumpfile.h instead of tree-dump.h.
7757 * Make-lang.in: Fix dependencies.
7758
d4a10d0a
SB
77592012-06-29 Steven Bosscher <steven@gcc.gnu.org>
7760
7761 * Make-lang.in: New file, rules migrated from gcc/Makefile.in
7762 and add language Makefile hooks.
7763 * config-lang.in: New file.
7764 * c-config-lang.in: Moved from gcc/config-lang.in to here, and
7765 add the required "normal" config-lang.in rules.
7766 * c-lang.h: Moved from gcc/ to here.
7767 * c-tree.h: Likewise.
7768 * c-objc-common.c: Likewise.
7769 * c-objc-common.h: Likewise.
7770 * c-typeck.c: Likewise.
7771 * c-convert.c: Likewise.
7772 * c-lang.c: Likewise.
7773 * c-aux-info.c: Likewise.
7774 * c-errors.c: Likewise.
7775 * gccspec.c: Likewise.
7776 * c-decl.c: Likewise. Include gt-c-c-decl.h, not gt-c-decl.h.
7777 * c-parser.c: Likewise. Include gt-c-c-parser.h, not gt-c-parser.h.
7778\f
c48514be 7779Copyright (C) 2012-2021 Free Software Foundation, Inc.
d4a10d0a
SB
7780
7781Copying and distribution of this file, with or without modification,
7782are permitted in any medium without royalty provided the copyright
7783notice and this notice are preserved.