]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/c/ChangeLog
Teach compute_objsize about placement new [PR100876].
[thirdparty/gcc.git] / gcc / c / ChangeLog
CommitLineData
438aac59
GA
12021-06-07 Eric Botcazou <ebotcazou@adacore.com>
2
3 PR c/100920
4 * c-typeck.c (convert_for_assignment): Test fndecl_built_in_p to
5 spot built-in functions.
6
7d6987e9
GA
72021-06-06 Jakub Jelinek <jakub@redhat.com>
8
9 PR c/100902
10 * c-parser.c (c_parser_omp_target): Call c_omp_adjust_map_clauses
11 even when target is combined with other constructs.
12
132021-06-06 Eric Botcazou <ebotcazou@adacore.com>
14
15 PR c/100920
16 * c-decl.c (finish_struct): Fix thinko in previous change.
17 * c-typeck.c (convert_for_assignment): Do not warn on pointer
18 assignment and initialization for storage order purposes if the
19 RHS is a call to a DECL_IS_MALLOC function.
20
600f90cb
GA
212021-06-04 Martin Sebor <msebor@redhat.com>
22
23 PR c/100783
24 * c-objc-common.c (print_type): Handle erroneous types.
25
440c8a0a
GA
262021-06-03 Jakub Jelinek <jakub@redhat.com>
27
28 PR c++/100859
29 * c-typeck.c (c_finish_omp_clauses): Move OMP_CLAUSE_AFFINITY
30 after depend only cases.
31
ee682192
GA
322021-05-31 Richard Biener <rguenther@suse.de>
33
34 PR c++/88601
35 * c-decl.c (names_builtin_p): Handle RID_BUILTIN_SHUFFLEVECTOR.
36 * c-parser.c (c_parser_postfix_expression): Likewise.
37
48166757
GA
382021-05-28 Richard Biener <rguenther@suse.de>
39
40 PR c/100803
41 * gimple-parser.c (c_parser_gimple_paren_condition): Diagnose
42 invalid if conditions.
43
442021-05-28 Jakub Jelinek <jakub@redhat.com>
45
46 PR middle-end/99928
47 * c-typeck.c (handle_omp_array_sections): Copy OMP_CLAUSE_MAP_IMPLICIT.
48 (c_finish_omp_clauses): Move not just OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT
49 marked clauses last, but also OMP_CLAUSE_MAP_IMPLICIT. Add
50 map_firstprivate_head bitmap, set it for GOMP_MAP_FIRSTPRIVATE_POINTER
51 maps and silently remove OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT if it is
52 present too. For OMP_CLAUSE_MAP_IMPLICIT silently remove the clause
53 if present in map_head, map_field_head or map_firstprivate_head
54 bitmaps.
55
562021-05-28 Tobias Burnus <tobias@codesourcery.com>
57
58 * c-parser.c (c_parser_omp_clause_affinity): New.
59 (c_parser_omp_clause_name, c_parser_omp_variable_list,
60 c_parser_omp_all_clauses, OMP_TASK_CLAUSE_MASK): Handle affinity clause.
61 * c-typeck.c (handle_omp_array_sections_1, handle_omp_array_sections,
62 c_finish_omp_clauses): Likewise.
63
01c59ef2
GA
642021-05-26 Eric Botcazou <ebotcazou@adacore.com>
65
66 PR c/100653
67 * c-decl.c (finish_struct): Warn for a union containing an aggregate
68 field with a differing scalar storage order.
69
2832d51b
GA
702021-05-21 Jakub Jelinek <jakub@redhat.com>
71
72 PR middle-end/99928
73 * c-typeck.c (c_finish_omp_clauses): Move firstprivate clauses with
74 OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT to the end of the chain. Don't error
75 if a decl is mentioned both in map clause and in such firstprivate
76 clause unless OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT_TARGET is also set.
77
65f32e5d
GA
782021-05-19 Jakub Jelinek <jakub@redhat.com>
79
80 PR middle-end/99928
81 * c-parser.c (c_parser_omp_master): Set OMP_MASTER_COMBINED on
82 master when combined with taskloop.
83 (c_parser_omp_parallel): Don't set OMP_PARALLEL_COMBINED on
84 parallel master when not combined with taskloop.
85
a8daf9a1
GA
862021-05-18 Richard Biener <rguenther@suse.de>
87
88 PR c/100522
89 * gimple-parser.c (c_parser_gimple_postfix_expression_after_primary):
90 Diagnose calls to non-functions.
91 (c_parser_gimple_statement): Diagnose unexpected assignment RHS.
92
a7ffc1ef
GA
932021-05-17 Richard Biener <rguenther@suse.de>
94
95 PR c/100625
96 * gimple-parser.c (c_parser_gimple_label): Avoid building
97 a GIMPLE label with NULL label decl.
98
f9af11c7
GA
992021-05-13 Martin Sebor <msebor@redhat.com>
100
101 PR c/100550
102 * c-decl.c (get_parm_array_spec): Avoid erroneous VLA bounds.
103
0ff3a0f2
GA
1042021-05-12 Marcel Vollweiler <marcel@codesourcery.com>
105
106 * c-parser.c (c_parser_omp_clause_map): Support map-type-modifier
107 'close'.
108
aa891c56
GA
1092021-05-10 Martin Liska <mliska@suse.cz>
110
111 * c-aux-info.c (affix_data_type): Use startswith
112 function instead of strncmp.
113 * c-typeck.c (build_function_call_vec): Likewise.
114 * gimple-parser.c (c_parser_gimple_parse_bb_spec): Likewise.
115
62d87a32
GA
1162021-05-07 Eric Botcazou <ebotcazou@adacore.com>
117
118 * c-typeck.c (build_unary_op) <ADDR_EXPR>: Do not issue an error
119 on the address of a pointer field in a record with reverse SSO.
120
99e8df7a
GA
1212021-05-04 Tobias Burnus <tobias@codesourcery.com>
122
123 * c-typeck.c (c_finish_omp_clauses): Accept float + complex
124 for || and && reductions.
125
3c8e539d
GA
1262021-04-29 Joseph Myers <joseph@codesourcery.com>
127
128 * c-typeck.c (function_types_compatible_p): For C2X, treat
129 unprototyped function as compatible with non-variadic prototyped
130 function even if some argument types are changed by the default
131 argument promotions.
132
ee351f7f
GA
1332021-04-15 Martin Sebor <msebor@redhat.com>
134
135 PR c/99420
136 PR c/99972
137 * c-decl.c (pushdecl): Always propagate type attribute.
138
1392021-04-15 Richard Sandiford <richard.sandiford@arm.com>
140
141 PR c/98852
142 * c-typeck.c (c_common_type): Do not drop attributes that
143 affect type identity.
144
1d54b138
GA
1452021-04-10 Jakub Jelinek <jakub@redhat.com>
146
147 PR c/99990
148 * c-decl.c (finish_decl): Don't overwrite TREE_TYPE of
149 error_mark_node.
150
4493b1c1
GA
1512021-03-25 Jakub Jelinek <jakub@redhat.com>
152
153 PR c++/99565
154 * c-typeck.c (build_conditional_expr): Pass OEP_ADDRESS_OF_SAME_FIELD
155 to operand_equal_p.
156
5f256a70
GA
1572021-03-19 Jakub Jelinek <jakub@redhat.com>
158
159 PR c/99588
160 * c-typeck.c (mark_exp_read): Recognize what build_atomic_assign
161 with modifycode NOP_EXPR produces and mark the _Atomic var as read
162 if found.
163 (build_atomic_assign): For modifycode of NOP_EXPR, use COMPOUND_EXPRs
164 rather than STATEMENT_LIST. Otherwise call mark_exp_read on lhs.
165 Set TREE_SIDE_EFFECTS on the TARGET_EXPR.
166
3c5b6d24
GA
1672021-03-15 Tobias Burnus <tobias@codesourcery.com>
168
169 PR c++/99509
170 * c-decl.c (finish_decl): For 'omp declare target implicit' vars,
171 ensure that the varpool node is marked as offloadable.
172
ceae9533
GA
1732021-03-05 Tobias Burnus <tobias@codesourcery.com>
174
175 PR c/99137
176 * c-parser.c (c_parser_oacc_clause_async): Reject comma expressions.
177
4028d01a
GA
1782021-02-24 Martin Sebor <msebor@redhat.com>
179
180 PR middle-end/97172
181 * c-decl.c (free_attr_access_data): Clear attribute arg spec.
182
bf81237e
GA
1832021-02-18 Jakub Jelinek <jakub@redhat.com>
184
185 PR c/99136
186 * c-typeck.c (c_finish_return): Don't wrap retval into
187 EXCESS_PRECISION_EXPR in functions that return void.
188
0c5cdb31
GA
1892021-02-11 Marek Polacek <polacek@redhat.com>
190
191 * c-parser.c (c_parser_if_statement): Use vec_free.
192
a19dd5e6
GA
1932021-02-04 Martin Sebor <msebor@redhat.com>
194
195 PR c/97882
196 * c-decl.c (locate_old_decl): Add type to diagnostic output.
197 (diagnose_mismatched_decls): Same.
198 (start_function): Introduce temporaries for better readability.
199 * c-typeck.c (comptypes_internal): Only consider complete enum
200 types in comparisons with integers.
201
f7884fb1
GA
2022021-02-01 Martin Sebor <msebor@redhat.com>
203
204 PR middle-end/97172
205 * c-decl.c (free_attr_access_data): New function.
206 (c_parse_final_cleanups): Call free_attr_access_data.
207
59cf67d1
GA
2082021-01-16 Kwok Cheung Yeung <kcy@codesourcery.com>
209
210 * c-parser.c (c_parser_omp_clause_detach): New.
211 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_DETACH clause.
212 (OMP_TASK_CLAUSE_MASK): Add mask for PRAGMA_OMP_CLAUSE_DETACH.
213 * c-typeck.c (c_finish_omp_clauses): Handle PRAGMA_OMP_CLAUSE_DETACH
214 clause. Prevent use of detach with mergeable and overriding the
215 data sharing mode of the event handle.
216
2f7f0d32
GA
2172021-01-15 Jakub Jelinek <jakub@redhat.com>
218
219 * c-typeck.c (c_finish_omp_clauses): For reduction build array with
220 unqualified element type and then call c_build_qualified_type on the
221 ARRAY_TYPE.
222
7d187e4f
GA
2232021-01-07 Richard Biener <rguenther@suse.de>
224
225 * gimple-parser.c (c_parser_gimple_compound_statement): Only
226 reallocate loop array if it is too small.
227
eefe499f
GA
2282020-12-16 Martin Uecker <muecker@gwdg.de>
229
230 PR c/98047
231 * c-typeck.c (build_modify_expr): Drop qualifiers.
232
2332020-12-16 Martin Uecker <muecker@gwdg.de>
234
235 PR c/98260
236 * c-parser.c (c_parser_expression): Look into
237 nop expression when marking expressions as read.
238
d52945ce
GA
2392020-12-14 Martin Liska <mliska@suse.cz>
240
241 PR sanitizer/98204
242 * c-typeck.c (pointer_diff): Do not emit a top-level
243 sanitization.
244 (build_binary_op): Likewise.
245
ca2bd949
GA
2462020-12-09 Tobias Burnus <tobias@codesourcery.com>
247
248 * c-parser.c (c_parser_omp_allocate): New.
249 (c_parser_omp_construct): Call it.
250
2512020-12-09 Richard Biener <rguenther@suse.de>
252
253 PR c/98200
254 * gimple-parser.c (c_parser_gimple_postfix_expression): Return
255 early on error.
256
bc8a7013
GA
2572020-12-07 Martin Uecker <muecker@gwdg.de>
258
259 PR c/97981
260 * c-typeck.c (convert_lvalue_to_rvalue): Move the code
261 that drops qualifiers to the end of the function.
262
d48df6f2
GA
2632020-11-26 Martin Uecker <muecker@gwdg.de>
264
265 PR c/65455
266 PR c/92935
267 * c-parser.c (c_parser_declaration_or_fndef): Remove
268 redundant code to drop qualifiers of _Atomic types for __auto_type.
269 (c_parser_typeof_specifier): Do not drop qualifiers of _Atomic
270 types for __typeof__.
271
1e2c9a27
GA
2722020-11-24 Jakub Jelinek <jakub@redhat.com>
273
274 PR c/97958
275 * c-parser.c (c_parser_binary_expression): For omp atomic binary
276 expressions, use make_node instead of build2 to avoid checking build2
277 performs.
278
8e6198d0
GA
2792020-11-23 Joseph Myers <joseph@codesourcery.com>
280
281 PR c/95630
282 * c-typeck.c (build_binary_op): Use pedwarn_c99 with OPT_Wpedantic
283 for comparisons of complete and incomplete pointers.
284
7a97e2fc
GA
2852020-11-21 Aaron Sawdey <acsawdey@linux.ibm.com>
286
287 * c-aux-info.c (gen_type): Support opaque types.
288
82e5048e
GA
2892020-11-20 Martin Sebor <msebor@redhat.com>
290
291 PR middle-end/97879
292 * c-decl.c (start_function): Set ATTR_FLAG_INTERNAL in flags.
293
2942020-11-20 Jakub Jelinek <jakub@redhat.com>
295
296 PR other/97911
297 * Make-lang.in (c.serial): Change from goal to a variable.
298 (.PHONY): Drop c.serial.
299
3002020-11-20 Martin Uecker <muecker@gwdg.de>
301
302 * c-typeck.c (convert_lvalue_to_rvalue): Drop qualifiers.
303
d62586ee
GA
3042020-11-19 Jakub Jelinek <jakub@redhat.com>
305
306 PR c/97860
307 * c-decl.c (get_parm_array_spec): Bail out of nelts is
308 error_operand_p.
309
25bb75f8
GA
3102020-11-18 Jakub Jelinek <jakub@redhat.com>
311
312 * Make-lang.in (c.serial): New goal.
313 (.PHONY): Add c.serial c.prev.
314 (cc1$(exeext)): Call LINK_PROGRESS.
315
77f67db2
GA
3162020-11-13 Vladimir N. Makarov <vmakarov@redhat.com>
317
318 * c-parser.c (c_parser_asm_statement): Parse outputs for asm
319 goto too.
320 * c-typeck.c (build_asm_expr): Remove an assert checking output
321 absence for asm goto.
322
3232020-11-13 Jakub Jelinek <jakub@redhat.com>
324
325 * c-typeck.c (c_finish_omp_clauses): Don't clear
326 OMP_CLAUSE_REDUCTION_INSCAN unless reduction_seen == -2.
327
3282020-11-13 Iain Sandoe <iain@sandoe.co.uk>
329
330 PR objc/77404
331 * c-parser.c (c_parser_objc_class_definition): Pass the
332 location of the class name to the interface declaration.
333
bb622641
GA
3342020-11-10 Strager Neds <strager.nds@gmail.com>
335
336 * c-decl.c (merge_decls): Use new overload of
337 set_decl_section_name.
338
3392020-11-10 Chung-Lin Tang <cltang@codesourcery.com>
340
341 * c-parser.c (c_parser_omp_target_data): Add use of
342 new c_omp_adjust_map_clauses function. Add GOMP_MAP_ATTACH_DETACH as
343 handled map clause kind.
344 (c_parser_omp_target_enter_data): Likewise.
345 (c_parser_omp_target_exit_data): Likewise.
346 (c_parser_omp_target): Likewise.
347 * c-typeck.c (handle_omp_array_sections): Adjust COMPONENT_REF case to
348 use GOMP_MAP_ATTACH_DETACH map kind for C_ORT_OMP region type.
349 (c_finish_omp_clauses): Adjust bitmap checks to allow struct decl and
350 same struct field access to co-exist on OpenMP construct.
351
2da7ee05
GA
3522020-11-07 Martin Uecker <muecker@gwdg.de>
353
354 * c-parser.c (c_parser_label): Implement mixing of labels and code.
355 (c_parser_all_labels): Likewise.
356
44cab2d8
GA
3572020-11-06 Iain Sandoe <iain@sandoe.co.uk>
358
359 * c-parser.c (c_parser_objc_at_property_declaration):
360 Improve parsing fidelity. Associate better location info
361 with @property attributes. Clean up the interface to
362 objc_add_property_declaration ().
363
3642020-11-06 Nathan Sidwell <nathan@acm.org>
365
366 * c-decl.c (diagnose_mismatched_decls): Rename
367 DECL_IS_BUILTIN->DECL_IS_UNDECLARED_BUILTIN.
368 (warn_if_shadowing, implicitly_declare, names_builtin_p)
369 (collect_source_refs): Likewise.
370 * c-typeck.c (inform_declaration, inform_for_arg)
371 (convert_for_assignment): Likewise.
372
3732020-11-06 Tobias Burnus <tobias@codesourcery.com>
374
375 * c-parser.c (c_parser_omp_atomic): Add openacc parameter and update
376 OpenACC matching.
377 (c_parser_omp_construct): Update call.
378
35c125cb
GA
3792020-11-04 Jakub Jelinek <jakub@redhat.com>
380
381 PR c++/97670
382 * c-typeck.c (c_finish_omp_clauses): Look through array reductions to
383 find underlying decl to clear in the aligned_head bitmap.
384
3852020-11-04 Joseph Myers <joseph@codesourcery.com>
386
387 * c-decl.c (handle_nodiscard_attribute): New.
388 (std_attribute_table): Add nodiscard.
389 * c-parser.c (c_parser_std_attribute): Expect argument to
390 nodiscard attribute to be a string. Do not special-case ignoring
391 nodiscard.
392 * c-typeck.c (maybe_warn_nodiscard): New.
393 (build_compound_expr, emit_side_effect_warnings): Call
394 maybe_warn_nodiscard.
395 (c_process_expr_stmt, c_finish_stmt_expr): Also call
396 emit_side_effect_warnings if warn_unused_result.
397
4f0606fe
GA
3982020-10-29 Asher Gordon <AsDaGo@posteo.net>
399
400 * c-typeck.c (free_all_tagged_tu_seen_up_to): Replace free
401 with XDELETE.
402 (finish_init): Likewise.
403 (pop_init_level): Likewise.
404
e93aae4a
GA
4052020-10-28 Joseph Myers <joseph@codesourcery.com>
406
407 * c-decl.c (store_parm_decls_newstyle): Use pedwarn_c11 not
408 error_at for omitted parameter name.
409
4102020-10-28 Jakub Jelinek <jakub@redhat.com>
411
412 * c-parser.c (c_parser_omp_clause_name): Handle allocate.
413 (c_parser_omp_clause_allocate): New function.
414 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_ALLOCATE.
415 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
416 OMP_PARALLEL_CLAUSE_MASK, OMP_SINGLE_CLAUSE_MASK,
417 OMP_TASK_CLAUSE_MASK, OMP_TASKGROUP_CLAUSE_MASK,
418 OMP_DISTRIBUTE_CLAUSE_MASK, OMP_TEAMS_CLAUSE_MASK,
419 OMP_TARGET_CLAUSE_MASK, OMP_TASKLOOP_CLAUSE_MASK): Add
420 PRAGMA_OMP_CLAUSE_ALLOCATE.
421 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_ALLOCATE.
422
89bb01e7
GA
4232020-10-27 Joseph Myers <joseph@codesourcery.com>
424
425 * c-parser.c (c_parser_std_attribute_specifier): Allow duplicate
426 standard attributes.
427
efe71fcc
GA
4282020-10-23 Marek Polacek <polacek@redhat.com>
429
430 PR c++/91741
431 * c-parser.c (c_parser_binary_expression): Implement -Wsizeof-array-div.
432 (c_parser_postfix_expression): Set PAREN_SIZEOF_EXPR.
433 (c_parser_expr_list): Handle PAREN_SIZEOF_EXPR like SIZEOF_EXPR.
434 * c-tree.h (char_type_p): Declare.
435 * c-typeck.c (char_type_p): No longer static.
436
4372020-10-23 Martin Sebor <msebor@redhat.com>
438
439 PR middle-end/97552
440 * c-decl.c (get_parm_array_spec): Handle static VLA parameters.
441
2fe5b7d1
GA
4422020-09-19 Martin Sebor <msebor@redhat.com>
443
444 PR c/50584
445 * c-decl.c (lookup_last_decl): Define new function.
446 (c_decl_attributes): Call it.
447 (start_decl): Add argument and use it.
448 (finish_decl): Call build_attr_access_from_parms and decl_attributes.
449 (get_parm_array_spec): Define new function.
450 (push_parm_decl): Call get_parm_array_spec.
451 (start_function): Call warn_parm_array_mismatch. Build attribute
452 access and add it to current function.
453 * c-parser.c (c_parser_declaration_or_fndef): Diagnose mismatches
454 in forms of array parameters.
455 * c-tree.h (start_decl): Add argument.
456
4572020-09-19 Sandra Loosemore <sandra@codesourcery.com>
458
459 * c-decl.c (c_break_label, c_cont_label): Delete, and replace
460 with...
461 (in_statement): New.
462 (start_function): Adjust for above change.
463 (c_push_function_context, c_pop_function_context): Likewise.
464 * c-lang.h (struct language_function): Likewise.
465 * c-objc-common.h (LANG_HOOKS_BLOCK_MAY_FALLTHRU): Define.
466 * c-parser.c (objc_foreach_break_label, objc_foreach_continue_label):
467 New.
468 (c_parser_statement_after_labels): Adjust calls to c_finish_bc_stmt.
469 (c_parser_switch_statement): Adjust break/switch context handling
470 and calls to renamed functions.
471 (c_parser_while_statement): Adjust break/switch context handling and
472 build a WHILE_STMT.
473 (c_parser_do_statement): Ditto, with DO_STMT respectively.
474 (c_parser_for_statement): Ditto, with FOR_STMT respectively.
475 (c_parser_omp_for_loop): Adjust break/switch context handling.
476 * c-tree.h (c_break_label, c_cont_label): Delete.
477 (IN_SWITCH_STMT, IN_ITERATION_STMT): Define.
478 (IN_OMP_BLOCK, IN_OMP_FOR, IN_OBJC_FOREACH): Define.
479 (in_statement, switch_statement_break_seen_p): Declare.
480 (c_start_case, c_finish_case): Renamed to...
481 (c_start_switch, c_finish_switch).
482 (c_finish_bc_stmt): Adjust arguments.
483 * c-typeck.c (build_function_call_vec): Don't try to print
484 statements with %qE format.
485 (struct c_switch): Rename switch_expr field to switch_stmt.
486 Add break_stmt_seen_p field.
487 (c_start_case): Rename to c_start_switch. Build a SWITCH_STMT
488 instead of a SWITCH_EXPR. Update for changes to struct c_switch.
489 (do_case): Update for changes to struct c_switch.
490 (c_finish_case): Rename to c_finish_switch. Update for changes to
491 struct c_switch and change of representation from SWITCH_EXPR to
492 SWITCH_STMT.
493 (c_finish_loop): Delete.
494 (c_finish_bc_stmt): Update to reflect changes to break/continue
495 state representation. Build a BREAK_STMT or CONTINUE_STMT instead
496 of a GOTO_EXPR except for objc foreach loops.
497
e1a4a8a0
GA
4982020-09-01 Jakub Jelinek <jakub@redhat.com>
499
500 PR c++/96867
501 * c-typeck.c (handle_omp_array_sections_1): Test C_ARRAY_PARAMETER
502 only on PARM_DECLs.
503
8f7ea26a
GA
5042020-08-28 Martin Sebor <msebor@redhat.com>
505
506 PR c/96596
507 * c-decl.c (match_builtin_function_types): Avoid dealing with erroneous
508 argument type.
509
8b394f01
GA
5102020-08-27 Martin Liska <mliska@suse.cz>
511
512 * gimple-parser.c (c_parser_gimple_compound_statement): Set exact argument of a vector
513 growth function to true.
514
db0f6efe
GA
5152020-08-25 Tobias Burnus <tobias@codesourcery.com>
516
517 PR c/96678
518 * c-typeck.c (handle_omp_array_sections_1): Talk about
519 array function parameter in the error message.
520
5c265693
GA
5212020-08-18 Jakub Jelinek <jakub@redhat.com>
522
523 PR c/96571
524 * c-parser.c (c_parser_generic_selection): Change match_found from bool
525 to int, holding index of the match. Call mark_exp_read on the selector
526 expression and on expressions other than the selected one.
527
4967ca2f
GA
5282020-08-01 Richard Sandiford <richard.sandiford@arm.com>
529
530 PR c/96377
531 * c-typeck.c (process_init_element): Split test for whether to
532 recurse into a record, union or array into...
533 (initialize_elementwise_p): ...this new function. Don't recurse
534 into a vector type if the initialization value is also a vector.
535
48cc2e46
GA
5362020-07-31 Richard Biener <rguenther@suse.de>
537
538 PR debug/96383
539 * c-objc-common.h (LANG_HOOKS_FINALIZE_EARLY_DEBUG):
540 Define to c_common_finalize_early_debug.
541
3ea9abca
GA
5422020-07-22 Tobias Burnus <tobias@codesourcery.com>
543
544 * c-parser.c (c_parser_omp_clause_hint): Require nonnegative hint clause.
545 (c_parser_omp_critical): Permit hint(0) clause without named critical.
546 (c_parser_omp_construct): Don't assert if error_mark_node is returned.
547
30430061
GA
5482020-07-21 Sunil K Pandey <skpgkp2@gmail.com>
549
550 PR target/95237
551 * c-decl.c (finish_decl): Call target hook
552 lower_local_decl_alignment to lower local decl alignment.
553
3f8ca9cb
GA
5542020-07-09 Julian Brown <julian@codesourcery.com>
555 Thomas Schwinge <thomas@codesourcery.com>
556
557 PR middle-end/95270
558 * c-typeck.c (c_finish_omp_clauses): Set OMP_CLAUSE_SIZE (bias) to zero
559 for standalone attach/detach clauses.
560
a82c4c4c 5612020-07-08 Eric Botcazou <ebotcazou@adacore.com>
50873cc5
GA
562
563 * c-typeck.c (convert_for_assignment): If -Wscalar-storage-order is
564 set, warn for conversion between pointers that point to incompatible
565 scalar storage orders.
566
f60ee68d
GA
5672020-07-07 Kaipeng Zhou <zhoukaipeng3@huawei.com>
568
569 * c-parser.c (c_parser_statement_after_labels): Pass correct
570 parameters to c_parser_do_statement.
571
56638b9b
GA
5722020-06-16 Jakub Jelinek <jakub@redhat.com>
573
574 * c-parser.c (c_parser_expr_no_commas): Save, clear and restore
575 c_in_omp_for.
576 (c_parser_omp_for_loop): Set c_in_omp_for around some calls to avoid
577 premature c_fully_fold. Defer explicit c_fully_fold calls to after
578 c_finish_omp_for.
579 * c-tree.h (c_in_omp_for): Declare.
580 * c-typeck.c (c_in_omp_for): Define.
581 (build_modify_expr): Avoid c_fully_fold if c_in_omp_for.
582 (digest_init): Likewise.
583 (build_binary_op): Likewise.
584
5852020-06-16 Jakub Jelinek <jakub@redhat.com>
586
587 * c-parser.c (c_parser_omp_clause_schedule): Reject modifier separated
588 from kind by comma rather than colon.
589
1a59f3db
GA
5902020-06-05 Mark Wielaard <mark@klomp.org>
591
592 * c-decl.c (implicit_decl_warning): When warned and olddecl is
593 an undeclared builtin, then add a fixit header hint, if found.
594 (implicitly_declare): Add OPT_Wbuiltin_declaration_mismatch to
595 warning_at about implicit builtin declaration type mismatch.
596
9a5b7438
GA
5972020-06-03 Mark Wielaard <mark@klomp.org>
598
599 * c-parser.c (struct c_parser): Add seen_string_literal
600 bitfield.
601 (c_parser_consume_token): Reset seen_string_literal.
602 (c_parser_error_richloc): Add name_hint if seen_string_literal
603 and next token is a CPP_NAME and we have a missing header
604 suggestion for the name.
605 (c_parser_string_literal): Set seen_string_literal.
606
6072020-06-03 Mark Wielaard <mark@klomp.org>
608
609 * c-parser.c (c_parser_postfix_expression_after_primary): Add
610 scope with matching_parens after CPP_OPEN_PAREN.
611
6122020-06-03 Tobias Burnus <tobias@codesourcery.com>
613
614 * c-objc-common.h (LANG_HOOKS_OMP_PREDETERMINED_MAPPING): Redefine.
615
53ffb43a
GA
6162020-05-28 Nicolas Bértolo <nicolasbertolo@gmail.com>
617
618 * Make-lang.in: Remove extra slash.
619
8f66f175
ML
6202020-05-19 Martin Liska <mliska@suse.cz>
621
622 * c-parser.c: Fix typo.
623
49ddde69
JJ
6242020-05-14 Jakub Jelinek <jakub@redhat.com>
625
626 * c-parser.c (c_parser_omp_target): Set cfun->has_omp_target.
627
eb72dc66
RB
6282020-05-07 Richard Biener <rguenther@suse.de>
629
630 PR middle-end/94703
631 * gimple-parser.c (c_parser_parse_ssa_name): Do not set
632 DECL_GIMPLE_REG_P.
633
bf915591
JJ
6342020-04-30 Jakub Jelinek <jakub@redhat.com>
635
636 PR c/94842
637 * c-decl.c (set_labels_context_r): In addition to context-less
638 LABEL_DECLs adjust also LABEL_DECLs with context equal to
639 parent function if any.
640 (store_parm_decls): Adjust comment.
641
e1113ffb
JJ
6422020-04-19 Jakub Jelinek <jakub@redhat.com>
643
644 PR objc/94637
645 * c-parser.c (c_parser_objc_selector_arg): Handle CPP_SCOPE like
646 two CPP_COLON tokens.
647
2e389749
JJ
6482020-04-17 Jakub Jelinek <jakub@redhat.com>
649
650 PR other/94629
651 * c-parser.c (c_parser_oacc_routine): Remove redundant assignment
652 to data.clauses.
653
2dc9294c
JJ
6542020-04-15 Jakub Jelinek <jakub@redhat.com>
655
656 PR c/94593
657 * c-parser.c (c_parser_pragma) <case PRAGMA_OMP_REQUIRES>: Reject
658 requires directive when not at file scope.
659
13e41d8b
TB
6602020-04-08 Tobias Burnus <tobias@codesourcery.com>
661
662 PR middle-end/94120
663 * c-decl.c (c_check_in_current_scope): New function.
664 * c-tree.h (c_check_in_current_scope): Declare it.
665 * c-parser.c (c_parser_oacc_declare): Add check that variables
666 are declared in the same scope as the directive. Fix handling
667 of namespace vars.
668
4df50a05
JJ
6692020-04-07 Jakub Jelinek <jakub@redhat.com>
670
671 PR c++/94512
672 * c-parser.c (c_parser_omp_parallel): Set OMP_PARALLEL_COMBINED
673 if c_parser_omp_master succeeded.
674
5db9e893
JJ
6752020-03-23 Jakub Jelinek <jakub@redhat.com>
676
677 PR gcov-profile/94029
678 PR c/94239
679 * c-parser.c (c_parser_declaration_or_fndef): Initialize endloc to
680 the function_start_locus location. Don't do that afterwards for the
681 __GIMPLE body parsing.
682
9def91e9
JJ
6832020-03-19 Jakub Jelinek <jakub@redhat.com>
684
685 PR gcov-profile/94029
686 * c-tree.h (finish_function): Add location_t argument defaulted to
687 input_location.
688 * c-parser.c (c_parser_compound_statement): Add endlocp argument and
689 set it to the locus of closing } if non-NULL.
690 (c_parser_compound_statement_nostart): Return locus of closing }.
691 (c_parser_parse_rtl_body): Likewise.
692 (c_parser_declaration_or_fndef): Propagate locus of closing } to
693 finish_function.
694 * c-decl.c (finish_function): Add end_loc argument, use it instead of
695 input_location to set function_end_locus.
696
046c5890
JJ
6972020-03-17 Jakub Jelinek <jakub@redhat.com>
698
699 PR c/94172
700 * c-tree.h (C_TYPE_INCOMPLETE_VARS): Define to TYPE_LANG_SLOT_1
701 instead of TYPE_VFIELD, and support it on {RECORD,UNION,ENUMERAL}_TYPE.
702 (TYPE_ACTUAL_ARG_TYPES): Check that it is only used on FUNCTION_TYPEs.
703 * c-decl.c (pushdecl): Push C_TYPE_INCOMPLETE_VARS also to
704 ENUMERAL_TYPEs.
705 (finish_incomplete_vars): New function, moved from finish_struct. Use
706 relayout_decl instead of layout_decl.
707 (finish_struct): Remove obsolete comment about C_TYPE_INCOMPLETE_VARS
708 being TYPE_VFIELD. Use finish_incomplete_vars.
709 (finish_enum): Clear C_TYPE_INCOMPLETE_VARS. Call
710 finish_incomplete_vars.
711 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
712 also on ENUMERAL_TYPEs.
713
c015ff8c
JJ
7142020-03-16 Jakub Jelinek <jakub@redhat.com>
715
716 PR c/94179
717 * c-fold.c (c_fully_fold_internal): Handle MEM_REF.
718
f2e9fe5f
MS
7192020-03-13 Martin Sebor <msebor@redhat.com>
720
721 PR c/94040
722 * c-decl.c (builtin_structptr_type_count): New constant.
723 (match_builtin_function_types): Reject decls that are incompatible
724 in types pointed to by pointers.
725 (diagnose_mismatched_decls): Adjust comments.
726
c9d70946
JM
7272020-03-05 Joseph Myers <joseph@codesourcery.com>
728
729 PR c/93577
730 * c-typeck.c (pop_init_level): Do not diagnose initializers as
731 empty when initialized type is error_mark_node.
732 (set_designator, process_init_element): Ignore initializers for
733 elements of a variable-size type or of error_mark_node.
734
726e292d
MS
7352020-03-01 Martin Sebor <msebor@redhat.com>
736
737 PR middle-end/93926
738 * c-decl.c (types_close_enough_to_match): New function.
739 (match_builtin_function_types):
740 (diagnose_mismatched_decls): Add missing inform call to a warning.
741
a499c2f8
MS
7422020-03-01 Martin Sebor <msebor@redhat.com>
743
744 PR c/93812
745 * c-typeck.c (build_functype_attribute_variant): New function.
746 (composite_type): Call it.
747
9c3da8cc
JJ
7482020-02-25 Jakub Jelinek <jakub@redhat.com>
749
750 PR other/93912
751 * gimple-parser.c (c_parser_gimple_parse_bb_spec_edge_probability):
752 Rename last argument from probablity to probability.
753
bacdd5e9
JJ
7542020-02-13 Jakub Jelinek <jakub@redhat.com>
755
756 PR c/93576
757 * c-decl.c (grokdeclarator): If this_size_varies, only push size into
758 *expr if it has side effects.
759
f9eb0973
JL
7602020-01-30 Jeff Law <law@redhat.com>
761
762 PR c/88660
763 * c-parser.c (c_parser_switch_statement): Make sure to request
764 marking the switch expr as used.
765
ac68e287
JM
7662020-01-22 Joseph Myers <joseph@codesourcery.com>
767
768 PR c/93348
769 * c-typeck.c (build_c_cast): Call remove_c_maybe_const_expr on
770 argument with integer operands.
771
852f0ae8
KK
7722020-01-16 Kerem Kat <keremkat@gmail.com>
773
774 PR c/92833
775 * c-parser.c (c_parser_consume_token): Fix peeked token stack pop
776 to support 4 available tokens.
777
e2346a33
JM
7782020-01-15 Joseph Myers <joseph@codesourcery.com>
779
780 PR c/93072
781 * c-decl.c (pushdecl): Use TREE_PUBLIC, not DECL_EXTERNAL, to
782 determine whether to set DECL_CONTEXT.
783
3d77686d
JM
7842020-01-13 Joseph Myers <joseph@codesourcery.com>
785
786 PR c/93241
787 * c-typeck.c (build_c_cast): Check for expressions with integer
788 operands that can occur in an unevaluated part of an integer
789 constant expression and call note_integer_operands as needed.
790
f74c4b2c
RB
7912019-01-08 Richard Biener <rguenther@suse.de>
792
793 PR middle-end/93199
794 * gimple-parser.c (c_parser_parse_gimple_body): Remove __PHI IFN
795 permanently.
796
8d9254fc
JJ
7972020-01-01 Jakub Jelinek <jakub@redhat.com>
798
799 Update copyright years.
800
39292e25
EB
8012019-12-20 Eric Botcazou <ebotcazou@adacore.com>
802
803 * c-decl.c (collect_source_ref_cb): Delete.
804 (for_each_global_decl): Rename into...
805 (collect_source_refs): ...this. Call collect_source_ref directly.
806 (c_parse_final_cleanups): Always call collect_source_ref on the main
807 input filename.
808
519d7496
JB
8092019-12-19 Julian Brown <julian@codesourcery.com>
810 Cesar Philippidis <cesar@codesourcery.com>
811
812 * c-parser.c (c_parser_omp_clause_name): Add parsing of attach and
813 detach clauses.
814 (c_parser_omp_variable_list): Add ALLOW_DEREF optional parameter.
815 Allow deref (->) in variable lists if true.
816 (c_parser_omp_var_list_parens): Add ALLOW_DEREF optional parameter.
817 Pass to c_parser_omp_variable_list.
818 (c_parser_oacc_data_clause): Support attach and detach clauses. Update
819 call to c_parser_omp_variable_list.
820 (c_parser_oacc_all_clauses): Support attach and detach clauses.
821 (OACC_DATA_CLAUSE_MASK, OACC_ENTER_DATA_CLAUSE_MASK,
822 OACC_KERNELS_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK,
823 OACC_SERIAL_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_ATTACH.
824 (OACC_EXIT_DATA_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_DETACH.
825 * c-typeck.c (handle_omp_array_sections_1): Reject subarrays for attach
826 and detach. Support deref.
827 (handle_omp_array_sections): Use GOMP_MAP_ATTACH_DETACH instead of
828 GOMP_MAP_ALWAYS_POINTER for OpenACC.
829 (c_oacc_check_attachments): New function.
830 (c_finish_omp_clauses): Check attach/detach arguments for being
831 pointers using above. Support deref.
832
a6163563
JB
8332019-12-19 Julian Brown <julian@codesourcery.com>
834 Maciej W. Rozycki <macro@codesourcery.com>
835 Tobias Burnus <tobias@codesourcery.com>
836 Thomas Schwinge <thomas@codesourcery.com>
837
838 * c-parser.c (c_parser_omp_clause_name): Support no_create.
839 (c_parser_oacc_data_clause): Likewise.
840 (c_parser_oacc_all_clauses): Likewise.
841 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
842 (OACC_PARALLEL_CLAUSE_MASK, OACC_SERIAL_CLAUSE_MASK): Add
843 PRAGMA_OACC_CLAUSE_NO_CREATE.
844 * c-typeck.c (handle_omp_array_sections): Support
845 GOMP_MAP_NO_ALLOC.
846
d68f5d45
DM
8472019-12-09 David Malcolm <dmalcolm@redhat.com>
848
849 * c-objc-common.c (range_label_for_type_mismatch::get_text):
850 Replace label_text ctor calls.
851
4691bf46
JM
8522019-12-04 Joseph Myers <joseph@codesourcery.com>
853
854 PR c/36941
855 PR c/88827
856 * c-typeck.c (convert_lvalue_to_rvalue): Call
857 require_complete_type for arguments not of void types.
858 (build_indirect_ref): Do not diagnose dereferencing pointers to
859 incomplete types.
860 * c-tree.h (C_TYPE_ERROR_REPORTED): Remove.
861
85d11957
JM
8622019-12-03 Joseph Myers <joseph@codesourcery.com>
863
864 PR c/88704
865 * c-decl.c (store_parm_decls_oldstyle): Diagnose use of [*] in
866 old-style parameter definitions.
867
4569f8b3
SL
8682019-12-01 Sandra Loosemore <sandra@codesourcery.com>
869
870 PR target/92499
871
872 * c-decl.c (flexible_array_type_p): Move to common code.
873
65ef05d0
RS
8742019-11-30 Richard Sandiford <richard.sandiford@arm.com>
875
876 * c-decl.c (start_decl): Allow initialization of variables whose
877 size is a POLY_INT_CST.
878 (finish_decl): Use verify_type_context to check whether the target
879 allows variables with a particular type to have static or thread-local
880 storage duration. Don't raise a second error if such variables do
881 not have a constant size.
882 (grokdeclarator): Use verify_type_context to check whether the
883 target allows fields or array elements to have a particular type.
884 * c-typeck.c (pointer_diff): Use verify_type_context to test whether
885 the target allows pointer difference for the types involved.
886 (build_unary_op): Likewise for pointer increment and decrement.
887
34b43828
JM
8882019-11-29 Joseph Myers <joseph@codesourcery.com>
889
890 * c-parser.c (struct c_parser): Add members raw_tokens and
891 raw_tokens_used.
892 (c_lex_one_token): Add argument raw. Handle lexing raw tokens and
893 using previously-lexed raw tokens.
894 (c_parser_peek_nth_token_raw)
895 (c_parser_check_balanced_raw_token_sequence): New functions.
896 (c_parser_nth_token_starts_std_attributes): Use
897 c_parser_check_balanced_raw_token_sequence for Objective-C.
898
5b8d9367
JM
8992019-11-25 Joseph Myers <joseph@codesourcery.com>
900
901 PR c/91985
902 * c-decl.c (finish_declspecs): Use int instead of decimal
903 floating-point types if decimal floating-point not supported.
904
1723e1be
JM
9052019-11-25 Joseph Myers <joseph@codesourcery.com>
906
907 * c-tree.h (struct c_declarator): Use a structure for id member.
908 * c-decl.c (grokdeclarator): Extract attributes from cdk_id
909 declarators at the start, not when handling individual declarators
910 later. Use u.id.id instead of u.id.
911 (grokfield): Use u.id.id instead of u.id.
912 (build_id_declarator): Set u.id.id and u.id.attrs.
913 (finish_declspecs): Handle postfix attributes in case of typedef
914 name or typeof used.
915 * c-parser.c (c_parser_direct_declarator)
916 (c_parser_direct_declarator_inner): Place declarator for
917 attributes inside that for function or array, not outside. Set
918 u.id.attrs for identifiers.
919 (c_parser_parameter_declaration): Use u.id.id instead of u.id.
920 * gimple-parser.c (c_parser_gimple_declaration): Use u.id.id
921 instead of u.id.
922
bdaf8be1
JJ
9232019-11-22 Jakub Jelinek <jakub@redhat.com>
924
925 PR c/90677
926 * c-decl.c (identifier_global_tag): Define.
927
3e00ba47
RB
9282019-11-20 Richard Biener <rguenther@suse.de>
929
930 PR c/92088
931 * c-decl.c (grokdeclarator): Prevent inlining of nested
932 function with VLA arguments.
933
8c5b727a
JM
9342019-11-20 Joseph Myers <joseph@codesourcery.com>
935
936 * c-decl.c (c_warn_type_attributes): New function.
937 (groktypename, grokdeclarator, finish_declspecs): Call
938 c_warn_type_attributes before applying attributes to types.
939 * c-tree.h (c_warn_type_attributes): Declare.
940
192961ff
JM
9412019-11-19 Joseph Myers <joseph@codesourcery.com>
942
943 * c-decl.c (c_warn_unused_attributes): Use pedwarn not warning for
944 standard attributes.
945 * c-parser.c (c_parser_std_attribute): Take argument for_tm. Use
946 pedwarn for unknown standard attributes and return error_mark_node
947 for them.
948
20a38017
MM
9492019-11-18 Matthew Malcomson <matthew.malcomson@arm.com>
950
951 * c-parser.c (c_parser_parse_rtl_body): Always call
952 run_rtl_passes, even if startwith pass is not provided.
953
d5fbe5e0
JM
9542019-11-15 Joseph Myers <joseph@codesourcery.com>
955
956 * c-parser.c (c_parser_std_attribute_specifier): Diagnose
957 duplicate standard attributes.
958
97cc1187
JM
9592019-11-15 Joseph Myers <joseph@codesourcery.com>
960
961 * c-decl.c (std_attribute_table): Add maybe_unused.
962
f8aea5e3
JM
9632019-11-15 Joseph Myers <joseph@codesourcery.com>
964
965 * c-decl.c (std_attribute_table): Add fallthrough.
966 * c-parser.c (c_parser_declaration_or_fndef): Diagnose fallthrough
967 attribute at top level.
968
2cc94aa8
JM
9692019-11-15 Joseph Myers <joseph@codesourcery.com>
970
971 * c-decl.c (std_attribute_table): New.
972 (c_init_decl_processing): Register attributes from
973 std_attribute_table.
974 * c-parser.c (c_parser_attribute_arguments): Add arguments
975 require_string and allow_empty_args. All callers changed.
976 (c_parser_std_attribute): Set require_string argument for
977 "deprecated" attribute.
978
7c5890cc
JM
9792019-11-14 Joseph Myers <joseph@codesourcery.com>
980
981 * c-parser.c (c_parser_postfix_expression)
982 (c_parser_check_literal_zero): Handle CPP_UTF8CHAR.
983 * gimple-parser.c (c_parser_gimple_postfix_expression): Likewise.
984
e8738f4e
RS
9852019-11-14 Richard Sandiford <richard.sandiford@arm.com>
986
987 * c-typeck.c (build_conditional_expr): Use truth_type_for instead
988 of build_same_sized_truth_vector_type.
989 (build_vec_cmp): Likewise.
990
b2417b59
JJ
9912019-11-14 Jakub Jelinek <jakub@redhat.com>
992
bedb7f04
JJ
993 * c-parser.c (c_parser_omp_context_selector): Don't require score
994 argument to fit into shwi, just to be INTEGER_CST. Diagnose
995 negative score.
996
b2417b59
JJ
997 * c-parser.c (c_parser_omp_context_selector): Rename
998 CTX_PROPERTY_IDLIST to CTX_PROPERTY_NAME_LIST, add CTX_PROPERTY_ID.
999 Use CTX_PROPERTY_ID for atomic_default_mem_order, only allow a single
1000 identifier in that. For CTX_PROPERTY_NAME_LIST, allow identifiers
1001 and string literals.
1002
4e03c3a7
JM
10032019-11-14 Joseph Myers <joseph@codesourcery.com>
1004
1005 * c-tree.h (enum c_typespec_kind): Add ctsk_tagref_attrs and
1006 ctsk_tagfirstref_attrs.
1007 (struct c_declspecs): Update description of attrs. Add
1008 postfix_attrs and non_std_attrs_seen_p. Increase size of
1009 typespec_kind bit-field.
1010 (c_warn_unused_attributes): New declaration.
1011 (parser_xref_tag): Update prototype.
1012 * c-decl.c (c_warn_unused_attributes): New function.
1013 (shadow_tag_warned): Handle ctsk_tagfirstref_attrs and
1014 ctsk_tagref_attrs. Handle attribute declarations.
1015 (check_compound_literal_type): Handle ctsk_tagfirstref_attrs.
1016 (grokdeclarator): Handle standard attributes.
1017 (parser_xref_tag): Add arguments have_std_attrs and attrs. Apply
1018 attributes to incomplete type reference.
1019 (xref_tag): Update call to parser_xref_tag.
1020 (declspecs_add_addrspace, declspecs_add_type)
1021 (declspecs_add_scspec, declspecs_add_attrs): Set
1022 non_std_attrs_seen_p.
1023 (finish_declspecs): Apply postfix standard attributes to type.
1024 * c-parser.c (c_token_starts_declspecs)
1025 (c_token_starts_declaration, c_parser_next_token_starts_declspecs)
1026 (c_parser_next_tokens_start_declaration): Update comments.
1027 (c_parser_consume_token, c_parser_consume_pragma): Handle moving
1028 parser->tokens[2] to parser->tokens[1].
1029 (c_parser_nth_token_starts_std_attributes)
1030 (c_parser_std_attribute_specifier_sequence): New functions.
1031 (c_parser_declaration_or_fndef): Add arguments have_attrs and
1032 attrs. All callers changed. Handle standard attributes.
1033 (c_parser_parms_declarator, c_parser_parms_list_declarator)
1034 (c_parser_parameter_declaration): Add argument have_gnu_attrs.
1035 All callers changed.
1036 (c_parser_declspecs): Add arguments start_std_attr_ok and
1037 end_std_attr_ok. All callers changed. Handle standard
1038 attributes.
1039 (c_parser_enum_specifier, c_parser_struct_or_union_specifier)
1040 (c_parser_direct_declarator, c_parser_direct_declarator_inner)
1041 (c_parser_compound_statement_nostart, c_parser_all_labels)
1042 (c_parser_label, c_parser_statement, c_parser_for_statement):
1043 Handle standard attributes.
1044 * c-parser.h (c_parser_declspecs): Update prototype.
1045 * gimple-parser.c (c_parser_gimple_declaration): Update call to
1046 c_parser_declspecs.
1047
0c29cac4
ML
10482019-11-12 Martin Liska <mliska@suse.cz>
1049
1050 * gimple-parser.c: Do not include params.h.
1051
028d4092
ML
10522019-11-12 Martin Liska <mliska@suse.cz>
1053
1054 * gimple-parser.c (c_parser_parse_gimple_body): Replace old parameter syntax
1055 with the new one, include opts.h if needed. Use SET_OPTION_IF_UNSET
1056 macro.
1057
62aee289
MR
10582019-11-12 Maciej W. Rozycki <macro@codesourcery.com>
1059 Frederik Harwath <frederik@codesourcery.com>
1060
1061 gcc/c/
1062 * c-parser.c (OACC_SERIAL_CLAUSE_MASK): New macro.
1063 (c_parser_oacc_kernels_parallel): Rename function to...
1064 (c_parser_oacc_compute): ... this. Handle PRAGMA_OACC_SERIAL.
1065 (c_parser_omp_construct): Update accordingly.
1066
1067
7cec9588
JJ
10682019-11-11 Jakub Jelinek <jakub@redhat.com>
1069
1070 * c-parser.c (c_parser_translation_unit): Diagnose declare target
1071 without corresponding end declare target.
1072
f486280c
RS
10732019-11-08 Richard Sandiford <richard.sandiford@arm.com>
1074
1075 * c-convert.c (convert): Only handle vector conversions if one of
1076 the types satisfies gnu_vector_type_p or if -flax-vector-conversions
1077 allows it.
1078 * c-typeck.c (build_array_ref): Only allow vector indexing if the
1079 vectors satisfy gnu_vector_type_p.
1080 (build_unary_op): Only allow unary operators to be applied to
1081 vectors if they satisfy gnu_vector_type_p.
1082 (digest_init): Only allow by-element initialization of vectors
1083 if they satisfy gnu_vector_type_p.
1084 (really_start_incremental_init): Likewise.
1085 (push_init_level): Likewise.
1086 (pop_init_level): Likewise.
1087 (process_init_element): Likewise.
1088 (build_binary_op): Only allow binary operators to be applied to
1089 vectors if they satisfy gnu_vector_type_p.
1090
017c6491
JM
10912019-11-08 Joseph Myers <joseph@codesourcery.com>
1092
1093 * c-decl.c (grokparms): Convert () in a function definition to
1094 (void) for C2x.
1095 (store_parm_decls_oldstyle): Pedwarn for C2x.
1096 (store_parm_decls): Update comment about () not generating a
1097 prototype.
1098
c01bd174
JM
10992019-11-07 Joseph Myers <joseph@codesourcery.com>
1100
1101 * c-parser.c (c_parser_attribute_arguments): New function.
1102 Factored out of c_parser_gnu_attribute.
1103 (c_parser_gnu_attribute): Use c_parser_attribute_arguments.
1104 (c_parser_balanced_token_sequence, c_parser_std_attribute)
1105 (c_parser_std_attribute_specifier): New functions.
1106 (c_parser_transaction_attributes): Use
1107 c_parser_std_attribute_specifier.
1108
471c5330
JM
11092019-11-07 Joseph Myers <joseph@codesourcery.com>
1110
1111 * c-parser.c (c_parser): Remove lex_untranslated_string. Add
1112 lex_joined_string and translate_strings_p.
1113 (c_lex_one_token): Pass 0 or C_LEX_STRING_NO_JOIN to
1114 c_lex_with_flags.
1115 (c_parser_string_literal): New function.
1116 (c_parser_static_assert_declaration_no_semi): Use
1117 c_parser_string_literal. Do not set lex_untranslated_string.
1118 (c_parser_asm_string_literal): Use c_parser_string_literal.
1119 (c_parser_simple_asm_expr): Do not set lex_untranslated_string.
1120 (c_parser_gnu_attributes): Set and restore translate_strings_p
1121 instead of lex_untranslated_string.
1122 (c_parser_asm_statement): Do not set lex_untranslated_string.
1123 (c_parser_asm_operands): Likewise.
1124 (c_parser_has_attribute_expression): Set and restore
1125 translate_strings_p instead of lex_untranslated_string.
1126 (c_parser_postfix_expression): Use c_parser_string_literal.
1127 (pragma_lex): Likewise.
1128 (c_parser_pragma_pch_preprocess): Set lex_joined_string.
1129 (c_parse_file): Set translate_strings_p.
1130 * gimple-parser.c (c_parser_gimple_postfix_expression)
1131 (c_parser_gimple_or_rtl_pass_list): Use c_parser_string_literal.
1132 * c-parser.c (c_parser_string_literal): Declare function.
1133
d0c464d2
JJ
11342019-11-02 Jakub Jelinek <jakub@redhat.com>
1135
1136 * c-parser.c (c_finish_omp_declare_variant): Use
1137 omp_get_context_selector instead of c_omp_get_context_selector.
1138
ac2cfa6c
RS
11392019-10-29 Richard Sandiford <richard.sandiford@arm.com>
1140
1141 * c-tree.h (c_simulate_enum_decl): Declare.
1142 * c-decl.c (c_simulate_enum_decl): New function.
1143 * c-objc-common.h (LANG_HOOKS_SIMULATE_ENUM_DECL): Define to the above.
1144
74078538
RS
11452019-10-29 Richard Sandiford <richard.sandiford@arm.com>
1146
1147 * c-tree.h (c_simulate_builtin_function_decl): Declare.
1148 * c-decl.c (c_simulate_builtin_function_decl): New function.
1149 * c-objc-common.h (LANG_HOOKS_SIMULATE_BUILTIN_FUNCTION_DECL): Define
1150 to the above.
1151
ad1539d5
MS
11522019-10-28 Martin Sebor <msebor@redhat.com>
1153
1154 PR c/66970
1155 * c-decl.c (names_builtin_p): Define a new function.
1156
cb73e4e7
RB
11572019-10-28 Richard Biener <rguenther@suse.de>
1158
1159 PR c/92249
1160 * gimple-parser.c (c_parser_parse_gimple_body): Make
1161 current_bb the entry block initially to easier recover
1162 from errors.
1163 (c_parser_gimple_compound_statement): Adjust.
1164
135df52c
JJ
11652019-10-24 Jakub Jelinek <jakub@redhat.com>
1166
1167 * c-parser.c (c_finish_omp_declare_variant): Use
1168 omp_context_selector_matches instead of
1169 c_omp_context_selector_matches.
1170 * c-decl.c (c_decl_attributes): Add "omp declare target block"
1171 attribute in between declare target and end declare target
1172 pragmas.
1173
783bfe5e
JM
11742019-10-15 Joseph Myers <joseph@codesourcery.com>
1175
1176 * c-parser.c (c_parser_attribute_any_word): Rename to
1177 c_parser_gnu_attribute_any_word. All callers changed.
1178 (c_parser_attribute): Rename to c_parser_gnu_attribute. All
1179 callers changed.
1180 (c_parser_attributes): Rename to c_parser_gnu_attributes. All
1181 callers changed.
1182 (c_parser_declaration_or_fndef, c_parser_declspecs)
1183 (c_parser_enum_specifier, c_parser_struct_or_union_specifier)
1184 (c_parser_struct_declaration, c_parser_declarator)
1185 (c_parser_gnu_attribute, c_parser_compound_statement)
1186 (c_parser_label, c_parser_statement, c_parser_objc_method_decl)
1187 (c_parser_transaction_attributes): Add "gnu-" prefix to names of
1188 attribute-related syntax productions.
1189
56898e43
RS
11902019-10-14 Richard Sandiford <richard.sandiford@arm.com>
1191
1192 * c-objc-common.c (useful_aka_type_p): Replace with...
1193 (get_aka_type): ...this new function. Given the original type,
1194 decide which aka type to print (if any). Only look through typedefs
1195 if user_facing_original_type_p.
1196 (print_type): Update accordingly.
1197
b9424661
JJ
11982019-10-14 Jakub Jelinek <jakub@redhat.com>
1199
1200 * c-parser.c (c_parser_omp_all_clauses): Change bool NESTED_P argument
1201 into int NESTED, if it is 2, diagnose missing commas in between
1202 clauses.
1203 (c_parser_omp_context_selector): Pass 2 as last argument to
1204 c_parser_omp_all_clauses.
1205
20de9568
JJ
12062019-10-12 Jakub Jelinek <jakub@redhat.com>
1207
1208 * c-parser.c (c_parser_omp_context_selector): Improve error recovery.
1209 For simd properties, put them directly into TREE_VALUE.
1210 (c_finish_omp_declare_variant): Call c_omp_mark_declare_variant.
1211 If c_omp_context_selector_matches is 0, don't add attribute, otherwise
1212 add "omp declare variant base" attribute rather than
1213 "omp declare variant".
1214
fe2bc27c
JM
12152019-10-11 Joseph Myers <joseph@codesourcery.com>
1216
1217 * c-decl.c (declspecs_add_type): Use pedwarn_c11 for DFP types.
1218
94e7f906
JJ
12192019-10-10 Jakub Jelinek <jakub@redhat.com>
1220
1221 * c-parser.c (c_parser_omp_all_clauses): Add NESTED_P argument, if
1222 true, terminate processing on closing paren and don't skip to end of
1223 pragma line.
1224 (c_parser_omp_declare_simd): Handle also declare variant.
1225 (omp_construct_selectors, omp_device_selectors,
1226 omp_implementation_selectors, omp_user_selectors): New variables.
1227 (c_parser_omp_context_selector,
1228 c_parser_omp_context_selector_specification,
1229 c_finish_omp_declare_variant): New functions.
1230 (c_finish_omp_declare_simd): Handle both declare simd and
1231 declare variant.
1232 (c_parser_omp_declare): Handle declare variant.
1233
93313b94
JM
12342019-10-02 Joseph Myers <joseph@codesourcery.com>
1235
1236 * c-parser.c (c_parser_asm_statement): Handle CPP_SCOPE like two
1237 CPP_COLON tokens.
1238
55879815
RS
12392019-10-01 Richard Sandiford <richard.sandiford@arm.com>
1240
1241 * c-objc-common.c (useful_aka_type_p): New function.
1242 (print_type): Use it to decide whether an aka type is worth printing.
1243
59bc434a
JJ
12442019-09-27 Jakub Jelinek <jakub@redhat.com>
1245
1246 PR c++/88203
1247 * c-parser.c (c_parser_predefined_identifier): New function.
1248 (c_parser_postfix_expression): Use it.
1249 (c_parser_omp_variable_list): Parse predefined identifiers.
1250 * c-typeck.c (c_finish_omp_clauses): Allow predefined variables
1251 in shared and firstprivate clauses, even when they are predetermined
1252 shared.
1253
c6447c20
RS
12542019-09-27 Richard Sandiford <richard.sandiford@arm.com>
1255
1256 * c-typeck.c (build_function_call_vec): Take the original function
1257 decl as an optional final parameter. Pass all built-in calls to
1258 check_builtin_function_arguments.
1259
522da4c2
EB
12602019-09-20 Eric Botcazou <ebotcazou@adacore.com>
1261
1262 PR c/91815
1263 * c-decl.c (pushdecl): In C detect duplicate declarations across scopes
1264 of identifiers in the external scope only for variables and functions.
1265
68e2c199
PK
12662019-09-04 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1267
1268 PR c/78736
1269 * c-typeck.c (convert_for_assignment): Handle Wenum-conversion.
1270
22f8849d
IS
12712019-08-23 Iain Sandoe <iain@sandoe.co.uk>
1272
1273 PR pch/61250
1274 * c-parser.c (c_parse_file): Call c_common_no_more_pch ()
1275 after determining that the first token is not
1276 PRAGMA_GCC_PCH_PREPROCESS.
1277
db376f45
EB
12782019-08-22 Eric Botcazou <ebotcazou@adacore.com>
1279
1280 * c-parser.c (c_parser_declaration_or_fndef): Set DECL_ARGUMENTS of a
1281 FUNCTION_DECL to the right value in the presence of nested declarators.
1282
4d732405
RS
12832019-08-13 Richard Sandiford <richard.sandiford@arm.com>
1284
1285 PR middle-end/91421
1286 * c-decl.c (merge_decls): Use copy_decl_built_in_function.
1287
cb1180d5
RS
12882019-08-13 Richard Sandiford <richard.sandiford@arm.com>
1289
1290 PR middle-end/91421
1291 * c-decl.c (header_for_builtin_fn): Take a FUNCTION_DECL instead
1292 of a built_in_function.
1293 (diagnose_mismatched_decls, implicitly_declare): Update accordingly.
1294
77eb117f
JJ
12952019-08-10 Jakub Jelinek <jakub@redhat.com>
1296
1297 * c-parser.c (c_parser_omp_clause_name): Parse device_type.
1298 (c_parser_omp_clause_device_type): New function.
1299 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_DEVICE_TYPE.
1300 (OMP_DECLARE_TARGET_CLAUSE_MASK): Add PRAGMA_OMP_CLAUSE_DEVICE_TYPE.
1301 (c_parser_omp_declare_target): Handle device_type clauses. Remove
1302 diagnostics for declare target with clauses nested in clause-less
1303 declare target declaration-definition-seq.
1304 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_DEVICE_TYPE.
1305
2c3b8bad
JJ
13062019-08-09 Jakub Jelinek <jakub@redhat.com>
1307
bb522e2e
JJ
1308 * c-parser.c (check_no_duplicate_clause): Simplify using
1309 omp_find_clause.
1310 (c_parser_omp_clause_if): Fix up printing of target {enter,exit} data
1311 directive name modifiers.
1312 (c_parser_omp_clause_proc_bind): Check for duplicate proc_bind clause.
1313
2c3b8bad
JJ
1314 PR c/91401
1315 * c-parser.c (c_parser_omp_clause_dist_schedule): Fix up typos in the
1316 check_no_duplicate_clause call. Comment it out, instead emit a
1317 warning for duplicate dist_schedule clauses.
1318
99769e7f
RS
13192019-08-08 Richard Sandiford <richard.sandiford@arm.com>
1320
1321 * c-decl.c (finish_enum): Clear C_TYPE_BEING_DEFINED.
1322
8860d270
JJ
13232019-08-08 Jakub Jelinek <jakub@redhat.com>
1324
1325 * c-typeck.c (c_finish_omp_clauses): For C_ORT_OMP
1326 OMP_CLAUSE_USE_DEVICE_* clauses use oacc_reduction_head bitmap
1327 instead of generic_head to track duplicates.
1328
398e3feb
JJ
13292019-08-07 Jakub Jelinek <jakub@redhat.com>
1330
1331 * c-parser.c (c_parser_omp_clause_name): Parse use_device_addr clause.
1332 (c_parser_omp_clause_use_device_addr): New function.
1333 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR.
1334 (OMP_TARGET_DATA_CLAUSE_MASK): Add PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR.
1335 (c_parser_omp_target_data): Handle PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR
1336 like PRAGMA_OMP_CLAUSE_USE_DEVICE_PTR, adjust diagnostics about no
1337 map or use_device_* clauses.
1338 * c-typeck.c (c_finish_omp_clauses): For OMP_CLAUSE_USE_DEVICE_PTR
1339 in OpenMP, require pointer type rather than pointer or array type.
1340 Handle OMP_CLAUSE_USE_DEVICE_ADDR.
1341
a28351e7
JJ
13422019-07-31 Jakub Jelinek <jakub@redhat.com>
1343
1344 PR c/91192
1345 * c-parser.c (c_parser_sizeof_expression): Call set_c_expr_source_range
1346 even if finish is UNKNOWN_LOCATION, just use start as finish in that
1347 case.
1348
6343b6bf
ML
13492019-07-25 Martin Liska <mliska@suse.cz>
1350 Dominik Infuhr <dominik.infuehr@theobroma-systems.com>
1351
1352 PR c++/23383
1353 * c-decl.c (merge_decls): Merge OPERATOR_DELETE flag.
1354
cb50701e
ML
13552019-07-25 Martin Liska <mliska@suse.cz>
1356
1357 * c-decl.c (merge_decls): Use new macros
1358 (e.g. DECL_SET_LAMBDA_FUNCTION and DECL_LAMBDA_FUNCTION_P).
1359
62e3e66f
RB
13602019-07-23 Richard Biener <rguenther@suse.de>
1361
1362 PR tree-optimization/83518
1363 * gimple-parser.c (c_parser_parse_gimple_body): When we have
1364 a CFG also rebuild cgraph edges.
1365
554a530f
JJ
13662019-07-20 Jakub Jelinek <jakub@redhat.com>
1367
1368 * c-parser.c (c_parser_omp_clause_name): Handle bind clause.
1369 (c_parser_omp_clause_bind): New function.
1370 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_BIND.
1371 (OMP_LOOP_CLAUSE_MASK): Define.
1372 (c_parser_omp_loop): New function.
1373 (c_parser_omp_parallel, c_parser_omp_teams): Handle parsing of
1374 loop combined with parallel or teams.
1375 (c_parser_omp_construct): Handle PRAGMA_OMP_LOOP.
1376 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_BIND.
1377
d119bf79
RS
13782019-07-18 Richard Sandiford <richard.sandiford@arm.com>
1379
1380 PR c/53633
1381 * c-decl.c (finish_function): Check targetm.warn_func_return
1382 before issuing a -Wreturn-type warning.
1383
ab20d992 13842019-07-12 Alexandre Oliva <oliva@adacore.com>
fdc1f343
AO
1385
1386 * gimple-parser.c (c_parser_gimple_try_stmt): New.
1387 (c_parser_compound_statement): Call it.
1388
1fdd6f04
JJ
13892019-07-12 Jakub Jelinek <jakub@redhat.com>
1390
1391 * c-parser.c (c_parser_omp_clause_name): Handle order clause.
1392 (c_parser_omp_clause_order): New function.
1393 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_ORDER.
1394 (OMP_SIMD_CLAUSE_MASK, OMP_FOR_CLAUSE_MASK): Add
1395 PRAGMA_OMP_CLAUSE_ORDER.
1396 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_ORDER.
1397
8389386c
RB
13982019-07-10 Richard Biener <rguenther@suse.de>
1399
1400 * gimple-parser.c (c_parser_gimple_postfix_expression): Support
1401 _Literal (int *) &x for address literals.
1402
99b1c316
MS
14032019-07-09 Martin Sebor <msebor@redhat.com>
1404
1405 PR c++/61339
1406 * c-decl.c (xref_tag): Change class-key of PODs to struct and others
1407 to class.
1408 (field_decl_cmp): Same.
1409 * c-parser.c (c_parser_struct_or_union_specifier): Same.
1410 * c-tree.h: Same.
1411 * gimple-parser.c (c_parser_gimple_compound_statement): Same.
1412
6c1dae73
MS
14132019-07-09 Martin Sebor <msebor@redhat.com>
1414
1415 PR c++/61339
1416 * c-decl.c: Change class-key from class to struct and vice versa
1417 to match convention and avoid -Wclass-is-pod and -Wstruct-no-pod.
1418 * gimple-parser.c: Same.
1419
69b5279e
RB
14202019-07-01 Richard Biener <rguenther@suse.de>
1421
1422 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
1423 _Literal (char *) &"foo" for address literals pointing to
1424 STRING_CSTs.
1425
ab20d992
JJ
14262019-06-25 Jozef Lawrynowicz <jozef.l@mittosystems.com>
1427
1428 * c-parser.c (c_parse_init): Create keyword for "__intN__" type.
1429 * c-decl.c (declspecs_add_type): Don't pedwarn about "__intN" ISO
1430 C incompatibility if alternate "__intN__" form is used.
1431
1e3d475e
MS
14322019-06-24 Martin Sebor <msebor@redhat.com>
1433
1434 * c-typeck.c (build_binary_op): Hyphenate floating-point.
1435
bf38f7e9
JJ
14362019-06-10 Jakub Jelinek <jakub@redhat.com>
1437
1438 * c-parser.c (c_parser_pragma): Reject PRAGMA_OMP_SCAN.
1439 (c_parser_omp_clause_reduction): Don't sorry_at on inscan reductions.
1440 (c_parser_omp_scan_loop_body): New function.
1441 (c_parser_omp_for_loop): Call c_parser_omp_scan_loop_body if there are
1442 inscan reduction clauses.
1443 * c-typeck.c (c_finish_omp_clauses): Reject mixing inscan with
1444 non-inscan reductions on the same construct, or inscan reductions with
1445 ordered or schedule clauses, or inscan array reductions.
1446
65985d78
MS
14472019-06-05 Martin Sebor <msebor@redhat.com>
1448
1449 PR c/90737
1450 * c-typeck.c (c_finish_return): Only consider functions returning
1451 pointers as candidates for -Wreturn-local-addr.
1452
0ecf545c
MS
14532019-06-05 Martin Sebor <msebor@redhat.com>
1454
1455 * c-decl.c (start_decl): Adjust quoting and hyphenation
1456 in diagnostics.
1457 (finish_decl): Same.
1458 (finish_enum): Same.
1459 (start_function): Same.
1460 (declspecs_add_type): Same.
1461 * c-parser.c (warn_for_abs): Same.
1462 * c-typeck.c (build_binary_op): Same.
1463
e03436e7
TS
14642019-05-17 Thomas Schwinge <thomas@codesourcery.com>
1465
b48f44bf
TS
1466 PR c/89433
1467 * c-parser.c (c_finish_oacc_routine): Rework checking if already
1468 marked with an OpenACC 'routine' directive.
1469
5bf04509
TS
1470 PR c/89433
1471 * c-parser.c (c_parser_oacc_routine): Normalize order of clauses.
1472 (c_finish_oacc_routine): Call oacc_verify_routine_clauses.
1473
e03436e7
TS
1474 PR c/89433
1475 * c-parser.c (c_finish_oacc_routine): Refer to OpenACC 'routine'
1476 clauses from "omp declare target" attribute.
1477
a9c697b8
MS
14782019-05-16 Martin Sebor <msebor@redhat.com>
1479
ab20d992
JJ
1480 * c-decl.c (start_decl): Quote keywords, operators, and
1481 types in diagnostics.
1482 (finish_decl): Same.
1483 * c-parser.c (c_parser_asm_statement): Same.
1484 (c_parser_conditional_expression): Same.
1485 (c_parser_transaction_cancel): Same.
1486 * c-typeck.c (c_common_type): Same.
1487 (build_conditional_expr): Same.
1488 (digest_init): Same.
1489 (process_init_element): Same.
1490 (build_binary_op): Same.
a9c697b8 1491
c4499192
RB
14922019-05-17 Richard Biener <rguenther@suse.de>
1493
1494 * gimple-parser.c (c_parser_gimple_statement): Handle __VEC_PERM.
1495 (c_parser_gimple_unary_expression): Likewise.
1496 (c_parser_gimple_parentized_ternary_expression): New function.
1497
adfe6e4b
RB
14982019-05-16 Richard Biener <rguenther@suse.de>
1499
1500 * gimple-parser.c (c_parser_gimple_statement): Handle __BIT_INSERT.
1501 (c_parser_gimple_unary_expression): Likewise.
1502
186dabf2
RB
15032019-05-15 Richard Biener <rguenther@suse.de>
1504
1505 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
1506 __BIT_FIELD_REF.
1507
1158c5b4
RB
15082019-05-14 Richard Biener <rguenther@suse.de>
1509
1510 * gimple-parser.c (c_parser_gimple_statement): Remove
1511 questionable auto-promotion to VIEW_CONVERT_EXPR.
1512 (c_parser_gimple_typespec): Split out from __MEM parsing.
1513 (c_parser_gimple_postfix_expression): Handle __VIEW_CONVERT.
1514 * tree-pretty-print.c (dump_generic_node): Dump VIEW_CONVERT_EXPR
1515 as __VIEW_CONVERT with -gimple.
1516
fd4485aa
ML
15172019-05-09 Martin Liska <mliska@suse.cz>
1518
1519 * gimple-parser.c (c_parser_gimple_statement): Support __MIN and
1520 __MAX.
1521 (c_parser_gimple_unary_expression): Parse also binary expression
1522 __MIN and __MAX.
1523 (c_parser_gimple_parentized_binary_expression): New function.
1524
d276406a
ML
15252019-05-09 Martin Liska <mliska@suse.cz>
1526
1527 * gimple-parser.c (struct gimple_parser): Add probability.
1528 for gimple_parser_edge.
1529 (gimple_parser::push_edge): Add new argument probability.
1530 (c_parser_gimple_parse_bb_spec): Parse also probability
1531 if present.
1532 (c_parser_parse_gimple_body): Set edge probability.
1533 (c_parser_gimple_compound_statement): Consume token
1534 before calling c_parser_gimple_goto_stmt.
1535 Parse BB counts.
1536 (c_parser_gimple_statement): Pass new argument.
1537 (c_parser_gimple_goto_stmt): Likewise.
1538 (c_parser_gimple_if_stmt): Likewise.
1539 (c_parser_gimple_or_rtl_pass_list): Parse hot_bb_threshold.
1540 * c-parser.c (c_parser_declaration_or_fndef): Pass
1541 hot_bb_threshold argument.
1542 * c-tree.h (struct c_declspecs): Add hot_bb_threshold
1543 field.
1544 (c_parser_gimple_parse_bb_spec_edge_probability): New.
1545
f179b64e
JJ
15462019-04-26 Jakub Jelinek <jakub@redhat.com>
1547
1548 PR debug/90197
1549 * c-tree.h (c_finish_loop): Add 2 further location_t arguments.
1550 * c-parser.c (c_parser_while_statement): Adjust c_finish_loop caller.
1551 (c_parser_do_statement): Likewise.
1552 (c_parser_for_statement): Likewise. Formatting fixes.
1553 * c-typeck.c (c_finish_loop): Add COND_LOCUS and INCR_LOCUS arguments,
1554 emit DEBUG_BEGIN_STMTs if needed.
1555
e7178413
JJ
15562019-04-19 Jakub Jelinek <jakub@redhat.com>
1557
c280b7ee
JJ
1558 PR c/89888
1559 * c-typeck.c (struct c_switch): Remove outside_range_p member.
1560 (c_start_case): Don't clear it.
1561 (do_case): Adjust c_add_case_label caller.
1562 (c_finish_case): Adjust c_do_switch_warnings caller.
1563
e7178413
JJ
1564 PR c++/90108
1565 * c-decl.c (merge_decls): If remove is main variant and
1566 DECL_ORIGINAL_TYPE is some other type, remove a DECL_ORIGINAL_TYPE
1567 variant that has newdecl as TYPE_NAME if any.
1568
60a2c645
JJ
15692019-04-12 Jakub Jelinek <jakub@redhat.com>
1570
1571 PR c/89933
1572 * c-decl.c (merge_decls): When newdecl's type is its main variant,
1573 don't try to remove it from the variant list, but instead assert
1574 it has no variants.
1575
2a82beaa
RB
15762019-04-01 Richard Biener <rguenther@suse.de>
1577
1578 PR c/71598
1579 * c-tree.h (c_get_alias_set): Declare.
1580 * c-objc-common.h (LANG_HOOKS_GET_ALIAS_SET): Use c_get_alias_set.
1581 * c-objc-common.c (c_get_alias_set): Treat enumeral types
1582 as the underlying integer type.
1583
bec1da64
MS
15842019-03-19 Martin Sebor <msebor@redhat.com>
1585
1586 PR tree-optimization/89688
1587 * c-decl.c (finish_decl): Call braced_lists_to_string for more
1588 kinds of initializers.
1589
855cd9b1
JJ
15902019-03-19 Jakub Jelinek <jakub@redhat.com>
1591
1592 PR c/89734
1593 * c-decl.c (grokdeclarator): Call c_build_qualified_type on function
1594 return type even if quals_used is 0. Formatting fixes.
1595
baa09dc5
RB
15962019-03-14 Richard Biener <rguenther@suse.de>
1597
1598 * c-tree.h (enum c_declspec_il): New.
1599 (struct c_declspecs): Merge gimple_p and rtl_p into declspec_il
1600 enum bitfield.
1601 * c-parser.c (c_parser_declaration_or_fndef): Adjust accordingly.
1602 Pass start pass and declspec_il to c_parser_parse_gimple_body.
1603 (c_parser_declspecs): Adjust.
1604 * gimple-parser.c: Include cfg.h, cfghooks.h, cfganal.h, tree-cfg.h,
1605 gimple-iterator.h, cfgloop.h, tree-phinodes.h, tree-into-ssa.h
1606 and bitmap.h.
1607 (struct gimple_parser): New.
1608 (gimple_parser::push_edge): New method.
1609 (c_parser_gimple_parse_bb_spec): New helper.
1610 (c_parser_parse_gimple_body): Get start pass and IL specification.
1611 Initialize SSA and CFG.
1612 (c_parser_gimple_compound_statement): Handle CFG and SSA build.
1613 Build a gimple_parser parsing state and pass it along.
1614 (c_parser_gimple_statement): Change intermittend __PHI internal
1615 function argument for the edge.
1616 (c_parser_gimple_or_rtl_pass_list): Handle ssa, cfg flags.
1617 (c_parser_gimple_goto_stmt): Record edges to build.
1618 (c_parser_gimple_if_stmt): Likewise.
1619 * gimple-parser.h (c_parser_parse_gimple_body): Adjust.
1620 (c_parser_gimple_or_rtl_pass_list): Likewise.
1621
a3f9f006
ML
16222019-03-11 Martin Liska <mliska@suse.cz>
1623
1624 * c-decl.c (check_for_loop_decls): Wrap an option name
1625 in a string format message and fix GNU coding style.
1626 * c-parser.c (c_parser_declspecs): Likewise.
1627
1db01ff9
JJ
16282019-03-08 Jakub Jelinek <jakub@redhat.com>
1629
1630 PR tree-optimization/89550
1631 * c-decl.c (finish_function): Only set TREE_NO_WARNING if warning_at
1632 returned true.
1633 (c_write_global_declarations_1): Only set TREE_NO_WARNING if pedwarn
1634 or warning returned true.
1635
66dcb747
JJ
16362019-02-28 Jakub Jelinek <jakub@redhat.com>
1637
1638 PR c/89525
1639 * c-typeck.c (convert_arguments): Call inform_declaration only if
1640 the previous warning_at call returned true.
1641
2263c9f2
TS
16422019-02-22 Thomas Schwinge <thomas@codesourcery.com>
1643
1644 * c-parser.c (c_parser_oacc_shape_clause): Add loc formal
1645 parameter. Adjust all users.
1646 (c_parser_oacc_simple_clause): Replace parser with loc formal
1647 parameter. Adjust all users.
1648
ab20d992 16492019-02-19 Chung-Lin Tang <cltang@codesourcery.com>
19695f4d
CLT
1650
1651 PR c/87924
1652 * c-parser.c (c_parser_oacc_clause_wait): Add representation of wait
1653 clause without argument as 'wait (GOMP_ASYNC_NOVAL)', adjust comments.
1654
5f88ba10
JJ
16552019-02-15 Jakub Jelinek <jakub@redhat.com>
1656
1657 PR c/89340
1658 * c-decl.c (start_function): Clear TREE_PUBLIC on nested functions
1659 before c_decl_attributes rather than after it.
1660
cfc30fd1
JJ
16612019-02-06 Jakub Jelinek <jakub@redhat.com>
1662
1663 PR c/89211
1664 * c-parser.c (c_parser_declaration_or_fndef): Don't update
1665 DECL_ARGUMENTS of d if it has been defined already. Use a single if
1666 instead of 3 nested ifs.
1667
fbe83e6b
JM
16682019-02-06 Joseph Myers <joseph@codesourcery.com>
1669
1670 PR c/88584
1671 * c-decl.c (finish_decl): Do not complete array types for arrays
1672 with external linkage not at file scope.
1673
f461f938
RB
16742019-02-05 Richard Biener <rguenther@suse.de>
1675
1676 PR c/88606
1677 * c-decl.c (finish_struct): Reset TYPE_TRANSPARENT_AGGR on
1678 all type variants when not supported.
1679
fe509359
JJ
16802019-01-30 Jakub Jelinek <jakub@redhat.com>
1681
1682 PR c/89061
1683 * c-tree.h (C_DECL_COMPOUND_LITERAL_P): Define.
1684 * c-decl.c (decl_jump_unsafe): Return false for
1685 C_DECL_COMPOUND_LITERAL_P decls.
1686 (build_compound_literal): Set C_DECL_COMPOUND_LITERAL_P.
1687
6a335b96
JJ
16882019-01-29 Jakub Jelinek <jakub@redhat.com>
1689
f4b7e754
JJ
1690 PR c/89045
1691 * c-decl.c (build_compound_literal): Don't pushdecl if in parameter
1692 scope.
1693
6a335b96
JJ
1694 PR c/86125
1695 * c-decl.c (last_fileptr_type): Remove.
1696 (last_structptr_types): New variable.
1697 (match_builtin_function_types): Compare TYPE_MAIN_VARIANT of
1698 {old,new}rettype instead of the types themselves. Assert
1699 last_structptr_types array has the same number of elements
1700 as builtin_structptr_types array. Use TYPE_MAIN_VARIANT for
1701 argument oldtype and newtype. Instead of handling
1702 just fileptr_type_node specially, handle all builtin_structptr_types
1703 pointer nodes. Formatting fix.
1704
d8b5a1a0
MS
17052019-01-24 Martin Sebor <msebor@redhat.com>
1706
1707 PR c/86125
1708 PR c/88886
1709 PR middle-end/86308
1710 * c-decl.c (match_builtin_function_types): Add arguments.
1711 (diagnose_mismatched_decls): Diagnose mismatched declarations
1712 of built-ins more strictly.
1713
e21c4491
JJ
17142019-01-24 Jakub Jelinek <jakub@redhat.com>
1715
1716 PR c++/88976
1717 * c-typeck.c (c_finish_omp_cancel): Diagnose more than one if
1718 on #pragma omp cancel with different modifiers.
1719
420183d9
L
17202019-01-18 H.J. Lu <hongjiu.lu@intel.com>
1721
1722 PR c/51628
1723 PR c/88664
1724 * c-typeck.c (convert_for_assignment): Upate the
1725 warn_for_address_or_pointer_of_packed_member call.
1726
17ad43dd
TH
17272019-01-16 Tom Honermann <tom@honermann.net>
1728 Jason Merrill <jason@redhat.com>
1729
1730 * c-typeck.c (digest_init): Revised the error message produced for
1731 ill-formed cases of array initialization with a string literal.
1732 (error_init): Make variadic.
1733
5f07d78a
JJ
17342019-01-12 Jakub Jelinek <jakub@redhat.com>
1735
1736 * c-typeck.c (convert_for_assignment): Fix a comment typo.
1737
c4581bbf
JJ
17382019-01-07 Jakub Jelinek <jakub@redhat.com>
1739
1740 PR c/88701
1741 * c-decl.c (build_compound_literal): If not TREE_STATIC, only pushdecl
1742 if current_function_decl is non-NULL.
1743
65c5b1eb
JM
17442019-01-07 Joseph Myers <joseph@codesourcery.com>
1745
1746 PR c/88720
1747 PR c/88726
1748 * c-decl.c (pop_scope): Use TREE_PUBLIC and b->nested to determine
1749 whether a function is nested, not DECL_EXTERNAL. Diagnose inline
1750 functions declared but never defined only for external scope, not
1751 for other scopes.
1752
d8fcab68
JJ
17532019-01-07 Jakub Jelinek <jakub@redhat.com>
1754
1755 PR c++/85052
1756 * c-parser.c (c_parser_postfix_expression): Parse
1757 __builtin_convertvector.
1758
a5544970
JJ
17592019-01-01 Jakub Jelinek <jakub@redhat.com>
1760
1761 Update copyright years.
1762
da77eace
L
17632018-12-20 H.J. Lu <hongjiu.lu@intel.com>
1764
1765 PR c/51628
1766 * c-typeck.c (convert_for_assignment): Call
1767 warn_for_address_or_pointer_of_packed_member.
1768
1edf8866
SB
17692018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
1770
1771 * c-parser.c (c_parser_asm_statement) <RID_CONST, RID_RESTRICT>: Give
1772 a more specific error message (instead of just falling through).
1773
db4fd626
SB
17742018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
1775
1776 * c-parser.c (c_parser_asm_statement): Keep track of the location each
1777 asm qualifier is first seen; use that to give nicer "duplicate asm
1778 qualifier" messages. Delete 'quals" variable, instead pass the
1779 "is_volatile_ flag to build_asm_stmt directly.
1780 * c-tree.h (build_asm_stmt): Make the first arg bool instead of tree.
1781 * c-typeck.c (build_asm_stmt): Ditto; adjust.
1782
9c9cfcbb
SB
17832018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
1784
1785 * c-parser.c (c_parser_asm_statement): Rewrite the loop to work without
1786 "done" boolean variable.
1787
a14feb3c
DM
17882018-12-19 David Malcolm <dmalcolm@redhat.com>
1789
1790 PR c++/87504
1791 * c-typeck.c (class maybe_range_label_for_tree_type_mismatch):
1792 Move from here to gcc-rich-location.h and gcc-rich-location.c.
1793 (build_binary_op): Use struct op_location_t and
1794 class binary_op_rich_location.
1795
6d939173
JJ
17962018-12-11 Jakub Jelinek <jakub@redhat.com>
1797
1798 PR sanitizer/88426
1799 * c-convert.c (convert): Call c_fully_fold before calling
1800 ubsan_instrument_float_cast.
1801
b7055028
SB
18022018-12-08 Segher Boessenkool <segher@kernel.crashing.org>
1803
1804 * c-parser (c_parser_asm_statement) [RID_INLINE]: Delete stray line
1805 setting "quals".
1806
5b76e75f
SB
18072018-12-06 Segher Boessenkool <segher@kernel.crashing.org>
1808
1809 * c-parser.c (c_parser_asm_statement): Detect the inline keyword
1810 after asm. Pass a flag for it to build_asm_expr.
1811 * c-tree.h (build_asm_expr): Update declaration.
1812 * c-typeck.c (build_asm_stmt): Add is_inline parameter. Use it to
1813 set ASM_INLINE_P.
1814
30bd42b9
SB
18152018-12-06 Segher Boessenkool <segher@kernel.crashing.org>
1816
1817 PR inline-asm/55681
1818 * c-parser.c (c_parser_asm_statement): Update grammar. Allow any
1819 combination of volatile and goto, in any order, without repetitions.
1820
9df6c0e4
JB
18212018-12-04 James Norris <jnorris@codesourcery.com>
1822 Cesar Philippidis <cesar@codesourcery.com>
1823 Julian Brown <julian@codesourcery.com>
1824
1825 * c-parser.c (c_parser_oacc_wait_list): Remove dead diagnostic
1826 code.
1827
f44697b7
RB
18282018-11-30 Richard Biener <rguenther@suse.de>
1829
1830 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
1831 _Literal (type) { ... } as empty aggregate or vector constructor.
1832
550dfbdc
MS
18332018-11-29 Martin Sebor <msebor@redhat.com>
1834
1835 PR c/88091
1836 * c-typeck.c (convert_argument): Add a parameter. Adjust indentation.
1837 (convert_arguments): Add comments. Pass additional argument to
1838 the function above.
1839
673670da
MS
18402018-11-29 Martin Sebor <msebor@redhat.com>
1841
1842 PR c/88172
1843 PR testsuite/88208
1844 * c-decl.c (declspec_add_alignas): Adjust call to check_user_alignment.
1845
db1d09b0
MS
18462018-11-23 Martin Sebor <msebor@redhat.com>
1847
1848 PR testsuite/88098
1849 * c-typeck.c (convert_arguments): Call builtin_decl_explicit instead.
1850 (maybe_warn_builtin_no_proto_arg): Handle short enum to int promotion.
1851
98f08eb8
MS
18522018-11-20 Martin Sebor <msebor@redhat.com>
1853
1854 * c-parser.c (c_parser_has_attribute_expression): New function.
1855 (c_parser_attribute): New function.
1856 (c_parser_attributes): Move code into c_parser_attribute.
1857 (c_parser_unary_expression): Handle RID_HAS_ATTRIBUTE_EXPRESSION.
1858
cd5da983
MS
18592018-11-15 Martin Sebor <msebor@redhat.com>
1860
1861 PR c/83656
1862 * c-decl.c (header_for_builtin_fn): Declare.
1863 (diagnose_mismatched_decls): Diagnose declarations of built-in
1864 functions without a prototype.
1865 * c-typeck.c (maybe_warn_builtin_no_proto_arg): New function.
1866 (convert_argument): Same.
1867 (convert_arguments): Factor code out into convert_argument.
1868 Detect mismatches between built-in formal arguments in calls
1869 to built-in without prototype.
1870 (build_conditional_expr): Same.
1871 (type_or_builtin_type): New function.
1872 (convert_for_assignment): Add argument. Conditionally issue
1873 warnings instead of errors for mismatches.
1874
620e594b
DM
18752018-11-13 David Malcolm <dmalcolm@redhat.com>
1876
1877 * c-decl.c: Replace "source_location" with "location_t".
1878 * c-tree.h: Likewise.
1879 * c-typeck.c: Likewise.
1880 * gimple-parser.c: Likewise.
1881
3179ebae
JJ
18822018-11-09 Jakub Jelinek <jakub@redhat.com>
1883
81a227c6
JJ
1884 * c-parser.c (c_parser_omp_clause_final): Use
1885 c_parser_expr_no_commas, convert_lvalue_to_rvalue,
1886 c_objc_common_truthvalue_conversion, c_fully_fold and parentheses
1887 parsing instead of c_parser_paren_condition.
1888 (c_parser_omp_clause_if): Use c_parser_expr_no_commas,
1889 convert_lvalue_to_rvalue, c_objc_common_truthvalue_conversion and
1890 c_fully_fold instead of c_parser_condition.
1891 (c_parser_omp_clause_num_threads, c_parser_omp_clause_num_tasks,
1892 c_parser_omp_clause_grainsize, c_parser_omp_clause_priority,
1893 c_parser_omp_clause_hint, c_parser_omp_clause_num_teams,
1894 c_parser_omp_clause_thread_limit, c_parser_omp_clause_linear): Use
1895 c_parser_expr_no_commas instead of c_parser_expression.
1896
98c91c56
JJ
1897 * c-parser.c (c_parser_omp_clause_reduction): Call sorry_at on
1898 reduction clause with inscan modifier.
1899
3179ebae
JJ
1900 * c-parser.c (c_parser_omp_requires): Call sorry_at on requires
1901 clauses other than atomic_default_mem_order.
1902
28567c40
JJ
19032018-11-08 Jakub Jelinek <jakub@redhat.com>
1904
1905 * c-parser.c: Include memmode.h.
1906 (c_parser_omp_depobj, c_parser_omp_requires): New functions.
1907 (c_parser_pragma): Handle PRAGMA_OMP_DEPOBJ and PRAGMA_OMP_REQUIRES.
1908 (c_parser_omp_clause_name): Handle nontemporal, in_reduction and
1909 task_reduction clauses.
1910 (c_parser_omp_variable_list): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION.
1911 For OMP_CLAUSE_DEPEND, parse clause operands as either an array
1912 section, or lvalue assignment expression.
1913 (c_parser_omp_clause_if): Handle cancel and simd modifiers.
1914 (c_parser_omp_clause_lastprivate): Parse optional
1915 conditional: modifier.
1916 (c_parser_omp_clause_hint): Require constant integer expression rather
1917 than just integer expression.
1918 (c_parser_omp_clause_defaultmap): Parse new kinds of defaultmap
1919 clause.
1920 (c_parser_omp_clause_reduction): Add IS_OMP and KIND arguments.
1921 Parse reduction modifiers. Pass KIND to c_parser_omp_variable_list.
1922 (c_parser_omp_clause_nontemporal, c_parser_omp_iterators): New
1923 functions.
1924 (c_parser_omp_clause_depend): Parse iterator modifier and handle
1925 iterators. Parse mutexinoutset and depobj kinds.
1926 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_reduction
1927 callers.
1928 (c_parser_omp_all_clauses): Likewise. Handle
1929 PRAGMA_OMP_CLAUSE_NONTEMPORAL and
1930 PRAGMA_OMP_CLAUSE_{IN,TASK}_REDUCTION.
1931 (c_parser_omp_atomic): Parse hint and memory order clauses. Handle
1932 default memory order from requires directive if any. Adjust
1933 c_finish_omp_atomic caller.
1934 (c_parser_omp_critical): Allow comma in between (name) and hint clause.
1935 (c_parser_omp_flush): Parse flush with memory-order-clause.
1936 (c_parser_omp_for_loop): Allow NE_EXPR even in
1937 OpenMP loops, adjust c_finish_omp_for caller.
1938 (OMP_SIMD_CLAUSE_MASK): Add if and nontemporal clauses.
1939 (c_parser_omp_master): Add p_name, mask and cclauses arguments.
1940 Allow to be called while parsing combined parallel master.
1941 Parse combined master taskloop{, simd}.
1942 (c_parser_omp_parallel): Parse combined
1943 parallel master{, taskloop{, simd}} constructs.
1944 (OMP_TASK_CLAUSE_MASK): Add in_reduction clause.
1945 (OMP_TASKGROUP_CLAUSE_MASK): Define.
1946 (c_parser_omp_taskgroup): Add LOC argument. Parse taskgroup clauses.
1947 (OMP_TASKWAIT_CLAUSE_MASK): Define.
1948 (c_parser_omp_taskwait): Handle taskwait with depend clauses.
1949 (c_parser_omp_teams): Force a BIND_EXPR with BLOCK
1950 around teams body. Use SET_EXPR_LOCATION.
1951 (c_parser_omp_target_data): Allow target data
1952 with only use_device_ptr clauses.
1953 (c_parser_omp_target): Use SET_EXPR_LOCATION. Set
1954 OMP_REQUIRES_TARGET_USED bit in omp_requires_mask.
1955 (c_parser_omp_requires): New function.
1956 (c_finish_taskloop_clauses): New function.
1957 (OMP_TASKLOOP_CLAUSE_MASK): Add reduction and in_reduction clauses.
1958 (c_parser_omp_taskloop): Use c_finish_taskloop_clauses. Add forward
1959 declaration. Disallow in_reduction clause when combined with parallel
1960 master.
1961 (c_parser_omp_construct): Adjust c_parser_omp_master and
1962 c_parser_omp_taskgroup callers.
1963 * c-typeck.c (c_finish_omp_cancel): Diagnose if clause with modifier
1964 other than cancel.
1965 (handle_omp_array_sections_1): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION
1966 like OMP_CLAUSE_REDUCTION.
1967 (handle_omp_array_sections): Likewise. Call save_expr on array
1968 reductions before calling build_index_type. Handle depend clauses
1969 with iterators.
1970 (struct c_find_omp_var_s): New type.
1971 (c_find_omp_var_r, c_omp_finish_iterators): New functions.
1972 (c_finish_omp_clauses): Don't diagnose nonmonotonic clause
1973 with static, runtime or auto schedule kinds. Call save_expr for whole
1974 array reduction sizes. Diagnose reductions with zero sized elements
1975 or variable length structures. Diagnose nogroup clause used with
1976 reduction clause(s). Handle depend clause with
1977 OMP_CLAUSE_DEPEND_DEPOBJ. Diagnose bit-fields. Require
1978 omp_depend_t type for OMP_CLAUSE_DEPEND_DEPOBJ kinds and
1979 some different type for other kinds. Use build_unary_op with
1980 ADDR_EXPR and build_indirect_ref instead of c_mark_addressable.
1981 Handle depend clauses with iterators. Remove no longer needed special
1982 case that predetermined const qualified vars may be specified in
1983 firstprivate clause. Complain if const qualified vars are mentioned
1984 in data-sharing clauses other than firstprivate or shared. Use
1985 error_at with OMP_CLAUSE_LOCATION (c) as first argument instead of
1986 error. Formatting fix. Handle OMP_CLAUSE_NONTEMPORAL and
1987 OMP_CLAUSE_{IN,TASK}_REDUCTION. Allow any lvalue as
1988 OMP_CLAUSE_DEPEND operand (besides array section), adjust diagnostics.
1989
7e2de6df
DM
19902018-10-29 David Malcolm <dmalcolm@redhat.com>
1991
1992 * c-decl.c (implicit_decl_warning): Update "is there a suggestion"
1993 logic for change to name_hint::operator bool.
1994 (undeclared_variable): Likewise.
1995 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
1996 (c_parser_parameter_declaration): Likewise.
1997
9f936c86
JM
19982018-10-17 Joseph Myers <joseph@codesourcery.com>
1999
2000 * c-errors.c (pedwarn_c11): New function.
2001 * c-parser.c (disable_extension_diagnostics): Save
2002 warn_c11_c2x_compat and set it to 0.
2003 (restore_extension_diagnostics): Restore warn_c11_c2x_compat.
2004 (c_parser_static_assert_declaration_no_semi): Handle
2005 _Static_assert without string constant.
2006 * c-tree.h (pedwarn_c11): New prototype.
2007
033eb567
DM
20082018-10-17 David Malcolm <dmalcolm@redhat.com>
2009
2010 * Make-lang.in (selftest-c): New.
2011 (C_SELFTEST_FLAGS, C_SELFTEST_DEPS, s-selftest-c, selftest-c-gdb)
2012 (selftest-gdb, selftest-c-valgrind, selftest-valgrind): Move here
2013 from gcc/Makefile.in.
2014
0edf3afe
RB
20152018-10-02 Richard Biener <rguenther@suse.de>
2016
2017 * c-decl.c (warn_if_shadowing): Do not test DECL_FROM_INLINE.
2018
8313a764
JM
20192018-09-26 Joseph Myers <joseph@codesourcery.com>
2020
2021 PR c/87390
2022 * c-typeck.c (build_binary_op): Use excess precision for
2023 comparisons of integers and floating-point for C11 and later.
2024
ce6f0888
MJ
20252018-09-26 Martin Jambor <mjambor@suse.cz>
2026
2027 PR c/87347
2028 * c-parser.c (warn_for_abs): Bail out if TYPE_ARG_TYPES is NULL. Fix
ab20d992 2029 comment.
ce6f0888 2030
9c4a4b3c
DM
20312018-09-17 David Malcolm <dmalcolm@redhat.com>
2032
2033 * c-objc-common.c (range_label_for_type_mismatch::get_text):
2034 Update for new param.
2035 * c-typeck.c (maybe_range_label_for_tree_type_mismatch::get_text):
2036 Likewise.
2037
80c6d1f4
MJ
20382018-09-17 Martin Jambor <mjambor@suse.cz>
2039
2040 PR c/63886
2041 * c-parser.c: (warn_for_abs): New function.
2042 (c_parser_postfix_expression_after_primary): Call it.
2043
4a426e36
BE
20442018-09-13 Bernd Edlinger <bernd.edlinger@hotmail.de>
2045
2046 * c-typeck.c (digest_init): Shorten overlength strings.
2047
6d900107
BE
20482018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
2049
2050 * c-decl.c (finish_decl): Call complete_flexible_array_elts.
2051
b5764229
BE
20522018-09-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
2053
2054 * c-decl.c (finish_decl): Call braced_list_to_string here ...
2055 * c-parser.c (c_parser_declaration_or_fndef): ... instead of here.
2056
22eea6b2
AM
20572018-08-30 Alexander Monakov <amonakov@ispras.ru>
2058
2059 * gimple-parser.c (c_parser_gimple_binary_expression): Accept infix
2060 "__MULT_HIGHPART" for MULT_HIGHPART_EXPR.
2061
85204e23
DM
20622018-08-27 David Malcolm <dmalcolm@redhat.com>
2063
2064 PR 87091
2065 * c-decl.c (implicitly_declare): Update call to
2066 maybe_add_include_fixit to suggest overriding the location, as it
2067 is for a note.
2068 * c-objc-common.c (c_tree_printer): Update for conversion of
2069 show_caret_p to a tri-state.
2070
3d78e008
ML
20712018-08-27 Martin Liska <mliska@suse.cz>
2072
2073 * c-decl.c (locate_old_decl): Use new function
92a285c1
ML
2074 fndecl_built_in_p and remove check for FUNCTION_DECL if
2075 possible.
3d78e008
ML
2076 (diagnose_mismatched_decls): Likewise.
2077 (merge_decls): Likewise.
2078 (warn_if_shadowing): Likewise.
2079 (pushdecl): Likewise.
2080 (implicitly_declare): Likewise.
2081 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
2082 * c-tree.h (C_DECL_ISNT_PROTOTYPE): Likewise.
2083 * c-typeck.c (build_function_call_vec): Likewise.
2084 (convert_arguments): Likewise.
2085
097f82ec
DM
20862018-08-20 David Malcolm <dmalcolm@redhat.com>
2087
2088 PR other/84889
2089 * c-decl.c (pushtag): Add auto_diagnostic_group instance.
2090 (diagnose_mismatched_decls): Likewise, in various places.
2091 (warn_if_shadowing): Likewise.
2092 (implicit_decl_warning): Likewise.
2093 (implicitly_declare): Likewise.
2094 (undeclared_variable): Likewise.
2095 (declare_label): Likewise.
2096 (grokdeclarator): Likewise.
2097 (start_function): Likewise.
2098 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
2099 (c_parser_parameter_declaration): Likewise.
2100 (c_parser_binary_expression): Likewise.
2101 * c-typeck.c (c_expr_sizeof_expr): Likewise.
2102 (parser_build_binary_op): Likewise.
2103 (build_unary_op): Likewise.
2104 (error_init): Likewise.
2105 (pedwarn_init): Likewise.
2106 (warning_init): Likewise.
2107 (convert_for_assignment): Likewise.
2108
96e6ae57
DM
21092018-08-15 David Malcolm <dmalcolm@redhat.com>
2110
2111 * c-objc-common.c: Include "gcc-rich-location.h".
2112 (c_tree_printer): Move implemenation of '%T' to...
2113 (print_type): ...this new function.
2114 (range_label_for_type_mismatch::get_text): New function.
2115 * c-typeck.c (convert_for_assignment): Add type labels to the rhs
2116 range for the various ic_argpass cases.
2117 (class maybe_range_label_for_tree_type_mismatch): New class.
2118 (build_binary_op): Use it when calling binary_op_error.
2119
0cd020ae 21202018-08-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
ab20d992 2121
0cd020ae
PK
2122 * c-decl.c (start_decl): Do not warn if variables is named as main
2123 and is a local variable.
2124
72733314
IS
21252018-08-15 Iain Sandoe <iain@sandoe.co.uk>
2126
2127 PR c/19315
2128 * c-decl.c (finish_decl): Don't add the 'extern' storage class to
2129 objects of unknown size.
2130
23aa9f7c
MS
21312018-08-13 Martin Sebor <msebor@redhat.com>
2132
2133 PR tree-optimization/71625
2134 * c-parser.c (c_parser_declaration_or_fndef): Call
2135 braced_list_to_string.
2136
e5e7e50d
BH
21372018-08-03 Bogdan Harjoc <harjoc@gmail.com>
2138
2139 PR c/86690
2140 * c-typeck.c (lookup_field): Do not use TYPE_LANG_SPECIFIC after
2141 errors.
2142
8a45b051
MS
21432018-08-01 Martin Sebor <msebor@redhat.com>
2144
2145 PR tree-optimization/86650
2146 * c-objc-common.c (c_tree_printer): Move usage of EXPR_LOCATION (t)
2147 and TREE_BLOCK (t) from within percent_K_format to this callsite.
2148
5922dcb5
JJ
21492018-08-01 Jakub Jelinek <jakub@redhat.com>
2150
2151 PR c/85704
2152 * c-typeck.c (init_field_decl_cmp): New function.
2153 (output_pending_init_elements): Use it for field comparisons
2154 instead of pure bit_position comparisons.
2155
9b452033
JJ
21562018-07-12 Jakub Jelinek <jakub@redhat.com>
2157
2158 * c-decl.c (c_decl_attributes): Don't diagnose vars without mappable
2159 type here, instead add "omp declare target implicit" attribute.
2160 (finish_decl): Diagnose vars without mappable type here.
2161
ab20d992
JJ
21622018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
2163 Thomas Schwinge <thomas@codesourcery.com>
829c6349
CLT
2164 Cesar Philippidis <cesar@codesourcery.com>
2165
2166 * c-parser.c (c_parser_omp_clause_name): Add support for finalize
2167 and if_present. Make present_or_{copy,copyin,copyout,create} aliases
2168 to their non-present_or_* counterparts. Make 'self' an alias to
2169 PRAGMA_OACC_CLAUSE_HOST.
2170 (c_parser_oacc_data_clause): Update GOMP mappings for
2171 PRAGMA_OACC_CLAUSE_{COPY,COPYIN,COPYOUT,CREATE,DELETE}. Remove
2172 PRAGMA_OACC_CLAUSE_{SELF,PRESENT_OR_*}.
2173 (c_parser_oacc_all_clauses): Handle finalize and if_present clauses.
2174 Remove support for present_or_* clauses.
2175 (OACC_KERNELS_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
2176 (OACC_PARALLEL_CLAUSE_MASK): Likewise.
2177 (OACC_DECLARE_CLAUSE_MASK): Likewise.
2178 (OACC_DATA_CLAUSE_MASK): Likewise.
2179 (OACC_ENTER_DATA_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
2180 (OACC_EXIT_DATA_CLAUSE_MASK): Add FINALIZE clause.
2181 (OACC_UPDATE_CLAUSE_MASK): Remove SELF, add IF_PRESENT.
2182 (c_parser_oacc_declare): Remove PRESENT_OR_* clauses.
2183 * c-typeck.c (c_finish_omp_clauses): Handle IF_PRESENT and FINALIZE.
2184
e197e64e
KV
21852018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
2186
2187 * c-typeck.c (build_unary_op): Handle ABSU_EXPR;
2188 * gimple-parser.c (c_parser_gimple_statement): Likewise.
2189 (c_parser_gimple_unary_expression): Likewise.
2190
487f2f61
JJ
21912018-06-15 Jakub Jelinek <jakub@redhat.com>
2192
2193 PR c/86093
2194 * c-typeck.c (pointer_diff): Cast both pointers to unqualified types
2195 before doing POINTER_DIFF_EXPR.
2196
e4d44a37
MP
21972018-06-07 Marek Polacek <polacek@redhat.com>
2198
2199 PR c/85318
2200 * c-decl.c (check_for_loop_decls): Add -Wc90-c99-compat warning about
2201 for loop initial declarations.
2202
b67b9225
DP
22032018-05-30 David Pagan <dave.pagan@oracle.com>
2204
2205 PR c/55976
2206 * c-decl.c (grokdeclarator): Update check for return type warnings.
2207 (start_function): Likewise.
2208 (finish_function): Likewise.
2209 * c-typeck.c (c_finish_return): Update check for return type warnings.
2210 Pass OPT_Wreturn_type to pedwarn when appropriate.
2211
c566cc9f
RS
22122018-05-18 Richard Sandiford <richard.sandiford@linaro.org>
2213
2214 * gimple-parser.c (c_parser_gimple_postfix_expression): Remove
2215 __FMA_EXPR handlng.
2216
e4f81565
RS
22172018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
2218
2219 * gimple-parser.c: Include internal-fn.h.
2220 (c_parser_gimple_statement): Treat a leading CPP_DOT as a call.
2221 (c_parser_gimple_call_internal): New function.
2222 (c_parser_gimple_postfix_expression): Use it to handle CPP_DOT.
2223 Fix typos in comment.
2224
79e7b1fe
JJ
22252018-05-10 Jakub Jelinek <jakub@redhat.com>
2226
2227 PR c++/85662
2228 * c-fold.c (c_fully_fold_internal): Use fold_offsetof rather than
2229 fold_offsetof_1, pass TREE_TYPE (expr) as TYPE to it and drop the
2230 fold_convert_loc.
2231 * c-typeck.c (build_unary_op): Use fold_offsetof rather than
2232 fold_offsetof_1, pass argtype as TYPE to it and drop the
2233 fold_convert_loc.
2234
f7584c81
DP
22352018-05-02 David Pagan <dave.pagan@oracle.com>
2236
2237 PR c/30552
2238 * c-decl.c (old_style_parameter_scope): New function.
2239 * c-parser.c (c_parser_postfix_expression): Check for statement
2240 expressions in old-style function parameter list declarations.
2241 * c-parser.h (old_style_parameter_scope): New extern declaration.
2242
b33a0cb3
JJ
22432018-04-25 Jakub Jelinek <jakub@redhat.com>
2244
2245 PR sanitizer/84307
2246 * c-decl.c (build_compound_literal): Call pushdecl (decl) even when
2247 it is not TREE_STATIC.
2248 * c-typeck.c (c_mark_addressable) <case COMPOUND_LITERAL_EXPR>: Mark
2249 not just the COMPOUND_LITERAL_EXPR node itself addressable, but also
2250 its COMPOUND_LITERAL_EXPR_DECL.
2251
c5c5822a
JM
22522018-03-21 Joseph Myers <joseph@codesourcery.com>
2253
2254 * c-parser.c (c_parser_postfix_expression): For __builtin_tgmath
2255 where all functions return the same _FloatN or _FloatNx type,
2256 treat integer types as _Float64 instead of double.
2257
aa1c9429
JJ
22582018-03-21 Jakub Jelinek <jakub@redhat.com>
2259
2260 PR c/84999
2261 * c-typeck.c (build_binary_op): If c_common_type_for_size fails when
2262 building vector comparison, diagnose it and return error_mark_node.
2263
9bb45a95
JJ
22642018-03-15 Jakub Jelinek <jakub@redhat.com>
2265
2266 PR c/84853
2267 * c-typeck.c (build_binary_op) <case RSHIFT_EXPR, case LSHIFT_EXPR>:
2268 If code1 is INTEGER_TYPE, only allow code0 VECTOR_TYPE if it has
2269 INTEGER_TYPE element type.
2270
ada6bad9
DP
22712018-03-13 David Pagan <dave.pagan@oracle.com>
2272
2273 PR c/46921
2274 * c-typeck.c (output_init_element): Ensure field initializer
2275 expression is always evaluated if there are side effects.
2276
849bbdb9
JJ
22772018-03-06 Jakub Jelinek <jakub@redhat.com>
2278
2279 PR c/84721
2280 * c-parser.c (add_debug_begin_stmt): Don't add DEBUG_BEGIN_STMT if
2281 !building_stmt_list_p ().
2282
d74641bd
RS
22832018-02-13 Richard Sandiford <richard.sandiford@linaro.org>
2284
2285 PR c/84305
2286 * c-decl.c (grokdeclarator): Create an anonymous TYPE_DECL
2287 in PARM and TYPENAME contexts too, but attach it to a BIND_EXPR
2288 and include the BIND_EXPR in the list of things that need to be
2289 pre-evaluated.
2290
0444aa9c
NS
22912018-02-09 Nathan Sidwell <nathan@acm.org>
2292
2293 PR c/84293
2294 * c-typeck.c (build_indirect_ref, build_c_cast): Pass expr location
2295 to strict_aliasing_warning.
2296
7c30b12a
PC
22972018-02-02 Paolo Carlini <paolo.carlini@oracle.com>
2298
2299 * c-typeck.c (really_start_incremental_init, push_init_level,
2300 set_nonincremental_init, output_init_element, process_init_element):
2301 Use DECL_UNNAMED_BIT_FIELD.
2302
2be4dfcb
MP
23032018-01-31 Marek Polacek <polacek@redhat.com>
2304
2305 PR c/81779
2306 * c-parser.c (c_parser_compound_statement_nostart): Call
2307 expansion_point_location_if_in_system_header.
2308
bb9869d5
DM
23092018-01-17 David Malcolm <dmalcolm@redhat.com>
2310
2311 PR c++/83814
2312 * c-fold.c (fold_for_warn): Move from c-common.c, reducing to just
2313 the C part.
2314
b4923738
JJ
23152018-01-13 Jakub Jelinek <jakub@redhat.com>
2316
2317 PR c/83801
2318 * c-tree.h (decl_constant_value_1): Add a bool argument.
2319 * c-typeck.c (decl_constant_value_1): Add IN_INIT argument, allow
2320 returning a CONSTRUCTOR if it is true. Use error_operand_p.
2321 (decl_constant_value): Adjust caller.
2322 * c-fold.c (c_fully_fold_internal): If in_init, pass true to
2323 decl_constant_value_1 as IN_INIT. Otherwise, punt if
2324 decl_constant_value returns initializer that has BLKmode or
2325 array type.
2326 (c_fully_fold_internal) <case COMPONENT_REF>: Fold if !lval.
2327
928686b1
RS
23282018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
2329 Alan Hayward <alan.hayward@arm.com>
2330 David Sherwood <david.sherwood@arm.com>
2331
2332 * c-typeck.c (comptypes_internal, build_binary_op): Handle polynomial
2333 TYPE_VECTOR_SUBPARTS.
2334
85ec4feb
JJ
23352018-01-03 Jakub Jelinek <jakub@redhat.com>
2336
2337 Update copyright years.
2338
913884f7
JJ
23392018-01-01 Jakub Jelinek <jakub@redhat.com>
2340
2341 PR c/83595
2342 * c-parser.c (c_parser_braced_init, c_parser_initelt,
2343 c_parser_conditional_expression, c_parser_cast_expression,
2344 c_parser_sizeof_expression, c_parser_alignof_expression,
2345 c_parser_postfix_expression, c_parser_omp_declare_reduction,
2346 c_parser_transaction_expression): Use set_error () method instead
2347 of setting value member to error_mark_node.
2348
c6cfa2bf
MM
23492017-12-28 Michael Meissner <meissner@linux.vnet.ibm.com>
2350
2351 * c-decl.c (header_for_builtin_fn): Add integer rounding _Float<N>
2352 and _Float<N>X built-in functions.
2353
11d29d63
JJ
23542017-12-22 Jakub Jelinek <jakub@redhat.com>
2355
14ec014e
JJ
2356 PR debug/83550
2357 * c-decl.c (finish_struct): Set DECL_SOURCE_LOCATION on
2358 TYPE_STUB_DECL and call rest_of_type_compilation before processing
2359 incomplete vars rather than after it.
2360
11d29d63
JJ
2361 PR debug/83547
2362 * c-typeck.c (c_finish_stmt_expr): Ignore !TREE_SIDE_EFFECTS as
2363 indicator of ({ }), instead skip all trailing DEBUG_BEGIN_STMTs first,
2364 and consider empty ones if there are no other stmts. For
2365 -Wunused-value walk all statements before the one only followed by
2366 DEBUG_BEGIN_STMTs.
2367
170a8bd6 23682017-12-22 Mike Stump <mikestump@comcast.net>
92a285c1 2369 Eric Botcazou <ebotcazou@adacore.com>
170a8bd6
EB
2370
2371 * c-parser.c (c_parser_while_statement): Add unroll parameter and
2372 build ANNOTATE_EXPR if present. Add 3rd operand to ANNOTATE_EXPR.
2373 (c_parser_do_statement): Likewise.
2374 (c_parser_for_statement): Likewise.
2375 (c_parser_statement_after_labels): Adjust calls to above.
2376 (c_parse_pragma_ivdep): New static function.
2377 (c_parser_pragma_unroll): Likewise.
2378 (c_parser_pragma) <PRAGMA_IVDEP>: Add support for pragma Unroll.
2379 <PRAGMA_UNROLL>: New case.
2380
01512446
JJ
23812017-12-19 Jakub Jelinek <jakub@redhat.com>
2382
2383 * c-typeck.c (comptypes_internal, function_types_compatible_p,
2384 perform_integral_promotions, digest_init): Replace Yoda conditions
2385 with typical order conditions.
2386 * c-decl.c (check_bitfield_type_and_width): Likewise.
2387
c65e18d3
BE
23882017-12-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
2389
2390 * c-typeck.c (c_safe_arg_type_equiv_p,
2391 c_safe_function_type_cast_p): New function.
2392 (build_c_cast): Implement -Wcast-function-type.
2393
b7280579
RB
23942017-12-14 Richard Biener <rguenther@suse.de>
2395
2396 PR c/83415
2397 * c-fold.c (c_fully_fold_internal): Treat VIEW_CONVERT_EXPR
2398 like REALPART_EXPR for the behavior of whether its operand
2399 is an lvalue.
2400
49e6a6c0
MP
24012017-12-12 Marek Polacek <polacek@redhat.com>
2402
2403 PR c/82679
2404 * c-decl.c (grokdeclarator): Check declspecs insted of atomicp.
2405
ab20d992 24062017-12-12 Alexandre Oliva <aoliva@redhat.com>
96a95ac1
AO
2407
2408 * c-objc-common.h (LANG_HOOKS_EMITS_BEGIN_STMT): Redefine as true.
2409 * c-parser.c (add_debug_begin_stmt): New.
2410 (c_parser_declaration_or_fndef): Call it.
2411 (c_parser_compound_statement_nostart): Likewise.
2412 (c_parser_statement_after_labels): Likewise.
2413 * c-typeck (c_finish_stmt_expr): Skip begin stmts markers.
2414
4b2b493f
JM
24152017-12-07 Joseph Myers <joseph@codesourcery.com>
2416
2417 * c-decl.c (build_compound_literal): Add parameter alignas_align
2418 and set alignment of decl if nonzero.
2419 * c-parser.c (c_keyword_starts_typename): Allow RID_ALIGNAS.
2420 (c_parser_declspecs): Allow RID_ALIGNAS to follow a type, like a
2421 qualifier.
2422 (c_parser_struct_declaration): Update syntax comment.
2423 (c_parser_type_name): Add alignas_ok argument and pass it to
2424 c_parser_declspecs.
2425 (c_parser_cast_expression): Pass true to c_parser_type_name and
2426 give error if a cast used an _Alignas specifier.
2427 (c_parser_sizeof_expression): Pass true to c_parser_type_name and
2428 give error if sizeof (type-name) used an _Alignas specifier.
2429 (c_parser_alignof_expression): Pass true to c_parser_type_name and
2430 give error if _Alignof (type-name) used an _Alignas specifier.
2431 (c_parser_postfix_expression_after_paren_type): Check specified
2432 alignment for a compound literal and pass it to
2433 build_compound_literal.
2434 * c-parser.h (c_parser_type_name): Update prototype.
2435 * c-tree.h (build_compound_literal): Update prototype.
2436
5d9ae53d
MS
24372017-12-07 Martin Sebor <msebor@redhat.com>
2438
2439 PR c/81544
2440 * c-decl.c (c_decl_attributes): Look up existing declaration and
2441 pass it to decl_attributes.
2442
c79144f8
DM
24432017-12-06 David Malcolm <dmalcolm@redhat.com>
2444
2445 PR c/83236
2446 * c-decl.c (lookup_name_fuzzy): Don't suggest names that are
2447 reserved for use by the implementation.
2448
613bc14f
DM
24492017-12-06 David Malcolm <dmalcolm@redhat.com>
2450
2451 * c-decl.c: Include "c-family/c-spellcheck.h".
2452
05abad4c
ML
24532017-12-05 Martin Liska <mliska@suse.cz>
2454 Jakub Jelinek <jakub@redhat.com>
2455
2456 * c-typeck.c (pointer_diff): Add new argument and instrument
2457 pointer subtraction.
2458 (build_binary_op): Similar for pointer comparison.
2459
cc6534d4
JJ
24602017-12-01 Jakub Jelinek <jakub@redhat.com>
2461
65791f42
JJ
2462 PR c/79153
2463 * c-parser.c: Include tree-iterator.h.
2464 (c_parser_switch_statement): Emit LABEL_EXPR for the break label
2465 into SWITCH_BODY instead of after it and set SWITCH_BREAK_LABEL_P
2466 on it.
2467
cc6534d4
JJ
2468 PR c/83222
2469 * c-tree.h (decl_constant_value_1): Declare.
2470 * c-typeck.c (decl_constant_value_1): New function.
2471 (decl_constant_value): Use it.
2472 * c-fold.c (c_fully_fold_internal): If in_init, use
2473 decl_constant_value_1 instead of decl_constant_value.
2474
5de73c05
JJ
24752017-11-30 Jakub Jelinek <jakub@redhat.com>
2476
2477 * c-parser.c (c_parser_postfix_expression): Use ; instead of ;;.
2478
058f0b9e
JJ
24792017-11-28 Jakub Jelinek <jakub@redhat.com>
2480
2481 PR sanitizer/81275
2482 * c-typeck.c (c_finish_case): Set SWITCH_ALL_CASES_P if
2483 c_switch_covers_all_cases_p returns true.
2484
5e9d6aa4 24852017-11-28 Julia Koval <julia.koval@intel.com>
92a285c1 2486 Sebastian Peryt <sebastian.peryt@intel.com>
5e9d6aa4
JK
2487
2488 * Make-lang.in (c/c-array-notation.o): Remove.
2489 * c-array-notation.c: Delete.
2490 * c-decl.c: Remove cilkplus condition.
2491 * c-parser.c (c_parser_cilk_simd, c_parser_cilk_for,
2492 c_parser_cilk_verify_simd, c_parser_array_notation,
2493 c_parser_cilk_clause_vectorlength, c_parser_cilk_grainsize,
2494 c_parser_cilk_simd_fn_vector_attrs,
2495 c_finish_cilk_simd_fn_tokens): Delete.
2496 (c_parser_declaration_or_fndef): Remove cilkplus condition.
2497 (c_parser_direct_declarator_inner): Ditto.
2498 (CILK_SIMD_FN_CLAUSE_MASK): Delete.
2499 (c_parser_attributes, c_parser_compound_statement,
2500 c_parser_statement_after_labels, c_parser_if_statement,
2501 c_parser_switch_statement, c_parser_while_statement,
2502 c_parser_do_statement, c_parser_for_statement,
2503 c_parser_unary_expression, c_parser_postfix_expression,
2504 c_parser_postfix_expression_after_primary,
2505 c_parser_pragma, c_parser_omp_clause_name, c_parser_omp_all_clauses,
2506 c_parser_omp_for_loop, c_finish_omp_declare_simd): Remove cilkplus
2507 support.
2508 * c-typeck.c (build_array_ref, build_function_call_vec,
2509 convert_arguments,
2510 lvalue_p, build_compound_expr, c_finish_return, c_finish_if_stmt,
2511 c_finish_loop, build_binary_op): Remove cilkplus support.
2512
9e851845
JJ
25132017-11-28 Jakub Jelinek <jakub@redhat.com>
2514
2515 * c-typeck.c (c_start_case): Build SWITCH_EXPR using build2 instead
2516 of build3.
2517
ab20d992 25182017-11-14 Boris Kolpackov <boris@codesynthesis.com>
8c7dbea9
BK
2519
2520 * Make-lang.in (c.install-plugin): Install backend import library.
2521
41521dee
JJ
25222017-11-23 Jakub Jelinek <jakub@redhat.com>
2523
2524 * c-parser.c (c_parser_omp_declare_simd): Reject declare simd in
2525 pragma_stmt context.
2526
ac9effed
EB
25272017-11-23 Mike Stump <mikestump@comcast.net>
2528 Eric Botcazou <ebotcazou@adacore.com>
2529
2530 * c-parser.c (c_parser_while_statement): Pass 3rd operand to
2531 ANNOTATE_EXPR.
2532 (c_parser_do_statement): Likewise.
2533 (c_parser_for_statement): Likewise.
2534
ce95abc4
DM
25352017-11-22 David Malcolm <dmalcolm@redhat.com>
2536
2537 PR c++/62170
2538 * c-objc-common.c (c_tree_printer): Convert penultimate param from
2539 bool to bool *. Within '%T' handling, if showing an "aka", use
2540 "quoted" param to add appropriate quoting.
2541
974aedcc
MP
25422017-11-22 Marek Polacek <polacek@redhat.com>
2543
2544 PR c++/60336
2545 PR middle-end/67239
2546 PR target/68355
2547 * c-decl.c (grokdeclarator): Set DECL_PADDING_P on unnamed bit-fields.
2548
d4300cc6
DM
25492017-11-21 David Malcolm <dmalcolm@redhat.com>
2550
2551 PR c/83056
2552 * c-decl.c (lookup_name_fuzzy): Don't suggest names that came from
2553 earlier failed lookups.
2554
1af4ebf5
MG
25552017-11-21 Marc Glisse <marc.glisse@inria.fr>
2556
2557 * c-fold.c (c_fully_fold_internal): Handle POINTER_DIFF_EXPR.
2558 * c-typeck.c (pointer_diff): Use POINTER_DIFF_EXPR.
2559
26edace6
DM
25602017-11-20 David Malcolm <dmalcolm@redhat.com>
2561
2562 PR c/81404
2563 * c-decl.c: Include "c-family/known-headers.h".
2564 (get_c_name_hint): Rename to get_stdlib_header_for_name and move
2565 to known-headers.cc.
2566 (class suggest_missing_header): Move to known-header.h.
2567 (lookup_name_fuzzy): Call get_c_stdlib_header_for_name rather
2568 than get_c_name_hint.
2569
b1212255
DM
25702017-11-20 David Malcolm <dmalcolm@redhat.com>
2571
2572 * c-decl.c (get_c_name_hint): New function.
2573 (class suggest_missing_header): New class.
2574 (lookup_name_fuzzy): Call get_c_name_hint and use it to
2575 suggest missing headers to the user.
2576
6c7a259b
DM
25772017-11-20 David Malcolm <dmalcolm@redhat.com>
2578
2579 * c-decl.c: Define INCLUDE_UNIQUE_PTR before including system.h.
2580 Include "c-family/name-hint.h"
2581 (implicit_decl_warning): Convert "hint" from
2582 const char * to name_hint. Pass location to
2583 lookup_name_fuzzy. Suppress any deferred diagnostic if the
2584 warning was not printed.
2585 (undeclared_variable): Likewise for "guessed_id".
2586 (lookup_name_fuzzy): Convert return type from const char *
2587 to name_hint. Add location_t param.
2588 * c-parser.c: Define INCLUDE_UNIQUE_PTR before including system.h.
2589 Include "c-family/name-hint.h"
2590 (c_parser_declaration_or_fndef): Convert "hint" from
2591 const char * to name_hint. Pass location to lookup_name_fuzzy.
2592 (c_parser_parameter_declaration): Likewise.
2593
f9c59f7e
JJ
25942017-11-19 Jakub Jelinek <jakub@redhat.com>
2595
2596 PR c/66618
2597 PR c/69960
2598 * c-parser.c (c_parser_omp_atomic): Pass true as LVAL to c_fully_fold
2599 where needed.
2600 * c-typeck.c (build_unary_op, build_modify_expr, build_asm_expr,
2601 handle_omp_array_sections): Likewise.
2602 (digest_init): Don't call decl_constant_value_for_optimization.
2603 * c-tree.h (decl_constant_value_for_optimization): Removed.
2604 * c-fold.c (c_fold_array_ref): New function.
2605 (c_fully_fold_internal): Add LVAL argument, propagate it through
2606 recursive calls. For VAR_P call decl_constant_value and
2607 unshare if not LVAL and either optimizing or IN_INIT. Remove
2608 decl_constant_value_for_optimization calls. If IN_INIT and not LVAL,
2609 fold ARRAY_REF with STRING_CST and INTEGER_CST operands.
2610 (c_fully_fold): Add LVAL argument, pass it through to
2611 c_fully_fold_internal.
2612 (decl_constant_value_for_optimization): Removed.
2613
3ca0dc60
JM
26142017-11-15 Joseph Myers <joseph@codesourcery.com>
2615
2616 PR c/81156
2617 * c-parser.c (check_tgmath_function): New function.
2618 (enum tgmath_parm_kind): New enum.
2619 (c_parser_postfix_expression): Handle __builtin_tgmath.
2620
64a5912c
DM
26212017-10-31 David Malcolm <dmalcolm@redhat.com>
2622
2623 * c-decl.c (implicit_decl_warning): Update for renaming of
2624 pedwarn_at_rich_loc and warning_at_rich_loc.
2625 (implicitly_declare): Likewise for renaming of inform_at_rich_loc.
2626 (undeclared_variable): Likewise for renaming of error_at_rich_loc.
2627 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
2628 (c_parser_struct_or_union_specifier): Likewise for renaming of
2629 pedwarn_at_rich_loc.
2630 (c_parser_parameter_declaration): Likewise for renaming of
2631 error_at_rich_loc.
2632 * c-typeck.c (build_component_ref): Likewise.
2633 (build_unary_op): Likewise for renaming of inform_at_rich_loc.
2634 (pop_init_level): Likewise for renaming of warning_at_rich_loc.
2635 (set_init_label): Likewise for renaming of error_at_rich_loc.
2636
c1136864
RB
26372017-10-30 Richard Biener <rguenther@suse.de>
2638
2639 * gimple-parser.c (c_parser_gimple_statement): Parse conditional
2640 stmts.
2641
ee5fd23a
MM
26422017-10-27 Michael Meissner <meissner@linux.vnet.ibm.com>
2643
2644 * c-decl.c (header_for_builtin_fn): Add support for copysign, fma,
2645 fmax, fmin, and sqrt _Float<N> and _Float<N>X variants.
2646
1a59ccf2
DM
26472017-10-25 David Malcolm <dmalcolm@redhat.com>
2648
2649 PR c/7356
2650 * c-parser.c (c_parser_declaration_or_fndef): Detect missing
2651 semicolons.
2652
bc1a75dd
JJ
26532017-10-25 Jakub Jelinek <jakub@redhat.com>
2654
2655 PR libstdc++/81706
2656 * c-decl.c (merge_decls): Copy "omp declare simd" attributes from
2657 newdecl to corresponding __builtin_ if any.
2658
ff1ff960
PC
26592017-10-24 Paolo Carlini <paolo.carlini@oracle.com>
2660
2661 PR c++/82466
2662 * c-decl.c (diagnose_mismatched_decls): Use
2663 OPT_Wbuiltin_declaration_mismatch.
2664
62e1c678
DM
26652017-10-12 David Malcolm <dmalcolm@redhat.com>
2666
2667 * c-parser.c (c_parser_require): Add "type_is_unique" param and
2668 use it to guard calls to maybe_suggest_missing_token_insertion.
2669 (c_parser_parms_list_declarator): Override default value of new
2670 "type_is_unique" param to c_parser_require.
2671 (c_parser_asm_statement): Likewise.
2672 * c-parser.h (c_parser_require): Add "type_is_unique" param,
2673 defaulting to true.
2674
a92f6726
NS
26752017-10-11 Nathan Sidwell <nathan@acm.org>
2676
2677 * c-decl.c (grokdeclarator): Check HAS_DECL_ASSEMBLER_NAME_P too.
2678
8e6cdc90
RS
26792017-10-10 Richard Sandiford <richard.sandiford@linaro.org>
2680
2681 * c-parser.c (c_parser_cilk_clause_vectorlength): Use wi::to_wide when
2682 operating on trees as wide_ints.
2683 * c-typeck.c (build_c_cast, c_finish_omp_clauses): Likewise.
2684 (c_tree_equal): Likewise.
2685
8139a48e
DM
26862017-10-04 David Malcolm <dmalcolm@redhat.com>
2687
2688 * c-decl.c (push_parm_decl): Store c_parm's location into the
2689 PARAM_DECL.
2690 (build_c_parm): Add "loc" param and store it within the c_parm.
2691 * c-parser.c (struct c_parser): Add "last_token_location" field.
2692 (c_parser_consume_token): Store location of the token into the
2693 new field.
2694 (c_parser_declaration_or_fndef): Store params into DECL_ARGUMENTS
2695 when handling a FUNCTION_DECL, if it doesn't already have them.
2696 (c_parser_parameter_declaration): Generate a location for the
2697 parameter, and pass it to the call to build_c_parm.
2698 * c-tree.h (struct c_parm): Add field "loc".
2699 (build_c_parm): Add location_t param.
2700 * c-typeck.c (get_fndecl_argument_location): New function.
2701 (inform_for_arg): New function.
2702 (convert_for_assignment): Use inform_for_arg when dealing with
2703 ic_argpass.
2704
2a389958
JJ
27052017-09-29 Jakub Jelinek <jakub@redhat.com>
2706
7d386d45
JJ
2707 * c-decl.c (grokfield): Use SET_DECL_C_BIT_FIELD here if
2708 width is non-NULL.
2709 (finish_struct): Test DECL_C_BIT_FIELD instead of DECL_INITIAL,
2710 don't SET_DECL_C_BIT_FIELD here.
2711
2a389958
JJ
2712 PR c/82340
2713 * c-decl.c (build_compound_literal): Use c_apply_type_quals_to_decl
2714 instead of trying to set just TREE_READONLY manually.
2715
ebc6a85e
TV
27162017-09-16 Tom de Vries <tom@codesourcery.com>
2717
2718 PR c/81875
2719 * c-parser.c (c_parser_omp_for_loop): Fold only operands of cond, not
2720 cond itself.
2721
bb75facd
JM
27222017-09-15 Joseph Myers <joseph@codesourcery.com>
2723
2724 PR c/82071
2725 * c-typeck.c (ep_convert_and_check): Just call convert_and_check
2726 for C11.
2727 (build_conditional_expr): For C11, generate result with excess
2728 precision when one argument is an integer and the other is of a
2729 type using excess precision.
2730
1d933576
BE
27312017-09-15 Bernd Edlinger <bernd.edlinger@hotmail.de>
2732
2733 * c-typeck.c (build_c_cast): Implement -Wcast-align=strict.
2734
267bbb6f
MP
27352017-09-13 Marek Polacek <polacek@redhat.com>
2736
2737 PR c/82167
2738 * c-typeck.c (c_expr_sizeof_expr): Use the type of expr.value rather
2739 than expr.original_type.
2740
6836632e
NS
27412017-09-12 Nathan Sidwell <nathan@acm.org>
2742
2743 * c-decl.c (field_decl_cmp, resort_data, resort_field_decl_cmp,
2744 resort_sorted_fields): Moved from c-family/c-common.c.
2745 * c-lang.h (struct sorted_fields_type): Moved from c-family/c-common.h.
2746
e035be33
JM
27472017-09-01 Joseph Myers <joseph@codesourcery.com>
2748
2749 PR c/82071
2750 * c-typeck.c (build_atomic_assign): Handle argument with excess
2751 precision. Ensure any EXCESS_PRECISION_EXPR is present in
2752 argument passed to build_binary_op and convert_for_assignment but
2753 not for call to c_fully_fold.
2754 (build_modify_expr): Do not remove EXCESS_PRECISION_EXPR early.
2755 Ensure build_binary_op is called with argument with original
2756 semantic type. Avoid calling c_fully_fold with an
2757 EXCESS_PRECISION_EXPR from build_binary_op.
2758
d2e05fcb
JJ
27592017-09-01 Jakub Jelinek <jakub@redhat.com>
2760
2761 PR c/81887
2762 * c-parser.c (c_parser_omp_ordered): Handle -fopenmp-simd.
2763
b397965c
RS
27642017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
2765 Alan Hayward <alan.hayward@arm.com>
2766 David Sherwood <david.sherwood@arm.com>
2767
2768 * c-typeck.c (build_binary_op): Use SCALAR_TYPE_MODE.
2769 (c_common_type): Likewise. Use as_a <scalar_mode> when setting
2770 m1 and m2 to the signed equivalent of a fixed-point
2771 SCALAR_TYPE_MODE.
2772
14e18d71
DM
27732017-08-24 David Malcolm <dmalcolm@redhat.com>
2774
2775 * c-tree.h (c_expr::get_location) Use EXPR_HAS_LOCATION rather
2776 than CAN_HAVE_LOCATION_P when determining whether to use the
2777 location_t value within "value".
2778
7f204c0f
DM
27792017-08-21 David Malcolm <dmalcolm@redhat.com>
2780
2781 * c-parser.c (c_parser_expr_list): Use c_expr::get_location ()
2782 rather than peeking the location of the first token.
2783 * c-tree.h (c_expr::get_location): New method.
2784
2f687306
DM
27852017-08-21 David Malcolm <dmalcolm@redhat.com>
2786
2787 * c-typeck.c (build_function_call_vec): Pass arg_loc to call
2788 to check_function_arguments.
2789
3e7b80d7
MP
27902017-08-18 Marek Polacek <polacek@redhat.com>
2791
2792 * c-parser.c (c_parser_postfix_expression): Remove unused code. Update
2793 commentary.
2794
00aa1fa2
L
27952017-08-18 H.J. Lu <hongjiu.lu@intel.com>
2796
2797 PR c/53037
2798 * c-decl.c (merge_decls): Also merge DECL_WARN_IF_NOT_ALIGN.
2799 (check_bitfield_type_and_width): Don't allow bit-field with
2800 warn_if_not_aligned type.
2801
da67acb9
MS
28022017-08-14 Martin Sebor <msebor@redhat.com>
2803
2804 PR c/81117
2805 * c-objc-common.c (c_objc_common_init): Handle 'G'.
2806
bb85aa74
MP
28072017-08-11 Marek Polacek <polacek@redhat.com>
2808
2809 PR c/81795
2810 * c-decl.c (pushtag): Only print inform if the warning was printed.
2811 (grokdeclarator): Likewise.
2812
32129a17
DM
28132017-08-10 David Malcolm <dmalcolm@redhat.com>
2814
2815 * c-parser.c (c_parser_error): Rename to...
2816 (c_parser_error_richloc): ...this, making static, and adding
2817 "richloc" parameter, passing it to the c_parse_error call,
2818 rather than calling c_parser_set_source_position_from_token.
2819 (c_parser_error): Reintroduce, reimplementing in terms of the
2820 above, converting return type from void to bool.
2821 (class token_pair): New class.
2822 (struct matching_paren_traits): New struct.
2823 (matching_parens): New typedef.
2824 (struct matching_brace_traits): New struct.
2825 (matching_braces): New typedef.
2826 (get_matching_symbol): New function.
2827 (c_parser_require): Add param MATCHING_LOCATION, using it to
2828 highlight matching "opening" tokens for missing "closing" tokens.
2829 (c_parser_skip_until_found): Likewise.
2830 (c_parser_static_assert_declaration_no_semi): Convert explicit
2831 parsing of CPP_OPEN_PAREN and CPP_CLOSE_PAREN to use of
2832 class matching_parens, so that the pertinent open parenthesis is
2833 highlighted when there are problems locating the close
2834 parenthesis.
2835 (c_parser_struct_or_union_specifier): Likewise.
2836 (c_parser_typeof_specifier): Likewise.
2837 (c_parser_alignas_specifier): Likewise.
2838 (c_parser_simple_asm_expr): Likewise.
2839 (c_parser_braced_init): Likewise, for matching_braces.
2840 (c_parser_paren_condition): Likewise, for matching_parens.
2841 (c_parser_switch_statement): Likewise.
2842 (c_parser_for_statement): Likewise.
2843 (c_parser_asm_statement): Likewise.
2844 (c_parser_asm_operands): Likewise.
2845 (c_parser_cast_expression): Likewise.
2846 (c_parser_sizeof_expression): Likewise.
2847 (c_parser_alignof_expression): Likewise.
2848 (c_parser_generic_selection): Likewise.
2849 (c_parser_postfix_expression): Likewise for cases RID_VA_ARG,
2850 RID_OFFSETOF, RID_TYPES_COMPATIBLE_P, RID_AT_SELECTOR,
2851 RID_AT_PROTOCOL, RID_AT_ENCODE, reindenting as necessary.
2852 In case CPP_OPEN_PAREN, pass loc_open_paren to the
2853 c_parser_skip_until_found call.
2854 (c_parser_objc_class_definition): Use class matching_parens as
2855 above.
2856 (c_parser_objc_method_decl): Likewise.
2857 (c_parser_objc_try_catch_finally_statement): Likewise.
2858 (c_parser_objc_synchronized_statement): Likewise.
2859 (c_parser_objc_at_property_declaration): Likewise.
2860 (c_parser_oacc_wait_list): Likewise.
2861 (c_parser_omp_var_list_parens): Likewise.
2862 (c_parser_omp_clause_collapse): Likewise.
2863 (c_parser_omp_clause_default): Likewise.
2864 (c_parser_omp_clause_if): Likewise.
2865 (c_parser_omp_clause_num_threads): Likewise.
2866 (c_parser_omp_clause_num_tasks): Likewise.
2867 (c_parser_omp_clause_grainsize): Likewise.
2868 (c_parser_omp_clause_priority): Likewise.
2869 (c_parser_omp_clause_hint): Likewise.
2870 (c_parser_omp_clause_defaultmap): Likewise.
2871 (c_parser_oacc_single_int_clause): Likewise.
2872 (c_parser_omp_clause_ordered): Likewise.
2873 (c_parser_omp_clause_reduction): Likewise.
2874 (c_parser_omp_clause_schedule): Likewise.
2875 (c_parser_omp_clause_num_teams): Likewise.
2876 (c_parser_omp_clause_thread_limit): Likewise.
2877 (c_parser_omp_clause_aligned): Likewise.
2878 (c_parser_omp_clause_linear): Likewise.
2879 (c_parser_omp_clause_safelen): Likewise.
2880 (c_parser_omp_clause_simdlen): Likewise.
2881 (c_parser_omp_clause_depend): Likewise.
2882 (c_parser_omp_clause_map): Likewise.
2883 (c_parser_omp_clause_device): Likewise.
2884 (c_parser_omp_clause_dist_schedule): Likewise.
2885 (c_parser_omp_clause_proc_bind): Likewise.
2886 (c_parser_omp_clause_uniform): Likewise.
2887 (c_parser_omp_for_loop): Likewise.
2888 (c_parser_cilk_clause_vectorlength): Likewise.
2889 (c_parser_cilk_clause_linear): Likewise.
2890 (c_parser_transaction_expression): Likewise.
2891 * c-parser.h (c_parser_require): Add param matching_location with
2892 default UNKNOWN_LOCATION.
2893 (c_parser_error): Convert return type from void to bool.
2894 (c_parser_skip_until_found): Add param matching_location with
2895 default UNKNOWN_LOCATION.
2896
30af3a2b
MP
28972017-08-09 Marek Polacek <polacek@redhat.com>
2898
2899 * c-decl.c (build_enumerator): Use true/false instead of 1/0.
2900 * c-tree.h (build_external_ref): Update declaration.
2901 * c-typeck.c (build_array_ref): Use true/false instead of 1/0.
2902 (build_external_ref): Change the type of a parameter to bool.
2903 (parser_build_binary_op): Use true/false instead of 1/0.
2904 (pointer_diff): Likewise.
2905 (build_modify_expr): Likewise.
2906 (set_designator): Change the type of a parameter to bool.
2907 (set_init_index): Use true/false instead of 1/0.
2908 (set_init_label): Likewise.
2909 (output_init_element): Change the type of a parameter to bool.
2910 (output_pending_init_elements): Use true/false instead of 1/0.
2911 (process_init_element): Likewise.
2912 (build_binary_op): Change the type of a parameter to bool.
2913
296c53ac
MP
29142017-08-09 Marek Polacek <polacek@redhat.com>
2915
2916 PR c/81233
2917 * c-typeck.c (pedwarn_init): Make the function take a variable list.
2918 Call emit_diagnostic_valist instead of pedwarn.
2919 (convert_for_assignment): Unroll the PEDWARN_FOR_ASSIGNMENT macro.
2920 Print the relevant types in diagnostics.
2921
a32c8316
MP
29222017-08-09 Marek Polacek <polacek@redhat.com>
2923
2924 PR c/81417
2925 * c-array-notation.c (fix_builtin_array_notation_fn): Update calls to
ab20d992 2926 build_conditional_expr.
a32c8316
MP
2927 * c-parser.c (c_parser_conditional_expression): Create locations for
2928 EXP1 and EXP2 from their source ranges. Pass the locations down to
2929 build_conditional_expr.
2930 * c-tree.h (build_conditional_expr): Update declaration.
2931 * c-typeck.c (build_conditional_expr): Add location_t parameters.
2932 For -Wsign-compare, also print the types.
2933
314e6352
ML
29342017-08-08 Martin Liska <mliska@suse.cz>
2935
2936 * c-convert.c: Include header files.
2937 * c-typeck.c: Likewise.
2938
577eec56
ML
29392017-08-07 Martin Liska <mliska@suse.cz>
2940
2941 * c-parser.c (c_parser_attributes): Canonicalize name of an
2942 attribute.
2943
f7b6353a
MP
29442017-08-02 Marek Polacek <polacek@redhat.com>
2945
2946 PR c/81289
2947 * c-parser.c (c_parser_unary_expression): Use set_error.
2948
8a6eab34
MP
2949 PR c/81448
2950 PR c/81306
2951 * c-warn.c (warn_for_multistatement_macros): Prevent bogus
2952 warnings. Avoid walking MACRO_MAP_LOCATIONS.
2953
ab20d992 29542017-07-31 Jan Hubicka <hubicka@ucw.cz>
7fef86d3
JH
2955 Martin Liska <mliska@suse.cz>
2956
2957 * c-typeck.c (c_finish_goto_label): Build gimple predict
f7b6353a 2958 statement.
7fef86d3 2959
f34ebeb2
ML
29602017-07-31 Martin Liska <mliska@suse.cz>
2961
2962 PR sanitize/81530
2963 * c-convert.c (convert): Guard condition with flag_sanitize_p
2964 also with current_function_decl non-null equality.
2965 * c-decl.c (grokdeclarator): Likewise.
2966 * c-typeck.c (build_binary_op): Likewise.
2967
8595f67b
MP
29682017-07-25 Marek Polacek <polacek@redhat.com>
2969
2970 * c-decl.c (grokfield): Remove local variable.
2971
d49718d6
MP
29722017-07-25 Marek Polacek <polacek@redhat.com>
2973
2974 PR c/81364
2975 * c-parser.c (c_parser_else_body): Don't warn about multistatement
2976 macro expansion if the body is in { }.
2977 (c_parser_while_statement): Likewise.
2978 (c_parser_for_statement): Likewise.
2979
ff22eb12
NS
29802017-07-18 Nathan Sidwell <nathan@acm.org>
2981
2982 * c-parser.c (c_parser_array_notation): Use TYPE_{MIN,MAX}_VALUE.
2983
eea77d1f
DM
29842017-07-14 David Malcolm <dmalcolm@redhat.com>
2985
2986 * c-decl.c (implicitly_declare): When suggesting a missing
2987 #include, provide a fix-it hint.
2988
b6f43128
DM
29892017-07-06 David Malcolm <dmalcolm@redhat.com>
2990
2991 * c-lang.c (selftest::run_c_tests): Move body to c_family_tests,
2992 and call that instead.
2993 * c-tree.h (selftest::run_c_tests): New decl.
2994
3e2becc4
MP
29952017-06-26 Marek Polacek <polacek@redhat.com>
2996
2997 PR c/80116
2998 * c-parser.c (c_parser_if_body): Set the location of the
2999 body of the conditional after parsing all the labels. Call
3000 warn_for_multistatement_macros.
3001 (c_parser_else_body): Likewise.
3002 (c_parser_switch_statement): Likewise.
3003 (c_parser_while_statement): Likewise.
3004 (c_parser_for_statement): Likewise.
3005 (c_parser_statement): Add a default argument. Save the location
3006 after labels have been parsed.
3007 (c_parser_c99_block_statement): Likewise.
3008
343ae898
RB
30092017-06-19 Richard Biener <rguenther@suse.de>
3010
3011 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
3012 negated _Literals to parse _Literal (int) -1.
3013
45b2222a
ML
30142017-06-13 Martin Liska <mliska@suse.cz>
3015
3016 PR sanitize/78204
3017 * c-convert.c (convert): Use sanitize_flags_p.
3018 * c-decl.c (grokdeclarator): Likewise.
3019 * c-typeck.c (convert_for_assignment): Likewise.
3020 (c_finish_return): Likewise.
3021 (build_binary_op): Likewise.
3022
8ab7005b
JJ
30232017-06-08 Jakub Jelinek <jakub@redhat.com>
3024
3025 PR c/81006
3026 * c-typeck.c (handle_omp_array_sections_1): Convert TYPE_MAX_VALUE
3027 to sizetype before size_binop.
3028
363dc72c
JJ
30292017-06-07 Jakub Jelinek <jakub@redhat.com>
3030
3031 * gimple-parser.c (c_parser_parse_gimple_body): Use TDI_gimple instead
3032 of TDI_generic.
3033
dc949728
MP
30342017-06-06 Marek Polacek <polacek@redhat.com>
3035
3036 PR c/79983
3037 * c-decl.c (start_struct): Use the location of TYPE_STUB_DECL of
3038 ref.
3039 (start_enum): Use the location of TYPE_STUB_DECL of enumtype.
3040
40ffd95f
BE
30412017-06-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
3042
3043 * c-parser.c (c_parser_binary_expression): Implement the
3044 -Wsizeof_pointer_div warning.
3045 (c_parser_postfix_expression): Allow SIZEOF_EXPR as expr.original_code
3046 from a parenthesized expression.
3047 (c_parser_expr_list): Use c_last_sizeof_loc.
3048 * c-tree.h (c_last_sizeof_loc): New external.
3049 * c-typeck.c (c_last_sizeof_loc): New variable.
3050 (c_expr_sizeof_expr, c_expr_sizeof_type): Assign c_last_sizeof_loc.
3051
9fc5e7a4
MM
30522017-05-31 Mikhail Maltsev <maltsevm@gmail.com>
3053
3054 PR testsuite/80580
3055 * gimple-parser.c (c_parser_gimple_if_stmt): Check for empty labels.
3056
f012c8ef
DM
30572017-05-30 David Malcolm <dmalcolm@redhat.com>
3058
3059 * c-objc-common.c (c_tree_printer): Gain bool and const char **
3060 parameters.
3061
3cd211af
MS
30622017-05-24 Martin Sebor <msebor@redhat.com>
3063
3064 PR c/80731
3065 * c-fold.c (c_fully_fold_internal): Adjust.
3066 * c-typeck.c (parser_build_unary_op): Adjust.
3067
fd71a9a2
TS
30682017-05-23 Thomas Schwinge <thomas@codesourcery.com>
3069
3070 * c-parser.c (OACC_KERNELS_CLAUSE_MASK): Add
3071 "PRAGMA_OACC_CLAUSE_NUM_GANGS", "PRAGMA_OACC_CLAUSE_NUM_WORKERS",
3072 "VECTOR_LENGTH".
3073
92fa0f9e
MP
30742017-05-23 Marek Polacek <polacek@redhat.com>
3075
3076 * c-parser.c (c_parser_compound_statement_nostart): Remove redundant
3077 quotes.
3078
d11c168a
JJ
30792017-05-22 Jakub Jelinek <jakub@redhat.com>
3080
3081 * c-fold.c (c_fully_fold_internal): Save the c_fully_fold_internal
3082 result for SAVE_EXPR operand and set SAVE_EXPR_FOLDED_P even if
3083 it returned invariant. Call tree_invariant_p unconditionally
3084 afterwards to decide whether to return expr or op0.
3085
58aca9d9
NS
30862017-05-22 Nathan Sidwell <nathan@acm.org>
3087
3088 * c-decl.c (c_parse_final_cleanups): Drop TDI_tu handling.
3089
7fd549d2
TS
30902017-05-19 Thomas Schwinge <thomas@codesourcery.com>
3091
3092 * c-parser.c (c_parser_omp_clause_default): Handle
3093 "OMP_CLAUSE_DEFAULT_PRESENT".
3094
6ecd2339
BE
30952017-05-18 Bernd Edlinger <bernd.edlinger@hotmail.de>
3096
3097 * config-lang.in (gtfiles): Add c-family/c-format.c.
3098
8a57ecff
NS
30992017-05-18 Nathan Sidwell <nathan@acm.org>
3100
3101 * c-decl.c (pushdecl_top_level): Delete unused function.
3102
6574d78e
MP
31032017-05-18 Marek Polacek <polacek@redhat.com>
3104
3105 * c-decl.c (match_builtin_function_types): Use NULL_TREE instead of 0.
3106 (check_earlier_gotos): Likewise.
3107 (define_label): Likewise.
3108 (pending_xref_error): Likewise.
3109 (smallest_type_quals_location): Likewise.
3110 (grokdeclarator): Likewise.
3111 (grokparms): Likewise.
3112 (identifier_global_value): Likewise.
3113 * c-typeck.c (set_nonincremental_init_from_string): Likewise.
3114 (find_init_member): Likewise.
3115
e3455240
MP
31162017-05-18 Marek Polacek <polacek@redhat.com>
3117
3118 * c-decl.c (start_decl): Use false/true instead of 0/1.
3119 (grokdeclarator): Likewise.
3120 (finish_struct): Likewise.
3121 (start_function): Change the return type to bool. Use false/true
3122 instead of 0/1.
3123 (declspecs_add_qual): Use UNKNOWN_LOCATION instead of 0.
3124 * c-tree.h (start_function): Update.
3125 * c-typeck.c (same_translation_unit_p): Change the return type to bool.
3126 (set_designator): Change the return type to bool. Use false/true
3127 instead of 0/1.
3128
3fa8871b
MP
31292017-05-17 Marek Polacek <polacek@redhat.com>
3130
3131 * c-decl.c: Use NULL_TREE instead of 0 where appropriate.
3132 * c-typeck.c: Likewise.
3133
142473df
MP
31342017-05-17 Marek Polacek <polacek@redhat.com>
3135
3136 PR sanitizer/80659
3137 * c-decl.c (build_compound_literal): Set DECL_ARTIFICIAL and
3138 DECL_IGNORED_P even for non-static compound literals.
3139
1a817418
ML
31402017-05-17 Martin Liska <mliska@suse.cz>
3141
3142 * c-decl.c (c_parse_final_cleanups): Introduce dump_flags_t type and
3143 use it instead of int type.
3144
b2fa0a8b
MP
31452017-05-17 Marek Polacek <polacek@redhat.com>
3146
3147 * c-convert.c (convert): Replace c_save_expr with save_expr. Don't
3148 call c_fully_fold.
3149 (convert) <case COMPLEX_TYPE>: Remove special handling of COMPLEX_TYPEs.
ab20d992 3150 * c-decl.c (grokdeclarator): Replace c_save_expr with save_expr.
b2fa0a8b
MP
3151 * c-fold.c (c_fully_fold_internal): Handle SAVE_EXPR.
3152 * c-parser.c (c_parser_declaration_or_fndef): Replace c_save_expr with
3153 save_expr.
3154 (c_parser_conditional_expression): Likewise.
3155 * c-tree.h (SAVE_EXPR_FOLDED_P): Define.
3156 * c-typeck.c (build_modify_expr): Replace c_save_expr with save_expr.
3157 (process_init_element): Likewise.
3158 (build_binary_op): Likewise.
3159 (handle_omp_array_sections_1): Likewise.
3160
1e47f02b
TS
31612017-05-12 Thomas Schwinge <thomas@codesourcery.com>
3162
3163 * c-parser.c (c_parser_omp_clause_num_gangs)
3164 (c_parser_omp_clause_num_workers)
3165 (c_parser_omp_clause_vector_length): Merge functions into...
3166 (c_parser_oacc_single_int_clause): ... this new function. Adjust
3167 all users.
3168
c24e924f
NS
31692017-05-11 Nathan Sidwell <nathan@acm.org>
3170
3171 * gimple-parser.c: Don't #include tree-dump.h.
3172
c587104e
MM
31732017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
3174
3175 PR testsuite/80580
3176 * gimple-parser.c (c_parser_parse_ssa_name): Validate SSA name base.
3177
67ac9a9d
MM
31782017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
3179
3180 PR testsuite/80580
3181 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
3182 incorrect __MEM syntax.
3183
ac4eb40f
MM
31842017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
3185
3186 PR testsuite/80580
3187 * gimple-parser.c (c_parser_gimple_unary_expression): Check argument
3188 type of unary '*'.
3189
641da50a
NS
31902017-05-09 Nathan Sidwell <nathan@acm.org>
3191
3192 * c-tree.h (pushdecl): Declare.
3193
56d35585
DM
31942017-05-05 David Malcolm <dmalcolm@redhat.com>
3195
3196 * c-decl.c (warn_defaults_to): Replace report_diagnostic
3197 with diagnostic_report_diagnostic.
3198 * c-errors.c (pedwarn_c99): Likewise.
3199 (pedwarn_c90): Likewise.
3200
815d9cc6
XR
32012017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn>
3202
92a285c1 3203 PR c++/80038
815d9cc6
XR
3204 * c-gimplify.c (c_gimplify_expr): Remove calls to
3205 cilk_gimplifY_call_params_in_spawned_fn.
3206
1c4ea66f
DM
32072017-04-25 David Malcolm <dmalcolm@redhat.com>
3208
3209 * c-parser.c (c_parser_struct_or_union_specifier): Add fix-it
3210 hint for removing extra semicolon.
3211
666f7903
JJ
32122017-04-21 Jakub Jelinek <jakub@redhat.com>
3213
3214 PR c/80468
3215 * c-decl.c (finish_declspecs) <case cts_int_n>: If int_n_idx is not
3216 enabled, set specs->type to integer_type_node.
3217
5764ee3c
JW
32182017-04-03 Jonathan Wakely <jwakely@redhat.com>
3219
3220 * c-array-notation.c: Fix typo in comment.
3221
10fa8dfb
MP
32222017-03-29 Marek Polacek <polacek@redhat.com>
3223
3224 PR c/79730
3225 * c-decl.c (finish_decl): Check VAR_P.
3226
a9e4a1a5
JJ
32272017-03-27 Jakub Jelinek <jakub@redhat.com>
3228
3229 PR middle-end/80162
3230 * c-tree.h (c_mark_addressable): Add array_ref_p argument.
3231 * c-typeck.c (c_mark_addressable): Likewise. Look through
3232 VIEW_CONVERT_EXPR unless array_ref_p and VCE is from VECTOR_TYPE
3233 to ARRAY_TYPE.
3234 (build_array_ref): Pass true as array_ref_p to c_mark_addressable.
3235
ee3ff394
MP
32362017-03-23 Marek Polacek <polacek@redhat.com>
3237
3238 * c-tree.h: Remove a C_RID_YYCODE reference.
3239
4d1b8e70
JJ
32402017-03-21 Jakub Jelinek <jakub@redhat.com>
3241
3242 PR c/80097
3243 * c-typeck.c (build_binary_op): Add EXCESS_PRECISION_EXPR only around
3244 optional COMPOUND_EXPR with ubsan instrumentation.
3245
31dc71a8
MP
32462017-03-17 Marek Polacek <polacek@redhat.com>
3247
3248 * c-parser.c: Add C11 references.
3249
d579c385
MP
32502017-03-15 Marek Polacek <polacek@redhat.com>
3251
3252 * c-parser.c (c_parser_enum_specifier): Remove redundant line.
3253
85059a38
MP
32542017-03-11 Marek Polacek <polacek@redhat.com>
3255
3256 * c-decl.c (implicit_decl_warning): Add a comment. Fix formatting.
3257
2f6f187a
DM
32582017-03-10 David Malcolm <dmalcolm@redhat.com>
3259
3260 PR translation/79848
3261 * c-decl.c (declspecs_add_type): Simplify uses of "%<%s%>" to
3262 "%qs".
3263 * c-parser.c (c_parser_oacc_shape_clause): Likewise.
3264
36618428
MP
32652017-03-09 Marek Polacek <polacek@redhat.com>
3266
3267 PR sanitizer/79757
3268 * c-parser.c (c_parser_declaration_or_fndef): Don't sanitize old-style
3269 parameter declarations with initializers.
3270
01e5af5a
JJ
32712017-03-09 Jakub Jelinek <jakub@redhat.com>
3272
3273 PR c/79969
3274 * c-decl.c (start_enum): Adjust DECL_SOURCE_LOCATION of
3275 TYPE_STUB_DECL.
3276
a71dbc63
JJ
32772017-03-07 Jakub Jelinek <jakub@redhat.com>
3278
3279 PR c/79834
3280 * c-parser.c (c_parser_pragma): Use error_at instead of c_parser_error
3281 for "may only be used in compound statements" diagnostics, change it
3282 such that the same translatable string is used for all pragmas. For
3283 PRAGMA_OACC_WAIT use "acc wait" rather than "acc enter data" in the
3284 diagnostics.
3285 (c_parser_omp_cancellation_point, c_parser_omp_target_update,
3286 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Change
3287 "may only be used in compound statements" diagnostics, such that the
3288 same translatable string is used for all pragmas.
3289
1ff4bae6
MP
32902017-03-04 Marek Polacek <polacek@redhat.com>
3291
3292 PR c/79847
3293 * c-decl.c (implicit_decl_warning): Add missing space.
3294
7f5a7d78
MP
32952017-03-03 Marek Polacek <polacek@redhat.com>
3296
3297 PR c/79758
3298 * c-decl.c (store_parm_decls_oldstyle): Check if the element of
3299 current_function_prototype_arg_types is error_mark_node. Fix
3300 formatting. Use TREE_VALUE instead of TREE_TYPE.
3301
883c8f06
JJ
33022017-03-03 Jakub Jelinek <jakub@redhat.com>
3303
79c9b7a8
JJ
3304 PR c/79837
3305 * c-parser.c (c_parser_omp_clause_reduction): Don't mention
3306 %<min%> or %<max%> in the diagnostics, instead mention identifier.
3307 (c_parser_omp_declare_reduction): Don't mention %<min%> in the
3308 diagnostics.
3309
883c8f06
JJ
3310 PR c/79836
3311 * c-parser.c (c_parser_generic_selection): Use %<_Generic%>
3312 instead of %<_Generic>.
3313 (c_parser_omp_ordered): Use %<depend%> instead of %<depend>.
3314 (c_parser_omp_target_exit_data): Use %<release%> instead of
3315 %<release>.
3316
324ff1a0
JJ
33172017-02-28 Jakub Jelinek <jakub@redhat.com>
3318
3319 * c-parser.c (c_parser_asm_statement): Use cond ? G_("...") : G_("...")
3320 instead of just cond ? "..." : "...".
3321 (c_parser_oacc_enter_exit_data): Use %s and ternary operator only
3322 for "enter"/"exit" keyword.
3323 (c_finish_oacc_routine): Don't use %s to supply portions of the
3324 message.
3325
4227c9ad
JJ
33262017-02-24 Jakub Jelinek <jakub@redhat.com>
3327
3328 PR c++/79588
3329 * c-parser.c (c_parser_postfix_expression_after_primary): Don't
3330 handle -Wrestrict here.
3331 * c-typeck.c (build_function_call_vec): Adjust
3332 check_function_arguments caller.
3333
5d972e66
RB
33342017-02-23 Richard Biener <rguenther@suse.de>
3335
3336 PR c/79684
3337 * gimple-parser.c (c_parser_gimple_statement): Use set_error
3338 to initialize c_exprs to return.
3339 (c_parser_gimple_binary_expression): Likewise.
3340 (c_parser_gimple_unary_expression): Likewise.
3341 (c_parser_gimple_postfix_expression): Likewise.
3342
61ac5ebe
MP
33432017-02-22 Marek Polacek <polacek@redhat.com>
3344
3345 PR c/79662
3346 * c-typeck.c (convert_arguments): Handle error_mark_node.
3347
41d1b0b1
PK
33482017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3349
3350 * gimple-parser.c (c_parser_gimple_postfix_expression): Check return
3351 value of c_parser_parse_ssa_name against error_mark_node and emit
3352 error if ssa name is anonymous and written as default definition.
3353
eab1f169
PK
33542017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3355
3356 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
3357 FMA_EXPR.
3358
bcac0b4d
JJ
33592017-02-16 Jakub Jelinek <jakub@redhat.com>
3360
3361 PR c++/79512
3362 * c-parser.c (c_parser_omp_target): For -fopenmp-simd
3363 ignore #pragma omp target even when not followed by identifier.
3364
1be33173
PK
33652017-02-14 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3366
3367 * gimpler-parser.c (c_parser_gimple_statement): Handle ABS_EXPR.
3368 (c_parser_gimple_unary_expression): Likewise.
3369
aa326bfb
JJ
33702017-02-13 Jakub Jelinek <jakub@redhat.com>
3371
3372 * c-parser.c (c_parser_oacc_declare): Add missing space in
3373 diagnostics.
3374
8a398bc5
PK
33752017-02-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3376
3377 PR c/79478
3378 * gimple-parser.c (c_parser_gimple_postfix_expression): Call
3379 set_c_expr_source_range when parsing ssa-name.
3380
3dcde5ef 33812017-02-10 Prasad Ghangal <prasad.ghangal@gmail.com>
ab20d992 3382 Richard Biener <rguenther@suse.de>
3dcde5ef
PG
3383
3384 * gimple-parser.c (c_parser_gimple_binary_expression): Avoid
3385 building IL when arguments are error_mark_node.
3386 (c_parser_gimple_unary_expression): Likewise.
3387 (c_parser_gimple_if_stmt): Likewise.
3388 (c_parser_gimple_switch_stmt): Likewise.
3389 (c_parser_gimple_return_stmt): Likewise.
3390 (c_parser_parse_ssa_name): When name lookup fails do not build
3391 an SSA name. Use undeclared rather than not declared in error
3392 reporting.
3393
192b048b
MP
33942017-02-09 Marek Polacek <polacek@redhat.com>
3395
3396 PR c/79428
3397 * c-parser.c (c_parser_omp_ordered): Call c_parser_skip_to_pragma_eol
3398 instead of c_parser_skip_until_found.
3399
56f71478
JJ
34002017-02-09 Jakub Jelinek <jakub@redhat.com>
3401
3402 PR c/79431
3403 * c-parser.c (c_parser_omp_declare_target): Don't invoke
3404 symtab_node::get on automatic variables.
3405
02889d23
CLT
34062016-02-09 Nathan Sidwell <nathan@codesourcery.com>
3407 Chung-Lin Tang <cltang@codesourcery.com>
3408
3409 * c-parser.c (c_parser_omp_clause_collapse): Disallow tile.
3410 (c_parser_oacc_clause_tile): Disallow collapse. Fix parsing and
3411 semantic checking.
3412 * c-parser.c (c_parser_omp_for_loop): Accept tiling constructs.
3413
7af4b20d
RB
34142017-02-07 Richard Biener <rguenther@suse.de>
3415
3416 * gimple-parser.c (c_parser_gimple_expr_list): Simplify.
3417 (c_parser_gimple_postfix_expression_after_primary):
3418 Do not use c_build_function_call_vec to avoid folding and promotion.
3419 Simplify.
3420
e5e391d6
MO
34212017-01-25 Maxim Ostapenko <m.ostapenko@samsung.com>
3422
3423 PR lto/79061
3424 * c-decl.c (pop_scope): Pass main_input_filename to
3425 build_translation_unit_decl.
3426
c2e84327
DM
34272017-01-24 David Malcolm <dmalcolm@redhat.com>
3428
3429 * c-parser.c: Include "read-rtl-function.h" and
3430 "run-rtl-passes.h".
3431 (c_parser_declaration_or_fndef): Rename "gimple-pass-list" in
3432 grammar to gimple-or-rtl-pass-list. Add rtl-function-definition
3433 production. Update for renaming of field "gimple_pass" to
3434 "gimple_or_rtl_pass". If __RTL was seen, call
3435 c_parser_parse_rtl_body. Convert a timevar_push/pop pair
3436 to an auto_timevar, to cope with early exit.
3437 (c_parser_declspecs): Update RID_GIMPLE handling for renaming of
3438 field "gimple_pass" to "gimple_or_rtl_pass", and for renaming of
3439 c_parser_gimple_pass_list to c_parser_gimple_or_rtl_pass_list.
3440 Handle RID_RTL.
3441 (c_parser_parse_rtl_body): New function.
3442 * c-tree.h (enum c_declspec_word): Add cdw_rtl.
3443 (struct c_declspecs): Rename field "gimple_pass" to
3444 "gimple_or_rtl_pass". Add field "rtl_p".
3445 * gimple-parser.c (c_parser_gimple_pass_list): Rename to...
3446 (c_parser_gimple_or_rtl_pass_list): ...this, updating accordingly.
3447 * gimple-parser.h (c_parser_gimple_pass_list): Rename to...
3448 (c_parser_gimple_or_rtl_pass_list): ...this.
3449
2ebd93e1
MP
34502017-01-20 Marek Polacek <polacek@redhat.com>
3451
3452 PR c/64279
3453 * c-typeck.c (build_conditional_expr): Warn about duplicated branches.
3454
b1c95bb5
RB
34552017-01-13 Richard Biener <rguenther@suse.de>
3456
3457 * gimple-parser.c (c_parser_gimple_compound_statement): Handle
3458 nops.
3459
25329913
RB
34602017-01-13 Richard Biener <rguenther@suse.de>
3461
3462 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
3463 _Literal ( type-name ) number.
3464
6bb4ea5c
RB
34652017-01-12 Richard Biener <rguenther@suse.de>
3466
3467 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
3468 __MEM.
3469
6b5b4e9c
JJ
34702017-01-11 Jakub Jelinek <jakub@redhat.com>
3471
3472 PR c++/72813
3473 * c-decl.c (pop_file_scope): Set flag_syntax_only to 1 after writing
3474 PCH file.
3475
e3252775
RB
34762017-01-11 Richard Biener <rguenther@suse.de>
3477
3478 PR bootstrap/79052
3479 * gimple-parser.c (c_parser_gimple_switch_stmt): Add missing
3480 returns on parse errors.
3481
a9342885
MP
34822017-01-04 Marek Polacek <polacek@redhat.com>
3483
3484 PR c++/64767
3485 * c-parser.c (c_parser_postfix_expression): Mark zero character
3486 constants by setting original_type in c_expr.
3487 * c-typeck.c (parser_build_binary_op): Warn when a pointer is compared
3488 with a zero character constant.
3489 (char_type_p): New function.
3490
5dd9a9d0
DM
34912017-01-04 David Malcolm <dmalcolm@redhat.com>
3492
3493 * c-parser.c (c_parser_declaration_or_fndef): Create a
3494 rich_location at init_loc and parse it to start_init.
3495 (last_init_list_comma): New global.
3496 (c_parser_braced_init): Update last_init_list_comma when parsing
3497 commas. Pass it to pop_init_level. Pass location of closing
3498 brace to pop_init_level.
3499 (c_parser_postfix_expression_after_paren_type): Create a
3500 rich_location at type_loc and parse it to start_init.
3501 (c_parser_omp_declare_reduction): Likewise for loc.
3502 * c-tree.h (start_init): Add rich_location * param.
3503 (pop_init_level): Add location_t param.
3504 * c-typeck.c (struct initializer_stack): Add field
3505 "missing_brace_richloc".
3506 (start_init): Add richloc param, use it to initialize
3507 the stack node's missing_brace_richloc.
3508 (last_init_list_comma): New decl.
3509 (finish_implicit_inits): Pass last_init_list_comma to
3510 pop_init_level.
3511 (push_init_level): When finding missing open braces, add fix-it
3512 hints to the richloc.
3513 (pop_init_level): Add "insert_before" param and pass it
3514 when calling pop_init_level. Add fixits about missing
3515 close braces to any richloc. Use the richloc for the
3516 -Wmissing-braces warning.
3517 (set_designator): Pass last_init_list_comma to pop_init_level.
3518 (process_init_element): Likewise.
3519
cbe34bb5
JJ
35202017-01-01 Jakub Jelinek <jakub@redhat.com>
3521
3522 Update copyright years.
3523
d17680f3
JJ
35242016-12-21 Jakub Jelinek <jakub@redhat.com>
3525
0dba7960
JJ
3526 PR bootstrap/78817
3527 * c-typeck.c (build_function_call_vec): If check_function_arguments
3528 returns true, set TREE_NO_WARNING on CALL_EXPR.
3529
d17680f3
JJ
3530 PR c/77767
3531 * c-decl.c (grokdeclarator): If *expr is non-NULL, append expression
3532 to *expr instead of overwriting it.
3533
aa90531e
RB
35342016-12-20 Richard Biener <rguenther@suse.de>
3535
3536 * gimple-parser.c (c_parser_gimple_compound_statement): Improve
3537 error recovery.
3538 (c_parser_gimple_statement): Only build assigns for non-error
3539 stmts.
3540 (c_parser_gimple_postfix_expression_after): Improve error recovery.
3541
629b3d75
MJ
35422016-12-14 Martin Jambor <mjambor@suse.cz>
3543
3544 * c-parser.c: Include omp-general.h and omp-offload.h instead of
3545 omp-low.h.
3546 (c_finish_oacc_routine): Adjusted call to
3547 get_oacc_fn_attrib, build_oacc_routine_dims and replace_oacc_fn_attrib
3548 to use their new names.
3549 (c_parser_oacc_enter_exit_data): Adjusted call to find_omp_clause to
3550 use its new name.
3551 (c_parser_oacc_update): Likewise.
3552 (c_parser_omp_simd): Likewise.
3553 (c_parser_omp_target_update): Likewise.
3554 * c-typeck.c: Include omp-general.h instead of omp-low.h.
3555 (c_finish_omp_cancel): Adjusted call to find_omp_clause to use its new
3556 name.
3557 (c_finish_omp_cancellation_point): Likewise.
3558 * gimple-parser.c: Do not include omp-low.h
3559
c5af52eb
CP
35602016-12-02 Cesar Philippidis <cesar@codesourcery.com>
3561 James Norris <jnorris@codesourcery.com>
3562
3563 * c-parser.c (c_parser_pragma): Error when PRAGMA_OACC_{ENTER_DATA,
3564 EXIT_DATA,WAIT} are not used in compound statements.
3565 (c_parser_oacc_enter_exit_data): Update diagnostics.
3566
48330c93
BE
35672016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
3568
3569 PR c++/71973
3570 * c-decl.c (diagnose_mismatched_decls): Use
3571 OPT_Wbuiltin_declaration_mismatch here too.
3572
899ca90e 35732016-11-18 Richard Sandiford <richard.sandiford@arm.com>
48330c93
BE
3574 Alan Hayward <alan.hayward@arm.com>
3575 David Sherwood <david.sherwood@arm.com>
899ca90e
RS
3576
3577 * c-decl.c (merge_decls): Use SET_DECL_MODE.
3578 (make_label, finish_struct): Likewise.
3579
1ee62b92 35802016-11-14 Prasad Ghangal <prasad.ghangal@gmail.com>
8e745a17 3581 Richard Biener <rguenther@suse.de>
22b15758 3582
8e745a17
JJ
3583 * Make-lang.in (C_AND_OBJC_OBJS): Add gimple-parser.o.
3584 * config-lang.in (gtfiles): Add c/c-parser.h.
3585 * c-tree.h (enum c_declspec_word): Add cdw_gimple.
3586 (struct c_declspecs): Add gimple_pass member and gimple_p flag.
3587 * c-parser.c (enum c_id_kind, struct c_token,
3588 c_parser_next_token_is, c_parser_next_token_is_not,
3589 c_parser_next_token_is_keyword,
3590 enum c_lookahead_kind, enum c_dtr_syn, enum c_parser_prec):
3591 Split out to ...
3592 * c-parser.h: ... new header.
3593 * c-parser.c: Include c-parser.h and gimple-parser.h.
1ee62b92 3594 (c_parser_peek_token, c_parser_peek_2nd_token,
8e745a17
JJ
3595 c_token_starts_typename, c_parser_next_token_starts_declspecs,
3596 c_parser_next_tokens_start_declaration, c_parser_consume_token,
3597 c_parser_error, c_parser_require, c_parser_skip_until_found,
3598 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
3599 c_parser_type_name): Export.
3600 (c_parser_tokens_buf): New function.
3601 (c_parser_error): Likewise.
3602 (c_parser_set_error): Likewise.
3603 (c_parser_declspecs): Handle RID_GIMPLE.
1ee62b92
PG
3604 (c_parser_declaration_or_fndef): Parse __GIMPLE marked body
3605 via c_parser_parse_gimple_body.
8e745a17
JJ
3606 * c-parser.h (c_parser_peek_token, c_parser_peek_2nd_token,
3607 c_token_starts_typename, c_parser_next_token_starts_declspecs,
3608 c_parser_next_tokens_start_declaration, c_parser_consume_token,
3609 c_parser_error, c_parser_require, c_parser_skip_until_found,
3610 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
3611 c_parser_type_name): Declare.
1ee62b92
PG
3612 (struct c_parser): Declare forward.
3613 (c_parser_tokens_buf): Declare.
8e745a17
JJ
3614 (c_parser_error): Likewise.
3615 (c_parser_set_error): Likewise.
3616 * gimple-parser.c: New file.
3617 * gimple-parser.h: Likewise.
1ee62b92 3618
22b15758
UB
36192016-11-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3620
3621 PR c/35503
3622 * c-parser.c (c_parser_postfix_expression_after_primary): Call
3623 warn_for_restrict.
3624
84ff4775
LCW
36252016-09-11 Le-Chun Wu <lcwu@google.com>
3626 Mark Wielaard <mjw@redhat.com>
3627
3628 * c-decl.c (warn_if_shadowing): Use the warning code corresponding
3629 to the given -Wshadow= variant.
3630
4d0cdd0c
TP
36312016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
3632
3633 * c-typeck.c: Include memmodel.h.
3634
1202f33e
JJ
36352016-10-13 Jakub Jelinek <jakub@redhat.com>
3636
3637 PR target/77957
3638 * c-objc-common.h (LANG_HOOKS_GETDECLS): Use hook_tree_void_null
3639 instead of lhd_return_null_tree_v.
3640
8a14afd0
BS
36412016-10-07 Bernd Schmidt <bschmidt@redhat.com>
3642
3643 PR c++/69733
3644 * c-decl.c (smallest_type_quals_location): New static function.
3645 (grokdeclarator): Try to find the correct location for an ignored
3646 qualifier.
3647
81fea426
MP
36482016-09-26 Marek Polacek <polacek@redhat.com>
3649
3650 PR c/7652
3651 * c-decl.c (pop_scope): Add gcc_fallthrough.
3652
36532016-09-26 Marek Polacek <polacek@redhat.com>
3654
3655 PR c/7652
3656 * c-parser.c (struct c_token): Add flags field.
3657 (c_lex_one_token): Pass it to c_lex_with_flags.
3658 (c_parser_declaration_or_fndef): Turn __attribute__((fallthrough));
3659 into IFN_FALLTHROUGH.
3660 (c_parser_label): Set FALLTHROUGH_LABEL_P on labels. Handle
3661 attribute fallthrough after a case label or default label.
3662 (c_parser_statement_after_labels): Handle RID_ATTRIBUTE.
3663
9a2300e9
MP
36642016-09-24 Marek Polacek <polacek@redhat.com>
3665
3666 PR c/77490
3667 * c-typeck.c (build_unary_op): Warn about bit not on expressions that
3668 have boolean value. Warn about ++/-- on booleans.
3669
7de76362
JJ
36702016-09-23 Jakub Jelinek <jakub@redhat.com>
3671
3672 * c-parser.c (incomplete_record_decls): Remove unnecessary
3673 = vNULL initialization of file scope vec.
3674
5b73d2ab
MP
36752016-09-16 Marek Polacek <polacek@redhat.com>
3676
3677 * c-typeck.c (lvalue_p): Use true and false instead of 1 and 0.
3678
e51fbec3
MP
36792016-09-14 Marek Polacek <polacek@redhat.com>
3680
3681 * c-array-notation.c (create_cmp_incr): Use false instead of 0.
3682 (fix_array_notation_expr): Likewise.
3683 * c-decl.c (finish_decl): Likewise.
3684 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
3685 * c-typeck.c (array_to_pointer_conversion): Use true instead of 1.
3686 (function_to_pointer_conversion): Use false instead of 0.
3687 (convert_lvalue_to_rvalue): Likewise.
3688 (parser_build_unary_op): Likewise.
3689 (build_atomic_assign): Likewise.
3690 (build_unary_op): Change nonconvert parameter type to bool, use
3691 true/false instead of 1/0.
3692 (build_binary_op): Use true instead of 1.
3693
254830ba
DM
36942016-09-13 David Malcolm <dmalcolm@redhat.com>
3695
3696 * c-parser.c (c_parser_declaration_or_fndef): Update for renaming
3697 of add_fixit_insert to add_fixit_insert_before.
3698
4c13ba17
MP
36992016-09-13 Marek Polacek <polacek@redhat.com>
3700
3701 * c-typeck.c (build_unary_op): Rename FLAG parameter to NOCONVERT. Use
3702 it.
3703
54dcdb88
BE
37042016-09-12 Bernd Edlinger <bernd.edlinger@hotmail.de>
3705
3706 PR c++/77496
3707 * c-parser.c (c_parser_conditional_expression): Pass the rightmost
3708 COMPOUND_EXPR to warn_for_omitted_condop.
3709
e5106e27
DM
37102016-09-07 David Malcolm <dmalcolm@redhat.com>
3711
3712 * c-lang.c (LANG_HOOKS_GET_SUBSTRING_LOCATION): Use
3713 c_get_substring_location for this new langhook.
3714
9dc5773f
JJ
37152016-09-02 Jakub Jelinek <jakub@redhat.com>
3716
3717 PR c/65467
3718 * c-parser.c (c_parser_declspecs): Don't sorry about _Atomic if
3719 flag_openmp.
3720 (c_parser_omp_variable_list): Use convert_lvalue_to_rvalue
3721 instead of mark_exp_read on low_bound/length expression.
3722 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_threads,
3723 c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
3724 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
3725 c_parser_omp_clause_num_workers, c_parser_oacc_shape_clause,
3726 c_parser_oacc_clause_tile, c_parser_omp_clause_schedule,
3727 c_parser_omp_clause_vector_length, c_parser_omp_clause_num_teams,
3728 c_parser_omp_clause_thread_limit, c_parser_omp_clause_aligned,
3729 c_parser_omp_clause_linear, c_parser_omp_clause_safelen,
3730 c_parser_omp_clause_simdlen, c_parser_omp_clause_device,
3731 c_parser_omp_clause_dist_schedule): Use convert_lvalue_to_rvalue
3732 instead of mark_expr_read.
3733 (c_parser_omp_declare_reduction): Reject _Atomic qualified types.
3734 * c-objc-common.h (LANG_HOOKS_OMP_CLAUSE_COPY_CTOR,
3735 LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP): Redefine.
3736 * c-tree.h (c_omp_clause_copy_ctor): New prototype.
3737 * c-typeck.c (handle_omp_array_sections_1): Diagnose _Atomic qualified
3738 array section bases outside of depend clause, for depend clause
3739 use convert_lvalue_to_rvalue on the base.
3740 (c_finish_omp_clauses): Reject _Atomic qualified vars in reduction,
3741 linear, aligned, map, to and from clauses.
3742 (c_omp_clause_copy_ctor): New function.
3743
295844f6
MP
37442016-09-01 Marek Polacek <polacek@redhat.com>
3745
3746 PR c/7652
3747 * c-typeck.c (composite_type): Add FALLTHRU comment.
3748
089af25c
DM
37492016-08-31 David Malcolm <dmalcolm@redhat.com>
3750
3751 * c-parser.c (c_parser_declaration_or_fndef): Add trailing space
3752 to the insertion fixits for "struct", "union", and "enum".
3753
f9087798
DM
37542016-08-30 David Malcolm <dmalcolm@redhat.com>
3755
3756 * c-decl.c (implicit_decl_warning): Use add_fixit_replace
3757 rather than add_fixit_misspelled_id.
3758 (undeclared_variable): Likewise.
3759 * c-parser.c (c_parser_declaration_or_fndef): Likewise. Remove
3760 now-redundant "here" params from add_fixit_insert method calls.
3761 (c_parser_parameter_declaration): Likewise.
3762 * c-typeck.c (build_component_ref): Remove now-redundant range
3763 param from add_fixit_replace method calls.
3764
ebef225f
MP
37652016-08-25 Marek Polacek <polacek@redhat.com>
3766
3767 * c-typeck.c (parser_build_binary_op): Pass LHS to
3768 warn_logical_not_parentheses.
3769
fe377a48
MP
37702016-08-25 Marek Polacek <polacek@redhat.com>
3771
3772 PR c/77323
3773 * c-decl.c (declspecs_add_type): Set typespec_word even when __intN
3774 or _FloatN or _FloatNx is not supported.
3775 (finish_declspecs): Set type to integer_type_node when _FloatN or
3776 _FloatNx is not supported.
3777
c65699ef
JM
37782016-08-19 Joseph Myers <joseph@codesourcery.com>
3779
3780 PR c/32187
3781 * c-tree.h (cts_floatn_nx): New enum c_typespec_keyword value.
3782 (struct c_declspecs): Add field floatn_nx_idx.
3783 * c-decl.c (declspecs_add_type, finish_declspecs): Handle _FloatN
3784 and _FloatNx type specifiers.
3785 * c-parser.c (c_keyword_starts_typename, c_token_starts_declspecs)
3786 (c_parser_declspecs, c_parser_attribute_any_word)
3787 (c_parser_objc_selector): Use CASE_RID_FLOATN_NX.
3788 * c-typeck.c (c_common_type): Handle _FloatN and _FloatNx types.
3789 (convert_arguments): Avoid promoting _FloatN and _FloatNx types
3790 narrower than double.
3791
2f1364c2
JJ
37922016-08-12 Jakub Jelinek <jakub@redhat.com>
3793 Martin Liska <mliska@suse.cz>
3794
3795 PR c/67410
3796 * c-typeck.c (set_nonincremental_init_from_string): Use / instead of
3797 % to determine val element to change. Assert that
3798 wchar_bytes * charwidth fits into val array.
3799
191816a3
MP
38002016-08-12 Marek Polacek <polacek@redhat.com>
3801
3802 PR c/7652
3803 * c-parser.c (c_parser_external_declaration): Add FALLTHRU.
3804 (c_parser_postfix_expression): Likewise.
3805 * c-typeck.c (build_unary_op): Adjust fall through comment.
3806 (c_mark_addressable): Likewise.
3807
b95a64bb
JJ
38082016-08-11 Jakub Jelinek <jakub@redhat.com>
3809
3810 PR c/72816
3811 * c-decl.c (grokdeclarator): When adding TYPE_DOMAIN for flexible
3812 array member through typedef, for orig_qual_indirect == 0 clear
3813 orig_qual_type.
3814
895aa8e1
DM
38152016-08-08 David Malcolm <dmalcolm@redhat.com>
3816
3817 PR c/64955
3818 * c-lang.c (LANG_HOOKS_RUN_LANG_SELFTESTS): If CHECKING_P, wire
3819 this up to selftest::run_c_tests.
3820 (selftest::run_c_tests): New function.
3821
0b212d8c
TS
38222016-08-04 Thomas Schwinge <thomas@codesourcery.com>
3823
ae9281fc
TS
3824 * c-parser.c (struct oacc_routine_data): Add error_seen and
3825 fndecl_seen members.
3826 (c_finish_oacc_routine): Use these.
3827 (c_parser_declaration_or_fndef): Adjust.
3828 (c_parser_oacc_routine): Likewise. Support more C language
3829 constructs, and improve diagnostics. Move pragma context
3830 checking...
3831 (c_parser_pragma): ... here.
3832
0b212d8c
TS
3833 * c-parser.c (struct oacc_routine_data): New.
3834 (c_parser_declaration_or_fndef, c_parser_oacc_routine): Use it.
3835 Simplify code.
3836 (c_finish_oacc_routine): Likewise. Don't attach clauses to "omp
3837 declare target" attribute.
3838
76e2c821
JB
38392016-08-01 Jan Beulich <jbeulich@suse.com>
3840
3841 * c-fold.c (c_fully_fold_internal): Also emit shift count
3842 warnings for vector types.
3843 * c-typeck.c (build_binary_op): Likewise.
3844
f618a472
MP
38452016-07-29 Marek Polacek <polacek@redhat.com>
3846
3847 PR c/71742
3848 * c-decl.c (finish_struct): Rephrase an error message.
3849
efd0786f
MP
3850 PR c/71853
3851 * c-parser.c (c_parser_switch_statement): Initialize ce.original_type
3852 to error node for invalid code.
3853
e00dceaf
MP
3854 PR c/71573
3855 * c-decl.c (implicitly_declare): Return decl early not only for
3856 error_mark_nodes, but for anything that is not a FUNCTION_DECL.
3857
673a107a
JJ
38582016-07-29 Jakub Jelinek <jakub@redhat.com>
3859
3860 PR c/71969
3861 * c-decl.c (finish_function): Only set DECL_DISREGARD_INLINE_LIMITS
3862 on GNU extern inline functions.
3863
a5b5c8b6
MP
38642016-07-29 Marek Polacek <polacek@redhat.com>
3865
3866 PR c/71583
3867 * c-parser.c (c_parser_postfix_expression_after_paren_type): Also
3868 check expr.value.
3869
e3fe09c1
UB
38702016-07-22 Uros Bizjak <ubizjak@gmail.com>
3871
3872 * c-typeck.c: Use HOST_WIDE_INT_1 instead of (HOST_WIDE_INT) 1,
3873
7c8f7eaa
DM
38742016-07-20 David Malcolm <dmalcolm@redhat.com>
3875
3876 * c-decl.c (struct edit_distance_traits<cpp_hashnode *>): Move to
3877 spellcheck-tree.h
3878 (best_macro_match): Likewise, converting from a typedef to a
3879 subclass.
3880 (find_closest_macro_cpp_cb): Move to spellcheck-tree.c.
3881 (lookup_name_fuzzy): Update for change of best_macro_match to a
3882 subclass with a ctor that calls cpp_forall_identifiers.
3883
de6a69ee
DM
38842016-07-20 David Malcolm <dmalcolm@redhat.com>
3885
3886 * c-decl.c (implicit_decl_warning): Update for conversion of
3887 return type of lookup_name_fuzzy to const char *.
3888 (undeclared_variable): Likewise.
3889 (lookup_name_fuzzy): Convert return type from tree to
3890 const char *.
3891 * c-parser.c (c_parser_declaration_or_fndef): Update for
3892 conversion of return type of lookup_name_fuzzy to const char *.
3893 (c_parser_parameter_declaration): Likewise.
3894
b1c9c068
CP
38952016-07-15 Cesar Philippidis <cesar@codesourcery.com>
3896
3897 * c-parser.c (c_parser_oacc_declare): Don't scan for
3898 GOMP_MAP_POINTER.
3899 * c-typeck.c (handle_omp_array_sections): Mark data clauses with
3900 GOMP_MAP_FORCE_{PRESENT,TO,FROM,TOFROM} as potentially having
3901 zero-length subarrays.
3902
ddbbcb19
JJ
39032016-07-15 Jakub Jelinek <jakub@redhat.com>
3904
3905 PR c/71858
3906 * c-decl.c (implicit_decl_warning): Use FUZZY_LOOKUP_FUNCTION_NAME
3907 instead of FUZZY_LOOKUP_NAME.
3908 (lookup_name_fuzzy): For FUZZY_LOOKUP_FUNCTION_NAME consider
3909 FUNCTION_DECLs, {VAR,PARM}_DECLs function pointers and macros.
3910
dd36b877
JJ
39112016-07-14 Jakub Jelinek <jakub@redhat.com>
3912
3913 PR c/71858
3914 * c-decl.c (lookup_name_fuzzy): Ignore binding->invisible.
3915
8c681247
TS
39162016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
3917
3918 * c-parser.c (c_parser_generic_selection): Make type of variable
3919 auto_vec.
3920 (c_parser_omp_declare_simd): Likewise.
3921
bf4fa671
TS
39222016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
3923
3924 * c-decl.c (struct c_struct_parse_info): Change member types
3925 from vec to auto_vec.
3926 (start_struct): Adjust.
3927 (finish_struct): Likewise.
3928
557e8c49
JJ
39292016-07-02 Jakub Jelinek <jakub@redhat.com>
3930
3931 PR c/71719
3932 * c-typeck.c (mark_exp_read): Handle VIEW_CONVERT_EXPR.
3933
54d19c3b
TS
39342016-06-29 Thomas Schwinge <thomas@codesourcery.com>
3935
3936 * c-parser.c (c_parser_pragma) <PRAGMA_OMP_CANCELLATION_POINT>:
3937 Move pragma context checking into...
3938 (c_parser_omp_cancellation_point): ... here, and improve
3939 diagnostic messages.
3940 * c-typeck.c (c_finish_omp_cancel)
3941 (c_finish_omp_cancellation_point): Improve diagnostic messages.
3942
152ef731
JJ
39432016-06-29 Jakub Jelinek <jakub@redhat.com>
3944
3945 PR c/71685
3946 * c-typeck.c (c_build_qualified_type): Don't clear
3947 C_TYPE_INCOMPLETE_VARS for the main variant.
3948
39492016-06-28 Martin Sebor <msebor@redhat.com>
4378d117
MS
3950
3951 PR c/71552
3952 * c-typeck.c (output_init_element): Diagnose incompatible types
3953 before non-constant initializers.
3954
e9ac1f86
JJ
39552016-06-28 Jakub Jelinek <jakub@redhat.com>
3956
3957 * Make-lang.in: Don't cat ../stage_current if it does not exist.
3958
277d7ee0
AK
39592016-06-23 Andi Kleen <ak@linux.intel.com>
3960
3961 * Make-lang.in: Add support for autofdo.
3962
1a4f11c8
DM
39632016-06-22 David Malcolm <dmalcolm@redhat.com>
3964
3965 PR c/70339
3966 * c-decl.c: Include spellcheck-tree.h and gcc-rich-location.h.
3967 (implicit_decl_warning): When issuing warnings for implicit
3968 declarations, attempt to provide a suggestion via
3969 lookup_name_fuzzy.
3970 (undeclared_variable): Likewise when issuing errors.
3971 (lookup_name_in_scope): Likewise.
3972 (struct edit_distance_traits<cpp_hashnode *>): New struct.
3973 (best_macro_match): New typedef.
3974 (find_closest_macro_cpp_cb): New function.
3975 (lookup_name_fuzzy): New function.
3976 * c-parser.c: Include gcc-rich-location.h.
3977 (c_token_starts_typename): Split out case CPP_KEYWORD into...
3978 (c_keyword_starts_typename): ...this new function.
3979 (c_parser_declaration_or_fndef): When issuing errors about
3980 missing "struct" etc, add a fixit. For other kinds of errors,
3981 attempt to provide a suggestion via lookup_name_fuzzy.
3982 (c_parser_parms_declarator): When looking ahead to detect typos in
3983 type names, also reject CPP_KEYWORD.
3984 (c_parser_parameter_declaration): When issuing errors about
3985 unknown type names, attempt to provide a suggestion via
3986 lookup_name_fuzzy.
3987 * c-tree.h (c_keyword_starts_typename): New prototype.
3988
5a578671
JM
39892016-06-20 Joseph Myers <joseph@codesourcery.com>
3990
3991 PR c/71601
3992 * c-typeck.c (build_conditional_expr): Return error_mark_node if
3993 c_common_type returns error_mark_node.
3994
3f8257db 39952016-06-19 Martin Sebor <msebor@redhat.com>
aa0db437
MS
3996
3997 PR c/69507
3998 * c-parser.c (c_parser_alignof_expression): Avoid diagnosing
3999 __alignof__ (expression).
4000
6a3f203c
DM
40012016-06-14 David Malcolm <dmalcolm@redhat.com>
4002
4003 * c-typeck.c: Include spellcheck-tree.h rather than spellcheck.h.
4004
264757fb
DM
40052016-06-14 David Malcolm <dmalcolm@redhat.com>
4006
4007 * c-typeck.c (build_component_ref): Simplify fixit code by
4008 using gcc_rich_location::add_fixit_misspelled_id.
4009 (set_init_label): Likewise.
4010
f7e4f2e3
DM
40112016-06-13 David Malcolm <dmalcolm@redhat.com>
4012
4013 * c-parser.c (c_parser_initelt): Provide location of name for new
4014 location_t param of set_init_label.
4015 * c-tree.h (set_init_label): Add location_t param.
4016 * c-typeck.c (set_init_index): Add "fieldname_loc" location_t
4017 param and use it when issuing error messages about unrecognized
4018 field names. Attempt to provide a fixit hint if appropriate,
4019 otherwise update the error message to provide the type name.
4020
4b1ffdb1
TS
40212016-06-10 Thomas Schwinge <thomas@codesourcery.com>
4022
4023 PR c/71381
4024 * c-parser.c (c_parser_omp_variable_list) <OMP_CLAUSE__CACHE_>:
4025 Loosen checking.
4026
44a845ca
MS
40272016-06-08 Martin Sebor <msebor@redhat.com>
4028 Jakub Jelinek <jakub@redhat.com>
4029
4030 PR c++/70507
4031 PR c/68120
4032 * c-typeck.c (convert_arguments): Don't promote last argument
4033 of BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
4034
92a5f2ba
MP
40352016-06-08 Marek Polacek <polacek@redhat.com>
4036
4037 PR c/71418
4038 * c-decl.c (grokdeclarator): Check TYPE_P.
4039
08203f73
MP
4040 PR c/71426
4041 * c-decl.c (get_parm_info): Don't crash on an assert on invalid
4042 code.
4043
6ffd47b7
DM
40442016-06-07 David Malcolm <dmalcolm@redhat.com>
4045
4046 * c-parser.c (c_parser_postfix_expression): In __builtin_offsetof
4047 and structure element reference, capture the location of the
4048 element name token and pass it to build_component_ref.
4049 (c_parser_postfix_expression_after_primary): Likewise for
4050 structure element dereference.
4051 (c_parser_omp_variable_list): Likewise for
4052 OMP_CLAUSE_{_CACHE, MAP, FROM, TO},
4053 * c-tree.h (build_component_ref): Add location_t param.
4054 * c-typeck.c (build_component_ref): Add location_t param
4055 COMPONENT_LOC. Use it, if available, when issuing hints about
4056 mispelled member names to provide a fixit replacement hint.
4057
1f40cff3
MP
40582016-06-06 Marek Polacek <polacek@redhat.com>
4059
4060 PR c/71362
4061 * c-parser.c (c_parser_direct_declarator): Set location.
4062
5545a907
MP
40632016-06-06 Marek Polacek <polacek@redhat.com>
4064
4065 * c-typeck.c (comptypes_internal): Handle comparisons of
4066 INTEGER_TYPE, FIXED_POINT_TYPE, and REAL_TYPE nodes. Don't check
4067 TYPE_REF_CAN_ALIAS_ALL.
4068
b605f663
CLT
40692016-06-03 Chung-Lin Tang <cltang@codesourcery.com>
4070
4071 * c-typeck.c (c_finish_omp_clauses): Mark OpenACC reduction
4072 arguments as addressable when async clause exists.
4073
00631022
JJ
40742016-05-30 Jakub Jelinek <jakub@redhat.com>
4075
4076 PR c++/71349
4077 * c-parser.c (c_parser_omp_for): Don't disallow nowait clause
4078 when combined with target construct.
4079
7211a097
JJ
40802016-05-26 Jakub Jelinek <jakub@redhat.com>
4081
4082 * c-parser.c (c_parser_omp_clause_schedule): Warn if
4083 OMP_CLAUSE_SCHEDULE_CHUNK_EXPR is known not to be positive.
4084
95efe6b6
MP
40852016-05-25 Marek Polacek <polacek@redhat.com>
4086
4087 PR c/71265
4088 * c-decl.c (c_make_fname_decl): Don't check seen_error.
4089
a23faf7a
MP
4090 PR c/71266
4091 * c-decl.c (store_parm_decls_oldstyle): Skip non-PARM_DECLs.
4092
e46c7770
CP
40932016-05-24 Cesar Philippidis <cesar@codesourcery.com>
4094
4095 * c-parser.c (c_parser_oacc_declare): Add support for
4096 GOMP_MAP_FIRSTPRIVATE_POINTER.
4097 * c-typeck.c (handle_omp_array_sections_1): Replace bool is_omp
4098 argument with enum c_omp_region_type ort.
4099 (handle_omp_array_sections): Likewise. Update call to
4100 handle_omp_array_sections_1.
4101 (c_finish_omp_clauses): Add specific errors and warning messages for
4102 OpenACC. Use firsrtprivate pointers for OpenACC subarrays. Update
4103 call to handle_omp_array_sections.
4104
a04e69c0
TS
41052016-05-24 Thomas Schwinge <thomas@codesourcery.com>
4106
4107 * c-parser.c (c_parser_oacc_routine): Tighten syntax checks.
4108
f17a223d
RB
41092016-05-24 Richard Biener <rguenther@suse.de>
4110
4111 PR middle-end/70434
4112 PR c/69504
4113 * c-typeck.c (build_array_ref): Do not complain about indexing
4114 non-lvalue vectors. Adjust for function name change.
4115
79063edd
MS
41162016-05-20 Martin Sebor <msebor@redhat.com>
4117
4118 PR c/71115
4119 * c-typeck.c (error_init): Use
4120 expansion_point_location_if_in_system_header.
4121 (warning_init): Same.
4122
8a40fef3
DM
41232016-05-19 David Malcolm <dmalcolm@redhat.com>
4124
4125 PR c/71171
4126 * c-parser.c (c_parser_generic_selection): Use c_expr::set_error
4127 in error-handling.
4128 (c_parser_postfix_expression): Likewise.
4129 * c-tree.h (c_expr::set_error): New method.
4130 * c-typeck.c (parser_build_binary_op): In error-handling, ensure
4131 that result's range is initialized.
4132
e9892350
JG
41332016-05-17 James Greenhalgh <james.greenhalgh@arm.com>
4134
4135 * c-typeck.c (parser_build_unary_op): Fix formatting.
4136
8fad45f5
MW
41372016-05-16 Matthew Wahab <matthew.wahab@arm.com>
4138
4139 * c-decl.c (grokdeclarator): Remove errmsg and use of
4140 targetm.invalid_return_type.
4141 (grokparms): Remove errmsg and use of
4142 targetm.invalid_parameter_type.
4143
aa4b467b
JM
41442016-05-13 Joseph Myers <joseph@codesourcery.com>
4145
4146 * c-decl.c (grokdeclarator): For C11, discard qualifiers on
4147 function return type.
4148
4f2e1536
MP
41492016-05-12 Marek Polacek <polacek@redhat.com>
4150
4151 PR c/70756
4152 * c-decl.c (build_compound_literal): Pass LOC down to
4153 c_incomplete_type_error.
4154 * c-tree.h (require_complete_type): Adjust declaration.
4155 (c_incomplete_type_error): Likewise.
4156 * c-typeck.c (require_complete_type): Add location parameter, pass it
4157 down to c_incomplete_type_error.
4158 (c_incomplete_type_error): Add location parameter, pass it down to
4159 error_at.
4160 (build_component_ref): Pass location down to c_incomplete_type_error.
4161 (default_conversion): Pass location down to require_complete_type.
4162 (build_array_ref): Likewise.
4163 (build_function_call_vec): Likewise.
4164 (convert_arguments): Likewise.
4165 (build_unary_op): Likewise.
4166 (build_c_cast): Likewise.
4167 (build_modify_expr): Likewise.
4168 (convert_for_assignment): Likewise.
4169 (c_finish_omp_clauses): Likewise.
4170
d6e83a8d
MM
41712016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
4172
4173 PR c/43651
4174 * c-decl.c (declspecs_add_qual): Warn when -Wduplicate-decl-specifier
4175 is enabled.
4176 * c-errors.c (pedwarn_c90): Return true if warned.
4177 * c-tree.h (pedwarn_c90): Change return type to bool.
4178 (enum c_declspec_word): Add new enumerator cdw_atomic.
4179
5c3a10fb
MP
41802016-05-11 Marek Polacek <polacek@redhat.com>
4181
4182 PR c++/71024
4183 * c-decl.c (diagnose_mismatched_decls): Factor out code to
4184 diagnose_mismatched_attributes and call it.
4185
cf68d92c
MP
41862016-05-10 Marek Polacek <polacek@redhat.com>
4187
4188 PR c/70255
4189 * c-decl.c (diagnose_mismatched_decls): Warn for optimize attribute
4190 on a declaration following the definition.
4191
351f85c5
JJ
41922016-05-05 Jakub Jelinek <jakub@redhat.com>
4193
4194 * c-parser.c (c_parser_switch_statement): Add IF_P argument,
4195 parse it through to c_parser_c99_block_statement.
4196 (c_parser_statement_after_labels): Adjust c_parser_switch_statement
4197 caller.
4198
deef7113
MP
41992016-05-04 Marek Polacek <polacek@redhat.com>
4200
4201 * c-parser.c (c_parser_if_statement): Replace OPT_Wparentheses with
4202 OPT_Wdangling_else.
4203
de55efd5
MP
42042016-05-04 Marek Polacek <polacek@redhat.com>
4205
4206 PR c/48778
4207 * c-typeck.c (build_binary_op): Don't issue -Waddress warnings
4208 for macro expansions.
4209
79ce98bc
MP
42102016-05-03 Marek Polacek <polacek@redhat.com>
4211
4212 PR c/70859
4213 * c-typeck.c (build_function_call_vec): Pass LOC and ARG_LOC down to
4214 check_builtin_function_arguments.
4215
fb2647aa
RB
42162016-05-03 Richard Biener <rguenther@suse.de>
4217
4218 * Make-lang.in (cc1-checksum.c): For stage-final re-use
4219 the checksum from the previous stage.
4220
77886428
CP
42212016-05-02 Cesar Philippidis <cesar@codesourcery.com>
4222
4223 * c-parser.c (c_parser_oacc_all_clauses): Update call to
4224 c_finish_omp_clauses.
4225 (c_parser_omp_all_clauses): Likewise.
4226 (c_parser_oacc_cache): Likewise.
4227 (c_parser_oacc_loop): Likewise.
4228 (omp_split_clauses): Likewise.
4229 (c_parser_omp_declare_target): Likewise.
4230 (c_parser_cilk_all_clauses): Likewise.
4231 (c_parser_cilk_for): Likewise.
4232 * c-typeck.c (c_finish_omp_clauses): Replace bool arguments
4233 is_omp, declare_simd, and is_cilk with enum c_omp_region_type ort.
4234
7176a4a0
MP
42352016-05-02 Marek Polacek <polacek@redhat.com>
4236
4237 PR c/70851
4238 * c-decl.c (grokdeclarator): Diagnose when array's size has an
4239 incomplete type.
4240
e7ff0319
CP
42412016-04-29 Cesar Philippidis <cesar@codesourcery.com>
4242
4243 PR middle-end/70626
4244 * c-parser.c (c_parser_oacc_loop): Don't augment mask with
4245 OACC_LOOP_CLAUSE_MASK.
4246 (c_parser_oacc_kernels_parallel): Update call to
4247 c_oacc_split_loop_clauses.
4248
9f405ce1
AM
42492016-04-28 Andrew MacLeod <amacleod@redhat.com>
4250
4251 * c-array-notation.c (fix_builtin_array_notation_fn): Fix final
4252 argument to build_modify_expr in two cases.
4253
c1e1f433
BS
42542016-04-27 Bernd Schmidt <bschmidt@redhat.com>
4255
4256 * c-parser.c (c_parser_postfix_expression_after_primary): Call
4257 warn_for_memset instead of warning directly here.
4258
2448a956
MP
42592016-04-26 Marek Polacek <polacek@redhat.com>
4260
4261 PR c/67784
4262 * c-parser.c (c_parser_maybe_reclassify_token): New function factored
4263 out of ...
4264 (c_parser_for_statement): ... here.
4265 (c_parser_if_statement): Use it.
4266 (c_parser_switch_statement): Use it.
4267 (c_parser_while_statement): Use it.
4268
b02a5e26
MP
4269 PR c/70791
4270 * c-decl.c (pushdecl): Pass LOCUS down to warning.
4271
477d4906
IV
42722016-04-20 Ilya Verbin <ilya.verbin@intel.com>
4273
4274 PR c++/69363
4275 * c-parser.c (c_parser_cilk_all_clauses): Use c_finish_omp_clauses
4276 instead of c_finish_cilk_clauses.
4277 * c-tree.h (c_finish_omp_clauses): Add new default argument.
4278 * c-typeck.c (c_finish_omp_clauses): Add new argument. Allow
4279 floating-point variables in the linear clause for Cilk Plus.
4280
fe37c7af
MM
42812016-04-18 Michael Matz <matz@suse.de>
4282
4283 * c-decl.c (merge_decls): Use SET_DECL_ALIGN and SET_TYPE_ALIGN.
4284 (grokdeclarator, parser_xref_tag, finish_enum): Use SET_TYPE_ALIGN.
4285
949505a9
MP
42862016-04-15 Marek Polacek <polacek@redhat.com>
4287
4288 PR c/70671
4289 * c-typeck.c (build_unary_op): Pass location down to error and
4290 warning call.
4291
dda1bf61
JJ
42922016-04-15 Jakub Jelinek <jakub@redhat.com>
4293
4294 PR c/70436
4295 * c-parser.c (c_parser_pragma): Add IF_P argument, pass it down
4296 where needed.
4297 (c_parser_external_declaration, c_parser_struct_or_union_specifier,
4298 c_parser_parameter_declaration, c_parser_compound_statement_nostart,
4299 c_parser_objc_class_instance_variables, c_parser_objc_methodprotolist):
4300 Adjust c_parser_pragma callers.
4301 (c_parser_statement_after_labels): Likewise. Adjust c_parser_cilk_for
4302 caller.
4303 (c_parser_omp_structured_block): Add IF_P argument, pass it down to
4304 c_parser_statement.
4305 (c_parser_oacc_data, c_parser_oacc_host_data, c_parser_oacc_loop,
4306 c_parser_oacc_kernels_parallel, c_parser_omp_critical,
4307 c_parser_omp_simd, c_parser_omp_for, c_parser_omp_master,
4308 c_parser_omp_ordered, c_parser_omp_parallel, c_parser_omp_single,
4309 c_parser_omp_task, c_parser_omp_taskgroup, c_parser_omp_distribute,
4310 c_parser_omp_teams, c_parser_omp_target_data, c_parser_omp_target,
4311 c_parser_omp_taskloop, c_parser_omp_construct, c_parser_cilk_grainsize,
4312 c_parser_cilk_simd, c_parser_cilk_for): Add IF_P argument, pass it
4313 down where needed.
4314 (c_parser_omp_for_loop): Likewise. Clear IF_P if nbraces.
4315 (c_parser_omp_sections_scope): Adjust c_parser_omp_structured_block
4316 calls.
4317
99cd9857
MP
43182016-04-13 Marek Polacek <polacek@redhat.com>
4319
4320 PR c/70436
4321 * c-parser.c (c_parser_statement_after_labels): Add IF_P argument and
4322 adjust callers.
4323 (c_parser_statement): Likewise.
4324 (c_parser_c99_block_statement): Likewise.
4325 (c_parser_while_statement): Likewise.
4326 (c_parser_for_statement): Likewise.
4327 (c_parser_if_body): Don't set IF_P here.
4328 (c_parser_if_statement): Add IF_P argument. Set IF_P here. Warn
4329 about dangling else here.
4330 * c-tree.h (c_finish_if_stmt): Adjust declaration.
4331 * c-typeck.c (c_finish_if_stmt): Remove NESTED_IF parameter. Don't
4332 warn about dangling else here.
4333
f13355da
MP
43342016-04-04 Marek Polacek <polacek@redhat.com>
4335
4336 PR c/70307
4337 * c-fold.c (c_fully_fold_internal): Handle VEC_COND_EXPR.
4338
5fde6a45
MP
43392016-03-31 Marek Polacek <polacek@redhat.com>
4340
4341 PR c/70297
4342 * c-decl.c (merge_decls): Also set TYPE_ALIGN and TYPE_USER_ALIGN.
4343
4bbf545b
DM
43442016-03-18 David Malcolm <dmalcolm@redhat.com>
4345
4346 PR c/70281
4347 * c-parser.c (c_parser_postfix_expression): Set the source range
4348 for uses of "__builtin_types_compatible_p".
4349
fcc2b74f
JJ
43502016-03-17 Jakub Jelinek <jakub@redhat.com>
4351
4352 PR c/70280
4353 * c-typeck.c (composite_type): Don't count void_list_node
4354 into len, if the list is terminated by void_list_node, start
4355 with void_list_node instead of NULL for newargs. Stop
4356 at void_list_node.
4357
ab4c578f
MP
43582016-03-16 Marek Polacek <polacek@redhat.com>
4359
4360 PR c/70093
4361 * c-typeck.c (build_function_call_vec): Create a TARGET_EXPR for
4362 nested functions returning VM types.
4363
96b3c82d
CP
43642016-03-09 Cesar Philippidis <cesar@codesourcery.com>
4365
4366 * c-parser.c (c_parser_oacc_loop): Update cclauses and clauses
4367 when calling c_finish_omp_clauses.
4368
29b9828f
BS
43692016-03-04 Bernd Schmidt <bschmidt@redhat.com>
4370
4371 PR c/69824
4372 * c-decl.c (get_parm_info): Don't queue implicit function declarations
4373 for later.
4374
7ff6ca38
MP
43752016-03-04 Marek Polacek <polacek@redhat.com>
4376
4377 PR c/69798
4378 * c-parser.c (c_parser_postfix_expression): Call
4379 c_parser_cast_expression rather than c_parser_postfix_expression.
4380
686e2237
JJ
43812016-03-01 Jakub Jelinek <jakub@redhat.com>
4382
4383 PR c/69796
4384 PR c/69974
4385 * c-parser.c (c_parser_translation_unit): Don't change TREE_TYPE
4386 of incomplete decls to error_mark_node.
4387
0b05329b
MP
43882016-02-24 Marek Polacek <polacek@redhat.com>
4389
4390 PR c/69819
4391 * c-decl.c (finish_decl): Don't update the copy of the type of a
4392 different decl type.
4393
067fbd8b
JJ
43942016-02-23 Jakub Jelinek <jakub@redhat.com>
4395
4396 PR objc/69844
4397 * c-parser.c (c_parser_for_statement): Properly handle ObjC classes
4398 in id_kind reclassification.
4399
bf14eba2
JJ
44002016-02-16 Jakub Jelinek <jakub@redhat.com>
4401
4402 PR c/69835
4403 * c-typeck.c (build_binary_op): Revert 2015-09-09 change.
4404
ba539195
JN
44052016-02-16 James Norris <jnorris@codesourcery.com>
4406
4407 PR c/64748
4408 * c-parser.c (c_parser_oacc_data_clause_deviceptr): Allow parms.
4409
16595a1f
BS
44102016-02-12 Bernd Schmidt <bschmidt@redhat.com>
4411
f48dfe98
BS
4412 * c-decl.c (build_null_declspecs): Zero the entire struct.
4413
16595a1f
BS
4414 PR c/69522
4415 * c-parser.c (c_parser_braced_init): New arg outer_obstack. All
4416 callers changed. If nested_p is true, use it to call
4417 finish_implicit_inits.
4418 * c-tree.h (finish_implicit_inits): Declare.
4419 * c-typeck.c (finish_implicit_inits): New function. Move code
4420 from ...
4421 (push_init_level): ... here.
4422 (set_designator, process_init_element): Call finish_implicit_inits.
4423
66756373
JJ
44242016-02-11 Jakub Jelinek <jakub@redhat.com>
4425
4426 PR c/69768
4427 * c-typeck.c (parser_build_binary_op): Strip nops from integer_zerop
4428 arguments for -Waddress warning.
4429
1066e9b5
JJ
44302016-02-04 Jakub Jelinek <jakub@redhat.com>
4431
4432 PR c/69669
4433 * c-decl.c (finish_enum): When honoring mode attribute,
4434 make sure to use proper TYPE_MIN_VALUE and TYPE_MAX_VALUE.
4435
3a5d2ba4
JJ
44362016-01-29 Jakub Jelinek <jakub@redhat.com>
4437
4438 PR debug/69518
4439 * c-decl.c (finish_struct): Clear C_TYPE_INCOMPLETE_VARS in
4440 all type variants, not just TYPE_MAIN_VARIANT.
4441
cbdd8ae0
JJ
44422016-01-27 Jakub Jelinek <jakub@redhat.com>
4443
4444 PR debug/66869
4445 * c-decl.c (c_write_global_declarations_1): Warn with
4446 warn_unused_function if static prototype without definition
4447 is not C_DECL_USED.
4448
fa74a4bc
MP
44492016-01-27 Marek Polacek <polacek@redhat.com>
4450
4451 PR c/68062
4452 * c-typeck.c (build_binary_op) [EQ_EXPR, GE_EXPR]: Promote operand
4453 to unsigned, if needed. Add -Wsign-compare warning.
4454
13f92e8d
JJ
44552016-01-26 Jakub Jelinek <jakub@redhat.com>
4456
4457 PR tree-optimization/69483
4458 * c-parser.c (c_parser_translation_unit): Use FOR_EACH_VEC_ELT.
4459
cd8e73dc 44602016-01-20 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
d25c7690
PK
4461
4462 PR c/24293
4463 * c-tree.h (incomplete_record_decls): Declare.
4464 * c-parser.c (incomplete_record_decls): Define.
4465 (c_parser_translation_unit): Iterate through incomplete_record_decls and
4466 report error if any decl has zero size.
4467 * c-decl.c (finish_decl): Append static decl with incomplete struct/union
4468 or enum type to incomplete_record_decls.
4469
e6d6ec9e
TV
44702016-01-14 Tom de Vries <tom@codesourcery.com>
4471
4472 PR tree-optimization/68773
4473 * c-parser.c (c_parser_oacc_declare, c_parser_omp_declare_target): Don't
4474 set force_output.
4475
00083992
MP
44762016-01-14 Marek Polacek <polacek@redhat.com>
4477
4478 PR c/69262
4479 * c-decl.c (grokdeclarator): Provide more information for invalid
4480 array declarations.
4481
7443cf13
DM
44822016-01-06 David Malcolm <dmalcolm@redhat.com>
4483
4484 * c-parser.c (c_parser_unary_expression): For dereferences, build
4485 a combined location before calling build_indirect_ref, so that
4486 error reports cover the full range, manually updating the c_expr
4487 src_range.
4488
6b131d5b
MP
44892016-01-06 Marek Polacek <polacek@redhat.com>
4490
4491 PR sanitizer/69099
4492 * c-convert.c (convert) [INTEGER_TYPE]: Drop ARG. Don't pass ARG to
4493 ubsan_instrument_float_cast. Fold EXPR. Use NULL_TREE instead of
4494 NULL.
4495
818ab71a
JJ
44962016-01-04 Jakub Jelinek <jakub@redhat.com>
4497
4498 Update copyright years.
4499
2fe0a208
MP
45002016-01-04 Marek Polacek <polacek@redhat.com>
4501
4502 PR c/68908
4503 * c-typeck.c (build_atomic_assign): Improve commentary. Add
4504 optimization to use __atomic_fetch_* built-in if possible.
4505
c7b48c8a
TS
45062015-12-23 Thomas Schwinge <thomas@codesourcery.com>
4507
4508 * c-parser.c (c_parser_oacc_clause_use_device): Merge function
4509 into...
4510 (c_parser_omp_clause_use_device_ptr): ... this function. Adjust
4511 all users.
4512
fda5652f
MP
45132015-12-22 Marek Polacek <polacek@redhat.com>
4514
4515 PR c/69002
4516 * c-typeck.c (build_component_ref): Warn when acessing elements of
4517 atomic structures or unions.
4518
745e411d
DM
45192015-12-21 David Malcolm <dmalcolm@redhat.com>
4520
4521 * c-typeck.c: Include "gcc-rich-location.h".
4522 (build_binary_op): In the two places that call binary_op_error,
4523 create a gcc_rich_location and populate it with the location of
4524 the binary op and its two operands.
4525
94c40e19
DM
45262015-12-16 David Malcolm <dmalcolm@redhat.com>
4527
4528 * c-parser.c (c_parser_statement_after_labels): When calling
4529 c_finish_return, Use the return expression's location if it has
4530 one, falling back to the location of the first token within it.
4531 * c-typeck.c (c_finish_return): When issuing warnings about
4532 the incorrect presence/absence of a return value, issue a note
4533 showing the declaration of the function.
4534
de67c4c3
DM
45352015-12-16 David Malcolm <dmalcolm@redhat.com>
4536
4537 * c-parser.c (struct c_parser): Expand array "tokens_buf" from 2
4538 to 4.
4539 (c_parser_peek_nth_token): New function.
4540 (c_parser_peek_conflict_marker): New function.
4541 (c_parser_error): Detect conflict markers and report them as such.
4542
a10704e1
DM
45432015-12-16 David Malcolm <dmalcolm@redhat.com>
4544
4545 * c-parser.c (c_parser_postfix_expression): Use EXPR_LOC_OR_LOC
4546 to preserve range information for the primary expression
4547 in the call to c_parser_postfix_expression_after_primary.
4548
8062bca6
DM
45492015-12-16 David Malcolm <dmalcolm@redhat.com>
4550
4551 * c-parser.c (c_parser_static_assert_declaration_no_semi): Use the
4552 expression location, falling back on the first token location,
4553 rather than always using the latter.
4554
d06f8b75
MP
45552015-12-16 Marek Polacek <polacek@redhat.com>
4556
4557 PR c/64637
4558 * c-typeck.c (c_process_expr_stmt): Use location of the expression if
4559 available.
4560
2994fb91
MP
45612015-12-15 Marek Polacek <polacek@redhat.com>
4562
4563 PR c/68907
4564 * c-typeck.c (build_atomic_assign): Set TREE_NO_WARNING on an
4565 artificial decl.
4566
a1b93f8d
DM
45672015-12-08 David Malcolm <dmalcolm@redhat.com>
4568
4569 * c-parser.c (c_parser_alignof_expression): Capture location of
4570 closing parenthesis (if any), or of end of unary expression, and
4571 use it to build a src_range for the expression.
4572
46c6e1e2
DM
45732015-12-08 David Malcolm <dmalcolm@redhat.com>
4574
4575 PR c/68757
4576 * c-parser.c (c_parser_get_builtin_args): Add
4577 "out_close_paren_loc" param, and write back to it.
4578 (c_parser_postfix_expression): Capture the closing
4579 parenthesis location for RID_CHOOSE_EXPR,
4580 RID_BUILTIN_CALL_WITH_STATIC_CHAIN, RID_BUILTIN_COMPLEX,
4581 RID_BUILTIN_SHUFFLE and use it to set the source range
4582 for such expressions; within RID_BUILTIN_COMPLEX set
4583 the underlying location.
4584
66189108
MP
45852015-12-07 Marek Polacek <polacek@redhat.com>
4586
4587 PR c/68668
4588 * c-decl.c (grokdeclarator): If ORIG_QUAL_INDIRECT is indirect, use
4589 TREE_TYPE of ORIG_QUAL_TYPE, otherwise decrement ORIG_QUAL_INDIRECT.
4590
f187980b
EB
45912015-12-04 Eric Botcazou <ebotcazou@adacore.com>
4592
4593 * c-tree.h (c_build_va_arg): Adjust prototype.
4594 * c-parser.c (c_parser_postfix_expression): Adjust call to above.
4595 * c-typeck.c (c_build_va_arg): Rename LOC parameter to LOC2, add LOC1
4596 parameter, adjust throughout and issue an error if EXPR is a component
4597 with reverse storage order.
4598
4250754e
JM
45992015-12-02 Jason Merrill <jason@redhat.com>
4600
4601 * c-fold.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
4602 (c_fully_fold_internal, decl_constant_value_for_optimization):
4603 Move from c-common.c.
4604 * c-tree.h: Declare decl_constant_value_for_optimization.
4605 * Make-lang.in (C_AND_OBJC_OBJS): Add c-fold.o.
4606
e9e32ee6
JM
46072015-12-02 Joseph Myers <joseph@codesourcery.com>
4608
4609 PR c/68162
4610 * c-decl.c (grokdeclarator): Set first_non_attr_kind before
4611 following link from declarator to next declarator. Track original
4612 qualified type and pass it to c_build_qualified_type.
4613 * c-typeck.c (c_build_qualified_type): Add arguments
4614 orig_qual_type and orig_qual_indirect.
4615
ff7a55bf
TS
46162015-12-02 Thomas Schwinge <thomas@codesourcery.com>
4617
4618 * c-parser.c (c_parser_omp_clause_name)
4619 (c_parser_oacc_all_clauses): Alphabetical sorting.
4620
657e4e47
JJ
46212015-12-02 Jakub Jelinek <jakub@redhat.com>
4622
4623 PR c/68533
4624 * c-decl.c (get_parm_info): Use b->locus instead of input_location
4625 for diagnostics.
4626
37d5ad46
JB
46272015-12-01 Julian Brown <julian@codesourcery.com>
4628 Cesar Philippidis <cesar@codesourcery.com>
4629 James Norris <James_Norris@mentor.com>
4630
4631 * c-parser.c (c_parser_omp_clause_name): Add use_device support.
4632 (c_parser_oacc_clause_use_device): New function.
4633 (c_parser_oacc_all_clauses): Add use_device support.
4634 (OACC_HOST_DATA_CLAUSE_MASK): New macro.
4635 (c_parser_oacc_host_data): New function.
4636 (c_parser_omp_construct): Add host_data support.
4637 * c-tree.h (c_finish_oacc_host_data): Add prototype.
4638 * c-typeck.c (c_finish_oacc_host_data): New function.
4639 (c_finish_omp_clauses): Add use_device support.
4640
a4850ce9
JH
46412015-11-29 Jan Hubicka <hubicka@ucw.cz>
4642
4643 PR c/67106
4644 * c-decl.c: Set TYPE_PACKED in variants.
4645
b58d3df2
ML
46462015-11-27 Martin Liska <mliska@suse.cz>
4647
4648 PR c++/68312
4649 * c-array-notation.c (fix_builtin_array_notation_fn):
4650 Use release_vec_vec instead of vec::release.
4651 (build_array_notation_expr): Likewise.
4652 (fix_conditional_array_notations_1): Likewise.
4653 (fix_array_notation_expr): Likewise.
4654 (fix_array_notation_call_expr): Likewise.
4655
aec17bfe
JJ
46562015-11-27 Jakub Jelinek <jakub@redhat.com>
4657
4658 PR c/63326
4659 * c-parser.c (c_parser_compound_statement_nostart): If
4660 last_label is true, use pragma_stmt instead of pragma_compound
4661 as second c_parser_pragma argument.
4662 (c_parser_omp_ordered, c_parser_omp_target_update,
4663 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Pass
4664 false as second argument to c_parser_skip_to_pragma_eol after
4665 diagnosing standalone directives used in pragma_stmt context.
4666
688c4de0
IV
46672015-11-24 Ilya Verbin <ilya.verbin@intel.com>
4668
4669 * c-parser.c (c_parser_oacc_declare): Replace "ifdef ENABLE_OFFLOADING"
4670 with "if (ENABLE_OFFLOADING)".
4671
cbd03aee
DM
46722015-11-23 David Malcolm <dmalcolm@redhat.com>
4673
4674 PR objc/68438
4675 * c-parser.c (c_parser_postfix_expression): Set up source ranges
4676 for various Objective-C constructs: Class.name syntax,
4677 @selector(), @protocol(), @encode(), and [] message syntax.
4678
a87a86e1
DM
46792015-11-20 David Malcolm <dmalcolm@redhat.com>
4680
4681 PR 62314
4682 * c-typeck.c (should_suggest_deref_p): New function.
4683 (build_component_ref): Special-case POINTER_TYPE when
4684 generating a "not a structure of union" error message, and
4685 suggest a "->" rather than a ".", providing a fix-it hint.
4686
8ece8dfb
DM
46872015-11-19 David Malcolm <dmalcolm@redhat.com>
4688
4689 * c-typeck.c (lookup_field_fuzzy): Move determination of closest
4690 candidate into a new function, find_closest_identifier.
4691
433068cc
MP
46922015-11-19 Marek Polacek <polacek@redhat.com>
4693
4694 PR c/68412
4695 * c-typeck.c (parser_build_binary_op): Properly handle
4696 C_MAYBE_CONST_EXPR before calling warn_tautological_cmp.
4697
bef08b71
DM
46982015-11-17 David Malcolm <dmalcolm@redhat.com>
4699
4700 * c-parser.c (set_c_expr_source_range): Bulletproof both
4701 overloaded implementations against NULL expr->value.
4702 (c_parser_braced_init): Set src_range for "ret" to a sane pair of
4703 values.
4704 (c_parser_unary_expression): Likewise when handling addresses of
4705 labels.
4706 (c_parser_postfix_expression): Likewise for statement expressions,
4707 for __FUNCTION__, __PRETTY_FUNCTION_ and __func__ keywords, for
4708 __builtin_va_arg, and for __builtin_offset_of.
4709 (c_parser_postfix_expression_after_paren_type): Initialize expr's
4710 src_range using the range of the braced initializer.
4711 (c_parser_transaction_expression): Set src_range for "ret" to a
4712 sane pair of values.
4713
fff77217
KY
47142015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
4715
4716 * c-parser.c (c_finish_omp_declare_simd): Look for
4717 "simd" attribute as well. Update error message.
4718
1d899da2
TS
47192015-11-14 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
4720
4721 * c-parser.c (c_parser_omp_declare_target): Adjust.
4722
e4606348
JJ
47232015-11-14 Jakub Jelinek <jakub@redhat.com>
4724
4725 * c-typeck.c (c_finish_omp_clauses): Don't mark
4726 GOMP_MAP_FIRSTPRIVATE_POINTER decls addressable.
4727
3e636daf
MP
47282015-11-14 Marek Polacek <polacek@redhat.com>
4729
4730 * c-decl.c: Use RECORD_OR_UNION_TYPE_P throughout.
4731 * c-typeck.c: Likewise.
4732
ebedc9a3
DM
47332015-11-13 David Malcolm <dmalcolm@redhat.com>
4734
4735 * c-decl.c (warn_defaults_to): Pass line_table to
4736 rich_location ctor.
4737 * c-errors.c (pedwarn_c99): Likewise.
4738 (pedwarn_c90): Likewise.
4739 * c-parser.c (set_c_expr_source_range): New functions.
4740 (c_token::get_range): New method.
4741 (c_token::get_finish): New method.
4742 (c_parser_expr_no_commas): Call set_c_expr_source_range on the ret
4743 based on the range from the start of the LHS to the end of the
4744 RHS.
4745 (c_parser_conditional_expression): Likewise, based on the range
4746 from the start of the cond.value to the end of exp2.value.
4747 (c_parser_binary_expression): Call set_c_expr_source_range on
4748 the stack values for TRUTH_ANDIF_EXPR and TRUTH_ORIF_EXPR.
4749 (c_parser_cast_expression): Call set_c_expr_source_range on ret
4750 based on the cast_loc through to the end of the expr.
4751 (c_parser_unary_expression): Likewise, based on the
4752 op_loc through to the end of op.
4753 (c_parser_sizeof_expression) Likewise, based on the start of the
4754 sizeof token through to either the closing paren or the end of
4755 expr.
4756 (c_parser_postfix_expression): Likewise, using the token range,
4757 or from the open paren through to the close paren for
4758 parenthesized expressions.
4759 (c_parser_postfix_expression_after_primary): Likewise, for
4760 various kinds of expression.
4761 * c-tree.h (struct c_expr): Add field "src_range".
4762 (c_expr::get_start): New method.
4763 (c_expr::get_finish): New method.
4764 (set_c_expr_source_range): New decls.
4765 * c-typeck.c (parser_build_unary_op): Call set_c_expr_source_range
4766 on ret for prefix unary ops.
4767 (parser_build_binary_op): Likewise, running from the start of
4768 arg1.value through to the end of arg2.value.
4769
ec8b536f
MP
47702015-11-13 Marek Polacek <polacek@redhat.com>
4771
4772 PR c/68320
4773 * c-parser.c (c_parser_for_statement): Treat unknown tokens as IDs.
4774
277fe616
DM
47752015-11-13 David Malcolm <dmalcolm@redhat.com>
4776
4777 * c-typeck.c: Include spellcheck.h.
4778 (lookup_field_fuzzy_find_candidates): New function.
4779 (lookup_field_fuzzy): New function.
4780 (build_component_ref): If the field was not found, try using
4781 lookup_field_fuzzy and potentially offer a suggestion.
4782
6e232ba4
JN
47832015-11-12 James Norris <jnorris@codesourcery.com>
4784 Joseph Myers <joseph@codesourcery.com>
4785
4786 * c-parser.c (c_parser_pragma): Handle PRAGMA_OACC_DECLARE.
4787 (c_parser_omp_clause_name): Handle 'device_resident' clause.
4788 (c_parser_oacc_data_clause): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
4789 and PRAGMA_OMP_CLAUSE_LINK.
4790 (c_parser_oacc_all_clauses): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
4791 and PRAGMA_OACC_CLAUSE_LINK.
4792 (OACC_DECLARE_CLAUSE_MASK): New definition.
4793 (c_parser_oacc_declare): New function.
4794
9be4f715
MP
47952015-11-12 Marek Polacek <polacek@redhat.com>
4796
4797 PR c/67784
4798 * c-parser.c (c_parser_for_statement): Reclassify the token in
4799 a correct scope.
4800
e78bede6
MP
48012015-11-11 Marek Polacek <polacek@redhat.com>
4802
4803 PR c/68107
4804 PR c++/68266
4805 * c-decl.c (grokdeclarator): Call valid_array_size_p. Remove code
4806 checking the size of an array.
4807
69f293c9
AM
48082015-11-11 Andrew MacLeod <amacleod@redhat.com>
4809
4810 * c-array-notation.c: Remove unused header files.
4811 * c-aux-info.c: Likewise.
4812 * c-convert.c: Likewise.
4813 * c-decl.c: Likewise.
4814 * c-errors.c: Likewise.
4815 * c-lang.c: Likewise.
4816 * c-objc-common.c: Likewise.
4817 * c-parser.c: Likewise.
4818 * c-typeck.c: Likewise.
4819 * gccspec.c: Likewise.
4820
3a40d81d
NS
48212015-11-09 Thomas Schwinge <thomas@codesourcery.com>
4822 Cesar Philippidis <cesar@codesourcery.com>
4823 James Norris <jnorris@codesourcery.com>
4824 Julian Brown <julian@codesourcery.com>
4825 Nathan Sidwell <nathan@codesourcery.com>
4826
3a40d81d
NS
4827 * c-parser.c (c_parser_declaration_or_fndef): Add OpenACC
4828 routine arg.
4829 (c_parser_declaration_or_fndef): Call c_finish_oacc_routine.
4830 (c_parser_pragma): Parse 'acc routine'.
4831 (OACC_ROUTINE_CLAUSE_MARK): Define.
4832 (c_parser_oacc_routine, (c_finish_oacc_routine): New.
4833
fc402eec
AA
48342015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
4835
4836 PR debug/67192
4837 * c-typeck.c (c_finish_loop): For unconditional loops, set the
4838 location of the backward-goto to the start of the loop body.
4839
f6b0b3db
AA
48402015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
4841
4842 PR debug/67192
4843 * c-parser.c (c_parser_while_statement): Finish the loop before
4844 parsing ahead for misleading indentation.
4845 (c_parser_for_statement): Likewise.
4846
ee45a32d
EB
48472015-11-08 Eric Botcazou <ebotcazou@adacore.com>
4848
4849 * c-decl.c (finish_struct): If the structure has reverse storage
4850 order, rewrite the type of array fields with scalar component. Call
4851 maybe_apply_pragma_scalar_storage_order on entry.
4852 * c-typeck.c (build_unary_op) <ADDR_EXPR>: Remove left-overs. Issue
4853 errors on bit-fields and reverse SSO here and not...
4854 (c_mark_addressable): ...here.
4855 (output_init_element): Adjust call to initializer_constant_valid_p.
4856 (c_build_qualified_type): Propagate TYPE_REVERSE_STORAGE_ORDER.
4857
8a645150
DM
48582015-11-06 David Malcolm <dmalcolm@redhat.com>
4859
4860 * c-decl.c (warn_defaults_to): Update for change in signature
4861 of diagnostic_set_info.
4862 * c-errors.c (pedwarn_c99): Likewise.
4863 (pedwarn_c90): Likewise.
4864 * c-objc-common.c (c_tree_printer): Update for new "caret_p" param
4865 for textinfo::set_location.
4866
7a5e4956
CP
48672015-11-05 Cesar Philippidis <cesar@codesourcery.com>
4868 Thomas Schwinge <thomas@codesourcery.com>
4869 James Norris <jnorris@codesourcery.com>
4870
4871 * c-parser.c (c_parser_omp_clause_name): Add support for
4872 PRAGMA_OACC_CLAUSE_INDEPENDENT and PRAGMA_OACC_CLAUSE_TILE.
4873 (c_parser_omp_clause_default): Add is_oacc argument. Handle
4874 default(none) in OpenACC.
4875 (c_parser_oacc_shape_clause): Allow pointer variables as gang static
4876 arguments.
4877 (c_parser_oacc_clause_tile): New function.
4878 (c_parser_oacc_all_clauses): Add support for OMP_CLAUSE_DEFAULT,
4879 OMP_CLAUSE_INDEPENDENT and OMP_CLAUSE_TILE.
4880 (OACC_LOOP_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_{PRIVATE,INDEPENDENT,
4881 TILE}.
4882 (OACC_KERNELS_MASK): Add PRAGMA_OACC_CLAUSE_DEFAULT.
4883 (OACC_PARALLEL_MASK): Add PRAGMA_OACC_CLAUSE_{DEFAULT,PRIVATE,
4884 FIRSTPRIVATE}.
4885 (c_parser_omp_all_clauses): Update call to c_parser_omp_clause_default.
4886 (c_parser_oacc_update): Update the error message for missing clauses.
4887 * c-typeck.c (c_finish_omp_clauses): Add support for OMP_CLAUSE_TILE
4888 and OMP_CLAUSE_INDEPENDENT.
4889
bfcfbfa0
MP
48902015-11-05 Marek Polacek <polacek@redhat.com>
4891
4892 PR c/68090
4893 * c-parser.c (c_parser_postfix_expression_after_paren_type): Don't
4894 deal with pre-evaluation on invalid types.
4895
e01d41e5
JJ
48962015-11-05 Jakub Jelinek <jakub@redhat.com>
4897 Ilya Verbin <ilya.verbin@intel.com>
4898
4899 * c-parser.c: Include context.h and gimple-expr.h.
4900 (c_parser_omp_clause_schedule): Parse schedule modifiers, diagnose
4901 monotonic together with nonmonotonic.
4902 (c_parser_omp_for_loop): Call c_omp_check_loop_iv. Call add_stmt here.
4903 (OMP_DISTRIBUTE_CLAUSE_MASK): Add lastprivate clause.
4904 (c_parser_omp_target_data, c_parser_omp_target_enter_data,
4905 c_parser_omp_target_exit_data): Allow GOMP_MAP_ALWAYS_POINTER.
4906 (c_parser_omp_target): Likewise. Evaluate num_teams and thread_limit
4907 expressions on combined target teams before the target.
4908 (c_parser_omp_declare_target): If decl has "omp declare target" or
4909 "omp declare target link" attribute, and cgraph or varpool node already
4910 exists, then set corresponding flags. Call c_finish_omp_clauses
4911 in the parenthesized extended-list syntax case.
4912 * c-decl.c (c_decl_attributes): Don't diagnose block scope vars inside
4913 declare target.
4914 * c-typeck.c (handle_omp_array_sections_1): Allow non-zero low-bound
4915 on OMP_CLAUSE_REDUCTION array sections.
4916 (handle_omp_array_sections): Encode low-bound into the MEM_REF, either
4917 into the constant offset, or for variable low-bound using
4918 POINTER_PLUS_EXPR. For structure element based array sections use
4919 GOMP_MAP_ALWAYS_POINTER instead of GOMP_MAP_FIRSTPRIVATE_POINTER.
4920 (c_finish_omp_clauses): Drop generic_field_head, structure
4921 elements are now always mapped even as array section bases,
4922 diagnose same var in data sharing and mapping clauses. Diagnose if
4923 linear step on declare simd is neither a constant nor a uniform
4924 parameter. Look through POINTER_PLUS_EXPR for array section
4925 reductions. Diagnose the same var or function appearing multiple
4926 times on the same directive. Fix up wording for the to clause if t
4927 is neither a FUNCTION_DECL nor a VAR_DECL. Diagnose nonmonotonic
4928 modifier on kinds other than dynamic or guided or nonmonotonic
4929 modifier together with ordered clause.
4930
4bf9e5a8
TS
49312015-11-03 Thomas Schwinge <thomas@codesourcery.com>
4932 Chung-Lin Tang <cltang@codesourcery.com>
4933
4934 * c-parser.c (c_parser_omp_construct): Handle PRAGMA_OACC_ATOMIC.
4935
2adfab87
AM
49362015-10-29 Andrew MacLeod <amacleod@redhat.com>
4937
4938 * c-array-notation.c: Reorder #include's and remove duplicates.
4939 * c-aux-info.c: Likewise.
4940 * c-convert.c: Likewise.
4941 * c-decl.c: Likewise.
4942 * c-errors.c: Likewise.
4943 * c-lang.c: Likewise.
4944 * c-objc-common.c: Likewise.
4945 * c-parser.c: Likewise.
4946 * c-typeck.c: Likewise.
4947
e922069e
JW
49482015-10-26 Jim Wilson <jim.wilson@linaro.org>
4949
4950 PR debug/66068
4951 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
4952 after calling build_qualified_type.
4953
765dd391
CP
49542015-10-27 Cesar Philippidis <cesar@codesourcery.com>
4955 Thomas Schwinge <thomas@codesourcery.com>
4956 James Norris <jnorris@codesourcery.com>
4957 Joseph Myers <joseph@codesourcery.com>
4958 Julian Brown <julian@codesourcery.com>
4959 Bernd Schmidt <bschmidt@redhat.com>
4960
4961 * c-parser.c (c_parser_oacc_shape_clause): New.
4962 (c_parser_oacc_simple_clause): New.
4963 (c_parser_oacc_all_clauses): Add auto, gang, seq, vector, worker.
4964 (OACC_LOOP_CLAUSE_MASK): Add gang, worker, vector, auto, seq.
4965
88bae6f4
TS
49662015-10-27 Thomas Schwinge <thomas@codesourcery.com>
4967 James Norris <jnorris@codesourcery.com>
4968 Cesar Philippidis <cesar@codesourcery.com>
4969
4970 PR c/64765
4971 PR c/64880
4972 * c-parser.c (c_parser_oacc_loop): Add mask, cclauses formal
4973 parameters, and handle these. Adjust all users.
4974 (c_parser_oacc_kernels, c_parser_oacc_parallel): Merge functions
4975 into...
4976 (c_parser_oacc_kernels_parallel): ... this new function. Adjust
4977 all users.
4978 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels): Don't
4979 declare functions.
4980 (c_finish_omp_construct): Declare function.
4981 * c-typeck.c (c_finish_oacc_parallel, c_finish_oacc_kernels):
4982 Merge functions into...
4983 (c_finish_omp_construct): ... this new function.
4984
a8fc2579
RB
49852015-10-22 Richard Biener <rguenther@suse.de>
4986
4987 * c-typeck.c (c_finish_omp_clauses): Properly convert operands
4988 before folding a MINUS_EXPR.
4989
e9122ef6
MP
49902015-10-21 Marek Polacek <polacek@redhat.com>
4991
4992 PR c/68024
4993 * c-decl.c (start_function): Warn about vararg functions without
4994 a prototype.
4995
9f47c7e5
IE
49962015-10-21 Ilya Enkovich <enkovich.gnu@gmail.com>
4997
4998 * c-typeck.c (build_conditional_expr): Use boolean vector
4999 type for vector comparison.
5000 (build_vec_cmp): New.
5001 (build_binary_op): Use build_vec_cmp for comparison.
5002
fa60eeb9
MP
50032015-10-20 Marek Polacek <polacek@redhat.com>
5004
5005 * c-parser.c (is_cilkplus_vector_p): Don't define here.
5006
2c7020eb
MP
50072015-10-20 Marek Polacek <polacek@redhat.com>
5008
5009 PR c/67964
5010 * c-parser.c (c_parser_attributes): Break out of the loop if the
5011 token after an attribute isn't a comma.
5012
d9a6bd32
JJ
50132015-10-13 Jakub Jelinek <jakub@redhat.com>
5014 Aldy Hernandez <aldyh@redhat.com>
5015
5016 * c-parser.c (c_parser_pragma): Handle PRAGMA_OMP_ORDERED here.
5017 (c_parser_omp_clause_name): Handle OpenMP 4.5 clauses.
5018 (c_parser_omp_variable_list): Handle structure elements for
5019 map, to and from clauses. Handle array sections in reduction
5020 clause. Formatting fixes.
5021 (c_parser_omp_clause_if): Add IS_OMP argument, handle parsing of
5022 if clause modifiers.
5023 (c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
5024 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
5025 c_parser_omp_clause_defaultmap, c_parser_omp_clause_use_device_ptr,
5026 c_parser_omp_clause_is_device_ptr): New functions.
5027 (c_parser_omp_clause_ordered): Parse optional parameter.
5028 (c_parser_omp_clause_reduction): Handle array reductions.
5029 (c_parser_omp_clause_schedule): Parse optional simd modifier.
5030 (c_parser_omp_clause_nogroup, c_parser_omp_clause_orderedkind): New
5031 functions.
5032 (c_parser_omp_clause_linear): Parse linear clause modifiers.
5033 (c_parser_omp_clause_depend_sink): New function.
5034 (c_parser_omp_clause_depend): Parse source/sink depend kinds.
5035 (c_parser_omp_clause_map): Parse release/delete map kinds and
5036 optional always modifier.
5037 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_if
5038 and c_finish_omp_clauses callers.
5039 (c_parser_omp_all_clauses): Likewise. Parse OpenMP 4.5 clauses.
5040 Parse "to" as OMP_CLAUSE_TO_DECLARE if on declare target directive.
5041 (c_parser_oacc_cache): Adjust c_finish_omp_clauses caller.
5042 (OMP_CRITICAL_CLAUSE_MASK): Define.
5043 (c_parser_omp_critical): Parse critical clauses.
5044 (c_parser_omp_for_loop): Handle doacross loops, adjust
5045 c_finish_omp_for and c_finish_omp_clauses callers.
5046 (OMP_SIMD_CLAUSE_MASK): Add simdlen clause.
5047 (c_parser_omp_simd): Allow ordered clause if it has no parameter.
5048 (OMP_FOR_CLAUSE_MASK): Add linear clause.
5049 (c_parser_omp_for): Disallow ordered clause when combined with
5050 distribute. Disallow linear clause when combined with distribute
5051 and not combined with simd.
5052 (OMP_ORDERED_CLAUSE_MASK, OMP_ORDERED_DEPEND_CLAUSE_MASK): Define.
5053 (c_parser_omp_ordered): Add CONTEXT argument, remove LOC argument,
5054 parse clauses and if depend clause is found, don't parse a body.
5055 (c_parser_omp_parallel): Disallow copyin clause on target parallel.
5056 Allow target parallel without for after it.
5057 (OMP_TASK_CLAUSE_MASK): Add priority clause.
5058 (OMP_TARGET_DATA_CLAUSE_MASK): Add use_device_ptr clause.
5059 (c_parser_omp_target_data): Diagnose no map clauses or clauses with
5060 invalid kinds.
5061 (OMP_TARGET_UPDATE_CLAUSE_MASK): Add depend and nowait clauses.
5062 (OMP_TARGET_ENTER_DATA_CLAUSE_MASK,
5063 OMP_TARGET_EXIT_DATA_CLAUSE_MASK): Define.
5064 (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): New
5065 functions.
5066 (OMP_TARGET_CLAUSE_MASK): Add depend, nowait, private, firstprivate,
5067 defaultmap and is_device_ptr clauses.
5068 (c_parser_omp_target): Parse target parallel and target simd. Set
5069 OMP_TARGET_COMBINED on combined constructs. Parse target enter data
5070 and target exit data. Diagnose invalid map kinds.
5071 (OMP_DECLARE_TARGET_CLAUSE_MASK): Define.
5072 (c_parser_omp_declare_target): Parse OpenMP 4.5 forms of this
5073 construct.
5074 (c_parser_omp_declare_reduction): Use STRIP_NOPS when checking for
5075 &omp_priv.
5076 (OMP_TASKLOOP_CLAUSE_MASK): Define.
5077 (c_parser_omp_taskloop): New function.
5078 (c_parser_omp_construct): Don't handle PRAGMA_OMP_ORDERED here,
5079 handle PRAGMA_OMP_TASKLOOP.
5080 (c_parser_cilk_for): Adjust c_finish_omp_clauses callers.
5081 * c-tree.h (c_finish_omp_clauses): Add two new arguments.
5082 * c-typeck.c (handle_omp_array_sections_1): Fix comment typo.
5083 Add IS_OMP argument, handle structure element bases, diagnose
5084 bitfields, pass IS_OMP recursively, diagnose known zero length
5085 array sections in depend clauses, handle array sections in reduction
5086 clause, diagnose negative length even for pointers.
5087 (handle_omp_array_sections): Add IS_OMP argument, use auto_vec for
5088 types, pass IS_OMP down to handle_omp_array_sections_1, handle
5089 array sections in reduction clause, set
5090 OMP_CLAUSE_MAP_MAYBE_ZERO_LENGTH_ARRAY_SECTION if map could be zero
5091 length array section, use GOMP_MAP_FIRSTPRIVATE_POINTER for IS_OMP.
5092 (c_finish_omp_clauses): Add IS_OMP and DECLARE_SIMD arguments.
5093 Handle new OpenMP 4.5 clauses and new restrictions for the old ones.
5094
21ba0cea
MP
50952015-10-06 Marek Polacek <polacek@redhat.com>
5096
5097 * c-parser.c (c_parser_statement_after_labels): Use
5098 protected_set_expr_location.
5099 (c_parser_omp_clause_num_gangs): Likewise.
5100 (c_parser_omp_clause_num_threads): Likewise.
5101 (c_parser_omp_clause_num_workers): Likewise.
5102 (c_parser_omp_clause_vector_length): Likewise.
5103 (c_parser_omp_clause_num_teams): Likewise.
5104 (c_parser_omp_clause_thread_limit): Likewise.
5105 * c-typeck.c (build_c_cast): Likewise.
5106 (c_cast_expr): Likewise.
5107
624d31fe
RS
51082015-10-05 Richard Sandiford <richard.sandiford@arm.com>
5109
5110 * c-typeck.c (c_tree_equal): Use real_equal instead of
5111 REAL_VALUES_EQUAL.
5112
b8fd7909
JM
51132015-10-04 Jason Merrill <jason@redhat.com>
5114
5115 * c-parser.c (c_lex_one_token): Handle @synchronized.
5116 * c-decl.c (match_builtin_function_types): A declaration of a built-in
5117 can change whether the function is transaction_safe.
5118
1c7485af
MP
51192015-10-02 Marek Polacek <polacek@redhat.com>
5120
5121 PR c/67730
5122 * c-typeck.c (convert_for_assignment): Use the expansion point
5123 location throughout.
5124
3e3b8d63
MP
51252015-10-02 Marek Polacek <polacek@redhat.com>
5126
5127 PR c/64249
5128 * c-parser.c (c_parser_statement_after_labels): Add CHAIN parameter
5129 and pass it down to c_parser_if_statement.
5130 (c_parser_else_body): Add CHAIN parameter and pass it down to
5131 c_parser_statement_after_labels.
5132 (c_parser_if_statement): Add CHAIN parameter. Add code to warn about
5133 duplicated if-else-if conditions.
5134
aabef2de
MP
51352015-10-01 Marek Polacek <polacek@redhat.com>
5136
5137 * c-typeck.c (convert_for_assignment): Improve commentary.
5138
de8ddd5f
MP
51392015-09-30 Marek Polacek <polacek@redhat.com>
5140
5141 PR c/67730
5142 * c-typeck.c (c_finish_return): Use the expansion point location for
5143 certain "return with value" warnings.
5144
c4914de6
MLI
51452015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
5146
5147 * c-parser.c (pragma_lex): Add loc argument.
5148
0e36f5c7
MP
51492015-09-15 Marek Polacek <polacek@redhat.com>
5150
5151 PR c/67580
5152 * c-decl.c (tag_exists_p): New function.
5153 * c-parser.c (c_parser_declaration_or_fndef): Give a hint when
5154 struct/union/enum keywords are missing.
5155 * c-tree.h (tag_exists_p): Declare.
5156
2f3bb934
MP
51572015-09-15 Marek Polacek <polacek@redhat.com>
5158
5159 * c-decl.c (lookup_label): Return NULL_TREE instead of 0.
5160 (lookup_tag): Change the type of THISLEVEL_ONLY to bool.
5161 Return NULL_TREE instead of 0.
5162 (lookup_name): Return NULL_TREE instead of 0.
5163 (lookup_name_in_scope): Likewise.
5164 (shadow_tag_warned): Use true instead of 1 and NULL_TREE instead of 0.
5165 (parser_xref_tag): Use false instead of 0.
5166 (start_struct): Use true instead of 1.
5167 (start_enum): Use true instead of 1 and NULL_TREE instead of 0.
5168
aa256c4a
MP
51692015-09-14 Marek Polacek <polacek@redhat.com>
5170
5171 * c-typeck.c (set_nonincremental_init_from_string): Use
5172 HOST_WIDE_INT_M1U when shifting a negative value.
5173
dbb68221
MW
51742015-09-09 Mark Wielaard <mjw@redhat.com>
5175
5176 * c-typeck.c (build_binary_op): Check and warn when nonnull arg
5177 parm against NULL.
5178
a8a098ac
JJ
51792015-09-10 Jakub Jelinek <jakub@redhat.com>
5180
5181 PR c/67502
5182 * c-parser.c (c_parser_omp_for_loop): Emit DECL_EXPR stmts
5183 into OMP_FOR_PRE_BODY rather than before the loop.
5184
f4b189d5
JJ
51852015-09-09 Jakub Jelinek <jakub@redhat.com>
5186
0bb99c11
JJ
5187 PR c/67501
5188 * c-parser.c (c_parser_oacc_all_clauses,
5189 c_parser_omp_all_clauses): Remove invalid clause from
5190 list of clauses even if parser->error is set.
5191
fce5e5e3
JJ
5192 PR c/67500
5193 * c-parser.c (c_parser_omp_clause_aligned,
5194 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen): Fix up
5195 test for errors.
5196 * c-decl.c (temp_pop_parm_decls): Allow b->decl equal to
5197 error_mark_node.
5198
f4b189d5
JJ
5199 PR c/67495
5200 * c-parser.c (c_parser_omp_atomic): Use c_parser_cast_expression
5201 instead of c_parser_unary_expression. If the result is !lvalue_p,
5202 wrap the result of c_fully_fold into NON_LVALUE_EXPR.
5203
b2aaf235
MP
52042015-09-04 Marek Polacek <polacek@redhat.com>
5205
5206 PR sanitizer/67279
5207 * c-typeck.c (build_binary_op): Don't instrument static initializers.
5208
1807ffc1
MS
52092015-09-03 Martin Sebor <msebor@redhat.com>
5210
5211 PR c/66516
8b652e65
JJ
5212 * c-typeck.c (convert_arguments, parser_build_unary_op,
5213 build_conditional_expr, c_cast_expr, convert_for_assignment,
5214 build_binary_op, _objc_common_truthvalue_conversion): Call
1807ffc1
MS
5215 reject_gcc_builtin.
5216 (c_decl_implicit): Define.
5217
d04ff417
MP
52182015-09-02 Marek Polacek <polacek@redhat.com>
5219
5220 PR c/67432
5221 * c-parser.c (c_parser_enum_specifier): Give a better error for
5222 an empty enum.
5223
a79683d5
TS
52242015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
5225
5226 * c-aux-info.c, c-parser.c, c-tree.h: Remove useless typedefs.
5227
191a6b94
MP
52282015-08-12 Marek Polacek <polacek@redhat.com>
5229
5230 * c-decl.c (grokdeclarator): Call error_at instead of error and pass
5231 LOC to it.
5232
420a9d9b
MP
52332015-08-03 Marek Polacek <polacek@redhat.com>
5234
5235 PR c/67088
5236 * c-decl.c (check_bitfield_type_and_width): Add location parameter.
5237 Use it.
5238 (grokdeclarator): Pass LOC down to check_bitfield_type_and_width.
5239
992118a1
PP
52402015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
5241
5242 * c-parser.c (c_parser_if_body): Take token_indent_info
5243 argument. Call warn_for_misleading_indentation even when the
5244 body is a semicolon. Extract token_indent_infos corresponding
5245 to the guard, body and next tokens. Adjust call to
5246 warn_for_misleading_indentation accordingly.
5247 (c_parser_else_body): Likewise.
5248 (c_parser_if_statement): Likewise.
5249 (c_parser_while_statement): Likewise.
5250 (c_parser_for_statement): Likewise.
5251
46308474
LFSM
52522015-07-28 Luis Felipe Strano Moraes <luis.strano@gmail.com>
5253 Manuel López-Ibáñez <manu@gcc.gnu.org>
5254
5255 * c-decl.c (get_parm_info): Remove static var. Update warning
5256 message.
5257
05b28fd6
MP
52582015-07-27 Marek Polacek <polacek@redhat.com>
5259
5260 PR c++/66555
5261 PR c/54979
5262 * c-typeck.c (parser_build_binary_op): Call warn_tautological_cmp.
5263
451b5e48
MP
52642015-07-20 Marek Polacek <polacek@redhat.com>
5265
5266 PR c++/55095
5267 * c-typeck.c (digest_init): Pass OPT_Wpedantic to pedwarn_init.
5268 (build_binary_op): Warn about left shift overflows.
5269
1916bcb5
AM
52702015-07-09 Andrew MacLeod <amacleod@redhat.com>
5271
5272 * c-array-notation.c: Adjust includes for flags.h changes.
5273 * c-objc-common.c: Likewise.
5274
c7131fb2
AM
52752015-07-07 Andrew MacLeod <amacleod@redhat.com>
5276
5277 * c-array-notation.c: Adjust includes.
5278 * c-aux-info.c: Likewise.
5279 * c-convert.c: Likewise.
5280 * c-decl.c: Likewise.
5281 * c-errors.c: Likewise.
5282 * c-lang.c: Likewise.
5283 * c-objc-common.c: Likewise.
5284 * c-parser.c: Likewise.
5285 * c-typeck.c: Likewise.
5286
da2e71c9
MLI
52872015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
5288
5289 PR fortran/66605
5290 * c-decl.c (finish_function): Call do_warn_unused_parameter.
5291
b155cfd9
MP
52922015-06-29 Marek Polacek <polacek@redhat.com>
5293
5294 PR c/66322
5295 * c-typeck.c (struct c_switch): Add BOOL_COND_P and OUTSIDE_RANGE_P.
5296 (c_start_case): Set BOOL_COND_P and OUTSIDE_RANGE_P. Don't warn
5297 about -Wswitch-bool here.
5298 (do_case): Update c_add_case_label call.
5299 (c_finish_case): Update c_do_switch_warnings call.
5300
31521951
MP
53012015-06-27 Marek Polacek <polacek@redhat.com>
5302
5303 * c-typeck.c: Use VECTOR_TYPE_P throughout.
5304
22d03525
MP
53052015-06-26 Marek Polacek <polacek@redhat.com>
5306
5307 * c-array-notation.c (fix_builtin_array_notation_fn): Use
5308 INDIRECT_REF_P.
5309 * c-typeck.c (array_to_pointer_conversion): Likewise.
5310 (build_unary_op): Likewise.
5311 (c_finish_return): Likewise.
5312
f0889939
AM
53132015-06-25 Andrew MacLeod <amacleod@redhat.com>
5314
5315 * c-decl.c: Remove ipa-ref.h and plugin-api.h from include list.
5316 * c-parser.c: Likewise.
5317
8d67ee55
RS
53182015-06-25 Richard Sandiford <richard.sandiford@arm.com>
5319
5320 * c-decl.c (detect_field_duplicates_hash): Use nofree_ptr_hash
5321 instead of pointer_hash.
5322 (detect_field_duplicates): Likewise.
5323
0ae9bd27
MP
53242015-06-25 Marek Polacek <polacek@redhat.com>
5325
5326 * c-array-notation.c: Use VAR_P throughout.
5327 * c-decl.c: Likewise.
5328 * c-objc-common.c: Likewise.
5329 * c-parser.c: Likewise.
5330 * c-typeck.c: Likewise.
5331
62f9079a
MP
53322015-06-25 Marek Polacek <polacek@redhat.com>
5333
5334 * c-decl.c: Use is_global_var throughout.
5335 * c-parser.c: Likewise.
5336 * c-typeck.c: Likewise.
5337
abb226c9
AM
53382015-06-17 Andrew MacLeod <amacleod@redhat.com>
5339
5340 * c-array-notation.c: Do not include input.h, line-map.h or is-a.h.
5341 * c-aux-info.c: Likewise.
5342 * c-convert.c: Likewise.
5343 * c-decl.c: Likewise.
5344 * c-errors.c: Likewise.
5345 * c-lang.c: Likewise.
5346 * c-objc-common.c: Likewise.
5347 * c-parser.c: Likewise.
5348 * c-typeck.c: Likewise.
5349
8cbababc
JH
53502015-06-11 Jan Hubicka <hubicka@ucw.cz>
5351
5352 PR middle-end/66325
5353 * c-decl.c (start_enum): Set TYPE_PACKED consistently among type
5354 variants.
5355
a0349665
PMR
53562015-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
5357
5358 * c-decl.c (pop_scope): Register the main translation unit
5359 through the new debug hook.
5360
13fdf2e2
AM
53612015-06-08 Andrew MacLeod <amacleod@redhat.com>
5362
5363 * c-array-notation.c : Adjust include files.
5364 * c-aux-info.c : Likewise.
5365 * c-convert.c : Likewise.
5366 * c-decl.c : Likewise.
5367 * c-errors.c : Likewise.
5368 * c-lang.c : Likewise.
5369 * c-lang.h : Likewise.
5370 * c-objc-common.c : Likewise.
5371 * c-parser.c : Likewise.
5372 * c-typeck.c : Likewise.
5373
d7438551
AH
53742015-06-05 Aldy Hernandez <aldyh@redhat.com>
5375
5376 * c-decl.c (finish_struct): Save C_TYPE_INCOMPLETE_VARS and
5377 immediately clobber it.
5378 (c_write_global_declarations_1): Remove call to
5379 check_global_declaration_1.
5380 (c_write_global_declarations_2): Remove.
5381 (c_write_final_cleanups): Rename from c_write_global_declarations.
5382 Remove call to finalize_compilation_unit.
5383 Remove calls to debugging hooks.
5384 * c-objc-common.c: Adjust comment for c_warn_unused_global_decl.
5385 * c-objc-common.h: Remove LANG_HOOKS_WRITE_GLOBALS.
5386 * c-tree.h: Remove c_write_global_declarations.
5387
ecb9f223
AM
53882015-06-04 Andrew MacLeod <amacleod@redhat.com>
5389
5390 * c-array-notation.c: Adjust includes for restructured coretypes.h.
5391 * c-aux-info.c: Likewise.
5392 * c-convert.c: Likewise.
5393 * c-decl.c: Likewise.
5394 * c-errors.c: Likewise.
5395 * c-lang.c: Likewise.
5396 * c-objc-common.c: Likewise.
5397 * c-parser.c: Likewise.
5398 * c-typeck.c: Likewise.
5399
9482b620
MP
54002015-06-04 Marek Polacek <polacek@redhat.com>
5401
5402 PR c/66341
5403 * c-typeck.c (build_c_cast): Wrap VALUE into NON_LVALUE_EXPR if
5404 it is a lvalue.
5405
bc51ace3
PK
54062015-06-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
5407
5408 * c-decl.c (warn_cxx_compat_finish_struct): New parameters code, record_loc.
5409 Warn for empty struct.
5410 (finish_struct): Pass TREE_CODE(t) and loc to warn_cxx_compat_finish_struct.
5411
ea5b45b6
AT
54122015-06-02 Andres Tiraboschi <andres.tiraboschi@tallertechnologies.com>
5413
5414 * c-decl.c (start_function): Call plugin before parsing.
5415 (finish_function): Call plugin after parsing.
5416
c2d47482
PK
54172015-06-02 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
5418
5419 PR c/49551
5420 * c-decl.c (merge_decls): Merge DECL_COMMON.
5421
a95492ab
JW
54222015-05-22 Jim Wilson <jim.wilson@linaro.org>
5423
5424 * Make-lang.in (check_gcc_pallelize): Define.
5425
fd5c817a
MP
54262015-05-22 Marek Polacek <polacek@redhat.com>
5427
5428 PR c/47043
5429 * c-parser.c (c_parser_enum_specifier): Parse and apply enumerator
5430 attributes.
5431
c7b70a3c
MP
54322015-05-21 Marek Polacek <polacek@redhat.com>
5433
5434 * c-typeck.c (inform_declaration): Use DECL_IS_BUILTIN instead of
5435 DECL_BUILT_IN.
5436
21b634ae
MP
54372015-05-20 Marek Polacek <polacek@redhat.com>
5438
5439 * c-decl.c: Use VAR_OR_FUNCTION_DECL_P throughout.
5440 * c-typeck.c: Likewise.
5441
296a8c2f
MP
54422015-05-19 Marek Polacek <polacek@redhat.com>
5443
5444 * c-typeck.c (start_init): Use AGGREGATE_TYPE_P.
5445
41b37d5e
JJ
54462015-05-19 Jakub Jelinek <jakub@redhat.com>
5447
5448 PR middle-end/66199
5449 * c-parser.c (c_parser_omp_for_loop): Don't add
5450 OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
5451 OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
5452 (c_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
5453 constructs.
5454
fab27f52
MM
54552015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
5456
5457 * c-typeck.c (build_array_ref): Use std::swap instead of explicit
296a8c2f 5458 swaps.
fab27f52 5459
40de31cf
MLI
54602015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
5461
5462 PR fortran/44054
5463 * c-objc-common.c (c_tree_printer): Replace locus pointer with
5464 accessor function.
5465
3aa3c9fc
MP
54662015-05-14 Marek Polacek <polacek@redhat.com>
5467
5468 PR c/66066
5469 PR c/66127
5470 * c-typeck.c (digest_init): Call pedwarn_init with OPT_Wpedantic
5471 rather than with 0.
5472
c3388e62
DM
54732015-05-12 David Malcolm <dmalcolm@redhat.com>
5474
5475 * c-parser.c (c_parser_if_body): Add param "if_loc", use it
5476 to add a call to warn_for_misleading_indentation.
5477 (c_parser_else_body): Likewise, adding param "else_loc".
5478 (c_parser_if_statement): Check for misleading indentation.
5479 (c_parser_while_statement): Likewise.
5480 (c_parser_for_statement): Likewise.
5481
755e528f
MP
54822015-05-08 Marek Polacek <polacek@redhat.com>
5483
5484 PR c/64918
5485 * c-typeck.c (add_pending_init): Use OPT_Woverride_init_side_effects.
5486 (output_init_element): Likewise.
5487
0173bd2a
MP
54882015-05-07 Marek Polacek <polacek@redhat.com>
5489
5490 PR c/65179
5491 * c-typeck.c (build_binary_op): Warn when left shifting a negative
5492 value.
5493
9babc352
MP
54942015-04-30 Marek Polacek <polacek@redhat.com>
5495
5496 * c-typeck.c (set_init_label): Call error_at instead of error and
5497 pass LOC to it.
5498
ac9f18db
MP
5499 * c-typeck.c (c_incomplete_type_error): Refactor to use %qT. Print
5500 the type of a decl.
5501
ec3fba51
MP
5502 * c-typeck.c (c_build_va_arg): Clarify the error message.
5503
b811915d
TS
55042015-04-29 Thomas Schwinge <thomas@codesourcery.com>
5505
5506 * c-parser.c (c_parser_oacc_enter_exit_data): Use
5507 OMP_STANDALONE_CLAUSES.
5508
f3075008
MP
55092015-04-28 Marek Polacek <polacek@redhat.com>
5510
5511 * c-parser.c (c_parser_binary_expression): Remove duplicate line.
5512
4e81b788
MP
55132015-04-28 Marek Polacek <polacek@redhat.com>
5514
5515 PR c/65901
5516 * c-typeck.c (c_build_va_arg): Require TYPE be a complete type.
5517
6c1db78e
MP
55182015-04-25 Marek Polacek <polacek@redhat.com>
5519
5520 PR c/52085
5521 * c-decl.c (finish_enum): Copy over TYPE_ALIGN. Also check for "mode"
5522 attribute.
5523
5c4abbb8
MP
55242015-04-23 Marek Polacek <polacek@redhat.com>
5525
5526 PR c/65345
5527 * c-decl.c (set_labels_context_r): New function.
5528 (store_parm_decls): Call it via walk_tree_without_duplicates.
5529 * c-typeck.c (convert_lvalue_to_rvalue): Use create_tmp_var_raw
5530 instead of create_tmp_var. Build TARGET_EXPR instead of
5531 COMPOUND_EXPR.
5532 (build_atomic_assign): Use create_tmp_var_raw instead of
5533 create_tmp_var. Build TARGET_EXPRs instead of MODIFY_EXPR.
5534
06aca1d5
IV
55352015-04-20 Ilya Verbin <ilya.verbin@intel.com>
5536
5537 * c-parser.c (c_parser_oacc_enter_exit_data): Remove excess semicolon.
5538 (c_parser_omp_target_update): Add missed %> to error_at ().
5539
8fba1830
BRF
55402015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
5541
5542 PR target/55143
5543 * c-decl.c (c_default_pointer_mode): Remove definition.
5544 * c-tree.h (c_default_pointer_mode): Remove declaration.
5545
62021f64
TB
55462015-03-27 Tobias Burnus <burnus@net-b.de>
5547
5548 PR c/65586
5549 * c-parser.c (c_parser_skip_to_pragma_eol): Optionally, don't
5550 error out.
5551 (c_parser_omp_for, c_parser_omp_parallel, c_parser_omp_distribute,
5552 c_parser_omp_teams, c_parser_omp_target, c_parser_omp_declare):
5553 Update calls to not error for skipped omp pragmas with -fopenmp-simd.
5554
9b65e171
JJ
55552015-03-19 Jakub Jelinek <jakub@redhat.com>
5556
5557 * c-decl.c (c_decl_attributes): Also add "omp declare target"
5558 attribute for DECL_EXTERNAL VAR_DECLs.
5559
17958621
JJ
55602015-03-11 Jakub Jelinek <jakub@redhat.com>
5561
5562 * c-parser.c (c_parse_init): Don't call xstrdup on get_identifier
5563 argument.
5564
7ccb1a11
JJ
55652015-03-10 Jakub Jelinek <jakub@redhat.com>
5566
5567 PR c/65120
5568 * c-typeck.c (parser_build_binary_op): Check for tcc_comparison
5569 before preparing arguments to warn_logical_not_parentheses.
5570
01177669
JJ
55712015-03-09 Jakub Jelinek <jakub@redhat.com>
5572
5573 PR c/65120
5574 * c-typeck.c (parser_build_binary_op): Don't warn for
5575 !!x == y or !b == y where b is _Bool.
5576
802ac282
MP
55772015-03-09 Marek Polacek <polacek@redhat.com>
5578
5579 * c-convert.c (convert): Make use of do_ubsan_in_current_function.
5580 * c-decl.c (grokdeclarator): Likewise.
5581 * c-typeck.c (build_binary_op): Likewise.
5582
e5165b60
MP
55832015-02-27 Marek Polacek <polacek@redhat.com>
5584
5585 PR c/65228
5586 * c-decl.c (start_decl): Return NULL_TREE if decl is an error node.
5587
065d214c
MP
55882015-02-14 Marek Polacek <polacek@redhat.com>
5589
5590 PR c/64768
5591 * c-decl.c (grokdeclarator): Set the range of a flexible array member
5592 declared through a typedef name.
5593
e5d9235b
MP
55942015-02-13 Marek Polacek <polacek@redhat.com>
5595
5596 PR c/65050
5597 * c-decl.c (grokdeclarator): Print also the type when giving
5598 the error message about array's incomplete element type.
5599
fa01ffcc
JJ
56002015-02-11 Jakub Jelinek <jakub@redhat.com>
5601
5602 PR c/64824
5603 * c-parser.c (c_parser_binary_expression): Fix OpenMP stack[sp].prec
5604 check in the POP macro.
5605
c3e38a03
MP
56062015-02-09 Marek Polacek <polacek@redhat.com>
5607
5608 PR c/64856
5609 * c-typeck.c (process_init_element): Don't always wrap
5610 COMPOUND_LITERAL_EXPR in a SAVE_EXPR in C99 mode when
5611 initializing a range of elements.
5612
4886ec8e
JJ
56132015-02-04 Jakub Jelinek <jakub@redhat.com>
5614
5615 PR c/64824
5616 PR c/64868
5617 * c-parser.c (c_parser_omp_atomic): Handle RDIV_EXPR.
5618
c3e38a03 56192015-02-02 Bruno Loff <bruno.loff@gmail.com>
a4bb6959
BL
5620
5621 * c-parser.c (c_parser_declspecs): Call invoke_plugin_callbacks after
5622 processing enum declaration.
5623
7b33f0c8
MP
56242015-01-29 Marek Polacek <polacek@redhat.com>
5625
5626 PR c/64709
5627 * c-typeck.c (pop_init_level): If constructor_elements has
5628 exactly one element with integer_zerop value, set constructor_zeroinit
5629 to 1. Remove braces around warning_init call.
5630
dea63e49
JJ
56312015-01-27 Jakub Jelinek <jakub@redhat.com>
5632
5633 PR c/64766
5634 * c-typeck.c (store_init_value): Don't overwrite DECL_INITIAL
5635 of FUNCTION_DECLs with error_mark_node.
5636
d38f7dce
JJ
56372015-01-26 Jakub Jelinek <jakub@redhat.com>
5638
5639 PR c/64778
5640 * c-typeck.c (convert_arguments): Return -1 if there are
5641 error_args, even if we've diagnosed too many arguments.
5642
cbf5d0e7
RB
56432015-01-21 Richard Biener <rguenther@suse.de>
5644
5645 PR middle-end/64313
5646 * c-decl.c (merge_decls): Call set_builtin_decl_declared_p
5647 for builtins the user declared correctly.
5648
41dbbb37
TS
56492015-01-15 Thomas Schwinge <thomas@codesourcery.com>
5650 Bernd Schmidt <bernds@codesourcery.com>
5651 Cesar Philippidis <cesar@codesourcery.com>
5652 James Norris <jnorris@codesourcery.com>
5653 Jakub Jelinek <jakub@redhat.com>
5654 Ilmir Usmanov <i.usmanov@samsung.com>
5655
5656 * c-parser.c: Include "gomp-constants.h".
5657 (c_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
5658 omp_clause_map_kind. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
5659 Use OMP_CLAUSE_SET_MAP_KIND.
5660 (c_parser_pragma): Handle PRAGMA_OACC_ENTER_DATA,
5661 PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_UPDATE.
5662 (c_parser_omp_construct): Handle PRAGMA_OACC_CACHE,
5663 PRAGMA_OACC_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP,
5664 PRAGMA_OACC_PARALLEL, PRAGMA_OACC_WAIT.
5665 (c_parser_omp_clause_name): Handle "auto", "async", "copy",
5666 "copyout", "create", "delete", "deviceptr", "gang", "host",
5667 "num_gangs", "num_workers", "present", "present_or_copy", "pcopy",
5668 "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
5669 "present_or_create", "pcreate", "seq", "self", "vector",
5670 "vector_length", "wait", "worker".
5671 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
5672 (OACC_ENTER_DATA_CLAUSE_MASK, OACC_EXIT_DATA_CLAUSE_MASK)
5673 (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
5674 (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
5675 (c_parser_omp_variable_list): Handle OMP_CLAUSE__CACHE_.
5676 (c_parser_oacc_wait_list, c_parser_oacc_data_clause)
5677 (c_parser_oacc_data_clause_deviceptr)
5678 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_workers)
5679 (c_parser_oacc_clause_async, c_parser_oacc_clause_wait)
5680 (c_parser_omp_clause_vector_length, c_parser_oacc_all_clauses)
5681 (c_parser_oacc_cache, c_parser_oacc_data, c_parser_oacc_kernels)
5682 (c_parser_oacc_enter_exit_data, c_parser_oacc_loop)
5683 (c_parser_oacc_parallel, c_parser_oacc_update)
5684 (c_parser_oacc_wait): New functions.
5685 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels)
5686 (c_finish_oacc_data): New prototypes.
5687 * c-typeck.c: Include "gomp-constants.h".
5688 (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR. Use
5689 GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use
5690 OMP_CLAUSE_SET_MAP_KIND.
5691 (c_finish_oacc_parallel, c_finish_oacc_kernels)
5692 (c_finish_oacc_data): New functions.
5693 (c_finish_omp_clauses): Handle OMP_CLAUSE__CACHE_,
5694 OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS,
5695 OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_ASYNC, OMP_CLAUSE_WAIT,
5696 OMP_CLAUSE_AUTO, OMP_CLAUSE_SEQ, OMP_CLAUSE_GANG,
5697 OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR, and OMP_CLAUSE_MAP's
5698 GOMP_MAP_FORCE_DEVICEPTR.
5699
adfac8df
JJ
57002015-01-09 Michael Collison <michael.collison@linaro.org>
5701
5702 * c-array-notation.c: Include hash-set.h, machmode.h,
5703 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
5704 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
5705 * c-aux-info.c: Ditto.
5706 * c-convert.c: Ditto.
5707 * c-decl.c: Ditto.
5708 * c-errors.c: Ditto.
5709 * c-lang.c: Dittoxs.
5710 * c-objc-common.c: Ditto.
5711 * c-parser.c: Ditto.
5712 * c-typeck.c: Include hash-set.h, machmode.h,
5713 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
5714 fold-const.h, wide-int.h, inchash.h, real.h and
5715 fixed-value.h due to flattening of tree.h.
5716
2cc901dc
MP
57172015-01-07 Marek Polacek <polacek@redhat.com>
5718
5719 PR c/64417
5720 * c-typeck.c (process_init_element): Disallow initialization of
5721 a flexible array member with a string constant if the structure
5722 is in an array.
5723
5624e564
JJ
57242015-01-05 Jakub Jelinek <jakub@redhat.com>
5725
e5341100
JJ
5726 PR sanitizer/64344
5727 * c-typeck.c (convert_for_assignment, c_finish_return): For
5728 -fsanitize=float-cast-overflow casts from REAL_TYPE to integer/enum
5729 types also set in_late_binary_op around convert call.
5730 * c-convert.c (convert): For -fsanitize=float-cast-overflow REAL_TYPE
5731 to integral type casts, if not in_late_binary_op, pass c_fully_fold
5732 result on expr as last argument to ubsan_instrument_float_cast,
5733 if in_late_binary_op, don't use c_save_expr but save_expr.
5734
5624e564
JJ
5735 Update copyright years.
5736
5bd012f8
MP
57372015-01-05 Marek Polacek <polacek@redhat.com>
5738
5739 PR c/64423
5740 * c-typeck.c (build_array_ref): Pass loc down to
5741 warn_array_subscript_with_type_char.
5742
3f8257db 57432014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
768952be
MU
5744
5745 * c-typeck.c: New behavious for pointers to arrays with qualifiers
8e745a17 5746 (common-pointer-type): For pointers to arrays take qualifiers from
768952be 5747 element type.
8e745a17 5748 (build_conditional_expr): Add warnings for lost qualifiers.
768952be 5749 (comp-target-types): Allow pointers to arrays with different qualifiers.
8e745a17 5750 (convert-for-assignment): Adapt warnings for discarded qualifiers. Add
768952be 5751 WARNING_FOR_QUALIFIERS macro and rename WARN_FOR_QUALIFIERS
8e745a17 5752 to PEDWARN_FOR_QUALIFIERS.
768952be 5753
8f94a8c4
JJ
57542014-12-17 Jakub Jelinek <jakub@redhat.com>
5755
5756 PR sanitizer/64289
5757 * c-convert.c: Include ubsan.h.
5758 (convert): For real -> integral casts and
5759 -fsanitize=float-cast-overflow don't call convert_to_integer, but
5760 instead instrument the float cast directly.
5761
b731b390
JJ
57622014-11-29 Jakub Jelinek <jakub@redhat.com>
5763
5764 * c-typeck.c (convert_lvalue_to_rvalue, build_atomic_assign,
5765 c_finish_stmt_expr): Remove NULL last argument from
5766 create_tmp_var_raw and create_tmp_var calls.
5767 * c-array-notation.c (fix_builtin_array_notation_fn,
5768 build_array_notation_expr, fix_conditional_array_notations_1,
5769 fix_array_notation_expr, fix_array_notation_call_expr): Likewise.
5770
541e35a6
MP
57712014-11-28 Marek Polacek <polacek@redhat.com>
5772
5773 PR c/63862
5774 * c-typeck.c (build_binary_op) <RSHIFT_EXPR, LSHIFT_EXPR>: Don't
5775 convert the right operand to integer type.
5776
b286be94
MP
57772014-11-25 Marek Polacek <polacek@redhat.com>
5778
5779 PR c/63877
5780 * c-decl.c (start_function): Disable -Wmissing-declarations warning
5781 for inline functions.
5782
aa7da51a
JJ
57832014-11-21 Jakub Jelinek <jakub@redhat.com>
5784
5785 PR target/63764
5786 * c-typeck.c (build_array_ref): Adjust
5787 convert_vector_to_pointer_for_subscript caller. If it returns true,
5788 call non_lvalue_loc on the result.
5789
d876207f
RB
57902014-11-11 Richard Biener <rguenther@suse.de>
5791
5792 * c-decl.c (c_init_decl_processing): Do not set pedantic_lvalues
5793 to true.
5794
e5e44252
AK
57952014-11-10 Andi Kleen <ak@linux.intel.com>
5796
5797 PR c/60804
5798 * c-parser.c (c_parser_statement_after_labels): Call
5799 check_no_cilk.
5800 (c_parser_if_statement): Dito.
5801 (c_parser_switch_statement): Dito.
5802 (c_parser_while_statement): Dito.
5803 (c_parser_do_statement): Dito.
5804 (c_parser_for_statement): Dito.
5805 * c-typeck.c (c_finish_loop): Dito.
5806
13c21655
PC
58072014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
5808
5809 * c-typeck.c (build_binary_op): Use OPT_Wshift_count_negative and
5810 OPT_Wshift_count_overflow in the warnings.
5811
2d51fcef
MP
58122014-10-30 Marek Polacek <polacek@redhat.com>
5813
5814 * c-objc-common.c (c_tree_printer) <case 'T'>: For a typedef name,
5815 print the stripped version as well, if they're not the same.
5816
ef4bddc2
RS
58172014-10-29 Richard Sandiford <richard.sandiford@arm.com>
5818
5819 * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from
5820 machine_mode.
5821
c582198b
AM
58222014-10-28 Andrew MacLeod <amacleod@redhat.com>
5823
5824 * c-decl.c: Adjust include files.
5825 * c-parser.c: Ditto.
5826
ddc8de03
PM
58272014-10-27 Phil Muldoon <pmuldoon@redhat.com>
5828 Tom Tromey <tromey@redhat.com>
5829
5830 * c-tree.h (enum c_oracle_request): New.
5831 (c_binding_oracle_function): New typedef.
5832 (c_binding_oracle, c_pushtag, c_bind): Declare.
5833 * c-decl.c (c_binding_oracle): New global.
5834 (I_SYMBOL_CHECKED): New macro.
5835 (i_symbol_binding): New function.
5836 (I_SYMBOL_BINDING, I_SYMBOL_DECL): Redefine.
5837 (I_TAG_CHECKED): New macro.
5838 (i_tag_binding): New function.
5839 (I_TAG_BINDING, I_TAG_DECL): Redefine.
5840 (I_LABEL_CHECKED): New macro.
5841 (i_label_binding): New function.
5842 (I_LABEL_BINDING, I_LABEL_DECL): Redefine.
5843 (c_print_identifier): Save and restore c_binding_oracle.
5844 (c_pushtag, c_bind): New functions.
5845
60393bbc
AM
58462014-10-27 Andrew MacLeod <amacleod@redhat.com>
5847
5848 * c-typeck.c: Adjust include files.
5849
d723bb7c
MLI
58502014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
5851
5852 PR c++/53061
5853 * c-objc-common.c (c_objc_common_init): Do not do diagnostics
5854 initialization here...
5855 (c_initialize_diagnostics): ... but here. Set defaults after
5856 building pretty-printer.
5857
1bc5a451
MP
58582014-10-23 Marek Polacek <polacek@redhat.com>
5859
5860 PR c/63626
5861 * c-decl.c (pop_scope): Don't print warning in external_scope.
5862
4435bb92
MP
58632014-10-19 Marek Polacek <polacek@redhat.com>
5864
5865 PR c/63567
5866 * c-typeck.c (output_init_element): Allow initializing objects with
5867 static storage duration with compound literals even in C99 and add
5868 pedwarn for it.
5869
7278465e
MP
58702014-10-17 Marek Polacek <polacek@redhat.com>
5871
5872 PR c/63567
5873 * c-typeck.c (digest_init): Allow initializing objects with static
5874 storage duration with compound literals even in C99 and add pedwarn
5875 for it.
5876
d9b7be2e
MP
58772014-10-17 Marek Polacek <polacek@redhat.com>
5878
5879 PR c/63543
5880 * c-tree.h (C_TYPE_ERROR_REPORTED): Define.
5881 * c-typeck.c (build_indirect_ref): Don't print the "dereferencing..."
5882 error multiple times. Print the type.
5883
f406ae1f
MP
58842014-10-17 Marek Polacek <polacek@redhat.com>
5885
5886 PR c/63549
5887 * c-typeck.c (build_array_ref): Bail if the index in an incomplete
5888 type.
5889
92574c7c
MP
58902014-10-17 Marek Polacek <polacek@redhat.com>
5891
5892 * c-decl.c (grokdeclarator): Use OPT_Wimplicit_int unconditionally.
5893 (start_function): Use OPT_Wimplicit_int instead of 0.
5894 (store_parm_decls_oldstyle): Likewise.
5895
1bc4a978
MT
58962014-10-17 Alan Modra <amodra@gmail.com>
5897
5898 PR middle-end/61848
5899 * c-decl.c (merge_decls): Don't merge section name or tls model
5900 to newdecl symtab node, instead merge to olddecl. Override
5901 existing olddecl section name. Set tls_model for all thread-local
5902 vars, not just OMP thread-private ones. Remove incorrect comment.
5903
83685514
AM
59042014-10-16 Andrew MacLeod <amacleod@redhat.com>
5905
5906 * c-decl.c: Adjust include files.
5907
78a7c317
DD
59082014-10-14 DJ Delorie <dj@redhat.com>
5909
5910 * c-parser.c (c_parse_init): Add RID entries for each __intN.
5911 (c_token_starts_typename): Check all __intN, not just __int128.
5912 (c_token_starts_declspecs): Likewise.
5913 (c_parser_declspecs): Likewise.
5914 (c_parser_attribute_any_word): Likewise.
5915 (c_parser_objc_selector): Likewise.
5916 * c-tree.h (c_typespec_keyword): cts_int128 -> cts_int_n.
5917 (struct c_declspecs): Add int_n_idx field to record *which* __intN
5918 is specified.
5919 * c-decl.c (declspecs_add_type): Check for all __intN, not just
5920 __int128.
5921 (finish_declspecs): Likewise.
5922
74d98c1e
AB
59232014-10-13 Anthony Brandon <anthony.brandon@gmail.com>
5924
8e745a17 5925 * c-parser.c (c_parser_all_labels): New function to replace
74d98c1e 5926 the duplicate code.
8e745a17 5927 (c_parser_statement): Call the new function.
74d98c1e 5928
84937de2
MP
59292014-10-09 Marek Polacek <polacek@redhat.com>
5930
5931 PR c/63480
5932 * c-typeck.c (pop_init_level): Don't warn about initializing
5933 with { }.
5934
0382aaa0
MP
59352014-10-07 Marek Polacek <polacek@redhat.com>
5936
5937 PR c/59717
5938 * c-decl.c (header_for_builtin_fn): New function.
5939 (implicitly_declare): Suggest which header to include.
5940
7a0ca710
MP
59412014-10-07 Marek Polacek <polacek@redhat.com>
5942
5943 * c-convert.c (convert): Use error_operand_p.
5944 * c-typeck.c (require_complete_type): Likewise.
5945 (really_atomic_lvalue): Likewise.
5946 (digest_init): Likewise.
5947 (handle_omp_array_sections_1): Likewise.
5948
6bc8a126
MP
59492014-10-03 Marek Polacek <polacek@redhat.com>
5950
5951 PR c/63453
5952 * c-decl.c (pop_scope): Don't warn about "inline function declared
5953 but never defined" for functions marked with gnu_inline attribute.
5954
d90c0a59
JJ
59552014-09-25 Jakub Jelinek <jakub@redhat.com>
5956
5957 PR c++/63249
5958 * c-parser.c (c_parser_omp_variable_list): Call mark_exp_read
5959 on low_bound and length.
5960
083e891e
MP
59612014-09-24 Marek Polacek <polacek@redhat.com>
5962
5963 PR c/61405
5964 PR c/53874
5965 * c-parser.c: Don't define CPP_KEYWORD.
5966 (c_parser_switch_statement): Pass original type to c_finish_case.
5967 * c-tree.h (c_finish_case): Update declaration.
5968 * c-typeck.c (c_finish_case): Add TYPE parameter. Pass it
5969 conditionally to c_do_switch_warnings.
5970
8d95fe25
MP
59712014-09-03 Marek Polacek <polacek@redhat.com>
5972
5973 PR c/62024
5974 * c-parser.c (c_parser_static_assert_declaration_no_semi): Strip no-op
5975 conversions.
5976
9a771876
JJ
59772014-09-02 Jakub Jelinek <jakub@redhat.com>
5978 Balaji V. Iyer <balaji.v.iyer@intel.com>
5979 Igor Zamyatin <igor.zamyatin@intel.com>
5980
5981 * c-parser.c (c_parser_cilk_for): New function.
5982 (c_parser_cilk_grainsize): Likewise.
5983 (c_get_temp_regvar): Likewise.
5984 (c_parser_statement_after_labels): Added RID_CILK_FOR case.
5985 (c_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
5986 (c_parser_omp_for_loop): Added CILK_FOR and CILK_SIMD checks.
5987 * c-typeck.c (c_finish_omp_clauses): Added OMP_CLAUSE__CILK_FOR_COUNT_
5988 case.
5989
b7679d96
CG
59902014-08-27 Chen Gang <gang.chen.5i5j@gmail.com>
5991
5992 * c-aux-info.c (gen_type): Resize 'buff' from 10 to 23 bytes,
5993 with using HOST_WIDE_INT without truncation to 'int'
5994
59ea0364
MP
59952014-08-22 Marek Polacek <polacek@redhat.com>
5996
5997 PR c++/62199
5998 * c-typeck.c (parser_build_binary_op): Adjust call to
5999 warn_logical_not_parentheses.
6000
671a475e
IZ
60012014-08-22 Igor Zamyatin <igor.zamyatin@intel.com>
6002
6003 PR other/62008
6004 * c-parser.c (c_parser_array_notation): Check for correct
6005 type of an array added.
6006
04159acf
MP
60072014-08-19 Marek Polacek <polacek@redhat.com>
6008
6009 PR c++/62153
6010 * c-typeck.c (build_binary_op): If either operand of a comparison
6011 is a boolean expression, call maybe_warn_bool_compare.
6012
c77935ee
PP
60132014-08-19 Patrick Palka <ppalka@gcc.gnu.org>
6014
6015 PR c/45584
6016 * c-typeck.c (build_c_cast): Do a conversion even when the
6017 TYPE_MAIN_VARIANTs are the same.
6018
35aff4fb
MP
60192014-08-19 Marek Polacek <polacek@redhat.com>
6020
6021 * c-decl.c (diagnose_mismatched_decls): Unconditionally call
6022 pedwarn_c99 instead of pedwarn.
6023 (grokfield): Likewise.
6024 (warn_defaults_to): New function.
6025 (grokdeclarator): Call warn_defaults_to instead of pedwarn_c99.
6026 Unconditionally call pedwarn_c99 instead of pedwarn.
6027 (start_function): Call warn_defaults_to instead of pedwarn_c99.
6028 (declspecs_add_scspec): Call pedwarn_c99 instead of pedwarn, don't
6029 check flag_isoc11 before.
6030 * c-errors.c (pedwarn_c99): Change the return type to bool.
6031 Handle -Wc99-c11-compat.
6032 * c-parser.c (disable_extension_diagnostics): Handle
6033 warn_c99_c11_compat.
6034 (restore_extension_diagnostics): Likewise.
6035 (c_parser_static_assert_declaration_no_semi): Call pedwarn_c99
6036 instead of pedwarn, don't check flag_isoc11 before.
6037 (c_parser_declspecs): Likewise.
6038 (c_parser_alignas_specifier): Likewise.
6039 (c_parser_alignof_expression): Likewise.
6040 (c_parser_generic_selection): Likewise.
6041 * c-tree.h (pedwarn_c99): Update declaration.
6042 * c-typeck.c (c_finish_return): Call pedwarn or warning_at instead
6043 of pedwarn_c99.
6044
177cce46
MP
60452014-08-19 Marek Polacek <polacek@redhat.com>
6046
6047 * c-decl.c (warn_variable_length_array): Pass OPT_Wvla unconditionally
6048 to pedwarn_c90.
6049 * c-errors.c: Include "opts.h".
6050 (pedwarn_c90): Rewrite to handle -Wno-c90-c99-compat better.
6051 * c-parser.c (disable_extension_diagnostics): Handle negative value
6052 of warn_c90_c99_compat, too.
6053 (restore_extension_diagnostics): Likewise.
6054 (c_parser_compound_statement_nostart): Pass
6055 OPT_Wdeclaration_after_statement unconditionally to pedwarn_c90.
6056
6dc99c33
MP
60572014-08-12 Marek Polacek <polacek@redhat.com>
6058
6059 * c-parser.c (c_parser_postfix_expression) <case RID_FUNCTION_NAME>:
6060 Add pedwarn.
6061 (c_parser_postfix_expression) <case RID_PRETTY_FUNCTION_NAME>:
6062 Likewise.
6063 (c_parser_postfix_expression) <case RID_C99_FUNCTION_NAME>: Likewise.
6064
3f8257db 60652014-08-10 Marek Polacek <polacek@redhat.com>
f3bede71
MP
6066
6067 PR c/51849
6068 * c-decl.c (build_array_declarator): Remove check for !flag_isoc99.
6069 Call pedwarn_c90 instead of pedwarn.
6070 (check_bitfield_type_and_width): Likewise.
6071 (declspecs_add_qual): Likewise.
6072 (declspecs_add_type): Likewise.
6073 (warn_variable_length_array): Unify function for -pedantic and -Wvla.
6074 Adjust to only call pedwarn_c90.
6075 (grokdeclarator): Remove pedantic && !flag_isoc99 check. Call
6076 pedwarn_c90 instead of pedwarn.
6077 * c-errors.c (pedwarn_c90): Handle -Wc90-c99-compat.
6078 * c-parser.c (disable_extension_diagnostics): Handle
6079 warn_c90_c99_compat.
6080 (restore_extension_diagnostics): Likewise.
6081 (c_parser_enum_specifier): Remove check for !flag_isoc99. Call
6082 pedwarn_c90 instead of pedwarn.
6083 (c_parser_initelt): Likewise.
6084 (c_parser_postfix_expression): Likewise.
6085 (c_parser_postfix_expression_after_paren_type): Likewise.
6086 (c_parser_compound_statement_nostart): Remove check for !flag_isoc99.
6087 * c-tree.h: Fix formatting.
6088 * c-typeck.c (build_array_ref): Remove check for !flag_isoc99. Call
6089 pedwarn_c90 instead of pedwarn.
6090
9f25a338
TS
60912014-08-07 Trevor Saunders <tsaunders@mozilla.com>
6092
6093 * c-typeck.c: Remove include of pointer-set.h.
6094
044331a8
MP
60952014-08-07 Marek Polacek <polacek@redhat.com>
6096
6097 * c-typeck.c (pointer_diff): Remove P - (P + CST) optimization.
6098
b787e7a2
TS
60992014-08-02 Trevor Saunders <tsaunders@mozilla.com>
6100
6101 * c-typeck.c: Use hash_map instead of pointer_map.
6102
6e2830c3
TS
61032014-08-02 Trevor Saunders <tsaunders@mozilla.com>
6104
6105 * c-decl.c: Use hash_set instead of pointer_set.
6106
a7ee52fb
IZ
61072014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
6108
6109 PR middle-end/61455
6110 * c-array-notation.c (expand_array_notations): Handling
6111 of DECL_EXPR added.
6112
b4dfdc11
MG
61132014-07-31 Marc Glisse <marc.glisse@inria.fr>
6114
6115 PR c++/60517
6116 * c-typeck.c (c_finish_return): Return 0 instead of the address of
6117 a local variable.
6118
976d5a22
TT
61192014-07-30 Tom Tromey <tromey@redhat.com>
6120
6121 * c-typeck.c (struct constructor_stack) <designator_depth>: New
6122 field.
6123 (really_start_incremental_init, push_init_level): Initialize
6124 designator_depth.
6125 (pop_init_level): Set global designator_depth.
6126 (process_init_element): Check for designated_init attribute.
6127
30281de2
MP
61282014-07-20 Marek Polacek <polacek@redhat.com>
6129
6130 PR c/61852
6131 * c-decl.c (implicit_decl_warning): Add location_t parameter. Use it.
6132 (implicitly_declare): Pass location to implicit_decl_warning.
6133
b108f48f
JJ
61342014-07-14 Jakub Jelinek <jakub@redhat.com>
6135
6136 PR middle-end/61294
6137 * c-parser.c (c_parser_expr_list): Add new argument literal_zero_mask.
6138 If non-NULL, call c_parser_check_literal_zero.
6139 (c_parser_check_literal_zero): New function.
6140 (c_parser_postfix_expression_after_primary): Adjust
6141 c_parser_expr_list caller, handle -Wmemset-transposed-args.
6142
773ec47f
MP
61432014-07-06 Marek Polacek <polacek@redhat.com>
6144
6145 PR c/6940
6146 * c-decl.c (grokdeclarator): Set C_ARRAY_PARAMETER.
6147 * c-tree.h (C_ARRAY_PARAMETER): Define.
6148 * c-typeck.c (c_expr_sizeof_expr): Warn when using sizeof on an array
6149 function parameter.
6150
22e1cf1c 61512014-07-02 Jan Hubicka <hubicka@ucw.cz>
3f8257db 6152 Chen Gang <gang.chen.5i5j@gmail.com>
22e1cf1c
JH
6153
6154 * c-decl.c (duplicate_decls): CLear DECL_STRUCT_FUNCTION before
6155 releasing symbol.
6156
52ec0ea3
MP
61572014-07-01 Marek Polacek <polacek@redhat.com>
6158
6159 * c-typeck.c (convert_for_assignment): Pass OPT_Wint_conversion
6160 instead of 0 to WARN_FOR_ASSIGNMENT.
6161
d5c3d343
MP
61622014-07-01 Marek Polacek <polacek@redhat.com>
6163
6164 PR c/58286
6165 * c-typeck.c (convert_for_assignment): Pass
6166 OPT_Wincompatible_pointer_types instead of 0 to WARN_FOR_ASSIGNMENT.
6167
6a7253a4
MP
61682014-06-30 Marek Polacek <polacek@redhat.com>
6169
6170 * c-decl.c (grokdeclarator): Don't instrument VLAs if the function
6171 has no_sanitize_undefined attribute.
6172
5e88a8f4
IZ
61732014-06-30 Igor Zamyatin <igor.zamyatin@intel.com>
6174
6175 PR middle-end/57541
6176 * c-array-notation.c (fix_builtin_array_notation_fn):
6177 Check for 0 arguments in builtin call. Check that bultin argument is
6178 correct.
6179 * c-parser.c (c_parser_array_notation): Check for incorrect initial
6180 index.
6181
9698b078
SH
61822014-06-27 Sebastian Huber <sebastian.huber@embedded-brains.de>
6183
6184 * c-parser.c (c_parser_declaration_or_fndef): Discard all type
6185 qualifiers in __auto_type for atomic types.
6186 (c_parser_typeof_specifier): Discard all type qualifiers in
6187 __typeof__ for atomic types.
6188
6e07c515
MP
61892014-06-25 Marek Polacek <polacek@redhat.com>
6190
6191 PR c/61162
6192 * c-parser.c (c_parser_statement_after_labels): Pass the location of
6193 the return expression to c_finish_return.
6194
da6f124d
JJ
61952014-06-25 Jakub Jelinek <jakub@redhat.com>
6196
6197 * c-typeck.c (c_finish_omp_clauses): Make sure
6198 OMP_CLAUSE_LINEAR_STEP has correct type.
6199
c203e8a7
TS
62002014-06-24 Trevor Saunders <tsaunders@mozilla.com>
6201
6202 * c-decl.c: Adjust.
6203
56ad0e38
JJ
62042014-06-24 Jakub Jelinek <jakub@redhat.com>
6205
6206 * c-parser.c (c_parser_omp_for_loop): For
6207 #pragma omp parallel for simd move lastprivate clause from parallel
6208 to for rather than simd.
6209
47c2554f
MP
62102014-06-23 Marek Polacek <polacek@redhat.com>
6211
6212 * c-typeck.c (parser_build_binary_op): Don't call
6213 warn_logical_not_parentheses if the RHS is TRUTH_NOT_EXPR.
6214
56363ffd
JH
62152014-06-15 Jan Hubicka <hubicka@ucw.cz>
6216
6217 * c-parser.c (c_parser_omp_threadprivate): Likewise.
6218 * c-decl.c (merge_decls): Likewise.
6219
d7ff7ae5
MP
62202014-06-09 Marek Polacek <polacek@redhat.com>
6221
6222 PR c/36446
6223 * c-typeck.c (error_init): Call inform instead of error_at.
6224 (pedwarn_init): Call inform instead of pedwarn.
6225 (warning_init): Call inform instead of warning_at.
6226
24d047a3
JH
62272014-06-07 Jan Hubicka <hubicka@ucw.cz>
6228
6229 * c-decl.c (merge_decls): Use set_decl_section_name.
6230 (duplicate_decls): Remove node if it exists.
6231
9bac5cbb
G
62322014-06-05 S. Gilles <sgilles@terpmail.umd.edu>
6233
6234 PR c/53119
6235 * c-typeck.c (push_init_level, process_init_element,
6236 pop_init_level): Correct check for zero initialization, move
6237 missing brace warning to respect zero initialization.
6238
8ffcdea8
MP
62392014-06-05 Marek Polacek <polacek@redhat.com>
6240
6241 PR c/56724
6242 * c-typeck.c (convert_for_assignment): Use expr_loc for ic_argpass.
6243
742938c9
MP
62442014-06-05 Marek Polacek <polacek@redhat.com>
6245
6246 PR c/49706
6247 * c-typeck.c (parser_build_binary_op): Warn when logical not is used
ab20d992 6248 on the left hand side operand of a comparison.
742938c9 6249
6447c55d
MP
62502014-06-05 Marek Polacek <polacek@redhat.com>
6251
6252 PR c/48062
6253 * c-decl.c (warn_if_shadowing): Call inform instead of warning_at.
6254 Print note only if the warning was printed.
6255
9dc7743c
IZ
62562014-06-04 Igor Zamyatin <igor.zamyatin@intel.com>
6257
6258 PR c/58942
6259 * c-array-notation.c (fix_builtin_array_notation_fn): Handle the case
6260 with a pointer.
6261
fedfecef
MP
62622014-06-03 Marek Polacek <polacek@redhat.com>
6263
6264 PR c/60439
6265 * c-parser.c (c_parser_switch_statement): Pass explicit_cast_p to
6266 c_start_case.
6267 * c-tree.h (c_start_case): Update.
6268 * c-typeck.c (c_start_case): Add new boolean parameter. Warn if
6269 switch condition has boolean value.
6270
9b2b7279
AM
62712014-06-02 Andrew MacLeod <amacleod@redhat.com>
6272
6273 * c-decl.c: Include builtins.h.
6274 * c-parser.c: Likewise.
6275
5c1bc275
MP
62762014-05-27 Marek Polacek <polacek@redhat.com>
6277
6278 PR c/56724
6279 * c-typeck.c (convert_arguments): Get location of a parameter. Change
6280 error and warning calls to error_at and warning_at. Pass location of
6281 a parameter to it. Call warning_at with OPT_Wtraditional_conversion.
6282 (convert_for_assignment): Add parameter to WARN_FOR_ASSIGNMENT and
6283 WARN_FOR_QUALIFIERS. Pass expr_loc to those.
6284
97563bc8
IZ
62852014-05-26 Igor Zamyatin <igor.zamyatin@intel.com>
6286
6287 PR c/61191
6288 * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid
6289 function parameters.
6290
aede2c10
JH
62912014-05-23 Jan Hubicka <hubicka@ucw.cz>
6292
6293 * c-decl.c (merge_decls): Preserve symtab node pointers.
6294 (duplicate_decls): Free new decl.
6295
edbba2ce
TS
62962014-05-23 Thomas Schwinge <thomas@codesourcery.com>
6297
f3316c6d
TS
6298 * c-typeck.c (c_finish_omp_clauses): Remove duplicated variable
6299 initialization.
6300
edbba2ce
TS
6301 * c-parser.c (c_parser_omp_target): Return bool values.
6302
68c81f24
TS
63032014-05-22 Thomas Schwinge <thomas@codesourcery.com>
6304
6305 * c-parser.c (c_parser_omp_clause_thread_limit): Rename
6306 num_teams_loc variable to num_thread_limit_loc.
6307
632f2871
RS
63082014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
6309
6310 * c-array-notation.c (expand_array_notations): Use void_node
6311 instead of void_zero_node.
6312
766090c2
TS
63132014-05-17 Trevor Saunders <tsaunders@mozilla.com>
6314
6315 * c-decl.c (finish_struct): Adjust.
6316 (finish_enum): Likewise.
6317 (bind): Adjust.
6318 (record_inline_static): Likewise.
6319 (push_scope): Likewise.
6320 (make_label): Likewise.
6321 (lookup_label_for_goto): Likewise.
6322 (finish_struct): Likewise.
6323 (finish_enum): Likewise.
6324 (store_parm_decls): Likewise.
6325 (c_push_function_context): Likewise.
6326 * c-lang.h: Remove usage of variable_size gty attribute.
6327 * c-parser.c (c_parse_init): Adjust.
6328 (c_parse_file): Likewise.
6329
2b107f6b
MP
63302014-05-13 Marek Polacek <polacek@redhat.com>
6331
6332 PR c/61162
6333 * c-typeck.c (convert_for_assignment): Pass location to
6334 WARN_FOR_ASSIGNMENT instead of input_location.
6335
d033409e
MP
63362014-05-10 Marek Polacek <polacek@redhat.com>
6337
6338 * c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
6339 maybe_warn_string_init.
6340 (c_parser_postfix_expression_after_paren_type): Pass type_loc to
6341 maybe_warn_string_init.
6342 * c-tree.h (maybe_warn_string_init): Update declaration.
6343 * c-typeck.c (maybe_warn_string_init): Add location parameter.
6344 Call pedwarn_init with loc instead of with input_location.
6345 (digest_init): Pass init_loc to maybe_warn_string_init.
6346 (pop_init_level): Call pedwarn_init with loc instead of with
6347 input_location.
6348 (set_init_index): Likewise.
6349 (process_init_element): Likewise.
6350
ea58ef42
MP
63512014-05-09 Marek Polacek <polacek@redhat.com>
6352
6353 PR c/61096
6354 * c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level.
6355 (c_parser_initelt): Pass location to set_init_label. Pass array index
6356 location to set_init_index.
6357 * c-tree.h (push_init_level): Update declaration.
6358 (pop_init_level): Likewise.
6359 (set_init_index): Likewise.
6360 (set_init_label): Likewise.
6361 * c-typeck.c (error_init): Add location parameter. Call error_at
6362 instead of error.
6363 (digest_init): Pass init_loc to error_init.
6364 (really_start_incremental_init):
6365 (push_init_level): Add location parameter. Pass loc to pop_init_level
6366 and error_init.
6367 (pop_init_level): Likewise.
6368 (set_designator): Add location parameter. Pass loc to pop_init_level,
6369 push_init_level, and error_init.
6370 (set_init_index): Add location parameter. Pass loc to error_init and
6371 set_designator.
6372 (set_init_label): Likewise.
6373 (output_init_element): Pass loc to error_init.
6374 (process_init_element): Pass loc to error_init, pop_init_level,
6375 pedwarn_init, and push_init_level.
6376
661a0813
MP
63772014-05-09 Marek Polacek <polacek@redhat.com>
6378
6379 PR c/50459
6380 * c-parser.c (c_parser_attributes): Parse the arguments as an
6381 expression-list if the attribute takes identifier.
6382
2793eeab
MP
63832014-05-08 Marek Polacek <polacek@redhat.com>
6384
6385 PR c/61053
6386 * c-decl.c (grokdeclarator): Use min_align_of_type instead of
6387 TYPE_ALIGN_UNIT.
6388
f827930a
MP
63892014-05-08 Marek Polacek <polacek@redhat.com>
6390
6391 PR c/61077
6392 * c-decl.c (start_function): Warn for _Atomic-qualified return type
6393 of main.
6394
1d60af08
KZ
63952014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
6396 Mike Stump <mikestump@comcast.net>
6397 Richard Sandiford <rdsandiford@googlemail.com>
6398
6399 * c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN.
6400 (finish_enum): Use wide-int interfaces.
6401 * c-parser.c (c_parser_cilk_clause_vectorlength): Likewise.
6402 * c-typeck.c (build_c_cast): Likewise.
6403 (set_nonincremental_init_from_string): Likewise.
6404 (c_tree_equal): Likewise.
6405
a0e24419
MP
64062014-05-02 Marek Polacek <polacek@redhat.com>
6407
6408 PR c/25801
6409 * c-typeck.c (c_size_in_bytes): Update comment. Don't call error.
6410 Return size_one_node when the type is not complete.
6411 (pointer_diff): Remove comment.
6412 (build_unary_op): Improve error messages.
6413
19fc9faa
MP
64142014-05-02 Marek Polacek <polacek@redhat.com>
6415
6416 * c-typeck.c (c_finish_return): Separate warning_at calls.
6417
63bc4e87
MP
64182014-05-02 Marek Polacek <polacek@redhat.com>
6419
6420 * c-tree.h (error_init): Remove declaration.
6421 (pedwarn_init): Likewise.
6422 * c-typeck.c (error_init): Make static and move above.
6423 (pedwarn_init): Likewise.
6424 (warning_init): Move above.
6425 (maybe_warn_string_init): Likewise.
6426
4bd2511b
JL
64272014-05-01 Jeff Law <law@redhat.com>
6428
6429 Revert:
6430
6431 2014-04-24 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
6432 * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
6433 avoid goto.
6434
6a358dcb
MP
64352014-05-02 Marek Polacek <polacek@redhat.com>
6436
6437 PR c/60784
6438 * c-typeck.c (push_init_level): Set constructor_designated to
6439 p->designated for structures.
6440
ae5ebda4
MP
64412014-05-01 Marek Polacek <polacek@redhat.com>
6442
6443 PR c/60915
6444 * c-parser.c (c_parser_declaration_or_fndef): Give better error if
6445 function-definition has an attribute after the declarator.
6446
96b40f8d
MP
64472014-05-01 Marek Polacek <polacek@redhat.com>
6448
6449 PR c/60257
6450 * c-typeck.c (warning_init): Add location_t parameter. Call
6451 warning_at instead of warning.
6452 (push_init_level): Pass input_location to warning_init.
6453 (add_pending_init): Add location_t parameter. Pass loc to
6454 warning_init.
6455 (set_nonincremental_init): Pass input_location to add_pending_init.
6456 (set_nonincremental_init_from_string): Likewise.
6457 (output_init_element): Pass loc to warning_init and to
6458 add_pending_init.
6459
32e00768
MP
64602014-05-01 Marek Polacek <polacek@redhat.com>
6461
6462 PR c/43395
6463 * c-typeck.c (c_finish_return): Distinguish between label and variable
6464 when warning about returning local address.
6465
c9379ce2
MP
64662014-05-01 Marek Polacek <polacek@redhat.com>
6467
6468 PR c/29467
6469 * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
6470 in C89 mode.
6471
d00887e8
MP
64722014-05-01 Marek Polacek <polacek@redhat.com>
6473
6474 PR c/43245
6475 * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
6476 instead of 0 to WARN_FOR_QUALIFIERS.
6477
5436fa2e
MP
64782014-05-01 Marek Polacek <polacek@redhat.com>
6479
6480 PR c/56989
6481 * c-typeck.c (default_conversion): Use better location for
6482 error call.
6483
f8ed5150
MP
64842014-04-30 Marek Polacek <polacek@redhat.com>
6485
6486 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
6487 also when SANITIZE_FLOAT_DIVIDE is on.
6488
8337d1db
MP
64892014-04-30 Marek Polacek <polacek@redhat.com>
6490
6491 PR c/60139
6492 * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
6493 and pedwarn_init. Use loc insted of input_location.
6494
c4bdc42f
MP
64952014-04-30 Marek Polacek <polacek@redhat.com>
6496
6497 PR c/60351
6498 * c-typeck.c (build_binary_op): Use location when warning about
6499 shift count.
6500
45484dcf
MP
65012014-04-25 Marek Polacek <polacek@redhat.com>
6502
6503 PR c/18079
6504 * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
6505 always_inline/noinline and hot/cold attributes.
6506
34cf811f
MP
65072014-04-25 Marek Polacek <polacek@redhat.com>
6508
6509 PR c/60114
6510 * c-parser.c (c_parser_initelt): Pass input_location to
6511 process_init_element.
6512 (c_parser_initval): Pass loc to process_init_element.
6513 * c-tree.h (process_init_element): Adjust declaration.
6514 * c-typeck.c (push_init_level): Pass input_location to
6515 process_init_element.
6516 (pop_init_level): Likewise.
6517 (set_designator): Likewise.
6518 (output_init_element): Add location_t parameter. Pass loc to
6519 digest_init.
6520 (output_pending_init_elements): Pass input_location to
6521 output_init_element.
6522 (process_init_element): Add location_t parameter. Pass loc to
6523 output_init_element.
6524
42056eac
JJ
65252014-04-24 Jakub Jelinek <jakub@redhat.com>
6526
6527 * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
6528 atomic-clause, allow comma in between atomic-clause and
6529 seq_cst.
6530
e162a134
JJ
65312014-04-22 Jakub Jelinek <jakub@redhat.com>
6532
6533 PR c/59073
6534 * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
6535 fails, don't set OM_PARALLEL_COMBINED and return NULL.
6536
2f6babac
IZ
65372014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
6538
6539 PR middle-end/60469
6540 * c-array-notation.c (fix_builtin_array_notation_fn): Use
6541 create_tmp_var instead build_decl for creating temps.
6542 (build_array_notation_expr): Likewise.
6543 (fix_conditional_array_notations_1): Likewise.
6544 (fix_array_notation_expr): Likewise.
6545 (fix_array_notation_call_expr): Likewise.
6546
8edbfaa6
JJ
65472014-03-28 Jakub Jelinek <jakub@redhat.com>
6548
6549 PR c++/60689
6550 * c-tree.h (c_build_function_call_vec): New prototype.
6551 * c-typeck.c (build_function_call_vec): Don't call
6552 resolve_overloaded_builtin here.
6553 (c_build_function_call_vec): New wrapper function around
6554 build_function_call_vec. Call resolve_overloaded_builtin here.
6555 (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
6556 Call c_build_function_call_vec instead of build_function_call_vec.
6557 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
6558 * c-decl.c (finish_decl): Likewise.
6559
7485aeea
MLI
65602014-03-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
6561
6562 PR c/55383
6563 * c-typeck.c: Use correct format string in cast-qual warning
6564
b17a8b07
TS
65652014-03-07 Thomas Schwinge <thomas@codesourcery.com>
6566
6567 * c-decl.c (c_decl_attributes): Use
6568 lang_hooks.types.omp_mappable_type.
6569 * c-typeck.c (c_finish_omp_clauses): Likewise.
6570
3af9c5e9
MP
65712014-03-06 Marek Polacek <polacek@redhat.com>
6572
6573 PR c/60197
6574 * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
6575 of checking tree code.
6576
1c9f5f33
PK
65772014-02-19 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
6578
6579 * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
6580 (c_parser_parameter_declaration): Likewise.
6581
cc28fc7f
MP
65822014-02-19 Marek Polacek <polacek@redhat.com>
6583
6584 PR c/60195
6585 * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
6586 Call mark_exp_read on exp.value.
6587 (build_atomic_assign): Set TREE_NO_WARNING on val and old. Set
6588 TREE_ADDRESSABLE on old instead of val.
6589 (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
6590
b581c05c
PK
65912014-02-07 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
6592
6593 * c-parser.c (c_parser_get_builtin_args): Replace calls to
6594 C_EXPR_APPEND by vec_safe_push.
6595 * c-tree.h (C_EXPR_APPEND): Remove.
6596
81e5eca8
MP
65972014-01-31 Marek Polacek <polacek@redhat.com>
6598
6599 PR c/59963
6600 * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
6601 build_function_call_vec.
6602 (build_function_call): Likewise.
6603 (build_atomic_assign): Likewise.
6604 (build_function_call_vec): Add arg_loc parameter. Use it.
6605 (convert_arguments): Likewise.
6606 (convert_for_assignment): Rename rhs_loc to expr_loc.
6607 * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
6608 (c_parser_objc_keywordexpr): Likewise.
6609 (c_parser_postfix_expression_after_primary): Call
6610 build_function_call_vec with expr_loc rather than op_loc.
6611 Call c_parser_expr_list to fill arg_loc. Pass arg_loc to
6612 build_function_call_vec.
6613 (c_parser_expr_list): Add locations parameter. Fill it with locations
6614 of function arguments.
6615 * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
6616
68fca595
MP
66172014-01-30 Marek Polacek <polacek@redhat.com>
6618
6619 PR c/59940
6620 * c-typeck.c (build_function_call_vec): Use loc parameter.
6621 (convert_arguments): Add location parameter. Use it.
6622 (ep_convert_and_check): Likewise.
6623 (build_atomic_assign): Adjust convert_for_assignment call.
6624 (build_modify_expr): Likewise.
6625 (digest_init): Likewise.
6626 (c_finish_return): Likewise.
6627 (build_conditional_expr): Adjust ep_convert_and_check calls.
6628 (convert_for_assignment): Add rhs_loc parameter. Use it.
6629 (build_binary_op): Adjust convert_and_check and ep_convert_and_check
6630 calls.
6631
fa337f3a
RB
66322014-01-30 Richard Biener <rguenther@suse.de>
6633
6634 PR c/59905
6635 * c-typeck.c (build_function_call_vec): Do not replace calls
6636 to a function via an incompatible type with a runtime abort.
6637
b72271b9
BI
66382014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
6639
6640 * c-parser.c (c_parser_declaration_or_fndef): Replaced
6641 flag_enable_cilkplus with flag_cilkplus.
6642 (c_parser_direct_declarator_inner): Likewise.
6643 (c_parser_attribute_any_word): Likewise.
6644 (c_parser_attributes): Likewise.
6645 (c_parser_compound_statement): Likewise.
6646 (c_parser_statement_after_labels): Likewise.
6647 (c_parser_if_statement): Likewise.
6648 (c_parser_switch_statement): Likewise.
6649 (c_parser_do_statement): Likewise.
6650 (c_parser_for_statement): Likewise.
6651 (c_parser_unary_expression): Likewise.
6652 (c_parser_postfix_expression): Likewise.
6653 (c_parser_postfix_expression_after_primary): Likewise.
6654 (c_parser_postfix_expression_after_primary): Likewise.
6655 (c_parser_omp_clause_name): Likewise.
6656 (c_finish_omp_declare_simd): Likewise.
6657 (c_parser_cilk_verify_simd): Likewise.
6658 * c-typeck.c (build_array_ref): Likewise.
6659 (build_function_call_vec): Likewise.
6660 (convert_arguments): Likewise.
6661 (build_compound_expr): Likewise.
6662 (c_finish_return): Likewise.
6663 (c_finish_if_stmt): Likewise.
6664 (c_finish_loop): Likewise.
6665 (build_binary_op): Likewise.
6666
393e8e8b
MP
66672014-01-23 Marek Polacek <polacek@redhat.com>
6668
6669 PR c/59846
6670 * c-typeck.c (parser_build_binary_op): Use location instead of
6671 input_location.
6672 (build_binary_op): Pass location to shorten_compare.
6673
f04dda30
MP
66742014-01-23 Marek Polacek <polacek@redhat.com>
6675
6676 PR c/58346
6677 * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
6678 an empty aggregate.
6679
789eadcd
MP
66802014-01-23 Marek Polacek <polacek@redhat.com>
6681
6682 PR c/59871
6683 * c-typeck.c (build_compound_expr): Warn even for right-hand operand
6684 of a comma expression.
6685 (emit_side_effect_warnings): Likewise.
6686
40f14e9f
BI
66872014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
6688
6689 PR c/59825
6690 * c-array-notation.c (expand_array_notation_exprs): Rewrote this
6691 function to use walk_tree and moved a lot of its functionality to
6692 expand_array_notations.
6693 (expand_array_notations): New function.
6694
74558dd9
BI
66952014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
6696
6697 * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
6698 attribute an attribute without value.
6699
652fea39
JJ
67002014-01-23 Jakub Jelinek <jakub@redhat.com>
6701
6702 PR middle-end/58809
6703 * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
6704 BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
6705
f34f1c87
MP
67062014-01-22 Marek Polacek <polacek@redhat.com>
6707
6708 PR c/59891
6709 * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
6710 of remove_c_maybe_const_expr on op1 and op2.
6711
241f845a
JJ
67122014-01-15 Jakub Jelinek <jakub@redhat.com>
6713
6714 PR c/58943
6715 * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
6716 effects, preevaluate rhs using SAVE_EXPR first.
6717
9a74f20c
BI
67182014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
6719
6720 PR c++/59631
6721 * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
6722 statements with if-elseif statements.
6723
96066ce1
MP
67242014-01-06 Marek Polacek <polacek@redhat.com>
6725
6726 PR c/57773
6727 * c-decl.c (check_bitfield_type_and_width): Warn for implementation
6728 defined bit-field types only in ISO C.
6729
23a5b65a
RS
67302014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
6731
6732 Update copyright years
6733
f9030485
RS
67342014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
6735
6736 * c-array-notation.c: Use the standard form for the copyright notice.
6737
41958c28
BI
67382013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
6739
6740 * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
6741 (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
6742 field in parser is not empty. If not-empty, call the function
6743 c_parser_finish_omp_declare_simd.
6744 (c_parser_cilk_clause_vectorlength): Modified function to be shared
6745 between SIMD-enabled functions and #pragma simd. Added new parameter.
6746 (c_parser_cilk_all_clauses): Modified the usage of the function
6747 c_parser_cilk_clause_vectorlength as mentioned above.
6748 (c_parser_cilk_simd_fn_vector_attrs): New function.
6749 (c_finish_cilk_simd_fn_tokens): Likewise.
6750 (is_cilkplus_vector_p): Likewise.
6751 (c_parser_omp_clause_name): Added checking for "vectorlength,"
6752 "nomask," and "mask" strings in clause name.
6753 (c_parser_omp_all_clauses): Added 3 new case statements:
6754 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
6755 PRAGMA_CILK_CLAUSE_NOMASK.
6756 (c_parser_attributes): Added a cilk_simd_fn_tokens parameter. Added a
6757 check for vector attribute and if so call the function
6758 c_parser_cilk_simd_fn_vector_attrs. Also, when Cilk plus is enabled,
6759 called the function c_finish_cilk_simd_fn_tokens.
6760 (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
6761 parser field is non-empty. If so, parse them as you would parse
6762 the omp declare simd pragma.
6763 (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
6764 Added a check when step is a parameter and flag it as error.
6765 (CILK_SIMD_FN_CLAUSE_MASK): New #define.
6766 (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
6767 pragma_omp_clause.
6768
cef0fd0e
TS
67692013-12-17 Thomas Schwinge <thomas@codesourcery.com>
6770
6771 * c-parser.c (c_parser_omp_parallel): Fix description.
6772
12893402
BI
67732013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
6774
6775 * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
6776 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
6777 (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
6778 * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
6779
296674db
JM
67802013-12-04 Joseph Myers <joseph@codesourcery.com>
6781
6782 PR c/52023
6783 * c-parser.c (c_parser_alignas_specifier): Use
6784 c_sizeof_or_alignof_type instead of c_alignof.
6785 (c_parser_alignof_expression): Likewise, with min_alignof
6786 parameter depending on alignof spelling used.
6787
edd28054
MP
67882013-12-04 Marek Polacek <polacek@redhat.com>
6789
6790 PR c/54113
6791 * c-decl.c (start_function): Don't warn for missing prototype for
6792 inline functions.
6793
da0fc454
MP
67942013-12-03 Marek Polacek <polacek@redhat.com>
6795
6796 PR c/59351
6797 * c-decl.c (build_compound_literal): Allow compound literals with
6798 empty initial value.
6799
4c2ecab0
JM
68002013-12-02 Joseph Myers <joseph@codesourcery.com>
6801
6802 PR c/58235
6803 * c-typeck.c (build_modify_expr): Diagnose assignment to
6804 expression with array type.
6805
340baef7
JM
68062013-11-29 Joseph Myers <joseph@codesourcery.com>
6807
6808 PR c/42262
6809 * c-typeck.c (process_init_element): Do not treat a string as
6810 initializing a whole array when used with a designator for an
6811 individual element.
6812
6763b9f7
JM
68132013-11-29 Joseph Myers <joseph@codesourcery.com>
6814
6815 PR c/57574
6816 * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
6817 an inline function following a static declaration.
6818
e7bd1de1
JJ
68192013-11-28 Jakub Jelinek <jakub@redhat.com>
6820
6821 PR c/59310
6822 * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
6823 to p_name before calling c_parser_omp_teams instead of after.
6824 (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
6825 argument. Remove unused p_name variable.
6826
0136f8f0
AH
68272013-11-27 Aldy Hernandez <aldyh@redhat.com>
6828 Jakub Jelinek <jakub@redhat.com>
6829
6830 * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
6831 external_scope is NULL.
6832
241b71bb
TV
68332013-11-27 Tom de Vries <tom@codesourcery.com>
6834 Marc Glisse <marc.glisse@inria.fr>
6835
6836 PR c++/59032
6837 * c-typeck.c (build_unary_op): Allow vector increment and decrement.
6838
2fb9a547
AM
68392013-11-22 Andrew MacLeod <amacleod@redhat.com>
6840
6841 * c-typeck.c: Add required include files from gimple.h.
6842
8400e75e
DM
68432013-11-22 David Malcolm <dmalcolm@redhat.com>
6844
6845 * c-decl.c (define_label, shadow_tag_warned)
6846 (check_bitfield_type_and_width, grokdeclarator, grokparms,
6847 store_parm_decls_newstyle, store_parm_decls_oldstyle)
6848 (declspecs_add_type): Remove use of in_system_header macro.
6849 * c-parser.c (c_parser_unary_expression): Likewise.
6850 * c-typeck.c (store_init_value, process_init_element)
6851 (c_start_case): Likewise.
6852
6853 * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
6854 macro.
6855
6856 * c-parser.c (c_parser_set_source_position_from_token): Remove
6857 reference to in_system_header from comment.
6858
386b1f1f
RS
68592013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
6860
6861 * c-decl.c (grokdeclarator): Update comment to refer to
6862 tree_to_[su]hwi rather than tree_low_cst.
6863
ae7e9ddd
RS
68642013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
6865
6866 * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
6867 tree_to_uhwi throughout.
6868
9439e9a1
RS
68692013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
6870
6871 * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
6872 throughout.
6873
9541ffee
RS
68742013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
6875
6876 * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
6877 throughout.
6878
c02065fc
AH
68792013-11-15 Aldy Hernandez <aldyh@redhat.com>
6880
6881 * c-parser.c (c_parser_cilk_simd): New.
6882 (c_parser_cilk_verify_simd): New.
6883 (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
6884 (c_parser_omp_for_loop): Add case for NE_EXPR.
6885 Set c_break_label for CILK_SIMD.
6886 (c_parser_cilk_clause_vectorlength): New.
6887 (c_parser_cilk_clause_linear): New.
6888 (c_parser_cilk_clause_name): New.
6889 (c_parser_cilk_all_clauses): New.
6890 * c-typeck.c (build_unary_op): Pass location argument to
6891 readonly_error.
6892 (build_modify_expr): Same.
6893 (build_asm_expr): Same.
6894 (c_finish_bc_stmt): Error on break/continue in loops.
6895
18f429e2
AM
68962013-11-14 Andrew MacLeod <amacleod@redhat.com>
6897
6898 * c-typeck.c: Include only gimplify.h and gimple.h as needed.
6899
d8a2d370
DN
69002013-11-14 Diego Novillo <dnovillo@google.com>
6901
6902 * c-decl.c: Include print-tree.h.
6903 Include stor-layout.h.
6904 Include varasm.h.
6905 Include attribs.h.
6906 Include stringpool.h.
6907 * c-lang.c: Include fold-const.h.
6908 * c-parser.c: Include stringpool.h.
6909 Include attribs.h.
6910 Include stor-layout.h.
6911 Include varasm.h.
6912 Include trans-mem.h.
6913 * c-typeck.c: Include stor-layout.h.
6914 Include trans-mem.h.
6915 Include varasm.h.
6916 Include stmt.h.
6917
38b7bc7f
JM
69182013-11-13 Joseph Myers <joseph@codesourcery.com>
6919
6920 * c-tree.h (c_typespec_keyword): Add cts_auto_type.
6921 * c-decl.c (declspecs_add_type, finish_declspecs): Handle
6922 __auto_type.
6923 * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
6924 (c_parser_attribute_any_word, c_parser_objc_selector): Handle
6925 RID_AUTO_TYPE.
6926 (c_parser_declspecs): Take argument AUTO_TYPE_OK.
6927 (c_parser_declaration_or_fndef, c_parser_struct_declaration)
6928 (c_parser_declarator, c_parser_direct_declarator_inner)
6929 (c_parser_parameter_declaration, c_parser_type_name): All callers
6930 changed.
6931 (c_parser_declaration_or_fndef): Handle declarations with type
6932 determined from the initializer.
6933
45b0be94
AM
69342013-11-12 Andrew MacLeod <amacleod@redhat.com>
6935
18f429e2 6936 * c-typeck.c: Include gimplify.h.
45b0be94 6937
582d9b50
JM
69382013-11-12 Joseph Myers <joseph@codesourcery.com>
6939
6940 * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
6941 * c-parser.c (c_parser_declspecs): Mention _Thread_local in
6942 comment.
6943 * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
6944 or _Thread_local as appropriate in diagnostics.
6945 (build_null_declspecs): Initialize ret->thread_gnu_p.
6946 (declspecs_add_scspec): Handle either __thread or _Thread_local
6947 for RID_THREAD. Diagnose _Thread_local for pre-C11 standards if
6948 pedantic. Do not disallow _Thread_local extern and _Thread_local
6949 static.
6950
267bac10
JM
69512013-11-07 Joseph Myers <joseph@codesourcery.com>
6952 Andrew MacLeod <amacleod@redhat.com>
6953
6954 * c-aux-info.c (gen_type): Handle atomic qualifier.
6955 * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
6956 qualifiers when compating types.
6957 (shadow_tag_warned): Handle atomic_p in declspecs.
6958 (quals_from_declspecs): Likewise.
6959 (start_decl): Use c_type_promotes_to when promoting argument
6960 types.
6961 (grokdeclarator): Handle _Atomic.
6962 (get_parm_info): Diagnose any qualifier on "void" as only
6963 parameter.
6964 (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
6965 comparing types. Use c_type_promotes_to when promoting argument
6966 types.
6967 (finish_function): Use c_type_promotes_to when promoting argument
6968 types.
6969 (build_null_declspecs): Handle atomic_p in declspecs.
6970 (declspecs_add_qual): Handle RID_ATOMIC.
6971 * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
6972 (c_token_starts_declspecs): Handle RID_ATOMIC.
6973 (c_parser_declspecs): Handle atomic type specifiers and
6974 qualifiers.
6975 (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
6976 from types of expressions with atomic type.
6977 (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
6978 (c_parser_attribute_any_word): Handle RID_ATOMIC.
6979 (c_parser_initializer, c_parser_initelt, c_parser_initval)
6980 (c_parser_statement_after_labels, c_parser_switch_statement)
6981 (c_parser_for_statement, c_parser_expr_no_commas)
6982 (c_parser_conditional_expression, c_parser_binary_expression)
6983 (c_parser_cast_expression, c_parser_unary_expression)
6984 (c_parser_postfix_expression)
6985 (c_parser_postfix_expression_after_primary, c_parser_expression):
6986 Use convert_lvalue_to_rvalue.
6987 (c_parser_expression_conv, c_parser_expr_list): Document
6988 conversion of lvalues to rvalues. Use convert_lvalue_to_rvalue.
6989 (c_parser_objc_synchronized_statement): Use
6990 convert_lvalue_to_rvalue.
6991 (c_parser_objc_selector): Handle RID_ATOMIC.
6992 (c_parser_objc_receiver, c_parser_array_notation): Use
6993 convert_lvalue_to_rvalue.
6994 * c-tree.h (ctsk_typeof): Adjust comment to mention use for
6995 _Atomic (type-name).
6996 (struct c_declspecs): Add atomic_p field.
6997 (convert_lvalue_to_rvalue): Declare.
6998 * c-typeck.c (c_type_promotes_to): Promote atomic types to
6999 corresponding atomic types.
7000 (qualify_type): Don't add _Atomic qualifiers from second argument.
7001 (comp_target_types): Do not allow _Atomic mismatches.
7002 (type_lists_compatible_p): Do not remove atomic qualifiers when
7003 comparing types.
7004 (really_atomic_lvalue, convert_lvalue_to_rvalue)
7005 (build_atomic_assign): New functions.
7006 (build_unary_op): Use build_atomic_assign for atomic increment and
7007 decrement.
7008 (build_conditional_expr): Do not treat _Atomic void as a qualified
7009 version of void.
7010 (build_modify_expr): Use build_atomic_assign for atomic LHS.
7011 (find_anonymous_field_with_type, convert_to_anonymous_field)
7012 (convert_for_assignment): Do not remove atomic qualifiers when
7013 comparing types.
7014 (digest_init): Do not accept initialization of arrays of atomic
7015 elements by string constants.
7016 (build_asm_expr): Use convert_lvalue_to_rvalue.
7017 (build_binary_op): Do not treat _Atomic void as a qualified
7018 version of void.
7019
0c249d4b
DD
70202013-11-06 DJ Delorie <dj@redhat.com>
7021
7022 * c-decl.c (locate_old_decl): If a previous conflicting decl is
7023 both explicit and builtin, print the location of the explicit one.
7024
6d7f7e0a
TB
70252013-11-05 Tobias Burnus <burnus@net-b.de>
7026
7027 * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
7028 c_parser_omp_distribute, c_parser_omp_teams,
7029 c_parser_omp_target, c_parser_omp_declare): Handle
7030 -fopenmp-simd.
7031
b906f4ca
MP
70322013-11-03 Marek Polacek <polacek@redhat.com>
7033
7034 * c-decl.c (grokdeclarator): Add VLA instrumentation.
7035
ee1d5a02
JJ
70362013-11-01 Jakub Jelinek <jakub@redhat.com>
7037
7038 * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
7039 check_dup_generic at the end, unless remove is true.
7040 (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
7041 remove = true;.
7042 (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
7043
5a9785fb
JJ
70442013-10-31 Jakub Jelinek <jakub@redhat.com>
7045
7046 * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
7047 with decl that is not pointer nor array.
7048
939b37da
BI
70492013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
7050
7051 * c-decl.c (finish_function): Added a call for insert_cilk_frame when
7052 a spawning function is found.
7053 * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
7054 (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
7055 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
7056 * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
7057 case.
7058 (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
7059 * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
7060 expr.
7061 (c_finish_return): Added a check to reject _Cilk_spawn in return
7062 expression.
7063 (build_cilk_spawn): New function.
7064 (build_cilk_sync): Likewise.
7065 * Makefile.in (c-decl.o): Added cilk.h in dependency list.
ab20d992 7066
d4af74d4
TB
70672013-10-27 Tobias Burnus <burnus@net-b.de>
7068
7069 PR other/33426
7070 * c-parser.c (c_parser_while_statement, c_parser_while_statement,
7071 c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
7072 (c_parser_statement_after_labels): Update calls.
7073
d73749df 70742013-10-24 Tobias Burnus <burnus@net-b.de>
8170608b
TB
7075
7076 PR other/33426
7077 * c-parser.c (c_parser_pragma, c_parser_for_statement):
7078 Handle PRAGMA_IVDEP.
7079 (c_parser_statement_after_labels): Update call.
7080
f28aa681
MP
70812013-10-24 Marek Polacek <polacek@redhat.com>
7082
7083 * c-parser.c (c_parser_struct_declaration): Add a comment.
7084 (c_parser_declarator): Don't allow _Alignas here.
7085
0645c1a2
AM
70862013-10-17 Andrew MacLeod <amacleod@redhat.com>
7087
7088 * c-parser.c: Include omp-low.h.
7089 * c-typeck.c: Likewise.
7090
568a31f2
MP
70912013-10-17 Marek Polacek <polacek@redhat.com>
7092
7093 PR c/58267
7094 * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
7095 Document syntax of the array-declarator.
7096 (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
7097 are not permitted.
7098 (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
7099 (c_parser_struct_declaration): Likewise.
7100 (c_parser_declarator): Likewise.
7101 (c_parser_direct_declarator_inner): Likewise.
7102 (c_parser_parameter_declaration): Likewise.
7103 (c_parser_type_name): Likewise.
7104
acf0174b
JJ
71052013-10-11 Jakub Jelinek <jakub@redhat.com>
7106
7107 * c-lang.h (current_omp_declare_target_attribute): New extern
7108 decl.
7109 * c-parser.c: Include c-lang.h.
7110 (struct c_parser): Change tokens to c_token *.
7111 Add tokens_buf field. Change tokens_avail type to unsigned int.
7112 (c_parser_consume_token): If parser->tokens isn't
7113 &parser->tokens_buf[0], increment parser->tokens.
7114 (c_parser_consume_pragma): Likewise.
7115 (enum pragma_context): Add pragma_struct and pragma_param.
7116 (c_parser_external_declaration): Adjust
7117 c_parser_declaration_or_fndef caller.
7118 (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
7119 argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
7120 Adjust recursive call.
7121 (c_parser_struct_or_union_specifier): Use pragma_struct instead
7122 of pragma_external.
7123 (c_parser_parameter_declaration): Use pragma_param instead of
7124 pragma_external.
7125 (c_parser_compound_statement_nostart, c_parser_label,
7126 c_parser_for_statement): Adjust
7127 c_parser_declaration_or_fndef callers.
7128 (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
7129 it through to c_parser_conditional_expression.
7130 (c_parser_conditional_expression): Add omp_atomic_lhs argument,
7131 pass it through to c_parser_binary_expression. Adjust recursive
7132 call.
7133 (c_parser_binary_expression): Remove prec argument, add
7134 omp_atomic_lhs argument instead. Always start from PREC_NONE, if
7135 omp_atomic_lhs is non-NULL and one of the arguments of toplevel
7136 binop matches it, use build2 instead of parser_build_binary_op.
7137 (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
7138 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
7139 PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
7140 Handle pragma_struct and pragma_param the same as pragma_external.
7141 (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
7142 (c_parser_omp_variable_list): Parse array sections for
7143 OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
7144 (c_parser_omp_clause_collapse): Fully fold collapse expression.
7145 (c_parser_omp_clause_reduction): Handle user defined reductions.
7146 (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
7147 c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
7148 c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
7149 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
7150 c_parser_omp_clause_depend, c_parser_omp_clause_map,
7151 c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
7152 c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
7153 c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
7154 (c_parser_omp_all_clauses): Add finish_p argument. Don't call
7155 c_finish_omp_clauses if it is false. Handle new OpenMP 4.0 clauses.
7156 (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
7157 present to c_finish_omp_atomic. Handle OpenMP 4.0 atomic forms.
7158 (c_parser_omp_for_loop): Add CODE argument, pass it through
7159 to c_finish_omp_for. Change last argument to cclauses,
7160 and adjust uses to grab parallel clauses from the array of all
7161 the split clauses. Adjust c_parser_binary_expression,
7162 c_parser_declaration_or_fndef and c_finish_omp_for callers.
7163 (omp_split_clauses): New function.
7164 (c_parser_omp_simd): New function.
7165 (c_parser_omp_for): Add p_name, mask and cclauses arguments.
7166 Allow the function to be called also when parsing combined constructs,
7167 and call c_parser_omp_simd when parsing for simd.
7168 (c_parser_omp_sections_scope): If section-sequence doesn't start with
7169 #pragma omp section, require exactly one structured-block instead of
7170 sequence of statements.
7171 (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
7172 Allow the function to be called also when parsing combined constructs.
7173 (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
7174 Allow the function to be called also when parsing combined
7175 constructs.
7176 (c_parser_omp_taskgroup, c_parser_omp_cancel,
7177 c_parser_omp_cancellation_point, c_parser_omp_distribute,
7178 c_parser_omp_teams, c_parser_omp_target_data,
7179 c_parser_omp_target_update, c_parser_omp_target,
7180 c_parser_omp_declare_simd, c_finish_omp_declare_simd,
7181 c_parser_omp_declare_target, c_parser_omp_end_declare_target,
7182 c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
7183 (c_parser_omp_construct): Add p_name and mask vars. Handle
7184 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
7185 PRAGMA_OMP_TEAMS. Adjust c_parser_omp_for, c_parser_omp_parallel
7186 and c_parser_omp_sections callers.
7187 (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
7188 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
7189 OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
7190 (OMP_PARALLEL_CLAUSE_MASK): Likewise. Add OMP_CLAUSE_PROC_BIND.
7191 (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. Add
7192 OMP_CLAUSE_DEPEND.
7193 (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
7194 OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
7195 OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
7196 OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
7197 OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
7198 * c-typeck.c: Include tree-inline.h.
7199 (c_finish_omp_cancel, c_finish_omp_cancellation_point,
7200 handle_omp_array_sections_1, handle_omp_array_sections,
7201 c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
7202 (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
7203 user defined reductions.
7204 (c_tree_equal): New function.
7205 * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
7206 c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
7207 c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
7208 c_check_omp_declare_reduction_r): New prototypes.
7209 * c-decl.c (current_omp_declare_target_attribute): New variable.
7210 (c_decl_attributes): New function.
7211 (start_decl, start_function): Use it instead of decl_attributes.
7212 (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
7213 c_omp_reduction_decl, c_omp_reduction_lookup,
7214 c_check_omp_declare_reduction_r): New functions.
7215
0a6c2227
TT
72162013-09-25 Tom Tromey <tromey@redhat.com>
7217
7218 * Make-lang.in (c/gccspec.o): Remove.
7219 (CFLAGS-c/gccspec.o): New variable.
7220 (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
7221 (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
7222 (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
7223
f3bc55f0
TT
72242013-09-25 Tom Tromey <tromey@redhat.com>
7225
7226 * Make-lang.in (c/gccspec.o): Don't use subshell.
7227
a24d975c
MP
72282013-09-18 Marek Polacek <polacek@redhat.com>
7229
7230 PR sanitize/58443
7231 * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
7232 Remove unnecessary check.
7233
ce6923c5
MP
72342013-09-18 Marek Polacek <polacek@redhat.com>
7235
7236 PR sanitizer/58411
7237 * c-typeck.c (build_binary_op): Don't sanitize function if it has the
7238 no_sanitize_undefined attribute.
7239
a1e51df9
KT
72402013-09-13 Kai Tietz <ktietz@redhat.com>
7241
7242 PR target/57848
7243 * c-decl.c (c_builtin_function_ext_scope): Remove
7244 wrong assumption that it is never called on prexisting
7245 symbol.
7246
0af94e6f
JR
72472013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
7248
7249 * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
7250
20059c8b
GDR
72512013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
7252
7253 * c-objc-common.c (c_tree_printer): Tidy.
7254
de5a5fa1
MP
72552013-08-30 Marek Polacek <polacek@redhat.com>
7256
7257 * c-typeck.c (build_binary_op): Add division by zero and shift
7258 instrumentation.
7259
2531a1d9 72602013-08-26 Joern Rennecke <joern.rennecke@embecosm.com>
0fdd4508 7261 Joseph Myers <joseph@codesourcery.com>
2531a1d9 7262
6e2bcc98 7263 PR c/35649
2531a1d9
JR
7264 * c-typeck.c (c_common_type): Prefer double_type_node over
7265 other REAL_TYPE types with the same precision.
7266 (convert_arguments): Likewise.
7267
025311c4
GDR
72682013-08-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
7269
7270 * c-objc-common.c (c_tree_printer): Document the nature of the cast.
7271 (c_initialize_diagnostics): Call a destructor for the early printer.
7272
da6ca2b5
GDR
72732013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
7274
7275 * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
7276 printer initialization.
7277
318cda85 72782013-08-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
da6ca2b5 7279
318cda85
BI
7280 PR c/57490
7281 * c-array-notation.c (fix_conditional_array_notations_1): Added a
7282 check for truth values.
7283 (expand_array_notation_exprs): Added truth values case. Removed an
7284 unwanted else. Added for-loop to walk through subtrees in default
7285 case.
7286
b066401f
GDR
72872013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
7288
7289 * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
7290
fb48aadc
JM
72912013-07-23 Joseph Myers <joseph@codesourcery.com>
7292
7293 * c-parser.c (struct c_generic_association): Fix typo.
7294
433cc7b0
TT
72952013-07-23 Tom Tromey <tromey@redhat.com>
7296 Joseph Myers <joseph@codesourcery.com>
7297
7298 * c-parser.c (struct c_generic_association): New.
7299 (c_generic_association_d): New typedef.
7300 (c_parser_generic_selection): New function.
7301 (c_parser_postfix_expression): Handle RID_GENERIC.
7302
26d40c3d
JM
73032013-07-13 Jason Merrill <jason@redhat.com>
7304
7305 PR c++/57793
7306 * c-decl.c (finish_struct): Check for too-large class.
7307
ecdbd01a 73082013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
40d3d530
JR
7309
7310 PR c/57821
7311 * c-typeck.c (set_init_index): When folding, check for index overflow.
7312
1141ed3f
BI
73132013-06-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
7314
7315 * c-parser.c (c_parser_array_notation): Removed rejection of array
7316 notations in an array of function pointers.
7317
713b46fa
BI
73182013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
7319
7320 * c-array-notation.c (make_triplet_val_inv): New function.
7321 (create_cmp_incr): Likewise.
7322 (create_array_refs): Likewise.
7323 (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
7324 Also modularized common parts between functions and called the function.
7325 (build_array_notation_expr): Likewise.
7326 (fix_conditional_array_notations_1): Likewise.
7327 (fix_array_notation_expr): Likewise.
7328 (fix_array_notation_call_expr): Likewise.
7329
92f20202
MP
73302013-06-18 Marek Polacek <polacek@redhat.com>
7331
7332 PR c/57630
7333 * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
7334
73a23b06
BI
73352013-06-12 Balaji V. Iyer <balaji.v.iyer@intel.com>
7336
7337 * c-array-notation.c (build_array_notation_expr): Reject array notation
7338 mismatch between LHS and RHS even inside a call_expr. Also, removed
7339 a couple while statements that were dead code.
7340
00b8517d
BI
73412013-06-10 Balaji V. Iyer <balaji.v.iyer@intel.com>
7342
7343 * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
7344 excessive precision expressions in function parameters. Also removed
7345 couple unwanted while statements.
7346
1509bdda
BI
73472013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
7348
7349 * c-array-notation.c (expand_array_notation_exprs): Added
7350 ARRAY_NOTATION_REF case.
ab20d992 7351
d60f1706
BI
73522013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
7353
7354 * c-array-notation.c (length_mismatch_in_expr_p): Moved this
7355 function to c-family/array-notation-common.c.
7356 (is_cilkplus_reduce_builtin): Likewise.
7357 (find_rank): Likewise.
7358 (extract_array_notation_exprs): Likewise.
7359 (replace_array_notations): Likewise.
7360 (find_inv_trees): Likewise.
7361 (replace_inv_trees): Likewise.
7362 (contains_array_notation_expr): Likewise.
7363 (find_correct_array_notation_type): Likewise.
7364 (replace_invariant_exprs): Initialized additional_tcodes to NULL.
7365 (struct inv_list): Moved this to c-family/array-notation-common.c.
7366 * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
ab20d992 7367
6d6efbb3
BI
73682013-06-05 Balaji V. Iyer <balaji.v.iyer@intel.com>
7369
7370 * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
7371 reduction functions outside the for-loop. Added a check if the fundecl
7372 is non-NULL. Finally, removed an unwanted if-statement, and made the
7373 body unconditional.
7374
25c22937
BI
73752013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
7376
7377 * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
7378 condition of the if-statement matches the rank of else-block and then-
7379 block when array notations are used.
7380 * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
7381 expression after the entire function body is parsed.
7382 (c_parser_expr_no_commas): Delayed creating array notation expressions
7383 to the end of function parsing.
7384 * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
7385 whole if-statement instead of just the condition.
ab20d992 7386 (expand_array_notation_exprs): Added MODIFY_EXPR case.
25c22937 7387
edd25645
BI
73882013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
7389
7390 PR c/57474
7391 * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
7392 array to NULL_TREE if they are unused. Also added a check for the
7393 field to be NULL before its fields are used in future.
ab20d992 7394
065ce7f1
RO
73952013-05-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
7396
7397 PR bootstrap/57450
7398 * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
7399 (build_array_notation_expr): Likewise.
7400
36536d79
BI
74012013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
7402
7403 * c-typeck.c (build_array_ref): Added a check to see if array's
7404 index is greater than one. If true, then emit an error.
7405 (build_function_call_vec): Exclude error reporting and checking
7406 for builtin array-notation functions.
7407 (convert_arguments): Likewise.
7408 (c_finish_return): Added a check for array notations as a return
7409 expression. If true, then emit an error.
7410 (c_finish_loop): Added a check for array notations in a loop
7411 condition. If true then emit an error.
7412 (lvalue_p): Added a ARRAY_NOTATION_REF case.
7413 (build_binary_op): Added a check for array notation expr inside
7414 op1 and op0. If present, we call another function to find correct
7415 type.
7416 * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
7417 * c-parser.c (c_parser_compound_statement): Check if array
7418 notation code is used in tree, if so, then transform them into
7419 appropriate C code.
7420 (c_parser_expr_no_commas): Check if array notation is used in LHS
7421 or RHS, if so, then build array notation expression instead of
7422 regular modify.
7423 (c_parser_postfix_expression_after_primary): Added a check for
7424 colon(s) after square braces, if so then handle it like an array
7425 notation. Also, break up array notations in unary op if found.
7426 (c_parser_direct_declarator_inner): Added a check for array
7427 notation.
7428 (c_parser_compound_statement): Added a check for array notation in
7429 a stmt. If one is present, then expand array notation expr.
7430 (c_parser_if_statement): Likewise.
7431 (c_parser_switch_statement): Added a check for array notations in
7432 a switch statement's condition. If true, then output an error.
7433 (c_parser_while_statement): Similarly, but for a while.
7434 (c_parser_do_statement): Similarly, but for a do-while.
7435 (c_parser_for_statement): Similarly, but for a for-loop.
7436 (c_parser_unary_expression): Check if array notation is used in a
7437 pre-increment or pre-decrement expression. If true, then expand
7438 them.
7439 (c_parser_array_notation): New function.
7440 * c-array-notation.c: New file.
7441 * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
ab20d992 7442
cd192ccc
MS
74432013-05-23 Mike Stump <mikestump@comcast.net>
7444
7445 * c-typeck.c (convert_for_assignment): Handle references to memory
7446 spaces better.
7447
427b248d
JM
74482013-05-16 Jason Merrill <jason@redhat.com>
7449
7450 * Make-lang.in (cc1$(exeext)): Use link mutex.
7451
44d90fe1
PC
74522013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
7453
7454 * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
7455 to simply use OPT_Wpointer_arith.
7456 (build_unary_op): Likewise.
7457
4e7d7b3d
JJ
74582013-04-03 Jakub Jelinek <jakub@redhat.com>
7459
7460 PR c/19449
7461 * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
7462 argument. If set, or it temporarily for parsing of the first
7463 argument into force_folding_builtin_constant_p.
7464 (c_parser_postfix_expression): Adjust callers.
7465
839b422f
RB
74662013-03-21 Richard Biener <rguenther@suse.de>
7467
7468 * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
7469 instead of DECL_DEBUG_EXPR_IS_FROM. Guard properly.
7470
2ee028f1
MP
74712013-02-12 Marek Polacek <polacek@redhat.com>
7472
7473 PR c/44938
7474 * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
7475 origtypes to NULL.
7476
8824edff
JJ
74772013-01-24 Jakub Jelinek <jakub@redhat.com>
7478
7479 PR c/56078
7480 * c-typeck.c (set_nonincremental_init_from_string): If
7481 constructor_max_index is NULL, treat it as if tree_int_cst_lt
7482 returned false.
7483 (process_init_element): Likewise.
7484
eadd3d0d
JJ
74852012-12-20 Jakub Jelinek <jakub@redhat.com>
7486
7487 PR c++/55619
7488 * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
7489 argument, don't call default_function_array_conversion
7490 nor c_fully_fold here.
7491 (c_parser_asm_statement): Adjust callers.
7492 * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
7493 and outputs here, and call default_function_array_conversion
7494 on inputs that don't need to be addressable.
7495
f8a93a2e
JJ
74962012-12-18 Jakub Jelinek <jakub@redhat.com>
7497
7498 PR c/39464
7499 * c-typeck.c (convert_for_assignment): For -Wpointer-sign
7500 warning require that both c_common_unsigned_type as well as
7501 c_common_signed_type is the same for both mvl and mvr types.
7502
9771b263
DN
75032012-11-16 Diego Novillo <dnovillo@google.com>
7504
7505 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
7506
7507 * c-common.c: Use new vec API in vec.h.
7508 * c-common.h: Likewise.
7509 * c-gimplify.c: Likewise.
7510 * c-pragma.c: Likewise.
7511 * c-pretty-print.c: Likewise.
7512 * c-pretty-print.h: Likewise.
7513 * c-semantics.c: Likewise.
7514 * c-decl.c: Likewise.
7515 * c-parser.c: Likewise.
7516 * c-tree.h: Likewise.
7517 * c-typeck.c: Likewise.
7518
880661a4
JW
75192012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
7520
7521 PR c++/54930
7522 * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
7523
077d1abe
MLI
75242012-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
7525
7526 PR c/53066
7527 * c-decl.c (warn_if_shadowing): Do not warn if a variable
7528 shadows a function, unless the variable is a function or a
7529 pointer-to-function.
7530
3a785c97
JJ
75312012-10-12 Jakub Jelinek <jakub@redhat.com>
7532
7533 PR c/54381
7534 * c-parser.c (struct c_tree_loc_pair): Removed.
7535 (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
7536 add location_t * and tree * arguments, fill in array of 3
7537 sizeof_arg trees and corresponding locs.
7538 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
7539 c_parser_expr_list callers.
7540 (c_parser_postfix_expression_after_primary): Likewise. Pass
7541 array of 3 sizeof_arg trees and locs (corresponding to first
7542 3 arguments) to sizeof_pointer_memaccess_warning.
7543
703c8606
LC
75442012-10-09 Lawrence Crowl <crowl@google.com>
7545
7546 * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
7547 * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
7548 hash table.
7549
5d9de0d0
PC
75502012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
7551
7552 PR c++/54194
7553 * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
7554 call.
7555
a212e43f
MG
75562012-10-09 Marc Glisse <marc.glisse@inria.fr>
7557
7558 PR c++/54427
7559 * c-typeck.c: Include c-common.h.
7560 (enum stv_conv): Moved to c-common.h.
7561 (scalar_to_vector): Moved to c-common.c.
7562 (build_binary_op): Adapt to scalar_to_vector's new prototype.
7563 * Make-lang.in: c-typeck.c depends on c-common.h.
7564
3b78de56
AC
75652012-10-04 Arnaud Charlet <charlet@adacore.com>
7566
7567 * c-decl.c (c_write_global_declarations): Fix handling of
7568 -fdump-ada-spec*.
7569
78c60e3d
SS
75702012-09-30 Sharad Singhai <singhai@google.com>
7571
7572 * c-decl.c (c_write_global_declarations): Use a different method
7573 to determine if the dump has ben initialized.
7574
9f33203d
JM
75752012-09-14 Joseph Myers <joseph@codesourcery.com>
7576
7577 PR c/54552
7578 * c-typeck.c (c_cast_expr): When casting to a type requiring
7579 C_MAYBE_CONST_EXPR to be created, pass the inner expression to
7580 c_fully_fold first.
7581
a27d595d
JM
75822012-09-14 Joseph Myers <joseph@codesourcery.com>
7583
7584 PR c/54103
7585 * c-typeck.c (build_unary_op): Pass original argument of
7586 TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
7587 any C_MAYBE_CONST_EXPR, if it has integer operands.
7588 (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
7589 TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
7590 to c_objc_common_truthvalue_conversion, then remove any
7591 C_MAYBE_CONST_EXPR, if they have integer operands. Use
7592 c_objc_common_truthvalue_conversion not
7593 c_common_truthvalue_conversion.
7594 (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
7595 call note_integer_operands for arguments with integer operands
7596 that are not integer constants.
7597
9feb29df
JJ
75982012-09-13 Jakub Jelinek <jakub@redhat.com>
7599
7600 PR c/54559
7601 * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
7602 COMPLEX_TYPE with in_late_binary_op set temporarily to true.
7603
d409320c
JJ
76042012-08-31 Jakub Jelinek <jakub@redhat.com>
7605
7606 PR c/54428
7607 * c-convert.c (convert): Don't call fold_convert_loc if
7608 TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
7609 is a COMPLEX_EXPR. Remove TYPE_MAIN_VARIANT check from
7610 COMPLEX_TYPE -> COMPLEX_TYPE conversion.
7611
6265d07c
JJ
76122012-08-24 Jakub Jelinek <jakub@redhat.com>
7613
7614 PR c/54355
7615 * c-decl.c (c_parser_label): Pass true as nested and fix up comments
7616 for nested and empty_ok arguments in the call to
7617 c_parser_declaration_or_fndef.
7618
1a4049e7
JJ
76192012-08-17 Jakub Jelinek <jakub@redhat.com>
7620
7621 * c-tree.h (c_last_sizeof_arg): Declare.
7622 * c-parser.c (struct c_tree_loc_pair): New type.
7623 (c_parser_expr_list): Add sizeof_arg argument. Fill it in if
7624 non-NULL.
7625 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
7626 (c_parser_postfix_expression_after_primary): Likewise. Call
7627 sizeof_pointer_memaccess_warning if needed.
7628 (sizeof_ptr_memacc_comptypes): New function.
7629 * c-typeck.c (c_last_sizeof_arg): New global variable.
7630 (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
7631
0229aee9
UB
76322012-07-24 Uros Bizjak <ubizjak@gmail.com>
7633
7634 * c-lang.h (lang_decl): Add variable_size GTY option.
7635
7ee2468b
SB
76362012-07-16 Steven Bosscher <steven@gcc.gnu.org>
7637
7638 * c-decl.c: Include dumpfile.h instead of tree-dump.h.
7639 * Make-lang.in: Fix dependencies.
7640
d4a10d0a
SB
76412012-06-29 Steven Bosscher <steven@gcc.gnu.org>
7642
7643 * Make-lang.in: New file, rules migrated from gcc/Makefile.in
7644 and add language Makefile hooks.
7645 * config-lang.in: New file.
7646 * c-config-lang.in: Moved from gcc/config-lang.in to here, and
7647 add the required "normal" config-lang.in rules.
7648 * c-lang.h: Moved from gcc/ to here.
7649 * c-tree.h: Likewise.
7650 * c-objc-common.c: Likewise.
7651 * c-objc-common.h: Likewise.
7652 * c-typeck.c: Likewise.
7653 * c-convert.c: Likewise.
7654 * c-lang.c: Likewise.
7655 * c-aux-info.c: Likewise.
7656 * c-errors.c: Likewise.
7657 * gccspec.c: Likewise.
7658 * c-decl.c: Likewise. Include gt-c-c-decl.h, not gt-c-decl.h.
7659 * c-parser.c: Likewise. Include gt-c-c-parser.h, not gt-c-parser.h.
7660\f
c48514be 7661Copyright (C) 2012-2021 Free Software Foundation, Inc.
d4a10d0a
SB
7662
7663Copying and distribution of this file, with or without modification,
7664are permitted in any medium without royalty provided the copyright
7665notice and this notice are preserved.