]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/c/ChangeLog
c++: Failure to delay noexcept parsing with ptr-operator [PR100752]
[thirdparty/gcc.git] / gcc / c / ChangeLog
CommitLineData
9aa8327e
GA
12021-06-24 Jakub Jelinek <jakub@redhat.com>
2
3 PR c/101176
4 * c-parser.c (c_parser_has_attribute_expression): Set source range for
5 the result.
6
72021-06-24 Jakub Jelinek <jakub@redhat.com>
8
9 PR c/101171
10 * c-typeck.c (build_c_cast): Don't call note_integer_operands on
11 error_mark_node.
12
132021-06-24 Jakub Jelinek <jakub@redhat.com>
14
15 * c-parser.c (omp_split_clauses): Pass C_ORT_OMP_TARGET instead of
16 C_ORT_OMP for clauses on target construct.
17 (OMP_TARGET_CLAUSE_MASK): Add in_reduction clause.
18 (c_parser_omp_target): For non-combined target add
19 map (always, tofrom:) clauses for OMP_CLAUSE_IN_REDUCTION. Pass
20 C_ORT_OMP_TARGET to c_finish_omp_clauses.
21 * c-typeck.c (handle_omp_array_sections): Adjust ort handling
22 for addition of C_ORT_OMP_TARGET and simplify, mapping clauses are
23 never present on C_ORT_*DECLARE_SIMD.
24 (c_finish_omp_clauses): Likewise. Handle OMP_CLAUSE_IN_REDUCTION
25 on C_ORT_OMP_TARGET, set OMP_CLAUSE_MAP_IN_REDUCTION on
26 corresponding map clauses.
27
2f080224
GA
282021-06-21 Jakub Jelinek <jakub@redhat.com>
29
30 PR inline-asm/100785
31 * c-typeck.c (c_mark_addressable): Diagnose trying to make
32 bit-fields addressable.
33
ede6c356
GA
342021-06-15 Robin Dapp <rdapp@linux.ibm.com>
35
36 * c-decl.c (merge_decls): Copy DECL_USER_ALIGN if DECL_ALIGN is
37 similar.
38
8dc48181
GA
392021-06-14 Tobias Burnus <tobias@codesourcery.com>
40
41 PR c/100913
42 * c-parser.c (c_parser_omp_clause_affinity): No need to set iterator
43 var in the error case.
44
438aac59
GA
452021-06-07 Eric Botcazou <ebotcazou@adacore.com>
46
47 PR c/100920
48 * c-typeck.c (convert_for_assignment): Test fndecl_built_in_p to
49 spot built-in functions.
50
7d6987e9
GA
512021-06-06 Jakub Jelinek <jakub@redhat.com>
52
53 PR c/100902
54 * c-parser.c (c_parser_omp_target): Call c_omp_adjust_map_clauses
55 even when target is combined with other constructs.
56
572021-06-06 Eric Botcazou <ebotcazou@adacore.com>
58
59 PR c/100920
60 * c-decl.c (finish_struct): Fix thinko in previous change.
61 * c-typeck.c (convert_for_assignment): Do not warn on pointer
62 assignment and initialization for storage order purposes if the
63 RHS is a call to a DECL_IS_MALLOC function.
64
600f90cb
GA
652021-06-04 Martin Sebor <msebor@redhat.com>
66
67 PR c/100783
68 * c-objc-common.c (print_type): Handle erroneous types.
69
440c8a0a
GA
702021-06-03 Jakub Jelinek <jakub@redhat.com>
71
72 PR c++/100859
73 * c-typeck.c (c_finish_omp_clauses): Move OMP_CLAUSE_AFFINITY
74 after depend only cases.
75
ee682192
GA
762021-05-31 Richard Biener <rguenther@suse.de>
77
78 PR c++/88601
79 * c-decl.c (names_builtin_p): Handle RID_BUILTIN_SHUFFLEVECTOR.
80 * c-parser.c (c_parser_postfix_expression): Likewise.
81
48166757
GA
822021-05-28 Richard Biener <rguenther@suse.de>
83
84 PR c/100803
85 * gimple-parser.c (c_parser_gimple_paren_condition): Diagnose
86 invalid if conditions.
87
882021-05-28 Jakub Jelinek <jakub@redhat.com>
89
90 PR middle-end/99928
91 * c-typeck.c (handle_omp_array_sections): Copy OMP_CLAUSE_MAP_IMPLICIT.
92 (c_finish_omp_clauses): Move not just OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT
93 marked clauses last, but also OMP_CLAUSE_MAP_IMPLICIT. Add
94 map_firstprivate_head bitmap, set it for GOMP_MAP_FIRSTPRIVATE_POINTER
95 maps and silently remove OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT if it is
96 present too. For OMP_CLAUSE_MAP_IMPLICIT silently remove the clause
97 if present in map_head, map_field_head or map_firstprivate_head
98 bitmaps.
99
1002021-05-28 Tobias Burnus <tobias@codesourcery.com>
101
102 * c-parser.c (c_parser_omp_clause_affinity): New.
103 (c_parser_omp_clause_name, c_parser_omp_variable_list,
104 c_parser_omp_all_clauses, OMP_TASK_CLAUSE_MASK): Handle affinity clause.
105 * c-typeck.c (handle_omp_array_sections_1, handle_omp_array_sections,
106 c_finish_omp_clauses): Likewise.
107
01c59ef2
GA
1082021-05-26 Eric Botcazou <ebotcazou@adacore.com>
109
110 PR c/100653
111 * c-decl.c (finish_struct): Warn for a union containing an aggregate
112 field with a differing scalar storage order.
113
2832d51b
GA
1142021-05-21 Jakub Jelinek <jakub@redhat.com>
115
116 PR middle-end/99928
117 * c-typeck.c (c_finish_omp_clauses): Move firstprivate clauses with
118 OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT to the end of the chain. Don't error
119 if a decl is mentioned both in map clause and in such firstprivate
120 clause unless OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT_TARGET is also set.
121
65f32e5d
GA
1222021-05-19 Jakub Jelinek <jakub@redhat.com>
123
124 PR middle-end/99928
125 * c-parser.c (c_parser_omp_master): Set OMP_MASTER_COMBINED on
126 master when combined with taskloop.
127 (c_parser_omp_parallel): Don't set OMP_PARALLEL_COMBINED on
128 parallel master when not combined with taskloop.
129
a8daf9a1
GA
1302021-05-18 Richard Biener <rguenther@suse.de>
131
132 PR c/100522
133 * gimple-parser.c (c_parser_gimple_postfix_expression_after_primary):
134 Diagnose calls to non-functions.
135 (c_parser_gimple_statement): Diagnose unexpected assignment RHS.
136
a7ffc1ef
GA
1372021-05-17 Richard Biener <rguenther@suse.de>
138
139 PR c/100625
140 * gimple-parser.c (c_parser_gimple_label): Avoid building
141 a GIMPLE label with NULL label decl.
142
f9af11c7
GA
1432021-05-13 Martin Sebor <msebor@redhat.com>
144
145 PR c/100550
146 * c-decl.c (get_parm_array_spec): Avoid erroneous VLA bounds.
147
0ff3a0f2
GA
1482021-05-12 Marcel Vollweiler <marcel@codesourcery.com>
149
150 * c-parser.c (c_parser_omp_clause_map): Support map-type-modifier
151 'close'.
152
aa891c56
GA
1532021-05-10 Martin Liska <mliska@suse.cz>
154
155 * c-aux-info.c (affix_data_type): Use startswith
156 function instead of strncmp.
157 * c-typeck.c (build_function_call_vec): Likewise.
158 * gimple-parser.c (c_parser_gimple_parse_bb_spec): Likewise.
159
62d87a32
GA
1602021-05-07 Eric Botcazou <ebotcazou@adacore.com>
161
162 * c-typeck.c (build_unary_op) <ADDR_EXPR>: Do not issue an error
163 on the address of a pointer field in a record with reverse SSO.
164
99e8df7a
GA
1652021-05-04 Tobias Burnus <tobias@codesourcery.com>
166
167 * c-typeck.c (c_finish_omp_clauses): Accept float + complex
168 for || and && reductions.
169
3c8e539d
GA
1702021-04-29 Joseph Myers <joseph@codesourcery.com>
171
172 * c-typeck.c (function_types_compatible_p): For C2X, treat
173 unprototyped function as compatible with non-variadic prototyped
174 function even if some argument types are changed by the default
175 argument promotions.
176
ee351f7f
GA
1772021-04-15 Martin Sebor <msebor@redhat.com>
178
179 PR c/99420
180 PR c/99972
181 * c-decl.c (pushdecl): Always propagate type attribute.
182
1832021-04-15 Richard Sandiford <richard.sandiford@arm.com>
184
185 PR c/98852
186 * c-typeck.c (c_common_type): Do not drop attributes that
187 affect type identity.
188
1d54b138
GA
1892021-04-10 Jakub Jelinek <jakub@redhat.com>
190
191 PR c/99990
192 * c-decl.c (finish_decl): Don't overwrite TREE_TYPE of
193 error_mark_node.
194
4493b1c1
GA
1952021-03-25 Jakub Jelinek <jakub@redhat.com>
196
197 PR c++/99565
198 * c-typeck.c (build_conditional_expr): Pass OEP_ADDRESS_OF_SAME_FIELD
199 to operand_equal_p.
200
5f256a70
GA
2012021-03-19 Jakub Jelinek <jakub@redhat.com>
202
203 PR c/99588
204 * c-typeck.c (mark_exp_read): Recognize what build_atomic_assign
205 with modifycode NOP_EXPR produces and mark the _Atomic var as read
206 if found.
207 (build_atomic_assign): For modifycode of NOP_EXPR, use COMPOUND_EXPRs
208 rather than STATEMENT_LIST. Otherwise call mark_exp_read on lhs.
209 Set TREE_SIDE_EFFECTS on the TARGET_EXPR.
210
3c5b6d24
GA
2112021-03-15 Tobias Burnus <tobias@codesourcery.com>
212
213 PR c++/99509
214 * c-decl.c (finish_decl): For 'omp declare target implicit' vars,
215 ensure that the varpool node is marked as offloadable.
216
ceae9533
GA
2172021-03-05 Tobias Burnus <tobias@codesourcery.com>
218
219 PR c/99137
220 * c-parser.c (c_parser_oacc_clause_async): Reject comma expressions.
221
4028d01a
GA
2222021-02-24 Martin Sebor <msebor@redhat.com>
223
224 PR middle-end/97172
225 * c-decl.c (free_attr_access_data): Clear attribute arg spec.
226
bf81237e
GA
2272021-02-18 Jakub Jelinek <jakub@redhat.com>
228
229 PR c/99136
230 * c-typeck.c (c_finish_return): Don't wrap retval into
231 EXCESS_PRECISION_EXPR in functions that return void.
232
0c5cdb31
GA
2332021-02-11 Marek Polacek <polacek@redhat.com>
234
235 * c-parser.c (c_parser_if_statement): Use vec_free.
236
a19dd5e6
GA
2372021-02-04 Martin Sebor <msebor@redhat.com>
238
239 PR c/97882
240 * c-decl.c (locate_old_decl): Add type to diagnostic output.
241 (diagnose_mismatched_decls): Same.
242 (start_function): Introduce temporaries for better readability.
243 * c-typeck.c (comptypes_internal): Only consider complete enum
244 types in comparisons with integers.
245
f7884fb1
GA
2462021-02-01 Martin Sebor <msebor@redhat.com>
247
248 PR middle-end/97172
249 * c-decl.c (free_attr_access_data): New function.
250 (c_parse_final_cleanups): Call free_attr_access_data.
251
59cf67d1
GA
2522021-01-16 Kwok Cheung Yeung <kcy@codesourcery.com>
253
254 * c-parser.c (c_parser_omp_clause_detach): New.
255 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_DETACH clause.
256 (OMP_TASK_CLAUSE_MASK): Add mask for PRAGMA_OMP_CLAUSE_DETACH.
257 * c-typeck.c (c_finish_omp_clauses): Handle PRAGMA_OMP_CLAUSE_DETACH
258 clause. Prevent use of detach with mergeable and overriding the
259 data sharing mode of the event handle.
260
2f7f0d32
GA
2612021-01-15 Jakub Jelinek <jakub@redhat.com>
262
263 * c-typeck.c (c_finish_omp_clauses): For reduction build array with
264 unqualified element type and then call c_build_qualified_type on the
265 ARRAY_TYPE.
266
7d187e4f
GA
2672021-01-07 Richard Biener <rguenther@suse.de>
268
269 * gimple-parser.c (c_parser_gimple_compound_statement): Only
270 reallocate loop array if it is too small.
271
eefe499f
GA
2722020-12-16 Martin Uecker <muecker@gwdg.de>
273
274 PR c/98047
275 * c-typeck.c (build_modify_expr): Drop qualifiers.
276
2772020-12-16 Martin Uecker <muecker@gwdg.de>
278
279 PR c/98260
280 * c-parser.c (c_parser_expression): Look into
281 nop expression when marking expressions as read.
282
d52945ce
GA
2832020-12-14 Martin Liska <mliska@suse.cz>
284
285 PR sanitizer/98204
286 * c-typeck.c (pointer_diff): Do not emit a top-level
287 sanitization.
288 (build_binary_op): Likewise.
289
ca2bd949
GA
2902020-12-09 Tobias Burnus <tobias@codesourcery.com>
291
292 * c-parser.c (c_parser_omp_allocate): New.
293 (c_parser_omp_construct): Call it.
294
2952020-12-09 Richard Biener <rguenther@suse.de>
296
297 PR c/98200
298 * gimple-parser.c (c_parser_gimple_postfix_expression): Return
299 early on error.
300
bc8a7013
GA
3012020-12-07 Martin Uecker <muecker@gwdg.de>
302
303 PR c/97981
304 * c-typeck.c (convert_lvalue_to_rvalue): Move the code
305 that drops qualifiers to the end of the function.
306
d48df6f2
GA
3072020-11-26 Martin Uecker <muecker@gwdg.de>
308
309 PR c/65455
310 PR c/92935
311 * c-parser.c (c_parser_declaration_or_fndef): Remove
312 redundant code to drop qualifiers of _Atomic types for __auto_type.
313 (c_parser_typeof_specifier): Do not drop qualifiers of _Atomic
314 types for __typeof__.
315
1e2c9a27
GA
3162020-11-24 Jakub Jelinek <jakub@redhat.com>
317
318 PR c/97958
319 * c-parser.c (c_parser_binary_expression): For omp atomic binary
320 expressions, use make_node instead of build2 to avoid checking build2
321 performs.
322
8e6198d0
GA
3232020-11-23 Joseph Myers <joseph@codesourcery.com>
324
325 PR c/95630
326 * c-typeck.c (build_binary_op): Use pedwarn_c99 with OPT_Wpedantic
327 for comparisons of complete and incomplete pointers.
328
7a97e2fc
GA
3292020-11-21 Aaron Sawdey <acsawdey@linux.ibm.com>
330
331 * c-aux-info.c (gen_type): Support opaque types.
332
82e5048e
GA
3332020-11-20 Martin Sebor <msebor@redhat.com>
334
335 PR middle-end/97879
336 * c-decl.c (start_function): Set ATTR_FLAG_INTERNAL in flags.
337
3382020-11-20 Jakub Jelinek <jakub@redhat.com>
339
340 PR other/97911
341 * Make-lang.in (c.serial): Change from goal to a variable.
342 (.PHONY): Drop c.serial.
343
3442020-11-20 Martin Uecker <muecker@gwdg.de>
345
346 * c-typeck.c (convert_lvalue_to_rvalue): Drop qualifiers.
347
d62586ee
GA
3482020-11-19 Jakub Jelinek <jakub@redhat.com>
349
350 PR c/97860
351 * c-decl.c (get_parm_array_spec): Bail out of nelts is
352 error_operand_p.
353
25bb75f8
GA
3542020-11-18 Jakub Jelinek <jakub@redhat.com>
355
356 * Make-lang.in (c.serial): New goal.
357 (.PHONY): Add c.serial c.prev.
358 (cc1$(exeext)): Call LINK_PROGRESS.
359
77f67db2
GA
3602020-11-13 Vladimir N. Makarov <vmakarov@redhat.com>
361
362 * c-parser.c (c_parser_asm_statement): Parse outputs for asm
363 goto too.
364 * c-typeck.c (build_asm_expr): Remove an assert checking output
365 absence for asm goto.
366
3672020-11-13 Jakub Jelinek <jakub@redhat.com>
368
369 * c-typeck.c (c_finish_omp_clauses): Don't clear
370 OMP_CLAUSE_REDUCTION_INSCAN unless reduction_seen == -2.
371
3722020-11-13 Iain Sandoe <iain@sandoe.co.uk>
373
374 PR objc/77404
375 * c-parser.c (c_parser_objc_class_definition): Pass the
376 location of the class name to the interface declaration.
377
bb622641
GA
3782020-11-10 Strager Neds <strager.nds@gmail.com>
379
380 * c-decl.c (merge_decls): Use new overload of
381 set_decl_section_name.
382
3832020-11-10 Chung-Lin Tang <cltang@codesourcery.com>
384
385 * c-parser.c (c_parser_omp_target_data): Add use of
386 new c_omp_adjust_map_clauses function. Add GOMP_MAP_ATTACH_DETACH as
387 handled map clause kind.
388 (c_parser_omp_target_enter_data): Likewise.
389 (c_parser_omp_target_exit_data): Likewise.
390 (c_parser_omp_target): Likewise.
391 * c-typeck.c (handle_omp_array_sections): Adjust COMPONENT_REF case to
392 use GOMP_MAP_ATTACH_DETACH map kind for C_ORT_OMP region type.
393 (c_finish_omp_clauses): Adjust bitmap checks to allow struct decl and
394 same struct field access to co-exist on OpenMP construct.
395
2da7ee05
GA
3962020-11-07 Martin Uecker <muecker@gwdg.de>
397
398 * c-parser.c (c_parser_label): Implement mixing of labels and code.
399 (c_parser_all_labels): Likewise.
400
44cab2d8
GA
4012020-11-06 Iain Sandoe <iain@sandoe.co.uk>
402
403 * c-parser.c (c_parser_objc_at_property_declaration):
404 Improve parsing fidelity. Associate better location info
405 with @property attributes. Clean up the interface to
406 objc_add_property_declaration ().
407
4082020-11-06 Nathan Sidwell <nathan@acm.org>
409
410 * c-decl.c (diagnose_mismatched_decls): Rename
411 DECL_IS_BUILTIN->DECL_IS_UNDECLARED_BUILTIN.
412 (warn_if_shadowing, implicitly_declare, names_builtin_p)
413 (collect_source_refs): Likewise.
414 * c-typeck.c (inform_declaration, inform_for_arg)
415 (convert_for_assignment): Likewise.
416
4172020-11-06 Tobias Burnus <tobias@codesourcery.com>
418
419 * c-parser.c (c_parser_omp_atomic): Add openacc parameter and update
420 OpenACC matching.
421 (c_parser_omp_construct): Update call.
422
35c125cb
GA
4232020-11-04 Jakub Jelinek <jakub@redhat.com>
424
425 PR c++/97670
426 * c-typeck.c (c_finish_omp_clauses): Look through array reductions to
427 find underlying decl to clear in the aligned_head bitmap.
428
4292020-11-04 Joseph Myers <joseph@codesourcery.com>
430
431 * c-decl.c (handle_nodiscard_attribute): New.
432 (std_attribute_table): Add nodiscard.
433 * c-parser.c (c_parser_std_attribute): Expect argument to
434 nodiscard attribute to be a string. Do not special-case ignoring
435 nodiscard.
436 * c-typeck.c (maybe_warn_nodiscard): New.
437 (build_compound_expr, emit_side_effect_warnings): Call
438 maybe_warn_nodiscard.
439 (c_process_expr_stmt, c_finish_stmt_expr): Also call
440 emit_side_effect_warnings if warn_unused_result.
441
4f0606fe
GA
4422020-10-29 Asher Gordon <AsDaGo@posteo.net>
443
444 * c-typeck.c (free_all_tagged_tu_seen_up_to): Replace free
445 with XDELETE.
446 (finish_init): Likewise.
447 (pop_init_level): Likewise.
448
e93aae4a
GA
4492020-10-28 Joseph Myers <joseph@codesourcery.com>
450
451 * c-decl.c (store_parm_decls_newstyle): Use pedwarn_c11 not
452 error_at for omitted parameter name.
453
4542020-10-28 Jakub Jelinek <jakub@redhat.com>
455
456 * c-parser.c (c_parser_omp_clause_name): Handle allocate.
457 (c_parser_omp_clause_allocate): New function.
458 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_ALLOCATE.
459 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
460 OMP_PARALLEL_CLAUSE_MASK, OMP_SINGLE_CLAUSE_MASK,
461 OMP_TASK_CLAUSE_MASK, OMP_TASKGROUP_CLAUSE_MASK,
462 OMP_DISTRIBUTE_CLAUSE_MASK, OMP_TEAMS_CLAUSE_MASK,
463 OMP_TARGET_CLAUSE_MASK, OMP_TASKLOOP_CLAUSE_MASK): Add
464 PRAGMA_OMP_CLAUSE_ALLOCATE.
465 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_ALLOCATE.
466
89bb01e7
GA
4672020-10-27 Joseph Myers <joseph@codesourcery.com>
468
469 * c-parser.c (c_parser_std_attribute_specifier): Allow duplicate
470 standard attributes.
471
efe71fcc
GA
4722020-10-23 Marek Polacek <polacek@redhat.com>
473
474 PR c++/91741
475 * c-parser.c (c_parser_binary_expression): Implement -Wsizeof-array-div.
476 (c_parser_postfix_expression): Set PAREN_SIZEOF_EXPR.
477 (c_parser_expr_list): Handle PAREN_SIZEOF_EXPR like SIZEOF_EXPR.
478 * c-tree.h (char_type_p): Declare.
479 * c-typeck.c (char_type_p): No longer static.
480
4812020-10-23 Martin Sebor <msebor@redhat.com>
482
483 PR middle-end/97552
484 * c-decl.c (get_parm_array_spec): Handle static VLA parameters.
485
2fe5b7d1
GA
4862020-09-19 Martin Sebor <msebor@redhat.com>
487
488 PR c/50584
489 * c-decl.c (lookup_last_decl): Define new function.
490 (c_decl_attributes): Call it.
491 (start_decl): Add argument and use it.
492 (finish_decl): Call build_attr_access_from_parms and decl_attributes.
493 (get_parm_array_spec): Define new function.
494 (push_parm_decl): Call get_parm_array_spec.
495 (start_function): Call warn_parm_array_mismatch. Build attribute
496 access and add it to current function.
497 * c-parser.c (c_parser_declaration_or_fndef): Diagnose mismatches
498 in forms of array parameters.
499 * c-tree.h (start_decl): Add argument.
500
5012020-09-19 Sandra Loosemore <sandra@codesourcery.com>
502
503 * c-decl.c (c_break_label, c_cont_label): Delete, and replace
504 with...
505 (in_statement): New.
506 (start_function): Adjust for above change.
507 (c_push_function_context, c_pop_function_context): Likewise.
508 * c-lang.h (struct language_function): Likewise.
509 * c-objc-common.h (LANG_HOOKS_BLOCK_MAY_FALLTHRU): Define.
510 * c-parser.c (objc_foreach_break_label, objc_foreach_continue_label):
511 New.
512 (c_parser_statement_after_labels): Adjust calls to c_finish_bc_stmt.
513 (c_parser_switch_statement): Adjust break/switch context handling
514 and calls to renamed functions.
515 (c_parser_while_statement): Adjust break/switch context handling and
516 build a WHILE_STMT.
517 (c_parser_do_statement): Ditto, with DO_STMT respectively.
518 (c_parser_for_statement): Ditto, with FOR_STMT respectively.
519 (c_parser_omp_for_loop): Adjust break/switch context handling.
520 * c-tree.h (c_break_label, c_cont_label): Delete.
521 (IN_SWITCH_STMT, IN_ITERATION_STMT): Define.
522 (IN_OMP_BLOCK, IN_OMP_FOR, IN_OBJC_FOREACH): Define.
523 (in_statement, switch_statement_break_seen_p): Declare.
524 (c_start_case, c_finish_case): Renamed to...
525 (c_start_switch, c_finish_switch).
526 (c_finish_bc_stmt): Adjust arguments.
527 * c-typeck.c (build_function_call_vec): Don't try to print
528 statements with %qE format.
529 (struct c_switch): Rename switch_expr field to switch_stmt.
530 Add break_stmt_seen_p field.
531 (c_start_case): Rename to c_start_switch. Build a SWITCH_STMT
532 instead of a SWITCH_EXPR. Update for changes to struct c_switch.
533 (do_case): Update for changes to struct c_switch.
534 (c_finish_case): Rename to c_finish_switch. Update for changes to
535 struct c_switch and change of representation from SWITCH_EXPR to
536 SWITCH_STMT.
537 (c_finish_loop): Delete.
538 (c_finish_bc_stmt): Update to reflect changes to break/continue
539 state representation. Build a BREAK_STMT or CONTINUE_STMT instead
540 of a GOTO_EXPR except for objc foreach loops.
541
e1a4a8a0
GA
5422020-09-01 Jakub Jelinek <jakub@redhat.com>
543
544 PR c++/96867
545 * c-typeck.c (handle_omp_array_sections_1): Test C_ARRAY_PARAMETER
546 only on PARM_DECLs.
547
8f7ea26a
GA
5482020-08-28 Martin Sebor <msebor@redhat.com>
549
550 PR c/96596
551 * c-decl.c (match_builtin_function_types): Avoid dealing with erroneous
552 argument type.
553
8b394f01
GA
5542020-08-27 Martin Liska <mliska@suse.cz>
555
556 * gimple-parser.c (c_parser_gimple_compound_statement): Set exact argument of a vector
557 growth function to true.
558
db0f6efe
GA
5592020-08-25 Tobias Burnus <tobias@codesourcery.com>
560
561 PR c/96678
562 * c-typeck.c (handle_omp_array_sections_1): Talk about
563 array function parameter in the error message.
564
5c265693
GA
5652020-08-18 Jakub Jelinek <jakub@redhat.com>
566
567 PR c/96571
568 * c-parser.c (c_parser_generic_selection): Change match_found from bool
569 to int, holding index of the match. Call mark_exp_read on the selector
570 expression and on expressions other than the selected one.
571
4967ca2f
GA
5722020-08-01 Richard Sandiford <richard.sandiford@arm.com>
573
574 PR c/96377
575 * c-typeck.c (process_init_element): Split test for whether to
576 recurse into a record, union or array into...
577 (initialize_elementwise_p): ...this new function. Don't recurse
578 into a vector type if the initialization value is also a vector.
579
48cc2e46
GA
5802020-07-31 Richard Biener <rguenther@suse.de>
581
582 PR debug/96383
583 * c-objc-common.h (LANG_HOOKS_FINALIZE_EARLY_DEBUG):
584 Define to c_common_finalize_early_debug.
585
3ea9abca
GA
5862020-07-22 Tobias Burnus <tobias@codesourcery.com>
587
588 * c-parser.c (c_parser_omp_clause_hint): Require nonnegative hint clause.
589 (c_parser_omp_critical): Permit hint(0) clause without named critical.
590 (c_parser_omp_construct): Don't assert if error_mark_node is returned.
591
30430061
GA
5922020-07-21 Sunil K Pandey <skpgkp2@gmail.com>
593
594 PR target/95237
595 * c-decl.c (finish_decl): Call target hook
596 lower_local_decl_alignment to lower local decl alignment.
597
3f8ca9cb
GA
5982020-07-09 Julian Brown <julian@codesourcery.com>
599 Thomas Schwinge <thomas@codesourcery.com>
600
601 PR middle-end/95270
602 * c-typeck.c (c_finish_omp_clauses): Set OMP_CLAUSE_SIZE (bias) to zero
603 for standalone attach/detach clauses.
604
a82c4c4c 6052020-07-08 Eric Botcazou <ebotcazou@adacore.com>
50873cc5
GA
606
607 * c-typeck.c (convert_for_assignment): If -Wscalar-storage-order is
608 set, warn for conversion between pointers that point to incompatible
609 scalar storage orders.
610
f60ee68d
GA
6112020-07-07 Kaipeng Zhou <zhoukaipeng3@huawei.com>
612
613 * c-parser.c (c_parser_statement_after_labels): Pass correct
614 parameters to c_parser_do_statement.
615
56638b9b
GA
6162020-06-16 Jakub Jelinek <jakub@redhat.com>
617
618 * c-parser.c (c_parser_expr_no_commas): Save, clear and restore
619 c_in_omp_for.
620 (c_parser_omp_for_loop): Set c_in_omp_for around some calls to avoid
621 premature c_fully_fold. Defer explicit c_fully_fold calls to after
622 c_finish_omp_for.
623 * c-tree.h (c_in_omp_for): Declare.
624 * c-typeck.c (c_in_omp_for): Define.
625 (build_modify_expr): Avoid c_fully_fold if c_in_omp_for.
626 (digest_init): Likewise.
627 (build_binary_op): Likewise.
628
6292020-06-16 Jakub Jelinek <jakub@redhat.com>
630
631 * c-parser.c (c_parser_omp_clause_schedule): Reject modifier separated
632 from kind by comma rather than colon.
633
1a59f3db
GA
6342020-06-05 Mark Wielaard <mark@klomp.org>
635
636 * c-decl.c (implicit_decl_warning): When warned and olddecl is
637 an undeclared builtin, then add a fixit header hint, if found.
638 (implicitly_declare): Add OPT_Wbuiltin_declaration_mismatch to
639 warning_at about implicit builtin declaration type mismatch.
640
9a5b7438
GA
6412020-06-03 Mark Wielaard <mark@klomp.org>
642
643 * c-parser.c (struct c_parser): Add seen_string_literal
644 bitfield.
645 (c_parser_consume_token): Reset seen_string_literal.
646 (c_parser_error_richloc): Add name_hint if seen_string_literal
647 and next token is a CPP_NAME and we have a missing header
648 suggestion for the name.
649 (c_parser_string_literal): Set seen_string_literal.
650
6512020-06-03 Mark Wielaard <mark@klomp.org>
652
653 * c-parser.c (c_parser_postfix_expression_after_primary): Add
654 scope with matching_parens after CPP_OPEN_PAREN.
655
6562020-06-03 Tobias Burnus <tobias@codesourcery.com>
657
658 * c-objc-common.h (LANG_HOOKS_OMP_PREDETERMINED_MAPPING): Redefine.
659
53ffb43a
GA
6602020-05-28 Nicolas Bértolo <nicolasbertolo@gmail.com>
661
662 * Make-lang.in: Remove extra slash.
663
8f66f175
ML
6642020-05-19 Martin Liska <mliska@suse.cz>
665
666 * c-parser.c: Fix typo.
667
49ddde69
JJ
6682020-05-14 Jakub Jelinek <jakub@redhat.com>
669
670 * c-parser.c (c_parser_omp_target): Set cfun->has_omp_target.
671
eb72dc66
RB
6722020-05-07 Richard Biener <rguenther@suse.de>
673
674 PR middle-end/94703
675 * gimple-parser.c (c_parser_parse_ssa_name): Do not set
676 DECL_GIMPLE_REG_P.
677
bf915591
JJ
6782020-04-30 Jakub Jelinek <jakub@redhat.com>
679
680 PR c/94842
681 * c-decl.c (set_labels_context_r): In addition to context-less
682 LABEL_DECLs adjust also LABEL_DECLs with context equal to
683 parent function if any.
684 (store_parm_decls): Adjust comment.
685
e1113ffb
JJ
6862020-04-19 Jakub Jelinek <jakub@redhat.com>
687
688 PR objc/94637
689 * c-parser.c (c_parser_objc_selector_arg): Handle CPP_SCOPE like
690 two CPP_COLON tokens.
691
2e389749
JJ
6922020-04-17 Jakub Jelinek <jakub@redhat.com>
693
694 PR other/94629
695 * c-parser.c (c_parser_oacc_routine): Remove redundant assignment
696 to data.clauses.
697
2dc9294c
JJ
6982020-04-15 Jakub Jelinek <jakub@redhat.com>
699
700 PR c/94593
701 * c-parser.c (c_parser_pragma) <case PRAGMA_OMP_REQUIRES>: Reject
702 requires directive when not at file scope.
703
13e41d8b
TB
7042020-04-08 Tobias Burnus <tobias@codesourcery.com>
705
706 PR middle-end/94120
707 * c-decl.c (c_check_in_current_scope): New function.
708 * c-tree.h (c_check_in_current_scope): Declare it.
709 * c-parser.c (c_parser_oacc_declare): Add check that variables
710 are declared in the same scope as the directive. Fix handling
711 of namespace vars.
712
4df50a05
JJ
7132020-04-07 Jakub Jelinek <jakub@redhat.com>
714
715 PR c++/94512
716 * c-parser.c (c_parser_omp_parallel): Set OMP_PARALLEL_COMBINED
717 if c_parser_omp_master succeeded.
718
5db9e893
JJ
7192020-03-23 Jakub Jelinek <jakub@redhat.com>
720
721 PR gcov-profile/94029
722 PR c/94239
723 * c-parser.c (c_parser_declaration_or_fndef): Initialize endloc to
724 the function_start_locus location. Don't do that afterwards for the
725 __GIMPLE body parsing.
726
9def91e9
JJ
7272020-03-19 Jakub Jelinek <jakub@redhat.com>
728
729 PR gcov-profile/94029
730 * c-tree.h (finish_function): Add location_t argument defaulted to
731 input_location.
732 * c-parser.c (c_parser_compound_statement): Add endlocp argument and
733 set it to the locus of closing } if non-NULL.
734 (c_parser_compound_statement_nostart): Return locus of closing }.
735 (c_parser_parse_rtl_body): Likewise.
736 (c_parser_declaration_or_fndef): Propagate locus of closing } to
737 finish_function.
738 * c-decl.c (finish_function): Add end_loc argument, use it instead of
739 input_location to set function_end_locus.
740
046c5890
JJ
7412020-03-17 Jakub Jelinek <jakub@redhat.com>
742
743 PR c/94172
744 * c-tree.h (C_TYPE_INCOMPLETE_VARS): Define to TYPE_LANG_SLOT_1
745 instead of TYPE_VFIELD, and support it on {RECORD,UNION,ENUMERAL}_TYPE.
746 (TYPE_ACTUAL_ARG_TYPES): Check that it is only used on FUNCTION_TYPEs.
747 * c-decl.c (pushdecl): Push C_TYPE_INCOMPLETE_VARS also to
748 ENUMERAL_TYPEs.
749 (finish_incomplete_vars): New function, moved from finish_struct. Use
750 relayout_decl instead of layout_decl.
751 (finish_struct): Remove obsolete comment about C_TYPE_INCOMPLETE_VARS
752 being TYPE_VFIELD. Use finish_incomplete_vars.
753 (finish_enum): Clear C_TYPE_INCOMPLETE_VARS. Call
754 finish_incomplete_vars.
755 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
756 also on ENUMERAL_TYPEs.
757
c015ff8c
JJ
7582020-03-16 Jakub Jelinek <jakub@redhat.com>
759
760 PR c/94179
761 * c-fold.c (c_fully_fold_internal): Handle MEM_REF.
762
f2e9fe5f
MS
7632020-03-13 Martin Sebor <msebor@redhat.com>
764
765 PR c/94040
766 * c-decl.c (builtin_structptr_type_count): New constant.
767 (match_builtin_function_types): Reject decls that are incompatible
768 in types pointed to by pointers.
769 (diagnose_mismatched_decls): Adjust comments.
770
c9d70946
JM
7712020-03-05 Joseph Myers <joseph@codesourcery.com>
772
773 PR c/93577
774 * c-typeck.c (pop_init_level): Do not diagnose initializers as
775 empty when initialized type is error_mark_node.
776 (set_designator, process_init_element): Ignore initializers for
777 elements of a variable-size type or of error_mark_node.
778
726e292d
MS
7792020-03-01 Martin Sebor <msebor@redhat.com>
780
781 PR middle-end/93926
782 * c-decl.c (types_close_enough_to_match): New function.
783 (match_builtin_function_types):
784 (diagnose_mismatched_decls): Add missing inform call to a warning.
785
a499c2f8
MS
7862020-03-01 Martin Sebor <msebor@redhat.com>
787
788 PR c/93812
789 * c-typeck.c (build_functype_attribute_variant): New function.
790 (composite_type): Call it.
791
9c3da8cc
JJ
7922020-02-25 Jakub Jelinek <jakub@redhat.com>
793
794 PR other/93912
795 * gimple-parser.c (c_parser_gimple_parse_bb_spec_edge_probability):
796 Rename last argument from probablity to probability.
797
bacdd5e9
JJ
7982020-02-13 Jakub Jelinek <jakub@redhat.com>
799
800 PR c/93576
801 * c-decl.c (grokdeclarator): If this_size_varies, only push size into
802 *expr if it has side effects.
803
f9eb0973
JL
8042020-01-30 Jeff Law <law@redhat.com>
805
806 PR c/88660
807 * c-parser.c (c_parser_switch_statement): Make sure to request
808 marking the switch expr as used.
809
ac68e287
JM
8102020-01-22 Joseph Myers <joseph@codesourcery.com>
811
812 PR c/93348
813 * c-typeck.c (build_c_cast): Call remove_c_maybe_const_expr on
814 argument with integer operands.
815
852f0ae8
KK
8162020-01-16 Kerem Kat <keremkat@gmail.com>
817
818 PR c/92833
819 * c-parser.c (c_parser_consume_token): Fix peeked token stack pop
820 to support 4 available tokens.
821
e2346a33
JM
8222020-01-15 Joseph Myers <joseph@codesourcery.com>
823
824 PR c/93072
825 * c-decl.c (pushdecl): Use TREE_PUBLIC, not DECL_EXTERNAL, to
826 determine whether to set DECL_CONTEXT.
827
3d77686d
JM
8282020-01-13 Joseph Myers <joseph@codesourcery.com>
829
830 PR c/93241
831 * c-typeck.c (build_c_cast): Check for expressions with integer
832 operands that can occur in an unevaluated part of an integer
833 constant expression and call note_integer_operands as needed.
834
f74c4b2c
RB
8352019-01-08 Richard Biener <rguenther@suse.de>
836
837 PR middle-end/93199
838 * gimple-parser.c (c_parser_parse_gimple_body): Remove __PHI IFN
839 permanently.
840
8d9254fc
JJ
8412020-01-01 Jakub Jelinek <jakub@redhat.com>
842
843 Update copyright years.
844
39292e25
EB
8452019-12-20 Eric Botcazou <ebotcazou@adacore.com>
846
847 * c-decl.c (collect_source_ref_cb): Delete.
848 (for_each_global_decl): Rename into...
849 (collect_source_refs): ...this. Call collect_source_ref directly.
850 (c_parse_final_cleanups): Always call collect_source_ref on the main
851 input filename.
852
519d7496
JB
8532019-12-19 Julian Brown <julian@codesourcery.com>
854 Cesar Philippidis <cesar@codesourcery.com>
855
856 * c-parser.c (c_parser_omp_clause_name): Add parsing of attach and
857 detach clauses.
858 (c_parser_omp_variable_list): Add ALLOW_DEREF optional parameter.
859 Allow deref (->) in variable lists if true.
860 (c_parser_omp_var_list_parens): Add ALLOW_DEREF optional parameter.
861 Pass to c_parser_omp_variable_list.
862 (c_parser_oacc_data_clause): Support attach and detach clauses. Update
863 call to c_parser_omp_variable_list.
864 (c_parser_oacc_all_clauses): Support attach and detach clauses.
865 (OACC_DATA_CLAUSE_MASK, OACC_ENTER_DATA_CLAUSE_MASK,
866 OACC_KERNELS_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK,
867 OACC_SERIAL_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_ATTACH.
868 (OACC_EXIT_DATA_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_DETACH.
869 * c-typeck.c (handle_omp_array_sections_1): Reject subarrays for attach
870 and detach. Support deref.
871 (handle_omp_array_sections): Use GOMP_MAP_ATTACH_DETACH instead of
872 GOMP_MAP_ALWAYS_POINTER for OpenACC.
873 (c_oacc_check_attachments): New function.
874 (c_finish_omp_clauses): Check attach/detach arguments for being
875 pointers using above. Support deref.
876
a6163563
JB
8772019-12-19 Julian Brown <julian@codesourcery.com>
878 Maciej W. Rozycki <macro@codesourcery.com>
879 Tobias Burnus <tobias@codesourcery.com>
880 Thomas Schwinge <thomas@codesourcery.com>
881
882 * c-parser.c (c_parser_omp_clause_name): Support no_create.
883 (c_parser_oacc_data_clause): Likewise.
884 (c_parser_oacc_all_clauses): Likewise.
885 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
886 (OACC_PARALLEL_CLAUSE_MASK, OACC_SERIAL_CLAUSE_MASK): Add
887 PRAGMA_OACC_CLAUSE_NO_CREATE.
888 * c-typeck.c (handle_omp_array_sections): Support
889 GOMP_MAP_NO_ALLOC.
890
d68f5d45
DM
8912019-12-09 David Malcolm <dmalcolm@redhat.com>
892
893 * c-objc-common.c (range_label_for_type_mismatch::get_text):
894 Replace label_text ctor calls.
895
4691bf46
JM
8962019-12-04 Joseph Myers <joseph@codesourcery.com>
897
898 PR c/36941
899 PR c/88827
900 * c-typeck.c (convert_lvalue_to_rvalue): Call
901 require_complete_type for arguments not of void types.
902 (build_indirect_ref): Do not diagnose dereferencing pointers to
903 incomplete types.
904 * c-tree.h (C_TYPE_ERROR_REPORTED): Remove.
905
85d11957
JM
9062019-12-03 Joseph Myers <joseph@codesourcery.com>
907
908 PR c/88704
909 * c-decl.c (store_parm_decls_oldstyle): Diagnose use of [*] in
910 old-style parameter definitions.
911
4569f8b3
SL
9122019-12-01 Sandra Loosemore <sandra@codesourcery.com>
913
914 PR target/92499
915
916 * c-decl.c (flexible_array_type_p): Move to common code.
917
65ef05d0
RS
9182019-11-30 Richard Sandiford <richard.sandiford@arm.com>
919
920 * c-decl.c (start_decl): Allow initialization of variables whose
921 size is a POLY_INT_CST.
922 (finish_decl): Use verify_type_context to check whether the target
923 allows variables with a particular type to have static or thread-local
924 storage duration. Don't raise a second error if such variables do
925 not have a constant size.
926 (grokdeclarator): Use verify_type_context to check whether the
927 target allows fields or array elements to have a particular type.
928 * c-typeck.c (pointer_diff): Use verify_type_context to test whether
929 the target allows pointer difference for the types involved.
930 (build_unary_op): Likewise for pointer increment and decrement.
931
34b43828
JM
9322019-11-29 Joseph Myers <joseph@codesourcery.com>
933
934 * c-parser.c (struct c_parser): Add members raw_tokens and
935 raw_tokens_used.
936 (c_lex_one_token): Add argument raw. Handle lexing raw tokens and
937 using previously-lexed raw tokens.
938 (c_parser_peek_nth_token_raw)
939 (c_parser_check_balanced_raw_token_sequence): New functions.
940 (c_parser_nth_token_starts_std_attributes): Use
941 c_parser_check_balanced_raw_token_sequence for Objective-C.
942
5b8d9367
JM
9432019-11-25 Joseph Myers <joseph@codesourcery.com>
944
945 PR c/91985
946 * c-decl.c (finish_declspecs): Use int instead of decimal
947 floating-point types if decimal floating-point not supported.
948
1723e1be
JM
9492019-11-25 Joseph Myers <joseph@codesourcery.com>
950
951 * c-tree.h (struct c_declarator): Use a structure for id member.
952 * c-decl.c (grokdeclarator): Extract attributes from cdk_id
953 declarators at the start, not when handling individual declarators
954 later. Use u.id.id instead of u.id.
955 (grokfield): Use u.id.id instead of u.id.
956 (build_id_declarator): Set u.id.id and u.id.attrs.
957 (finish_declspecs): Handle postfix attributes in case of typedef
958 name or typeof used.
959 * c-parser.c (c_parser_direct_declarator)
960 (c_parser_direct_declarator_inner): Place declarator for
961 attributes inside that for function or array, not outside. Set
962 u.id.attrs for identifiers.
963 (c_parser_parameter_declaration): Use u.id.id instead of u.id.
964 * gimple-parser.c (c_parser_gimple_declaration): Use u.id.id
965 instead of u.id.
966
bdaf8be1
JJ
9672019-11-22 Jakub Jelinek <jakub@redhat.com>
968
969 PR c/90677
970 * c-decl.c (identifier_global_tag): Define.
971
3e00ba47
RB
9722019-11-20 Richard Biener <rguenther@suse.de>
973
974 PR c/92088
975 * c-decl.c (grokdeclarator): Prevent inlining of nested
976 function with VLA arguments.
977
8c5b727a
JM
9782019-11-20 Joseph Myers <joseph@codesourcery.com>
979
980 * c-decl.c (c_warn_type_attributes): New function.
981 (groktypename, grokdeclarator, finish_declspecs): Call
982 c_warn_type_attributes before applying attributes to types.
983 * c-tree.h (c_warn_type_attributes): Declare.
984
192961ff
JM
9852019-11-19 Joseph Myers <joseph@codesourcery.com>
986
987 * c-decl.c (c_warn_unused_attributes): Use pedwarn not warning for
988 standard attributes.
989 * c-parser.c (c_parser_std_attribute): Take argument for_tm. Use
990 pedwarn for unknown standard attributes and return error_mark_node
991 for them.
992
20a38017
MM
9932019-11-18 Matthew Malcomson <matthew.malcomson@arm.com>
994
995 * c-parser.c (c_parser_parse_rtl_body): Always call
996 run_rtl_passes, even if startwith pass is not provided.
997
d5fbe5e0
JM
9982019-11-15 Joseph Myers <joseph@codesourcery.com>
999
1000 * c-parser.c (c_parser_std_attribute_specifier): Diagnose
1001 duplicate standard attributes.
1002
97cc1187
JM
10032019-11-15 Joseph Myers <joseph@codesourcery.com>
1004
1005 * c-decl.c (std_attribute_table): Add maybe_unused.
1006
f8aea5e3
JM
10072019-11-15 Joseph Myers <joseph@codesourcery.com>
1008
1009 * c-decl.c (std_attribute_table): Add fallthrough.
1010 * c-parser.c (c_parser_declaration_or_fndef): Diagnose fallthrough
1011 attribute at top level.
1012
2cc94aa8
JM
10132019-11-15 Joseph Myers <joseph@codesourcery.com>
1014
1015 * c-decl.c (std_attribute_table): New.
1016 (c_init_decl_processing): Register attributes from
1017 std_attribute_table.
1018 * c-parser.c (c_parser_attribute_arguments): Add arguments
1019 require_string and allow_empty_args. All callers changed.
1020 (c_parser_std_attribute): Set require_string argument for
1021 "deprecated" attribute.
1022
7c5890cc
JM
10232019-11-14 Joseph Myers <joseph@codesourcery.com>
1024
1025 * c-parser.c (c_parser_postfix_expression)
1026 (c_parser_check_literal_zero): Handle CPP_UTF8CHAR.
1027 * gimple-parser.c (c_parser_gimple_postfix_expression): Likewise.
1028
e8738f4e
RS
10292019-11-14 Richard Sandiford <richard.sandiford@arm.com>
1030
1031 * c-typeck.c (build_conditional_expr): Use truth_type_for instead
1032 of build_same_sized_truth_vector_type.
1033 (build_vec_cmp): Likewise.
1034
b2417b59
JJ
10352019-11-14 Jakub Jelinek <jakub@redhat.com>
1036
bedb7f04
JJ
1037 * c-parser.c (c_parser_omp_context_selector): Don't require score
1038 argument to fit into shwi, just to be INTEGER_CST. Diagnose
1039 negative score.
1040
b2417b59
JJ
1041 * c-parser.c (c_parser_omp_context_selector): Rename
1042 CTX_PROPERTY_IDLIST to CTX_PROPERTY_NAME_LIST, add CTX_PROPERTY_ID.
1043 Use CTX_PROPERTY_ID for atomic_default_mem_order, only allow a single
1044 identifier in that. For CTX_PROPERTY_NAME_LIST, allow identifiers
1045 and string literals.
1046
4e03c3a7
JM
10472019-11-14 Joseph Myers <joseph@codesourcery.com>
1048
1049 * c-tree.h (enum c_typespec_kind): Add ctsk_tagref_attrs and
1050 ctsk_tagfirstref_attrs.
1051 (struct c_declspecs): Update description of attrs. Add
1052 postfix_attrs and non_std_attrs_seen_p. Increase size of
1053 typespec_kind bit-field.
1054 (c_warn_unused_attributes): New declaration.
1055 (parser_xref_tag): Update prototype.
1056 * c-decl.c (c_warn_unused_attributes): New function.
1057 (shadow_tag_warned): Handle ctsk_tagfirstref_attrs and
1058 ctsk_tagref_attrs. Handle attribute declarations.
1059 (check_compound_literal_type): Handle ctsk_tagfirstref_attrs.
1060 (grokdeclarator): Handle standard attributes.
1061 (parser_xref_tag): Add arguments have_std_attrs and attrs. Apply
1062 attributes to incomplete type reference.
1063 (xref_tag): Update call to parser_xref_tag.
1064 (declspecs_add_addrspace, declspecs_add_type)
1065 (declspecs_add_scspec, declspecs_add_attrs): Set
1066 non_std_attrs_seen_p.
1067 (finish_declspecs): Apply postfix standard attributes to type.
1068 * c-parser.c (c_token_starts_declspecs)
1069 (c_token_starts_declaration, c_parser_next_token_starts_declspecs)
1070 (c_parser_next_tokens_start_declaration): Update comments.
1071 (c_parser_consume_token, c_parser_consume_pragma): Handle moving
1072 parser->tokens[2] to parser->tokens[1].
1073 (c_parser_nth_token_starts_std_attributes)
1074 (c_parser_std_attribute_specifier_sequence): New functions.
1075 (c_parser_declaration_or_fndef): Add arguments have_attrs and
1076 attrs. All callers changed. Handle standard attributes.
1077 (c_parser_parms_declarator, c_parser_parms_list_declarator)
1078 (c_parser_parameter_declaration): Add argument have_gnu_attrs.
1079 All callers changed.
1080 (c_parser_declspecs): Add arguments start_std_attr_ok and
1081 end_std_attr_ok. All callers changed. Handle standard
1082 attributes.
1083 (c_parser_enum_specifier, c_parser_struct_or_union_specifier)
1084 (c_parser_direct_declarator, c_parser_direct_declarator_inner)
1085 (c_parser_compound_statement_nostart, c_parser_all_labels)
1086 (c_parser_label, c_parser_statement, c_parser_for_statement):
1087 Handle standard attributes.
1088 * c-parser.h (c_parser_declspecs): Update prototype.
1089 * gimple-parser.c (c_parser_gimple_declaration): Update call to
1090 c_parser_declspecs.
1091
0c29cac4
ML
10922019-11-12 Martin Liska <mliska@suse.cz>
1093
1094 * gimple-parser.c: Do not include params.h.
1095
028d4092
ML
10962019-11-12 Martin Liska <mliska@suse.cz>
1097
1098 * gimple-parser.c (c_parser_parse_gimple_body): Replace old parameter syntax
1099 with the new one, include opts.h if needed. Use SET_OPTION_IF_UNSET
1100 macro.
1101
62aee289
MR
11022019-11-12 Maciej W. Rozycki <macro@codesourcery.com>
1103 Frederik Harwath <frederik@codesourcery.com>
1104
1105 gcc/c/
1106 * c-parser.c (OACC_SERIAL_CLAUSE_MASK): New macro.
1107 (c_parser_oacc_kernels_parallel): Rename function to...
1108 (c_parser_oacc_compute): ... this. Handle PRAGMA_OACC_SERIAL.
1109 (c_parser_omp_construct): Update accordingly.
1110
1111
7cec9588
JJ
11122019-11-11 Jakub Jelinek <jakub@redhat.com>
1113
1114 * c-parser.c (c_parser_translation_unit): Diagnose declare target
1115 without corresponding end declare target.
1116
f486280c
RS
11172019-11-08 Richard Sandiford <richard.sandiford@arm.com>
1118
1119 * c-convert.c (convert): Only handle vector conversions if one of
1120 the types satisfies gnu_vector_type_p or if -flax-vector-conversions
1121 allows it.
1122 * c-typeck.c (build_array_ref): Only allow vector indexing if the
1123 vectors satisfy gnu_vector_type_p.
1124 (build_unary_op): Only allow unary operators to be applied to
1125 vectors if they satisfy gnu_vector_type_p.
1126 (digest_init): Only allow by-element initialization of vectors
1127 if they satisfy gnu_vector_type_p.
1128 (really_start_incremental_init): Likewise.
1129 (push_init_level): Likewise.
1130 (pop_init_level): Likewise.
1131 (process_init_element): Likewise.
1132 (build_binary_op): Only allow binary operators to be applied to
1133 vectors if they satisfy gnu_vector_type_p.
1134
017c6491
JM
11352019-11-08 Joseph Myers <joseph@codesourcery.com>
1136
1137 * c-decl.c (grokparms): Convert () in a function definition to
1138 (void) for C2x.
1139 (store_parm_decls_oldstyle): Pedwarn for C2x.
1140 (store_parm_decls): Update comment about () not generating a
1141 prototype.
1142
c01bd174
JM
11432019-11-07 Joseph Myers <joseph@codesourcery.com>
1144
1145 * c-parser.c (c_parser_attribute_arguments): New function.
1146 Factored out of c_parser_gnu_attribute.
1147 (c_parser_gnu_attribute): Use c_parser_attribute_arguments.
1148 (c_parser_balanced_token_sequence, c_parser_std_attribute)
1149 (c_parser_std_attribute_specifier): New functions.
1150 (c_parser_transaction_attributes): Use
1151 c_parser_std_attribute_specifier.
1152
471c5330
JM
11532019-11-07 Joseph Myers <joseph@codesourcery.com>
1154
1155 * c-parser.c (c_parser): Remove lex_untranslated_string. Add
1156 lex_joined_string and translate_strings_p.
1157 (c_lex_one_token): Pass 0 or C_LEX_STRING_NO_JOIN to
1158 c_lex_with_flags.
1159 (c_parser_string_literal): New function.
1160 (c_parser_static_assert_declaration_no_semi): Use
1161 c_parser_string_literal. Do not set lex_untranslated_string.
1162 (c_parser_asm_string_literal): Use c_parser_string_literal.
1163 (c_parser_simple_asm_expr): Do not set lex_untranslated_string.
1164 (c_parser_gnu_attributes): Set and restore translate_strings_p
1165 instead of lex_untranslated_string.
1166 (c_parser_asm_statement): Do not set lex_untranslated_string.
1167 (c_parser_asm_operands): Likewise.
1168 (c_parser_has_attribute_expression): Set and restore
1169 translate_strings_p instead of lex_untranslated_string.
1170 (c_parser_postfix_expression): Use c_parser_string_literal.
1171 (pragma_lex): Likewise.
1172 (c_parser_pragma_pch_preprocess): Set lex_joined_string.
1173 (c_parse_file): Set translate_strings_p.
1174 * gimple-parser.c (c_parser_gimple_postfix_expression)
1175 (c_parser_gimple_or_rtl_pass_list): Use c_parser_string_literal.
1176 * c-parser.c (c_parser_string_literal): Declare function.
1177
d0c464d2
JJ
11782019-11-02 Jakub Jelinek <jakub@redhat.com>
1179
1180 * c-parser.c (c_finish_omp_declare_variant): Use
1181 omp_get_context_selector instead of c_omp_get_context_selector.
1182
ac2cfa6c
RS
11832019-10-29 Richard Sandiford <richard.sandiford@arm.com>
1184
1185 * c-tree.h (c_simulate_enum_decl): Declare.
1186 * c-decl.c (c_simulate_enum_decl): New function.
1187 * c-objc-common.h (LANG_HOOKS_SIMULATE_ENUM_DECL): Define to the above.
1188
74078538
RS
11892019-10-29 Richard Sandiford <richard.sandiford@arm.com>
1190
1191 * c-tree.h (c_simulate_builtin_function_decl): Declare.
1192 * c-decl.c (c_simulate_builtin_function_decl): New function.
1193 * c-objc-common.h (LANG_HOOKS_SIMULATE_BUILTIN_FUNCTION_DECL): Define
1194 to the above.
1195
ad1539d5
MS
11962019-10-28 Martin Sebor <msebor@redhat.com>
1197
1198 PR c/66970
1199 * c-decl.c (names_builtin_p): Define a new function.
1200
cb73e4e7
RB
12012019-10-28 Richard Biener <rguenther@suse.de>
1202
1203 PR c/92249
1204 * gimple-parser.c (c_parser_parse_gimple_body): Make
1205 current_bb the entry block initially to easier recover
1206 from errors.
1207 (c_parser_gimple_compound_statement): Adjust.
1208
135df52c
JJ
12092019-10-24 Jakub Jelinek <jakub@redhat.com>
1210
1211 * c-parser.c (c_finish_omp_declare_variant): Use
1212 omp_context_selector_matches instead of
1213 c_omp_context_selector_matches.
1214 * c-decl.c (c_decl_attributes): Add "omp declare target block"
1215 attribute in between declare target and end declare target
1216 pragmas.
1217
783bfe5e
JM
12182019-10-15 Joseph Myers <joseph@codesourcery.com>
1219
1220 * c-parser.c (c_parser_attribute_any_word): Rename to
1221 c_parser_gnu_attribute_any_word. All callers changed.
1222 (c_parser_attribute): Rename to c_parser_gnu_attribute. All
1223 callers changed.
1224 (c_parser_attributes): Rename to c_parser_gnu_attributes. All
1225 callers changed.
1226 (c_parser_declaration_or_fndef, c_parser_declspecs)
1227 (c_parser_enum_specifier, c_parser_struct_or_union_specifier)
1228 (c_parser_struct_declaration, c_parser_declarator)
1229 (c_parser_gnu_attribute, c_parser_compound_statement)
1230 (c_parser_label, c_parser_statement, c_parser_objc_method_decl)
1231 (c_parser_transaction_attributes): Add "gnu-" prefix to names of
1232 attribute-related syntax productions.
1233
56898e43
RS
12342019-10-14 Richard Sandiford <richard.sandiford@arm.com>
1235
1236 * c-objc-common.c (useful_aka_type_p): Replace with...
1237 (get_aka_type): ...this new function. Given the original type,
1238 decide which aka type to print (if any). Only look through typedefs
1239 if user_facing_original_type_p.
1240 (print_type): Update accordingly.
1241
b9424661
JJ
12422019-10-14 Jakub Jelinek <jakub@redhat.com>
1243
1244 * c-parser.c (c_parser_omp_all_clauses): Change bool NESTED_P argument
1245 into int NESTED, if it is 2, diagnose missing commas in between
1246 clauses.
1247 (c_parser_omp_context_selector): Pass 2 as last argument to
1248 c_parser_omp_all_clauses.
1249
20de9568
JJ
12502019-10-12 Jakub Jelinek <jakub@redhat.com>
1251
1252 * c-parser.c (c_parser_omp_context_selector): Improve error recovery.
1253 For simd properties, put them directly into TREE_VALUE.
1254 (c_finish_omp_declare_variant): Call c_omp_mark_declare_variant.
1255 If c_omp_context_selector_matches is 0, don't add attribute, otherwise
1256 add "omp declare variant base" attribute rather than
1257 "omp declare variant".
1258
fe2bc27c
JM
12592019-10-11 Joseph Myers <joseph@codesourcery.com>
1260
1261 * c-decl.c (declspecs_add_type): Use pedwarn_c11 for DFP types.
1262
94e7f906
JJ
12632019-10-10 Jakub Jelinek <jakub@redhat.com>
1264
1265 * c-parser.c (c_parser_omp_all_clauses): Add NESTED_P argument, if
1266 true, terminate processing on closing paren and don't skip to end of
1267 pragma line.
1268 (c_parser_omp_declare_simd): Handle also declare variant.
1269 (omp_construct_selectors, omp_device_selectors,
1270 omp_implementation_selectors, omp_user_selectors): New variables.
1271 (c_parser_omp_context_selector,
1272 c_parser_omp_context_selector_specification,
1273 c_finish_omp_declare_variant): New functions.
1274 (c_finish_omp_declare_simd): Handle both declare simd and
1275 declare variant.
1276 (c_parser_omp_declare): Handle declare variant.
1277
93313b94
JM
12782019-10-02 Joseph Myers <joseph@codesourcery.com>
1279
1280 * c-parser.c (c_parser_asm_statement): Handle CPP_SCOPE like two
1281 CPP_COLON tokens.
1282
55879815
RS
12832019-10-01 Richard Sandiford <richard.sandiford@arm.com>
1284
1285 * c-objc-common.c (useful_aka_type_p): New function.
1286 (print_type): Use it to decide whether an aka type is worth printing.
1287
59bc434a
JJ
12882019-09-27 Jakub Jelinek <jakub@redhat.com>
1289
1290 PR c++/88203
1291 * c-parser.c (c_parser_predefined_identifier): New function.
1292 (c_parser_postfix_expression): Use it.
1293 (c_parser_omp_variable_list): Parse predefined identifiers.
1294 * c-typeck.c (c_finish_omp_clauses): Allow predefined variables
1295 in shared and firstprivate clauses, even when they are predetermined
1296 shared.
1297
c6447c20
RS
12982019-09-27 Richard Sandiford <richard.sandiford@arm.com>
1299
1300 * c-typeck.c (build_function_call_vec): Take the original function
1301 decl as an optional final parameter. Pass all built-in calls to
1302 check_builtin_function_arguments.
1303
522da4c2
EB
13042019-09-20 Eric Botcazou <ebotcazou@adacore.com>
1305
1306 PR c/91815
1307 * c-decl.c (pushdecl): In C detect duplicate declarations across scopes
1308 of identifiers in the external scope only for variables and functions.
1309
68e2c199
PK
13102019-09-04 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1311
1312 PR c/78736
1313 * c-typeck.c (convert_for_assignment): Handle Wenum-conversion.
1314
22f8849d
IS
13152019-08-23 Iain Sandoe <iain@sandoe.co.uk>
1316
1317 PR pch/61250
1318 * c-parser.c (c_parse_file): Call c_common_no_more_pch ()
1319 after determining that the first token is not
1320 PRAGMA_GCC_PCH_PREPROCESS.
1321
db376f45
EB
13222019-08-22 Eric Botcazou <ebotcazou@adacore.com>
1323
1324 * c-parser.c (c_parser_declaration_or_fndef): Set DECL_ARGUMENTS of a
1325 FUNCTION_DECL to the right value in the presence of nested declarators.
1326
4d732405
RS
13272019-08-13 Richard Sandiford <richard.sandiford@arm.com>
1328
1329 PR middle-end/91421
1330 * c-decl.c (merge_decls): Use copy_decl_built_in_function.
1331
cb1180d5
RS
13322019-08-13 Richard Sandiford <richard.sandiford@arm.com>
1333
1334 PR middle-end/91421
1335 * c-decl.c (header_for_builtin_fn): Take a FUNCTION_DECL instead
1336 of a built_in_function.
1337 (diagnose_mismatched_decls, implicitly_declare): Update accordingly.
1338
77eb117f
JJ
13392019-08-10 Jakub Jelinek <jakub@redhat.com>
1340
1341 * c-parser.c (c_parser_omp_clause_name): Parse device_type.
1342 (c_parser_omp_clause_device_type): New function.
1343 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_DEVICE_TYPE.
1344 (OMP_DECLARE_TARGET_CLAUSE_MASK): Add PRAGMA_OMP_CLAUSE_DEVICE_TYPE.
1345 (c_parser_omp_declare_target): Handle device_type clauses. Remove
1346 diagnostics for declare target with clauses nested in clause-less
1347 declare target declaration-definition-seq.
1348 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_DEVICE_TYPE.
1349
2c3b8bad
JJ
13502019-08-09 Jakub Jelinek <jakub@redhat.com>
1351
bb522e2e
JJ
1352 * c-parser.c (check_no_duplicate_clause): Simplify using
1353 omp_find_clause.
1354 (c_parser_omp_clause_if): Fix up printing of target {enter,exit} data
1355 directive name modifiers.
1356 (c_parser_omp_clause_proc_bind): Check for duplicate proc_bind clause.
1357
2c3b8bad
JJ
1358 PR c/91401
1359 * c-parser.c (c_parser_omp_clause_dist_schedule): Fix up typos in the
1360 check_no_duplicate_clause call. Comment it out, instead emit a
1361 warning for duplicate dist_schedule clauses.
1362
99769e7f
RS
13632019-08-08 Richard Sandiford <richard.sandiford@arm.com>
1364
1365 * c-decl.c (finish_enum): Clear C_TYPE_BEING_DEFINED.
1366
8860d270
JJ
13672019-08-08 Jakub Jelinek <jakub@redhat.com>
1368
1369 * c-typeck.c (c_finish_omp_clauses): For C_ORT_OMP
1370 OMP_CLAUSE_USE_DEVICE_* clauses use oacc_reduction_head bitmap
1371 instead of generic_head to track duplicates.
1372
398e3feb
JJ
13732019-08-07 Jakub Jelinek <jakub@redhat.com>
1374
1375 * c-parser.c (c_parser_omp_clause_name): Parse use_device_addr clause.
1376 (c_parser_omp_clause_use_device_addr): New function.
1377 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR.
1378 (OMP_TARGET_DATA_CLAUSE_MASK): Add PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR.
1379 (c_parser_omp_target_data): Handle PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR
1380 like PRAGMA_OMP_CLAUSE_USE_DEVICE_PTR, adjust diagnostics about no
1381 map or use_device_* clauses.
1382 * c-typeck.c (c_finish_omp_clauses): For OMP_CLAUSE_USE_DEVICE_PTR
1383 in OpenMP, require pointer type rather than pointer or array type.
1384 Handle OMP_CLAUSE_USE_DEVICE_ADDR.
1385
a28351e7
JJ
13862019-07-31 Jakub Jelinek <jakub@redhat.com>
1387
1388 PR c/91192
1389 * c-parser.c (c_parser_sizeof_expression): Call set_c_expr_source_range
1390 even if finish is UNKNOWN_LOCATION, just use start as finish in that
1391 case.
1392
6343b6bf
ML
13932019-07-25 Martin Liska <mliska@suse.cz>
1394 Dominik Infuhr <dominik.infuehr@theobroma-systems.com>
1395
1396 PR c++/23383
1397 * c-decl.c (merge_decls): Merge OPERATOR_DELETE flag.
1398
cb50701e
ML
13992019-07-25 Martin Liska <mliska@suse.cz>
1400
1401 * c-decl.c (merge_decls): Use new macros
1402 (e.g. DECL_SET_LAMBDA_FUNCTION and DECL_LAMBDA_FUNCTION_P).
1403
62e3e66f
RB
14042019-07-23 Richard Biener <rguenther@suse.de>
1405
1406 PR tree-optimization/83518
1407 * gimple-parser.c (c_parser_parse_gimple_body): When we have
1408 a CFG also rebuild cgraph edges.
1409
554a530f
JJ
14102019-07-20 Jakub Jelinek <jakub@redhat.com>
1411
1412 * c-parser.c (c_parser_omp_clause_name): Handle bind clause.
1413 (c_parser_omp_clause_bind): New function.
1414 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_BIND.
1415 (OMP_LOOP_CLAUSE_MASK): Define.
1416 (c_parser_omp_loop): New function.
1417 (c_parser_omp_parallel, c_parser_omp_teams): Handle parsing of
1418 loop combined with parallel or teams.
1419 (c_parser_omp_construct): Handle PRAGMA_OMP_LOOP.
1420 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_BIND.
1421
d119bf79
RS
14222019-07-18 Richard Sandiford <richard.sandiford@arm.com>
1423
1424 PR c/53633
1425 * c-decl.c (finish_function): Check targetm.warn_func_return
1426 before issuing a -Wreturn-type warning.
1427
ab20d992 14282019-07-12 Alexandre Oliva <oliva@adacore.com>
fdc1f343
AO
1429
1430 * gimple-parser.c (c_parser_gimple_try_stmt): New.
1431 (c_parser_compound_statement): Call it.
1432
1fdd6f04
JJ
14332019-07-12 Jakub Jelinek <jakub@redhat.com>
1434
1435 * c-parser.c (c_parser_omp_clause_name): Handle order clause.
1436 (c_parser_omp_clause_order): New function.
1437 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_ORDER.
1438 (OMP_SIMD_CLAUSE_MASK, OMP_FOR_CLAUSE_MASK): Add
1439 PRAGMA_OMP_CLAUSE_ORDER.
1440 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_ORDER.
1441
8389386c
RB
14422019-07-10 Richard Biener <rguenther@suse.de>
1443
1444 * gimple-parser.c (c_parser_gimple_postfix_expression): Support
1445 _Literal (int *) &x for address literals.
1446
99b1c316
MS
14472019-07-09 Martin Sebor <msebor@redhat.com>
1448
1449 PR c++/61339
1450 * c-decl.c (xref_tag): Change class-key of PODs to struct and others
1451 to class.
1452 (field_decl_cmp): Same.
1453 * c-parser.c (c_parser_struct_or_union_specifier): Same.
1454 * c-tree.h: Same.
1455 * gimple-parser.c (c_parser_gimple_compound_statement): Same.
1456
6c1dae73
MS
14572019-07-09 Martin Sebor <msebor@redhat.com>
1458
1459 PR c++/61339
1460 * c-decl.c: Change class-key from class to struct and vice versa
1461 to match convention and avoid -Wclass-is-pod and -Wstruct-no-pod.
1462 * gimple-parser.c: Same.
1463
69b5279e
RB
14642019-07-01 Richard Biener <rguenther@suse.de>
1465
1466 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
1467 _Literal (char *) &"foo" for address literals pointing to
1468 STRING_CSTs.
1469
ab20d992
JJ
14702019-06-25 Jozef Lawrynowicz <jozef.l@mittosystems.com>
1471
1472 * c-parser.c (c_parse_init): Create keyword for "__intN__" type.
1473 * c-decl.c (declspecs_add_type): Don't pedwarn about "__intN" ISO
1474 C incompatibility if alternate "__intN__" form is used.
1475
1e3d475e
MS
14762019-06-24 Martin Sebor <msebor@redhat.com>
1477
1478 * c-typeck.c (build_binary_op): Hyphenate floating-point.
1479
bf38f7e9
JJ
14802019-06-10 Jakub Jelinek <jakub@redhat.com>
1481
1482 * c-parser.c (c_parser_pragma): Reject PRAGMA_OMP_SCAN.
1483 (c_parser_omp_clause_reduction): Don't sorry_at on inscan reductions.
1484 (c_parser_omp_scan_loop_body): New function.
1485 (c_parser_omp_for_loop): Call c_parser_omp_scan_loop_body if there are
1486 inscan reduction clauses.
1487 * c-typeck.c (c_finish_omp_clauses): Reject mixing inscan with
1488 non-inscan reductions on the same construct, or inscan reductions with
1489 ordered or schedule clauses, or inscan array reductions.
1490
65985d78
MS
14912019-06-05 Martin Sebor <msebor@redhat.com>
1492
1493 PR c/90737
1494 * c-typeck.c (c_finish_return): Only consider functions returning
1495 pointers as candidates for -Wreturn-local-addr.
1496
0ecf545c
MS
14972019-06-05 Martin Sebor <msebor@redhat.com>
1498
1499 * c-decl.c (start_decl): Adjust quoting and hyphenation
1500 in diagnostics.
1501 (finish_decl): Same.
1502 (finish_enum): Same.
1503 (start_function): Same.
1504 (declspecs_add_type): Same.
1505 * c-parser.c (warn_for_abs): Same.
1506 * c-typeck.c (build_binary_op): Same.
1507
e03436e7
TS
15082019-05-17 Thomas Schwinge <thomas@codesourcery.com>
1509
b48f44bf
TS
1510 PR c/89433
1511 * c-parser.c (c_finish_oacc_routine): Rework checking if already
1512 marked with an OpenACC 'routine' directive.
1513
5bf04509
TS
1514 PR c/89433
1515 * c-parser.c (c_parser_oacc_routine): Normalize order of clauses.
1516 (c_finish_oacc_routine): Call oacc_verify_routine_clauses.
1517
e03436e7
TS
1518 PR c/89433
1519 * c-parser.c (c_finish_oacc_routine): Refer to OpenACC 'routine'
1520 clauses from "omp declare target" attribute.
1521
a9c697b8
MS
15222019-05-16 Martin Sebor <msebor@redhat.com>
1523
ab20d992
JJ
1524 * c-decl.c (start_decl): Quote keywords, operators, and
1525 types in diagnostics.
1526 (finish_decl): Same.
1527 * c-parser.c (c_parser_asm_statement): Same.
1528 (c_parser_conditional_expression): Same.
1529 (c_parser_transaction_cancel): Same.
1530 * c-typeck.c (c_common_type): Same.
1531 (build_conditional_expr): Same.
1532 (digest_init): Same.
1533 (process_init_element): Same.
1534 (build_binary_op): Same.
a9c697b8 1535
c4499192
RB
15362019-05-17 Richard Biener <rguenther@suse.de>
1537
1538 * gimple-parser.c (c_parser_gimple_statement): Handle __VEC_PERM.
1539 (c_parser_gimple_unary_expression): Likewise.
1540 (c_parser_gimple_parentized_ternary_expression): New function.
1541
adfe6e4b
RB
15422019-05-16 Richard Biener <rguenther@suse.de>
1543
1544 * gimple-parser.c (c_parser_gimple_statement): Handle __BIT_INSERT.
1545 (c_parser_gimple_unary_expression): Likewise.
1546
186dabf2
RB
15472019-05-15 Richard Biener <rguenther@suse.de>
1548
1549 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
1550 __BIT_FIELD_REF.
1551
1158c5b4
RB
15522019-05-14 Richard Biener <rguenther@suse.de>
1553
1554 * gimple-parser.c (c_parser_gimple_statement): Remove
1555 questionable auto-promotion to VIEW_CONVERT_EXPR.
1556 (c_parser_gimple_typespec): Split out from __MEM parsing.
1557 (c_parser_gimple_postfix_expression): Handle __VIEW_CONVERT.
1558 * tree-pretty-print.c (dump_generic_node): Dump VIEW_CONVERT_EXPR
1559 as __VIEW_CONVERT with -gimple.
1560
fd4485aa
ML
15612019-05-09 Martin Liska <mliska@suse.cz>
1562
1563 * gimple-parser.c (c_parser_gimple_statement): Support __MIN and
1564 __MAX.
1565 (c_parser_gimple_unary_expression): Parse also binary expression
1566 __MIN and __MAX.
1567 (c_parser_gimple_parentized_binary_expression): New function.
1568
d276406a
ML
15692019-05-09 Martin Liska <mliska@suse.cz>
1570
1571 * gimple-parser.c (struct gimple_parser): Add probability.
1572 for gimple_parser_edge.
1573 (gimple_parser::push_edge): Add new argument probability.
1574 (c_parser_gimple_parse_bb_spec): Parse also probability
1575 if present.
1576 (c_parser_parse_gimple_body): Set edge probability.
1577 (c_parser_gimple_compound_statement): Consume token
1578 before calling c_parser_gimple_goto_stmt.
1579 Parse BB counts.
1580 (c_parser_gimple_statement): Pass new argument.
1581 (c_parser_gimple_goto_stmt): Likewise.
1582 (c_parser_gimple_if_stmt): Likewise.
1583 (c_parser_gimple_or_rtl_pass_list): Parse hot_bb_threshold.
1584 * c-parser.c (c_parser_declaration_or_fndef): Pass
1585 hot_bb_threshold argument.
1586 * c-tree.h (struct c_declspecs): Add hot_bb_threshold
1587 field.
1588 (c_parser_gimple_parse_bb_spec_edge_probability): New.
1589
f179b64e
JJ
15902019-04-26 Jakub Jelinek <jakub@redhat.com>
1591
1592 PR debug/90197
1593 * c-tree.h (c_finish_loop): Add 2 further location_t arguments.
1594 * c-parser.c (c_parser_while_statement): Adjust c_finish_loop caller.
1595 (c_parser_do_statement): Likewise.
1596 (c_parser_for_statement): Likewise. Formatting fixes.
1597 * c-typeck.c (c_finish_loop): Add COND_LOCUS and INCR_LOCUS arguments,
1598 emit DEBUG_BEGIN_STMTs if needed.
1599
e7178413
JJ
16002019-04-19 Jakub Jelinek <jakub@redhat.com>
1601
c280b7ee
JJ
1602 PR c/89888
1603 * c-typeck.c (struct c_switch): Remove outside_range_p member.
1604 (c_start_case): Don't clear it.
1605 (do_case): Adjust c_add_case_label caller.
1606 (c_finish_case): Adjust c_do_switch_warnings caller.
1607
e7178413
JJ
1608 PR c++/90108
1609 * c-decl.c (merge_decls): If remove is main variant and
1610 DECL_ORIGINAL_TYPE is some other type, remove a DECL_ORIGINAL_TYPE
1611 variant that has newdecl as TYPE_NAME if any.
1612
60a2c645
JJ
16132019-04-12 Jakub Jelinek <jakub@redhat.com>
1614
1615 PR c/89933
1616 * c-decl.c (merge_decls): When newdecl's type is its main variant,
1617 don't try to remove it from the variant list, but instead assert
1618 it has no variants.
1619
2a82beaa
RB
16202019-04-01 Richard Biener <rguenther@suse.de>
1621
1622 PR c/71598
1623 * c-tree.h (c_get_alias_set): Declare.
1624 * c-objc-common.h (LANG_HOOKS_GET_ALIAS_SET): Use c_get_alias_set.
1625 * c-objc-common.c (c_get_alias_set): Treat enumeral types
1626 as the underlying integer type.
1627
bec1da64
MS
16282019-03-19 Martin Sebor <msebor@redhat.com>
1629
1630 PR tree-optimization/89688
1631 * c-decl.c (finish_decl): Call braced_lists_to_string for more
1632 kinds of initializers.
1633
855cd9b1
JJ
16342019-03-19 Jakub Jelinek <jakub@redhat.com>
1635
1636 PR c/89734
1637 * c-decl.c (grokdeclarator): Call c_build_qualified_type on function
1638 return type even if quals_used is 0. Formatting fixes.
1639
baa09dc5
RB
16402019-03-14 Richard Biener <rguenther@suse.de>
1641
1642 * c-tree.h (enum c_declspec_il): New.
1643 (struct c_declspecs): Merge gimple_p and rtl_p into declspec_il
1644 enum bitfield.
1645 * c-parser.c (c_parser_declaration_or_fndef): Adjust accordingly.
1646 Pass start pass and declspec_il to c_parser_parse_gimple_body.
1647 (c_parser_declspecs): Adjust.
1648 * gimple-parser.c: Include cfg.h, cfghooks.h, cfganal.h, tree-cfg.h,
1649 gimple-iterator.h, cfgloop.h, tree-phinodes.h, tree-into-ssa.h
1650 and bitmap.h.
1651 (struct gimple_parser): New.
1652 (gimple_parser::push_edge): New method.
1653 (c_parser_gimple_parse_bb_spec): New helper.
1654 (c_parser_parse_gimple_body): Get start pass and IL specification.
1655 Initialize SSA and CFG.
1656 (c_parser_gimple_compound_statement): Handle CFG and SSA build.
1657 Build a gimple_parser parsing state and pass it along.
1658 (c_parser_gimple_statement): Change intermittend __PHI internal
1659 function argument for the edge.
1660 (c_parser_gimple_or_rtl_pass_list): Handle ssa, cfg flags.
1661 (c_parser_gimple_goto_stmt): Record edges to build.
1662 (c_parser_gimple_if_stmt): Likewise.
1663 * gimple-parser.h (c_parser_parse_gimple_body): Adjust.
1664 (c_parser_gimple_or_rtl_pass_list): Likewise.
1665
a3f9f006
ML
16662019-03-11 Martin Liska <mliska@suse.cz>
1667
1668 * c-decl.c (check_for_loop_decls): Wrap an option name
1669 in a string format message and fix GNU coding style.
1670 * c-parser.c (c_parser_declspecs): Likewise.
1671
1db01ff9
JJ
16722019-03-08 Jakub Jelinek <jakub@redhat.com>
1673
1674 PR tree-optimization/89550
1675 * c-decl.c (finish_function): Only set TREE_NO_WARNING if warning_at
1676 returned true.
1677 (c_write_global_declarations_1): Only set TREE_NO_WARNING if pedwarn
1678 or warning returned true.
1679
66dcb747
JJ
16802019-02-28 Jakub Jelinek <jakub@redhat.com>
1681
1682 PR c/89525
1683 * c-typeck.c (convert_arguments): Call inform_declaration only if
1684 the previous warning_at call returned true.
1685
2263c9f2
TS
16862019-02-22 Thomas Schwinge <thomas@codesourcery.com>
1687
1688 * c-parser.c (c_parser_oacc_shape_clause): Add loc formal
1689 parameter. Adjust all users.
1690 (c_parser_oacc_simple_clause): Replace parser with loc formal
1691 parameter. Adjust all users.
1692
ab20d992 16932019-02-19 Chung-Lin Tang <cltang@codesourcery.com>
19695f4d
CLT
1694
1695 PR c/87924
1696 * c-parser.c (c_parser_oacc_clause_wait): Add representation of wait
1697 clause without argument as 'wait (GOMP_ASYNC_NOVAL)', adjust comments.
1698
5f88ba10
JJ
16992019-02-15 Jakub Jelinek <jakub@redhat.com>
1700
1701 PR c/89340
1702 * c-decl.c (start_function): Clear TREE_PUBLIC on nested functions
1703 before c_decl_attributes rather than after it.
1704
cfc30fd1
JJ
17052019-02-06 Jakub Jelinek <jakub@redhat.com>
1706
1707 PR c/89211
1708 * c-parser.c (c_parser_declaration_or_fndef): Don't update
1709 DECL_ARGUMENTS of d if it has been defined already. Use a single if
1710 instead of 3 nested ifs.
1711
fbe83e6b
JM
17122019-02-06 Joseph Myers <joseph@codesourcery.com>
1713
1714 PR c/88584
1715 * c-decl.c (finish_decl): Do not complete array types for arrays
1716 with external linkage not at file scope.
1717
f461f938
RB
17182019-02-05 Richard Biener <rguenther@suse.de>
1719
1720 PR c/88606
1721 * c-decl.c (finish_struct): Reset TYPE_TRANSPARENT_AGGR on
1722 all type variants when not supported.
1723
fe509359
JJ
17242019-01-30 Jakub Jelinek <jakub@redhat.com>
1725
1726 PR c/89061
1727 * c-tree.h (C_DECL_COMPOUND_LITERAL_P): Define.
1728 * c-decl.c (decl_jump_unsafe): Return false for
1729 C_DECL_COMPOUND_LITERAL_P decls.
1730 (build_compound_literal): Set C_DECL_COMPOUND_LITERAL_P.
1731
6a335b96
JJ
17322019-01-29 Jakub Jelinek <jakub@redhat.com>
1733
f4b7e754
JJ
1734 PR c/89045
1735 * c-decl.c (build_compound_literal): Don't pushdecl if in parameter
1736 scope.
1737
6a335b96
JJ
1738 PR c/86125
1739 * c-decl.c (last_fileptr_type): Remove.
1740 (last_structptr_types): New variable.
1741 (match_builtin_function_types): Compare TYPE_MAIN_VARIANT of
1742 {old,new}rettype instead of the types themselves. Assert
1743 last_structptr_types array has the same number of elements
1744 as builtin_structptr_types array. Use TYPE_MAIN_VARIANT for
1745 argument oldtype and newtype. Instead of handling
1746 just fileptr_type_node specially, handle all builtin_structptr_types
1747 pointer nodes. Formatting fix.
1748
d8b5a1a0
MS
17492019-01-24 Martin Sebor <msebor@redhat.com>
1750
1751 PR c/86125
1752 PR c/88886
1753 PR middle-end/86308
1754 * c-decl.c (match_builtin_function_types): Add arguments.
1755 (diagnose_mismatched_decls): Diagnose mismatched declarations
1756 of built-ins more strictly.
1757
e21c4491
JJ
17582019-01-24 Jakub Jelinek <jakub@redhat.com>
1759
1760 PR c++/88976
1761 * c-typeck.c (c_finish_omp_cancel): Diagnose more than one if
1762 on #pragma omp cancel with different modifiers.
1763
420183d9
L
17642019-01-18 H.J. Lu <hongjiu.lu@intel.com>
1765
1766 PR c/51628
1767 PR c/88664
1768 * c-typeck.c (convert_for_assignment): Upate the
1769 warn_for_address_or_pointer_of_packed_member call.
1770
17ad43dd
TH
17712019-01-16 Tom Honermann <tom@honermann.net>
1772 Jason Merrill <jason@redhat.com>
1773
1774 * c-typeck.c (digest_init): Revised the error message produced for
1775 ill-formed cases of array initialization with a string literal.
1776 (error_init): Make variadic.
1777
5f07d78a
JJ
17782019-01-12 Jakub Jelinek <jakub@redhat.com>
1779
1780 * c-typeck.c (convert_for_assignment): Fix a comment typo.
1781
c4581bbf
JJ
17822019-01-07 Jakub Jelinek <jakub@redhat.com>
1783
1784 PR c/88701
1785 * c-decl.c (build_compound_literal): If not TREE_STATIC, only pushdecl
1786 if current_function_decl is non-NULL.
1787
65c5b1eb
JM
17882019-01-07 Joseph Myers <joseph@codesourcery.com>
1789
1790 PR c/88720
1791 PR c/88726
1792 * c-decl.c (pop_scope): Use TREE_PUBLIC and b->nested to determine
1793 whether a function is nested, not DECL_EXTERNAL. Diagnose inline
1794 functions declared but never defined only for external scope, not
1795 for other scopes.
1796
d8fcab68
JJ
17972019-01-07 Jakub Jelinek <jakub@redhat.com>
1798
1799 PR c++/85052
1800 * c-parser.c (c_parser_postfix_expression): Parse
1801 __builtin_convertvector.
1802
a5544970
JJ
18032019-01-01 Jakub Jelinek <jakub@redhat.com>
1804
1805 Update copyright years.
1806
da77eace
L
18072018-12-20 H.J. Lu <hongjiu.lu@intel.com>
1808
1809 PR c/51628
1810 * c-typeck.c (convert_for_assignment): Call
1811 warn_for_address_or_pointer_of_packed_member.
1812
1edf8866
SB
18132018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
1814
1815 * c-parser.c (c_parser_asm_statement) <RID_CONST, RID_RESTRICT>: Give
1816 a more specific error message (instead of just falling through).
1817
db4fd626
SB
18182018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
1819
1820 * c-parser.c (c_parser_asm_statement): Keep track of the location each
1821 asm qualifier is first seen; use that to give nicer "duplicate asm
1822 qualifier" messages. Delete 'quals" variable, instead pass the
1823 "is_volatile_ flag to build_asm_stmt directly.
1824 * c-tree.h (build_asm_stmt): Make the first arg bool instead of tree.
1825 * c-typeck.c (build_asm_stmt): Ditto; adjust.
1826
9c9cfcbb
SB
18272018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
1828
1829 * c-parser.c (c_parser_asm_statement): Rewrite the loop to work without
1830 "done" boolean variable.
1831
a14feb3c
DM
18322018-12-19 David Malcolm <dmalcolm@redhat.com>
1833
1834 PR c++/87504
1835 * c-typeck.c (class maybe_range_label_for_tree_type_mismatch):
1836 Move from here to gcc-rich-location.h and gcc-rich-location.c.
1837 (build_binary_op): Use struct op_location_t and
1838 class binary_op_rich_location.
1839
6d939173
JJ
18402018-12-11 Jakub Jelinek <jakub@redhat.com>
1841
1842 PR sanitizer/88426
1843 * c-convert.c (convert): Call c_fully_fold before calling
1844 ubsan_instrument_float_cast.
1845
b7055028
SB
18462018-12-08 Segher Boessenkool <segher@kernel.crashing.org>
1847
1848 * c-parser (c_parser_asm_statement) [RID_INLINE]: Delete stray line
1849 setting "quals".
1850
5b76e75f
SB
18512018-12-06 Segher Boessenkool <segher@kernel.crashing.org>
1852
1853 * c-parser.c (c_parser_asm_statement): Detect the inline keyword
1854 after asm. Pass a flag for it to build_asm_expr.
1855 * c-tree.h (build_asm_expr): Update declaration.
1856 * c-typeck.c (build_asm_stmt): Add is_inline parameter. Use it to
1857 set ASM_INLINE_P.
1858
30bd42b9
SB
18592018-12-06 Segher Boessenkool <segher@kernel.crashing.org>
1860
1861 PR inline-asm/55681
1862 * c-parser.c (c_parser_asm_statement): Update grammar. Allow any
1863 combination of volatile and goto, in any order, without repetitions.
1864
9df6c0e4
JB
18652018-12-04 James Norris <jnorris@codesourcery.com>
1866 Cesar Philippidis <cesar@codesourcery.com>
1867 Julian Brown <julian@codesourcery.com>
1868
1869 * c-parser.c (c_parser_oacc_wait_list): Remove dead diagnostic
1870 code.
1871
f44697b7
RB
18722018-11-30 Richard Biener <rguenther@suse.de>
1873
1874 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
1875 _Literal (type) { ... } as empty aggregate or vector constructor.
1876
550dfbdc
MS
18772018-11-29 Martin Sebor <msebor@redhat.com>
1878
1879 PR c/88091
1880 * c-typeck.c (convert_argument): Add a parameter. Adjust indentation.
1881 (convert_arguments): Add comments. Pass additional argument to
1882 the function above.
1883
673670da
MS
18842018-11-29 Martin Sebor <msebor@redhat.com>
1885
1886 PR c/88172
1887 PR testsuite/88208
1888 * c-decl.c (declspec_add_alignas): Adjust call to check_user_alignment.
1889
db1d09b0
MS
18902018-11-23 Martin Sebor <msebor@redhat.com>
1891
1892 PR testsuite/88098
1893 * c-typeck.c (convert_arguments): Call builtin_decl_explicit instead.
1894 (maybe_warn_builtin_no_proto_arg): Handle short enum to int promotion.
1895
98f08eb8
MS
18962018-11-20 Martin Sebor <msebor@redhat.com>
1897
1898 * c-parser.c (c_parser_has_attribute_expression): New function.
1899 (c_parser_attribute): New function.
1900 (c_parser_attributes): Move code into c_parser_attribute.
1901 (c_parser_unary_expression): Handle RID_HAS_ATTRIBUTE_EXPRESSION.
1902
cd5da983
MS
19032018-11-15 Martin Sebor <msebor@redhat.com>
1904
1905 PR c/83656
1906 * c-decl.c (header_for_builtin_fn): Declare.
1907 (diagnose_mismatched_decls): Diagnose declarations of built-in
1908 functions without a prototype.
1909 * c-typeck.c (maybe_warn_builtin_no_proto_arg): New function.
1910 (convert_argument): Same.
1911 (convert_arguments): Factor code out into convert_argument.
1912 Detect mismatches between built-in formal arguments in calls
1913 to built-in without prototype.
1914 (build_conditional_expr): Same.
1915 (type_or_builtin_type): New function.
1916 (convert_for_assignment): Add argument. Conditionally issue
1917 warnings instead of errors for mismatches.
1918
620e594b
DM
19192018-11-13 David Malcolm <dmalcolm@redhat.com>
1920
1921 * c-decl.c: Replace "source_location" with "location_t".
1922 * c-tree.h: Likewise.
1923 * c-typeck.c: Likewise.
1924 * gimple-parser.c: Likewise.
1925
3179ebae
JJ
19262018-11-09 Jakub Jelinek <jakub@redhat.com>
1927
81a227c6
JJ
1928 * c-parser.c (c_parser_omp_clause_final): Use
1929 c_parser_expr_no_commas, convert_lvalue_to_rvalue,
1930 c_objc_common_truthvalue_conversion, c_fully_fold and parentheses
1931 parsing instead of c_parser_paren_condition.
1932 (c_parser_omp_clause_if): Use c_parser_expr_no_commas,
1933 convert_lvalue_to_rvalue, c_objc_common_truthvalue_conversion and
1934 c_fully_fold instead of c_parser_condition.
1935 (c_parser_omp_clause_num_threads, c_parser_omp_clause_num_tasks,
1936 c_parser_omp_clause_grainsize, c_parser_omp_clause_priority,
1937 c_parser_omp_clause_hint, c_parser_omp_clause_num_teams,
1938 c_parser_omp_clause_thread_limit, c_parser_omp_clause_linear): Use
1939 c_parser_expr_no_commas instead of c_parser_expression.
1940
98c91c56
JJ
1941 * c-parser.c (c_parser_omp_clause_reduction): Call sorry_at on
1942 reduction clause with inscan modifier.
1943
3179ebae
JJ
1944 * c-parser.c (c_parser_omp_requires): Call sorry_at on requires
1945 clauses other than atomic_default_mem_order.
1946
28567c40
JJ
19472018-11-08 Jakub Jelinek <jakub@redhat.com>
1948
1949 * c-parser.c: Include memmode.h.
1950 (c_parser_omp_depobj, c_parser_omp_requires): New functions.
1951 (c_parser_pragma): Handle PRAGMA_OMP_DEPOBJ and PRAGMA_OMP_REQUIRES.
1952 (c_parser_omp_clause_name): Handle nontemporal, in_reduction and
1953 task_reduction clauses.
1954 (c_parser_omp_variable_list): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION.
1955 For OMP_CLAUSE_DEPEND, parse clause operands as either an array
1956 section, or lvalue assignment expression.
1957 (c_parser_omp_clause_if): Handle cancel and simd modifiers.
1958 (c_parser_omp_clause_lastprivate): Parse optional
1959 conditional: modifier.
1960 (c_parser_omp_clause_hint): Require constant integer expression rather
1961 than just integer expression.
1962 (c_parser_omp_clause_defaultmap): Parse new kinds of defaultmap
1963 clause.
1964 (c_parser_omp_clause_reduction): Add IS_OMP and KIND arguments.
1965 Parse reduction modifiers. Pass KIND to c_parser_omp_variable_list.
1966 (c_parser_omp_clause_nontemporal, c_parser_omp_iterators): New
1967 functions.
1968 (c_parser_omp_clause_depend): Parse iterator modifier and handle
1969 iterators. Parse mutexinoutset and depobj kinds.
1970 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_reduction
1971 callers.
1972 (c_parser_omp_all_clauses): Likewise. Handle
1973 PRAGMA_OMP_CLAUSE_NONTEMPORAL and
1974 PRAGMA_OMP_CLAUSE_{IN,TASK}_REDUCTION.
1975 (c_parser_omp_atomic): Parse hint and memory order clauses. Handle
1976 default memory order from requires directive if any. Adjust
1977 c_finish_omp_atomic caller.
1978 (c_parser_omp_critical): Allow comma in between (name) and hint clause.
1979 (c_parser_omp_flush): Parse flush with memory-order-clause.
1980 (c_parser_omp_for_loop): Allow NE_EXPR even in
1981 OpenMP loops, adjust c_finish_omp_for caller.
1982 (OMP_SIMD_CLAUSE_MASK): Add if and nontemporal clauses.
1983 (c_parser_omp_master): Add p_name, mask and cclauses arguments.
1984 Allow to be called while parsing combined parallel master.
1985 Parse combined master taskloop{, simd}.
1986 (c_parser_omp_parallel): Parse combined
1987 parallel master{, taskloop{, simd}} constructs.
1988 (OMP_TASK_CLAUSE_MASK): Add in_reduction clause.
1989 (OMP_TASKGROUP_CLAUSE_MASK): Define.
1990 (c_parser_omp_taskgroup): Add LOC argument. Parse taskgroup clauses.
1991 (OMP_TASKWAIT_CLAUSE_MASK): Define.
1992 (c_parser_omp_taskwait): Handle taskwait with depend clauses.
1993 (c_parser_omp_teams): Force a BIND_EXPR with BLOCK
1994 around teams body. Use SET_EXPR_LOCATION.
1995 (c_parser_omp_target_data): Allow target data
1996 with only use_device_ptr clauses.
1997 (c_parser_omp_target): Use SET_EXPR_LOCATION. Set
1998 OMP_REQUIRES_TARGET_USED bit in omp_requires_mask.
1999 (c_parser_omp_requires): New function.
2000 (c_finish_taskloop_clauses): New function.
2001 (OMP_TASKLOOP_CLAUSE_MASK): Add reduction and in_reduction clauses.
2002 (c_parser_omp_taskloop): Use c_finish_taskloop_clauses. Add forward
2003 declaration. Disallow in_reduction clause when combined with parallel
2004 master.
2005 (c_parser_omp_construct): Adjust c_parser_omp_master and
2006 c_parser_omp_taskgroup callers.
2007 * c-typeck.c (c_finish_omp_cancel): Diagnose if clause with modifier
2008 other than cancel.
2009 (handle_omp_array_sections_1): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION
2010 like OMP_CLAUSE_REDUCTION.
2011 (handle_omp_array_sections): Likewise. Call save_expr on array
2012 reductions before calling build_index_type. Handle depend clauses
2013 with iterators.
2014 (struct c_find_omp_var_s): New type.
2015 (c_find_omp_var_r, c_omp_finish_iterators): New functions.
2016 (c_finish_omp_clauses): Don't diagnose nonmonotonic clause
2017 with static, runtime or auto schedule kinds. Call save_expr for whole
2018 array reduction sizes. Diagnose reductions with zero sized elements
2019 or variable length structures. Diagnose nogroup clause used with
2020 reduction clause(s). Handle depend clause with
2021 OMP_CLAUSE_DEPEND_DEPOBJ. Diagnose bit-fields. Require
2022 omp_depend_t type for OMP_CLAUSE_DEPEND_DEPOBJ kinds and
2023 some different type for other kinds. Use build_unary_op with
2024 ADDR_EXPR and build_indirect_ref instead of c_mark_addressable.
2025 Handle depend clauses with iterators. Remove no longer needed special
2026 case that predetermined const qualified vars may be specified in
2027 firstprivate clause. Complain if const qualified vars are mentioned
2028 in data-sharing clauses other than firstprivate or shared. Use
2029 error_at with OMP_CLAUSE_LOCATION (c) as first argument instead of
2030 error. Formatting fix. Handle OMP_CLAUSE_NONTEMPORAL and
2031 OMP_CLAUSE_{IN,TASK}_REDUCTION. Allow any lvalue as
2032 OMP_CLAUSE_DEPEND operand (besides array section), adjust diagnostics.
2033
7e2de6df
DM
20342018-10-29 David Malcolm <dmalcolm@redhat.com>
2035
2036 * c-decl.c (implicit_decl_warning): Update "is there a suggestion"
2037 logic for change to name_hint::operator bool.
2038 (undeclared_variable): Likewise.
2039 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
2040 (c_parser_parameter_declaration): Likewise.
2041
9f936c86
JM
20422018-10-17 Joseph Myers <joseph@codesourcery.com>
2043
2044 * c-errors.c (pedwarn_c11): New function.
2045 * c-parser.c (disable_extension_diagnostics): Save
2046 warn_c11_c2x_compat and set it to 0.
2047 (restore_extension_diagnostics): Restore warn_c11_c2x_compat.
2048 (c_parser_static_assert_declaration_no_semi): Handle
2049 _Static_assert without string constant.
2050 * c-tree.h (pedwarn_c11): New prototype.
2051
033eb567
DM
20522018-10-17 David Malcolm <dmalcolm@redhat.com>
2053
2054 * Make-lang.in (selftest-c): New.
2055 (C_SELFTEST_FLAGS, C_SELFTEST_DEPS, s-selftest-c, selftest-c-gdb)
2056 (selftest-gdb, selftest-c-valgrind, selftest-valgrind): Move here
2057 from gcc/Makefile.in.
2058
0edf3afe
RB
20592018-10-02 Richard Biener <rguenther@suse.de>
2060
2061 * c-decl.c (warn_if_shadowing): Do not test DECL_FROM_INLINE.
2062
8313a764
JM
20632018-09-26 Joseph Myers <joseph@codesourcery.com>
2064
2065 PR c/87390
2066 * c-typeck.c (build_binary_op): Use excess precision for
2067 comparisons of integers and floating-point for C11 and later.
2068
ce6f0888
MJ
20692018-09-26 Martin Jambor <mjambor@suse.cz>
2070
2071 PR c/87347
2072 * c-parser.c (warn_for_abs): Bail out if TYPE_ARG_TYPES is NULL. Fix
ab20d992 2073 comment.
ce6f0888 2074
9c4a4b3c
DM
20752018-09-17 David Malcolm <dmalcolm@redhat.com>
2076
2077 * c-objc-common.c (range_label_for_type_mismatch::get_text):
2078 Update for new param.
2079 * c-typeck.c (maybe_range_label_for_tree_type_mismatch::get_text):
2080 Likewise.
2081
80c6d1f4
MJ
20822018-09-17 Martin Jambor <mjambor@suse.cz>
2083
2084 PR c/63886
2085 * c-parser.c: (warn_for_abs): New function.
2086 (c_parser_postfix_expression_after_primary): Call it.
2087
4a426e36
BE
20882018-09-13 Bernd Edlinger <bernd.edlinger@hotmail.de>
2089
2090 * c-typeck.c (digest_init): Shorten overlength strings.
2091
6d900107
BE
20922018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
2093
2094 * c-decl.c (finish_decl): Call complete_flexible_array_elts.
2095
b5764229
BE
20962018-09-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
2097
2098 * c-decl.c (finish_decl): Call braced_list_to_string here ...
2099 * c-parser.c (c_parser_declaration_or_fndef): ... instead of here.
2100
22eea6b2
AM
21012018-08-30 Alexander Monakov <amonakov@ispras.ru>
2102
2103 * gimple-parser.c (c_parser_gimple_binary_expression): Accept infix
2104 "__MULT_HIGHPART" for MULT_HIGHPART_EXPR.
2105
85204e23
DM
21062018-08-27 David Malcolm <dmalcolm@redhat.com>
2107
2108 PR 87091
2109 * c-decl.c (implicitly_declare): Update call to
2110 maybe_add_include_fixit to suggest overriding the location, as it
2111 is for a note.
2112 * c-objc-common.c (c_tree_printer): Update for conversion of
2113 show_caret_p to a tri-state.
2114
3d78e008
ML
21152018-08-27 Martin Liska <mliska@suse.cz>
2116
2117 * c-decl.c (locate_old_decl): Use new function
92a285c1
ML
2118 fndecl_built_in_p and remove check for FUNCTION_DECL if
2119 possible.
3d78e008
ML
2120 (diagnose_mismatched_decls): Likewise.
2121 (merge_decls): Likewise.
2122 (warn_if_shadowing): Likewise.
2123 (pushdecl): Likewise.
2124 (implicitly_declare): Likewise.
2125 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
2126 * c-tree.h (C_DECL_ISNT_PROTOTYPE): Likewise.
2127 * c-typeck.c (build_function_call_vec): Likewise.
2128 (convert_arguments): Likewise.
2129
097f82ec
DM
21302018-08-20 David Malcolm <dmalcolm@redhat.com>
2131
2132 PR other/84889
2133 * c-decl.c (pushtag): Add auto_diagnostic_group instance.
2134 (diagnose_mismatched_decls): Likewise, in various places.
2135 (warn_if_shadowing): Likewise.
2136 (implicit_decl_warning): Likewise.
2137 (implicitly_declare): Likewise.
2138 (undeclared_variable): Likewise.
2139 (declare_label): Likewise.
2140 (grokdeclarator): Likewise.
2141 (start_function): Likewise.
2142 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
2143 (c_parser_parameter_declaration): Likewise.
2144 (c_parser_binary_expression): Likewise.
2145 * c-typeck.c (c_expr_sizeof_expr): Likewise.
2146 (parser_build_binary_op): Likewise.
2147 (build_unary_op): Likewise.
2148 (error_init): Likewise.
2149 (pedwarn_init): Likewise.
2150 (warning_init): Likewise.
2151 (convert_for_assignment): Likewise.
2152
96e6ae57
DM
21532018-08-15 David Malcolm <dmalcolm@redhat.com>
2154
2155 * c-objc-common.c: Include "gcc-rich-location.h".
2156 (c_tree_printer): Move implemenation of '%T' to...
2157 (print_type): ...this new function.
2158 (range_label_for_type_mismatch::get_text): New function.
2159 * c-typeck.c (convert_for_assignment): Add type labels to the rhs
2160 range for the various ic_argpass cases.
2161 (class maybe_range_label_for_tree_type_mismatch): New class.
2162 (build_binary_op): Use it when calling binary_op_error.
2163
0cd020ae 21642018-08-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
ab20d992 2165
0cd020ae
PK
2166 * c-decl.c (start_decl): Do not warn if variables is named as main
2167 and is a local variable.
2168
72733314
IS
21692018-08-15 Iain Sandoe <iain@sandoe.co.uk>
2170
2171 PR c/19315
2172 * c-decl.c (finish_decl): Don't add the 'extern' storage class to
2173 objects of unknown size.
2174
23aa9f7c
MS
21752018-08-13 Martin Sebor <msebor@redhat.com>
2176
2177 PR tree-optimization/71625
2178 * c-parser.c (c_parser_declaration_or_fndef): Call
2179 braced_list_to_string.
2180
e5e7e50d
BH
21812018-08-03 Bogdan Harjoc <harjoc@gmail.com>
2182
2183 PR c/86690
2184 * c-typeck.c (lookup_field): Do not use TYPE_LANG_SPECIFIC after
2185 errors.
2186
8a45b051
MS
21872018-08-01 Martin Sebor <msebor@redhat.com>
2188
2189 PR tree-optimization/86650
2190 * c-objc-common.c (c_tree_printer): Move usage of EXPR_LOCATION (t)
2191 and TREE_BLOCK (t) from within percent_K_format to this callsite.
2192
5922dcb5
JJ
21932018-08-01 Jakub Jelinek <jakub@redhat.com>
2194
2195 PR c/85704
2196 * c-typeck.c (init_field_decl_cmp): New function.
2197 (output_pending_init_elements): Use it for field comparisons
2198 instead of pure bit_position comparisons.
2199
9b452033
JJ
22002018-07-12 Jakub Jelinek <jakub@redhat.com>
2201
2202 * c-decl.c (c_decl_attributes): Don't diagnose vars without mappable
2203 type here, instead add "omp declare target implicit" attribute.
2204 (finish_decl): Diagnose vars without mappable type here.
2205
ab20d992
JJ
22062018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
2207 Thomas Schwinge <thomas@codesourcery.com>
829c6349
CLT
2208 Cesar Philippidis <cesar@codesourcery.com>
2209
2210 * c-parser.c (c_parser_omp_clause_name): Add support for finalize
2211 and if_present. Make present_or_{copy,copyin,copyout,create} aliases
2212 to their non-present_or_* counterparts. Make 'self' an alias to
2213 PRAGMA_OACC_CLAUSE_HOST.
2214 (c_parser_oacc_data_clause): Update GOMP mappings for
2215 PRAGMA_OACC_CLAUSE_{COPY,COPYIN,COPYOUT,CREATE,DELETE}. Remove
2216 PRAGMA_OACC_CLAUSE_{SELF,PRESENT_OR_*}.
2217 (c_parser_oacc_all_clauses): Handle finalize and if_present clauses.
2218 Remove support for present_or_* clauses.
2219 (OACC_KERNELS_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
2220 (OACC_PARALLEL_CLAUSE_MASK): Likewise.
2221 (OACC_DECLARE_CLAUSE_MASK): Likewise.
2222 (OACC_DATA_CLAUSE_MASK): Likewise.
2223 (OACC_ENTER_DATA_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
2224 (OACC_EXIT_DATA_CLAUSE_MASK): Add FINALIZE clause.
2225 (OACC_UPDATE_CLAUSE_MASK): Remove SELF, add IF_PRESENT.
2226 (c_parser_oacc_declare): Remove PRESENT_OR_* clauses.
2227 * c-typeck.c (c_finish_omp_clauses): Handle IF_PRESENT and FINALIZE.
2228
e197e64e
KV
22292018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
2230
2231 * c-typeck.c (build_unary_op): Handle ABSU_EXPR;
2232 * gimple-parser.c (c_parser_gimple_statement): Likewise.
2233 (c_parser_gimple_unary_expression): Likewise.
2234
487f2f61
JJ
22352018-06-15 Jakub Jelinek <jakub@redhat.com>
2236
2237 PR c/86093
2238 * c-typeck.c (pointer_diff): Cast both pointers to unqualified types
2239 before doing POINTER_DIFF_EXPR.
2240
e4d44a37
MP
22412018-06-07 Marek Polacek <polacek@redhat.com>
2242
2243 PR c/85318
2244 * c-decl.c (check_for_loop_decls): Add -Wc90-c99-compat warning about
2245 for loop initial declarations.
2246
b67b9225
DP
22472018-05-30 David Pagan <dave.pagan@oracle.com>
2248
2249 PR c/55976
2250 * c-decl.c (grokdeclarator): Update check for return type warnings.
2251 (start_function): Likewise.
2252 (finish_function): Likewise.
2253 * c-typeck.c (c_finish_return): Update check for return type warnings.
2254 Pass OPT_Wreturn_type to pedwarn when appropriate.
2255
c566cc9f
RS
22562018-05-18 Richard Sandiford <richard.sandiford@linaro.org>
2257
2258 * gimple-parser.c (c_parser_gimple_postfix_expression): Remove
2259 __FMA_EXPR handlng.
2260
e4f81565
RS
22612018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
2262
2263 * gimple-parser.c: Include internal-fn.h.
2264 (c_parser_gimple_statement): Treat a leading CPP_DOT as a call.
2265 (c_parser_gimple_call_internal): New function.
2266 (c_parser_gimple_postfix_expression): Use it to handle CPP_DOT.
2267 Fix typos in comment.
2268
79e7b1fe
JJ
22692018-05-10 Jakub Jelinek <jakub@redhat.com>
2270
2271 PR c++/85662
2272 * c-fold.c (c_fully_fold_internal): Use fold_offsetof rather than
2273 fold_offsetof_1, pass TREE_TYPE (expr) as TYPE to it and drop the
2274 fold_convert_loc.
2275 * c-typeck.c (build_unary_op): Use fold_offsetof rather than
2276 fold_offsetof_1, pass argtype as TYPE to it and drop the
2277 fold_convert_loc.
2278
f7584c81
DP
22792018-05-02 David Pagan <dave.pagan@oracle.com>
2280
2281 PR c/30552
2282 * c-decl.c (old_style_parameter_scope): New function.
2283 * c-parser.c (c_parser_postfix_expression): Check for statement
2284 expressions in old-style function parameter list declarations.
2285 * c-parser.h (old_style_parameter_scope): New extern declaration.
2286
b33a0cb3
JJ
22872018-04-25 Jakub Jelinek <jakub@redhat.com>
2288
2289 PR sanitizer/84307
2290 * c-decl.c (build_compound_literal): Call pushdecl (decl) even when
2291 it is not TREE_STATIC.
2292 * c-typeck.c (c_mark_addressable) <case COMPOUND_LITERAL_EXPR>: Mark
2293 not just the COMPOUND_LITERAL_EXPR node itself addressable, but also
2294 its COMPOUND_LITERAL_EXPR_DECL.
2295
c5c5822a
JM
22962018-03-21 Joseph Myers <joseph@codesourcery.com>
2297
2298 * c-parser.c (c_parser_postfix_expression): For __builtin_tgmath
2299 where all functions return the same _FloatN or _FloatNx type,
2300 treat integer types as _Float64 instead of double.
2301
aa1c9429
JJ
23022018-03-21 Jakub Jelinek <jakub@redhat.com>
2303
2304 PR c/84999
2305 * c-typeck.c (build_binary_op): If c_common_type_for_size fails when
2306 building vector comparison, diagnose it and return error_mark_node.
2307
9bb45a95
JJ
23082018-03-15 Jakub Jelinek <jakub@redhat.com>
2309
2310 PR c/84853
2311 * c-typeck.c (build_binary_op) <case RSHIFT_EXPR, case LSHIFT_EXPR>:
2312 If code1 is INTEGER_TYPE, only allow code0 VECTOR_TYPE if it has
2313 INTEGER_TYPE element type.
2314
ada6bad9
DP
23152018-03-13 David Pagan <dave.pagan@oracle.com>
2316
2317 PR c/46921
2318 * c-typeck.c (output_init_element): Ensure field initializer
2319 expression is always evaluated if there are side effects.
2320
849bbdb9
JJ
23212018-03-06 Jakub Jelinek <jakub@redhat.com>
2322
2323 PR c/84721
2324 * c-parser.c (add_debug_begin_stmt): Don't add DEBUG_BEGIN_STMT if
2325 !building_stmt_list_p ().
2326
d74641bd
RS
23272018-02-13 Richard Sandiford <richard.sandiford@linaro.org>
2328
2329 PR c/84305
2330 * c-decl.c (grokdeclarator): Create an anonymous TYPE_DECL
2331 in PARM and TYPENAME contexts too, but attach it to a BIND_EXPR
2332 and include the BIND_EXPR in the list of things that need to be
2333 pre-evaluated.
2334
0444aa9c
NS
23352018-02-09 Nathan Sidwell <nathan@acm.org>
2336
2337 PR c/84293
2338 * c-typeck.c (build_indirect_ref, build_c_cast): Pass expr location
2339 to strict_aliasing_warning.
2340
7c30b12a
PC
23412018-02-02 Paolo Carlini <paolo.carlini@oracle.com>
2342
2343 * c-typeck.c (really_start_incremental_init, push_init_level,
2344 set_nonincremental_init, output_init_element, process_init_element):
2345 Use DECL_UNNAMED_BIT_FIELD.
2346
2be4dfcb
MP
23472018-01-31 Marek Polacek <polacek@redhat.com>
2348
2349 PR c/81779
2350 * c-parser.c (c_parser_compound_statement_nostart): Call
2351 expansion_point_location_if_in_system_header.
2352
bb9869d5
DM
23532018-01-17 David Malcolm <dmalcolm@redhat.com>
2354
2355 PR c++/83814
2356 * c-fold.c (fold_for_warn): Move from c-common.c, reducing to just
2357 the C part.
2358
b4923738
JJ
23592018-01-13 Jakub Jelinek <jakub@redhat.com>
2360
2361 PR c/83801
2362 * c-tree.h (decl_constant_value_1): Add a bool argument.
2363 * c-typeck.c (decl_constant_value_1): Add IN_INIT argument, allow
2364 returning a CONSTRUCTOR if it is true. Use error_operand_p.
2365 (decl_constant_value): Adjust caller.
2366 * c-fold.c (c_fully_fold_internal): If in_init, pass true to
2367 decl_constant_value_1 as IN_INIT. Otherwise, punt if
2368 decl_constant_value returns initializer that has BLKmode or
2369 array type.
2370 (c_fully_fold_internal) <case COMPONENT_REF>: Fold if !lval.
2371
928686b1
RS
23722018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
2373 Alan Hayward <alan.hayward@arm.com>
2374 David Sherwood <david.sherwood@arm.com>
2375
2376 * c-typeck.c (comptypes_internal, build_binary_op): Handle polynomial
2377 TYPE_VECTOR_SUBPARTS.
2378
85ec4feb
JJ
23792018-01-03 Jakub Jelinek <jakub@redhat.com>
2380
2381 Update copyright years.
2382
913884f7
JJ
23832018-01-01 Jakub Jelinek <jakub@redhat.com>
2384
2385 PR c/83595
2386 * c-parser.c (c_parser_braced_init, c_parser_initelt,
2387 c_parser_conditional_expression, c_parser_cast_expression,
2388 c_parser_sizeof_expression, c_parser_alignof_expression,
2389 c_parser_postfix_expression, c_parser_omp_declare_reduction,
2390 c_parser_transaction_expression): Use set_error () method instead
2391 of setting value member to error_mark_node.
2392
c6cfa2bf
MM
23932017-12-28 Michael Meissner <meissner@linux.vnet.ibm.com>
2394
2395 * c-decl.c (header_for_builtin_fn): Add integer rounding _Float<N>
2396 and _Float<N>X built-in functions.
2397
11d29d63
JJ
23982017-12-22 Jakub Jelinek <jakub@redhat.com>
2399
14ec014e
JJ
2400 PR debug/83550
2401 * c-decl.c (finish_struct): Set DECL_SOURCE_LOCATION on
2402 TYPE_STUB_DECL and call rest_of_type_compilation before processing
2403 incomplete vars rather than after it.
2404
11d29d63
JJ
2405 PR debug/83547
2406 * c-typeck.c (c_finish_stmt_expr): Ignore !TREE_SIDE_EFFECTS as
2407 indicator of ({ }), instead skip all trailing DEBUG_BEGIN_STMTs first,
2408 and consider empty ones if there are no other stmts. For
2409 -Wunused-value walk all statements before the one only followed by
2410 DEBUG_BEGIN_STMTs.
2411
170a8bd6 24122017-12-22 Mike Stump <mikestump@comcast.net>
92a285c1 2413 Eric Botcazou <ebotcazou@adacore.com>
170a8bd6
EB
2414
2415 * c-parser.c (c_parser_while_statement): Add unroll parameter and
2416 build ANNOTATE_EXPR if present. Add 3rd operand to ANNOTATE_EXPR.
2417 (c_parser_do_statement): Likewise.
2418 (c_parser_for_statement): Likewise.
2419 (c_parser_statement_after_labels): Adjust calls to above.
2420 (c_parse_pragma_ivdep): New static function.
2421 (c_parser_pragma_unroll): Likewise.
2422 (c_parser_pragma) <PRAGMA_IVDEP>: Add support for pragma Unroll.
2423 <PRAGMA_UNROLL>: New case.
2424
01512446
JJ
24252017-12-19 Jakub Jelinek <jakub@redhat.com>
2426
2427 * c-typeck.c (comptypes_internal, function_types_compatible_p,
2428 perform_integral_promotions, digest_init): Replace Yoda conditions
2429 with typical order conditions.
2430 * c-decl.c (check_bitfield_type_and_width): Likewise.
2431
c65e18d3
BE
24322017-12-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
2433
2434 * c-typeck.c (c_safe_arg_type_equiv_p,
2435 c_safe_function_type_cast_p): New function.
2436 (build_c_cast): Implement -Wcast-function-type.
2437
b7280579
RB
24382017-12-14 Richard Biener <rguenther@suse.de>
2439
2440 PR c/83415
2441 * c-fold.c (c_fully_fold_internal): Treat VIEW_CONVERT_EXPR
2442 like REALPART_EXPR for the behavior of whether its operand
2443 is an lvalue.
2444
49e6a6c0
MP
24452017-12-12 Marek Polacek <polacek@redhat.com>
2446
2447 PR c/82679
2448 * c-decl.c (grokdeclarator): Check declspecs insted of atomicp.
2449
ab20d992 24502017-12-12 Alexandre Oliva <aoliva@redhat.com>
96a95ac1
AO
2451
2452 * c-objc-common.h (LANG_HOOKS_EMITS_BEGIN_STMT): Redefine as true.
2453 * c-parser.c (add_debug_begin_stmt): New.
2454 (c_parser_declaration_or_fndef): Call it.
2455 (c_parser_compound_statement_nostart): Likewise.
2456 (c_parser_statement_after_labels): Likewise.
2457 * c-typeck (c_finish_stmt_expr): Skip begin stmts markers.
2458
4b2b493f
JM
24592017-12-07 Joseph Myers <joseph@codesourcery.com>
2460
2461 * c-decl.c (build_compound_literal): Add parameter alignas_align
2462 and set alignment of decl if nonzero.
2463 * c-parser.c (c_keyword_starts_typename): Allow RID_ALIGNAS.
2464 (c_parser_declspecs): Allow RID_ALIGNAS to follow a type, like a
2465 qualifier.
2466 (c_parser_struct_declaration): Update syntax comment.
2467 (c_parser_type_name): Add alignas_ok argument and pass it to
2468 c_parser_declspecs.
2469 (c_parser_cast_expression): Pass true to c_parser_type_name and
2470 give error if a cast used an _Alignas specifier.
2471 (c_parser_sizeof_expression): Pass true to c_parser_type_name and
2472 give error if sizeof (type-name) used an _Alignas specifier.
2473 (c_parser_alignof_expression): Pass true to c_parser_type_name and
2474 give error if _Alignof (type-name) used an _Alignas specifier.
2475 (c_parser_postfix_expression_after_paren_type): Check specified
2476 alignment for a compound literal and pass it to
2477 build_compound_literal.
2478 * c-parser.h (c_parser_type_name): Update prototype.
2479 * c-tree.h (build_compound_literal): Update prototype.
2480
5d9ae53d
MS
24812017-12-07 Martin Sebor <msebor@redhat.com>
2482
2483 PR c/81544
2484 * c-decl.c (c_decl_attributes): Look up existing declaration and
2485 pass it to decl_attributes.
2486
c79144f8
DM
24872017-12-06 David Malcolm <dmalcolm@redhat.com>
2488
2489 PR c/83236
2490 * c-decl.c (lookup_name_fuzzy): Don't suggest names that are
2491 reserved for use by the implementation.
2492
613bc14f
DM
24932017-12-06 David Malcolm <dmalcolm@redhat.com>
2494
2495 * c-decl.c: Include "c-family/c-spellcheck.h".
2496
05abad4c
ML
24972017-12-05 Martin Liska <mliska@suse.cz>
2498 Jakub Jelinek <jakub@redhat.com>
2499
2500 * c-typeck.c (pointer_diff): Add new argument and instrument
2501 pointer subtraction.
2502 (build_binary_op): Similar for pointer comparison.
2503
cc6534d4
JJ
25042017-12-01 Jakub Jelinek <jakub@redhat.com>
2505
65791f42
JJ
2506 PR c/79153
2507 * c-parser.c: Include tree-iterator.h.
2508 (c_parser_switch_statement): Emit LABEL_EXPR for the break label
2509 into SWITCH_BODY instead of after it and set SWITCH_BREAK_LABEL_P
2510 on it.
2511
cc6534d4
JJ
2512 PR c/83222
2513 * c-tree.h (decl_constant_value_1): Declare.
2514 * c-typeck.c (decl_constant_value_1): New function.
2515 (decl_constant_value): Use it.
2516 * c-fold.c (c_fully_fold_internal): If in_init, use
2517 decl_constant_value_1 instead of decl_constant_value.
2518
5de73c05
JJ
25192017-11-30 Jakub Jelinek <jakub@redhat.com>
2520
2521 * c-parser.c (c_parser_postfix_expression): Use ; instead of ;;.
2522
058f0b9e
JJ
25232017-11-28 Jakub Jelinek <jakub@redhat.com>
2524
2525 PR sanitizer/81275
2526 * c-typeck.c (c_finish_case): Set SWITCH_ALL_CASES_P if
2527 c_switch_covers_all_cases_p returns true.
2528
5e9d6aa4 25292017-11-28 Julia Koval <julia.koval@intel.com>
92a285c1 2530 Sebastian Peryt <sebastian.peryt@intel.com>
5e9d6aa4
JK
2531
2532 * Make-lang.in (c/c-array-notation.o): Remove.
2533 * c-array-notation.c: Delete.
2534 * c-decl.c: Remove cilkplus condition.
2535 * c-parser.c (c_parser_cilk_simd, c_parser_cilk_for,
2536 c_parser_cilk_verify_simd, c_parser_array_notation,
2537 c_parser_cilk_clause_vectorlength, c_parser_cilk_grainsize,
2538 c_parser_cilk_simd_fn_vector_attrs,
2539 c_finish_cilk_simd_fn_tokens): Delete.
2540 (c_parser_declaration_or_fndef): Remove cilkplus condition.
2541 (c_parser_direct_declarator_inner): Ditto.
2542 (CILK_SIMD_FN_CLAUSE_MASK): Delete.
2543 (c_parser_attributes, c_parser_compound_statement,
2544 c_parser_statement_after_labels, c_parser_if_statement,
2545 c_parser_switch_statement, c_parser_while_statement,
2546 c_parser_do_statement, c_parser_for_statement,
2547 c_parser_unary_expression, c_parser_postfix_expression,
2548 c_parser_postfix_expression_after_primary,
2549 c_parser_pragma, c_parser_omp_clause_name, c_parser_omp_all_clauses,
2550 c_parser_omp_for_loop, c_finish_omp_declare_simd): Remove cilkplus
2551 support.
2552 * c-typeck.c (build_array_ref, build_function_call_vec,
2553 convert_arguments,
2554 lvalue_p, build_compound_expr, c_finish_return, c_finish_if_stmt,
2555 c_finish_loop, build_binary_op): Remove cilkplus support.
2556
9e851845
JJ
25572017-11-28 Jakub Jelinek <jakub@redhat.com>
2558
2559 * c-typeck.c (c_start_case): Build SWITCH_EXPR using build2 instead
2560 of build3.
2561
ab20d992 25622017-11-14 Boris Kolpackov <boris@codesynthesis.com>
8c7dbea9
BK
2563
2564 * Make-lang.in (c.install-plugin): Install backend import library.
2565
41521dee
JJ
25662017-11-23 Jakub Jelinek <jakub@redhat.com>
2567
2568 * c-parser.c (c_parser_omp_declare_simd): Reject declare simd in
2569 pragma_stmt context.
2570
ac9effed
EB
25712017-11-23 Mike Stump <mikestump@comcast.net>
2572 Eric Botcazou <ebotcazou@adacore.com>
2573
2574 * c-parser.c (c_parser_while_statement): Pass 3rd operand to
2575 ANNOTATE_EXPR.
2576 (c_parser_do_statement): Likewise.
2577 (c_parser_for_statement): Likewise.
2578
ce95abc4
DM
25792017-11-22 David Malcolm <dmalcolm@redhat.com>
2580
2581 PR c++/62170
2582 * c-objc-common.c (c_tree_printer): Convert penultimate param from
2583 bool to bool *. Within '%T' handling, if showing an "aka", use
2584 "quoted" param to add appropriate quoting.
2585
974aedcc
MP
25862017-11-22 Marek Polacek <polacek@redhat.com>
2587
2588 PR c++/60336
2589 PR middle-end/67239
2590 PR target/68355
2591 * c-decl.c (grokdeclarator): Set DECL_PADDING_P on unnamed bit-fields.
2592
d4300cc6
DM
25932017-11-21 David Malcolm <dmalcolm@redhat.com>
2594
2595 PR c/83056
2596 * c-decl.c (lookup_name_fuzzy): Don't suggest names that came from
2597 earlier failed lookups.
2598
1af4ebf5
MG
25992017-11-21 Marc Glisse <marc.glisse@inria.fr>
2600
2601 * c-fold.c (c_fully_fold_internal): Handle POINTER_DIFF_EXPR.
2602 * c-typeck.c (pointer_diff): Use POINTER_DIFF_EXPR.
2603
26edace6
DM
26042017-11-20 David Malcolm <dmalcolm@redhat.com>
2605
2606 PR c/81404
2607 * c-decl.c: Include "c-family/known-headers.h".
2608 (get_c_name_hint): Rename to get_stdlib_header_for_name and move
2609 to known-headers.cc.
2610 (class suggest_missing_header): Move to known-header.h.
2611 (lookup_name_fuzzy): Call get_c_stdlib_header_for_name rather
2612 than get_c_name_hint.
2613
b1212255
DM
26142017-11-20 David Malcolm <dmalcolm@redhat.com>
2615
2616 * c-decl.c (get_c_name_hint): New function.
2617 (class suggest_missing_header): New class.
2618 (lookup_name_fuzzy): Call get_c_name_hint and use it to
2619 suggest missing headers to the user.
2620
6c7a259b
DM
26212017-11-20 David Malcolm <dmalcolm@redhat.com>
2622
2623 * c-decl.c: Define INCLUDE_UNIQUE_PTR before including system.h.
2624 Include "c-family/name-hint.h"
2625 (implicit_decl_warning): Convert "hint" from
2626 const char * to name_hint. Pass location to
2627 lookup_name_fuzzy. Suppress any deferred diagnostic if the
2628 warning was not printed.
2629 (undeclared_variable): Likewise for "guessed_id".
2630 (lookup_name_fuzzy): Convert return type from const char *
2631 to name_hint. Add location_t param.
2632 * c-parser.c: Define INCLUDE_UNIQUE_PTR before including system.h.
2633 Include "c-family/name-hint.h"
2634 (c_parser_declaration_or_fndef): Convert "hint" from
2635 const char * to name_hint. Pass location to lookup_name_fuzzy.
2636 (c_parser_parameter_declaration): Likewise.
2637
f9c59f7e
JJ
26382017-11-19 Jakub Jelinek <jakub@redhat.com>
2639
2640 PR c/66618
2641 PR c/69960
2642 * c-parser.c (c_parser_omp_atomic): Pass true as LVAL to c_fully_fold
2643 where needed.
2644 * c-typeck.c (build_unary_op, build_modify_expr, build_asm_expr,
2645 handle_omp_array_sections): Likewise.
2646 (digest_init): Don't call decl_constant_value_for_optimization.
2647 * c-tree.h (decl_constant_value_for_optimization): Removed.
2648 * c-fold.c (c_fold_array_ref): New function.
2649 (c_fully_fold_internal): Add LVAL argument, propagate it through
2650 recursive calls. For VAR_P call decl_constant_value and
2651 unshare if not LVAL and either optimizing or IN_INIT. Remove
2652 decl_constant_value_for_optimization calls. If IN_INIT and not LVAL,
2653 fold ARRAY_REF with STRING_CST and INTEGER_CST operands.
2654 (c_fully_fold): Add LVAL argument, pass it through to
2655 c_fully_fold_internal.
2656 (decl_constant_value_for_optimization): Removed.
2657
3ca0dc60
JM
26582017-11-15 Joseph Myers <joseph@codesourcery.com>
2659
2660 PR c/81156
2661 * c-parser.c (check_tgmath_function): New function.
2662 (enum tgmath_parm_kind): New enum.
2663 (c_parser_postfix_expression): Handle __builtin_tgmath.
2664
64a5912c
DM
26652017-10-31 David Malcolm <dmalcolm@redhat.com>
2666
2667 * c-decl.c (implicit_decl_warning): Update for renaming of
2668 pedwarn_at_rich_loc and warning_at_rich_loc.
2669 (implicitly_declare): Likewise for renaming of inform_at_rich_loc.
2670 (undeclared_variable): Likewise for renaming of error_at_rich_loc.
2671 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
2672 (c_parser_struct_or_union_specifier): Likewise for renaming of
2673 pedwarn_at_rich_loc.
2674 (c_parser_parameter_declaration): Likewise for renaming of
2675 error_at_rich_loc.
2676 * c-typeck.c (build_component_ref): Likewise.
2677 (build_unary_op): Likewise for renaming of inform_at_rich_loc.
2678 (pop_init_level): Likewise for renaming of warning_at_rich_loc.
2679 (set_init_label): Likewise for renaming of error_at_rich_loc.
2680
c1136864
RB
26812017-10-30 Richard Biener <rguenther@suse.de>
2682
2683 * gimple-parser.c (c_parser_gimple_statement): Parse conditional
2684 stmts.
2685
ee5fd23a
MM
26862017-10-27 Michael Meissner <meissner@linux.vnet.ibm.com>
2687
2688 * c-decl.c (header_for_builtin_fn): Add support for copysign, fma,
2689 fmax, fmin, and sqrt _Float<N> and _Float<N>X variants.
2690
1a59ccf2
DM
26912017-10-25 David Malcolm <dmalcolm@redhat.com>
2692
2693 PR c/7356
2694 * c-parser.c (c_parser_declaration_or_fndef): Detect missing
2695 semicolons.
2696
bc1a75dd
JJ
26972017-10-25 Jakub Jelinek <jakub@redhat.com>
2698
2699 PR libstdc++/81706
2700 * c-decl.c (merge_decls): Copy "omp declare simd" attributes from
2701 newdecl to corresponding __builtin_ if any.
2702
ff1ff960
PC
27032017-10-24 Paolo Carlini <paolo.carlini@oracle.com>
2704
2705 PR c++/82466
2706 * c-decl.c (diagnose_mismatched_decls): Use
2707 OPT_Wbuiltin_declaration_mismatch.
2708
62e1c678
DM
27092017-10-12 David Malcolm <dmalcolm@redhat.com>
2710
2711 * c-parser.c (c_parser_require): Add "type_is_unique" param and
2712 use it to guard calls to maybe_suggest_missing_token_insertion.
2713 (c_parser_parms_list_declarator): Override default value of new
2714 "type_is_unique" param to c_parser_require.
2715 (c_parser_asm_statement): Likewise.
2716 * c-parser.h (c_parser_require): Add "type_is_unique" param,
2717 defaulting to true.
2718
a92f6726
NS
27192017-10-11 Nathan Sidwell <nathan@acm.org>
2720
2721 * c-decl.c (grokdeclarator): Check HAS_DECL_ASSEMBLER_NAME_P too.
2722
8e6cdc90
RS
27232017-10-10 Richard Sandiford <richard.sandiford@linaro.org>
2724
2725 * c-parser.c (c_parser_cilk_clause_vectorlength): Use wi::to_wide when
2726 operating on trees as wide_ints.
2727 * c-typeck.c (build_c_cast, c_finish_omp_clauses): Likewise.
2728 (c_tree_equal): Likewise.
2729
8139a48e
DM
27302017-10-04 David Malcolm <dmalcolm@redhat.com>
2731
2732 * c-decl.c (push_parm_decl): Store c_parm's location into the
2733 PARAM_DECL.
2734 (build_c_parm): Add "loc" param and store it within the c_parm.
2735 * c-parser.c (struct c_parser): Add "last_token_location" field.
2736 (c_parser_consume_token): Store location of the token into the
2737 new field.
2738 (c_parser_declaration_or_fndef): Store params into DECL_ARGUMENTS
2739 when handling a FUNCTION_DECL, if it doesn't already have them.
2740 (c_parser_parameter_declaration): Generate a location for the
2741 parameter, and pass it to the call to build_c_parm.
2742 * c-tree.h (struct c_parm): Add field "loc".
2743 (build_c_parm): Add location_t param.
2744 * c-typeck.c (get_fndecl_argument_location): New function.
2745 (inform_for_arg): New function.
2746 (convert_for_assignment): Use inform_for_arg when dealing with
2747 ic_argpass.
2748
2a389958
JJ
27492017-09-29 Jakub Jelinek <jakub@redhat.com>
2750
7d386d45
JJ
2751 * c-decl.c (grokfield): Use SET_DECL_C_BIT_FIELD here if
2752 width is non-NULL.
2753 (finish_struct): Test DECL_C_BIT_FIELD instead of DECL_INITIAL,
2754 don't SET_DECL_C_BIT_FIELD here.
2755
2a389958
JJ
2756 PR c/82340
2757 * c-decl.c (build_compound_literal): Use c_apply_type_quals_to_decl
2758 instead of trying to set just TREE_READONLY manually.
2759
ebc6a85e
TV
27602017-09-16 Tom de Vries <tom@codesourcery.com>
2761
2762 PR c/81875
2763 * c-parser.c (c_parser_omp_for_loop): Fold only operands of cond, not
2764 cond itself.
2765
bb75facd
JM
27662017-09-15 Joseph Myers <joseph@codesourcery.com>
2767
2768 PR c/82071
2769 * c-typeck.c (ep_convert_and_check): Just call convert_and_check
2770 for C11.
2771 (build_conditional_expr): For C11, generate result with excess
2772 precision when one argument is an integer and the other is of a
2773 type using excess precision.
2774
1d933576
BE
27752017-09-15 Bernd Edlinger <bernd.edlinger@hotmail.de>
2776
2777 * c-typeck.c (build_c_cast): Implement -Wcast-align=strict.
2778
267bbb6f
MP
27792017-09-13 Marek Polacek <polacek@redhat.com>
2780
2781 PR c/82167
2782 * c-typeck.c (c_expr_sizeof_expr): Use the type of expr.value rather
2783 than expr.original_type.
2784
6836632e
NS
27852017-09-12 Nathan Sidwell <nathan@acm.org>
2786
2787 * c-decl.c (field_decl_cmp, resort_data, resort_field_decl_cmp,
2788 resort_sorted_fields): Moved from c-family/c-common.c.
2789 * c-lang.h (struct sorted_fields_type): Moved from c-family/c-common.h.
2790
e035be33
JM
27912017-09-01 Joseph Myers <joseph@codesourcery.com>
2792
2793 PR c/82071
2794 * c-typeck.c (build_atomic_assign): Handle argument with excess
2795 precision. Ensure any EXCESS_PRECISION_EXPR is present in
2796 argument passed to build_binary_op and convert_for_assignment but
2797 not for call to c_fully_fold.
2798 (build_modify_expr): Do not remove EXCESS_PRECISION_EXPR early.
2799 Ensure build_binary_op is called with argument with original
2800 semantic type. Avoid calling c_fully_fold with an
2801 EXCESS_PRECISION_EXPR from build_binary_op.
2802
d2e05fcb
JJ
28032017-09-01 Jakub Jelinek <jakub@redhat.com>
2804
2805 PR c/81887
2806 * c-parser.c (c_parser_omp_ordered): Handle -fopenmp-simd.
2807
b397965c
RS
28082017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
2809 Alan Hayward <alan.hayward@arm.com>
2810 David Sherwood <david.sherwood@arm.com>
2811
2812 * c-typeck.c (build_binary_op): Use SCALAR_TYPE_MODE.
2813 (c_common_type): Likewise. Use as_a <scalar_mode> when setting
2814 m1 and m2 to the signed equivalent of a fixed-point
2815 SCALAR_TYPE_MODE.
2816
14e18d71
DM
28172017-08-24 David Malcolm <dmalcolm@redhat.com>
2818
2819 * c-tree.h (c_expr::get_location) Use EXPR_HAS_LOCATION rather
2820 than CAN_HAVE_LOCATION_P when determining whether to use the
2821 location_t value within "value".
2822
7f204c0f
DM
28232017-08-21 David Malcolm <dmalcolm@redhat.com>
2824
2825 * c-parser.c (c_parser_expr_list): Use c_expr::get_location ()
2826 rather than peeking the location of the first token.
2827 * c-tree.h (c_expr::get_location): New method.
2828
2f687306
DM
28292017-08-21 David Malcolm <dmalcolm@redhat.com>
2830
2831 * c-typeck.c (build_function_call_vec): Pass arg_loc to call
2832 to check_function_arguments.
2833
3e7b80d7
MP
28342017-08-18 Marek Polacek <polacek@redhat.com>
2835
2836 * c-parser.c (c_parser_postfix_expression): Remove unused code. Update
2837 commentary.
2838
00aa1fa2
L
28392017-08-18 H.J. Lu <hongjiu.lu@intel.com>
2840
2841 PR c/53037
2842 * c-decl.c (merge_decls): Also merge DECL_WARN_IF_NOT_ALIGN.
2843 (check_bitfield_type_and_width): Don't allow bit-field with
2844 warn_if_not_aligned type.
2845
da67acb9
MS
28462017-08-14 Martin Sebor <msebor@redhat.com>
2847
2848 PR c/81117
2849 * c-objc-common.c (c_objc_common_init): Handle 'G'.
2850
bb85aa74
MP
28512017-08-11 Marek Polacek <polacek@redhat.com>
2852
2853 PR c/81795
2854 * c-decl.c (pushtag): Only print inform if the warning was printed.
2855 (grokdeclarator): Likewise.
2856
32129a17
DM
28572017-08-10 David Malcolm <dmalcolm@redhat.com>
2858
2859 * c-parser.c (c_parser_error): Rename to...
2860 (c_parser_error_richloc): ...this, making static, and adding
2861 "richloc" parameter, passing it to the c_parse_error call,
2862 rather than calling c_parser_set_source_position_from_token.
2863 (c_parser_error): Reintroduce, reimplementing in terms of the
2864 above, converting return type from void to bool.
2865 (class token_pair): New class.
2866 (struct matching_paren_traits): New struct.
2867 (matching_parens): New typedef.
2868 (struct matching_brace_traits): New struct.
2869 (matching_braces): New typedef.
2870 (get_matching_symbol): New function.
2871 (c_parser_require): Add param MATCHING_LOCATION, using it to
2872 highlight matching "opening" tokens for missing "closing" tokens.
2873 (c_parser_skip_until_found): Likewise.
2874 (c_parser_static_assert_declaration_no_semi): Convert explicit
2875 parsing of CPP_OPEN_PAREN and CPP_CLOSE_PAREN to use of
2876 class matching_parens, so that the pertinent open parenthesis is
2877 highlighted when there are problems locating the close
2878 parenthesis.
2879 (c_parser_struct_or_union_specifier): Likewise.
2880 (c_parser_typeof_specifier): Likewise.
2881 (c_parser_alignas_specifier): Likewise.
2882 (c_parser_simple_asm_expr): Likewise.
2883 (c_parser_braced_init): Likewise, for matching_braces.
2884 (c_parser_paren_condition): Likewise, for matching_parens.
2885 (c_parser_switch_statement): Likewise.
2886 (c_parser_for_statement): Likewise.
2887 (c_parser_asm_statement): Likewise.
2888 (c_parser_asm_operands): Likewise.
2889 (c_parser_cast_expression): Likewise.
2890 (c_parser_sizeof_expression): Likewise.
2891 (c_parser_alignof_expression): Likewise.
2892 (c_parser_generic_selection): Likewise.
2893 (c_parser_postfix_expression): Likewise for cases RID_VA_ARG,
2894 RID_OFFSETOF, RID_TYPES_COMPATIBLE_P, RID_AT_SELECTOR,
2895 RID_AT_PROTOCOL, RID_AT_ENCODE, reindenting as necessary.
2896 In case CPP_OPEN_PAREN, pass loc_open_paren to the
2897 c_parser_skip_until_found call.
2898 (c_parser_objc_class_definition): Use class matching_parens as
2899 above.
2900 (c_parser_objc_method_decl): Likewise.
2901 (c_parser_objc_try_catch_finally_statement): Likewise.
2902 (c_parser_objc_synchronized_statement): Likewise.
2903 (c_parser_objc_at_property_declaration): Likewise.
2904 (c_parser_oacc_wait_list): Likewise.
2905 (c_parser_omp_var_list_parens): Likewise.
2906 (c_parser_omp_clause_collapse): Likewise.
2907 (c_parser_omp_clause_default): Likewise.
2908 (c_parser_omp_clause_if): Likewise.
2909 (c_parser_omp_clause_num_threads): Likewise.
2910 (c_parser_omp_clause_num_tasks): Likewise.
2911 (c_parser_omp_clause_grainsize): Likewise.
2912 (c_parser_omp_clause_priority): Likewise.
2913 (c_parser_omp_clause_hint): Likewise.
2914 (c_parser_omp_clause_defaultmap): Likewise.
2915 (c_parser_oacc_single_int_clause): Likewise.
2916 (c_parser_omp_clause_ordered): Likewise.
2917 (c_parser_omp_clause_reduction): Likewise.
2918 (c_parser_omp_clause_schedule): Likewise.
2919 (c_parser_omp_clause_num_teams): Likewise.
2920 (c_parser_omp_clause_thread_limit): Likewise.
2921 (c_parser_omp_clause_aligned): Likewise.
2922 (c_parser_omp_clause_linear): Likewise.
2923 (c_parser_omp_clause_safelen): Likewise.
2924 (c_parser_omp_clause_simdlen): Likewise.
2925 (c_parser_omp_clause_depend): Likewise.
2926 (c_parser_omp_clause_map): Likewise.
2927 (c_parser_omp_clause_device): Likewise.
2928 (c_parser_omp_clause_dist_schedule): Likewise.
2929 (c_parser_omp_clause_proc_bind): Likewise.
2930 (c_parser_omp_clause_uniform): Likewise.
2931 (c_parser_omp_for_loop): Likewise.
2932 (c_parser_cilk_clause_vectorlength): Likewise.
2933 (c_parser_cilk_clause_linear): Likewise.
2934 (c_parser_transaction_expression): Likewise.
2935 * c-parser.h (c_parser_require): Add param matching_location with
2936 default UNKNOWN_LOCATION.
2937 (c_parser_error): Convert return type from void to bool.
2938 (c_parser_skip_until_found): Add param matching_location with
2939 default UNKNOWN_LOCATION.
2940
30af3a2b
MP
29412017-08-09 Marek Polacek <polacek@redhat.com>
2942
2943 * c-decl.c (build_enumerator): Use true/false instead of 1/0.
2944 * c-tree.h (build_external_ref): Update declaration.
2945 * c-typeck.c (build_array_ref): Use true/false instead of 1/0.
2946 (build_external_ref): Change the type of a parameter to bool.
2947 (parser_build_binary_op): Use true/false instead of 1/0.
2948 (pointer_diff): Likewise.
2949 (build_modify_expr): Likewise.
2950 (set_designator): Change the type of a parameter to bool.
2951 (set_init_index): Use true/false instead of 1/0.
2952 (set_init_label): Likewise.
2953 (output_init_element): Change the type of a parameter to bool.
2954 (output_pending_init_elements): Use true/false instead of 1/0.
2955 (process_init_element): Likewise.
2956 (build_binary_op): Change the type of a parameter to bool.
2957
296c53ac
MP
29582017-08-09 Marek Polacek <polacek@redhat.com>
2959
2960 PR c/81233
2961 * c-typeck.c (pedwarn_init): Make the function take a variable list.
2962 Call emit_diagnostic_valist instead of pedwarn.
2963 (convert_for_assignment): Unroll the PEDWARN_FOR_ASSIGNMENT macro.
2964 Print the relevant types in diagnostics.
2965
a32c8316
MP
29662017-08-09 Marek Polacek <polacek@redhat.com>
2967
2968 PR c/81417
2969 * c-array-notation.c (fix_builtin_array_notation_fn): Update calls to
ab20d992 2970 build_conditional_expr.
a32c8316
MP
2971 * c-parser.c (c_parser_conditional_expression): Create locations for
2972 EXP1 and EXP2 from their source ranges. Pass the locations down to
2973 build_conditional_expr.
2974 * c-tree.h (build_conditional_expr): Update declaration.
2975 * c-typeck.c (build_conditional_expr): Add location_t parameters.
2976 For -Wsign-compare, also print the types.
2977
314e6352
ML
29782017-08-08 Martin Liska <mliska@suse.cz>
2979
2980 * c-convert.c: Include header files.
2981 * c-typeck.c: Likewise.
2982
577eec56
ML
29832017-08-07 Martin Liska <mliska@suse.cz>
2984
2985 * c-parser.c (c_parser_attributes): Canonicalize name of an
2986 attribute.
2987
f7b6353a
MP
29882017-08-02 Marek Polacek <polacek@redhat.com>
2989
2990 PR c/81289
2991 * c-parser.c (c_parser_unary_expression): Use set_error.
2992
8a6eab34
MP
2993 PR c/81448
2994 PR c/81306
2995 * c-warn.c (warn_for_multistatement_macros): Prevent bogus
2996 warnings. Avoid walking MACRO_MAP_LOCATIONS.
2997
ab20d992 29982017-07-31 Jan Hubicka <hubicka@ucw.cz>
7fef86d3
JH
2999 Martin Liska <mliska@suse.cz>
3000
3001 * c-typeck.c (c_finish_goto_label): Build gimple predict
f7b6353a 3002 statement.
7fef86d3 3003
f34ebeb2
ML
30042017-07-31 Martin Liska <mliska@suse.cz>
3005
3006 PR sanitize/81530
3007 * c-convert.c (convert): Guard condition with flag_sanitize_p
3008 also with current_function_decl non-null equality.
3009 * c-decl.c (grokdeclarator): Likewise.
3010 * c-typeck.c (build_binary_op): Likewise.
3011
8595f67b
MP
30122017-07-25 Marek Polacek <polacek@redhat.com>
3013
3014 * c-decl.c (grokfield): Remove local variable.
3015
d49718d6
MP
30162017-07-25 Marek Polacek <polacek@redhat.com>
3017
3018 PR c/81364
3019 * c-parser.c (c_parser_else_body): Don't warn about multistatement
3020 macro expansion if the body is in { }.
3021 (c_parser_while_statement): Likewise.
3022 (c_parser_for_statement): Likewise.
3023
ff22eb12
NS
30242017-07-18 Nathan Sidwell <nathan@acm.org>
3025
3026 * c-parser.c (c_parser_array_notation): Use TYPE_{MIN,MAX}_VALUE.
3027
eea77d1f
DM
30282017-07-14 David Malcolm <dmalcolm@redhat.com>
3029
3030 * c-decl.c (implicitly_declare): When suggesting a missing
3031 #include, provide a fix-it hint.
3032
b6f43128
DM
30332017-07-06 David Malcolm <dmalcolm@redhat.com>
3034
3035 * c-lang.c (selftest::run_c_tests): Move body to c_family_tests,
3036 and call that instead.
3037 * c-tree.h (selftest::run_c_tests): New decl.
3038
3e2becc4
MP
30392017-06-26 Marek Polacek <polacek@redhat.com>
3040
3041 PR c/80116
3042 * c-parser.c (c_parser_if_body): Set the location of the
3043 body of the conditional after parsing all the labels. Call
3044 warn_for_multistatement_macros.
3045 (c_parser_else_body): Likewise.
3046 (c_parser_switch_statement): Likewise.
3047 (c_parser_while_statement): Likewise.
3048 (c_parser_for_statement): Likewise.
3049 (c_parser_statement): Add a default argument. Save the location
3050 after labels have been parsed.
3051 (c_parser_c99_block_statement): Likewise.
3052
343ae898
RB
30532017-06-19 Richard Biener <rguenther@suse.de>
3054
3055 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
3056 negated _Literals to parse _Literal (int) -1.
3057
45b2222a
ML
30582017-06-13 Martin Liska <mliska@suse.cz>
3059
3060 PR sanitize/78204
3061 * c-convert.c (convert): Use sanitize_flags_p.
3062 * c-decl.c (grokdeclarator): Likewise.
3063 * c-typeck.c (convert_for_assignment): Likewise.
3064 (c_finish_return): Likewise.
3065 (build_binary_op): Likewise.
3066
8ab7005b
JJ
30672017-06-08 Jakub Jelinek <jakub@redhat.com>
3068
3069 PR c/81006
3070 * c-typeck.c (handle_omp_array_sections_1): Convert TYPE_MAX_VALUE
3071 to sizetype before size_binop.
3072
363dc72c
JJ
30732017-06-07 Jakub Jelinek <jakub@redhat.com>
3074
3075 * gimple-parser.c (c_parser_parse_gimple_body): Use TDI_gimple instead
3076 of TDI_generic.
3077
dc949728
MP
30782017-06-06 Marek Polacek <polacek@redhat.com>
3079
3080 PR c/79983
3081 * c-decl.c (start_struct): Use the location of TYPE_STUB_DECL of
3082 ref.
3083 (start_enum): Use the location of TYPE_STUB_DECL of enumtype.
3084
40ffd95f
BE
30852017-06-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
3086
3087 * c-parser.c (c_parser_binary_expression): Implement the
3088 -Wsizeof_pointer_div warning.
3089 (c_parser_postfix_expression): Allow SIZEOF_EXPR as expr.original_code
3090 from a parenthesized expression.
3091 (c_parser_expr_list): Use c_last_sizeof_loc.
3092 * c-tree.h (c_last_sizeof_loc): New external.
3093 * c-typeck.c (c_last_sizeof_loc): New variable.
3094 (c_expr_sizeof_expr, c_expr_sizeof_type): Assign c_last_sizeof_loc.
3095
9fc5e7a4
MM
30962017-05-31 Mikhail Maltsev <maltsevm@gmail.com>
3097
3098 PR testsuite/80580
3099 * gimple-parser.c (c_parser_gimple_if_stmt): Check for empty labels.
3100
f012c8ef
DM
31012017-05-30 David Malcolm <dmalcolm@redhat.com>
3102
3103 * c-objc-common.c (c_tree_printer): Gain bool and const char **
3104 parameters.
3105
3cd211af
MS
31062017-05-24 Martin Sebor <msebor@redhat.com>
3107
3108 PR c/80731
3109 * c-fold.c (c_fully_fold_internal): Adjust.
3110 * c-typeck.c (parser_build_unary_op): Adjust.
3111
fd71a9a2
TS
31122017-05-23 Thomas Schwinge <thomas@codesourcery.com>
3113
3114 * c-parser.c (OACC_KERNELS_CLAUSE_MASK): Add
3115 "PRAGMA_OACC_CLAUSE_NUM_GANGS", "PRAGMA_OACC_CLAUSE_NUM_WORKERS",
3116 "VECTOR_LENGTH".
3117
92fa0f9e
MP
31182017-05-23 Marek Polacek <polacek@redhat.com>
3119
3120 * c-parser.c (c_parser_compound_statement_nostart): Remove redundant
3121 quotes.
3122
d11c168a
JJ
31232017-05-22 Jakub Jelinek <jakub@redhat.com>
3124
3125 * c-fold.c (c_fully_fold_internal): Save the c_fully_fold_internal
3126 result for SAVE_EXPR operand and set SAVE_EXPR_FOLDED_P even if
3127 it returned invariant. Call tree_invariant_p unconditionally
3128 afterwards to decide whether to return expr or op0.
3129
58aca9d9
NS
31302017-05-22 Nathan Sidwell <nathan@acm.org>
3131
3132 * c-decl.c (c_parse_final_cleanups): Drop TDI_tu handling.
3133
7fd549d2
TS
31342017-05-19 Thomas Schwinge <thomas@codesourcery.com>
3135
3136 * c-parser.c (c_parser_omp_clause_default): Handle
3137 "OMP_CLAUSE_DEFAULT_PRESENT".
3138
6ecd2339
BE
31392017-05-18 Bernd Edlinger <bernd.edlinger@hotmail.de>
3140
3141 * config-lang.in (gtfiles): Add c-family/c-format.c.
3142
8a57ecff
NS
31432017-05-18 Nathan Sidwell <nathan@acm.org>
3144
3145 * c-decl.c (pushdecl_top_level): Delete unused function.
3146
6574d78e
MP
31472017-05-18 Marek Polacek <polacek@redhat.com>
3148
3149 * c-decl.c (match_builtin_function_types): Use NULL_TREE instead of 0.
3150 (check_earlier_gotos): Likewise.
3151 (define_label): Likewise.
3152 (pending_xref_error): Likewise.
3153 (smallest_type_quals_location): Likewise.
3154 (grokdeclarator): Likewise.
3155 (grokparms): Likewise.
3156 (identifier_global_value): Likewise.
3157 * c-typeck.c (set_nonincremental_init_from_string): Likewise.
3158 (find_init_member): Likewise.
3159
e3455240
MP
31602017-05-18 Marek Polacek <polacek@redhat.com>
3161
3162 * c-decl.c (start_decl): Use false/true instead of 0/1.
3163 (grokdeclarator): Likewise.
3164 (finish_struct): Likewise.
3165 (start_function): Change the return type to bool. Use false/true
3166 instead of 0/1.
3167 (declspecs_add_qual): Use UNKNOWN_LOCATION instead of 0.
3168 * c-tree.h (start_function): Update.
3169 * c-typeck.c (same_translation_unit_p): Change the return type to bool.
3170 (set_designator): Change the return type to bool. Use false/true
3171 instead of 0/1.
3172
3fa8871b
MP
31732017-05-17 Marek Polacek <polacek@redhat.com>
3174
3175 * c-decl.c: Use NULL_TREE instead of 0 where appropriate.
3176 * c-typeck.c: Likewise.
3177
142473df
MP
31782017-05-17 Marek Polacek <polacek@redhat.com>
3179
3180 PR sanitizer/80659
3181 * c-decl.c (build_compound_literal): Set DECL_ARTIFICIAL and
3182 DECL_IGNORED_P even for non-static compound literals.
3183
1a817418
ML
31842017-05-17 Martin Liska <mliska@suse.cz>
3185
3186 * c-decl.c (c_parse_final_cleanups): Introduce dump_flags_t type and
3187 use it instead of int type.
3188
b2fa0a8b
MP
31892017-05-17 Marek Polacek <polacek@redhat.com>
3190
3191 * c-convert.c (convert): Replace c_save_expr with save_expr. Don't
3192 call c_fully_fold.
3193 (convert) <case COMPLEX_TYPE>: Remove special handling of COMPLEX_TYPEs.
ab20d992 3194 * c-decl.c (grokdeclarator): Replace c_save_expr with save_expr.
b2fa0a8b
MP
3195 * c-fold.c (c_fully_fold_internal): Handle SAVE_EXPR.
3196 * c-parser.c (c_parser_declaration_or_fndef): Replace c_save_expr with
3197 save_expr.
3198 (c_parser_conditional_expression): Likewise.
3199 * c-tree.h (SAVE_EXPR_FOLDED_P): Define.
3200 * c-typeck.c (build_modify_expr): Replace c_save_expr with save_expr.
3201 (process_init_element): Likewise.
3202 (build_binary_op): Likewise.
3203 (handle_omp_array_sections_1): Likewise.
3204
1e47f02b
TS
32052017-05-12 Thomas Schwinge <thomas@codesourcery.com>
3206
3207 * c-parser.c (c_parser_omp_clause_num_gangs)
3208 (c_parser_omp_clause_num_workers)
3209 (c_parser_omp_clause_vector_length): Merge functions into...
3210 (c_parser_oacc_single_int_clause): ... this new function. Adjust
3211 all users.
3212
c24e924f
NS
32132017-05-11 Nathan Sidwell <nathan@acm.org>
3214
3215 * gimple-parser.c: Don't #include tree-dump.h.
3216
c587104e
MM
32172017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
3218
3219 PR testsuite/80580
3220 * gimple-parser.c (c_parser_parse_ssa_name): Validate SSA name base.
3221
67ac9a9d
MM
32222017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
3223
3224 PR testsuite/80580
3225 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
3226 incorrect __MEM syntax.
3227
ac4eb40f
MM
32282017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
3229
3230 PR testsuite/80580
3231 * gimple-parser.c (c_parser_gimple_unary_expression): Check argument
3232 type of unary '*'.
3233
641da50a
NS
32342017-05-09 Nathan Sidwell <nathan@acm.org>
3235
3236 * c-tree.h (pushdecl): Declare.
3237
56d35585
DM
32382017-05-05 David Malcolm <dmalcolm@redhat.com>
3239
3240 * c-decl.c (warn_defaults_to): Replace report_diagnostic
3241 with diagnostic_report_diagnostic.
3242 * c-errors.c (pedwarn_c99): Likewise.
3243 (pedwarn_c90): Likewise.
3244
815d9cc6
XR
32452017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn>
3246
92a285c1 3247 PR c++/80038
815d9cc6
XR
3248 * c-gimplify.c (c_gimplify_expr): Remove calls to
3249 cilk_gimplifY_call_params_in_spawned_fn.
3250
1c4ea66f
DM
32512017-04-25 David Malcolm <dmalcolm@redhat.com>
3252
3253 * c-parser.c (c_parser_struct_or_union_specifier): Add fix-it
3254 hint for removing extra semicolon.
3255
666f7903
JJ
32562017-04-21 Jakub Jelinek <jakub@redhat.com>
3257
3258 PR c/80468
3259 * c-decl.c (finish_declspecs) <case cts_int_n>: If int_n_idx is not
3260 enabled, set specs->type to integer_type_node.
3261
5764ee3c
JW
32622017-04-03 Jonathan Wakely <jwakely@redhat.com>
3263
3264 * c-array-notation.c: Fix typo in comment.
3265
10fa8dfb
MP
32662017-03-29 Marek Polacek <polacek@redhat.com>
3267
3268 PR c/79730
3269 * c-decl.c (finish_decl): Check VAR_P.
3270
a9e4a1a5
JJ
32712017-03-27 Jakub Jelinek <jakub@redhat.com>
3272
3273 PR middle-end/80162
3274 * c-tree.h (c_mark_addressable): Add array_ref_p argument.
3275 * c-typeck.c (c_mark_addressable): Likewise. Look through
3276 VIEW_CONVERT_EXPR unless array_ref_p and VCE is from VECTOR_TYPE
3277 to ARRAY_TYPE.
3278 (build_array_ref): Pass true as array_ref_p to c_mark_addressable.
3279
ee3ff394
MP
32802017-03-23 Marek Polacek <polacek@redhat.com>
3281
3282 * c-tree.h: Remove a C_RID_YYCODE reference.
3283
4d1b8e70
JJ
32842017-03-21 Jakub Jelinek <jakub@redhat.com>
3285
3286 PR c/80097
3287 * c-typeck.c (build_binary_op): Add EXCESS_PRECISION_EXPR only around
3288 optional COMPOUND_EXPR with ubsan instrumentation.
3289
31dc71a8
MP
32902017-03-17 Marek Polacek <polacek@redhat.com>
3291
3292 * c-parser.c: Add C11 references.
3293
d579c385
MP
32942017-03-15 Marek Polacek <polacek@redhat.com>
3295
3296 * c-parser.c (c_parser_enum_specifier): Remove redundant line.
3297
85059a38
MP
32982017-03-11 Marek Polacek <polacek@redhat.com>
3299
3300 * c-decl.c (implicit_decl_warning): Add a comment. Fix formatting.
3301
2f6f187a
DM
33022017-03-10 David Malcolm <dmalcolm@redhat.com>
3303
3304 PR translation/79848
3305 * c-decl.c (declspecs_add_type): Simplify uses of "%<%s%>" to
3306 "%qs".
3307 * c-parser.c (c_parser_oacc_shape_clause): Likewise.
3308
36618428
MP
33092017-03-09 Marek Polacek <polacek@redhat.com>
3310
3311 PR sanitizer/79757
3312 * c-parser.c (c_parser_declaration_or_fndef): Don't sanitize old-style
3313 parameter declarations with initializers.
3314
01e5af5a
JJ
33152017-03-09 Jakub Jelinek <jakub@redhat.com>
3316
3317 PR c/79969
3318 * c-decl.c (start_enum): Adjust DECL_SOURCE_LOCATION of
3319 TYPE_STUB_DECL.
3320
a71dbc63
JJ
33212017-03-07 Jakub Jelinek <jakub@redhat.com>
3322
3323 PR c/79834
3324 * c-parser.c (c_parser_pragma): Use error_at instead of c_parser_error
3325 for "may only be used in compound statements" diagnostics, change it
3326 such that the same translatable string is used for all pragmas. For
3327 PRAGMA_OACC_WAIT use "acc wait" rather than "acc enter data" in the
3328 diagnostics.
3329 (c_parser_omp_cancellation_point, c_parser_omp_target_update,
3330 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Change
3331 "may only be used in compound statements" diagnostics, such that the
3332 same translatable string is used for all pragmas.
3333
1ff4bae6
MP
33342017-03-04 Marek Polacek <polacek@redhat.com>
3335
3336 PR c/79847
3337 * c-decl.c (implicit_decl_warning): Add missing space.
3338
7f5a7d78
MP
33392017-03-03 Marek Polacek <polacek@redhat.com>
3340
3341 PR c/79758
3342 * c-decl.c (store_parm_decls_oldstyle): Check if the element of
3343 current_function_prototype_arg_types is error_mark_node. Fix
3344 formatting. Use TREE_VALUE instead of TREE_TYPE.
3345
883c8f06
JJ
33462017-03-03 Jakub Jelinek <jakub@redhat.com>
3347
79c9b7a8
JJ
3348 PR c/79837
3349 * c-parser.c (c_parser_omp_clause_reduction): Don't mention
3350 %<min%> or %<max%> in the diagnostics, instead mention identifier.
3351 (c_parser_omp_declare_reduction): Don't mention %<min%> in the
3352 diagnostics.
3353
883c8f06
JJ
3354 PR c/79836
3355 * c-parser.c (c_parser_generic_selection): Use %<_Generic%>
3356 instead of %<_Generic>.
3357 (c_parser_omp_ordered): Use %<depend%> instead of %<depend>.
3358 (c_parser_omp_target_exit_data): Use %<release%> instead of
3359 %<release>.
3360
324ff1a0
JJ
33612017-02-28 Jakub Jelinek <jakub@redhat.com>
3362
3363 * c-parser.c (c_parser_asm_statement): Use cond ? G_("...") : G_("...")
3364 instead of just cond ? "..." : "...".
3365 (c_parser_oacc_enter_exit_data): Use %s and ternary operator only
3366 for "enter"/"exit" keyword.
3367 (c_finish_oacc_routine): Don't use %s to supply portions of the
3368 message.
3369
4227c9ad
JJ
33702017-02-24 Jakub Jelinek <jakub@redhat.com>
3371
3372 PR c++/79588
3373 * c-parser.c (c_parser_postfix_expression_after_primary): Don't
3374 handle -Wrestrict here.
3375 * c-typeck.c (build_function_call_vec): Adjust
3376 check_function_arguments caller.
3377
5d972e66
RB
33782017-02-23 Richard Biener <rguenther@suse.de>
3379
3380 PR c/79684
3381 * gimple-parser.c (c_parser_gimple_statement): Use set_error
3382 to initialize c_exprs to return.
3383 (c_parser_gimple_binary_expression): Likewise.
3384 (c_parser_gimple_unary_expression): Likewise.
3385 (c_parser_gimple_postfix_expression): Likewise.
3386
61ac5ebe
MP
33872017-02-22 Marek Polacek <polacek@redhat.com>
3388
3389 PR c/79662
3390 * c-typeck.c (convert_arguments): Handle error_mark_node.
3391
41d1b0b1
PK
33922017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3393
3394 * gimple-parser.c (c_parser_gimple_postfix_expression): Check return
3395 value of c_parser_parse_ssa_name against error_mark_node and emit
3396 error if ssa name is anonymous and written as default definition.
3397
eab1f169
PK
33982017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3399
3400 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
3401 FMA_EXPR.
3402
bcac0b4d
JJ
34032017-02-16 Jakub Jelinek <jakub@redhat.com>
3404
3405 PR c++/79512
3406 * c-parser.c (c_parser_omp_target): For -fopenmp-simd
3407 ignore #pragma omp target even when not followed by identifier.
3408
1be33173
PK
34092017-02-14 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3410
3411 * gimpler-parser.c (c_parser_gimple_statement): Handle ABS_EXPR.
3412 (c_parser_gimple_unary_expression): Likewise.
3413
aa326bfb
JJ
34142017-02-13 Jakub Jelinek <jakub@redhat.com>
3415
3416 * c-parser.c (c_parser_oacc_declare): Add missing space in
3417 diagnostics.
3418
8a398bc5
PK
34192017-02-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3420
3421 PR c/79478
3422 * gimple-parser.c (c_parser_gimple_postfix_expression): Call
3423 set_c_expr_source_range when parsing ssa-name.
3424
3dcde5ef 34252017-02-10 Prasad Ghangal <prasad.ghangal@gmail.com>
ab20d992 3426 Richard Biener <rguenther@suse.de>
3dcde5ef
PG
3427
3428 * gimple-parser.c (c_parser_gimple_binary_expression): Avoid
3429 building IL when arguments are error_mark_node.
3430 (c_parser_gimple_unary_expression): Likewise.
3431 (c_parser_gimple_if_stmt): Likewise.
3432 (c_parser_gimple_switch_stmt): Likewise.
3433 (c_parser_gimple_return_stmt): Likewise.
3434 (c_parser_parse_ssa_name): When name lookup fails do not build
3435 an SSA name. Use undeclared rather than not declared in error
3436 reporting.
3437
192b048b
MP
34382017-02-09 Marek Polacek <polacek@redhat.com>
3439
3440 PR c/79428
3441 * c-parser.c (c_parser_omp_ordered): Call c_parser_skip_to_pragma_eol
3442 instead of c_parser_skip_until_found.
3443
56f71478
JJ
34442017-02-09 Jakub Jelinek <jakub@redhat.com>
3445
3446 PR c/79431
3447 * c-parser.c (c_parser_omp_declare_target): Don't invoke
3448 symtab_node::get on automatic variables.
3449
02889d23
CLT
34502016-02-09 Nathan Sidwell <nathan@codesourcery.com>
3451 Chung-Lin Tang <cltang@codesourcery.com>
3452
3453 * c-parser.c (c_parser_omp_clause_collapse): Disallow tile.
3454 (c_parser_oacc_clause_tile): Disallow collapse. Fix parsing and
3455 semantic checking.
3456 * c-parser.c (c_parser_omp_for_loop): Accept tiling constructs.
3457
7af4b20d
RB
34582017-02-07 Richard Biener <rguenther@suse.de>
3459
3460 * gimple-parser.c (c_parser_gimple_expr_list): Simplify.
3461 (c_parser_gimple_postfix_expression_after_primary):
3462 Do not use c_build_function_call_vec to avoid folding and promotion.
3463 Simplify.
3464
e5e391d6
MO
34652017-01-25 Maxim Ostapenko <m.ostapenko@samsung.com>
3466
3467 PR lto/79061
3468 * c-decl.c (pop_scope): Pass main_input_filename to
3469 build_translation_unit_decl.
3470
c2e84327
DM
34712017-01-24 David Malcolm <dmalcolm@redhat.com>
3472
3473 * c-parser.c: Include "read-rtl-function.h" and
3474 "run-rtl-passes.h".
3475 (c_parser_declaration_or_fndef): Rename "gimple-pass-list" in
3476 grammar to gimple-or-rtl-pass-list. Add rtl-function-definition
3477 production. Update for renaming of field "gimple_pass" to
3478 "gimple_or_rtl_pass". If __RTL was seen, call
3479 c_parser_parse_rtl_body. Convert a timevar_push/pop pair
3480 to an auto_timevar, to cope with early exit.
3481 (c_parser_declspecs): Update RID_GIMPLE handling for renaming of
3482 field "gimple_pass" to "gimple_or_rtl_pass", and for renaming of
3483 c_parser_gimple_pass_list to c_parser_gimple_or_rtl_pass_list.
3484 Handle RID_RTL.
3485 (c_parser_parse_rtl_body): New function.
3486 * c-tree.h (enum c_declspec_word): Add cdw_rtl.
3487 (struct c_declspecs): Rename field "gimple_pass" to
3488 "gimple_or_rtl_pass". Add field "rtl_p".
3489 * gimple-parser.c (c_parser_gimple_pass_list): Rename to...
3490 (c_parser_gimple_or_rtl_pass_list): ...this, updating accordingly.
3491 * gimple-parser.h (c_parser_gimple_pass_list): Rename to...
3492 (c_parser_gimple_or_rtl_pass_list): ...this.
3493
2ebd93e1
MP
34942017-01-20 Marek Polacek <polacek@redhat.com>
3495
3496 PR c/64279
3497 * c-typeck.c (build_conditional_expr): Warn about duplicated branches.
3498
b1c95bb5
RB
34992017-01-13 Richard Biener <rguenther@suse.de>
3500
3501 * gimple-parser.c (c_parser_gimple_compound_statement): Handle
3502 nops.
3503
25329913
RB
35042017-01-13 Richard Biener <rguenther@suse.de>
3505
3506 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
3507 _Literal ( type-name ) number.
3508
6bb4ea5c
RB
35092017-01-12 Richard Biener <rguenther@suse.de>
3510
3511 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
3512 __MEM.
3513
6b5b4e9c
JJ
35142017-01-11 Jakub Jelinek <jakub@redhat.com>
3515
3516 PR c++/72813
3517 * c-decl.c (pop_file_scope): Set flag_syntax_only to 1 after writing
3518 PCH file.
3519
e3252775
RB
35202017-01-11 Richard Biener <rguenther@suse.de>
3521
3522 PR bootstrap/79052
3523 * gimple-parser.c (c_parser_gimple_switch_stmt): Add missing
3524 returns on parse errors.
3525
a9342885
MP
35262017-01-04 Marek Polacek <polacek@redhat.com>
3527
3528 PR c++/64767
3529 * c-parser.c (c_parser_postfix_expression): Mark zero character
3530 constants by setting original_type in c_expr.
3531 * c-typeck.c (parser_build_binary_op): Warn when a pointer is compared
3532 with a zero character constant.
3533 (char_type_p): New function.
3534
5dd9a9d0
DM
35352017-01-04 David Malcolm <dmalcolm@redhat.com>
3536
3537 * c-parser.c (c_parser_declaration_or_fndef): Create a
3538 rich_location at init_loc and parse it to start_init.
3539 (last_init_list_comma): New global.
3540 (c_parser_braced_init): Update last_init_list_comma when parsing
3541 commas. Pass it to pop_init_level. Pass location of closing
3542 brace to pop_init_level.
3543 (c_parser_postfix_expression_after_paren_type): Create a
3544 rich_location at type_loc and parse it to start_init.
3545 (c_parser_omp_declare_reduction): Likewise for loc.
3546 * c-tree.h (start_init): Add rich_location * param.
3547 (pop_init_level): Add location_t param.
3548 * c-typeck.c (struct initializer_stack): Add field
3549 "missing_brace_richloc".
3550 (start_init): Add richloc param, use it to initialize
3551 the stack node's missing_brace_richloc.
3552 (last_init_list_comma): New decl.
3553 (finish_implicit_inits): Pass last_init_list_comma to
3554 pop_init_level.
3555 (push_init_level): When finding missing open braces, add fix-it
3556 hints to the richloc.
3557 (pop_init_level): Add "insert_before" param and pass it
3558 when calling pop_init_level. Add fixits about missing
3559 close braces to any richloc. Use the richloc for the
3560 -Wmissing-braces warning.
3561 (set_designator): Pass last_init_list_comma to pop_init_level.
3562 (process_init_element): Likewise.
3563
cbe34bb5
JJ
35642017-01-01 Jakub Jelinek <jakub@redhat.com>
3565
3566 Update copyright years.
3567
d17680f3
JJ
35682016-12-21 Jakub Jelinek <jakub@redhat.com>
3569
0dba7960
JJ
3570 PR bootstrap/78817
3571 * c-typeck.c (build_function_call_vec): If check_function_arguments
3572 returns true, set TREE_NO_WARNING on CALL_EXPR.
3573
d17680f3
JJ
3574 PR c/77767
3575 * c-decl.c (grokdeclarator): If *expr is non-NULL, append expression
3576 to *expr instead of overwriting it.
3577
aa90531e
RB
35782016-12-20 Richard Biener <rguenther@suse.de>
3579
3580 * gimple-parser.c (c_parser_gimple_compound_statement): Improve
3581 error recovery.
3582 (c_parser_gimple_statement): Only build assigns for non-error
3583 stmts.
3584 (c_parser_gimple_postfix_expression_after): Improve error recovery.
3585
629b3d75
MJ
35862016-12-14 Martin Jambor <mjambor@suse.cz>
3587
3588 * c-parser.c: Include omp-general.h and omp-offload.h instead of
3589 omp-low.h.
3590 (c_finish_oacc_routine): Adjusted call to
3591 get_oacc_fn_attrib, build_oacc_routine_dims and replace_oacc_fn_attrib
3592 to use their new names.
3593 (c_parser_oacc_enter_exit_data): Adjusted call to find_omp_clause to
3594 use its new name.
3595 (c_parser_oacc_update): Likewise.
3596 (c_parser_omp_simd): Likewise.
3597 (c_parser_omp_target_update): Likewise.
3598 * c-typeck.c: Include omp-general.h instead of omp-low.h.
3599 (c_finish_omp_cancel): Adjusted call to find_omp_clause to use its new
3600 name.
3601 (c_finish_omp_cancellation_point): Likewise.
3602 * gimple-parser.c: Do not include omp-low.h
3603
c5af52eb
CP
36042016-12-02 Cesar Philippidis <cesar@codesourcery.com>
3605 James Norris <jnorris@codesourcery.com>
3606
3607 * c-parser.c (c_parser_pragma): Error when PRAGMA_OACC_{ENTER_DATA,
3608 EXIT_DATA,WAIT} are not used in compound statements.
3609 (c_parser_oacc_enter_exit_data): Update diagnostics.
3610
48330c93
BE
36112016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
3612
3613 PR c++/71973
3614 * c-decl.c (diagnose_mismatched_decls): Use
3615 OPT_Wbuiltin_declaration_mismatch here too.
3616
899ca90e 36172016-11-18 Richard Sandiford <richard.sandiford@arm.com>
48330c93
BE
3618 Alan Hayward <alan.hayward@arm.com>
3619 David Sherwood <david.sherwood@arm.com>
899ca90e
RS
3620
3621 * c-decl.c (merge_decls): Use SET_DECL_MODE.
3622 (make_label, finish_struct): Likewise.
3623
1ee62b92 36242016-11-14 Prasad Ghangal <prasad.ghangal@gmail.com>
8e745a17 3625 Richard Biener <rguenther@suse.de>
22b15758 3626
8e745a17
JJ
3627 * Make-lang.in (C_AND_OBJC_OBJS): Add gimple-parser.o.
3628 * config-lang.in (gtfiles): Add c/c-parser.h.
3629 * c-tree.h (enum c_declspec_word): Add cdw_gimple.
3630 (struct c_declspecs): Add gimple_pass member and gimple_p flag.
3631 * c-parser.c (enum c_id_kind, struct c_token,
3632 c_parser_next_token_is, c_parser_next_token_is_not,
3633 c_parser_next_token_is_keyword,
3634 enum c_lookahead_kind, enum c_dtr_syn, enum c_parser_prec):
3635 Split out to ...
3636 * c-parser.h: ... new header.
3637 * c-parser.c: Include c-parser.h and gimple-parser.h.
1ee62b92 3638 (c_parser_peek_token, c_parser_peek_2nd_token,
8e745a17
JJ
3639 c_token_starts_typename, c_parser_next_token_starts_declspecs,
3640 c_parser_next_tokens_start_declaration, c_parser_consume_token,
3641 c_parser_error, c_parser_require, c_parser_skip_until_found,
3642 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
3643 c_parser_type_name): Export.
3644 (c_parser_tokens_buf): New function.
3645 (c_parser_error): Likewise.
3646 (c_parser_set_error): Likewise.
3647 (c_parser_declspecs): Handle RID_GIMPLE.
1ee62b92
PG
3648 (c_parser_declaration_or_fndef): Parse __GIMPLE marked body
3649 via c_parser_parse_gimple_body.
8e745a17
JJ
3650 * c-parser.h (c_parser_peek_token, c_parser_peek_2nd_token,
3651 c_token_starts_typename, c_parser_next_token_starts_declspecs,
3652 c_parser_next_tokens_start_declaration, c_parser_consume_token,
3653 c_parser_error, c_parser_require, c_parser_skip_until_found,
3654 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
3655 c_parser_type_name): Declare.
1ee62b92
PG
3656 (struct c_parser): Declare forward.
3657 (c_parser_tokens_buf): Declare.
8e745a17
JJ
3658 (c_parser_error): Likewise.
3659 (c_parser_set_error): Likewise.
3660 * gimple-parser.c: New file.
3661 * gimple-parser.h: Likewise.
1ee62b92 3662
22b15758
UB
36632016-11-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3664
3665 PR c/35503
3666 * c-parser.c (c_parser_postfix_expression_after_primary): Call
3667 warn_for_restrict.
3668
84ff4775
LCW
36692016-09-11 Le-Chun Wu <lcwu@google.com>
3670 Mark Wielaard <mjw@redhat.com>
3671
3672 * c-decl.c (warn_if_shadowing): Use the warning code corresponding
3673 to the given -Wshadow= variant.
3674
4d0cdd0c
TP
36752016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
3676
3677 * c-typeck.c: Include memmodel.h.
3678
1202f33e
JJ
36792016-10-13 Jakub Jelinek <jakub@redhat.com>
3680
3681 PR target/77957
3682 * c-objc-common.h (LANG_HOOKS_GETDECLS): Use hook_tree_void_null
3683 instead of lhd_return_null_tree_v.
3684
8a14afd0
BS
36852016-10-07 Bernd Schmidt <bschmidt@redhat.com>
3686
3687 PR c++/69733
3688 * c-decl.c (smallest_type_quals_location): New static function.
3689 (grokdeclarator): Try to find the correct location for an ignored
3690 qualifier.
3691
81fea426
MP
36922016-09-26 Marek Polacek <polacek@redhat.com>
3693
3694 PR c/7652
3695 * c-decl.c (pop_scope): Add gcc_fallthrough.
3696
36972016-09-26 Marek Polacek <polacek@redhat.com>
3698
3699 PR c/7652
3700 * c-parser.c (struct c_token): Add flags field.
3701 (c_lex_one_token): Pass it to c_lex_with_flags.
3702 (c_parser_declaration_or_fndef): Turn __attribute__((fallthrough));
3703 into IFN_FALLTHROUGH.
3704 (c_parser_label): Set FALLTHROUGH_LABEL_P on labels. Handle
3705 attribute fallthrough after a case label or default label.
3706 (c_parser_statement_after_labels): Handle RID_ATTRIBUTE.
3707
9a2300e9
MP
37082016-09-24 Marek Polacek <polacek@redhat.com>
3709
3710 PR c/77490
3711 * c-typeck.c (build_unary_op): Warn about bit not on expressions that
3712 have boolean value. Warn about ++/-- on booleans.
3713
7de76362
JJ
37142016-09-23 Jakub Jelinek <jakub@redhat.com>
3715
3716 * c-parser.c (incomplete_record_decls): Remove unnecessary
3717 = vNULL initialization of file scope vec.
3718
5b73d2ab
MP
37192016-09-16 Marek Polacek <polacek@redhat.com>
3720
3721 * c-typeck.c (lvalue_p): Use true and false instead of 1 and 0.
3722
e51fbec3
MP
37232016-09-14 Marek Polacek <polacek@redhat.com>
3724
3725 * c-array-notation.c (create_cmp_incr): Use false instead of 0.
3726 (fix_array_notation_expr): Likewise.
3727 * c-decl.c (finish_decl): Likewise.
3728 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
3729 * c-typeck.c (array_to_pointer_conversion): Use true instead of 1.
3730 (function_to_pointer_conversion): Use false instead of 0.
3731 (convert_lvalue_to_rvalue): Likewise.
3732 (parser_build_unary_op): Likewise.
3733 (build_atomic_assign): Likewise.
3734 (build_unary_op): Change nonconvert parameter type to bool, use
3735 true/false instead of 1/0.
3736 (build_binary_op): Use true instead of 1.
3737
254830ba
DM
37382016-09-13 David Malcolm <dmalcolm@redhat.com>
3739
3740 * c-parser.c (c_parser_declaration_or_fndef): Update for renaming
3741 of add_fixit_insert to add_fixit_insert_before.
3742
4c13ba17
MP
37432016-09-13 Marek Polacek <polacek@redhat.com>
3744
3745 * c-typeck.c (build_unary_op): Rename FLAG parameter to NOCONVERT. Use
3746 it.
3747
54dcdb88
BE
37482016-09-12 Bernd Edlinger <bernd.edlinger@hotmail.de>
3749
3750 PR c++/77496
3751 * c-parser.c (c_parser_conditional_expression): Pass the rightmost
3752 COMPOUND_EXPR to warn_for_omitted_condop.
3753
e5106e27
DM
37542016-09-07 David Malcolm <dmalcolm@redhat.com>
3755
3756 * c-lang.c (LANG_HOOKS_GET_SUBSTRING_LOCATION): Use
3757 c_get_substring_location for this new langhook.
3758
9dc5773f
JJ
37592016-09-02 Jakub Jelinek <jakub@redhat.com>
3760
3761 PR c/65467
3762 * c-parser.c (c_parser_declspecs): Don't sorry about _Atomic if
3763 flag_openmp.
3764 (c_parser_omp_variable_list): Use convert_lvalue_to_rvalue
3765 instead of mark_exp_read on low_bound/length expression.
3766 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_threads,
3767 c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
3768 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
3769 c_parser_omp_clause_num_workers, c_parser_oacc_shape_clause,
3770 c_parser_oacc_clause_tile, c_parser_omp_clause_schedule,
3771 c_parser_omp_clause_vector_length, c_parser_omp_clause_num_teams,
3772 c_parser_omp_clause_thread_limit, c_parser_omp_clause_aligned,
3773 c_parser_omp_clause_linear, c_parser_omp_clause_safelen,
3774 c_parser_omp_clause_simdlen, c_parser_omp_clause_device,
3775 c_parser_omp_clause_dist_schedule): Use convert_lvalue_to_rvalue
3776 instead of mark_expr_read.
3777 (c_parser_omp_declare_reduction): Reject _Atomic qualified types.
3778 * c-objc-common.h (LANG_HOOKS_OMP_CLAUSE_COPY_CTOR,
3779 LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP): Redefine.
3780 * c-tree.h (c_omp_clause_copy_ctor): New prototype.
3781 * c-typeck.c (handle_omp_array_sections_1): Diagnose _Atomic qualified
3782 array section bases outside of depend clause, for depend clause
3783 use convert_lvalue_to_rvalue on the base.
3784 (c_finish_omp_clauses): Reject _Atomic qualified vars in reduction,
3785 linear, aligned, map, to and from clauses.
3786 (c_omp_clause_copy_ctor): New function.
3787
295844f6
MP
37882016-09-01 Marek Polacek <polacek@redhat.com>
3789
3790 PR c/7652
3791 * c-typeck.c (composite_type): Add FALLTHRU comment.
3792
089af25c
DM
37932016-08-31 David Malcolm <dmalcolm@redhat.com>
3794
3795 * c-parser.c (c_parser_declaration_or_fndef): Add trailing space
3796 to the insertion fixits for "struct", "union", and "enum".
3797
f9087798
DM
37982016-08-30 David Malcolm <dmalcolm@redhat.com>
3799
3800 * c-decl.c (implicit_decl_warning): Use add_fixit_replace
3801 rather than add_fixit_misspelled_id.
3802 (undeclared_variable): Likewise.
3803 * c-parser.c (c_parser_declaration_or_fndef): Likewise. Remove
3804 now-redundant "here" params from add_fixit_insert method calls.
3805 (c_parser_parameter_declaration): Likewise.
3806 * c-typeck.c (build_component_ref): Remove now-redundant range
3807 param from add_fixit_replace method calls.
3808
ebef225f
MP
38092016-08-25 Marek Polacek <polacek@redhat.com>
3810
3811 * c-typeck.c (parser_build_binary_op): Pass LHS to
3812 warn_logical_not_parentheses.
3813
fe377a48
MP
38142016-08-25 Marek Polacek <polacek@redhat.com>
3815
3816 PR c/77323
3817 * c-decl.c (declspecs_add_type): Set typespec_word even when __intN
3818 or _FloatN or _FloatNx is not supported.
3819 (finish_declspecs): Set type to integer_type_node when _FloatN or
3820 _FloatNx is not supported.
3821
c65699ef
JM
38222016-08-19 Joseph Myers <joseph@codesourcery.com>
3823
3824 PR c/32187
3825 * c-tree.h (cts_floatn_nx): New enum c_typespec_keyword value.
3826 (struct c_declspecs): Add field floatn_nx_idx.
3827 * c-decl.c (declspecs_add_type, finish_declspecs): Handle _FloatN
3828 and _FloatNx type specifiers.
3829 * c-parser.c (c_keyword_starts_typename, c_token_starts_declspecs)
3830 (c_parser_declspecs, c_parser_attribute_any_word)
3831 (c_parser_objc_selector): Use CASE_RID_FLOATN_NX.
3832 * c-typeck.c (c_common_type): Handle _FloatN and _FloatNx types.
3833 (convert_arguments): Avoid promoting _FloatN and _FloatNx types
3834 narrower than double.
3835
2f1364c2
JJ
38362016-08-12 Jakub Jelinek <jakub@redhat.com>
3837 Martin Liska <mliska@suse.cz>
3838
3839 PR c/67410
3840 * c-typeck.c (set_nonincremental_init_from_string): Use / instead of
3841 % to determine val element to change. Assert that
3842 wchar_bytes * charwidth fits into val array.
3843
191816a3
MP
38442016-08-12 Marek Polacek <polacek@redhat.com>
3845
3846 PR c/7652
3847 * c-parser.c (c_parser_external_declaration): Add FALLTHRU.
3848 (c_parser_postfix_expression): Likewise.
3849 * c-typeck.c (build_unary_op): Adjust fall through comment.
3850 (c_mark_addressable): Likewise.
3851
b95a64bb
JJ
38522016-08-11 Jakub Jelinek <jakub@redhat.com>
3853
3854 PR c/72816
3855 * c-decl.c (grokdeclarator): When adding TYPE_DOMAIN for flexible
3856 array member through typedef, for orig_qual_indirect == 0 clear
3857 orig_qual_type.
3858
895aa8e1
DM
38592016-08-08 David Malcolm <dmalcolm@redhat.com>
3860
3861 PR c/64955
3862 * c-lang.c (LANG_HOOKS_RUN_LANG_SELFTESTS): If CHECKING_P, wire
3863 this up to selftest::run_c_tests.
3864 (selftest::run_c_tests): New function.
3865
0b212d8c
TS
38662016-08-04 Thomas Schwinge <thomas@codesourcery.com>
3867
ae9281fc
TS
3868 * c-parser.c (struct oacc_routine_data): Add error_seen and
3869 fndecl_seen members.
3870 (c_finish_oacc_routine): Use these.
3871 (c_parser_declaration_or_fndef): Adjust.
3872 (c_parser_oacc_routine): Likewise. Support more C language
3873 constructs, and improve diagnostics. Move pragma context
3874 checking...
3875 (c_parser_pragma): ... here.
3876
0b212d8c
TS
3877 * c-parser.c (struct oacc_routine_data): New.
3878 (c_parser_declaration_or_fndef, c_parser_oacc_routine): Use it.
3879 Simplify code.
3880 (c_finish_oacc_routine): Likewise. Don't attach clauses to "omp
3881 declare target" attribute.
3882
76e2c821
JB
38832016-08-01 Jan Beulich <jbeulich@suse.com>
3884
3885 * c-fold.c (c_fully_fold_internal): Also emit shift count
3886 warnings for vector types.
3887 * c-typeck.c (build_binary_op): Likewise.
3888
f618a472
MP
38892016-07-29 Marek Polacek <polacek@redhat.com>
3890
3891 PR c/71742
3892 * c-decl.c (finish_struct): Rephrase an error message.
3893
efd0786f
MP
3894 PR c/71853
3895 * c-parser.c (c_parser_switch_statement): Initialize ce.original_type
3896 to error node for invalid code.
3897
e00dceaf
MP
3898 PR c/71573
3899 * c-decl.c (implicitly_declare): Return decl early not only for
3900 error_mark_nodes, but for anything that is not a FUNCTION_DECL.
3901
673a107a
JJ
39022016-07-29 Jakub Jelinek <jakub@redhat.com>
3903
3904 PR c/71969
3905 * c-decl.c (finish_function): Only set DECL_DISREGARD_INLINE_LIMITS
3906 on GNU extern inline functions.
3907
a5b5c8b6
MP
39082016-07-29 Marek Polacek <polacek@redhat.com>
3909
3910 PR c/71583
3911 * c-parser.c (c_parser_postfix_expression_after_paren_type): Also
3912 check expr.value.
3913
e3fe09c1
UB
39142016-07-22 Uros Bizjak <ubizjak@gmail.com>
3915
3916 * c-typeck.c: Use HOST_WIDE_INT_1 instead of (HOST_WIDE_INT) 1,
3917
7c8f7eaa
DM
39182016-07-20 David Malcolm <dmalcolm@redhat.com>
3919
3920 * c-decl.c (struct edit_distance_traits<cpp_hashnode *>): Move to
3921 spellcheck-tree.h
3922 (best_macro_match): Likewise, converting from a typedef to a
3923 subclass.
3924 (find_closest_macro_cpp_cb): Move to spellcheck-tree.c.
3925 (lookup_name_fuzzy): Update for change of best_macro_match to a
3926 subclass with a ctor that calls cpp_forall_identifiers.
3927
de6a69ee
DM
39282016-07-20 David Malcolm <dmalcolm@redhat.com>
3929
3930 * c-decl.c (implicit_decl_warning): Update for conversion of
3931 return type of lookup_name_fuzzy to const char *.
3932 (undeclared_variable): Likewise.
3933 (lookup_name_fuzzy): Convert return type from tree to
3934 const char *.
3935 * c-parser.c (c_parser_declaration_or_fndef): Update for
3936 conversion of return type of lookup_name_fuzzy to const char *.
3937 (c_parser_parameter_declaration): Likewise.
3938
b1c9c068
CP
39392016-07-15 Cesar Philippidis <cesar@codesourcery.com>
3940
3941 * c-parser.c (c_parser_oacc_declare): Don't scan for
3942 GOMP_MAP_POINTER.
3943 * c-typeck.c (handle_omp_array_sections): Mark data clauses with
3944 GOMP_MAP_FORCE_{PRESENT,TO,FROM,TOFROM} as potentially having
3945 zero-length subarrays.
3946
ddbbcb19
JJ
39472016-07-15 Jakub Jelinek <jakub@redhat.com>
3948
3949 PR c/71858
3950 * c-decl.c (implicit_decl_warning): Use FUZZY_LOOKUP_FUNCTION_NAME
3951 instead of FUZZY_LOOKUP_NAME.
3952 (lookup_name_fuzzy): For FUZZY_LOOKUP_FUNCTION_NAME consider
3953 FUNCTION_DECLs, {VAR,PARM}_DECLs function pointers and macros.
3954
dd36b877
JJ
39552016-07-14 Jakub Jelinek <jakub@redhat.com>
3956
3957 PR c/71858
3958 * c-decl.c (lookup_name_fuzzy): Ignore binding->invisible.
3959
8c681247
TS
39602016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
3961
3962 * c-parser.c (c_parser_generic_selection): Make type of variable
3963 auto_vec.
3964 (c_parser_omp_declare_simd): Likewise.
3965
bf4fa671
TS
39662016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
3967
3968 * c-decl.c (struct c_struct_parse_info): Change member types
3969 from vec to auto_vec.
3970 (start_struct): Adjust.
3971 (finish_struct): Likewise.
3972
557e8c49
JJ
39732016-07-02 Jakub Jelinek <jakub@redhat.com>
3974
3975 PR c/71719
3976 * c-typeck.c (mark_exp_read): Handle VIEW_CONVERT_EXPR.
3977
54d19c3b
TS
39782016-06-29 Thomas Schwinge <thomas@codesourcery.com>
3979
3980 * c-parser.c (c_parser_pragma) <PRAGMA_OMP_CANCELLATION_POINT>:
3981 Move pragma context checking into...
3982 (c_parser_omp_cancellation_point): ... here, and improve
3983 diagnostic messages.
3984 * c-typeck.c (c_finish_omp_cancel)
3985 (c_finish_omp_cancellation_point): Improve diagnostic messages.
3986
152ef731
JJ
39872016-06-29 Jakub Jelinek <jakub@redhat.com>
3988
3989 PR c/71685
3990 * c-typeck.c (c_build_qualified_type): Don't clear
3991 C_TYPE_INCOMPLETE_VARS for the main variant.
3992
39932016-06-28 Martin Sebor <msebor@redhat.com>
4378d117
MS
3994
3995 PR c/71552
3996 * c-typeck.c (output_init_element): Diagnose incompatible types
3997 before non-constant initializers.
3998
e9ac1f86
JJ
39992016-06-28 Jakub Jelinek <jakub@redhat.com>
4000
4001 * Make-lang.in: Don't cat ../stage_current if it does not exist.
4002
277d7ee0
AK
40032016-06-23 Andi Kleen <ak@linux.intel.com>
4004
4005 * Make-lang.in: Add support for autofdo.
4006
1a4f11c8
DM
40072016-06-22 David Malcolm <dmalcolm@redhat.com>
4008
4009 PR c/70339
4010 * c-decl.c: Include spellcheck-tree.h and gcc-rich-location.h.
4011 (implicit_decl_warning): When issuing warnings for implicit
4012 declarations, attempt to provide a suggestion via
4013 lookup_name_fuzzy.
4014 (undeclared_variable): Likewise when issuing errors.
4015 (lookup_name_in_scope): Likewise.
4016 (struct edit_distance_traits<cpp_hashnode *>): New struct.
4017 (best_macro_match): New typedef.
4018 (find_closest_macro_cpp_cb): New function.
4019 (lookup_name_fuzzy): New function.
4020 * c-parser.c: Include gcc-rich-location.h.
4021 (c_token_starts_typename): Split out case CPP_KEYWORD into...
4022 (c_keyword_starts_typename): ...this new function.
4023 (c_parser_declaration_or_fndef): When issuing errors about
4024 missing "struct" etc, add a fixit. For other kinds of errors,
4025 attempt to provide a suggestion via lookup_name_fuzzy.
4026 (c_parser_parms_declarator): When looking ahead to detect typos in
4027 type names, also reject CPP_KEYWORD.
4028 (c_parser_parameter_declaration): When issuing errors about
4029 unknown type names, attempt to provide a suggestion via
4030 lookup_name_fuzzy.
4031 * c-tree.h (c_keyword_starts_typename): New prototype.
4032
5a578671
JM
40332016-06-20 Joseph Myers <joseph@codesourcery.com>
4034
4035 PR c/71601
4036 * c-typeck.c (build_conditional_expr): Return error_mark_node if
4037 c_common_type returns error_mark_node.
4038
3f8257db 40392016-06-19 Martin Sebor <msebor@redhat.com>
aa0db437
MS
4040
4041 PR c/69507
4042 * c-parser.c (c_parser_alignof_expression): Avoid diagnosing
4043 __alignof__ (expression).
4044
6a3f203c
DM
40452016-06-14 David Malcolm <dmalcolm@redhat.com>
4046
4047 * c-typeck.c: Include spellcheck-tree.h rather than spellcheck.h.
4048
264757fb
DM
40492016-06-14 David Malcolm <dmalcolm@redhat.com>
4050
4051 * c-typeck.c (build_component_ref): Simplify fixit code by
4052 using gcc_rich_location::add_fixit_misspelled_id.
4053 (set_init_label): Likewise.
4054
f7e4f2e3
DM
40552016-06-13 David Malcolm <dmalcolm@redhat.com>
4056
4057 * c-parser.c (c_parser_initelt): Provide location of name for new
4058 location_t param of set_init_label.
4059 * c-tree.h (set_init_label): Add location_t param.
4060 * c-typeck.c (set_init_index): Add "fieldname_loc" location_t
4061 param and use it when issuing error messages about unrecognized
4062 field names. Attempt to provide a fixit hint if appropriate,
4063 otherwise update the error message to provide the type name.
4064
4b1ffdb1
TS
40652016-06-10 Thomas Schwinge <thomas@codesourcery.com>
4066
4067 PR c/71381
4068 * c-parser.c (c_parser_omp_variable_list) <OMP_CLAUSE__CACHE_>:
4069 Loosen checking.
4070
44a845ca
MS
40712016-06-08 Martin Sebor <msebor@redhat.com>
4072 Jakub Jelinek <jakub@redhat.com>
4073
4074 PR c++/70507
4075 PR c/68120
4076 * c-typeck.c (convert_arguments): Don't promote last argument
4077 of BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
4078
92a5f2ba
MP
40792016-06-08 Marek Polacek <polacek@redhat.com>
4080
4081 PR c/71418
4082 * c-decl.c (grokdeclarator): Check TYPE_P.
4083
08203f73
MP
4084 PR c/71426
4085 * c-decl.c (get_parm_info): Don't crash on an assert on invalid
4086 code.
4087
6ffd47b7
DM
40882016-06-07 David Malcolm <dmalcolm@redhat.com>
4089
4090 * c-parser.c (c_parser_postfix_expression): In __builtin_offsetof
4091 and structure element reference, capture the location of the
4092 element name token and pass it to build_component_ref.
4093 (c_parser_postfix_expression_after_primary): Likewise for
4094 structure element dereference.
4095 (c_parser_omp_variable_list): Likewise for
4096 OMP_CLAUSE_{_CACHE, MAP, FROM, TO},
4097 * c-tree.h (build_component_ref): Add location_t param.
4098 * c-typeck.c (build_component_ref): Add location_t param
4099 COMPONENT_LOC. Use it, if available, when issuing hints about
4100 mispelled member names to provide a fixit replacement hint.
4101
1f40cff3
MP
41022016-06-06 Marek Polacek <polacek@redhat.com>
4103
4104 PR c/71362
4105 * c-parser.c (c_parser_direct_declarator): Set location.
4106
5545a907
MP
41072016-06-06 Marek Polacek <polacek@redhat.com>
4108
4109 * c-typeck.c (comptypes_internal): Handle comparisons of
4110 INTEGER_TYPE, FIXED_POINT_TYPE, and REAL_TYPE nodes. Don't check
4111 TYPE_REF_CAN_ALIAS_ALL.
4112
b605f663
CLT
41132016-06-03 Chung-Lin Tang <cltang@codesourcery.com>
4114
4115 * c-typeck.c (c_finish_omp_clauses): Mark OpenACC reduction
4116 arguments as addressable when async clause exists.
4117
00631022
JJ
41182016-05-30 Jakub Jelinek <jakub@redhat.com>
4119
4120 PR c++/71349
4121 * c-parser.c (c_parser_omp_for): Don't disallow nowait clause
4122 when combined with target construct.
4123
7211a097
JJ
41242016-05-26 Jakub Jelinek <jakub@redhat.com>
4125
4126 * c-parser.c (c_parser_omp_clause_schedule): Warn if
4127 OMP_CLAUSE_SCHEDULE_CHUNK_EXPR is known not to be positive.
4128
95efe6b6
MP
41292016-05-25 Marek Polacek <polacek@redhat.com>
4130
4131 PR c/71265
4132 * c-decl.c (c_make_fname_decl): Don't check seen_error.
4133
a23faf7a
MP
4134 PR c/71266
4135 * c-decl.c (store_parm_decls_oldstyle): Skip non-PARM_DECLs.
4136
e46c7770
CP
41372016-05-24 Cesar Philippidis <cesar@codesourcery.com>
4138
4139 * c-parser.c (c_parser_oacc_declare): Add support for
4140 GOMP_MAP_FIRSTPRIVATE_POINTER.
4141 * c-typeck.c (handle_omp_array_sections_1): Replace bool is_omp
4142 argument with enum c_omp_region_type ort.
4143 (handle_omp_array_sections): Likewise. Update call to
4144 handle_omp_array_sections_1.
4145 (c_finish_omp_clauses): Add specific errors and warning messages for
4146 OpenACC. Use firsrtprivate pointers for OpenACC subarrays. Update
4147 call to handle_omp_array_sections.
4148
a04e69c0
TS
41492016-05-24 Thomas Schwinge <thomas@codesourcery.com>
4150
4151 * c-parser.c (c_parser_oacc_routine): Tighten syntax checks.
4152
f17a223d
RB
41532016-05-24 Richard Biener <rguenther@suse.de>
4154
4155 PR middle-end/70434
4156 PR c/69504
4157 * c-typeck.c (build_array_ref): Do not complain about indexing
4158 non-lvalue vectors. Adjust for function name change.
4159
79063edd
MS
41602016-05-20 Martin Sebor <msebor@redhat.com>
4161
4162 PR c/71115
4163 * c-typeck.c (error_init): Use
4164 expansion_point_location_if_in_system_header.
4165 (warning_init): Same.
4166
8a40fef3
DM
41672016-05-19 David Malcolm <dmalcolm@redhat.com>
4168
4169 PR c/71171
4170 * c-parser.c (c_parser_generic_selection): Use c_expr::set_error
4171 in error-handling.
4172 (c_parser_postfix_expression): Likewise.
4173 * c-tree.h (c_expr::set_error): New method.
4174 * c-typeck.c (parser_build_binary_op): In error-handling, ensure
4175 that result's range is initialized.
4176
e9892350
JG
41772016-05-17 James Greenhalgh <james.greenhalgh@arm.com>
4178
4179 * c-typeck.c (parser_build_unary_op): Fix formatting.
4180
8fad45f5
MW
41812016-05-16 Matthew Wahab <matthew.wahab@arm.com>
4182
4183 * c-decl.c (grokdeclarator): Remove errmsg and use of
4184 targetm.invalid_return_type.
4185 (grokparms): Remove errmsg and use of
4186 targetm.invalid_parameter_type.
4187
aa4b467b
JM
41882016-05-13 Joseph Myers <joseph@codesourcery.com>
4189
4190 * c-decl.c (grokdeclarator): For C11, discard qualifiers on
4191 function return type.
4192
4f2e1536
MP
41932016-05-12 Marek Polacek <polacek@redhat.com>
4194
4195 PR c/70756
4196 * c-decl.c (build_compound_literal): Pass LOC down to
4197 c_incomplete_type_error.
4198 * c-tree.h (require_complete_type): Adjust declaration.
4199 (c_incomplete_type_error): Likewise.
4200 * c-typeck.c (require_complete_type): Add location parameter, pass it
4201 down to c_incomplete_type_error.
4202 (c_incomplete_type_error): Add location parameter, pass it down to
4203 error_at.
4204 (build_component_ref): Pass location down to c_incomplete_type_error.
4205 (default_conversion): Pass location down to require_complete_type.
4206 (build_array_ref): Likewise.
4207 (build_function_call_vec): Likewise.
4208 (convert_arguments): Likewise.
4209 (build_unary_op): Likewise.
4210 (build_c_cast): Likewise.
4211 (build_modify_expr): Likewise.
4212 (convert_for_assignment): Likewise.
4213 (c_finish_omp_clauses): Likewise.
4214
d6e83a8d
MM
42152016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
4216
4217 PR c/43651
4218 * c-decl.c (declspecs_add_qual): Warn when -Wduplicate-decl-specifier
4219 is enabled.
4220 * c-errors.c (pedwarn_c90): Return true if warned.
4221 * c-tree.h (pedwarn_c90): Change return type to bool.
4222 (enum c_declspec_word): Add new enumerator cdw_atomic.
4223
5c3a10fb
MP
42242016-05-11 Marek Polacek <polacek@redhat.com>
4225
4226 PR c++/71024
4227 * c-decl.c (diagnose_mismatched_decls): Factor out code to
4228 diagnose_mismatched_attributes and call it.
4229
cf68d92c
MP
42302016-05-10 Marek Polacek <polacek@redhat.com>
4231
4232 PR c/70255
4233 * c-decl.c (diagnose_mismatched_decls): Warn for optimize attribute
4234 on a declaration following the definition.
4235
351f85c5
JJ
42362016-05-05 Jakub Jelinek <jakub@redhat.com>
4237
4238 * c-parser.c (c_parser_switch_statement): Add IF_P argument,
4239 parse it through to c_parser_c99_block_statement.
4240 (c_parser_statement_after_labels): Adjust c_parser_switch_statement
4241 caller.
4242
deef7113
MP
42432016-05-04 Marek Polacek <polacek@redhat.com>
4244
4245 * c-parser.c (c_parser_if_statement): Replace OPT_Wparentheses with
4246 OPT_Wdangling_else.
4247
de55efd5
MP
42482016-05-04 Marek Polacek <polacek@redhat.com>
4249
4250 PR c/48778
4251 * c-typeck.c (build_binary_op): Don't issue -Waddress warnings
4252 for macro expansions.
4253
79ce98bc
MP
42542016-05-03 Marek Polacek <polacek@redhat.com>
4255
4256 PR c/70859
4257 * c-typeck.c (build_function_call_vec): Pass LOC and ARG_LOC down to
4258 check_builtin_function_arguments.
4259
fb2647aa
RB
42602016-05-03 Richard Biener <rguenther@suse.de>
4261
4262 * Make-lang.in (cc1-checksum.c): For stage-final re-use
4263 the checksum from the previous stage.
4264
77886428
CP
42652016-05-02 Cesar Philippidis <cesar@codesourcery.com>
4266
4267 * c-parser.c (c_parser_oacc_all_clauses): Update call to
4268 c_finish_omp_clauses.
4269 (c_parser_omp_all_clauses): Likewise.
4270 (c_parser_oacc_cache): Likewise.
4271 (c_parser_oacc_loop): Likewise.
4272 (omp_split_clauses): Likewise.
4273 (c_parser_omp_declare_target): Likewise.
4274 (c_parser_cilk_all_clauses): Likewise.
4275 (c_parser_cilk_for): Likewise.
4276 * c-typeck.c (c_finish_omp_clauses): Replace bool arguments
4277 is_omp, declare_simd, and is_cilk with enum c_omp_region_type ort.
4278
7176a4a0
MP
42792016-05-02 Marek Polacek <polacek@redhat.com>
4280
4281 PR c/70851
4282 * c-decl.c (grokdeclarator): Diagnose when array's size has an
4283 incomplete type.
4284
e7ff0319
CP
42852016-04-29 Cesar Philippidis <cesar@codesourcery.com>
4286
4287 PR middle-end/70626
4288 * c-parser.c (c_parser_oacc_loop): Don't augment mask with
4289 OACC_LOOP_CLAUSE_MASK.
4290 (c_parser_oacc_kernels_parallel): Update call to
4291 c_oacc_split_loop_clauses.
4292
9f405ce1
AM
42932016-04-28 Andrew MacLeod <amacleod@redhat.com>
4294
4295 * c-array-notation.c (fix_builtin_array_notation_fn): Fix final
4296 argument to build_modify_expr in two cases.
4297
c1e1f433
BS
42982016-04-27 Bernd Schmidt <bschmidt@redhat.com>
4299
4300 * c-parser.c (c_parser_postfix_expression_after_primary): Call
4301 warn_for_memset instead of warning directly here.
4302
2448a956
MP
43032016-04-26 Marek Polacek <polacek@redhat.com>
4304
4305 PR c/67784
4306 * c-parser.c (c_parser_maybe_reclassify_token): New function factored
4307 out of ...
4308 (c_parser_for_statement): ... here.
4309 (c_parser_if_statement): Use it.
4310 (c_parser_switch_statement): Use it.
4311 (c_parser_while_statement): Use it.
4312
b02a5e26
MP
4313 PR c/70791
4314 * c-decl.c (pushdecl): Pass LOCUS down to warning.
4315
477d4906
IV
43162016-04-20 Ilya Verbin <ilya.verbin@intel.com>
4317
4318 PR c++/69363
4319 * c-parser.c (c_parser_cilk_all_clauses): Use c_finish_omp_clauses
4320 instead of c_finish_cilk_clauses.
4321 * c-tree.h (c_finish_omp_clauses): Add new default argument.
4322 * c-typeck.c (c_finish_omp_clauses): Add new argument. Allow
4323 floating-point variables in the linear clause for Cilk Plus.
4324
fe37c7af
MM
43252016-04-18 Michael Matz <matz@suse.de>
4326
4327 * c-decl.c (merge_decls): Use SET_DECL_ALIGN and SET_TYPE_ALIGN.
4328 (grokdeclarator, parser_xref_tag, finish_enum): Use SET_TYPE_ALIGN.
4329
949505a9
MP
43302016-04-15 Marek Polacek <polacek@redhat.com>
4331
4332 PR c/70671
4333 * c-typeck.c (build_unary_op): Pass location down to error and
4334 warning call.
4335
dda1bf61
JJ
43362016-04-15 Jakub Jelinek <jakub@redhat.com>
4337
4338 PR c/70436
4339 * c-parser.c (c_parser_pragma): Add IF_P argument, pass it down
4340 where needed.
4341 (c_parser_external_declaration, c_parser_struct_or_union_specifier,
4342 c_parser_parameter_declaration, c_parser_compound_statement_nostart,
4343 c_parser_objc_class_instance_variables, c_parser_objc_methodprotolist):
4344 Adjust c_parser_pragma callers.
4345 (c_parser_statement_after_labels): Likewise. Adjust c_parser_cilk_for
4346 caller.
4347 (c_parser_omp_structured_block): Add IF_P argument, pass it down to
4348 c_parser_statement.
4349 (c_parser_oacc_data, c_parser_oacc_host_data, c_parser_oacc_loop,
4350 c_parser_oacc_kernels_parallel, c_parser_omp_critical,
4351 c_parser_omp_simd, c_parser_omp_for, c_parser_omp_master,
4352 c_parser_omp_ordered, c_parser_omp_parallel, c_parser_omp_single,
4353 c_parser_omp_task, c_parser_omp_taskgroup, c_parser_omp_distribute,
4354 c_parser_omp_teams, c_parser_omp_target_data, c_parser_omp_target,
4355 c_parser_omp_taskloop, c_parser_omp_construct, c_parser_cilk_grainsize,
4356 c_parser_cilk_simd, c_parser_cilk_for): Add IF_P argument, pass it
4357 down where needed.
4358 (c_parser_omp_for_loop): Likewise. Clear IF_P if nbraces.
4359 (c_parser_omp_sections_scope): Adjust c_parser_omp_structured_block
4360 calls.
4361
99cd9857
MP
43622016-04-13 Marek Polacek <polacek@redhat.com>
4363
4364 PR c/70436
4365 * c-parser.c (c_parser_statement_after_labels): Add IF_P argument and
4366 adjust callers.
4367 (c_parser_statement): Likewise.
4368 (c_parser_c99_block_statement): Likewise.
4369 (c_parser_while_statement): Likewise.
4370 (c_parser_for_statement): Likewise.
4371 (c_parser_if_body): Don't set IF_P here.
4372 (c_parser_if_statement): Add IF_P argument. Set IF_P here. Warn
4373 about dangling else here.
4374 * c-tree.h (c_finish_if_stmt): Adjust declaration.
4375 * c-typeck.c (c_finish_if_stmt): Remove NESTED_IF parameter. Don't
4376 warn about dangling else here.
4377
f13355da
MP
43782016-04-04 Marek Polacek <polacek@redhat.com>
4379
4380 PR c/70307
4381 * c-fold.c (c_fully_fold_internal): Handle VEC_COND_EXPR.
4382
5fde6a45
MP
43832016-03-31 Marek Polacek <polacek@redhat.com>
4384
4385 PR c/70297
4386 * c-decl.c (merge_decls): Also set TYPE_ALIGN and TYPE_USER_ALIGN.
4387
4bbf545b
DM
43882016-03-18 David Malcolm <dmalcolm@redhat.com>
4389
4390 PR c/70281
4391 * c-parser.c (c_parser_postfix_expression): Set the source range
4392 for uses of "__builtin_types_compatible_p".
4393
fcc2b74f
JJ
43942016-03-17 Jakub Jelinek <jakub@redhat.com>
4395
4396 PR c/70280
4397 * c-typeck.c (composite_type): Don't count void_list_node
4398 into len, if the list is terminated by void_list_node, start
4399 with void_list_node instead of NULL for newargs. Stop
4400 at void_list_node.
4401
ab4c578f
MP
44022016-03-16 Marek Polacek <polacek@redhat.com>
4403
4404 PR c/70093
4405 * c-typeck.c (build_function_call_vec): Create a TARGET_EXPR for
4406 nested functions returning VM types.
4407
96b3c82d
CP
44082016-03-09 Cesar Philippidis <cesar@codesourcery.com>
4409
4410 * c-parser.c (c_parser_oacc_loop): Update cclauses and clauses
4411 when calling c_finish_omp_clauses.
4412
29b9828f
BS
44132016-03-04 Bernd Schmidt <bschmidt@redhat.com>
4414
4415 PR c/69824
4416 * c-decl.c (get_parm_info): Don't queue implicit function declarations
4417 for later.
4418
7ff6ca38
MP
44192016-03-04 Marek Polacek <polacek@redhat.com>
4420
4421 PR c/69798
4422 * c-parser.c (c_parser_postfix_expression): Call
4423 c_parser_cast_expression rather than c_parser_postfix_expression.
4424
686e2237
JJ
44252016-03-01 Jakub Jelinek <jakub@redhat.com>
4426
4427 PR c/69796
4428 PR c/69974
4429 * c-parser.c (c_parser_translation_unit): Don't change TREE_TYPE
4430 of incomplete decls to error_mark_node.
4431
0b05329b
MP
44322016-02-24 Marek Polacek <polacek@redhat.com>
4433
4434 PR c/69819
4435 * c-decl.c (finish_decl): Don't update the copy of the type of a
4436 different decl type.
4437
067fbd8b
JJ
44382016-02-23 Jakub Jelinek <jakub@redhat.com>
4439
4440 PR objc/69844
4441 * c-parser.c (c_parser_for_statement): Properly handle ObjC classes
4442 in id_kind reclassification.
4443
bf14eba2
JJ
44442016-02-16 Jakub Jelinek <jakub@redhat.com>
4445
4446 PR c/69835
4447 * c-typeck.c (build_binary_op): Revert 2015-09-09 change.
4448
ba539195
JN
44492016-02-16 James Norris <jnorris@codesourcery.com>
4450
4451 PR c/64748
4452 * c-parser.c (c_parser_oacc_data_clause_deviceptr): Allow parms.
4453
16595a1f
BS
44542016-02-12 Bernd Schmidt <bschmidt@redhat.com>
4455
f48dfe98
BS
4456 * c-decl.c (build_null_declspecs): Zero the entire struct.
4457
16595a1f
BS
4458 PR c/69522
4459 * c-parser.c (c_parser_braced_init): New arg outer_obstack. All
4460 callers changed. If nested_p is true, use it to call
4461 finish_implicit_inits.
4462 * c-tree.h (finish_implicit_inits): Declare.
4463 * c-typeck.c (finish_implicit_inits): New function. Move code
4464 from ...
4465 (push_init_level): ... here.
4466 (set_designator, process_init_element): Call finish_implicit_inits.
4467
66756373
JJ
44682016-02-11 Jakub Jelinek <jakub@redhat.com>
4469
4470 PR c/69768
4471 * c-typeck.c (parser_build_binary_op): Strip nops from integer_zerop
4472 arguments for -Waddress warning.
4473
1066e9b5
JJ
44742016-02-04 Jakub Jelinek <jakub@redhat.com>
4475
4476 PR c/69669
4477 * c-decl.c (finish_enum): When honoring mode attribute,
4478 make sure to use proper TYPE_MIN_VALUE and TYPE_MAX_VALUE.
4479
3a5d2ba4
JJ
44802016-01-29 Jakub Jelinek <jakub@redhat.com>
4481
4482 PR debug/69518
4483 * c-decl.c (finish_struct): Clear C_TYPE_INCOMPLETE_VARS in
4484 all type variants, not just TYPE_MAIN_VARIANT.
4485
cbdd8ae0
JJ
44862016-01-27 Jakub Jelinek <jakub@redhat.com>
4487
4488 PR debug/66869
4489 * c-decl.c (c_write_global_declarations_1): Warn with
4490 warn_unused_function if static prototype without definition
4491 is not C_DECL_USED.
4492
fa74a4bc
MP
44932016-01-27 Marek Polacek <polacek@redhat.com>
4494
4495 PR c/68062
4496 * c-typeck.c (build_binary_op) [EQ_EXPR, GE_EXPR]: Promote operand
4497 to unsigned, if needed. Add -Wsign-compare warning.
4498
13f92e8d
JJ
44992016-01-26 Jakub Jelinek <jakub@redhat.com>
4500
4501 PR tree-optimization/69483
4502 * c-parser.c (c_parser_translation_unit): Use FOR_EACH_VEC_ELT.
4503
cd8e73dc 45042016-01-20 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
d25c7690
PK
4505
4506 PR c/24293
4507 * c-tree.h (incomplete_record_decls): Declare.
4508 * c-parser.c (incomplete_record_decls): Define.
4509 (c_parser_translation_unit): Iterate through incomplete_record_decls and
4510 report error if any decl has zero size.
4511 * c-decl.c (finish_decl): Append static decl with incomplete struct/union
4512 or enum type to incomplete_record_decls.
4513
e6d6ec9e
TV
45142016-01-14 Tom de Vries <tom@codesourcery.com>
4515
4516 PR tree-optimization/68773
4517 * c-parser.c (c_parser_oacc_declare, c_parser_omp_declare_target): Don't
4518 set force_output.
4519
00083992
MP
45202016-01-14 Marek Polacek <polacek@redhat.com>
4521
4522 PR c/69262
4523 * c-decl.c (grokdeclarator): Provide more information for invalid
4524 array declarations.
4525
7443cf13
DM
45262016-01-06 David Malcolm <dmalcolm@redhat.com>
4527
4528 * c-parser.c (c_parser_unary_expression): For dereferences, build
4529 a combined location before calling build_indirect_ref, so that
4530 error reports cover the full range, manually updating the c_expr
4531 src_range.
4532
6b131d5b
MP
45332016-01-06 Marek Polacek <polacek@redhat.com>
4534
4535 PR sanitizer/69099
4536 * c-convert.c (convert) [INTEGER_TYPE]: Drop ARG. Don't pass ARG to
4537 ubsan_instrument_float_cast. Fold EXPR. Use NULL_TREE instead of
4538 NULL.
4539
818ab71a
JJ
45402016-01-04 Jakub Jelinek <jakub@redhat.com>
4541
4542 Update copyright years.
4543
2fe0a208
MP
45442016-01-04 Marek Polacek <polacek@redhat.com>
4545
4546 PR c/68908
4547 * c-typeck.c (build_atomic_assign): Improve commentary. Add
4548 optimization to use __atomic_fetch_* built-in if possible.
4549
c7b48c8a
TS
45502015-12-23 Thomas Schwinge <thomas@codesourcery.com>
4551
4552 * c-parser.c (c_parser_oacc_clause_use_device): Merge function
4553 into...
4554 (c_parser_omp_clause_use_device_ptr): ... this function. Adjust
4555 all users.
4556
fda5652f
MP
45572015-12-22 Marek Polacek <polacek@redhat.com>
4558
4559 PR c/69002
4560 * c-typeck.c (build_component_ref): Warn when acessing elements of
4561 atomic structures or unions.
4562
745e411d
DM
45632015-12-21 David Malcolm <dmalcolm@redhat.com>
4564
4565 * c-typeck.c: Include "gcc-rich-location.h".
4566 (build_binary_op): In the two places that call binary_op_error,
4567 create a gcc_rich_location and populate it with the location of
4568 the binary op and its two operands.
4569
94c40e19
DM
45702015-12-16 David Malcolm <dmalcolm@redhat.com>
4571
4572 * c-parser.c (c_parser_statement_after_labels): When calling
4573 c_finish_return, Use the return expression's location if it has
4574 one, falling back to the location of the first token within it.
4575 * c-typeck.c (c_finish_return): When issuing warnings about
4576 the incorrect presence/absence of a return value, issue a note
4577 showing the declaration of the function.
4578
de67c4c3
DM
45792015-12-16 David Malcolm <dmalcolm@redhat.com>
4580
4581 * c-parser.c (struct c_parser): Expand array "tokens_buf" from 2
4582 to 4.
4583 (c_parser_peek_nth_token): New function.
4584 (c_parser_peek_conflict_marker): New function.
4585 (c_parser_error): Detect conflict markers and report them as such.
4586
a10704e1
DM
45872015-12-16 David Malcolm <dmalcolm@redhat.com>
4588
4589 * c-parser.c (c_parser_postfix_expression): Use EXPR_LOC_OR_LOC
4590 to preserve range information for the primary expression
4591 in the call to c_parser_postfix_expression_after_primary.
4592
8062bca6
DM
45932015-12-16 David Malcolm <dmalcolm@redhat.com>
4594
4595 * c-parser.c (c_parser_static_assert_declaration_no_semi): Use the
4596 expression location, falling back on the first token location,
4597 rather than always using the latter.
4598
d06f8b75
MP
45992015-12-16 Marek Polacek <polacek@redhat.com>
4600
4601 PR c/64637
4602 * c-typeck.c (c_process_expr_stmt): Use location of the expression if
4603 available.
4604
2994fb91
MP
46052015-12-15 Marek Polacek <polacek@redhat.com>
4606
4607 PR c/68907
4608 * c-typeck.c (build_atomic_assign): Set TREE_NO_WARNING on an
4609 artificial decl.
4610
a1b93f8d
DM
46112015-12-08 David Malcolm <dmalcolm@redhat.com>
4612
4613 * c-parser.c (c_parser_alignof_expression): Capture location of
4614 closing parenthesis (if any), or of end of unary expression, and
4615 use it to build a src_range for the expression.
4616
46c6e1e2
DM
46172015-12-08 David Malcolm <dmalcolm@redhat.com>
4618
4619 PR c/68757
4620 * c-parser.c (c_parser_get_builtin_args): Add
4621 "out_close_paren_loc" param, and write back to it.
4622 (c_parser_postfix_expression): Capture the closing
4623 parenthesis location for RID_CHOOSE_EXPR,
4624 RID_BUILTIN_CALL_WITH_STATIC_CHAIN, RID_BUILTIN_COMPLEX,
4625 RID_BUILTIN_SHUFFLE and use it to set the source range
4626 for such expressions; within RID_BUILTIN_COMPLEX set
4627 the underlying location.
4628
66189108
MP
46292015-12-07 Marek Polacek <polacek@redhat.com>
4630
4631 PR c/68668
4632 * c-decl.c (grokdeclarator): If ORIG_QUAL_INDIRECT is indirect, use
4633 TREE_TYPE of ORIG_QUAL_TYPE, otherwise decrement ORIG_QUAL_INDIRECT.
4634
f187980b
EB
46352015-12-04 Eric Botcazou <ebotcazou@adacore.com>
4636
4637 * c-tree.h (c_build_va_arg): Adjust prototype.
4638 * c-parser.c (c_parser_postfix_expression): Adjust call to above.
4639 * c-typeck.c (c_build_va_arg): Rename LOC parameter to LOC2, add LOC1
4640 parameter, adjust throughout and issue an error if EXPR is a component
4641 with reverse storage order.
4642
4250754e
JM
46432015-12-02 Jason Merrill <jason@redhat.com>
4644
4645 * c-fold.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
4646 (c_fully_fold_internal, decl_constant_value_for_optimization):
4647 Move from c-common.c.
4648 * c-tree.h: Declare decl_constant_value_for_optimization.
4649 * Make-lang.in (C_AND_OBJC_OBJS): Add c-fold.o.
4650
e9e32ee6
JM
46512015-12-02 Joseph Myers <joseph@codesourcery.com>
4652
4653 PR c/68162
4654 * c-decl.c (grokdeclarator): Set first_non_attr_kind before
4655 following link from declarator to next declarator. Track original
4656 qualified type and pass it to c_build_qualified_type.
4657 * c-typeck.c (c_build_qualified_type): Add arguments
4658 orig_qual_type and orig_qual_indirect.
4659
ff7a55bf
TS
46602015-12-02 Thomas Schwinge <thomas@codesourcery.com>
4661
4662 * c-parser.c (c_parser_omp_clause_name)
4663 (c_parser_oacc_all_clauses): Alphabetical sorting.
4664
657e4e47
JJ
46652015-12-02 Jakub Jelinek <jakub@redhat.com>
4666
4667 PR c/68533
4668 * c-decl.c (get_parm_info): Use b->locus instead of input_location
4669 for diagnostics.
4670
37d5ad46
JB
46712015-12-01 Julian Brown <julian@codesourcery.com>
4672 Cesar Philippidis <cesar@codesourcery.com>
4673 James Norris <James_Norris@mentor.com>
4674
4675 * c-parser.c (c_parser_omp_clause_name): Add use_device support.
4676 (c_parser_oacc_clause_use_device): New function.
4677 (c_parser_oacc_all_clauses): Add use_device support.
4678 (OACC_HOST_DATA_CLAUSE_MASK): New macro.
4679 (c_parser_oacc_host_data): New function.
4680 (c_parser_omp_construct): Add host_data support.
4681 * c-tree.h (c_finish_oacc_host_data): Add prototype.
4682 * c-typeck.c (c_finish_oacc_host_data): New function.
4683 (c_finish_omp_clauses): Add use_device support.
4684
a4850ce9
JH
46852015-11-29 Jan Hubicka <hubicka@ucw.cz>
4686
4687 PR c/67106
4688 * c-decl.c: Set TYPE_PACKED in variants.
4689
b58d3df2
ML
46902015-11-27 Martin Liska <mliska@suse.cz>
4691
4692 PR c++/68312
4693 * c-array-notation.c (fix_builtin_array_notation_fn):
4694 Use release_vec_vec instead of vec::release.
4695 (build_array_notation_expr): Likewise.
4696 (fix_conditional_array_notations_1): Likewise.
4697 (fix_array_notation_expr): Likewise.
4698 (fix_array_notation_call_expr): Likewise.
4699
aec17bfe
JJ
47002015-11-27 Jakub Jelinek <jakub@redhat.com>
4701
4702 PR c/63326
4703 * c-parser.c (c_parser_compound_statement_nostart): If
4704 last_label is true, use pragma_stmt instead of pragma_compound
4705 as second c_parser_pragma argument.
4706 (c_parser_omp_ordered, c_parser_omp_target_update,
4707 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Pass
4708 false as second argument to c_parser_skip_to_pragma_eol after
4709 diagnosing standalone directives used in pragma_stmt context.
4710
688c4de0
IV
47112015-11-24 Ilya Verbin <ilya.verbin@intel.com>
4712
4713 * c-parser.c (c_parser_oacc_declare): Replace "ifdef ENABLE_OFFLOADING"
4714 with "if (ENABLE_OFFLOADING)".
4715
cbd03aee
DM
47162015-11-23 David Malcolm <dmalcolm@redhat.com>
4717
4718 PR objc/68438
4719 * c-parser.c (c_parser_postfix_expression): Set up source ranges
4720 for various Objective-C constructs: Class.name syntax,
4721 @selector(), @protocol(), @encode(), and [] message syntax.
4722
a87a86e1
DM
47232015-11-20 David Malcolm <dmalcolm@redhat.com>
4724
4725 PR 62314
4726 * c-typeck.c (should_suggest_deref_p): New function.
4727 (build_component_ref): Special-case POINTER_TYPE when
4728 generating a "not a structure of union" error message, and
4729 suggest a "->" rather than a ".", providing a fix-it hint.
4730
8ece8dfb
DM
47312015-11-19 David Malcolm <dmalcolm@redhat.com>
4732
4733 * c-typeck.c (lookup_field_fuzzy): Move determination of closest
4734 candidate into a new function, find_closest_identifier.
4735
433068cc
MP
47362015-11-19 Marek Polacek <polacek@redhat.com>
4737
4738 PR c/68412
4739 * c-typeck.c (parser_build_binary_op): Properly handle
4740 C_MAYBE_CONST_EXPR before calling warn_tautological_cmp.
4741
bef08b71
DM
47422015-11-17 David Malcolm <dmalcolm@redhat.com>
4743
4744 * c-parser.c (set_c_expr_source_range): Bulletproof both
4745 overloaded implementations against NULL expr->value.
4746 (c_parser_braced_init): Set src_range for "ret" to a sane pair of
4747 values.
4748 (c_parser_unary_expression): Likewise when handling addresses of
4749 labels.
4750 (c_parser_postfix_expression): Likewise for statement expressions,
4751 for __FUNCTION__, __PRETTY_FUNCTION_ and __func__ keywords, for
4752 __builtin_va_arg, and for __builtin_offset_of.
4753 (c_parser_postfix_expression_after_paren_type): Initialize expr's
4754 src_range using the range of the braced initializer.
4755 (c_parser_transaction_expression): Set src_range for "ret" to a
4756 sane pair of values.
4757
fff77217
KY
47582015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
4759
4760 * c-parser.c (c_finish_omp_declare_simd): Look for
4761 "simd" attribute as well. Update error message.
4762
1d899da2
TS
47632015-11-14 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
4764
4765 * c-parser.c (c_parser_omp_declare_target): Adjust.
4766
e4606348
JJ
47672015-11-14 Jakub Jelinek <jakub@redhat.com>
4768
4769 * c-typeck.c (c_finish_omp_clauses): Don't mark
4770 GOMP_MAP_FIRSTPRIVATE_POINTER decls addressable.
4771
3e636daf
MP
47722015-11-14 Marek Polacek <polacek@redhat.com>
4773
4774 * c-decl.c: Use RECORD_OR_UNION_TYPE_P throughout.
4775 * c-typeck.c: Likewise.
4776
ebedc9a3
DM
47772015-11-13 David Malcolm <dmalcolm@redhat.com>
4778
4779 * c-decl.c (warn_defaults_to): Pass line_table to
4780 rich_location ctor.
4781 * c-errors.c (pedwarn_c99): Likewise.
4782 (pedwarn_c90): Likewise.
4783 * c-parser.c (set_c_expr_source_range): New functions.
4784 (c_token::get_range): New method.
4785 (c_token::get_finish): New method.
4786 (c_parser_expr_no_commas): Call set_c_expr_source_range on the ret
4787 based on the range from the start of the LHS to the end of the
4788 RHS.
4789 (c_parser_conditional_expression): Likewise, based on the range
4790 from the start of the cond.value to the end of exp2.value.
4791 (c_parser_binary_expression): Call set_c_expr_source_range on
4792 the stack values for TRUTH_ANDIF_EXPR and TRUTH_ORIF_EXPR.
4793 (c_parser_cast_expression): Call set_c_expr_source_range on ret
4794 based on the cast_loc through to the end of the expr.
4795 (c_parser_unary_expression): Likewise, based on the
4796 op_loc through to the end of op.
4797 (c_parser_sizeof_expression) Likewise, based on the start of the
4798 sizeof token through to either the closing paren or the end of
4799 expr.
4800 (c_parser_postfix_expression): Likewise, using the token range,
4801 or from the open paren through to the close paren for
4802 parenthesized expressions.
4803 (c_parser_postfix_expression_after_primary): Likewise, for
4804 various kinds of expression.
4805 * c-tree.h (struct c_expr): Add field "src_range".
4806 (c_expr::get_start): New method.
4807 (c_expr::get_finish): New method.
4808 (set_c_expr_source_range): New decls.
4809 * c-typeck.c (parser_build_unary_op): Call set_c_expr_source_range
4810 on ret for prefix unary ops.
4811 (parser_build_binary_op): Likewise, running from the start of
4812 arg1.value through to the end of arg2.value.
4813
ec8b536f
MP
48142015-11-13 Marek Polacek <polacek@redhat.com>
4815
4816 PR c/68320
4817 * c-parser.c (c_parser_for_statement): Treat unknown tokens as IDs.
4818
277fe616
DM
48192015-11-13 David Malcolm <dmalcolm@redhat.com>
4820
4821 * c-typeck.c: Include spellcheck.h.
4822 (lookup_field_fuzzy_find_candidates): New function.
4823 (lookup_field_fuzzy): New function.
4824 (build_component_ref): If the field was not found, try using
4825 lookup_field_fuzzy and potentially offer a suggestion.
4826
6e232ba4
JN
48272015-11-12 James Norris <jnorris@codesourcery.com>
4828 Joseph Myers <joseph@codesourcery.com>
4829
4830 * c-parser.c (c_parser_pragma): Handle PRAGMA_OACC_DECLARE.
4831 (c_parser_omp_clause_name): Handle 'device_resident' clause.
4832 (c_parser_oacc_data_clause): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
4833 and PRAGMA_OMP_CLAUSE_LINK.
4834 (c_parser_oacc_all_clauses): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
4835 and PRAGMA_OACC_CLAUSE_LINK.
4836 (OACC_DECLARE_CLAUSE_MASK): New definition.
4837 (c_parser_oacc_declare): New function.
4838
9be4f715
MP
48392015-11-12 Marek Polacek <polacek@redhat.com>
4840
4841 PR c/67784
4842 * c-parser.c (c_parser_for_statement): Reclassify the token in
4843 a correct scope.
4844
e78bede6
MP
48452015-11-11 Marek Polacek <polacek@redhat.com>
4846
4847 PR c/68107
4848 PR c++/68266
4849 * c-decl.c (grokdeclarator): Call valid_array_size_p. Remove code
4850 checking the size of an array.
4851
69f293c9
AM
48522015-11-11 Andrew MacLeod <amacleod@redhat.com>
4853
4854 * c-array-notation.c: Remove unused header files.
4855 * c-aux-info.c: Likewise.
4856 * c-convert.c: Likewise.
4857 * c-decl.c: Likewise.
4858 * c-errors.c: Likewise.
4859 * c-lang.c: Likewise.
4860 * c-objc-common.c: Likewise.
4861 * c-parser.c: Likewise.
4862 * c-typeck.c: Likewise.
4863 * gccspec.c: Likewise.
4864
3a40d81d
NS
48652015-11-09 Thomas Schwinge <thomas@codesourcery.com>
4866 Cesar Philippidis <cesar@codesourcery.com>
4867 James Norris <jnorris@codesourcery.com>
4868 Julian Brown <julian@codesourcery.com>
4869 Nathan Sidwell <nathan@codesourcery.com>
4870
3a40d81d
NS
4871 * c-parser.c (c_parser_declaration_or_fndef): Add OpenACC
4872 routine arg.
4873 (c_parser_declaration_or_fndef): Call c_finish_oacc_routine.
4874 (c_parser_pragma): Parse 'acc routine'.
4875 (OACC_ROUTINE_CLAUSE_MARK): Define.
4876 (c_parser_oacc_routine, (c_finish_oacc_routine): New.
4877
fc402eec
AA
48782015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
4879
4880 PR debug/67192
4881 * c-typeck.c (c_finish_loop): For unconditional loops, set the
4882 location of the backward-goto to the start of the loop body.
4883
f6b0b3db
AA
48842015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
4885
4886 PR debug/67192
4887 * c-parser.c (c_parser_while_statement): Finish the loop before
4888 parsing ahead for misleading indentation.
4889 (c_parser_for_statement): Likewise.
4890
ee45a32d
EB
48912015-11-08 Eric Botcazou <ebotcazou@adacore.com>
4892
4893 * c-decl.c (finish_struct): If the structure has reverse storage
4894 order, rewrite the type of array fields with scalar component. Call
4895 maybe_apply_pragma_scalar_storage_order on entry.
4896 * c-typeck.c (build_unary_op) <ADDR_EXPR>: Remove left-overs. Issue
4897 errors on bit-fields and reverse SSO here and not...
4898 (c_mark_addressable): ...here.
4899 (output_init_element): Adjust call to initializer_constant_valid_p.
4900 (c_build_qualified_type): Propagate TYPE_REVERSE_STORAGE_ORDER.
4901
8a645150
DM
49022015-11-06 David Malcolm <dmalcolm@redhat.com>
4903
4904 * c-decl.c (warn_defaults_to): Update for change in signature
4905 of diagnostic_set_info.
4906 * c-errors.c (pedwarn_c99): Likewise.
4907 (pedwarn_c90): Likewise.
4908 * c-objc-common.c (c_tree_printer): Update for new "caret_p" param
4909 for textinfo::set_location.
4910
7a5e4956
CP
49112015-11-05 Cesar Philippidis <cesar@codesourcery.com>
4912 Thomas Schwinge <thomas@codesourcery.com>
4913 James Norris <jnorris@codesourcery.com>
4914
4915 * c-parser.c (c_parser_omp_clause_name): Add support for
4916 PRAGMA_OACC_CLAUSE_INDEPENDENT and PRAGMA_OACC_CLAUSE_TILE.
4917 (c_parser_omp_clause_default): Add is_oacc argument. Handle
4918 default(none) in OpenACC.
4919 (c_parser_oacc_shape_clause): Allow pointer variables as gang static
4920 arguments.
4921 (c_parser_oacc_clause_tile): New function.
4922 (c_parser_oacc_all_clauses): Add support for OMP_CLAUSE_DEFAULT,
4923 OMP_CLAUSE_INDEPENDENT and OMP_CLAUSE_TILE.
4924 (OACC_LOOP_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_{PRIVATE,INDEPENDENT,
4925 TILE}.
4926 (OACC_KERNELS_MASK): Add PRAGMA_OACC_CLAUSE_DEFAULT.
4927 (OACC_PARALLEL_MASK): Add PRAGMA_OACC_CLAUSE_{DEFAULT,PRIVATE,
4928 FIRSTPRIVATE}.
4929 (c_parser_omp_all_clauses): Update call to c_parser_omp_clause_default.
4930 (c_parser_oacc_update): Update the error message for missing clauses.
4931 * c-typeck.c (c_finish_omp_clauses): Add support for OMP_CLAUSE_TILE
4932 and OMP_CLAUSE_INDEPENDENT.
4933
bfcfbfa0
MP
49342015-11-05 Marek Polacek <polacek@redhat.com>
4935
4936 PR c/68090
4937 * c-parser.c (c_parser_postfix_expression_after_paren_type): Don't
4938 deal with pre-evaluation on invalid types.
4939
e01d41e5
JJ
49402015-11-05 Jakub Jelinek <jakub@redhat.com>
4941 Ilya Verbin <ilya.verbin@intel.com>
4942
4943 * c-parser.c: Include context.h and gimple-expr.h.
4944 (c_parser_omp_clause_schedule): Parse schedule modifiers, diagnose
4945 monotonic together with nonmonotonic.
4946 (c_parser_omp_for_loop): Call c_omp_check_loop_iv. Call add_stmt here.
4947 (OMP_DISTRIBUTE_CLAUSE_MASK): Add lastprivate clause.
4948 (c_parser_omp_target_data, c_parser_omp_target_enter_data,
4949 c_parser_omp_target_exit_data): Allow GOMP_MAP_ALWAYS_POINTER.
4950 (c_parser_omp_target): Likewise. Evaluate num_teams and thread_limit
4951 expressions on combined target teams before the target.
4952 (c_parser_omp_declare_target): If decl has "omp declare target" or
4953 "omp declare target link" attribute, and cgraph or varpool node already
4954 exists, then set corresponding flags. Call c_finish_omp_clauses
4955 in the parenthesized extended-list syntax case.
4956 * c-decl.c (c_decl_attributes): Don't diagnose block scope vars inside
4957 declare target.
4958 * c-typeck.c (handle_omp_array_sections_1): Allow non-zero low-bound
4959 on OMP_CLAUSE_REDUCTION array sections.
4960 (handle_omp_array_sections): Encode low-bound into the MEM_REF, either
4961 into the constant offset, or for variable low-bound using
4962 POINTER_PLUS_EXPR. For structure element based array sections use
4963 GOMP_MAP_ALWAYS_POINTER instead of GOMP_MAP_FIRSTPRIVATE_POINTER.
4964 (c_finish_omp_clauses): Drop generic_field_head, structure
4965 elements are now always mapped even as array section bases,
4966 diagnose same var in data sharing and mapping clauses. Diagnose if
4967 linear step on declare simd is neither a constant nor a uniform
4968 parameter. Look through POINTER_PLUS_EXPR for array section
4969 reductions. Diagnose the same var or function appearing multiple
4970 times on the same directive. Fix up wording for the to clause if t
4971 is neither a FUNCTION_DECL nor a VAR_DECL. Diagnose nonmonotonic
4972 modifier on kinds other than dynamic or guided or nonmonotonic
4973 modifier together with ordered clause.
4974
4bf9e5a8
TS
49752015-11-03 Thomas Schwinge <thomas@codesourcery.com>
4976 Chung-Lin Tang <cltang@codesourcery.com>
4977
4978 * c-parser.c (c_parser_omp_construct): Handle PRAGMA_OACC_ATOMIC.
4979
2adfab87
AM
49802015-10-29 Andrew MacLeod <amacleod@redhat.com>
4981
4982 * c-array-notation.c: Reorder #include's and remove duplicates.
4983 * c-aux-info.c: Likewise.
4984 * c-convert.c: Likewise.
4985 * c-decl.c: Likewise.
4986 * c-errors.c: Likewise.
4987 * c-lang.c: Likewise.
4988 * c-objc-common.c: Likewise.
4989 * c-parser.c: Likewise.
4990 * c-typeck.c: Likewise.
4991
e922069e
JW
49922015-10-26 Jim Wilson <jim.wilson@linaro.org>
4993
4994 PR debug/66068
4995 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
4996 after calling build_qualified_type.
4997
765dd391
CP
49982015-10-27 Cesar Philippidis <cesar@codesourcery.com>
4999 Thomas Schwinge <thomas@codesourcery.com>
5000 James Norris <jnorris@codesourcery.com>
5001 Joseph Myers <joseph@codesourcery.com>
5002 Julian Brown <julian@codesourcery.com>
5003 Bernd Schmidt <bschmidt@redhat.com>
5004
5005 * c-parser.c (c_parser_oacc_shape_clause): New.
5006 (c_parser_oacc_simple_clause): New.
5007 (c_parser_oacc_all_clauses): Add auto, gang, seq, vector, worker.
5008 (OACC_LOOP_CLAUSE_MASK): Add gang, worker, vector, auto, seq.
5009
88bae6f4
TS
50102015-10-27 Thomas Schwinge <thomas@codesourcery.com>
5011 James Norris <jnorris@codesourcery.com>
5012 Cesar Philippidis <cesar@codesourcery.com>
5013
5014 PR c/64765
5015 PR c/64880
5016 * c-parser.c (c_parser_oacc_loop): Add mask, cclauses formal
5017 parameters, and handle these. Adjust all users.
5018 (c_parser_oacc_kernels, c_parser_oacc_parallel): Merge functions
5019 into...
5020 (c_parser_oacc_kernels_parallel): ... this new function. Adjust
5021 all users.
5022 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels): Don't
5023 declare functions.
5024 (c_finish_omp_construct): Declare function.
5025 * c-typeck.c (c_finish_oacc_parallel, c_finish_oacc_kernels):
5026 Merge functions into...
5027 (c_finish_omp_construct): ... this new function.
5028
a8fc2579
RB
50292015-10-22 Richard Biener <rguenther@suse.de>
5030
5031 * c-typeck.c (c_finish_omp_clauses): Properly convert operands
5032 before folding a MINUS_EXPR.
5033
e9122ef6
MP
50342015-10-21 Marek Polacek <polacek@redhat.com>
5035
5036 PR c/68024
5037 * c-decl.c (start_function): Warn about vararg functions without
5038 a prototype.
5039
9f47c7e5
IE
50402015-10-21 Ilya Enkovich <enkovich.gnu@gmail.com>
5041
5042 * c-typeck.c (build_conditional_expr): Use boolean vector
5043 type for vector comparison.
5044 (build_vec_cmp): New.
5045 (build_binary_op): Use build_vec_cmp for comparison.
5046
fa60eeb9
MP
50472015-10-20 Marek Polacek <polacek@redhat.com>
5048
5049 * c-parser.c (is_cilkplus_vector_p): Don't define here.
5050
2c7020eb
MP
50512015-10-20 Marek Polacek <polacek@redhat.com>
5052
5053 PR c/67964
5054 * c-parser.c (c_parser_attributes): Break out of the loop if the
5055 token after an attribute isn't a comma.
5056
d9a6bd32
JJ
50572015-10-13 Jakub Jelinek <jakub@redhat.com>
5058 Aldy Hernandez <aldyh@redhat.com>
5059
5060 * c-parser.c (c_parser_pragma): Handle PRAGMA_OMP_ORDERED here.
5061 (c_parser_omp_clause_name): Handle OpenMP 4.5 clauses.
5062 (c_parser_omp_variable_list): Handle structure elements for
5063 map, to and from clauses. Handle array sections in reduction
5064 clause. Formatting fixes.
5065 (c_parser_omp_clause_if): Add IS_OMP argument, handle parsing of
5066 if clause modifiers.
5067 (c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
5068 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
5069 c_parser_omp_clause_defaultmap, c_parser_omp_clause_use_device_ptr,
5070 c_parser_omp_clause_is_device_ptr): New functions.
5071 (c_parser_omp_clause_ordered): Parse optional parameter.
5072 (c_parser_omp_clause_reduction): Handle array reductions.
5073 (c_parser_omp_clause_schedule): Parse optional simd modifier.
5074 (c_parser_omp_clause_nogroup, c_parser_omp_clause_orderedkind): New
5075 functions.
5076 (c_parser_omp_clause_linear): Parse linear clause modifiers.
5077 (c_parser_omp_clause_depend_sink): New function.
5078 (c_parser_omp_clause_depend): Parse source/sink depend kinds.
5079 (c_parser_omp_clause_map): Parse release/delete map kinds and
5080 optional always modifier.
5081 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_if
5082 and c_finish_omp_clauses callers.
5083 (c_parser_omp_all_clauses): Likewise. Parse OpenMP 4.5 clauses.
5084 Parse "to" as OMP_CLAUSE_TO_DECLARE if on declare target directive.
5085 (c_parser_oacc_cache): Adjust c_finish_omp_clauses caller.
5086 (OMP_CRITICAL_CLAUSE_MASK): Define.
5087 (c_parser_omp_critical): Parse critical clauses.
5088 (c_parser_omp_for_loop): Handle doacross loops, adjust
5089 c_finish_omp_for and c_finish_omp_clauses callers.
5090 (OMP_SIMD_CLAUSE_MASK): Add simdlen clause.
5091 (c_parser_omp_simd): Allow ordered clause if it has no parameter.
5092 (OMP_FOR_CLAUSE_MASK): Add linear clause.
5093 (c_parser_omp_for): Disallow ordered clause when combined with
5094 distribute. Disallow linear clause when combined with distribute
5095 and not combined with simd.
5096 (OMP_ORDERED_CLAUSE_MASK, OMP_ORDERED_DEPEND_CLAUSE_MASK): Define.
5097 (c_parser_omp_ordered): Add CONTEXT argument, remove LOC argument,
5098 parse clauses and if depend clause is found, don't parse a body.
5099 (c_parser_omp_parallel): Disallow copyin clause on target parallel.
5100 Allow target parallel without for after it.
5101 (OMP_TASK_CLAUSE_MASK): Add priority clause.
5102 (OMP_TARGET_DATA_CLAUSE_MASK): Add use_device_ptr clause.
5103 (c_parser_omp_target_data): Diagnose no map clauses or clauses with
5104 invalid kinds.
5105 (OMP_TARGET_UPDATE_CLAUSE_MASK): Add depend and nowait clauses.
5106 (OMP_TARGET_ENTER_DATA_CLAUSE_MASK,
5107 OMP_TARGET_EXIT_DATA_CLAUSE_MASK): Define.
5108 (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): New
5109 functions.
5110 (OMP_TARGET_CLAUSE_MASK): Add depend, nowait, private, firstprivate,
5111 defaultmap and is_device_ptr clauses.
5112 (c_parser_omp_target): Parse target parallel and target simd. Set
5113 OMP_TARGET_COMBINED on combined constructs. Parse target enter data
5114 and target exit data. Diagnose invalid map kinds.
5115 (OMP_DECLARE_TARGET_CLAUSE_MASK): Define.
5116 (c_parser_omp_declare_target): Parse OpenMP 4.5 forms of this
5117 construct.
5118 (c_parser_omp_declare_reduction): Use STRIP_NOPS when checking for
5119 &omp_priv.
5120 (OMP_TASKLOOP_CLAUSE_MASK): Define.
5121 (c_parser_omp_taskloop): New function.
5122 (c_parser_omp_construct): Don't handle PRAGMA_OMP_ORDERED here,
5123 handle PRAGMA_OMP_TASKLOOP.
5124 (c_parser_cilk_for): Adjust c_finish_omp_clauses callers.
5125 * c-tree.h (c_finish_omp_clauses): Add two new arguments.
5126 * c-typeck.c (handle_omp_array_sections_1): Fix comment typo.
5127 Add IS_OMP argument, handle structure element bases, diagnose
5128 bitfields, pass IS_OMP recursively, diagnose known zero length
5129 array sections in depend clauses, handle array sections in reduction
5130 clause, diagnose negative length even for pointers.
5131 (handle_omp_array_sections): Add IS_OMP argument, use auto_vec for
5132 types, pass IS_OMP down to handle_omp_array_sections_1, handle
5133 array sections in reduction clause, set
5134 OMP_CLAUSE_MAP_MAYBE_ZERO_LENGTH_ARRAY_SECTION if map could be zero
5135 length array section, use GOMP_MAP_FIRSTPRIVATE_POINTER for IS_OMP.
5136 (c_finish_omp_clauses): Add IS_OMP and DECLARE_SIMD arguments.
5137 Handle new OpenMP 4.5 clauses and new restrictions for the old ones.
5138
21ba0cea
MP
51392015-10-06 Marek Polacek <polacek@redhat.com>
5140
5141 * c-parser.c (c_parser_statement_after_labels): Use
5142 protected_set_expr_location.
5143 (c_parser_omp_clause_num_gangs): Likewise.
5144 (c_parser_omp_clause_num_threads): Likewise.
5145 (c_parser_omp_clause_num_workers): Likewise.
5146 (c_parser_omp_clause_vector_length): Likewise.
5147 (c_parser_omp_clause_num_teams): Likewise.
5148 (c_parser_omp_clause_thread_limit): Likewise.
5149 * c-typeck.c (build_c_cast): Likewise.
5150 (c_cast_expr): Likewise.
5151
624d31fe
RS
51522015-10-05 Richard Sandiford <richard.sandiford@arm.com>
5153
5154 * c-typeck.c (c_tree_equal): Use real_equal instead of
5155 REAL_VALUES_EQUAL.
5156
b8fd7909
JM
51572015-10-04 Jason Merrill <jason@redhat.com>
5158
5159 * c-parser.c (c_lex_one_token): Handle @synchronized.
5160 * c-decl.c (match_builtin_function_types): A declaration of a built-in
5161 can change whether the function is transaction_safe.
5162
1c7485af
MP
51632015-10-02 Marek Polacek <polacek@redhat.com>
5164
5165 PR c/67730
5166 * c-typeck.c (convert_for_assignment): Use the expansion point
5167 location throughout.
5168
3e3b8d63
MP
51692015-10-02 Marek Polacek <polacek@redhat.com>
5170
5171 PR c/64249
5172 * c-parser.c (c_parser_statement_after_labels): Add CHAIN parameter
5173 and pass it down to c_parser_if_statement.
5174 (c_parser_else_body): Add CHAIN parameter and pass it down to
5175 c_parser_statement_after_labels.
5176 (c_parser_if_statement): Add CHAIN parameter. Add code to warn about
5177 duplicated if-else-if conditions.
5178
aabef2de
MP
51792015-10-01 Marek Polacek <polacek@redhat.com>
5180
5181 * c-typeck.c (convert_for_assignment): Improve commentary.
5182
de8ddd5f
MP
51832015-09-30 Marek Polacek <polacek@redhat.com>
5184
5185 PR c/67730
5186 * c-typeck.c (c_finish_return): Use the expansion point location for
5187 certain "return with value" warnings.
5188
c4914de6
MLI
51892015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
5190
5191 * c-parser.c (pragma_lex): Add loc argument.
5192
0e36f5c7
MP
51932015-09-15 Marek Polacek <polacek@redhat.com>
5194
5195 PR c/67580
5196 * c-decl.c (tag_exists_p): New function.
5197 * c-parser.c (c_parser_declaration_or_fndef): Give a hint when
5198 struct/union/enum keywords are missing.
5199 * c-tree.h (tag_exists_p): Declare.
5200
2f3bb934
MP
52012015-09-15 Marek Polacek <polacek@redhat.com>
5202
5203 * c-decl.c (lookup_label): Return NULL_TREE instead of 0.
5204 (lookup_tag): Change the type of THISLEVEL_ONLY to bool.
5205 Return NULL_TREE instead of 0.
5206 (lookup_name): Return NULL_TREE instead of 0.
5207 (lookup_name_in_scope): Likewise.
5208 (shadow_tag_warned): Use true instead of 1 and NULL_TREE instead of 0.
5209 (parser_xref_tag): Use false instead of 0.
5210 (start_struct): Use true instead of 1.
5211 (start_enum): Use true instead of 1 and NULL_TREE instead of 0.
5212
aa256c4a
MP
52132015-09-14 Marek Polacek <polacek@redhat.com>
5214
5215 * c-typeck.c (set_nonincremental_init_from_string): Use
5216 HOST_WIDE_INT_M1U when shifting a negative value.
5217
dbb68221
MW
52182015-09-09 Mark Wielaard <mjw@redhat.com>
5219
5220 * c-typeck.c (build_binary_op): Check and warn when nonnull arg
5221 parm against NULL.
5222
a8a098ac
JJ
52232015-09-10 Jakub Jelinek <jakub@redhat.com>
5224
5225 PR c/67502
5226 * c-parser.c (c_parser_omp_for_loop): Emit DECL_EXPR stmts
5227 into OMP_FOR_PRE_BODY rather than before the loop.
5228
f4b189d5
JJ
52292015-09-09 Jakub Jelinek <jakub@redhat.com>
5230
0bb99c11
JJ
5231 PR c/67501
5232 * c-parser.c (c_parser_oacc_all_clauses,
5233 c_parser_omp_all_clauses): Remove invalid clause from
5234 list of clauses even if parser->error is set.
5235
fce5e5e3
JJ
5236 PR c/67500
5237 * c-parser.c (c_parser_omp_clause_aligned,
5238 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen): Fix up
5239 test for errors.
5240 * c-decl.c (temp_pop_parm_decls): Allow b->decl equal to
5241 error_mark_node.
5242
f4b189d5
JJ
5243 PR c/67495
5244 * c-parser.c (c_parser_omp_atomic): Use c_parser_cast_expression
5245 instead of c_parser_unary_expression. If the result is !lvalue_p,
5246 wrap the result of c_fully_fold into NON_LVALUE_EXPR.
5247
b2aaf235
MP
52482015-09-04 Marek Polacek <polacek@redhat.com>
5249
5250 PR sanitizer/67279
5251 * c-typeck.c (build_binary_op): Don't instrument static initializers.
5252
1807ffc1
MS
52532015-09-03 Martin Sebor <msebor@redhat.com>
5254
5255 PR c/66516
8b652e65
JJ
5256 * c-typeck.c (convert_arguments, parser_build_unary_op,
5257 build_conditional_expr, c_cast_expr, convert_for_assignment,
5258 build_binary_op, _objc_common_truthvalue_conversion): Call
1807ffc1
MS
5259 reject_gcc_builtin.
5260 (c_decl_implicit): Define.
5261
d04ff417
MP
52622015-09-02 Marek Polacek <polacek@redhat.com>
5263
5264 PR c/67432
5265 * c-parser.c (c_parser_enum_specifier): Give a better error for
5266 an empty enum.
5267
a79683d5
TS
52682015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
5269
5270 * c-aux-info.c, c-parser.c, c-tree.h: Remove useless typedefs.
5271
191a6b94
MP
52722015-08-12 Marek Polacek <polacek@redhat.com>
5273
5274 * c-decl.c (grokdeclarator): Call error_at instead of error and pass
5275 LOC to it.
5276
420a9d9b
MP
52772015-08-03 Marek Polacek <polacek@redhat.com>
5278
5279 PR c/67088
5280 * c-decl.c (check_bitfield_type_and_width): Add location parameter.
5281 Use it.
5282 (grokdeclarator): Pass LOC down to check_bitfield_type_and_width.
5283
992118a1
PP
52842015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
5285
5286 * c-parser.c (c_parser_if_body): Take token_indent_info
5287 argument. Call warn_for_misleading_indentation even when the
5288 body is a semicolon. Extract token_indent_infos corresponding
5289 to the guard, body and next tokens. Adjust call to
5290 warn_for_misleading_indentation accordingly.
5291 (c_parser_else_body): Likewise.
5292 (c_parser_if_statement): Likewise.
5293 (c_parser_while_statement): Likewise.
5294 (c_parser_for_statement): Likewise.
5295
46308474
LFSM
52962015-07-28 Luis Felipe Strano Moraes <luis.strano@gmail.com>
5297 Manuel López-Ibáñez <manu@gcc.gnu.org>
5298
5299 * c-decl.c (get_parm_info): Remove static var. Update warning
5300 message.
5301
05b28fd6
MP
53022015-07-27 Marek Polacek <polacek@redhat.com>
5303
5304 PR c++/66555
5305 PR c/54979
5306 * c-typeck.c (parser_build_binary_op): Call warn_tautological_cmp.
5307
451b5e48
MP
53082015-07-20 Marek Polacek <polacek@redhat.com>
5309
5310 PR c++/55095
5311 * c-typeck.c (digest_init): Pass OPT_Wpedantic to pedwarn_init.
5312 (build_binary_op): Warn about left shift overflows.
5313
1916bcb5
AM
53142015-07-09 Andrew MacLeod <amacleod@redhat.com>
5315
5316 * c-array-notation.c: Adjust includes for flags.h changes.
5317 * c-objc-common.c: Likewise.
5318
c7131fb2
AM
53192015-07-07 Andrew MacLeod <amacleod@redhat.com>
5320
5321 * c-array-notation.c: Adjust includes.
5322 * c-aux-info.c: Likewise.
5323 * c-convert.c: Likewise.
5324 * c-decl.c: Likewise.
5325 * c-errors.c: Likewise.
5326 * c-lang.c: Likewise.
5327 * c-objc-common.c: Likewise.
5328 * c-parser.c: Likewise.
5329 * c-typeck.c: Likewise.
5330
da2e71c9
MLI
53312015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
5332
5333 PR fortran/66605
5334 * c-decl.c (finish_function): Call do_warn_unused_parameter.
5335
b155cfd9
MP
53362015-06-29 Marek Polacek <polacek@redhat.com>
5337
5338 PR c/66322
5339 * c-typeck.c (struct c_switch): Add BOOL_COND_P and OUTSIDE_RANGE_P.
5340 (c_start_case): Set BOOL_COND_P and OUTSIDE_RANGE_P. Don't warn
5341 about -Wswitch-bool here.
5342 (do_case): Update c_add_case_label call.
5343 (c_finish_case): Update c_do_switch_warnings call.
5344
31521951
MP
53452015-06-27 Marek Polacek <polacek@redhat.com>
5346
5347 * c-typeck.c: Use VECTOR_TYPE_P throughout.
5348
22d03525
MP
53492015-06-26 Marek Polacek <polacek@redhat.com>
5350
5351 * c-array-notation.c (fix_builtin_array_notation_fn): Use
5352 INDIRECT_REF_P.
5353 * c-typeck.c (array_to_pointer_conversion): Likewise.
5354 (build_unary_op): Likewise.
5355 (c_finish_return): Likewise.
5356
f0889939
AM
53572015-06-25 Andrew MacLeod <amacleod@redhat.com>
5358
5359 * c-decl.c: Remove ipa-ref.h and plugin-api.h from include list.
5360 * c-parser.c: Likewise.
5361
8d67ee55
RS
53622015-06-25 Richard Sandiford <richard.sandiford@arm.com>
5363
5364 * c-decl.c (detect_field_duplicates_hash): Use nofree_ptr_hash
5365 instead of pointer_hash.
5366 (detect_field_duplicates): Likewise.
5367
0ae9bd27
MP
53682015-06-25 Marek Polacek <polacek@redhat.com>
5369
5370 * c-array-notation.c: Use VAR_P throughout.
5371 * c-decl.c: Likewise.
5372 * c-objc-common.c: Likewise.
5373 * c-parser.c: Likewise.
5374 * c-typeck.c: Likewise.
5375
62f9079a
MP
53762015-06-25 Marek Polacek <polacek@redhat.com>
5377
5378 * c-decl.c: Use is_global_var throughout.
5379 * c-parser.c: Likewise.
5380 * c-typeck.c: Likewise.
5381
abb226c9
AM
53822015-06-17 Andrew MacLeod <amacleod@redhat.com>
5383
5384 * c-array-notation.c: Do not include input.h, line-map.h or is-a.h.
5385 * c-aux-info.c: Likewise.
5386 * c-convert.c: Likewise.
5387 * c-decl.c: Likewise.
5388 * c-errors.c: Likewise.
5389 * c-lang.c: Likewise.
5390 * c-objc-common.c: Likewise.
5391 * c-parser.c: Likewise.
5392 * c-typeck.c: Likewise.
5393
8cbababc
JH
53942015-06-11 Jan Hubicka <hubicka@ucw.cz>
5395
5396 PR middle-end/66325
5397 * c-decl.c (start_enum): Set TYPE_PACKED consistently among type
5398 variants.
5399
a0349665
PMR
54002015-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
5401
5402 * c-decl.c (pop_scope): Register the main translation unit
5403 through the new debug hook.
5404
13fdf2e2
AM
54052015-06-08 Andrew MacLeod <amacleod@redhat.com>
5406
5407 * c-array-notation.c : Adjust include files.
5408 * c-aux-info.c : Likewise.
5409 * c-convert.c : Likewise.
5410 * c-decl.c : Likewise.
5411 * c-errors.c : Likewise.
5412 * c-lang.c : Likewise.
5413 * c-lang.h : Likewise.
5414 * c-objc-common.c : Likewise.
5415 * c-parser.c : Likewise.
5416 * c-typeck.c : Likewise.
5417
d7438551
AH
54182015-06-05 Aldy Hernandez <aldyh@redhat.com>
5419
5420 * c-decl.c (finish_struct): Save C_TYPE_INCOMPLETE_VARS and
5421 immediately clobber it.
5422 (c_write_global_declarations_1): Remove call to
5423 check_global_declaration_1.
5424 (c_write_global_declarations_2): Remove.
5425 (c_write_final_cleanups): Rename from c_write_global_declarations.
5426 Remove call to finalize_compilation_unit.
5427 Remove calls to debugging hooks.
5428 * c-objc-common.c: Adjust comment for c_warn_unused_global_decl.
5429 * c-objc-common.h: Remove LANG_HOOKS_WRITE_GLOBALS.
5430 * c-tree.h: Remove c_write_global_declarations.
5431
ecb9f223
AM
54322015-06-04 Andrew MacLeod <amacleod@redhat.com>
5433
5434 * c-array-notation.c: Adjust includes for restructured coretypes.h.
5435 * c-aux-info.c: Likewise.
5436 * c-convert.c: Likewise.
5437 * c-decl.c: Likewise.
5438 * c-errors.c: Likewise.
5439 * c-lang.c: Likewise.
5440 * c-objc-common.c: Likewise.
5441 * c-parser.c: Likewise.
5442 * c-typeck.c: Likewise.
5443
9482b620
MP
54442015-06-04 Marek Polacek <polacek@redhat.com>
5445
5446 PR c/66341
5447 * c-typeck.c (build_c_cast): Wrap VALUE into NON_LVALUE_EXPR if
5448 it is a lvalue.
5449
bc51ace3
PK
54502015-06-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
5451
5452 * c-decl.c (warn_cxx_compat_finish_struct): New parameters code, record_loc.
5453 Warn for empty struct.
5454 (finish_struct): Pass TREE_CODE(t) and loc to warn_cxx_compat_finish_struct.
5455
ea5b45b6
AT
54562015-06-02 Andres Tiraboschi <andres.tiraboschi@tallertechnologies.com>
5457
5458 * c-decl.c (start_function): Call plugin before parsing.
5459 (finish_function): Call plugin after parsing.
5460
c2d47482
PK
54612015-06-02 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
5462
5463 PR c/49551
5464 * c-decl.c (merge_decls): Merge DECL_COMMON.
5465
a95492ab
JW
54662015-05-22 Jim Wilson <jim.wilson@linaro.org>
5467
5468 * Make-lang.in (check_gcc_pallelize): Define.
5469
fd5c817a
MP
54702015-05-22 Marek Polacek <polacek@redhat.com>
5471
5472 PR c/47043
5473 * c-parser.c (c_parser_enum_specifier): Parse and apply enumerator
5474 attributes.
5475
c7b70a3c
MP
54762015-05-21 Marek Polacek <polacek@redhat.com>
5477
5478 * c-typeck.c (inform_declaration): Use DECL_IS_BUILTIN instead of
5479 DECL_BUILT_IN.
5480
21b634ae
MP
54812015-05-20 Marek Polacek <polacek@redhat.com>
5482
5483 * c-decl.c: Use VAR_OR_FUNCTION_DECL_P throughout.
5484 * c-typeck.c: Likewise.
5485
296a8c2f
MP
54862015-05-19 Marek Polacek <polacek@redhat.com>
5487
5488 * c-typeck.c (start_init): Use AGGREGATE_TYPE_P.
5489
41b37d5e
JJ
54902015-05-19 Jakub Jelinek <jakub@redhat.com>
5491
5492 PR middle-end/66199
5493 * c-parser.c (c_parser_omp_for_loop): Don't add
5494 OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
5495 OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
5496 (c_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
5497 constructs.
5498
fab27f52
MM
54992015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
5500
5501 * c-typeck.c (build_array_ref): Use std::swap instead of explicit
296a8c2f 5502 swaps.
fab27f52 5503
40de31cf
MLI
55042015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
5505
5506 PR fortran/44054
5507 * c-objc-common.c (c_tree_printer): Replace locus pointer with
5508 accessor function.
5509
3aa3c9fc
MP
55102015-05-14 Marek Polacek <polacek@redhat.com>
5511
5512 PR c/66066
5513 PR c/66127
5514 * c-typeck.c (digest_init): Call pedwarn_init with OPT_Wpedantic
5515 rather than with 0.
5516
c3388e62
DM
55172015-05-12 David Malcolm <dmalcolm@redhat.com>
5518
5519 * c-parser.c (c_parser_if_body): Add param "if_loc", use it
5520 to add a call to warn_for_misleading_indentation.
5521 (c_parser_else_body): Likewise, adding param "else_loc".
5522 (c_parser_if_statement): Check for misleading indentation.
5523 (c_parser_while_statement): Likewise.
5524 (c_parser_for_statement): Likewise.
5525
755e528f
MP
55262015-05-08 Marek Polacek <polacek@redhat.com>
5527
5528 PR c/64918
5529 * c-typeck.c (add_pending_init): Use OPT_Woverride_init_side_effects.
5530 (output_init_element): Likewise.
5531
0173bd2a
MP
55322015-05-07 Marek Polacek <polacek@redhat.com>
5533
5534 PR c/65179
5535 * c-typeck.c (build_binary_op): Warn when left shifting a negative
5536 value.
5537
9babc352
MP
55382015-04-30 Marek Polacek <polacek@redhat.com>
5539
5540 * c-typeck.c (set_init_label): Call error_at instead of error and
5541 pass LOC to it.
5542
ac9f18db
MP
5543 * c-typeck.c (c_incomplete_type_error): Refactor to use %qT. Print
5544 the type of a decl.
5545
ec3fba51
MP
5546 * c-typeck.c (c_build_va_arg): Clarify the error message.
5547
b811915d
TS
55482015-04-29 Thomas Schwinge <thomas@codesourcery.com>
5549
5550 * c-parser.c (c_parser_oacc_enter_exit_data): Use
5551 OMP_STANDALONE_CLAUSES.
5552
f3075008
MP
55532015-04-28 Marek Polacek <polacek@redhat.com>
5554
5555 * c-parser.c (c_parser_binary_expression): Remove duplicate line.
5556
4e81b788
MP
55572015-04-28 Marek Polacek <polacek@redhat.com>
5558
5559 PR c/65901
5560 * c-typeck.c (c_build_va_arg): Require TYPE be a complete type.
5561
6c1db78e
MP
55622015-04-25 Marek Polacek <polacek@redhat.com>
5563
5564 PR c/52085
5565 * c-decl.c (finish_enum): Copy over TYPE_ALIGN. Also check for "mode"
5566 attribute.
5567
5c4abbb8
MP
55682015-04-23 Marek Polacek <polacek@redhat.com>
5569
5570 PR c/65345
5571 * c-decl.c (set_labels_context_r): New function.
5572 (store_parm_decls): Call it via walk_tree_without_duplicates.
5573 * c-typeck.c (convert_lvalue_to_rvalue): Use create_tmp_var_raw
5574 instead of create_tmp_var. Build TARGET_EXPR instead of
5575 COMPOUND_EXPR.
5576 (build_atomic_assign): Use create_tmp_var_raw instead of
5577 create_tmp_var. Build TARGET_EXPRs instead of MODIFY_EXPR.
5578
06aca1d5
IV
55792015-04-20 Ilya Verbin <ilya.verbin@intel.com>
5580
5581 * c-parser.c (c_parser_oacc_enter_exit_data): Remove excess semicolon.
5582 (c_parser_omp_target_update): Add missed %> to error_at ().
5583
8fba1830
BRF
55842015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
5585
5586 PR target/55143
5587 * c-decl.c (c_default_pointer_mode): Remove definition.
5588 * c-tree.h (c_default_pointer_mode): Remove declaration.
5589
62021f64
TB
55902015-03-27 Tobias Burnus <burnus@net-b.de>
5591
5592 PR c/65586
5593 * c-parser.c (c_parser_skip_to_pragma_eol): Optionally, don't
5594 error out.
5595 (c_parser_omp_for, c_parser_omp_parallel, c_parser_omp_distribute,
5596 c_parser_omp_teams, c_parser_omp_target, c_parser_omp_declare):
5597 Update calls to not error for skipped omp pragmas with -fopenmp-simd.
5598
9b65e171
JJ
55992015-03-19 Jakub Jelinek <jakub@redhat.com>
5600
5601 * c-decl.c (c_decl_attributes): Also add "omp declare target"
5602 attribute for DECL_EXTERNAL VAR_DECLs.
5603
17958621
JJ
56042015-03-11 Jakub Jelinek <jakub@redhat.com>
5605
5606 * c-parser.c (c_parse_init): Don't call xstrdup on get_identifier
5607 argument.
5608
7ccb1a11
JJ
56092015-03-10 Jakub Jelinek <jakub@redhat.com>
5610
5611 PR c/65120
5612 * c-typeck.c (parser_build_binary_op): Check for tcc_comparison
5613 before preparing arguments to warn_logical_not_parentheses.
5614
01177669
JJ
56152015-03-09 Jakub Jelinek <jakub@redhat.com>
5616
5617 PR c/65120
5618 * c-typeck.c (parser_build_binary_op): Don't warn for
5619 !!x == y or !b == y where b is _Bool.
5620
802ac282
MP
56212015-03-09 Marek Polacek <polacek@redhat.com>
5622
5623 * c-convert.c (convert): Make use of do_ubsan_in_current_function.
5624 * c-decl.c (grokdeclarator): Likewise.
5625 * c-typeck.c (build_binary_op): Likewise.
5626
e5165b60
MP
56272015-02-27 Marek Polacek <polacek@redhat.com>
5628
5629 PR c/65228
5630 * c-decl.c (start_decl): Return NULL_TREE if decl is an error node.
5631
065d214c
MP
56322015-02-14 Marek Polacek <polacek@redhat.com>
5633
5634 PR c/64768
5635 * c-decl.c (grokdeclarator): Set the range of a flexible array member
5636 declared through a typedef name.
5637
e5d9235b
MP
56382015-02-13 Marek Polacek <polacek@redhat.com>
5639
5640 PR c/65050
5641 * c-decl.c (grokdeclarator): Print also the type when giving
5642 the error message about array's incomplete element type.
5643
fa01ffcc
JJ
56442015-02-11 Jakub Jelinek <jakub@redhat.com>
5645
5646 PR c/64824
5647 * c-parser.c (c_parser_binary_expression): Fix OpenMP stack[sp].prec
5648 check in the POP macro.
5649
c3e38a03
MP
56502015-02-09 Marek Polacek <polacek@redhat.com>
5651
5652 PR c/64856
5653 * c-typeck.c (process_init_element): Don't always wrap
5654 COMPOUND_LITERAL_EXPR in a SAVE_EXPR in C99 mode when
5655 initializing a range of elements.
5656
4886ec8e
JJ
56572015-02-04 Jakub Jelinek <jakub@redhat.com>
5658
5659 PR c/64824
5660 PR c/64868
5661 * c-parser.c (c_parser_omp_atomic): Handle RDIV_EXPR.
5662
c3e38a03 56632015-02-02 Bruno Loff <bruno.loff@gmail.com>
a4bb6959
BL
5664
5665 * c-parser.c (c_parser_declspecs): Call invoke_plugin_callbacks after
5666 processing enum declaration.
5667
7b33f0c8
MP
56682015-01-29 Marek Polacek <polacek@redhat.com>
5669
5670 PR c/64709
5671 * c-typeck.c (pop_init_level): If constructor_elements has
5672 exactly one element with integer_zerop value, set constructor_zeroinit
5673 to 1. Remove braces around warning_init call.
5674
dea63e49
JJ
56752015-01-27 Jakub Jelinek <jakub@redhat.com>
5676
5677 PR c/64766
5678 * c-typeck.c (store_init_value): Don't overwrite DECL_INITIAL
5679 of FUNCTION_DECLs with error_mark_node.
5680
d38f7dce
JJ
56812015-01-26 Jakub Jelinek <jakub@redhat.com>
5682
5683 PR c/64778
5684 * c-typeck.c (convert_arguments): Return -1 if there are
5685 error_args, even if we've diagnosed too many arguments.
5686
cbf5d0e7
RB
56872015-01-21 Richard Biener <rguenther@suse.de>
5688
5689 PR middle-end/64313
5690 * c-decl.c (merge_decls): Call set_builtin_decl_declared_p
5691 for builtins the user declared correctly.
5692
41dbbb37
TS
56932015-01-15 Thomas Schwinge <thomas@codesourcery.com>
5694 Bernd Schmidt <bernds@codesourcery.com>
5695 Cesar Philippidis <cesar@codesourcery.com>
5696 James Norris <jnorris@codesourcery.com>
5697 Jakub Jelinek <jakub@redhat.com>
5698 Ilmir Usmanov <i.usmanov@samsung.com>
5699
5700 * c-parser.c: Include "gomp-constants.h".
5701 (c_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
5702 omp_clause_map_kind. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
5703 Use OMP_CLAUSE_SET_MAP_KIND.
5704 (c_parser_pragma): Handle PRAGMA_OACC_ENTER_DATA,
5705 PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_UPDATE.
5706 (c_parser_omp_construct): Handle PRAGMA_OACC_CACHE,
5707 PRAGMA_OACC_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP,
5708 PRAGMA_OACC_PARALLEL, PRAGMA_OACC_WAIT.
5709 (c_parser_omp_clause_name): Handle "auto", "async", "copy",
5710 "copyout", "create", "delete", "deviceptr", "gang", "host",
5711 "num_gangs", "num_workers", "present", "present_or_copy", "pcopy",
5712 "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
5713 "present_or_create", "pcreate", "seq", "self", "vector",
5714 "vector_length", "wait", "worker".
5715 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
5716 (OACC_ENTER_DATA_CLAUSE_MASK, OACC_EXIT_DATA_CLAUSE_MASK)
5717 (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
5718 (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
5719 (c_parser_omp_variable_list): Handle OMP_CLAUSE__CACHE_.
5720 (c_parser_oacc_wait_list, c_parser_oacc_data_clause)
5721 (c_parser_oacc_data_clause_deviceptr)
5722 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_workers)
5723 (c_parser_oacc_clause_async, c_parser_oacc_clause_wait)
5724 (c_parser_omp_clause_vector_length, c_parser_oacc_all_clauses)
5725 (c_parser_oacc_cache, c_parser_oacc_data, c_parser_oacc_kernels)
5726 (c_parser_oacc_enter_exit_data, c_parser_oacc_loop)
5727 (c_parser_oacc_parallel, c_parser_oacc_update)
5728 (c_parser_oacc_wait): New functions.
5729 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels)
5730 (c_finish_oacc_data): New prototypes.
5731 * c-typeck.c: Include "gomp-constants.h".
5732 (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR. Use
5733 GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use
5734 OMP_CLAUSE_SET_MAP_KIND.
5735 (c_finish_oacc_parallel, c_finish_oacc_kernels)
5736 (c_finish_oacc_data): New functions.
5737 (c_finish_omp_clauses): Handle OMP_CLAUSE__CACHE_,
5738 OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS,
5739 OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_ASYNC, OMP_CLAUSE_WAIT,
5740 OMP_CLAUSE_AUTO, OMP_CLAUSE_SEQ, OMP_CLAUSE_GANG,
5741 OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR, and OMP_CLAUSE_MAP's
5742 GOMP_MAP_FORCE_DEVICEPTR.
5743
adfac8df
JJ
57442015-01-09 Michael Collison <michael.collison@linaro.org>
5745
5746 * c-array-notation.c: Include hash-set.h, machmode.h,
5747 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
5748 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
5749 * c-aux-info.c: Ditto.
5750 * c-convert.c: Ditto.
5751 * c-decl.c: Ditto.
5752 * c-errors.c: Ditto.
5753 * c-lang.c: Dittoxs.
5754 * c-objc-common.c: Ditto.
5755 * c-parser.c: Ditto.
5756 * c-typeck.c: Include hash-set.h, machmode.h,
5757 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
5758 fold-const.h, wide-int.h, inchash.h, real.h and
5759 fixed-value.h due to flattening of tree.h.
5760
2cc901dc
MP
57612015-01-07 Marek Polacek <polacek@redhat.com>
5762
5763 PR c/64417
5764 * c-typeck.c (process_init_element): Disallow initialization of
5765 a flexible array member with a string constant if the structure
5766 is in an array.
5767
5624e564
JJ
57682015-01-05 Jakub Jelinek <jakub@redhat.com>
5769
e5341100
JJ
5770 PR sanitizer/64344
5771 * c-typeck.c (convert_for_assignment, c_finish_return): For
5772 -fsanitize=float-cast-overflow casts from REAL_TYPE to integer/enum
5773 types also set in_late_binary_op around convert call.
5774 * c-convert.c (convert): For -fsanitize=float-cast-overflow REAL_TYPE
5775 to integral type casts, if not in_late_binary_op, pass c_fully_fold
5776 result on expr as last argument to ubsan_instrument_float_cast,
5777 if in_late_binary_op, don't use c_save_expr but save_expr.
5778
5624e564
JJ
5779 Update copyright years.
5780
5bd012f8
MP
57812015-01-05 Marek Polacek <polacek@redhat.com>
5782
5783 PR c/64423
5784 * c-typeck.c (build_array_ref): Pass loc down to
5785 warn_array_subscript_with_type_char.
5786
3f8257db 57872014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
768952be
MU
5788
5789 * c-typeck.c: New behavious for pointers to arrays with qualifiers
8e745a17 5790 (common-pointer-type): For pointers to arrays take qualifiers from
768952be 5791 element type.
8e745a17 5792 (build_conditional_expr): Add warnings for lost qualifiers.
768952be 5793 (comp-target-types): Allow pointers to arrays with different qualifiers.
8e745a17 5794 (convert-for-assignment): Adapt warnings for discarded qualifiers. Add
768952be 5795 WARNING_FOR_QUALIFIERS macro and rename WARN_FOR_QUALIFIERS
8e745a17 5796 to PEDWARN_FOR_QUALIFIERS.
768952be 5797
8f94a8c4
JJ
57982014-12-17 Jakub Jelinek <jakub@redhat.com>
5799
5800 PR sanitizer/64289
5801 * c-convert.c: Include ubsan.h.
5802 (convert): For real -> integral casts and
5803 -fsanitize=float-cast-overflow don't call convert_to_integer, but
5804 instead instrument the float cast directly.
5805
b731b390
JJ
58062014-11-29 Jakub Jelinek <jakub@redhat.com>
5807
5808 * c-typeck.c (convert_lvalue_to_rvalue, build_atomic_assign,
5809 c_finish_stmt_expr): Remove NULL last argument from
5810 create_tmp_var_raw and create_tmp_var calls.
5811 * c-array-notation.c (fix_builtin_array_notation_fn,
5812 build_array_notation_expr, fix_conditional_array_notations_1,
5813 fix_array_notation_expr, fix_array_notation_call_expr): Likewise.
5814
541e35a6
MP
58152014-11-28 Marek Polacek <polacek@redhat.com>
5816
5817 PR c/63862
5818 * c-typeck.c (build_binary_op) <RSHIFT_EXPR, LSHIFT_EXPR>: Don't
5819 convert the right operand to integer type.
5820
b286be94
MP
58212014-11-25 Marek Polacek <polacek@redhat.com>
5822
5823 PR c/63877
5824 * c-decl.c (start_function): Disable -Wmissing-declarations warning
5825 for inline functions.
5826
aa7da51a
JJ
58272014-11-21 Jakub Jelinek <jakub@redhat.com>
5828
5829 PR target/63764
5830 * c-typeck.c (build_array_ref): Adjust
5831 convert_vector_to_pointer_for_subscript caller. If it returns true,
5832 call non_lvalue_loc on the result.
5833
d876207f
RB
58342014-11-11 Richard Biener <rguenther@suse.de>
5835
5836 * c-decl.c (c_init_decl_processing): Do not set pedantic_lvalues
5837 to true.
5838
e5e44252
AK
58392014-11-10 Andi Kleen <ak@linux.intel.com>
5840
5841 PR c/60804
5842 * c-parser.c (c_parser_statement_after_labels): Call
5843 check_no_cilk.
5844 (c_parser_if_statement): Dito.
5845 (c_parser_switch_statement): Dito.
5846 (c_parser_while_statement): Dito.
5847 (c_parser_do_statement): Dito.
5848 (c_parser_for_statement): Dito.
5849 * c-typeck.c (c_finish_loop): Dito.
5850
13c21655
PC
58512014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
5852
5853 * c-typeck.c (build_binary_op): Use OPT_Wshift_count_negative and
5854 OPT_Wshift_count_overflow in the warnings.
5855
2d51fcef
MP
58562014-10-30 Marek Polacek <polacek@redhat.com>
5857
5858 * c-objc-common.c (c_tree_printer) <case 'T'>: For a typedef name,
5859 print the stripped version as well, if they're not the same.
5860
ef4bddc2
RS
58612014-10-29 Richard Sandiford <richard.sandiford@arm.com>
5862
5863 * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from
5864 machine_mode.
5865
c582198b
AM
58662014-10-28 Andrew MacLeod <amacleod@redhat.com>
5867
5868 * c-decl.c: Adjust include files.
5869 * c-parser.c: Ditto.
5870
ddc8de03
PM
58712014-10-27 Phil Muldoon <pmuldoon@redhat.com>
5872 Tom Tromey <tromey@redhat.com>
5873
5874 * c-tree.h (enum c_oracle_request): New.
5875 (c_binding_oracle_function): New typedef.
5876 (c_binding_oracle, c_pushtag, c_bind): Declare.
5877 * c-decl.c (c_binding_oracle): New global.
5878 (I_SYMBOL_CHECKED): New macro.
5879 (i_symbol_binding): New function.
5880 (I_SYMBOL_BINDING, I_SYMBOL_DECL): Redefine.
5881 (I_TAG_CHECKED): New macro.
5882 (i_tag_binding): New function.
5883 (I_TAG_BINDING, I_TAG_DECL): Redefine.
5884 (I_LABEL_CHECKED): New macro.
5885 (i_label_binding): New function.
5886 (I_LABEL_BINDING, I_LABEL_DECL): Redefine.
5887 (c_print_identifier): Save and restore c_binding_oracle.
5888 (c_pushtag, c_bind): New functions.
5889
60393bbc
AM
58902014-10-27 Andrew MacLeod <amacleod@redhat.com>
5891
5892 * c-typeck.c: Adjust include files.
5893
d723bb7c
MLI
58942014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
5895
5896 PR c++/53061
5897 * c-objc-common.c (c_objc_common_init): Do not do diagnostics
5898 initialization here...
5899 (c_initialize_diagnostics): ... but here. Set defaults after
5900 building pretty-printer.
5901
1bc5a451
MP
59022014-10-23 Marek Polacek <polacek@redhat.com>
5903
5904 PR c/63626
5905 * c-decl.c (pop_scope): Don't print warning in external_scope.
5906
4435bb92
MP
59072014-10-19 Marek Polacek <polacek@redhat.com>
5908
5909 PR c/63567
5910 * c-typeck.c (output_init_element): Allow initializing objects with
5911 static storage duration with compound literals even in C99 and add
5912 pedwarn for it.
5913
7278465e
MP
59142014-10-17 Marek Polacek <polacek@redhat.com>
5915
5916 PR c/63567
5917 * c-typeck.c (digest_init): Allow initializing objects with static
5918 storage duration with compound literals even in C99 and add pedwarn
5919 for it.
5920
d9b7be2e
MP
59212014-10-17 Marek Polacek <polacek@redhat.com>
5922
5923 PR c/63543
5924 * c-tree.h (C_TYPE_ERROR_REPORTED): Define.
5925 * c-typeck.c (build_indirect_ref): Don't print the "dereferencing..."
5926 error multiple times. Print the type.
5927
f406ae1f
MP
59282014-10-17 Marek Polacek <polacek@redhat.com>
5929
5930 PR c/63549
5931 * c-typeck.c (build_array_ref): Bail if the index in an incomplete
5932 type.
5933
92574c7c
MP
59342014-10-17 Marek Polacek <polacek@redhat.com>
5935
5936 * c-decl.c (grokdeclarator): Use OPT_Wimplicit_int unconditionally.
5937 (start_function): Use OPT_Wimplicit_int instead of 0.
5938 (store_parm_decls_oldstyle): Likewise.
5939
1bc4a978
MT
59402014-10-17 Alan Modra <amodra@gmail.com>
5941
5942 PR middle-end/61848
5943 * c-decl.c (merge_decls): Don't merge section name or tls model
5944 to newdecl symtab node, instead merge to olddecl. Override
5945 existing olddecl section name. Set tls_model for all thread-local
5946 vars, not just OMP thread-private ones. Remove incorrect comment.
5947
83685514
AM
59482014-10-16 Andrew MacLeod <amacleod@redhat.com>
5949
5950 * c-decl.c: Adjust include files.
5951
78a7c317
DD
59522014-10-14 DJ Delorie <dj@redhat.com>
5953
5954 * c-parser.c (c_parse_init): Add RID entries for each __intN.
5955 (c_token_starts_typename): Check all __intN, not just __int128.
5956 (c_token_starts_declspecs): Likewise.
5957 (c_parser_declspecs): Likewise.
5958 (c_parser_attribute_any_word): Likewise.
5959 (c_parser_objc_selector): Likewise.
5960 * c-tree.h (c_typespec_keyword): cts_int128 -> cts_int_n.
5961 (struct c_declspecs): Add int_n_idx field to record *which* __intN
5962 is specified.
5963 * c-decl.c (declspecs_add_type): Check for all __intN, not just
5964 __int128.
5965 (finish_declspecs): Likewise.
5966
74d98c1e
AB
59672014-10-13 Anthony Brandon <anthony.brandon@gmail.com>
5968
8e745a17 5969 * c-parser.c (c_parser_all_labels): New function to replace
74d98c1e 5970 the duplicate code.
8e745a17 5971 (c_parser_statement): Call the new function.
74d98c1e 5972
84937de2
MP
59732014-10-09 Marek Polacek <polacek@redhat.com>
5974
5975 PR c/63480
5976 * c-typeck.c (pop_init_level): Don't warn about initializing
5977 with { }.
5978
0382aaa0
MP
59792014-10-07 Marek Polacek <polacek@redhat.com>
5980
5981 PR c/59717
5982 * c-decl.c (header_for_builtin_fn): New function.
5983 (implicitly_declare): Suggest which header to include.
5984
7a0ca710
MP
59852014-10-07 Marek Polacek <polacek@redhat.com>
5986
5987 * c-convert.c (convert): Use error_operand_p.
5988 * c-typeck.c (require_complete_type): Likewise.
5989 (really_atomic_lvalue): Likewise.
5990 (digest_init): Likewise.
5991 (handle_omp_array_sections_1): Likewise.
5992
6bc8a126
MP
59932014-10-03 Marek Polacek <polacek@redhat.com>
5994
5995 PR c/63453
5996 * c-decl.c (pop_scope): Don't warn about "inline function declared
5997 but never defined" for functions marked with gnu_inline attribute.
5998
d90c0a59
JJ
59992014-09-25 Jakub Jelinek <jakub@redhat.com>
6000
6001 PR c++/63249
6002 * c-parser.c (c_parser_omp_variable_list): Call mark_exp_read
6003 on low_bound and length.
6004
083e891e
MP
60052014-09-24 Marek Polacek <polacek@redhat.com>
6006
6007 PR c/61405
6008 PR c/53874
6009 * c-parser.c: Don't define CPP_KEYWORD.
6010 (c_parser_switch_statement): Pass original type to c_finish_case.
6011 * c-tree.h (c_finish_case): Update declaration.
6012 * c-typeck.c (c_finish_case): Add TYPE parameter. Pass it
6013 conditionally to c_do_switch_warnings.
6014
8d95fe25
MP
60152014-09-03 Marek Polacek <polacek@redhat.com>
6016
6017 PR c/62024
6018 * c-parser.c (c_parser_static_assert_declaration_no_semi): Strip no-op
6019 conversions.
6020
9a771876
JJ
60212014-09-02 Jakub Jelinek <jakub@redhat.com>
6022 Balaji V. Iyer <balaji.v.iyer@intel.com>
6023 Igor Zamyatin <igor.zamyatin@intel.com>
6024
6025 * c-parser.c (c_parser_cilk_for): New function.
6026 (c_parser_cilk_grainsize): Likewise.
6027 (c_get_temp_regvar): Likewise.
6028 (c_parser_statement_after_labels): Added RID_CILK_FOR case.
6029 (c_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
6030 (c_parser_omp_for_loop): Added CILK_FOR and CILK_SIMD checks.
6031 * c-typeck.c (c_finish_omp_clauses): Added OMP_CLAUSE__CILK_FOR_COUNT_
6032 case.
6033
b7679d96
CG
60342014-08-27 Chen Gang <gang.chen.5i5j@gmail.com>
6035
6036 * c-aux-info.c (gen_type): Resize 'buff' from 10 to 23 bytes,
6037 with using HOST_WIDE_INT without truncation to 'int'
6038
59ea0364
MP
60392014-08-22 Marek Polacek <polacek@redhat.com>
6040
6041 PR c++/62199
6042 * c-typeck.c (parser_build_binary_op): Adjust call to
6043 warn_logical_not_parentheses.
6044
671a475e
IZ
60452014-08-22 Igor Zamyatin <igor.zamyatin@intel.com>
6046
6047 PR other/62008
6048 * c-parser.c (c_parser_array_notation): Check for correct
6049 type of an array added.
6050
04159acf
MP
60512014-08-19 Marek Polacek <polacek@redhat.com>
6052
6053 PR c++/62153
6054 * c-typeck.c (build_binary_op): If either operand of a comparison
6055 is a boolean expression, call maybe_warn_bool_compare.
6056
c77935ee
PP
60572014-08-19 Patrick Palka <ppalka@gcc.gnu.org>
6058
6059 PR c/45584
6060 * c-typeck.c (build_c_cast): Do a conversion even when the
6061 TYPE_MAIN_VARIANTs are the same.
6062
35aff4fb
MP
60632014-08-19 Marek Polacek <polacek@redhat.com>
6064
6065 * c-decl.c (diagnose_mismatched_decls): Unconditionally call
6066 pedwarn_c99 instead of pedwarn.
6067 (grokfield): Likewise.
6068 (warn_defaults_to): New function.
6069 (grokdeclarator): Call warn_defaults_to instead of pedwarn_c99.
6070 Unconditionally call pedwarn_c99 instead of pedwarn.
6071 (start_function): Call warn_defaults_to instead of pedwarn_c99.
6072 (declspecs_add_scspec): Call pedwarn_c99 instead of pedwarn, don't
6073 check flag_isoc11 before.
6074 * c-errors.c (pedwarn_c99): Change the return type to bool.
6075 Handle -Wc99-c11-compat.
6076 * c-parser.c (disable_extension_diagnostics): Handle
6077 warn_c99_c11_compat.
6078 (restore_extension_diagnostics): Likewise.
6079 (c_parser_static_assert_declaration_no_semi): Call pedwarn_c99
6080 instead of pedwarn, don't check flag_isoc11 before.
6081 (c_parser_declspecs): Likewise.
6082 (c_parser_alignas_specifier): Likewise.
6083 (c_parser_alignof_expression): Likewise.
6084 (c_parser_generic_selection): Likewise.
6085 * c-tree.h (pedwarn_c99): Update declaration.
6086 * c-typeck.c (c_finish_return): Call pedwarn or warning_at instead
6087 of pedwarn_c99.
6088
177cce46
MP
60892014-08-19 Marek Polacek <polacek@redhat.com>
6090
6091 * c-decl.c (warn_variable_length_array): Pass OPT_Wvla unconditionally
6092 to pedwarn_c90.
6093 * c-errors.c: Include "opts.h".
6094 (pedwarn_c90): Rewrite to handle -Wno-c90-c99-compat better.
6095 * c-parser.c (disable_extension_diagnostics): Handle negative value
6096 of warn_c90_c99_compat, too.
6097 (restore_extension_diagnostics): Likewise.
6098 (c_parser_compound_statement_nostart): Pass
6099 OPT_Wdeclaration_after_statement unconditionally to pedwarn_c90.
6100
6dc99c33
MP
61012014-08-12 Marek Polacek <polacek@redhat.com>
6102
6103 * c-parser.c (c_parser_postfix_expression) <case RID_FUNCTION_NAME>:
6104 Add pedwarn.
6105 (c_parser_postfix_expression) <case RID_PRETTY_FUNCTION_NAME>:
6106 Likewise.
6107 (c_parser_postfix_expression) <case RID_C99_FUNCTION_NAME>: Likewise.
6108
3f8257db 61092014-08-10 Marek Polacek <polacek@redhat.com>
f3bede71
MP
6110
6111 PR c/51849
6112 * c-decl.c (build_array_declarator): Remove check for !flag_isoc99.
6113 Call pedwarn_c90 instead of pedwarn.
6114 (check_bitfield_type_and_width): Likewise.
6115 (declspecs_add_qual): Likewise.
6116 (declspecs_add_type): Likewise.
6117 (warn_variable_length_array): Unify function for -pedantic and -Wvla.
6118 Adjust to only call pedwarn_c90.
6119 (grokdeclarator): Remove pedantic && !flag_isoc99 check. Call
6120 pedwarn_c90 instead of pedwarn.
6121 * c-errors.c (pedwarn_c90): Handle -Wc90-c99-compat.
6122 * c-parser.c (disable_extension_diagnostics): Handle
6123 warn_c90_c99_compat.
6124 (restore_extension_diagnostics): Likewise.
6125 (c_parser_enum_specifier): Remove check for !flag_isoc99. Call
6126 pedwarn_c90 instead of pedwarn.
6127 (c_parser_initelt): Likewise.
6128 (c_parser_postfix_expression): Likewise.
6129 (c_parser_postfix_expression_after_paren_type): Likewise.
6130 (c_parser_compound_statement_nostart): Remove check for !flag_isoc99.
6131 * c-tree.h: Fix formatting.
6132 * c-typeck.c (build_array_ref): Remove check for !flag_isoc99. Call
6133 pedwarn_c90 instead of pedwarn.
6134
9f25a338
TS
61352014-08-07 Trevor Saunders <tsaunders@mozilla.com>
6136
6137 * c-typeck.c: Remove include of pointer-set.h.
6138
044331a8
MP
61392014-08-07 Marek Polacek <polacek@redhat.com>
6140
6141 * c-typeck.c (pointer_diff): Remove P - (P + CST) optimization.
6142
b787e7a2
TS
61432014-08-02 Trevor Saunders <tsaunders@mozilla.com>
6144
6145 * c-typeck.c: Use hash_map instead of pointer_map.
6146
6e2830c3
TS
61472014-08-02 Trevor Saunders <tsaunders@mozilla.com>
6148
6149 * c-decl.c: Use hash_set instead of pointer_set.
6150
a7ee52fb
IZ
61512014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
6152
6153 PR middle-end/61455
6154 * c-array-notation.c (expand_array_notations): Handling
6155 of DECL_EXPR added.
6156
b4dfdc11
MG
61572014-07-31 Marc Glisse <marc.glisse@inria.fr>
6158
6159 PR c++/60517
6160 * c-typeck.c (c_finish_return): Return 0 instead of the address of
6161 a local variable.
6162
976d5a22
TT
61632014-07-30 Tom Tromey <tromey@redhat.com>
6164
6165 * c-typeck.c (struct constructor_stack) <designator_depth>: New
6166 field.
6167 (really_start_incremental_init, push_init_level): Initialize
6168 designator_depth.
6169 (pop_init_level): Set global designator_depth.
6170 (process_init_element): Check for designated_init attribute.
6171
30281de2
MP
61722014-07-20 Marek Polacek <polacek@redhat.com>
6173
6174 PR c/61852
6175 * c-decl.c (implicit_decl_warning): Add location_t parameter. Use it.
6176 (implicitly_declare): Pass location to implicit_decl_warning.
6177
b108f48f
JJ
61782014-07-14 Jakub Jelinek <jakub@redhat.com>
6179
6180 PR middle-end/61294
6181 * c-parser.c (c_parser_expr_list): Add new argument literal_zero_mask.
6182 If non-NULL, call c_parser_check_literal_zero.
6183 (c_parser_check_literal_zero): New function.
6184 (c_parser_postfix_expression_after_primary): Adjust
6185 c_parser_expr_list caller, handle -Wmemset-transposed-args.
6186
773ec47f
MP
61872014-07-06 Marek Polacek <polacek@redhat.com>
6188
6189 PR c/6940
6190 * c-decl.c (grokdeclarator): Set C_ARRAY_PARAMETER.
6191 * c-tree.h (C_ARRAY_PARAMETER): Define.
6192 * c-typeck.c (c_expr_sizeof_expr): Warn when using sizeof on an array
6193 function parameter.
6194
22e1cf1c 61952014-07-02 Jan Hubicka <hubicka@ucw.cz>
3f8257db 6196 Chen Gang <gang.chen.5i5j@gmail.com>
22e1cf1c
JH
6197
6198 * c-decl.c (duplicate_decls): CLear DECL_STRUCT_FUNCTION before
6199 releasing symbol.
6200
52ec0ea3
MP
62012014-07-01 Marek Polacek <polacek@redhat.com>
6202
6203 * c-typeck.c (convert_for_assignment): Pass OPT_Wint_conversion
6204 instead of 0 to WARN_FOR_ASSIGNMENT.
6205
d5c3d343
MP
62062014-07-01 Marek Polacek <polacek@redhat.com>
6207
6208 PR c/58286
6209 * c-typeck.c (convert_for_assignment): Pass
6210 OPT_Wincompatible_pointer_types instead of 0 to WARN_FOR_ASSIGNMENT.
6211
6a7253a4
MP
62122014-06-30 Marek Polacek <polacek@redhat.com>
6213
6214 * c-decl.c (grokdeclarator): Don't instrument VLAs if the function
6215 has no_sanitize_undefined attribute.
6216
5e88a8f4
IZ
62172014-06-30 Igor Zamyatin <igor.zamyatin@intel.com>
6218
6219 PR middle-end/57541
6220 * c-array-notation.c (fix_builtin_array_notation_fn):
6221 Check for 0 arguments in builtin call. Check that bultin argument is
6222 correct.
6223 * c-parser.c (c_parser_array_notation): Check for incorrect initial
6224 index.
6225
9698b078
SH
62262014-06-27 Sebastian Huber <sebastian.huber@embedded-brains.de>
6227
6228 * c-parser.c (c_parser_declaration_or_fndef): Discard all type
6229 qualifiers in __auto_type for atomic types.
6230 (c_parser_typeof_specifier): Discard all type qualifiers in
6231 __typeof__ for atomic types.
6232
6e07c515
MP
62332014-06-25 Marek Polacek <polacek@redhat.com>
6234
6235 PR c/61162
6236 * c-parser.c (c_parser_statement_after_labels): Pass the location of
6237 the return expression to c_finish_return.
6238
da6f124d
JJ
62392014-06-25 Jakub Jelinek <jakub@redhat.com>
6240
6241 * c-typeck.c (c_finish_omp_clauses): Make sure
6242 OMP_CLAUSE_LINEAR_STEP has correct type.
6243
c203e8a7
TS
62442014-06-24 Trevor Saunders <tsaunders@mozilla.com>
6245
6246 * c-decl.c: Adjust.
6247
56ad0e38
JJ
62482014-06-24 Jakub Jelinek <jakub@redhat.com>
6249
6250 * c-parser.c (c_parser_omp_for_loop): For
6251 #pragma omp parallel for simd move lastprivate clause from parallel
6252 to for rather than simd.
6253
47c2554f
MP
62542014-06-23 Marek Polacek <polacek@redhat.com>
6255
6256 * c-typeck.c (parser_build_binary_op): Don't call
6257 warn_logical_not_parentheses if the RHS is TRUTH_NOT_EXPR.
6258
56363ffd
JH
62592014-06-15 Jan Hubicka <hubicka@ucw.cz>
6260
6261 * c-parser.c (c_parser_omp_threadprivate): Likewise.
6262 * c-decl.c (merge_decls): Likewise.
6263
d7ff7ae5
MP
62642014-06-09 Marek Polacek <polacek@redhat.com>
6265
6266 PR c/36446
6267 * c-typeck.c (error_init): Call inform instead of error_at.
6268 (pedwarn_init): Call inform instead of pedwarn.
6269 (warning_init): Call inform instead of warning_at.
6270
24d047a3
JH
62712014-06-07 Jan Hubicka <hubicka@ucw.cz>
6272
6273 * c-decl.c (merge_decls): Use set_decl_section_name.
6274 (duplicate_decls): Remove node if it exists.
6275
9bac5cbb
G
62762014-06-05 S. Gilles <sgilles@terpmail.umd.edu>
6277
6278 PR c/53119
6279 * c-typeck.c (push_init_level, process_init_element,
6280 pop_init_level): Correct check for zero initialization, move
6281 missing brace warning to respect zero initialization.
6282
8ffcdea8
MP
62832014-06-05 Marek Polacek <polacek@redhat.com>
6284
6285 PR c/56724
6286 * c-typeck.c (convert_for_assignment): Use expr_loc for ic_argpass.
6287
742938c9
MP
62882014-06-05 Marek Polacek <polacek@redhat.com>
6289
6290 PR c/49706
6291 * c-typeck.c (parser_build_binary_op): Warn when logical not is used
ab20d992 6292 on the left hand side operand of a comparison.
742938c9 6293
6447c55d
MP
62942014-06-05 Marek Polacek <polacek@redhat.com>
6295
6296 PR c/48062
6297 * c-decl.c (warn_if_shadowing): Call inform instead of warning_at.
6298 Print note only if the warning was printed.
6299
9dc7743c
IZ
63002014-06-04 Igor Zamyatin <igor.zamyatin@intel.com>
6301
6302 PR c/58942
6303 * c-array-notation.c (fix_builtin_array_notation_fn): Handle the case
6304 with a pointer.
6305
fedfecef
MP
63062014-06-03 Marek Polacek <polacek@redhat.com>
6307
6308 PR c/60439
6309 * c-parser.c (c_parser_switch_statement): Pass explicit_cast_p to
6310 c_start_case.
6311 * c-tree.h (c_start_case): Update.
6312 * c-typeck.c (c_start_case): Add new boolean parameter. Warn if
6313 switch condition has boolean value.
6314
9b2b7279
AM
63152014-06-02 Andrew MacLeod <amacleod@redhat.com>
6316
6317 * c-decl.c: Include builtins.h.
6318 * c-parser.c: Likewise.
6319
5c1bc275
MP
63202014-05-27 Marek Polacek <polacek@redhat.com>
6321
6322 PR c/56724
6323 * c-typeck.c (convert_arguments): Get location of a parameter. Change
6324 error and warning calls to error_at and warning_at. Pass location of
6325 a parameter to it. Call warning_at with OPT_Wtraditional_conversion.
6326 (convert_for_assignment): Add parameter to WARN_FOR_ASSIGNMENT and
6327 WARN_FOR_QUALIFIERS. Pass expr_loc to those.
6328
97563bc8
IZ
63292014-05-26 Igor Zamyatin <igor.zamyatin@intel.com>
6330
6331 PR c/61191
6332 * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid
6333 function parameters.
6334
aede2c10
JH
63352014-05-23 Jan Hubicka <hubicka@ucw.cz>
6336
6337 * c-decl.c (merge_decls): Preserve symtab node pointers.
6338 (duplicate_decls): Free new decl.
6339
edbba2ce
TS
63402014-05-23 Thomas Schwinge <thomas@codesourcery.com>
6341
f3316c6d
TS
6342 * c-typeck.c (c_finish_omp_clauses): Remove duplicated variable
6343 initialization.
6344
edbba2ce
TS
6345 * c-parser.c (c_parser_omp_target): Return bool values.
6346
68c81f24
TS
63472014-05-22 Thomas Schwinge <thomas@codesourcery.com>
6348
6349 * c-parser.c (c_parser_omp_clause_thread_limit): Rename
6350 num_teams_loc variable to num_thread_limit_loc.
6351
632f2871
RS
63522014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
6353
6354 * c-array-notation.c (expand_array_notations): Use void_node
6355 instead of void_zero_node.
6356
766090c2
TS
63572014-05-17 Trevor Saunders <tsaunders@mozilla.com>
6358
6359 * c-decl.c (finish_struct): Adjust.
6360 (finish_enum): Likewise.
6361 (bind): Adjust.
6362 (record_inline_static): Likewise.
6363 (push_scope): Likewise.
6364 (make_label): Likewise.
6365 (lookup_label_for_goto): Likewise.
6366 (finish_struct): Likewise.
6367 (finish_enum): Likewise.
6368 (store_parm_decls): Likewise.
6369 (c_push_function_context): Likewise.
6370 * c-lang.h: Remove usage of variable_size gty attribute.
6371 * c-parser.c (c_parse_init): Adjust.
6372 (c_parse_file): Likewise.
6373
2b107f6b
MP
63742014-05-13 Marek Polacek <polacek@redhat.com>
6375
6376 PR c/61162
6377 * c-typeck.c (convert_for_assignment): Pass location to
6378 WARN_FOR_ASSIGNMENT instead of input_location.
6379
d033409e
MP
63802014-05-10 Marek Polacek <polacek@redhat.com>
6381
6382 * c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
6383 maybe_warn_string_init.
6384 (c_parser_postfix_expression_after_paren_type): Pass type_loc to
6385 maybe_warn_string_init.
6386 * c-tree.h (maybe_warn_string_init): Update declaration.
6387 * c-typeck.c (maybe_warn_string_init): Add location parameter.
6388 Call pedwarn_init with loc instead of with input_location.
6389 (digest_init): Pass init_loc to maybe_warn_string_init.
6390 (pop_init_level): Call pedwarn_init with loc instead of with
6391 input_location.
6392 (set_init_index): Likewise.
6393 (process_init_element): Likewise.
6394
ea58ef42
MP
63952014-05-09 Marek Polacek <polacek@redhat.com>
6396
6397 PR c/61096
6398 * c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level.
6399 (c_parser_initelt): Pass location to set_init_label. Pass array index
6400 location to set_init_index.
6401 * c-tree.h (push_init_level): Update declaration.
6402 (pop_init_level): Likewise.
6403 (set_init_index): Likewise.
6404 (set_init_label): Likewise.
6405 * c-typeck.c (error_init): Add location parameter. Call error_at
6406 instead of error.
6407 (digest_init): Pass init_loc to error_init.
6408 (really_start_incremental_init):
6409 (push_init_level): Add location parameter. Pass loc to pop_init_level
6410 and error_init.
6411 (pop_init_level): Likewise.
6412 (set_designator): Add location parameter. Pass loc to pop_init_level,
6413 push_init_level, and error_init.
6414 (set_init_index): Add location parameter. Pass loc to error_init and
6415 set_designator.
6416 (set_init_label): Likewise.
6417 (output_init_element): Pass loc to error_init.
6418 (process_init_element): Pass loc to error_init, pop_init_level,
6419 pedwarn_init, and push_init_level.
6420
661a0813
MP
64212014-05-09 Marek Polacek <polacek@redhat.com>
6422
6423 PR c/50459
6424 * c-parser.c (c_parser_attributes): Parse the arguments as an
6425 expression-list if the attribute takes identifier.
6426
2793eeab
MP
64272014-05-08 Marek Polacek <polacek@redhat.com>
6428
6429 PR c/61053
6430 * c-decl.c (grokdeclarator): Use min_align_of_type instead of
6431 TYPE_ALIGN_UNIT.
6432
f827930a
MP
64332014-05-08 Marek Polacek <polacek@redhat.com>
6434
6435 PR c/61077
6436 * c-decl.c (start_function): Warn for _Atomic-qualified return type
6437 of main.
6438
1d60af08
KZ
64392014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
6440 Mike Stump <mikestump@comcast.net>
6441 Richard Sandiford <rdsandiford@googlemail.com>
6442
6443 * c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN.
6444 (finish_enum): Use wide-int interfaces.
6445 * c-parser.c (c_parser_cilk_clause_vectorlength): Likewise.
6446 * c-typeck.c (build_c_cast): Likewise.
6447 (set_nonincremental_init_from_string): Likewise.
6448 (c_tree_equal): Likewise.
6449
a0e24419
MP
64502014-05-02 Marek Polacek <polacek@redhat.com>
6451
6452 PR c/25801
6453 * c-typeck.c (c_size_in_bytes): Update comment. Don't call error.
6454 Return size_one_node when the type is not complete.
6455 (pointer_diff): Remove comment.
6456 (build_unary_op): Improve error messages.
6457
19fc9faa
MP
64582014-05-02 Marek Polacek <polacek@redhat.com>
6459
6460 * c-typeck.c (c_finish_return): Separate warning_at calls.
6461
63bc4e87
MP
64622014-05-02 Marek Polacek <polacek@redhat.com>
6463
6464 * c-tree.h (error_init): Remove declaration.
6465 (pedwarn_init): Likewise.
6466 * c-typeck.c (error_init): Make static and move above.
6467 (pedwarn_init): Likewise.
6468 (warning_init): Move above.
6469 (maybe_warn_string_init): Likewise.
6470
4bd2511b
JL
64712014-05-01 Jeff Law <law@redhat.com>
6472
6473 Revert:
6474
6475 2014-04-24 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
6476 * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
6477 avoid goto.
6478
6a358dcb
MP
64792014-05-02 Marek Polacek <polacek@redhat.com>
6480
6481 PR c/60784
6482 * c-typeck.c (push_init_level): Set constructor_designated to
6483 p->designated for structures.
6484
ae5ebda4
MP
64852014-05-01 Marek Polacek <polacek@redhat.com>
6486
6487 PR c/60915
6488 * c-parser.c (c_parser_declaration_or_fndef): Give better error if
6489 function-definition has an attribute after the declarator.
6490
96b40f8d
MP
64912014-05-01 Marek Polacek <polacek@redhat.com>
6492
6493 PR c/60257
6494 * c-typeck.c (warning_init): Add location_t parameter. Call
6495 warning_at instead of warning.
6496 (push_init_level): Pass input_location to warning_init.
6497 (add_pending_init): Add location_t parameter. Pass loc to
6498 warning_init.
6499 (set_nonincremental_init): Pass input_location to add_pending_init.
6500 (set_nonincremental_init_from_string): Likewise.
6501 (output_init_element): Pass loc to warning_init and to
6502 add_pending_init.
6503
32e00768
MP
65042014-05-01 Marek Polacek <polacek@redhat.com>
6505
6506 PR c/43395
6507 * c-typeck.c (c_finish_return): Distinguish between label and variable
6508 when warning about returning local address.
6509
c9379ce2
MP
65102014-05-01 Marek Polacek <polacek@redhat.com>
6511
6512 PR c/29467
6513 * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
6514 in C89 mode.
6515
d00887e8
MP
65162014-05-01 Marek Polacek <polacek@redhat.com>
6517
6518 PR c/43245
6519 * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
6520 instead of 0 to WARN_FOR_QUALIFIERS.
6521
5436fa2e
MP
65222014-05-01 Marek Polacek <polacek@redhat.com>
6523
6524 PR c/56989
6525 * c-typeck.c (default_conversion): Use better location for
6526 error call.
6527
f8ed5150
MP
65282014-04-30 Marek Polacek <polacek@redhat.com>
6529
6530 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
6531 also when SANITIZE_FLOAT_DIVIDE is on.
6532
8337d1db
MP
65332014-04-30 Marek Polacek <polacek@redhat.com>
6534
6535 PR c/60139
6536 * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
6537 and pedwarn_init. Use loc insted of input_location.
6538
c4bdc42f
MP
65392014-04-30 Marek Polacek <polacek@redhat.com>
6540
6541 PR c/60351
6542 * c-typeck.c (build_binary_op): Use location when warning about
6543 shift count.
6544
45484dcf
MP
65452014-04-25 Marek Polacek <polacek@redhat.com>
6546
6547 PR c/18079
6548 * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
6549 always_inline/noinline and hot/cold attributes.
6550
34cf811f
MP
65512014-04-25 Marek Polacek <polacek@redhat.com>
6552
6553 PR c/60114
6554 * c-parser.c (c_parser_initelt): Pass input_location to
6555 process_init_element.
6556 (c_parser_initval): Pass loc to process_init_element.
6557 * c-tree.h (process_init_element): Adjust declaration.
6558 * c-typeck.c (push_init_level): Pass input_location to
6559 process_init_element.
6560 (pop_init_level): Likewise.
6561 (set_designator): Likewise.
6562 (output_init_element): Add location_t parameter. Pass loc to
6563 digest_init.
6564 (output_pending_init_elements): Pass input_location to
6565 output_init_element.
6566 (process_init_element): Add location_t parameter. Pass loc to
6567 output_init_element.
6568
42056eac
JJ
65692014-04-24 Jakub Jelinek <jakub@redhat.com>
6570
6571 * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
6572 atomic-clause, allow comma in between atomic-clause and
6573 seq_cst.
6574
e162a134
JJ
65752014-04-22 Jakub Jelinek <jakub@redhat.com>
6576
6577 PR c/59073
6578 * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
6579 fails, don't set OM_PARALLEL_COMBINED and return NULL.
6580
2f6babac
IZ
65812014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
6582
6583 PR middle-end/60469
6584 * c-array-notation.c (fix_builtin_array_notation_fn): Use
6585 create_tmp_var instead build_decl for creating temps.
6586 (build_array_notation_expr): Likewise.
6587 (fix_conditional_array_notations_1): Likewise.
6588 (fix_array_notation_expr): Likewise.
6589 (fix_array_notation_call_expr): Likewise.
6590
8edbfaa6
JJ
65912014-03-28 Jakub Jelinek <jakub@redhat.com>
6592
6593 PR c++/60689
6594 * c-tree.h (c_build_function_call_vec): New prototype.
6595 * c-typeck.c (build_function_call_vec): Don't call
6596 resolve_overloaded_builtin here.
6597 (c_build_function_call_vec): New wrapper function around
6598 build_function_call_vec. Call resolve_overloaded_builtin here.
6599 (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
6600 Call c_build_function_call_vec instead of build_function_call_vec.
6601 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
6602 * c-decl.c (finish_decl): Likewise.
6603
7485aeea
MLI
66042014-03-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
6605
6606 PR c/55383
6607 * c-typeck.c: Use correct format string in cast-qual warning
6608
b17a8b07
TS
66092014-03-07 Thomas Schwinge <thomas@codesourcery.com>
6610
6611 * c-decl.c (c_decl_attributes): Use
6612 lang_hooks.types.omp_mappable_type.
6613 * c-typeck.c (c_finish_omp_clauses): Likewise.
6614
3af9c5e9
MP
66152014-03-06 Marek Polacek <polacek@redhat.com>
6616
6617 PR c/60197
6618 * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
6619 of checking tree code.
6620
1c9f5f33
PK
66212014-02-19 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
6622
6623 * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
6624 (c_parser_parameter_declaration): Likewise.
6625
cc28fc7f
MP
66262014-02-19 Marek Polacek <polacek@redhat.com>
6627
6628 PR c/60195
6629 * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
6630 Call mark_exp_read on exp.value.
6631 (build_atomic_assign): Set TREE_NO_WARNING on val and old. Set
6632 TREE_ADDRESSABLE on old instead of val.
6633 (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
6634
b581c05c
PK
66352014-02-07 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
6636
6637 * c-parser.c (c_parser_get_builtin_args): Replace calls to
6638 C_EXPR_APPEND by vec_safe_push.
6639 * c-tree.h (C_EXPR_APPEND): Remove.
6640
81e5eca8
MP
66412014-01-31 Marek Polacek <polacek@redhat.com>
6642
6643 PR c/59963
6644 * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
6645 build_function_call_vec.
6646 (build_function_call): Likewise.
6647 (build_atomic_assign): Likewise.
6648 (build_function_call_vec): Add arg_loc parameter. Use it.
6649 (convert_arguments): Likewise.
6650 (convert_for_assignment): Rename rhs_loc to expr_loc.
6651 * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
6652 (c_parser_objc_keywordexpr): Likewise.
6653 (c_parser_postfix_expression_after_primary): Call
6654 build_function_call_vec with expr_loc rather than op_loc.
6655 Call c_parser_expr_list to fill arg_loc. Pass arg_loc to
6656 build_function_call_vec.
6657 (c_parser_expr_list): Add locations parameter. Fill it with locations
6658 of function arguments.
6659 * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
6660
68fca595
MP
66612014-01-30 Marek Polacek <polacek@redhat.com>
6662
6663 PR c/59940
6664 * c-typeck.c (build_function_call_vec): Use loc parameter.
6665 (convert_arguments): Add location parameter. Use it.
6666 (ep_convert_and_check): Likewise.
6667 (build_atomic_assign): Adjust convert_for_assignment call.
6668 (build_modify_expr): Likewise.
6669 (digest_init): Likewise.
6670 (c_finish_return): Likewise.
6671 (build_conditional_expr): Adjust ep_convert_and_check calls.
6672 (convert_for_assignment): Add rhs_loc parameter. Use it.
6673 (build_binary_op): Adjust convert_and_check and ep_convert_and_check
6674 calls.
6675
fa337f3a
RB
66762014-01-30 Richard Biener <rguenther@suse.de>
6677
6678 PR c/59905
6679 * c-typeck.c (build_function_call_vec): Do not replace calls
6680 to a function via an incompatible type with a runtime abort.
6681
b72271b9
BI
66822014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
6683
6684 * c-parser.c (c_parser_declaration_or_fndef): Replaced
6685 flag_enable_cilkplus with flag_cilkplus.
6686 (c_parser_direct_declarator_inner): Likewise.
6687 (c_parser_attribute_any_word): Likewise.
6688 (c_parser_attributes): Likewise.
6689 (c_parser_compound_statement): Likewise.
6690 (c_parser_statement_after_labels): Likewise.
6691 (c_parser_if_statement): Likewise.
6692 (c_parser_switch_statement): Likewise.
6693 (c_parser_do_statement): Likewise.
6694 (c_parser_for_statement): Likewise.
6695 (c_parser_unary_expression): Likewise.
6696 (c_parser_postfix_expression): Likewise.
6697 (c_parser_postfix_expression_after_primary): Likewise.
6698 (c_parser_postfix_expression_after_primary): Likewise.
6699 (c_parser_omp_clause_name): Likewise.
6700 (c_finish_omp_declare_simd): Likewise.
6701 (c_parser_cilk_verify_simd): Likewise.
6702 * c-typeck.c (build_array_ref): Likewise.
6703 (build_function_call_vec): Likewise.
6704 (convert_arguments): Likewise.
6705 (build_compound_expr): Likewise.
6706 (c_finish_return): Likewise.
6707 (c_finish_if_stmt): Likewise.
6708 (c_finish_loop): Likewise.
6709 (build_binary_op): Likewise.
6710
393e8e8b
MP
67112014-01-23 Marek Polacek <polacek@redhat.com>
6712
6713 PR c/59846
6714 * c-typeck.c (parser_build_binary_op): Use location instead of
6715 input_location.
6716 (build_binary_op): Pass location to shorten_compare.
6717
f04dda30
MP
67182014-01-23 Marek Polacek <polacek@redhat.com>
6719
6720 PR c/58346
6721 * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
6722 an empty aggregate.
6723
789eadcd
MP
67242014-01-23 Marek Polacek <polacek@redhat.com>
6725
6726 PR c/59871
6727 * c-typeck.c (build_compound_expr): Warn even for right-hand operand
6728 of a comma expression.
6729 (emit_side_effect_warnings): Likewise.
6730
40f14e9f
BI
67312014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
6732
6733 PR c/59825
6734 * c-array-notation.c (expand_array_notation_exprs): Rewrote this
6735 function to use walk_tree and moved a lot of its functionality to
6736 expand_array_notations.
6737 (expand_array_notations): New function.
6738
74558dd9
BI
67392014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
6740
6741 * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
6742 attribute an attribute without value.
6743
652fea39
JJ
67442014-01-23 Jakub Jelinek <jakub@redhat.com>
6745
6746 PR middle-end/58809
6747 * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
6748 BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
6749
f34f1c87
MP
67502014-01-22 Marek Polacek <polacek@redhat.com>
6751
6752 PR c/59891
6753 * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
6754 of remove_c_maybe_const_expr on op1 and op2.
6755
241f845a
JJ
67562014-01-15 Jakub Jelinek <jakub@redhat.com>
6757
6758 PR c/58943
6759 * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
6760 effects, preevaluate rhs using SAVE_EXPR first.
6761
9a74f20c
BI
67622014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
6763
6764 PR c++/59631
6765 * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
6766 statements with if-elseif statements.
6767
96066ce1
MP
67682014-01-06 Marek Polacek <polacek@redhat.com>
6769
6770 PR c/57773
6771 * c-decl.c (check_bitfield_type_and_width): Warn for implementation
6772 defined bit-field types only in ISO C.
6773
23a5b65a
RS
67742014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
6775
6776 Update copyright years
6777
f9030485
RS
67782014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
6779
6780 * c-array-notation.c: Use the standard form for the copyright notice.
6781
41958c28
BI
67822013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
6783
6784 * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
6785 (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
6786 field in parser is not empty. If not-empty, call the function
6787 c_parser_finish_omp_declare_simd.
6788 (c_parser_cilk_clause_vectorlength): Modified function to be shared
6789 between SIMD-enabled functions and #pragma simd. Added new parameter.
6790 (c_parser_cilk_all_clauses): Modified the usage of the function
6791 c_parser_cilk_clause_vectorlength as mentioned above.
6792 (c_parser_cilk_simd_fn_vector_attrs): New function.
6793 (c_finish_cilk_simd_fn_tokens): Likewise.
6794 (is_cilkplus_vector_p): Likewise.
6795 (c_parser_omp_clause_name): Added checking for "vectorlength,"
6796 "nomask," and "mask" strings in clause name.
6797 (c_parser_omp_all_clauses): Added 3 new case statements:
6798 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
6799 PRAGMA_CILK_CLAUSE_NOMASK.
6800 (c_parser_attributes): Added a cilk_simd_fn_tokens parameter. Added a
6801 check for vector attribute and if so call the function
6802 c_parser_cilk_simd_fn_vector_attrs. Also, when Cilk plus is enabled,
6803 called the function c_finish_cilk_simd_fn_tokens.
6804 (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
6805 parser field is non-empty. If so, parse them as you would parse
6806 the omp declare simd pragma.
6807 (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
6808 Added a check when step is a parameter and flag it as error.
6809 (CILK_SIMD_FN_CLAUSE_MASK): New #define.
6810 (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
6811 pragma_omp_clause.
6812
cef0fd0e
TS
68132013-12-17 Thomas Schwinge <thomas@codesourcery.com>
6814
6815 * c-parser.c (c_parser_omp_parallel): Fix description.
6816
12893402
BI
68172013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
6818
6819 * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
6820 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
6821 (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
6822 * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
6823
296674db
JM
68242013-12-04 Joseph Myers <joseph@codesourcery.com>
6825
6826 PR c/52023
6827 * c-parser.c (c_parser_alignas_specifier): Use
6828 c_sizeof_or_alignof_type instead of c_alignof.
6829 (c_parser_alignof_expression): Likewise, with min_alignof
6830 parameter depending on alignof spelling used.
6831
edd28054
MP
68322013-12-04 Marek Polacek <polacek@redhat.com>
6833
6834 PR c/54113
6835 * c-decl.c (start_function): Don't warn for missing prototype for
6836 inline functions.
6837
da0fc454
MP
68382013-12-03 Marek Polacek <polacek@redhat.com>
6839
6840 PR c/59351
6841 * c-decl.c (build_compound_literal): Allow compound literals with
6842 empty initial value.
6843
4c2ecab0
JM
68442013-12-02 Joseph Myers <joseph@codesourcery.com>
6845
6846 PR c/58235
6847 * c-typeck.c (build_modify_expr): Diagnose assignment to
6848 expression with array type.
6849
340baef7
JM
68502013-11-29 Joseph Myers <joseph@codesourcery.com>
6851
6852 PR c/42262
6853 * c-typeck.c (process_init_element): Do not treat a string as
6854 initializing a whole array when used with a designator for an
6855 individual element.
6856
6763b9f7
JM
68572013-11-29 Joseph Myers <joseph@codesourcery.com>
6858
6859 PR c/57574
6860 * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
6861 an inline function following a static declaration.
6862
e7bd1de1
JJ
68632013-11-28 Jakub Jelinek <jakub@redhat.com>
6864
6865 PR c/59310
6866 * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
6867 to p_name before calling c_parser_omp_teams instead of after.
6868 (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
6869 argument. Remove unused p_name variable.
6870
0136f8f0
AH
68712013-11-27 Aldy Hernandez <aldyh@redhat.com>
6872 Jakub Jelinek <jakub@redhat.com>
6873
6874 * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
6875 external_scope is NULL.
6876
241b71bb
TV
68772013-11-27 Tom de Vries <tom@codesourcery.com>
6878 Marc Glisse <marc.glisse@inria.fr>
6879
6880 PR c++/59032
6881 * c-typeck.c (build_unary_op): Allow vector increment and decrement.
6882
2fb9a547
AM
68832013-11-22 Andrew MacLeod <amacleod@redhat.com>
6884
6885 * c-typeck.c: Add required include files from gimple.h.
6886
8400e75e
DM
68872013-11-22 David Malcolm <dmalcolm@redhat.com>
6888
6889 * c-decl.c (define_label, shadow_tag_warned)
6890 (check_bitfield_type_and_width, grokdeclarator, grokparms,
6891 store_parm_decls_newstyle, store_parm_decls_oldstyle)
6892 (declspecs_add_type): Remove use of in_system_header macro.
6893 * c-parser.c (c_parser_unary_expression): Likewise.
6894 * c-typeck.c (store_init_value, process_init_element)
6895 (c_start_case): Likewise.
6896
6897 * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
6898 macro.
6899
6900 * c-parser.c (c_parser_set_source_position_from_token): Remove
6901 reference to in_system_header from comment.
6902
386b1f1f
RS
69032013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
6904
6905 * c-decl.c (grokdeclarator): Update comment to refer to
6906 tree_to_[su]hwi rather than tree_low_cst.
6907
ae7e9ddd
RS
69082013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
6909
6910 * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
6911 tree_to_uhwi throughout.
6912
9439e9a1
RS
69132013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
6914
6915 * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
6916 throughout.
6917
9541ffee
RS
69182013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
6919
6920 * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
6921 throughout.
6922
c02065fc
AH
69232013-11-15 Aldy Hernandez <aldyh@redhat.com>
6924
6925 * c-parser.c (c_parser_cilk_simd): New.
6926 (c_parser_cilk_verify_simd): New.
6927 (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
6928 (c_parser_omp_for_loop): Add case for NE_EXPR.
6929 Set c_break_label for CILK_SIMD.
6930 (c_parser_cilk_clause_vectorlength): New.
6931 (c_parser_cilk_clause_linear): New.
6932 (c_parser_cilk_clause_name): New.
6933 (c_parser_cilk_all_clauses): New.
6934 * c-typeck.c (build_unary_op): Pass location argument to
6935 readonly_error.
6936 (build_modify_expr): Same.
6937 (build_asm_expr): Same.
6938 (c_finish_bc_stmt): Error on break/continue in loops.
6939
18f429e2
AM
69402013-11-14 Andrew MacLeod <amacleod@redhat.com>
6941
6942 * c-typeck.c: Include only gimplify.h and gimple.h as needed.
6943
d8a2d370
DN
69442013-11-14 Diego Novillo <dnovillo@google.com>
6945
6946 * c-decl.c: Include print-tree.h.
6947 Include stor-layout.h.
6948 Include varasm.h.
6949 Include attribs.h.
6950 Include stringpool.h.
6951 * c-lang.c: Include fold-const.h.
6952 * c-parser.c: Include stringpool.h.
6953 Include attribs.h.
6954 Include stor-layout.h.
6955 Include varasm.h.
6956 Include trans-mem.h.
6957 * c-typeck.c: Include stor-layout.h.
6958 Include trans-mem.h.
6959 Include varasm.h.
6960 Include stmt.h.
6961
38b7bc7f
JM
69622013-11-13 Joseph Myers <joseph@codesourcery.com>
6963
6964 * c-tree.h (c_typespec_keyword): Add cts_auto_type.
6965 * c-decl.c (declspecs_add_type, finish_declspecs): Handle
6966 __auto_type.
6967 * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
6968 (c_parser_attribute_any_word, c_parser_objc_selector): Handle
6969 RID_AUTO_TYPE.
6970 (c_parser_declspecs): Take argument AUTO_TYPE_OK.
6971 (c_parser_declaration_or_fndef, c_parser_struct_declaration)
6972 (c_parser_declarator, c_parser_direct_declarator_inner)
6973 (c_parser_parameter_declaration, c_parser_type_name): All callers
6974 changed.
6975 (c_parser_declaration_or_fndef): Handle declarations with type
6976 determined from the initializer.
6977
45b0be94
AM
69782013-11-12 Andrew MacLeod <amacleod@redhat.com>
6979
18f429e2 6980 * c-typeck.c: Include gimplify.h.
45b0be94 6981
582d9b50
JM
69822013-11-12 Joseph Myers <joseph@codesourcery.com>
6983
6984 * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
6985 * c-parser.c (c_parser_declspecs): Mention _Thread_local in
6986 comment.
6987 * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
6988 or _Thread_local as appropriate in diagnostics.
6989 (build_null_declspecs): Initialize ret->thread_gnu_p.
6990 (declspecs_add_scspec): Handle either __thread or _Thread_local
6991 for RID_THREAD. Diagnose _Thread_local for pre-C11 standards if
6992 pedantic. Do not disallow _Thread_local extern and _Thread_local
6993 static.
6994
267bac10
JM
69952013-11-07 Joseph Myers <joseph@codesourcery.com>
6996 Andrew MacLeod <amacleod@redhat.com>
6997
6998 * c-aux-info.c (gen_type): Handle atomic qualifier.
6999 * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
7000 qualifiers when compating types.
7001 (shadow_tag_warned): Handle atomic_p in declspecs.
7002 (quals_from_declspecs): Likewise.
7003 (start_decl): Use c_type_promotes_to when promoting argument
7004 types.
7005 (grokdeclarator): Handle _Atomic.
7006 (get_parm_info): Diagnose any qualifier on "void" as only
7007 parameter.
7008 (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
7009 comparing types. Use c_type_promotes_to when promoting argument
7010 types.
7011 (finish_function): Use c_type_promotes_to when promoting argument
7012 types.
7013 (build_null_declspecs): Handle atomic_p in declspecs.
7014 (declspecs_add_qual): Handle RID_ATOMIC.
7015 * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
7016 (c_token_starts_declspecs): Handle RID_ATOMIC.
7017 (c_parser_declspecs): Handle atomic type specifiers and
7018 qualifiers.
7019 (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
7020 from types of expressions with atomic type.
7021 (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
7022 (c_parser_attribute_any_word): Handle RID_ATOMIC.
7023 (c_parser_initializer, c_parser_initelt, c_parser_initval)
7024 (c_parser_statement_after_labels, c_parser_switch_statement)
7025 (c_parser_for_statement, c_parser_expr_no_commas)
7026 (c_parser_conditional_expression, c_parser_binary_expression)
7027 (c_parser_cast_expression, c_parser_unary_expression)
7028 (c_parser_postfix_expression)
7029 (c_parser_postfix_expression_after_primary, c_parser_expression):
7030 Use convert_lvalue_to_rvalue.
7031 (c_parser_expression_conv, c_parser_expr_list): Document
7032 conversion of lvalues to rvalues. Use convert_lvalue_to_rvalue.
7033 (c_parser_objc_synchronized_statement): Use
7034 convert_lvalue_to_rvalue.
7035 (c_parser_objc_selector): Handle RID_ATOMIC.
7036 (c_parser_objc_receiver, c_parser_array_notation): Use
7037 convert_lvalue_to_rvalue.
7038 * c-tree.h (ctsk_typeof): Adjust comment to mention use for
7039 _Atomic (type-name).
7040 (struct c_declspecs): Add atomic_p field.
7041 (convert_lvalue_to_rvalue): Declare.
7042 * c-typeck.c (c_type_promotes_to): Promote atomic types to
7043 corresponding atomic types.
7044 (qualify_type): Don't add _Atomic qualifiers from second argument.
7045 (comp_target_types): Do not allow _Atomic mismatches.
7046 (type_lists_compatible_p): Do not remove atomic qualifiers when
7047 comparing types.
7048 (really_atomic_lvalue, convert_lvalue_to_rvalue)
7049 (build_atomic_assign): New functions.
7050 (build_unary_op): Use build_atomic_assign for atomic increment and
7051 decrement.
7052 (build_conditional_expr): Do not treat _Atomic void as a qualified
7053 version of void.
7054 (build_modify_expr): Use build_atomic_assign for atomic LHS.
7055 (find_anonymous_field_with_type, convert_to_anonymous_field)
7056 (convert_for_assignment): Do not remove atomic qualifiers when
7057 comparing types.
7058 (digest_init): Do not accept initialization of arrays of atomic
7059 elements by string constants.
7060 (build_asm_expr): Use convert_lvalue_to_rvalue.
7061 (build_binary_op): Do not treat _Atomic void as a qualified
7062 version of void.
7063
0c249d4b
DD
70642013-11-06 DJ Delorie <dj@redhat.com>
7065
7066 * c-decl.c (locate_old_decl): If a previous conflicting decl is
7067 both explicit and builtin, print the location of the explicit one.
7068
6d7f7e0a
TB
70692013-11-05 Tobias Burnus <burnus@net-b.de>
7070
7071 * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
7072 c_parser_omp_distribute, c_parser_omp_teams,
7073 c_parser_omp_target, c_parser_omp_declare): Handle
7074 -fopenmp-simd.
7075
b906f4ca
MP
70762013-11-03 Marek Polacek <polacek@redhat.com>
7077
7078 * c-decl.c (grokdeclarator): Add VLA instrumentation.
7079
ee1d5a02
JJ
70802013-11-01 Jakub Jelinek <jakub@redhat.com>
7081
7082 * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
7083 check_dup_generic at the end, unless remove is true.
7084 (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
7085 remove = true;.
7086 (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
7087
5a9785fb
JJ
70882013-10-31 Jakub Jelinek <jakub@redhat.com>
7089
7090 * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
7091 with decl that is not pointer nor array.
7092
939b37da
BI
70932013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
7094
7095 * c-decl.c (finish_function): Added a call for insert_cilk_frame when
7096 a spawning function is found.
7097 * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
7098 (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
7099 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
7100 * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
7101 case.
7102 (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
7103 * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
7104 expr.
7105 (c_finish_return): Added a check to reject _Cilk_spawn in return
7106 expression.
7107 (build_cilk_spawn): New function.
7108 (build_cilk_sync): Likewise.
7109 * Makefile.in (c-decl.o): Added cilk.h in dependency list.
ab20d992 7110
d4af74d4
TB
71112013-10-27 Tobias Burnus <burnus@net-b.de>
7112
7113 PR other/33426
7114 * c-parser.c (c_parser_while_statement, c_parser_while_statement,
7115 c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
7116 (c_parser_statement_after_labels): Update calls.
7117
d73749df 71182013-10-24 Tobias Burnus <burnus@net-b.de>
8170608b
TB
7119
7120 PR other/33426
7121 * c-parser.c (c_parser_pragma, c_parser_for_statement):
7122 Handle PRAGMA_IVDEP.
7123 (c_parser_statement_after_labels): Update call.
7124
f28aa681
MP
71252013-10-24 Marek Polacek <polacek@redhat.com>
7126
7127 * c-parser.c (c_parser_struct_declaration): Add a comment.
7128 (c_parser_declarator): Don't allow _Alignas here.
7129
0645c1a2
AM
71302013-10-17 Andrew MacLeod <amacleod@redhat.com>
7131
7132 * c-parser.c: Include omp-low.h.
7133 * c-typeck.c: Likewise.
7134
568a31f2
MP
71352013-10-17 Marek Polacek <polacek@redhat.com>
7136
7137 PR c/58267
7138 * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
7139 Document syntax of the array-declarator.
7140 (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
7141 are not permitted.
7142 (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
7143 (c_parser_struct_declaration): Likewise.
7144 (c_parser_declarator): Likewise.
7145 (c_parser_direct_declarator_inner): Likewise.
7146 (c_parser_parameter_declaration): Likewise.
7147 (c_parser_type_name): Likewise.
7148
acf0174b
JJ
71492013-10-11 Jakub Jelinek <jakub@redhat.com>
7150
7151 * c-lang.h (current_omp_declare_target_attribute): New extern
7152 decl.
7153 * c-parser.c: Include c-lang.h.
7154 (struct c_parser): Change tokens to c_token *.
7155 Add tokens_buf field. Change tokens_avail type to unsigned int.
7156 (c_parser_consume_token): If parser->tokens isn't
7157 &parser->tokens_buf[0], increment parser->tokens.
7158 (c_parser_consume_pragma): Likewise.
7159 (enum pragma_context): Add pragma_struct and pragma_param.
7160 (c_parser_external_declaration): Adjust
7161 c_parser_declaration_or_fndef caller.
7162 (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
7163 argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
7164 Adjust recursive call.
7165 (c_parser_struct_or_union_specifier): Use pragma_struct instead
7166 of pragma_external.
7167 (c_parser_parameter_declaration): Use pragma_param instead of
7168 pragma_external.
7169 (c_parser_compound_statement_nostart, c_parser_label,
7170 c_parser_for_statement): Adjust
7171 c_parser_declaration_or_fndef callers.
7172 (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
7173 it through to c_parser_conditional_expression.
7174 (c_parser_conditional_expression): Add omp_atomic_lhs argument,
7175 pass it through to c_parser_binary_expression. Adjust recursive
7176 call.
7177 (c_parser_binary_expression): Remove prec argument, add
7178 omp_atomic_lhs argument instead. Always start from PREC_NONE, if
7179 omp_atomic_lhs is non-NULL and one of the arguments of toplevel
7180 binop matches it, use build2 instead of parser_build_binary_op.
7181 (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
7182 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
7183 PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
7184 Handle pragma_struct and pragma_param the same as pragma_external.
7185 (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
7186 (c_parser_omp_variable_list): Parse array sections for
7187 OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
7188 (c_parser_omp_clause_collapse): Fully fold collapse expression.
7189 (c_parser_omp_clause_reduction): Handle user defined reductions.
7190 (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
7191 c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
7192 c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
7193 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
7194 c_parser_omp_clause_depend, c_parser_omp_clause_map,
7195 c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
7196 c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
7197 c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
7198 (c_parser_omp_all_clauses): Add finish_p argument. Don't call
7199 c_finish_omp_clauses if it is false. Handle new OpenMP 4.0 clauses.
7200 (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
7201 present to c_finish_omp_atomic. Handle OpenMP 4.0 atomic forms.
7202 (c_parser_omp_for_loop): Add CODE argument, pass it through
7203 to c_finish_omp_for. Change last argument to cclauses,
7204 and adjust uses to grab parallel clauses from the array of all
7205 the split clauses. Adjust c_parser_binary_expression,
7206 c_parser_declaration_or_fndef and c_finish_omp_for callers.
7207 (omp_split_clauses): New function.
7208 (c_parser_omp_simd): New function.
7209 (c_parser_omp_for): Add p_name, mask and cclauses arguments.
7210 Allow the function to be called also when parsing combined constructs,
7211 and call c_parser_omp_simd when parsing for simd.
7212 (c_parser_omp_sections_scope): If section-sequence doesn't start with
7213 #pragma omp section, require exactly one structured-block instead of
7214 sequence of statements.
7215 (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
7216 Allow the function to be called also when parsing combined constructs.
7217 (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
7218 Allow the function to be called also when parsing combined
7219 constructs.
7220 (c_parser_omp_taskgroup, c_parser_omp_cancel,
7221 c_parser_omp_cancellation_point, c_parser_omp_distribute,
7222 c_parser_omp_teams, c_parser_omp_target_data,
7223 c_parser_omp_target_update, c_parser_omp_target,
7224 c_parser_omp_declare_simd, c_finish_omp_declare_simd,
7225 c_parser_omp_declare_target, c_parser_omp_end_declare_target,
7226 c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
7227 (c_parser_omp_construct): Add p_name and mask vars. Handle
7228 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
7229 PRAGMA_OMP_TEAMS. Adjust c_parser_omp_for, c_parser_omp_parallel
7230 and c_parser_omp_sections callers.
7231 (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
7232 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
7233 OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
7234 (OMP_PARALLEL_CLAUSE_MASK): Likewise. Add OMP_CLAUSE_PROC_BIND.
7235 (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. Add
7236 OMP_CLAUSE_DEPEND.
7237 (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
7238 OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
7239 OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
7240 OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
7241 OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
7242 * c-typeck.c: Include tree-inline.h.
7243 (c_finish_omp_cancel, c_finish_omp_cancellation_point,
7244 handle_omp_array_sections_1, handle_omp_array_sections,
7245 c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
7246 (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
7247 user defined reductions.
7248 (c_tree_equal): New function.
7249 * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
7250 c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
7251 c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
7252 c_check_omp_declare_reduction_r): New prototypes.
7253 * c-decl.c (current_omp_declare_target_attribute): New variable.
7254 (c_decl_attributes): New function.
7255 (start_decl, start_function): Use it instead of decl_attributes.
7256 (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
7257 c_omp_reduction_decl, c_omp_reduction_lookup,
7258 c_check_omp_declare_reduction_r): New functions.
7259
0a6c2227
TT
72602013-09-25 Tom Tromey <tromey@redhat.com>
7261
7262 * Make-lang.in (c/gccspec.o): Remove.
7263 (CFLAGS-c/gccspec.o): New variable.
7264 (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
7265 (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
7266 (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
7267
f3bc55f0
TT
72682013-09-25 Tom Tromey <tromey@redhat.com>
7269
7270 * Make-lang.in (c/gccspec.o): Don't use subshell.
7271
a24d975c
MP
72722013-09-18 Marek Polacek <polacek@redhat.com>
7273
7274 PR sanitize/58443
7275 * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
7276 Remove unnecessary check.
7277
ce6923c5
MP
72782013-09-18 Marek Polacek <polacek@redhat.com>
7279
7280 PR sanitizer/58411
7281 * c-typeck.c (build_binary_op): Don't sanitize function if it has the
7282 no_sanitize_undefined attribute.
7283
a1e51df9
KT
72842013-09-13 Kai Tietz <ktietz@redhat.com>
7285
7286 PR target/57848
7287 * c-decl.c (c_builtin_function_ext_scope): Remove
7288 wrong assumption that it is never called on prexisting
7289 symbol.
7290
0af94e6f
JR
72912013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
7292
7293 * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
7294
20059c8b
GDR
72952013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
7296
7297 * c-objc-common.c (c_tree_printer): Tidy.
7298
de5a5fa1
MP
72992013-08-30 Marek Polacek <polacek@redhat.com>
7300
7301 * c-typeck.c (build_binary_op): Add division by zero and shift
7302 instrumentation.
7303
2531a1d9 73042013-08-26 Joern Rennecke <joern.rennecke@embecosm.com>
0fdd4508 7305 Joseph Myers <joseph@codesourcery.com>
2531a1d9 7306
6e2bcc98 7307 PR c/35649
2531a1d9
JR
7308 * c-typeck.c (c_common_type): Prefer double_type_node over
7309 other REAL_TYPE types with the same precision.
7310 (convert_arguments): Likewise.
7311
025311c4
GDR
73122013-08-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
7313
7314 * c-objc-common.c (c_tree_printer): Document the nature of the cast.
7315 (c_initialize_diagnostics): Call a destructor for the early printer.
7316
da6ca2b5
GDR
73172013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
7318
7319 * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
7320 printer initialization.
7321
318cda85 73222013-08-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
da6ca2b5 7323
318cda85
BI
7324 PR c/57490
7325 * c-array-notation.c (fix_conditional_array_notations_1): Added a
7326 check for truth values.
7327 (expand_array_notation_exprs): Added truth values case. Removed an
7328 unwanted else. Added for-loop to walk through subtrees in default
7329 case.
7330
b066401f
GDR
73312013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
7332
7333 * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
7334
fb48aadc
JM
73352013-07-23 Joseph Myers <joseph@codesourcery.com>
7336
7337 * c-parser.c (struct c_generic_association): Fix typo.
7338
433cc7b0
TT
73392013-07-23 Tom Tromey <tromey@redhat.com>
7340 Joseph Myers <joseph@codesourcery.com>
7341
7342 * c-parser.c (struct c_generic_association): New.
7343 (c_generic_association_d): New typedef.
7344 (c_parser_generic_selection): New function.
7345 (c_parser_postfix_expression): Handle RID_GENERIC.
7346
26d40c3d
JM
73472013-07-13 Jason Merrill <jason@redhat.com>
7348
7349 PR c++/57793
7350 * c-decl.c (finish_struct): Check for too-large class.
7351
ecdbd01a 73522013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
40d3d530
JR
7353
7354 PR c/57821
7355 * c-typeck.c (set_init_index): When folding, check for index overflow.
7356
1141ed3f
BI
73572013-06-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
7358
7359 * c-parser.c (c_parser_array_notation): Removed rejection of array
7360 notations in an array of function pointers.
7361
713b46fa
BI
73622013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
7363
7364 * c-array-notation.c (make_triplet_val_inv): New function.
7365 (create_cmp_incr): Likewise.
7366 (create_array_refs): Likewise.
7367 (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
7368 Also modularized common parts between functions and called the function.
7369 (build_array_notation_expr): Likewise.
7370 (fix_conditional_array_notations_1): Likewise.
7371 (fix_array_notation_expr): Likewise.
7372 (fix_array_notation_call_expr): Likewise.
7373
92f20202
MP
73742013-06-18 Marek Polacek <polacek@redhat.com>
7375
7376 PR c/57630
7377 * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
7378
73a23b06
BI
73792013-06-12 Balaji V. Iyer <balaji.v.iyer@intel.com>
7380
7381 * c-array-notation.c (build_array_notation_expr): Reject array notation
7382 mismatch between LHS and RHS even inside a call_expr. Also, removed
7383 a couple while statements that were dead code.
7384
00b8517d
BI
73852013-06-10 Balaji V. Iyer <balaji.v.iyer@intel.com>
7386
7387 * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
7388 excessive precision expressions in function parameters. Also removed
7389 couple unwanted while statements.
7390
1509bdda
BI
73912013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
7392
7393 * c-array-notation.c (expand_array_notation_exprs): Added
7394 ARRAY_NOTATION_REF case.
ab20d992 7395
d60f1706
BI
73962013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
7397
7398 * c-array-notation.c (length_mismatch_in_expr_p): Moved this
7399 function to c-family/array-notation-common.c.
7400 (is_cilkplus_reduce_builtin): Likewise.
7401 (find_rank): Likewise.
7402 (extract_array_notation_exprs): Likewise.
7403 (replace_array_notations): Likewise.
7404 (find_inv_trees): Likewise.
7405 (replace_inv_trees): Likewise.
7406 (contains_array_notation_expr): Likewise.
7407 (find_correct_array_notation_type): Likewise.
7408 (replace_invariant_exprs): Initialized additional_tcodes to NULL.
7409 (struct inv_list): Moved this to c-family/array-notation-common.c.
7410 * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
ab20d992 7411
6d6efbb3
BI
74122013-06-05 Balaji V. Iyer <balaji.v.iyer@intel.com>
7413
7414 * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
7415 reduction functions outside the for-loop. Added a check if the fundecl
7416 is non-NULL. Finally, removed an unwanted if-statement, and made the
7417 body unconditional.
7418
25c22937
BI
74192013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
7420
7421 * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
7422 condition of the if-statement matches the rank of else-block and then-
7423 block when array notations are used.
7424 * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
7425 expression after the entire function body is parsed.
7426 (c_parser_expr_no_commas): Delayed creating array notation expressions
7427 to the end of function parsing.
7428 * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
7429 whole if-statement instead of just the condition.
ab20d992 7430 (expand_array_notation_exprs): Added MODIFY_EXPR case.
25c22937 7431
edd25645
BI
74322013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
7433
7434 PR c/57474
7435 * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
7436 array to NULL_TREE if they are unused. Also added a check for the
7437 field to be NULL before its fields are used in future.
ab20d992 7438
065ce7f1
RO
74392013-05-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
7440
7441 PR bootstrap/57450
7442 * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
7443 (build_array_notation_expr): Likewise.
7444
36536d79
BI
74452013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
7446
7447 * c-typeck.c (build_array_ref): Added a check to see if array's
7448 index is greater than one. If true, then emit an error.
7449 (build_function_call_vec): Exclude error reporting and checking
7450 for builtin array-notation functions.
7451 (convert_arguments): Likewise.
7452 (c_finish_return): Added a check for array notations as a return
7453 expression. If true, then emit an error.
7454 (c_finish_loop): Added a check for array notations in a loop
7455 condition. If true then emit an error.
7456 (lvalue_p): Added a ARRAY_NOTATION_REF case.
7457 (build_binary_op): Added a check for array notation expr inside
7458 op1 and op0. If present, we call another function to find correct
7459 type.
7460 * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
7461 * c-parser.c (c_parser_compound_statement): Check if array
7462 notation code is used in tree, if so, then transform them into
7463 appropriate C code.
7464 (c_parser_expr_no_commas): Check if array notation is used in LHS
7465 or RHS, if so, then build array notation expression instead of
7466 regular modify.
7467 (c_parser_postfix_expression_after_primary): Added a check for
7468 colon(s) after square braces, if so then handle it like an array
7469 notation. Also, break up array notations in unary op if found.
7470 (c_parser_direct_declarator_inner): Added a check for array
7471 notation.
7472 (c_parser_compound_statement): Added a check for array notation in
7473 a stmt. If one is present, then expand array notation expr.
7474 (c_parser_if_statement): Likewise.
7475 (c_parser_switch_statement): Added a check for array notations in
7476 a switch statement's condition. If true, then output an error.
7477 (c_parser_while_statement): Similarly, but for a while.
7478 (c_parser_do_statement): Similarly, but for a do-while.
7479 (c_parser_for_statement): Similarly, but for a for-loop.
7480 (c_parser_unary_expression): Check if array notation is used in a
7481 pre-increment or pre-decrement expression. If true, then expand
7482 them.
7483 (c_parser_array_notation): New function.
7484 * c-array-notation.c: New file.
7485 * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
ab20d992 7486
cd192ccc
MS
74872013-05-23 Mike Stump <mikestump@comcast.net>
7488
7489 * c-typeck.c (convert_for_assignment): Handle references to memory
7490 spaces better.
7491
427b248d
JM
74922013-05-16 Jason Merrill <jason@redhat.com>
7493
7494 * Make-lang.in (cc1$(exeext)): Use link mutex.
7495
44d90fe1
PC
74962013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
7497
7498 * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
7499 to simply use OPT_Wpointer_arith.
7500 (build_unary_op): Likewise.
7501
4e7d7b3d
JJ
75022013-04-03 Jakub Jelinek <jakub@redhat.com>
7503
7504 PR c/19449
7505 * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
7506 argument. If set, or it temporarily for parsing of the first
7507 argument into force_folding_builtin_constant_p.
7508 (c_parser_postfix_expression): Adjust callers.
7509
839b422f
RB
75102013-03-21 Richard Biener <rguenther@suse.de>
7511
7512 * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
7513 instead of DECL_DEBUG_EXPR_IS_FROM. Guard properly.
7514
2ee028f1
MP
75152013-02-12 Marek Polacek <polacek@redhat.com>
7516
7517 PR c/44938
7518 * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
7519 origtypes to NULL.
7520
8824edff
JJ
75212013-01-24 Jakub Jelinek <jakub@redhat.com>
7522
7523 PR c/56078
7524 * c-typeck.c (set_nonincremental_init_from_string): If
7525 constructor_max_index is NULL, treat it as if tree_int_cst_lt
7526 returned false.
7527 (process_init_element): Likewise.
7528
eadd3d0d
JJ
75292012-12-20 Jakub Jelinek <jakub@redhat.com>
7530
7531 PR c++/55619
7532 * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
7533 argument, don't call default_function_array_conversion
7534 nor c_fully_fold here.
7535 (c_parser_asm_statement): Adjust callers.
7536 * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
7537 and outputs here, and call default_function_array_conversion
7538 on inputs that don't need to be addressable.
7539
f8a93a2e
JJ
75402012-12-18 Jakub Jelinek <jakub@redhat.com>
7541
7542 PR c/39464
7543 * c-typeck.c (convert_for_assignment): For -Wpointer-sign
7544 warning require that both c_common_unsigned_type as well as
7545 c_common_signed_type is the same for both mvl and mvr types.
7546
9771b263
DN
75472012-11-16 Diego Novillo <dnovillo@google.com>
7548
7549 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
7550
7551 * c-common.c: Use new vec API in vec.h.
7552 * c-common.h: Likewise.
7553 * c-gimplify.c: Likewise.
7554 * c-pragma.c: Likewise.
7555 * c-pretty-print.c: Likewise.
7556 * c-pretty-print.h: Likewise.
7557 * c-semantics.c: Likewise.
7558 * c-decl.c: Likewise.
7559 * c-parser.c: Likewise.
7560 * c-tree.h: Likewise.
7561 * c-typeck.c: Likewise.
7562
880661a4
JW
75632012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
7564
7565 PR c++/54930
7566 * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
7567
077d1abe
MLI
75682012-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
7569
7570 PR c/53066
7571 * c-decl.c (warn_if_shadowing): Do not warn if a variable
7572 shadows a function, unless the variable is a function or a
7573 pointer-to-function.
7574
3a785c97
JJ
75752012-10-12 Jakub Jelinek <jakub@redhat.com>
7576
7577 PR c/54381
7578 * c-parser.c (struct c_tree_loc_pair): Removed.
7579 (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
7580 add location_t * and tree * arguments, fill in array of 3
7581 sizeof_arg trees and corresponding locs.
7582 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
7583 c_parser_expr_list callers.
7584 (c_parser_postfix_expression_after_primary): Likewise. Pass
7585 array of 3 sizeof_arg trees and locs (corresponding to first
7586 3 arguments) to sizeof_pointer_memaccess_warning.
7587
703c8606
LC
75882012-10-09 Lawrence Crowl <crowl@google.com>
7589
7590 * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
7591 * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
7592 hash table.
7593
5d9de0d0
PC
75942012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
7595
7596 PR c++/54194
7597 * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
7598 call.
7599
a212e43f
MG
76002012-10-09 Marc Glisse <marc.glisse@inria.fr>
7601
7602 PR c++/54427
7603 * c-typeck.c: Include c-common.h.
7604 (enum stv_conv): Moved to c-common.h.
7605 (scalar_to_vector): Moved to c-common.c.
7606 (build_binary_op): Adapt to scalar_to_vector's new prototype.
7607 * Make-lang.in: c-typeck.c depends on c-common.h.
7608
3b78de56
AC
76092012-10-04 Arnaud Charlet <charlet@adacore.com>
7610
7611 * c-decl.c (c_write_global_declarations): Fix handling of
7612 -fdump-ada-spec*.
7613
78c60e3d
SS
76142012-09-30 Sharad Singhai <singhai@google.com>
7615
7616 * c-decl.c (c_write_global_declarations): Use a different method
7617 to determine if the dump has ben initialized.
7618
9f33203d
JM
76192012-09-14 Joseph Myers <joseph@codesourcery.com>
7620
7621 PR c/54552
7622 * c-typeck.c (c_cast_expr): When casting to a type requiring
7623 C_MAYBE_CONST_EXPR to be created, pass the inner expression to
7624 c_fully_fold first.
7625
a27d595d
JM
76262012-09-14 Joseph Myers <joseph@codesourcery.com>
7627
7628 PR c/54103
7629 * c-typeck.c (build_unary_op): Pass original argument of
7630 TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
7631 any C_MAYBE_CONST_EXPR, if it has integer operands.
7632 (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
7633 TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
7634 to c_objc_common_truthvalue_conversion, then remove any
7635 C_MAYBE_CONST_EXPR, if they have integer operands. Use
7636 c_objc_common_truthvalue_conversion not
7637 c_common_truthvalue_conversion.
7638 (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
7639 call note_integer_operands for arguments with integer operands
7640 that are not integer constants.
7641
9feb29df
JJ
76422012-09-13 Jakub Jelinek <jakub@redhat.com>
7643
7644 PR c/54559
7645 * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
7646 COMPLEX_TYPE with in_late_binary_op set temporarily to true.
7647
d409320c
JJ
76482012-08-31 Jakub Jelinek <jakub@redhat.com>
7649
7650 PR c/54428
7651 * c-convert.c (convert): Don't call fold_convert_loc if
7652 TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
7653 is a COMPLEX_EXPR. Remove TYPE_MAIN_VARIANT check from
7654 COMPLEX_TYPE -> COMPLEX_TYPE conversion.
7655
6265d07c
JJ
76562012-08-24 Jakub Jelinek <jakub@redhat.com>
7657
7658 PR c/54355
7659 * c-decl.c (c_parser_label): Pass true as nested and fix up comments
7660 for nested and empty_ok arguments in the call to
7661 c_parser_declaration_or_fndef.
7662
1a4049e7
JJ
76632012-08-17 Jakub Jelinek <jakub@redhat.com>
7664
7665 * c-tree.h (c_last_sizeof_arg): Declare.
7666 * c-parser.c (struct c_tree_loc_pair): New type.
7667 (c_parser_expr_list): Add sizeof_arg argument. Fill it in if
7668 non-NULL.
7669 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
7670 (c_parser_postfix_expression_after_primary): Likewise. Call
7671 sizeof_pointer_memaccess_warning if needed.
7672 (sizeof_ptr_memacc_comptypes): New function.
7673 * c-typeck.c (c_last_sizeof_arg): New global variable.
7674 (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
7675
0229aee9
UB
76762012-07-24 Uros Bizjak <ubizjak@gmail.com>
7677
7678 * c-lang.h (lang_decl): Add variable_size GTY option.
7679
7ee2468b
SB
76802012-07-16 Steven Bosscher <steven@gcc.gnu.org>
7681
7682 * c-decl.c: Include dumpfile.h instead of tree-dump.h.
7683 * Make-lang.in: Fix dependencies.
7684
d4a10d0a
SB
76852012-06-29 Steven Bosscher <steven@gcc.gnu.org>
7686
7687 * Make-lang.in: New file, rules migrated from gcc/Makefile.in
7688 and add language Makefile hooks.
7689 * config-lang.in: New file.
7690 * c-config-lang.in: Moved from gcc/config-lang.in to here, and
7691 add the required "normal" config-lang.in rules.
7692 * c-lang.h: Moved from gcc/ to here.
7693 * c-tree.h: Likewise.
7694 * c-objc-common.c: Likewise.
7695 * c-objc-common.h: Likewise.
7696 * c-typeck.c: Likewise.
7697 * c-convert.c: Likewise.
7698 * c-lang.c: Likewise.
7699 * c-aux-info.c: Likewise.
7700 * c-errors.c: Likewise.
7701 * gccspec.c: Likewise.
7702 * c-decl.c: Likewise. Include gt-c-c-decl.h, not gt-c-decl.h.
7703 * c-parser.c: Likewise. Include gt-c-c-parser.h, not gt-c-parser.h.
7704\f
c48514be 7705Copyright (C) 2012-2021 Free Software Foundation, Inc.
d4a10d0a
SB
7706
7707Copying and distribution of this file, with or without modification,
7708are permitted in any medium without royalty provided the copyright
7709notice and this notice are preserved.