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