]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/c/ChangeLog
sim: depend on gnulib
[thirdparty/gcc.git] / gcc / c / ChangeLog
CommitLineData
a7ffc1ef
GA
12021-05-17 Richard Biener <rguenther@suse.de>
2
3 PR c/100625
4 * gimple-parser.c (c_parser_gimple_label): Avoid building
5 a GIMPLE label with NULL label decl.
6
f9af11c7
GA
72021-05-13 Martin Sebor <msebor@redhat.com>
8
9 PR c/100550
10 * c-decl.c (get_parm_array_spec): Avoid erroneous VLA bounds.
11
0ff3a0f2
GA
122021-05-12 Marcel Vollweiler <marcel@codesourcery.com>
13
14 * c-parser.c (c_parser_omp_clause_map): Support map-type-modifier
15 'close'.
16
aa891c56
GA
172021-05-10 Martin Liska <mliska@suse.cz>
18
19 * c-aux-info.c (affix_data_type): Use startswith
20 function instead of strncmp.
21 * c-typeck.c (build_function_call_vec): Likewise.
22 * gimple-parser.c (c_parser_gimple_parse_bb_spec): Likewise.
23
62d87a32
GA
242021-05-07 Eric Botcazou <ebotcazou@adacore.com>
25
26 * c-typeck.c (build_unary_op) <ADDR_EXPR>: Do not issue an error
27 on the address of a pointer field in a record with reverse SSO.
28
99e8df7a
GA
292021-05-04 Tobias Burnus <tobias@codesourcery.com>
30
31 * c-typeck.c (c_finish_omp_clauses): Accept float + complex
32 for || and && reductions.
33
3c8e539d
GA
342021-04-29 Joseph Myers <joseph@codesourcery.com>
35
36 * c-typeck.c (function_types_compatible_p): For C2X, treat
37 unprototyped function as compatible with non-variadic prototyped
38 function even if some argument types are changed by the default
39 argument promotions.
40
ee351f7f
GA
412021-04-15 Martin Sebor <msebor@redhat.com>
42
43 PR c/99420
44 PR c/99972
45 * c-decl.c (pushdecl): Always propagate type attribute.
46
472021-04-15 Richard Sandiford <richard.sandiford@arm.com>
48
49 PR c/98852
50 * c-typeck.c (c_common_type): Do not drop attributes that
51 affect type identity.
52
1d54b138
GA
532021-04-10 Jakub Jelinek <jakub@redhat.com>
54
55 PR c/99990
56 * c-decl.c (finish_decl): Don't overwrite TREE_TYPE of
57 error_mark_node.
58
4493b1c1
GA
592021-03-25 Jakub Jelinek <jakub@redhat.com>
60
61 PR c++/99565
62 * c-typeck.c (build_conditional_expr): Pass OEP_ADDRESS_OF_SAME_FIELD
63 to operand_equal_p.
64
5f256a70
GA
652021-03-19 Jakub Jelinek <jakub@redhat.com>
66
67 PR c/99588
68 * c-typeck.c (mark_exp_read): Recognize what build_atomic_assign
69 with modifycode NOP_EXPR produces and mark the _Atomic var as read
70 if found.
71 (build_atomic_assign): For modifycode of NOP_EXPR, use COMPOUND_EXPRs
72 rather than STATEMENT_LIST. Otherwise call mark_exp_read on lhs.
73 Set TREE_SIDE_EFFECTS on the TARGET_EXPR.
74
3c5b6d24
GA
752021-03-15 Tobias Burnus <tobias@codesourcery.com>
76
77 PR c++/99509
78 * c-decl.c (finish_decl): For 'omp declare target implicit' vars,
79 ensure that the varpool node is marked as offloadable.
80
ceae9533
GA
812021-03-05 Tobias Burnus <tobias@codesourcery.com>
82
83 PR c/99137
84 * c-parser.c (c_parser_oacc_clause_async): Reject comma expressions.
85
4028d01a
GA
862021-02-24 Martin Sebor <msebor@redhat.com>
87
88 PR middle-end/97172
89 * c-decl.c (free_attr_access_data): Clear attribute arg spec.
90
bf81237e
GA
912021-02-18 Jakub Jelinek <jakub@redhat.com>
92
93 PR c/99136
94 * c-typeck.c (c_finish_return): Don't wrap retval into
95 EXCESS_PRECISION_EXPR in functions that return void.
96
0c5cdb31
GA
972021-02-11 Marek Polacek <polacek@redhat.com>
98
99 * c-parser.c (c_parser_if_statement): Use vec_free.
100
a19dd5e6
GA
1012021-02-04 Martin Sebor <msebor@redhat.com>
102
103 PR c/97882
104 * c-decl.c (locate_old_decl): Add type to diagnostic output.
105 (diagnose_mismatched_decls): Same.
106 (start_function): Introduce temporaries for better readability.
107 * c-typeck.c (comptypes_internal): Only consider complete enum
108 types in comparisons with integers.
109
f7884fb1
GA
1102021-02-01 Martin Sebor <msebor@redhat.com>
111
112 PR middle-end/97172
113 * c-decl.c (free_attr_access_data): New function.
114 (c_parse_final_cleanups): Call free_attr_access_data.
115
59cf67d1
GA
1162021-01-16 Kwok Cheung Yeung <kcy@codesourcery.com>
117
118 * c-parser.c (c_parser_omp_clause_detach): New.
119 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_DETACH clause.
120 (OMP_TASK_CLAUSE_MASK): Add mask for PRAGMA_OMP_CLAUSE_DETACH.
121 * c-typeck.c (c_finish_omp_clauses): Handle PRAGMA_OMP_CLAUSE_DETACH
122 clause. Prevent use of detach with mergeable and overriding the
123 data sharing mode of the event handle.
124
2f7f0d32
GA
1252021-01-15 Jakub Jelinek <jakub@redhat.com>
126
127 * c-typeck.c (c_finish_omp_clauses): For reduction build array with
128 unqualified element type and then call c_build_qualified_type on the
129 ARRAY_TYPE.
130
7d187e4f
GA
1312021-01-07 Richard Biener <rguenther@suse.de>
132
133 * gimple-parser.c (c_parser_gimple_compound_statement): Only
134 reallocate loop array if it is too small.
135
eefe499f
GA
1362020-12-16 Martin Uecker <muecker@gwdg.de>
137
138 PR c/98047
139 * c-typeck.c (build_modify_expr): Drop qualifiers.
140
1412020-12-16 Martin Uecker <muecker@gwdg.de>
142
143 PR c/98260
144 * c-parser.c (c_parser_expression): Look into
145 nop expression when marking expressions as read.
146
d52945ce
GA
1472020-12-14 Martin Liska <mliska@suse.cz>
148
149 PR sanitizer/98204
150 * c-typeck.c (pointer_diff): Do not emit a top-level
151 sanitization.
152 (build_binary_op): Likewise.
153
ca2bd949
GA
1542020-12-09 Tobias Burnus <tobias@codesourcery.com>
155
156 * c-parser.c (c_parser_omp_allocate): New.
157 (c_parser_omp_construct): Call it.
158
1592020-12-09 Richard Biener <rguenther@suse.de>
160
161 PR c/98200
162 * gimple-parser.c (c_parser_gimple_postfix_expression): Return
163 early on error.
164
bc8a7013
GA
1652020-12-07 Martin Uecker <muecker@gwdg.de>
166
167 PR c/97981
168 * c-typeck.c (convert_lvalue_to_rvalue): Move the code
169 that drops qualifiers to the end of the function.
170
d48df6f2
GA
1712020-11-26 Martin Uecker <muecker@gwdg.de>
172
173 PR c/65455
174 PR c/92935
175 * c-parser.c (c_parser_declaration_or_fndef): Remove
176 redundant code to drop qualifiers of _Atomic types for __auto_type.
177 (c_parser_typeof_specifier): Do not drop qualifiers of _Atomic
178 types for __typeof__.
179
1e2c9a27
GA
1802020-11-24 Jakub Jelinek <jakub@redhat.com>
181
182 PR c/97958
183 * c-parser.c (c_parser_binary_expression): For omp atomic binary
184 expressions, use make_node instead of build2 to avoid checking build2
185 performs.
186
8e6198d0
GA
1872020-11-23 Joseph Myers <joseph@codesourcery.com>
188
189 PR c/95630
190 * c-typeck.c (build_binary_op): Use pedwarn_c99 with OPT_Wpedantic
191 for comparisons of complete and incomplete pointers.
192
7a97e2fc
GA
1932020-11-21 Aaron Sawdey <acsawdey@linux.ibm.com>
194
195 * c-aux-info.c (gen_type): Support opaque types.
196
82e5048e
GA
1972020-11-20 Martin Sebor <msebor@redhat.com>
198
199 PR middle-end/97879
200 * c-decl.c (start_function): Set ATTR_FLAG_INTERNAL in flags.
201
2022020-11-20 Jakub Jelinek <jakub@redhat.com>
203
204 PR other/97911
205 * Make-lang.in (c.serial): Change from goal to a variable.
206 (.PHONY): Drop c.serial.
207
2082020-11-20 Martin Uecker <muecker@gwdg.de>
209
210 * c-typeck.c (convert_lvalue_to_rvalue): Drop qualifiers.
211
d62586ee
GA
2122020-11-19 Jakub Jelinek <jakub@redhat.com>
213
214 PR c/97860
215 * c-decl.c (get_parm_array_spec): Bail out of nelts is
216 error_operand_p.
217
25bb75f8
GA
2182020-11-18 Jakub Jelinek <jakub@redhat.com>
219
220 * Make-lang.in (c.serial): New goal.
221 (.PHONY): Add c.serial c.prev.
222 (cc1$(exeext)): Call LINK_PROGRESS.
223
77f67db2
GA
2242020-11-13 Vladimir N. Makarov <vmakarov@redhat.com>
225
226 * c-parser.c (c_parser_asm_statement): Parse outputs for asm
227 goto too.
228 * c-typeck.c (build_asm_expr): Remove an assert checking output
229 absence for asm goto.
230
2312020-11-13 Jakub Jelinek <jakub@redhat.com>
232
233 * c-typeck.c (c_finish_omp_clauses): Don't clear
234 OMP_CLAUSE_REDUCTION_INSCAN unless reduction_seen == -2.
235
2362020-11-13 Iain Sandoe <iain@sandoe.co.uk>
237
238 PR objc/77404
239 * c-parser.c (c_parser_objc_class_definition): Pass the
240 location of the class name to the interface declaration.
241
bb622641
GA
2422020-11-10 Strager Neds <strager.nds@gmail.com>
243
244 * c-decl.c (merge_decls): Use new overload of
245 set_decl_section_name.
246
2472020-11-10 Chung-Lin Tang <cltang@codesourcery.com>
248
249 * c-parser.c (c_parser_omp_target_data): Add use of
250 new c_omp_adjust_map_clauses function. Add GOMP_MAP_ATTACH_DETACH as
251 handled map clause kind.
252 (c_parser_omp_target_enter_data): Likewise.
253 (c_parser_omp_target_exit_data): Likewise.
254 (c_parser_omp_target): Likewise.
255 * c-typeck.c (handle_omp_array_sections): Adjust COMPONENT_REF case to
256 use GOMP_MAP_ATTACH_DETACH map kind for C_ORT_OMP region type.
257 (c_finish_omp_clauses): Adjust bitmap checks to allow struct decl and
258 same struct field access to co-exist on OpenMP construct.
259
2da7ee05
GA
2602020-11-07 Martin Uecker <muecker@gwdg.de>
261
262 * c-parser.c (c_parser_label): Implement mixing of labels and code.
263 (c_parser_all_labels): Likewise.
264
44cab2d8
GA
2652020-11-06 Iain Sandoe <iain@sandoe.co.uk>
266
267 * c-parser.c (c_parser_objc_at_property_declaration):
268 Improve parsing fidelity. Associate better location info
269 with @property attributes. Clean up the interface to
270 objc_add_property_declaration ().
271
2722020-11-06 Nathan Sidwell <nathan@acm.org>
273
274 * c-decl.c (diagnose_mismatched_decls): Rename
275 DECL_IS_BUILTIN->DECL_IS_UNDECLARED_BUILTIN.
276 (warn_if_shadowing, implicitly_declare, names_builtin_p)
277 (collect_source_refs): Likewise.
278 * c-typeck.c (inform_declaration, inform_for_arg)
279 (convert_for_assignment): Likewise.
280
2812020-11-06 Tobias Burnus <tobias@codesourcery.com>
282
283 * c-parser.c (c_parser_omp_atomic): Add openacc parameter and update
284 OpenACC matching.
285 (c_parser_omp_construct): Update call.
286
35c125cb
GA
2872020-11-04 Jakub Jelinek <jakub@redhat.com>
288
289 PR c++/97670
290 * c-typeck.c (c_finish_omp_clauses): Look through array reductions to
291 find underlying decl to clear in the aligned_head bitmap.
292
2932020-11-04 Joseph Myers <joseph@codesourcery.com>
294
295 * c-decl.c (handle_nodiscard_attribute): New.
296 (std_attribute_table): Add nodiscard.
297 * c-parser.c (c_parser_std_attribute): Expect argument to
298 nodiscard attribute to be a string. Do not special-case ignoring
299 nodiscard.
300 * c-typeck.c (maybe_warn_nodiscard): New.
301 (build_compound_expr, emit_side_effect_warnings): Call
302 maybe_warn_nodiscard.
303 (c_process_expr_stmt, c_finish_stmt_expr): Also call
304 emit_side_effect_warnings if warn_unused_result.
305
4f0606fe
GA
3062020-10-29 Asher Gordon <AsDaGo@posteo.net>
307
308 * c-typeck.c (free_all_tagged_tu_seen_up_to): Replace free
309 with XDELETE.
310 (finish_init): Likewise.
311 (pop_init_level): Likewise.
312
e93aae4a
GA
3132020-10-28 Joseph Myers <joseph@codesourcery.com>
314
315 * c-decl.c (store_parm_decls_newstyle): Use pedwarn_c11 not
316 error_at for omitted parameter name.
317
3182020-10-28 Jakub Jelinek <jakub@redhat.com>
319
320 * c-parser.c (c_parser_omp_clause_name): Handle allocate.
321 (c_parser_omp_clause_allocate): New function.
322 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_ALLOCATE.
323 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
324 OMP_PARALLEL_CLAUSE_MASK, OMP_SINGLE_CLAUSE_MASK,
325 OMP_TASK_CLAUSE_MASK, OMP_TASKGROUP_CLAUSE_MASK,
326 OMP_DISTRIBUTE_CLAUSE_MASK, OMP_TEAMS_CLAUSE_MASK,
327 OMP_TARGET_CLAUSE_MASK, OMP_TASKLOOP_CLAUSE_MASK): Add
328 PRAGMA_OMP_CLAUSE_ALLOCATE.
329 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_ALLOCATE.
330
89bb01e7
GA
3312020-10-27 Joseph Myers <joseph@codesourcery.com>
332
333 * c-parser.c (c_parser_std_attribute_specifier): Allow duplicate
334 standard attributes.
335
efe71fcc
GA
3362020-10-23 Marek Polacek <polacek@redhat.com>
337
338 PR c++/91741
339 * c-parser.c (c_parser_binary_expression): Implement -Wsizeof-array-div.
340 (c_parser_postfix_expression): Set PAREN_SIZEOF_EXPR.
341 (c_parser_expr_list): Handle PAREN_SIZEOF_EXPR like SIZEOF_EXPR.
342 * c-tree.h (char_type_p): Declare.
343 * c-typeck.c (char_type_p): No longer static.
344
3452020-10-23 Martin Sebor <msebor@redhat.com>
346
347 PR middle-end/97552
348 * c-decl.c (get_parm_array_spec): Handle static VLA parameters.
349
2fe5b7d1
GA
3502020-09-19 Martin Sebor <msebor@redhat.com>
351
352 PR c/50584
353 * c-decl.c (lookup_last_decl): Define new function.
354 (c_decl_attributes): Call it.
355 (start_decl): Add argument and use it.
356 (finish_decl): Call build_attr_access_from_parms and decl_attributes.
357 (get_parm_array_spec): Define new function.
358 (push_parm_decl): Call get_parm_array_spec.
359 (start_function): Call warn_parm_array_mismatch. Build attribute
360 access and add it to current function.
361 * c-parser.c (c_parser_declaration_or_fndef): Diagnose mismatches
362 in forms of array parameters.
363 * c-tree.h (start_decl): Add argument.
364
3652020-09-19 Sandra Loosemore <sandra@codesourcery.com>
366
367 * c-decl.c (c_break_label, c_cont_label): Delete, and replace
368 with...
369 (in_statement): New.
370 (start_function): Adjust for above change.
371 (c_push_function_context, c_pop_function_context): Likewise.
372 * c-lang.h (struct language_function): Likewise.
373 * c-objc-common.h (LANG_HOOKS_BLOCK_MAY_FALLTHRU): Define.
374 * c-parser.c (objc_foreach_break_label, objc_foreach_continue_label):
375 New.
376 (c_parser_statement_after_labels): Adjust calls to c_finish_bc_stmt.
377 (c_parser_switch_statement): Adjust break/switch context handling
378 and calls to renamed functions.
379 (c_parser_while_statement): Adjust break/switch context handling and
380 build a WHILE_STMT.
381 (c_parser_do_statement): Ditto, with DO_STMT respectively.
382 (c_parser_for_statement): Ditto, with FOR_STMT respectively.
383 (c_parser_omp_for_loop): Adjust break/switch context handling.
384 * c-tree.h (c_break_label, c_cont_label): Delete.
385 (IN_SWITCH_STMT, IN_ITERATION_STMT): Define.
386 (IN_OMP_BLOCK, IN_OMP_FOR, IN_OBJC_FOREACH): Define.
387 (in_statement, switch_statement_break_seen_p): Declare.
388 (c_start_case, c_finish_case): Renamed to...
389 (c_start_switch, c_finish_switch).
390 (c_finish_bc_stmt): Adjust arguments.
391 * c-typeck.c (build_function_call_vec): Don't try to print
392 statements with %qE format.
393 (struct c_switch): Rename switch_expr field to switch_stmt.
394 Add break_stmt_seen_p field.
395 (c_start_case): Rename to c_start_switch. Build a SWITCH_STMT
396 instead of a SWITCH_EXPR. Update for changes to struct c_switch.
397 (do_case): Update for changes to struct c_switch.
398 (c_finish_case): Rename to c_finish_switch. Update for changes to
399 struct c_switch and change of representation from SWITCH_EXPR to
400 SWITCH_STMT.
401 (c_finish_loop): Delete.
402 (c_finish_bc_stmt): Update to reflect changes to break/continue
403 state representation. Build a BREAK_STMT or CONTINUE_STMT instead
404 of a GOTO_EXPR except for objc foreach loops.
405
e1a4a8a0
GA
4062020-09-01 Jakub Jelinek <jakub@redhat.com>
407
408 PR c++/96867
409 * c-typeck.c (handle_omp_array_sections_1): Test C_ARRAY_PARAMETER
410 only on PARM_DECLs.
411
8f7ea26a
GA
4122020-08-28 Martin Sebor <msebor@redhat.com>
413
414 PR c/96596
415 * c-decl.c (match_builtin_function_types): Avoid dealing with erroneous
416 argument type.
417
8b394f01
GA
4182020-08-27 Martin Liska <mliska@suse.cz>
419
420 * gimple-parser.c (c_parser_gimple_compound_statement): Set exact argument of a vector
421 growth function to true.
422
db0f6efe
GA
4232020-08-25 Tobias Burnus <tobias@codesourcery.com>
424
425 PR c/96678
426 * c-typeck.c (handle_omp_array_sections_1): Talk about
427 array function parameter in the error message.
428
5c265693
GA
4292020-08-18 Jakub Jelinek <jakub@redhat.com>
430
431 PR c/96571
432 * c-parser.c (c_parser_generic_selection): Change match_found from bool
433 to int, holding index of the match. Call mark_exp_read on the selector
434 expression and on expressions other than the selected one.
435
4967ca2f
GA
4362020-08-01 Richard Sandiford <richard.sandiford@arm.com>
437
438 PR c/96377
439 * c-typeck.c (process_init_element): Split test for whether to
440 recurse into a record, union or array into...
441 (initialize_elementwise_p): ...this new function. Don't recurse
442 into a vector type if the initialization value is also a vector.
443
48cc2e46
GA
4442020-07-31 Richard Biener <rguenther@suse.de>
445
446 PR debug/96383
447 * c-objc-common.h (LANG_HOOKS_FINALIZE_EARLY_DEBUG):
448 Define to c_common_finalize_early_debug.
449
3ea9abca
GA
4502020-07-22 Tobias Burnus <tobias@codesourcery.com>
451
452 * c-parser.c (c_parser_omp_clause_hint): Require nonnegative hint clause.
453 (c_parser_omp_critical): Permit hint(0) clause without named critical.
454 (c_parser_omp_construct): Don't assert if error_mark_node is returned.
455
30430061
GA
4562020-07-21 Sunil K Pandey <skpgkp2@gmail.com>
457
458 PR target/95237
459 * c-decl.c (finish_decl): Call target hook
460 lower_local_decl_alignment to lower local decl alignment.
461
3f8ca9cb
GA
4622020-07-09 Julian Brown <julian@codesourcery.com>
463 Thomas Schwinge <thomas@codesourcery.com>
464
465 PR middle-end/95270
466 * c-typeck.c (c_finish_omp_clauses): Set OMP_CLAUSE_SIZE (bias) to zero
467 for standalone attach/detach clauses.
468
a82c4c4c 4692020-07-08 Eric Botcazou <ebotcazou@adacore.com>
50873cc5
GA
470
471 * c-typeck.c (convert_for_assignment): If -Wscalar-storage-order is
472 set, warn for conversion between pointers that point to incompatible
473 scalar storage orders.
474
f60ee68d
GA
4752020-07-07 Kaipeng Zhou <zhoukaipeng3@huawei.com>
476
477 * c-parser.c (c_parser_statement_after_labels): Pass correct
478 parameters to c_parser_do_statement.
479
56638b9b
GA
4802020-06-16 Jakub Jelinek <jakub@redhat.com>
481
482 * c-parser.c (c_parser_expr_no_commas): Save, clear and restore
483 c_in_omp_for.
484 (c_parser_omp_for_loop): Set c_in_omp_for around some calls to avoid
485 premature c_fully_fold. Defer explicit c_fully_fold calls to after
486 c_finish_omp_for.
487 * c-tree.h (c_in_omp_for): Declare.
488 * c-typeck.c (c_in_omp_for): Define.
489 (build_modify_expr): Avoid c_fully_fold if c_in_omp_for.
490 (digest_init): Likewise.
491 (build_binary_op): Likewise.
492
4932020-06-16 Jakub Jelinek <jakub@redhat.com>
494
495 * c-parser.c (c_parser_omp_clause_schedule): Reject modifier separated
496 from kind by comma rather than colon.
497
1a59f3db
GA
4982020-06-05 Mark Wielaard <mark@klomp.org>
499
500 * c-decl.c (implicit_decl_warning): When warned and olddecl is
501 an undeclared builtin, then add a fixit header hint, if found.
502 (implicitly_declare): Add OPT_Wbuiltin_declaration_mismatch to
503 warning_at about implicit builtin declaration type mismatch.
504
9a5b7438
GA
5052020-06-03 Mark Wielaard <mark@klomp.org>
506
507 * c-parser.c (struct c_parser): Add seen_string_literal
508 bitfield.
509 (c_parser_consume_token): Reset seen_string_literal.
510 (c_parser_error_richloc): Add name_hint if seen_string_literal
511 and next token is a CPP_NAME and we have a missing header
512 suggestion for the name.
513 (c_parser_string_literal): Set seen_string_literal.
514
5152020-06-03 Mark Wielaard <mark@klomp.org>
516
517 * c-parser.c (c_parser_postfix_expression_after_primary): Add
518 scope with matching_parens after CPP_OPEN_PAREN.
519
5202020-06-03 Tobias Burnus <tobias@codesourcery.com>
521
522 * c-objc-common.h (LANG_HOOKS_OMP_PREDETERMINED_MAPPING): Redefine.
523
53ffb43a
GA
5242020-05-28 Nicolas Bértolo <nicolasbertolo@gmail.com>
525
526 * Make-lang.in: Remove extra slash.
527
8f66f175
ML
5282020-05-19 Martin Liska <mliska@suse.cz>
529
530 * c-parser.c: Fix typo.
531
49ddde69
JJ
5322020-05-14 Jakub Jelinek <jakub@redhat.com>
533
534 * c-parser.c (c_parser_omp_target): Set cfun->has_omp_target.
535
eb72dc66
RB
5362020-05-07 Richard Biener <rguenther@suse.de>
537
538 PR middle-end/94703
539 * gimple-parser.c (c_parser_parse_ssa_name): Do not set
540 DECL_GIMPLE_REG_P.
541
bf915591
JJ
5422020-04-30 Jakub Jelinek <jakub@redhat.com>
543
544 PR c/94842
545 * c-decl.c (set_labels_context_r): In addition to context-less
546 LABEL_DECLs adjust also LABEL_DECLs with context equal to
547 parent function if any.
548 (store_parm_decls): Adjust comment.
549
e1113ffb
JJ
5502020-04-19 Jakub Jelinek <jakub@redhat.com>
551
552 PR objc/94637
553 * c-parser.c (c_parser_objc_selector_arg): Handle CPP_SCOPE like
554 two CPP_COLON tokens.
555
2e389749
JJ
5562020-04-17 Jakub Jelinek <jakub@redhat.com>
557
558 PR other/94629
559 * c-parser.c (c_parser_oacc_routine): Remove redundant assignment
560 to data.clauses.
561
2dc9294c
JJ
5622020-04-15 Jakub Jelinek <jakub@redhat.com>
563
564 PR c/94593
565 * c-parser.c (c_parser_pragma) <case PRAGMA_OMP_REQUIRES>: Reject
566 requires directive when not at file scope.
567
13e41d8b
TB
5682020-04-08 Tobias Burnus <tobias@codesourcery.com>
569
570 PR middle-end/94120
571 * c-decl.c (c_check_in_current_scope): New function.
572 * c-tree.h (c_check_in_current_scope): Declare it.
573 * c-parser.c (c_parser_oacc_declare): Add check that variables
574 are declared in the same scope as the directive. Fix handling
575 of namespace vars.
576
4df50a05
JJ
5772020-04-07 Jakub Jelinek <jakub@redhat.com>
578
579 PR c++/94512
580 * c-parser.c (c_parser_omp_parallel): Set OMP_PARALLEL_COMBINED
581 if c_parser_omp_master succeeded.
582
5db9e893
JJ
5832020-03-23 Jakub Jelinek <jakub@redhat.com>
584
585 PR gcov-profile/94029
586 PR c/94239
587 * c-parser.c (c_parser_declaration_or_fndef): Initialize endloc to
588 the function_start_locus location. Don't do that afterwards for the
589 __GIMPLE body parsing.
590
9def91e9
JJ
5912020-03-19 Jakub Jelinek <jakub@redhat.com>
592
593 PR gcov-profile/94029
594 * c-tree.h (finish_function): Add location_t argument defaulted to
595 input_location.
596 * c-parser.c (c_parser_compound_statement): Add endlocp argument and
597 set it to the locus of closing } if non-NULL.
598 (c_parser_compound_statement_nostart): Return locus of closing }.
599 (c_parser_parse_rtl_body): Likewise.
600 (c_parser_declaration_or_fndef): Propagate locus of closing } to
601 finish_function.
602 * c-decl.c (finish_function): Add end_loc argument, use it instead of
603 input_location to set function_end_locus.
604
046c5890
JJ
6052020-03-17 Jakub Jelinek <jakub@redhat.com>
606
607 PR c/94172
608 * c-tree.h (C_TYPE_INCOMPLETE_VARS): Define to TYPE_LANG_SLOT_1
609 instead of TYPE_VFIELD, and support it on {RECORD,UNION,ENUMERAL}_TYPE.
610 (TYPE_ACTUAL_ARG_TYPES): Check that it is only used on FUNCTION_TYPEs.
611 * c-decl.c (pushdecl): Push C_TYPE_INCOMPLETE_VARS also to
612 ENUMERAL_TYPEs.
613 (finish_incomplete_vars): New function, moved from finish_struct. Use
614 relayout_decl instead of layout_decl.
615 (finish_struct): Remove obsolete comment about C_TYPE_INCOMPLETE_VARS
616 being TYPE_VFIELD. Use finish_incomplete_vars.
617 (finish_enum): Clear C_TYPE_INCOMPLETE_VARS. Call
618 finish_incomplete_vars.
619 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
620 also on ENUMERAL_TYPEs.
621
c015ff8c
JJ
6222020-03-16 Jakub Jelinek <jakub@redhat.com>
623
624 PR c/94179
625 * c-fold.c (c_fully_fold_internal): Handle MEM_REF.
626
f2e9fe5f
MS
6272020-03-13 Martin Sebor <msebor@redhat.com>
628
629 PR c/94040
630 * c-decl.c (builtin_structptr_type_count): New constant.
631 (match_builtin_function_types): Reject decls that are incompatible
632 in types pointed to by pointers.
633 (diagnose_mismatched_decls): Adjust comments.
634
c9d70946
JM
6352020-03-05 Joseph Myers <joseph@codesourcery.com>
636
637 PR c/93577
638 * c-typeck.c (pop_init_level): Do not diagnose initializers as
639 empty when initialized type is error_mark_node.
640 (set_designator, process_init_element): Ignore initializers for
641 elements of a variable-size type or of error_mark_node.
642
726e292d
MS
6432020-03-01 Martin Sebor <msebor@redhat.com>
644
645 PR middle-end/93926
646 * c-decl.c (types_close_enough_to_match): New function.
647 (match_builtin_function_types):
648 (diagnose_mismatched_decls): Add missing inform call to a warning.
649
a499c2f8
MS
6502020-03-01 Martin Sebor <msebor@redhat.com>
651
652 PR c/93812
653 * c-typeck.c (build_functype_attribute_variant): New function.
654 (composite_type): Call it.
655
9c3da8cc
JJ
6562020-02-25 Jakub Jelinek <jakub@redhat.com>
657
658 PR other/93912
659 * gimple-parser.c (c_parser_gimple_parse_bb_spec_edge_probability):
660 Rename last argument from probablity to probability.
661
bacdd5e9
JJ
6622020-02-13 Jakub Jelinek <jakub@redhat.com>
663
664 PR c/93576
665 * c-decl.c (grokdeclarator): If this_size_varies, only push size into
666 *expr if it has side effects.
667
f9eb0973
JL
6682020-01-30 Jeff Law <law@redhat.com>
669
670 PR c/88660
671 * c-parser.c (c_parser_switch_statement): Make sure to request
672 marking the switch expr as used.
673
ac68e287
JM
6742020-01-22 Joseph Myers <joseph@codesourcery.com>
675
676 PR c/93348
677 * c-typeck.c (build_c_cast): Call remove_c_maybe_const_expr on
678 argument with integer operands.
679
852f0ae8
KK
6802020-01-16 Kerem Kat <keremkat@gmail.com>
681
682 PR c/92833
683 * c-parser.c (c_parser_consume_token): Fix peeked token stack pop
684 to support 4 available tokens.
685
e2346a33
JM
6862020-01-15 Joseph Myers <joseph@codesourcery.com>
687
688 PR c/93072
689 * c-decl.c (pushdecl): Use TREE_PUBLIC, not DECL_EXTERNAL, to
690 determine whether to set DECL_CONTEXT.
691
3d77686d
JM
6922020-01-13 Joseph Myers <joseph@codesourcery.com>
693
694 PR c/93241
695 * c-typeck.c (build_c_cast): Check for expressions with integer
696 operands that can occur in an unevaluated part of an integer
697 constant expression and call note_integer_operands as needed.
698
f74c4b2c
RB
6992019-01-08 Richard Biener <rguenther@suse.de>
700
701 PR middle-end/93199
702 * gimple-parser.c (c_parser_parse_gimple_body): Remove __PHI IFN
703 permanently.
704
8d9254fc
JJ
7052020-01-01 Jakub Jelinek <jakub@redhat.com>
706
707 Update copyright years.
708
39292e25
EB
7092019-12-20 Eric Botcazou <ebotcazou@adacore.com>
710
711 * c-decl.c (collect_source_ref_cb): Delete.
712 (for_each_global_decl): Rename into...
713 (collect_source_refs): ...this. Call collect_source_ref directly.
714 (c_parse_final_cleanups): Always call collect_source_ref on the main
715 input filename.
716
519d7496
JB
7172019-12-19 Julian Brown <julian@codesourcery.com>
718 Cesar Philippidis <cesar@codesourcery.com>
719
720 * c-parser.c (c_parser_omp_clause_name): Add parsing of attach and
721 detach clauses.
722 (c_parser_omp_variable_list): Add ALLOW_DEREF optional parameter.
723 Allow deref (->) in variable lists if true.
724 (c_parser_omp_var_list_parens): Add ALLOW_DEREF optional parameter.
725 Pass to c_parser_omp_variable_list.
726 (c_parser_oacc_data_clause): Support attach and detach clauses. Update
727 call to c_parser_omp_variable_list.
728 (c_parser_oacc_all_clauses): Support attach and detach clauses.
729 (OACC_DATA_CLAUSE_MASK, OACC_ENTER_DATA_CLAUSE_MASK,
730 OACC_KERNELS_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK,
731 OACC_SERIAL_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_ATTACH.
732 (OACC_EXIT_DATA_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_DETACH.
733 * c-typeck.c (handle_omp_array_sections_1): Reject subarrays for attach
734 and detach. Support deref.
735 (handle_omp_array_sections): Use GOMP_MAP_ATTACH_DETACH instead of
736 GOMP_MAP_ALWAYS_POINTER for OpenACC.
737 (c_oacc_check_attachments): New function.
738 (c_finish_omp_clauses): Check attach/detach arguments for being
739 pointers using above. Support deref.
740
a6163563
JB
7412019-12-19 Julian Brown <julian@codesourcery.com>
742 Maciej W. Rozycki <macro@codesourcery.com>
743 Tobias Burnus <tobias@codesourcery.com>
744 Thomas Schwinge <thomas@codesourcery.com>
745
746 * c-parser.c (c_parser_omp_clause_name): Support no_create.
747 (c_parser_oacc_data_clause): Likewise.
748 (c_parser_oacc_all_clauses): Likewise.
749 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
750 (OACC_PARALLEL_CLAUSE_MASK, OACC_SERIAL_CLAUSE_MASK): Add
751 PRAGMA_OACC_CLAUSE_NO_CREATE.
752 * c-typeck.c (handle_omp_array_sections): Support
753 GOMP_MAP_NO_ALLOC.
754
d68f5d45
DM
7552019-12-09 David Malcolm <dmalcolm@redhat.com>
756
757 * c-objc-common.c (range_label_for_type_mismatch::get_text):
758 Replace label_text ctor calls.
759
4691bf46
JM
7602019-12-04 Joseph Myers <joseph@codesourcery.com>
761
762 PR c/36941
763 PR c/88827
764 * c-typeck.c (convert_lvalue_to_rvalue): Call
765 require_complete_type for arguments not of void types.
766 (build_indirect_ref): Do not diagnose dereferencing pointers to
767 incomplete types.
768 * c-tree.h (C_TYPE_ERROR_REPORTED): Remove.
769
85d11957
JM
7702019-12-03 Joseph Myers <joseph@codesourcery.com>
771
772 PR c/88704
773 * c-decl.c (store_parm_decls_oldstyle): Diagnose use of [*] in
774 old-style parameter definitions.
775
4569f8b3
SL
7762019-12-01 Sandra Loosemore <sandra@codesourcery.com>
777
778 PR target/92499
779
780 * c-decl.c (flexible_array_type_p): Move to common code.
781
65ef05d0
RS
7822019-11-30 Richard Sandiford <richard.sandiford@arm.com>
783
784 * c-decl.c (start_decl): Allow initialization of variables whose
785 size is a POLY_INT_CST.
786 (finish_decl): Use verify_type_context to check whether the target
787 allows variables with a particular type to have static or thread-local
788 storage duration. Don't raise a second error if such variables do
789 not have a constant size.
790 (grokdeclarator): Use verify_type_context to check whether the
791 target allows fields or array elements to have a particular type.
792 * c-typeck.c (pointer_diff): Use verify_type_context to test whether
793 the target allows pointer difference for the types involved.
794 (build_unary_op): Likewise for pointer increment and decrement.
795
34b43828
JM
7962019-11-29 Joseph Myers <joseph@codesourcery.com>
797
798 * c-parser.c (struct c_parser): Add members raw_tokens and
799 raw_tokens_used.
800 (c_lex_one_token): Add argument raw. Handle lexing raw tokens and
801 using previously-lexed raw tokens.
802 (c_parser_peek_nth_token_raw)
803 (c_parser_check_balanced_raw_token_sequence): New functions.
804 (c_parser_nth_token_starts_std_attributes): Use
805 c_parser_check_balanced_raw_token_sequence for Objective-C.
806
5b8d9367
JM
8072019-11-25 Joseph Myers <joseph@codesourcery.com>
808
809 PR c/91985
810 * c-decl.c (finish_declspecs): Use int instead of decimal
811 floating-point types if decimal floating-point not supported.
812
1723e1be
JM
8132019-11-25 Joseph Myers <joseph@codesourcery.com>
814
815 * c-tree.h (struct c_declarator): Use a structure for id member.
816 * c-decl.c (grokdeclarator): Extract attributes from cdk_id
817 declarators at the start, not when handling individual declarators
818 later. Use u.id.id instead of u.id.
819 (grokfield): Use u.id.id instead of u.id.
820 (build_id_declarator): Set u.id.id and u.id.attrs.
821 (finish_declspecs): Handle postfix attributes in case of typedef
822 name or typeof used.
823 * c-parser.c (c_parser_direct_declarator)
824 (c_parser_direct_declarator_inner): Place declarator for
825 attributes inside that for function or array, not outside. Set
826 u.id.attrs for identifiers.
827 (c_parser_parameter_declaration): Use u.id.id instead of u.id.
828 * gimple-parser.c (c_parser_gimple_declaration): Use u.id.id
829 instead of u.id.
830
bdaf8be1
JJ
8312019-11-22 Jakub Jelinek <jakub@redhat.com>
832
833 PR c/90677
834 * c-decl.c (identifier_global_tag): Define.
835
3e00ba47
RB
8362019-11-20 Richard Biener <rguenther@suse.de>
837
838 PR c/92088
839 * c-decl.c (grokdeclarator): Prevent inlining of nested
840 function with VLA arguments.
841
8c5b727a
JM
8422019-11-20 Joseph Myers <joseph@codesourcery.com>
843
844 * c-decl.c (c_warn_type_attributes): New function.
845 (groktypename, grokdeclarator, finish_declspecs): Call
846 c_warn_type_attributes before applying attributes to types.
847 * c-tree.h (c_warn_type_attributes): Declare.
848
192961ff
JM
8492019-11-19 Joseph Myers <joseph@codesourcery.com>
850
851 * c-decl.c (c_warn_unused_attributes): Use pedwarn not warning for
852 standard attributes.
853 * c-parser.c (c_parser_std_attribute): Take argument for_tm. Use
854 pedwarn for unknown standard attributes and return error_mark_node
855 for them.
856
20a38017
MM
8572019-11-18 Matthew Malcomson <matthew.malcomson@arm.com>
858
859 * c-parser.c (c_parser_parse_rtl_body): Always call
860 run_rtl_passes, even if startwith pass is not provided.
861
d5fbe5e0
JM
8622019-11-15 Joseph Myers <joseph@codesourcery.com>
863
864 * c-parser.c (c_parser_std_attribute_specifier): Diagnose
865 duplicate standard attributes.
866
97cc1187
JM
8672019-11-15 Joseph Myers <joseph@codesourcery.com>
868
869 * c-decl.c (std_attribute_table): Add maybe_unused.
870
f8aea5e3
JM
8712019-11-15 Joseph Myers <joseph@codesourcery.com>
872
873 * c-decl.c (std_attribute_table): Add fallthrough.
874 * c-parser.c (c_parser_declaration_or_fndef): Diagnose fallthrough
875 attribute at top level.
876
2cc94aa8
JM
8772019-11-15 Joseph Myers <joseph@codesourcery.com>
878
879 * c-decl.c (std_attribute_table): New.
880 (c_init_decl_processing): Register attributes from
881 std_attribute_table.
882 * c-parser.c (c_parser_attribute_arguments): Add arguments
883 require_string and allow_empty_args. All callers changed.
884 (c_parser_std_attribute): Set require_string argument for
885 "deprecated" attribute.
886
7c5890cc
JM
8872019-11-14 Joseph Myers <joseph@codesourcery.com>
888
889 * c-parser.c (c_parser_postfix_expression)
890 (c_parser_check_literal_zero): Handle CPP_UTF8CHAR.
891 * gimple-parser.c (c_parser_gimple_postfix_expression): Likewise.
892
e8738f4e
RS
8932019-11-14 Richard Sandiford <richard.sandiford@arm.com>
894
895 * c-typeck.c (build_conditional_expr): Use truth_type_for instead
896 of build_same_sized_truth_vector_type.
897 (build_vec_cmp): Likewise.
898
b2417b59
JJ
8992019-11-14 Jakub Jelinek <jakub@redhat.com>
900
bedb7f04
JJ
901 * c-parser.c (c_parser_omp_context_selector): Don't require score
902 argument to fit into shwi, just to be INTEGER_CST. Diagnose
903 negative score.
904
b2417b59
JJ
905 * c-parser.c (c_parser_omp_context_selector): Rename
906 CTX_PROPERTY_IDLIST to CTX_PROPERTY_NAME_LIST, add CTX_PROPERTY_ID.
907 Use CTX_PROPERTY_ID for atomic_default_mem_order, only allow a single
908 identifier in that. For CTX_PROPERTY_NAME_LIST, allow identifiers
909 and string literals.
910
4e03c3a7
JM
9112019-11-14 Joseph Myers <joseph@codesourcery.com>
912
913 * c-tree.h (enum c_typespec_kind): Add ctsk_tagref_attrs and
914 ctsk_tagfirstref_attrs.
915 (struct c_declspecs): Update description of attrs. Add
916 postfix_attrs and non_std_attrs_seen_p. Increase size of
917 typespec_kind bit-field.
918 (c_warn_unused_attributes): New declaration.
919 (parser_xref_tag): Update prototype.
920 * c-decl.c (c_warn_unused_attributes): New function.
921 (shadow_tag_warned): Handle ctsk_tagfirstref_attrs and
922 ctsk_tagref_attrs. Handle attribute declarations.
923 (check_compound_literal_type): Handle ctsk_tagfirstref_attrs.
924 (grokdeclarator): Handle standard attributes.
925 (parser_xref_tag): Add arguments have_std_attrs and attrs. Apply
926 attributes to incomplete type reference.
927 (xref_tag): Update call to parser_xref_tag.
928 (declspecs_add_addrspace, declspecs_add_type)
929 (declspecs_add_scspec, declspecs_add_attrs): Set
930 non_std_attrs_seen_p.
931 (finish_declspecs): Apply postfix standard attributes to type.
932 * c-parser.c (c_token_starts_declspecs)
933 (c_token_starts_declaration, c_parser_next_token_starts_declspecs)
934 (c_parser_next_tokens_start_declaration): Update comments.
935 (c_parser_consume_token, c_parser_consume_pragma): Handle moving
936 parser->tokens[2] to parser->tokens[1].
937 (c_parser_nth_token_starts_std_attributes)
938 (c_parser_std_attribute_specifier_sequence): New functions.
939 (c_parser_declaration_or_fndef): Add arguments have_attrs and
940 attrs. All callers changed. Handle standard attributes.
941 (c_parser_parms_declarator, c_parser_parms_list_declarator)
942 (c_parser_parameter_declaration): Add argument have_gnu_attrs.
943 All callers changed.
944 (c_parser_declspecs): Add arguments start_std_attr_ok and
945 end_std_attr_ok. All callers changed. Handle standard
946 attributes.
947 (c_parser_enum_specifier, c_parser_struct_or_union_specifier)
948 (c_parser_direct_declarator, c_parser_direct_declarator_inner)
949 (c_parser_compound_statement_nostart, c_parser_all_labels)
950 (c_parser_label, c_parser_statement, c_parser_for_statement):
951 Handle standard attributes.
952 * c-parser.h (c_parser_declspecs): Update prototype.
953 * gimple-parser.c (c_parser_gimple_declaration): Update call to
954 c_parser_declspecs.
955
0c29cac4
ML
9562019-11-12 Martin Liska <mliska@suse.cz>
957
958 * gimple-parser.c: Do not include params.h.
959
028d4092
ML
9602019-11-12 Martin Liska <mliska@suse.cz>
961
962 * gimple-parser.c (c_parser_parse_gimple_body): Replace old parameter syntax
963 with the new one, include opts.h if needed. Use SET_OPTION_IF_UNSET
964 macro.
965
62aee289
MR
9662019-11-12 Maciej W. Rozycki <macro@codesourcery.com>
967 Frederik Harwath <frederik@codesourcery.com>
968
969 gcc/c/
970 * c-parser.c (OACC_SERIAL_CLAUSE_MASK): New macro.
971 (c_parser_oacc_kernels_parallel): Rename function to...
972 (c_parser_oacc_compute): ... this. Handle PRAGMA_OACC_SERIAL.
973 (c_parser_omp_construct): Update accordingly.
974
975
7cec9588
JJ
9762019-11-11 Jakub Jelinek <jakub@redhat.com>
977
978 * c-parser.c (c_parser_translation_unit): Diagnose declare target
979 without corresponding end declare target.
980
f486280c
RS
9812019-11-08 Richard Sandiford <richard.sandiford@arm.com>
982
983 * c-convert.c (convert): Only handle vector conversions if one of
984 the types satisfies gnu_vector_type_p or if -flax-vector-conversions
985 allows it.
986 * c-typeck.c (build_array_ref): Only allow vector indexing if the
987 vectors satisfy gnu_vector_type_p.
988 (build_unary_op): Only allow unary operators to be applied to
989 vectors if they satisfy gnu_vector_type_p.
990 (digest_init): Only allow by-element initialization of vectors
991 if they satisfy gnu_vector_type_p.
992 (really_start_incremental_init): Likewise.
993 (push_init_level): Likewise.
994 (pop_init_level): Likewise.
995 (process_init_element): Likewise.
996 (build_binary_op): Only allow binary operators to be applied to
997 vectors if they satisfy gnu_vector_type_p.
998
017c6491
JM
9992019-11-08 Joseph Myers <joseph@codesourcery.com>
1000
1001 * c-decl.c (grokparms): Convert () in a function definition to
1002 (void) for C2x.
1003 (store_parm_decls_oldstyle): Pedwarn for C2x.
1004 (store_parm_decls): Update comment about () not generating a
1005 prototype.
1006
c01bd174
JM
10072019-11-07 Joseph Myers <joseph@codesourcery.com>
1008
1009 * c-parser.c (c_parser_attribute_arguments): New function.
1010 Factored out of c_parser_gnu_attribute.
1011 (c_parser_gnu_attribute): Use c_parser_attribute_arguments.
1012 (c_parser_balanced_token_sequence, c_parser_std_attribute)
1013 (c_parser_std_attribute_specifier): New functions.
1014 (c_parser_transaction_attributes): Use
1015 c_parser_std_attribute_specifier.
1016
471c5330
JM
10172019-11-07 Joseph Myers <joseph@codesourcery.com>
1018
1019 * c-parser.c (c_parser): Remove lex_untranslated_string. Add
1020 lex_joined_string and translate_strings_p.
1021 (c_lex_one_token): Pass 0 or C_LEX_STRING_NO_JOIN to
1022 c_lex_with_flags.
1023 (c_parser_string_literal): New function.
1024 (c_parser_static_assert_declaration_no_semi): Use
1025 c_parser_string_literal. Do not set lex_untranslated_string.
1026 (c_parser_asm_string_literal): Use c_parser_string_literal.
1027 (c_parser_simple_asm_expr): Do not set lex_untranslated_string.
1028 (c_parser_gnu_attributes): Set and restore translate_strings_p
1029 instead of lex_untranslated_string.
1030 (c_parser_asm_statement): Do not set lex_untranslated_string.
1031 (c_parser_asm_operands): Likewise.
1032 (c_parser_has_attribute_expression): Set and restore
1033 translate_strings_p instead of lex_untranslated_string.
1034 (c_parser_postfix_expression): Use c_parser_string_literal.
1035 (pragma_lex): Likewise.
1036 (c_parser_pragma_pch_preprocess): Set lex_joined_string.
1037 (c_parse_file): Set translate_strings_p.
1038 * gimple-parser.c (c_parser_gimple_postfix_expression)
1039 (c_parser_gimple_or_rtl_pass_list): Use c_parser_string_literal.
1040 * c-parser.c (c_parser_string_literal): Declare function.
1041
d0c464d2
JJ
10422019-11-02 Jakub Jelinek <jakub@redhat.com>
1043
1044 * c-parser.c (c_finish_omp_declare_variant): Use
1045 omp_get_context_selector instead of c_omp_get_context_selector.
1046
ac2cfa6c
RS
10472019-10-29 Richard Sandiford <richard.sandiford@arm.com>
1048
1049 * c-tree.h (c_simulate_enum_decl): Declare.
1050 * c-decl.c (c_simulate_enum_decl): New function.
1051 * c-objc-common.h (LANG_HOOKS_SIMULATE_ENUM_DECL): Define to the above.
1052
74078538
RS
10532019-10-29 Richard Sandiford <richard.sandiford@arm.com>
1054
1055 * c-tree.h (c_simulate_builtin_function_decl): Declare.
1056 * c-decl.c (c_simulate_builtin_function_decl): New function.
1057 * c-objc-common.h (LANG_HOOKS_SIMULATE_BUILTIN_FUNCTION_DECL): Define
1058 to the above.
1059
ad1539d5
MS
10602019-10-28 Martin Sebor <msebor@redhat.com>
1061
1062 PR c/66970
1063 * c-decl.c (names_builtin_p): Define a new function.
1064
cb73e4e7
RB
10652019-10-28 Richard Biener <rguenther@suse.de>
1066
1067 PR c/92249
1068 * gimple-parser.c (c_parser_parse_gimple_body): Make
1069 current_bb the entry block initially to easier recover
1070 from errors.
1071 (c_parser_gimple_compound_statement): Adjust.
1072
135df52c
JJ
10732019-10-24 Jakub Jelinek <jakub@redhat.com>
1074
1075 * c-parser.c (c_finish_omp_declare_variant): Use
1076 omp_context_selector_matches instead of
1077 c_omp_context_selector_matches.
1078 * c-decl.c (c_decl_attributes): Add "omp declare target block"
1079 attribute in between declare target and end declare target
1080 pragmas.
1081
783bfe5e
JM
10822019-10-15 Joseph Myers <joseph@codesourcery.com>
1083
1084 * c-parser.c (c_parser_attribute_any_word): Rename to
1085 c_parser_gnu_attribute_any_word. All callers changed.
1086 (c_parser_attribute): Rename to c_parser_gnu_attribute. All
1087 callers changed.
1088 (c_parser_attributes): Rename to c_parser_gnu_attributes. All
1089 callers changed.
1090 (c_parser_declaration_or_fndef, c_parser_declspecs)
1091 (c_parser_enum_specifier, c_parser_struct_or_union_specifier)
1092 (c_parser_struct_declaration, c_parser_declarator)
1093 (c_parser_gnu_attribute, c_parser_compound_statement)
1094 (c_parser_label, c_parser_statement, c_parser_objc_method_decl)
1095 (c_parser_transaction_attributes): Add "gnu-" prefix to names of
1096 attribute-related syntax productions.
1097
56898e43
RS
10982019-10-14 Richard Sandiford <richard.sandiford@arm.com>
1099
1100 * c-objc-common.c (useful_aka_type_p): Replace with...
1101 (get_aka_type): ...this new function. Given the original type,
1102 decide which aka type to print (if any). Only look through typedefs
1103 if user_facing_original_type_p.
1104 (print_type): Update accordingly.
1105
b9424661
JJ
11062019-10-14 Jakub Jelinek <jakub@redhat.com>
1107
1108 * c-parser.c (c_parser_omp_all_clauses): Change bool NESTED_P argument
1109 into int NESTED, if it is 2, diagnose missing commas in between
1110 clauses.
1111 (c_parser_omp_context_selector): Pass 2 as last argument to
1112 c_parser_omp_all_clauses.
1113
20de9568
JJ
11142019-10-12 Jakub Jelinek <jakub@redhat.com>
1115
1116 * c-parser.c (c_parser_omp_context_selector): Improve error recovery.
1117 For simd properties, put them directly into TREE_VALUE.
1118 (c_finish_omp_declare_variant): Call c_omp_mark_declare_variant.
1119 If c_omp_context_selector_matches is 0, don't add attribute, otherwise
1120 add "omp declare variant base" attribute rather than
1121 "omp declare variant".
1122
fe2bc27c
JM
11232019-10-11 Joseph Myers <joseph@codesourcery.com>
1124
1125 * c-decl.c (declspecs_add_type): Use pedwarn_c11 for DFP types.
1126
94e7f906
JJ
11272019-10-10 Jakub Jelinek <jakub@redhat.com>
1128
1129 * c-parser.c (c_parser_omp_all_clauses): Add NESTED_P argument, if
1130 true, terminate processing on closing paren and don't skip to end of
1131 pragma line.
1132 (c_parser_omp_declare_simd): Handle also declare variant.
1133 (omp_construct_selectors, omp_device_selectors,
1134 omp_implementation_selectors, omp_user_selectors): New variables.
1135 (c_parser_omp_context_selector,
1136 c_parser_omp_context_selector_specification,
1137 c_finish_omp_declare_variant): New functions.
1138 (c_finish_omp_declare_simd): Handle both declare simd and
1139 declare variant.
1140 (c_parser_omp_declare): Handle declare variant.
1141
93313b94
JM
11422019-10-02 Joseph Myers <joseph@codesourcery.com>
1143
1144 * c-parser.c (c_parser_asm_statement): Handle CPP_SCOPE like two
1145 CPP_COLON tokens.
1146
55879815
RS
11472019-10-01 Richard Sandiford <richard.sandiford@arm.com>
1148
1149 * c-objc-common.c (useful_aka_type_p): New function.
1150 (print_type): Use it to decide whether an aka type is worth printing.
1151
59bc434a
JJ
11522019-09-27 Jakub Jelinek <jakub@redhat.com>
1153
1154 PR c++/88203
1155 * c-parser.c (c_parser_predefined_identifier): New function.
1156 (c_parser_postfix_expression): Use it.
1157 (c_parser_omp_variable_list): Parse predefined identifiers.
1158 * c-typeck.c (c_finish_omp_clauses): Allow predefined variables
1159 in shared and firstprivate clauses, even when they are predetermined
1160 shared.
1161
c6447c20
RS
11622019-09-27 Richard Sandiford <richard.sandiford@arm.com>
1163
1164 * c-typeck.c (build_function_call_vec): Take the original function
1165 decl as an optional final parameter. Pass all built-in calls to
1166 check_builtin_function_arguments.
1167
522da4c2
EB
11682019-09-20 Eric Botcazou <ebotcazou@adacore.com>
1169
1170 PR c/91815
1171 * c-decl.c (pushdecl): In C detect duplicate declarations across scopes
1172 of identifiers in the external scope only for variables and functions.
1173
68e2c199
PK
11742019-09-04 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1175
1176 PR c/78736
1177 * c-typeck.c (convert_for_assignment): Handle Wenum-conversion.
1178
22f8849d
IS
11792019-08-23 Iain Sandoe <iain@sandoe.co.uk>
1180
1181 PR pch/61250
1182 * c-parser.c (c_parse_file): Call c_common_no_more_pch ()
1183 after determining that the first token is not
1184 PRAGMA_GCC_PCH_PREPROCESS.
1185
db376f45
EB
11862019-08-22 Eric Botcazou <ebotcazou@adacore.com>
1187
1188 * c-parser.c (c_parser_declaration_or_fndef): Set DECL_ARGUMENTS of a
1189 FUNCTION_DECL to the right value in the presence of nested declarators.
1190
4d732405
RS
11912019-08-13 Richard Sandiford <richard.sandiford@arm.com>
1192
1193 PR middle-end/91421
1194 * c-decl.c (merge_decls): Use copy_decl_built_in_function.
1195
cb1180d5
RS
11962019-08-13 Richard Sandiford <richard.sandiford@arm.com>
1197
1198 PR middle-end/91421
1199 * c-decl.c (header_for_builtin_fn): Take a FUNCTION_DECL instead
1200 of a built_in_function.
1201 (diagnose_mismatched_decls, implicitly_declare): Update accordingly.
1202
77eb117f
JJ
12032019-08-10 Jakub Jelinek <jakub@redhat.com>
1204
1205 * c-parser.c (c_parser_omp_clause_name): Parse device_type.
1206 (c_parser_omp_clause_device_type): New function.
1207 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_DEVICE_TYPE.
1208 (OMP_DECLARE_TARGET_CLAUSE_MASK): Add PRAGMA_OMP_CLAUSE_DEVICE_TYPE.
1209 (c_parser_omp_declare_target): Handle device_type clauses. Remove
1210 diagnostics for declare target with clauses nested in clause-less
1211 declare target declaration-definition-seq.
1212 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_DEVICE_TYPE.
1213
2c3b8bad
JJ
12142019-08-09 Jakub Jelinek <jakub@redhat.com>
1215
bb522e2e
JJ
1216 * c-parser.c (check_no_duplicate_clause): Simplify using
1217 omp_find_clause.
1218 (c_parser_omp_clause_if): Fix up printing of target {enter,exit} data
1219 directive name modifiers.
1220 (c_parser_omp_clause_proc_bind): Check for duplicate proc_bind clause.
1221
2c3b8bad
JJ
1222 PR c/91401
1223 * c-parser.c (c_parser_omp_clause_dist_schedule): Fix up typos in the
1224 check_no_duplicate_clause call. Comment it out, instead emit a
1225 warning for duplicate dist_schedule clauses.
1226
99769e7f
RS
12272019-08-08 Richard Sandiford <richard.sandiford@arm.com>
1228
1229 * c-decl.c (finish_enum): Clear C_TYPE_BEING_DEFINED.
1230
8860d270
JJ
12312019-08-08 Jakub Jelinek <jakub@redhat.com>
1232
1233 * c-typeck.c (c_finish_omp_clauses): For C_ORT_OMP
1234 OMP_CLAUSE_USE_DEVICE_* clauses use oacc_reduction_head bitmap
1235 instead of generic_head to track duplicates.
1236
398e3feb
JJ
12372019-08-07 Jakub Jelinek <jakub@redhat.com>
1238
1239 * c-parser.c (c_parser_omp_clause_name): Parse use_device_addr clause.
1240 (c_parser_omp_clause_use_device_addr): New function.
1241 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR.
1242 (OMP_TARGET_DATA_CLAUSE_MASK): Add PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR.
1243 (c_parser_omp_target_data): Handle PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR
1244 like PRAGMA_OMP_CLAUSE_USE_DEVICE_PTR, adjust diagnostics about no
1245 map or use_device_* clauses.
1246 * c-typeck.c (c_finish_omp_clauses): For OMP_CLAUSE_USE_DEVICE_PTR
1247 in OpenMP, require pointer type rather than pointer or array type.
1248 Handle OMP_CLAUSE_USE_DEVICE_ADDR.
1249
a28351e7
JJ
12502019-07-31 Jakub Jelinek <jakub@redhat.com>
1251
1252 PR c/91192
1253 * c-parser.c (c_parser_sizeof_expression): Call set_c_expr_source_range
1254 even if finish is UNKNOWN_LOCATION, just use start as finish in that
1255 case.
1256
6343b6bf
ML
12572019-07-25 Martin Liska <mliska@suse.cz>
1258 Dominik Infuhr <dominik.infuehr@theobroma-systems.com>
1259
1260 PR c++/23383
1261 * c-decl.c (merge_decls): Merge OPERATOR_DELETE flag.
1262
cb50701e
ML
12632019-07-25 Martin Liska <mliska@suse.cz>
1264
1265 * c-decl.c (merge_decls): Use new macros
1266 (e.g. DECL_SET_LAMBDA_FUNCTION and DECL_LAMBDA_FUNCTION_P).
1267
62e3e66f
RB
12682019-07-23 Richard Biener <rguenther@suse.de>
1269
1270 PR tree-optimization/83518
1271 * gimple-parser.c (c_parser_parse_gimple_body): When we have
1272 a CFG also rebuild cgraph edges.
1273
554a530f
JJ
12742019-07-20 Jakub Jelinek <jakub@redhat.com>
1275
1276 * c-parser.c (c_parser_omp_clause_name): Handle bind clause.
1277 (c_parser_omp_clause_bind): New function.
1278 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_BIND.
1279 (OMP_LOOP_CLAUSE_MASK): Define.
1280 (c_parser_omp_loop): New function.
1281 (c_parser_omp_parallel, c_parser_omp_teams): Handle parsing of
1282 loop combined with parallel or teams.
1283 (c_parser_omp_construct): Handle PRAGMA_OMP_LOOP.
1284 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_BIND.
1285
d119bf79
RS
12862019-07-18 Richard Sandiford <richard.sandiford@arm.com>
1287
1288 PR c/53633
1289 * c-decl.c (finish_function): Check targetm.warn_func_return
1290 before issuing a -Wreturn-type warning.
1291
ab20d992 12922019-07-12 Alexandre Oliva <oliva@adacore.com>
fdc1f343
AO
1293
1294 * gimple-parser.c (c_parser_gimple_try_stmt): New.
1295 (c_parser_compound_statement): Call it.
1296
1fdd6f04
JJ
12972019-07-12 Jakub Jelinek <jakub@redhat.com>
1298
1299 * c-parser.c (c_parser_omp_clause_name): Handle order clause.
1300 (c_parser_omp_clause_order): New function.
1301 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_ORDER.
1302 (OMP_SIMD_CLAUSE_MASK, OMP_FOR_CLAUSE_MASK): Add
1303 PRAGMA_OMP_CLAUSE_ORDER.
1304 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_ORDER.
1305
8389386c
RB
13062019-07-10 Richard Biener <rguenther@suse.de>
1307
1308 * gimple-parser.c (c_parser_gimple_postfix_expression): Support
1309 _Literal (int *) &x for address literals.
1310
99b1c316
MS
13112019-07-09 Martin Sebor <msebor@redhat.com>
1312
1313 PR c++/61339
1314 * c-decl.c (xref_tag): Change class-key of PODs to struct and others
1315 to class.
1316 (field_decl_cmp): Same.
1317 * c-parser.c (c_parser_struct_or_union_specifier): Same.
1318 * c-tree.h: Same.
1319 * gimple-parser.c (c_parser_gimple_compound_statement): Same.
1320
6c1dae73
MS
13212019-07-09 Martin Sebor <msebor@redhat.com>
1322
1323 PR c++/61339
1324 * c-decl.c: Change class-key from class to struct and vice versa
1325 to match convention and avoid -Wclass-is-pod and -Wstruct-no-pod.
1326 * gimple-parser.c: Same.
1327
69b5279e
RB
13282019-07-01 Richard Biener <rguenther@suse.de>
1329
1330 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
1331 _Literal (char *) &"foo" for address literals pointing to
1332 STRING_CSTs.
1333
ab20d992
JJ
13342019-06-25 Jozef Lawrynowicz <jozef.l@mittosystems.com>
1335
1336 * c-parser.c (c_parse_init): Create keyword for "__intN__" type.
1337 * c-decl.c (declspecs_add_type): Don't pedwarn about "__intN" ISO
1338 C incompatibility if alternate "__intN__" form is used.
1339
1e3d475e
MS
13402019-06-24 Martin Sebor <msebor@redhat.com>
1341
1342 * c-typeck.c (build_binary_op): Hyphenate floating-point.
1343
bf38f7e9
JJ
13442019-06-10 Jakub Jelinek <jakub@redhat.com>
1345
1346 * c-parser.c (c_parser_pragma): Reject PRAGMA_OMP_SCAN.
1347 (c_parser_omp_clause_reduction): Don't sorry_at on inscan reductions.
1348 (c_parser_omp_scan_loop_body): New function.
1349 (c_parser_omp_for_loop): Call c_parser_omp_scan_loop_body if there are
1350 inscan reduction clauses.
1351 * c-typeck.c (c_finish_omp_clauses): Reject mixing inscan with
1352 non-inscan reductions on the same construct, or inscan reductions with
1353 ordered or schedule clauses, or inscan array reductions.
1354
65985d78
MS
13552019-06-05 Martin Sebor <msebor@redhat.com>
1356
1357 PR c/90737
1358 * c-typeck.c (c_finish_return): Only consider functions returning
1359 pointers as candidates for -Wreturn-local-addr.
1360
0ecf545c
MS
13612019-06-05 Martin Sebor <msebor@redhat.com>
1362
1363 * c-decl.c (start_decl): Adjust quoting and hyphenation
1364 in diagnostics.
1365 (finish_decl): Same.
1366 (finish_enum): Same.
1367 (start_function): Same.
1368 (declspecs_add_type): Same.
1369 * c-parser.c (warn_for_abs): Same.
1370 * c-typeck.c (build_binary_op): Same.
1371
e03436e7
TS
13722019-05-17 Thomas Schwinge <thomas@codesourcery.com>
1373
b48f44bf
TS
1374 PR c/89433
1375 * c-parser.c (c_finish_oacc_routine): Rework checking if already
1376 marked with an OpenACC 'routine' directive.
1377
5bf04509
TS
1378 PR c/89433
1379 * c-parser.c (c_parser_oacc_routine): Normalize order of clauses.
1380 (c_finish_oacc_routine): Call oacc_verify_routine_clauses.
1381
e03436e7
TS
1382 PR c/89433
1383 * c-parser.c (c_finish_oacc_routine): Refer to OpenACC 'routine'
1384 clauses from "omp declare target" attribute.
1385
a9c697b8
MS
13862019-05-16 Martin Sebor <msebor@redhat.com>
1387
ab20d992
JJ
1388 * c-decl.c (start_decl): Quote keywords, operators, and
1389 types in diagnostics.
1390 (finish_decl): Same.
1391 * c-parser.c (c_parser_asm_statement): Same.
1392 (c_parser_conditional_expression): Same.
1393 (c_parser_transaction_cancel): Same.
1394 * c-typeck.c (c_common_type): Same.
1395 (build_conditional_expr): Same.
1396 (digest_init): Same.
1397 (process_init_element): Same.
1398 (build_binary_op): Same.
a9c697b8 1399
c4499192
RB
14002019-05-17 Richard Biener <rguenther@suse.de>
1401
1402 * gimple-parser.c (c_parser_gimple_statement): Handle __VEC_PERM.
1403 (c_parser_gimple_unary_expression): Likewise.
1404 (c_parser_gimple_parentized_ternary_expression): New function.
1405
adfe6e4b
RB
14062019-05-16 Richard Biener <rguenther@suse.de>
1407
1408 * gimple-parser.c (c_parser_gimple_statement): Handle __BIT_INSERT.
1409 (c_parser_gimple_unary_expression): Likewise.
1410
186dabf2
RB
14112019-05-15 Richard Biener <rguenther@suse.de>
1412
1413 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
1414 __BIT_FIELD_REF.
1415
1158c5b4
RB
14162019-05-14 Richard Biener <rguenther@suse.de>
1417
1418 * gimple-parser.c (c_parser_gimple_statement): Remove
1419 questionable auto-promotion to VIEW_CONVERT_EXPR.
1420 (c_parser_gimple_typespec): Split out from __MEM parsing.
1421 (c_parser_gimple_postfix_expression): Handle __VIEW_CONVERT.
1422 * tree-pretty-print.c (dump_generic_node): Dump VIEW_CONVERT_EXPR
1423 as __VIEW_CONVERT with -gimple.
1424
fd4485aa
ML
14252019-05-09 Martin Liska <mliska@suse.cz>
1426
1427 * gimple-parser.c (c_parser_gimple_statement): Support __MIN and
1428 __MAX.
1429 (c_parser_gimple_unary_expression): Parse also binary expression
1430 __MIN and __MAX.
1431 (c_parser_gimple_parentized_binary_expression): New function.
1432
d276406a
ML
14332019-05-09 Martin Liska <mliska@suse.cz>
1434
1435 * gimple-parser.c (struct gimple_parser): Add probability.
1436 for gimple_parser_edge.
1437 (gimple_parser::push_edge): Add new argument probability.
1438 (c_parser_gimple_parse_bb_spec): Parse also probability
1439 if present.
1440 (c_parser_parse_gimple_body): Set edge probability.
1441 (c_parser_gimple_compound_statement): Consume token
1442 before calling c_parser_gimple_goto_stmt.
1443 Parse BB counts.
1444 (c_parser_gimple_statement): Pass new argument.
1445 (c_parser_gimple_goto_stmt): Likewise.
1446 (c_parser_gimple_if_stmt): Likewise.
1447 (c_parser_gimple_or_rtl_pass_list): Parse hot_bb_threshold.
1448 * c-parser.c (c_parser_declaration_or_fndef): Pass
1449 hot_bb_threshold argument.
1450 * c-tree.h (struct c_declspecs): Add hot_bb_threshold
1451 field.
1452 (c_parser_gimple_parse_bb_spec_edge_probability): New.
1453
f179b64e
JJ
14542019-04-26 Jakub Jelinek <jakub@redhat.com>
1455
1456 PR debug/90197
1457 * c-tree.h (c_finish_loop): Add 2 further location_t arguments.
1458 * c-parser.c (c_parser_while_statement): Adjust c_finish_loop caller.
1459 (c_parser_do_statement): Likewise.
1460 (c_parser_for_statement): Likewise. Formatting fixes.
1461 * c-typeck.c (c_finish_loop): Add COND_LOCUS and INCR_LOCUS arguments,
1462 emit DEBUG_BEGIN_STMTs if needed.
1463
e7178413
JJ
14642019-04-19 Jakub Jelinek <jakub@redhat.com>
1465
c280b7ee
JJ
1466 PR c/89888
1467 * c-typeck.c (struct c_switch): Remove outside_range_p member.
1468 (c_start_case): Don't clear it.
1469 (do_case): Adjust c_add_case_label caller.
1470 (c_finish_case): Adjust c_do_switch_warnings caller.
1471
e7178413
JJ
1472 PR c++/90108
1473 * c-decl.c (merge_decls): If remove is main variant and
1474 DECL_ORIGINAL_TYPE is some other type, remove a DECL_ORIGINAL_TYPE
1475 variant that has newdecl as TYPE_NAME if any.
1476
60a2c645
JJ
14772019-04-12 Jakub Jelinek <jakub@redhat.com>
1478
1479 PR c/89933
1480 * c-decl.c (merge_decls): When newdecl's type is its main variant,
1481 don't try to remove it from the variant list, but instead assert
1482 it has no variants.
1483
2a82beaa
RB
14842019-04-01 Richard Biener <rguenther@suse.de>
1485
1486 PR c/71598
1487 * c-tree.h (c_get_alias_set): Declare.
1488 * c-objc-common.h (LANG_HOOKS_GET_ALIAS_SET): Use c_get_alias_set.
1489 * c-objc-common.c (c_get_alias_set): Treat enumeral types
1490 as the underlying integer type.
1491
bec1da64
MS
14922019-03-19 Martin Sebor <msebor@redhat.com>
1493
1494 PR tree-optimization/89688
1495 * c-decl.c (finish_decl): Call braced_lists_to_string for more
1496 kinds of initializers.
1497
855cd9b1
JJ
14982019-03-19 Jakub Jelinek <jakub@redhat.com>
1499
1500 PR c/89734
1501 * c-decl.c (grokdeclarator): Call c_build_qualified_type on function
1502 return type even if quals_used is 0. Formatting fixes.
1503
baa09dc5
RB
15042019-03-14 Richard Biener <rguenther@suse.de>
1505
1506 * c-tree.h (enum c_declspec_il): New.
1507 (struct c_declspecs): Merge gimple_p and rtl_p into declspec_il
1508 enum bitfield.
1509 * c-parser.c (c_parser_declaration_or_fndef): Adjust accordingly.
1510 Pass start pass and declspec_il to c_parser_parse_gimple_body.
1511 (c_parser_declspecs): Adjust.
1512 * gimple-parser.c: Include cfg.h, cfghooks.h, cfganal.h, tree-cfg.h,
1513 gimple-iterator.h, cfgloop.h, tree-phinodes.h, tree-into-ssa.h
1514 and bitmap.h.
1515 (struct gimple_parser): New.
1516 (gimple_parser::push_edge): New method.
1517 (c_parser_gimple_parse_bb_spec): New helper.
1518 (c_parser_parse_gimple_body): Get start pass and IL specification.
1519 Initialize SSA and CFG.
1520 (c_parser_gimple_compound_statement): Handle CFG and SSA build.
1521 Build a gimple_parser parsing state and pass it along.
1522 (c_parser_gimple_statement): Change intermittend __PHI internal
1523 function argument for the edge.
1524 (c_parser_gimple_or_rtl_pass_list): Handle ssa, cfg flags.
1525 (c_parser_gimple_goto_stmt): Record edges to build.
1526 (c_parser_gimple_if_stmt): Likewise.
1527 * gimple-parser.h (c_parser_parse_gimple_body): Adjust.
1528 (c_parser_gimple_or_rtl_pass_list): Likewise.
1529
a3f9f006
ML
15302019-03-11 Martin Liska <mliska@suse.cz>
1531
1532 * c-decl.c (check_for_loop_decls): Wrap an option name
1533 in a string format message and fix GNU coding style.
1534 * c-parser.c (c_parser_declspecs): Likewise.
1535
1db01ff9
JJ
15362019-03-08 Jakub Jelinek <jakub@redhat.com>
1537
1538 PR tree-optimization/89550
1539 * c-decl.c (finish_function): Only set TREE_NO_WARNING if warning_at
1540 returned true.
1541 (c_write_global_declarations_1): Only set TREE_NO_WARNING if pedwarn
1542 or warning returned true.
1543
66dcb747
JJ
15442019-02-28 Jakub Jelinek <jakub@redhat.com>
1545
1546 PR c/89525
1547 * c-typeck.c (convert_arguments): Call inform_declaration only if
1548 the previous warning_at call returned true.
1549
2263c9f2
TS
15502019-02-22 Thomas Schwinge <thomas@codesourcery.com>
1551
1552 * c-parser.c (c_parser_oacc_shape_clause): Add loc formal
1553 parameter. Adjust all users.
1554 (c_parser_oacc_simple_clause): Replace parser with loc formal
1555 parameter. Adjust all users.
1556
ab20d992 15572019-02-19 Chung-Lin Tang <cltang@codesourcery.com>
19695f4d
CLT
1558
1559 PR c/87924
1560 * c-parser.c (c_parser_oacc_clause_wait): Add representation of wait
1561 clause without argument as 'wait (GOMP_ASYNC_NOVAL)', adjust comments.
1562
5f88ba10
JJ
15632019-02-15 Jakub Jelinek <jakub@redhat.com>
1564
1565 PR c/89340
1566 * c-decl.c (start_function): Clear TREE_PUBLIC on nested functions
1567 before c_decl_attributes rather than after it.
1568
cfc30fd1
JJ
15692019-02-06 Jakub Jelinek <jakub@redhat.com>
1570
1571 PR c/89211
1572 * c-parser.c (c_parser_declaration_or_fndef): Don't update
1573 DECL_ARGUMENTS of d if it has been defined already. Use a single if
1574 instead of 3 nested ifs.
1575
fbe83e6b
JM
15762019-02-06 Joseph Myers <joseph@codesourcery.com>
1577
1578 PR c/88584
1579 * c-decl.c (finish_decl): Do not complete array types for arrays
1580 with external linkage not at file scope.
1581
f461f938
RB
15822019-02-05 Richard Biener <rguenther@suse.de>
1583
1584 PR c/88606
1585 * c-decl.c (finish_struct): Reset TYPE_TRANSPARENT_AGGR on
1586 all type variants when not supported.
1587
fe509359
JJ
15882019-01-30 Jakub Jelinek <jakub@redhat.com>
1589
1590 PR c/89061
1591 * c-tree.h (C_DECL_COMPOUND_LITERAL_P): Define.
1592 * c-decl.c (decl_jump_unsafe): Return false for
1593 C_DECL_COMPOUND_LITERAL_P decls.
1594 (build_compound_literal): Set C_DECL_COMPOUND_LITERAL_P.
1595
6a335b96
JJ
15962019-01-29 Jakub Jelinek <jakub@redhat.com>
1597
f4b7e754
JJ
1598 PR c/89045
1599 * c-decl.c (build_compound_literal): Don't pushdecl if in parameter
1600 scope.
1601
6a335b96
JJ
1602 PR c/86125
1603 * c-decl.c (last_fileptr_type): Remove.
1604 (last_structptr_types): New variable.
1605 (match_builtin_function_types): Compare TYPE_MAIN_VARIANT of
1606 {old,new}rettype instead of the types themselves. Assert
1607 last_structptr_types array has the same number of elements
1608 as builtin_structptr_types array. Use TYPE_MAIN_VARIANT for
1609 argument oldtype and newtype. Instead of handling
1610 just fileptr_type_node specially, handle all builtin_structptr_types
1611 pointer nodes. Formatting fix.
1612
d8b5a1a0
MS
16132019-01-24 Martin Sebor <msebor@redhat.com>
1614
1615 PR c/86125
1616 PR c/88886
1617 PR middle-end/86308
1618 * c-decl.c (match_builtin_function_types): Add arguments.
1619 (diagnose_mismatched_decls): Diagnose mismatched declarations
1620 of built-ins more strictly.
1621
e21c4491
JJ
16222019-01-24 Jakub Jelinek <jakub@redhat.com>
1623
1624 PR c++/88976
1625 * c-typeck.c (c_finish_omp_cancel): Diagnose more than one if
1626 on #pragma omp cancel with different modifiers.
1627
420183d9
L
16282019-01-18 H.J. Lu <hongjiu.lu@intel.com>
1629
1630 PR c/51628
1631 PR c/88664
1632 * c-typeck.c (convert_for_assignment): Upate the
1633 warn_for_address_or_pointer_of_packed_member call.
1634
17ad43dd
TH
16352019-01-16 Tom Honermann <tom@honermann.net>
1636 Jason Merrill <jason@redhat.com>
1637
1638 * c-typeck.c (digest_init): Revised the error message produced for
1639 ill-formed cases of array initialization with a string literal.
1640 (error_init): Make variadic.
1641
5f07d78a
JJ
16422019-01-12 Jakub Jelinek <jakub@redhat.com>
1643
1644 * c-typeck.c (convert_for_assignment): Fix a comment typo.
1645
c4581bbf
JJ
16462019-01-07 Jakub Jelinek <jakub@redhat.com>
1647
1648 PR c/88701
1649 * c-decl.c (build_compound_literal): If not TREE_STATIC, only pushdecl
1650 if current_function_decl is non-NULL.
1651
65c5b1eb
JM
16522019-01-07 Joseph Myers <joseph@codesourcery.com>
1653
1654 PR c/88720
1655 PR c/88726
1656 * c-decl.c (pop_scope): Use TREE_PUBLIC and b->nested to determine
1657 whether a function is nested, not DECL_EXTERNAL. Diagnose inline
1658 functions declared but never defined only for external scope, not
1659 for other scopes.
1660
d8fcab68
JJ
16612019-01-07 Jakub Jelinek <jakub@redhat.com>
1662
1663 PR c++/85052
1664 * c-parser.c (c_parser_postfix_expression): Parse
1665 __builtin_convertvector.
1666
a5544970
JJ
16672019-01-01 Jakub Jelinek <jakub@redhat.com>
1668
1669 Update copyright years.
1670
da77eace
L
16712018-12-20 H.J. Lu <hongjiu.lu@intel.com>
1672
1673 PR c/51628
1674 * c-typeck.c (convert_for_assignment): Call
1675 warn_for_address_or_pointer_of_packed_member.
1676
1edf8866
SB
16772018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
1678
1679 * c-parser.c (c_parser_asm_statement) <RID_CONST, RID_RESTRICT>: Give
1680 a more specific error message (instead of just falling through).
1681
db4fd626
SB
16822018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
1683
1684 * c-parser.c (c_parser_asm_statement): Keep track of the location each
1685 asm qualifier is first seen; use that to give nicer "duplicate asm
1686 qualifier" messages. Delete 'quals" variable, instead pass the
1687 "is_volatile_ flag to build_asm_stmt directly.
1688 * c-tree.h (build_asm_stmt): Make the first arg bool instead of tree.
1689 * c-typeck.c (build_asm_stmt): Ditto; adjust.
1690
9c9cfcbb
SB
16912018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
1692
1693 * c-parser.c (c_parser_asm_statement): Rewrite the loop to work without
1694 "done" boolean variable.
1695
a14feb3c
DM
16962018-12-19 David Malcolm <dmalcolm@redhat.com>
1697
1698 PR c++/87504
1699 * c-typeck.c (class maybe_range_label_for_tree_type_mismatch):
1700 Move from here to gcc-rich-location.h and gcc-rich-location.c.
1701 (build_binary_op): Use struct op_location_t and
1702 class binary_op_rich_location.
1703
6d939173
JJ
17042018-12-11 Jakub Jelinek <jakub@redhat.com>
1705
1706 PR sanitizer/88426
1707 * c-convert.c (convert): Call c_fully_fold before calling
1708 ubsan_instrument_float_cast.
1709
b7055028
SB
17102018-12-08 Segher Boessenkool <segher@kernel.crashing.org>
1711
1712 * c-parser (c_parser_asm_statement) [RID_INLINE]: Delete stray line
1713 setting "quals".
1714
5b76e75f
SB
17152018-12-06 Segher Boessenkool <segher@kernel.crashing.org>
1716
1717 * c-parser.c (c_parser_asm_statement): Detect the inline keyword
1718 after asm. Pass a flag for it to build_asm_expr.
1719 * c-tree.h (build_asm_expr): Update declaration.
1720 * c-typeck.c (build_asm_stmt): Add is_inline parameter. Use it to
1721 set ASM_INLINE_P.
1722
30bd42b9
SB
17232018-12-06 Segher Boessenkool <segher@kernel.crashing.org>
1724
1725 PR inline-asm/55681
1726 * c-parser.c (c_parser_asm_statement): Update grammar. Allow any
1727 combination of volatile and goto, in any order, without repetitions.
1728
9df6c0e4
JB
17292018-12-04 James Norris <jnorris@codesourcery.com>
1730 Cesar Philippidis <cesar@codesourcery.com>
1731 Julian Brown <julian@codesourcery.com>
1732
1733 * c-parser.c (c_parser_oacc_wait_list): Remove dead diagnostic
1734 code.
1735
f44697b7
RB
17362018-11-30 Richard Biener <rguenther@suse.de>
1737
1738 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
1739 _Literal (type) { ... } as empty aggregate or vector constructor.
1740
550dfbdc
MS
17412018-11-29 Martin Sebor <msebor@redhat.com>
1742
1743 PR c/88091
1744 * c-typeck.c (convert_argument): Add a parameter. Adjust indentation.
1745 (convert_arguments): Add comments. Pass additional argument to
1746 the function above.
1747
673670da
MS
17482018-11-29 Martin Sebor <msebor@redhat.com>
1749
1750 PR c/88172
1751 PR testsuite/88208
1752 * c-decl.c (declspec_add_alignas): Adjust call to check_user_alignment.
1753
db1d09b0
MS
17542018-11-23 Martin Sebor <msebor@redhat.com>
1755
1756 PR testsuite/88098
1757 * c-typeck.c (convert_arguments): Call builtin_decl_explicit instead.
1758 (maybe_warn_builtin_no_proto_arg): Handle short enum to int promotion.
1759
98f08eb8
MS
17602018-11-20 Martin Sebor <msebor@redhat.com>
1761
1762 * c-parser.c (c_parser_has_attribute_expression): New function.
1763 (c_parser_attribute): New function.
1764 (c_parser_attributes): Move code into c_parser_attribute.
1765 (c_parser_unary_expression): Handle RID_HAS_ATTRIBUTE_EXPRESSION.
1766
cd5da983
MS
17672018-11-15 Martin Sebor <msebor@redhat.com>
1768
1769 PR c/83656
1770 * c-decl.c (header_for_builtin_fn): Declare.
1771 (diagnose_mismatched_decls): Diagnose declarations of built-in
1772 functions without a prototype.
1773 * c-typeck.c (maybe_warn_builtin_no_proto_arg): New function.
1774 (convert_argument): Same.
1775 (convert_arguments): Factor code out into convert_argument.
1776 Detect mismatches between built-in formal arguments in calls
1777 to built-in without prototype.
1778 (build_conditional_expr): Same.
1779 (type_or_builtin_type): New function.
1780 (convert_for_assignment): Add argument. Conditionally issue
1781 warnings instead of errors for mismatches.
1782
620e594b
DM
17832018-11-13 David Malcolm <dmalcolm@redhat.com>
1784
1785 * c-decl.c: Replace "source_location" with "location_t".
1786 * c-tree.h: Likewise.
1787 * c-typeck.c: Likewise.
1788 * gimple-parser.c: Likewise.
1789
3179ebae
JJ
17902018-11-09 Jakub Jelinek <jakub@redhat.com>
1791
81a227c6
JJ
1792 * c-parser.c (c_parser_omp_clause_final): Use
1793 c_parser_expr_no_commas, convert_lvalue_to_rvalue,
1794 c_objc_common_truthvalue_conversion, c_fully_fold and parentheses
1795 parsing instead of c_parser_paren_condition.
1796 (c_parser_omp_clause_if): Use c_parser_expr_no_commas,
1797 convert_lvalue_to_rvalue, c_objc_common_truthvalue_conversion and
1798 c_fully_fold instead of c_parser_condition.
1799 (c_parser_omp_clause_num_threads, c_parser_omp_clause_num_tasks,
1800 c_parser_omp_clause_grainsize, c_parser_omp_clause_priority,
1801 c_parser_omp_clause_hint, c_parser_omp_clause_num_teams,
1802 c_parser_omp_clause_thread_limit, c_parser_omp_clause_linear): Use
1803 c_parser_expr_no_commas instead of c_parser_expression.
1804
98c91c56
JJ
1805 * c-parser.c (c_parser_omp_clause_reduction): Call sorry_at on
1806 reduction clause with inscan modifier.
1807
3179ebae
JJ
1808 * c-parser.c (c_parser_omp_requires): Call sorry_at on requires
1809 clauses other than atomic_default_mem_order.
1810
28567c40
JJ
18112018-11-08 Jakub Jelinek <jakub@redhat.com>
1812
1813 * c-parser.c: Include memmode.h.
1814 (c_parser_omp_depobj, c_parser_omp_requires): New functions.
1815 (c_parser_pragma): Handle PRAGMA_OMP_DEPOBJ and PRAGMA_OMP_REQUIRES.
1816 (c_parser_omp_clause_name): Handle nontemporal, in_reduction and
1817 task_reduction clauses.
1818 (c_parser_omp_variable_list): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION.
1819 For OMP_CLAUSE_DEPEND, parse clause operands as either an array
1820 section, or lvalue assignment expression.
1821 (c_parser_omp_clause_if): Handle cancel and simd modifiers.
1822 (c_parser_omp_clause_lastprivate): Parse optional
1823 conditional: modifier.
1824 (c_parser_omp_clause_hint): Require constant integer expression rather
1825 than just integer expression.
1826 (c_parser_omp_clause_defaultmap): Parse new kinds of defaultmap
1827 clause.
1828 (c_parser_omp_clause_reduction): Add IS_OMP and KIND arguments.
1829 Parse reduction modifiers. Pass KIND to c_parser_omp_variable_list.
1830 (c_parser_omp_clause_nontemporal, c_parser_omp_iterators): New
1831 functions.
1832 (c_parser_omp_clause_depend): Parse iterator modifier and handle
1833 iterators. Parse mutexinoutset and depobj kinds.
1834 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_reduction
1835 callers.
1836 (c_parser_omp_all_clauses): Likewise. Handle
1837 PRAGMA_OMP_CLAUSE_NONTEMPORAL and
1838 PRAGMA_OMP_CLAUSE_{IN,TASK}_REDUCTION.
1839 (c_parser_omp_atomic): Parse hint and memory order clauses. Handle
1840 default memory order from requires directive if any. Adjust
1841 c_finish_omp_atomic caller.
1842 (c_parser_omp_critical): Allow comma in between (name) and hint clause.
1843 (c_parser_omp_flush): Parse flush with memory-order-clause.
1844 (c_parser_omp_for_loop): Allow NE_EXPR even in
1845 OpenMP loops, adjust c_finish_omp_for caller.
1846 (OMP_SIMD_CLAUSE_MASK): Add if and nontemporal clauses.
1847 (c_parser_omp_master): Add p_name, mask and cclauses arguments.
1848 Allow to be called while parsing combined parallel master.
1849 Parse combined master taskloop{, simd}.
1850 (c_parser_omp_parallel): Parse combined
1851 parallel master{, taskloop{, simd}} constructs.
1852 (OMP_TASK_CLAUSE_MASK): Add in_reduction clause.
1853 (OMP_TASKGROUP_CLAUSE_MASK): Define.
1854 (c_parser_omp_taskgroup): Add LOC argument. Parse taskgroup clauses.
1855 (OMP_TASKWAIT_CLAUSE_MASK): Define.
1856 (c_parser_omp_taskwait): Handle taskwait with depend clauses.
1857 (c_parser_omp_teams): Force a BIND_EXPR with BLOCK
1858 around teams body. Use SET_EXPR_LOCATION.
1859 (c_parser_omp_target_data): Allow target data
1860 with only use_device_ptr clauses.
1861 (c_parser_omp_target): Use SET_EXPR_LOCATION. Set
1862 OMP_REQUIRES_TARGET_USED bit in omp_requires_mask.
1863 (c_parser_omp_requires): New function.
1864 (c_finish_taskloop_clauses): New function.
1865 (OMP_TASKLOOP_CLAUSE_MASK): Add reduction and in_reduction clauses.
1866 (c_parser_omp_taskloop): Use c_finish_taskloop_clauses. Add forward
1867 declaration. Disallow in_reduction clause when combined with parallel
1868 master.
1869 (c_parser_omp_construct): Adjust c_parser_omp_master and
1870 c_parser_omp_taskgroup callers.
1871 * c-typeck.c (c_finish_omp_cancel): Diagnose if clause with modifier
1872 other than cancel.
1873 (handle_omp_array_sections_1): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION
1874 like OMP_CLAUSE_REDUCTION.
1875 (handle_omp_array_sections): Likewise. Call save_expr on array
1876 reductions before calling build_index_type. Handle depend clauses
1877 with iterators.
1878 (struct c_find_omp_var_s): New type.
1879 (c_find_omp_var_r, c_omp_finish_iterators): New functions.
1880 (c_finish_omp_clauses): Don't diagnose nonmonotonic clause
1881 with static, runtime or auto schedule kinds. Call save_expr for whole
1882 array reduction sizes. Diagnose reductions with zero sized elements
1883 or variable length structures. Diagnose nogroup clause used with
1884 reduction clause(s). Handle depend clause with
1885 OMP_CLAUSE_DEPEND_DEPOBJ. Diagnose bit-fields. Require
1886 omp_depend_t type for OMP_CLAUSE_DEPEND_DEPOBJ kinds and
1887 some different type for other kinds. Use build_unary_op with
1888 ADDR_EXPR and build_indirect_ref instead of c_mark_addressable.
1889 Handle depend clauses with iterators. Remove no longer needed special
1890 case that predetermined const qualified vars may be specified in
1891 firstprivate clause. Complain if const qualified vars are mentioned
1892 in data-sharing clauses other than firstprivate or shared. Use
1893 error_at with OMP_CLAUSE_LOCATION (c) as first argument instead of
1894 error. Formatting fix. Handle OMP_CLAUSE_NONTEMPORAL and
1895 OMP_CLAUSE_{IN,TASK}_REDUCTION. Allow any lvalue as
1896 OMP_CLAUSE_DEPEND operand (besides array section), adjust diagnostics.
1897
7e2de6df
DM
18982018-10-29 David Malcolm <dmalcolm@redhat.com>
1899
1900 * c-decl.c (implicit_decl_warning): Update "is there a suggestion"
1901 logic for change to name_hint::operator bool.
1902 (undeclared_variable): Likewise.
1903 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
1904 (c_parser_parameter_declaration): Likewise.
1905
9f936c86
JM
19062018-10-17 Joseph Myers <joseph@codesourcery.com>
1907
1908 * c-errors.c (pedwarn_c11): New function.
1909 * c-parser.c (disable_extension_diagnostics): Save
1910 warn_c11_c2x_compat and set it to 0.
1911 (restore_extension_diagnostics): Restore warn_c11_c2x_compat.
1912 (c_parser_static_assert_declaration_no_semi): Handle
1913 _Static_assert without string constant.
1914 * c-tree.h (pedwarn_c11): New prototype.
1915
033eb567
DM
19162018-10-17 David Malcolm <dmalcolm@redhat.com>
1917
1918 * Make-lang.in (selftest-c): New.
1919 (C_SELFTEST_FLAGS, C_SELFTEST_DEPS, s-selftest-c, selftest-c-gdb)
1920 (selftest-gdb, selftest-c-valgrind, selftest-valgrind): Move here
1921 from gcc/Makefile.in.
1922
0edf3afe
RB
19232018-10-02 Richard Biener <rguenther@suse.de>
1924
1925 * c-decl.c (warn_if_shadowing): Do not test DECL_FROM_INLINE.
1926
8313a764
JM
19272018-09-26 Joseph Myers <joseph@codesourcery.com>
1928
1929 PR c/87390
1930 * c-typeck.c (build_binary_op): Use excess precision for
1931 comparisons of integers and floating-point for C11 and later.
1932
ce6f0888
MJ
19332018-09-26 Martin Jambor <mjambor@suse.cz>
1934
1935 PR c/87347
1936 * c-parser.c (warn_for_abs): Bail out if TYPE_ARG_TYPES is NULL. Fix
ab20d992 1937 comment.
ce6f0888 1938
9c4a4b3c
DM
19392018-09-17 David Malcolm <dmalcolm@redhat.com>
1940
1941 * c-objc-common.c (range_label_for_type_mismatch::get_text):
1942 Update for new param.
1943 * c-typeck.c (maybe_range_label_for_tree_type_mismatch::get_text):
1944 Likewise.
1945
80c6d1f4
MJ
19462018-09-17 Martin Jambor <mjambor@suse.cz>
1947
1948 PR c/63886
1949 * c-parser.c: (warn_for_abs): New function.
1950 (c_parser_postfix_expression_after_primary): Call it.
1951
4a426e36
BE
19522018-09-13 Bernd Edlinger <bernd.edlinger@hotmail.de>
1953
1954 * c-typeck.c (digest_init): Shorten overlength strings.
1955
6d900107
BE
19562018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
1957
1958 * c-decl.c (finish_decl): Call complete_flexible_array_elts.
1959
b5764229
BE
19602018-09-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
1961
1962 * c-decl.c (finish_decl): Call braced_list_to_string here ...
1963 * c-parser.c (c_parser_declaration_or_fndef): ... instead of here.
1964
22eea6b2
AM
19652018-08-30 Alexander Monakov <amonakov@ispras.ru>
1966
1967 * gimple-parser.c (c_parser_gimple_binary_expression): Accept infix
1968 "__MULT_HIGHPART" for MULT_HIGHPART_EXPR.
1969
85204e23
DM
19702018-08-27 David Malcolm <dmalcolm@redhat.com>
1971
1972 PR 87091
1973 * c-decl.c (implicitly_declare): Update call to
1974 maybe_add_include_fixit to suggest overriding the location, as it
1975 is for a note.
1976 * c-objc-common.c (c_tree_printer): Update for conversion of
1977 show_caret_p to a tri-state.
1978
3d78e008
ML
19792018-08-27 Martin Liska <mliska@suse.cz>
1980
1981 * c-decl.c (locate_old_decl): Use new function
92a285c1
ML
1982 fndecl_built_in_p and remove check for FUNCTION_DECL if
1983 possible.
3d78e008
ML
1984 (diagnose_mismatched_decls): Likewise.
1985 (merge_decls): Likewise.
1986 (warn_if_shadowing): Likewise.
1987 (pushdecl): Likewise.
1988 (implicitly_declare): Likewise.
1989 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
1990 * c-tree.h (C_DECL_ISNT_PROTOTYPE): Likewise.
1991 * c-typeck.c (build_function_call_vec): Likewise.
1992 (convert_arguments): Likewise.
1993
097f82ec
DM
19942018-08-20 David Malcolm <dmalcolm@redhat.com>
1995
1996 PR other/84889
1997 * c-decl.c (pushtag): Add auto_diagnostic_group instance.
1998 (diagnose_mismatched_decls): Likewise, in various places.
1999 (warn_if_shadowing): Likewise.
2000 (implicit_decl_warning): Likewise.
2001 (implicitly_declare): Likewise.
2002 (undeclared_variable): Likewise.
2003 (declare_label): Likewise.
2004 (grokdeclarator): Likewise.
2005 (start_function): Likewise.
2006 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
2007 (c_parser_parameter_declaration): Likewise.
2008 (c_parser_binary_expression): Likewise.
2009 * c-typeck.c (c_expr_sizeof_expr): Likewise.
2010 (parser_build_binary_op): Likewise.
2011 (build_unary_op): Likewise.
2012 (error_init): Likewise.
2013 (pedwarn_init): Likewise.
2014 (warning_init): Likewise.
2015 (convert_for_assignment): Likewise.
2016
96e6ae57
DM
20172018-08-15 David Malcolm <dmalcolm@redhat.com>
2018
2019 * c-objc-common.c: Include "gcc-rich-location.h".
2020 (c_tree_printer): Move implemenation of '%T' to...
2021 (print_type): ...this new function.
2022 (range_label_for_type_mismatch::get_text): New function.
2023 * c-typeck.c (convert_for_assignment): Add type labels to the rhs
2024 range for the various ic_argpass cases.
2025 (class maybe_range_label_for_tree_type_mismatch): New class.
2026 (build_binary_op): Use it when calling binary_op_error.
2027
0cd020ae 20282018-08-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
ab20d992 2029
0cd020ae
PK
2030 * c-decl.c (start_decl): Do not warn if variables is named as main
2031 and is a local variable.
2032
72733314
IS
20332018-08-15 Iain Sandoe <iain@sandoe.co.uk>
2034
2035 PR c/19315
2036 * c-decl.c (finish_decl): Don't add the 'extern' storage class to
2037 objects of unknown size.
2038
23aa9f7c
MS
20392018-08-13 Martin Sebor <msebor@redhat.com>
2040
2041 PR tree-optimization/71625
2042 * c-parser.c (c_parser_declaration_or_fndef): Call
2043 braced_list_to_string.
2044
e5e7e50d
BH
20452018-08-03 Bogdan Harjoc <harjoc@gmail.com>
2046
2047 PR c/86690
2048 * c-typeck.c (lookup_field): Do not use TYPE_LANG_SPECIFIC after
2049 errors.
2050
8a45b051
MS
20512018-08-01 Martin Sebor <msebor@redhat.com>
2052
2053 PR tree-optimization/86650
2054 * c-objc-common.c (c_tree_printer): Move usage of EXPR_LOCATION (t)
2055 and TREE_BLOCK (t) from within percent_K_format to this callsite.
2056
5922dcb5
JJ
20572018-08-01 Jakub Jelinek <jakub@redhat.com>
2058
2059 PR c/85704
2060 * c-typeck.c (init_field_decl_cmp): New function.
2061 (output_pending_init_elements): Use it for field comparisons
2062 instead of pure bit_position comparisons.
2063
9b452033
JJ
20642018-07-12 Jakub Jelinek <jakub@redhat.com>
2065
2066 * c-decl.c (c_decl_attributes): Don't diagnose vars without mappable
2067 type here, instead add "omp declare target implicit" attribute.
2068 (finish_decl): Diagnose vars without mappable type here.
2069
ab20d992
JJ
20702018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
2071 Thomas Schwinge <thomas@codesourcery.com>
829c6349
CLT
2072 Cesar Philippidis <cesar@codesourcery.com>
2073
2074 * c-parser.c (c_parser_omp_clause_name): Add support for finalize
2075 and if_present. Make present_or_{copy,copyin,copyout,create} aliases
2076 to their non-present_or_* counterparts. Make 'self' an alias to
2077 PRAGMA_OACC_CLAUSE_HOST.
2078 (c_parser_oacc_data_clause): Update GOMP mappings for
2079 PRAGMA_OACC_CLAUSE_{COPY,COPYIN,COPYOUT,CREATE,DELETE}. Remove
2080 PRAGMA_OACC_CLAUSE_{SELF,PRESENT_OR_*}.
2081 (c_parser_oacc_all_clauses): Handle finalize and if_present clauses.
2082 Remove support for present_or_* clauses.
2083 (OACC_KERNELS_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
2084 (OACC_PARALLEL_CLAUSE_MASK): Likewise.
2085 (OACC_DECLARE_CLAUSE_MASK): Likewise.
2086 (OACC_DATA_CLAUSE_MASK): Likewise.
2087 (OACC_ENTER_DATA_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
2088 (OACC_EXIT_DATA_CLAUSE_MASK): Add FINALIZE clause.
2089 (OACC_UPDATE_CLAUSE_MASK): Remove SELF, add IF_PRESENT.
2090 (c_parser_oacc_declare): Remove PRESENT_OR_* clauses.
2091 * c-typeck.c (c_finish_omp_clauses): Handle IF_PRESENT and FINALIZE.
2092
e197e64e
KV
20932018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
2094
2095 * c-typeck.c (build_unary_op): Handle ABSU_EXPR;
2096 * gimple-parser.c (c_parser_gimple_statement): Likewise.
2097 (c_parser_gimple_unary_expression): Likewise.
2098
487f2f61
JJ
20992018-06-15 Jakub Jelinek <jakub@redhat.com>
2100
2101 PR c/86093
2102 * c-typeck.c (pointer_diff): Cast both pointers to unqualified types
2103 before doing POINTER_DIFF_EXPR.
2104
e4d44a37
MP
21052018-06-07 Marek Polacek <polacek@redhat.com>
2106
2107 PR c/85318
2108 * c-decl.c (check_for_loop_decls): Add -Wc90-c99-compat warning about
2109 for loop initial declarations.
2110
b67b9225
DP
21112018-05-30 David Pagan <dave.pagan@oracle.com>
2112
2113 PR c/55976
2114 * c-decl.c (grokdeclarator): Update check for return type warnings.
2115 (start_function): Likewise.
2116 (finish_function): Likewise.
2117 * c-typeck.c (c_finish_return): Update check for return type warnings.
2118 Pass OPT_Wreturn_type to pedwarn when appropriate.
2119
c566cc9f
RS
21202018-05-18 Richard Sandiford <richard.sandiford@linaro.org>
2121
2122 * gimple-parser.c (c_parser_gimple_postfix_expression): Remove
2123 __FMA_EXPR handlng.
2124
e4f81565
RS
21252018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
2126
2127 * gimple-parser.c: Include internal-fn.h.
2128 (c_parser_gimple_statement): Treat a leading CPP_DOT as a call.
2129 (c_parser_gimple_call_internal): New function.
2130 (c_parser_gimple_postfix_expression): Use it to handle CPP_DOT.
2131 Fix typos in comment.
2132
79e7b1fe
JJ
21332018-05-10 Jakub Jelinek <jakub@redhat.com>
2134
2135 PR c++/85662
2136 * c-fold.c (c_fully_fold_internal): Use fold_offsetof rather than
2137 fold_offsetof_1, pass TREE_TYPE (expr) as TYPE to it and drop the
2138 fold_convert_loc.
2139 * c-typeck.c (build_unary_op): Use fold_offsetof rather than
2140 fold_offsetof_1, pass argtype as TYPE to it and drop the
2141 fold_convert_loc.
2142
f7584c81
DP
21432018-05-02 David Pagan <dave.pagan@oracle.com>
2144
2145 PR c/30552
2146 * c-decl.c (old_style_parameter_scope): New function.
2147 * c-parser.c (c_parser_postfix_expression): Check for statement
2148 expressions in old-style function parameter list declarations.
2149 * c-parser.h (old_style_parameter_scope): New extern declaration.
2150
b33a0cb3
JJ
21512018-04-25 Jakub Jelinek <jakub@redhat.com>
2152
2153 PR sanitizer/84307
2154 * c-decl.c (build_compound_literal): Call pushdecl (decl) even when
2155 it is not TREE_STATIC.
2156 * c-typeck.c (c_mark_addressable) <case COMPOUND_LITERAL_EXPR>: Mark
2157 not just the COMPOUND_LITERAL_EXPR node itself addressable, but also
2158 its COMPOUND_LITERAL_EXPR_DECL.
2159
c5c5822a
JM
21602018-03-21 Joseph Myers <joseph@codesourcery.com>
2161
2162 * c-parser.c (c_parser_postfix_expression): For __builtin_tgmath
2163 where all functions return the same _FloatN or _FloatNx type,
2164 treat integer types as _Float64 instead of double.
2165
aa1c9429
JJ
21662018-03-21 Jakub Jelinek <jakub@redhat.com>
2167
2168 PR c/84999
2169 * c-typeck.c (build_binary_op): If c_common_type_for_size fails when
2170 building vector comparison, diagnose it and return error_mark_node.
2171
9bb45a95
JJ
21722018-03-15 Jakub Jelinek <jakub@redhat.com>
2173
2174 PR c/84853
2175 * c-typeck.c (build_binary_op) <case RSHIFT_EXPR, case LSHIFT_EXPR>:
2176 If code1 is INTEGER_TYPE, only allow code0 VECTOR_TYPE if it has
2177 INTEGER_TYPE element type.
2178
ada6bad9
DP
21792018-03-13 David Pagan <dave.pagan@oracle.com>
2180
2181 PR c/46921
2182 * c-typeck.c (output_init_element): Ensure field initializer
2183 expression is always evaluated if there are side effects.
2184
849bbdb9
JJ
21852018-03-06 Jakub Jelinek <jakub@redhat.com>
2186
2187 PR c/84721
2188 * c-parser.c (add_debug_begin_stmt): Don't add DEBUG_BEGIN_STMT if
2189 !building_stmt_list_p ().
2190
d74641bd
RS
21912018-02-13 Richard Sandiford <richard.sandiford@linaro.org>
2192
2193 PR c/84305
2194 * c-decl.c (grokdeclarator): Create an anonymous TYPE_DECL
2195 in PARM and TYPENAME contexts too, but attach it to a BIND_EXPR
2196 and include the BIND_EXPR in the list of things that need to be
2197 pre-evaluated.
2198
0444aa9c
NS
21992018-02-09 Nathan Sidwell <nathan@acm.org>
2200
2201 PR c/84293
2202 * c-typeck.c (build_indirect_ref, build_c_cast): Pass expr location
2203 to strict_aliasing_warning.
2204
7c30b12a
PC
22052018-02-02 Paolo Carlini <paolo.carlini@oracle.com>
2206
2207 * c-typeck.c (really_start_incremental_init, push_init_level,
2208 set_nonincremental_init, output_init_element, process_init_element):
2209 Use DECL_UNNAMED_BIT_FIELD.
2210
2be4dfcb
MP
22112018-01-31 Marek Polacek <polacek@redhat.com>
2212
2213 PR c/81779
2214 * c-parser.c (c_parser_compound_statement_nostart): Call
2215 expansion_point_location_if_in_system_header.
2216
bb9869d5
DM
22172018-01-17 David Malcolm <dmalcolm@redhat.com>
2218
2219 PR c++/83814
2220 * c-fold.c (fold_for_warn): Move from c-common.c, reducing to just
2221 the C part.
2222
b4923738
JJ
22232018-01-13 Jakub Jelinek <jakub@redhat.com>
2224
2225 PR c/83801
2226 * c-tree.h (decl_constant_value_1): Add a bool argument.
2227 * c-typeck.c (decl_constant_value_1): Add IN_INIT argument, allow
2228 returning a CONSTRUCTOR if it is true. Use error_operand_p.
2229 (decl_constant_value): Adjust caller.
2230 * c-fold.c (c_fully_fold_internal): If in_init, pass true to
2231 decl_constant_value_1 as IN_INIT. Otherwise, punt if
2232 decl_constant_value returns initializer that has BLKmode or
2233 array type.
2234 (c_fully_fold_internal) <case COMPONENT_REF>: Fold if !lval.
2235
928686b1
RS
22362018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
2237 Alan Hayward <alan.hayward@arm.com>
2238 David Sherwood <david.sherwood@arm.com>
2239
2240 * c-typeck.c (comptypes_internal, build_binary_op): Handle polynomial
2241 TYPE_VECTOR_SUBPARTS.
2242
85ec4feb
JJ
22432018-01-03 Jakub Jelinek <jakub@redhat.com>
2244
2245 Update copyright years.
2246
913884f7
JJ
22472018-01-01 Jakub Jelinek <jakub@redhat.com>
2248
2249 PR c/83595
2250 * c-parser.c (c_parser_braced_init, c_parser_initelt,
2251 c_parser_conditional_expression, c_parser_cast_expression,
2252 c_parser_sizeof_expression, c_parser_alignof_expression,
2253 c_parser_postfix_expression, c_parser_omp_declare_reduction,
2254 c_parser_transaction_expression): Use set_error () method instead
2255 of setting value member to error_mark_node.
2256
c6cfa2bf
MM
22572017-12-28 Michael Meissner <meissner@linux.vnet.ibm.com>
2258
2259 * c-decl.c (header_for_builtin_fn): Add integer rounding _Float<N>
2260 and _Float<N>X built-in functions.
2261
11d29d63
JJ
22622017-12-22 Jakub Jelinek <jakub@redhat.com>
2263
14ec014e
JJ
2264 PR debug/83550
2265 * c-decl.c (finish_struct): Set DECL_SOURCE_LOCATION on
2266 TYPE_STUB_DECL and call rest_of_type_compilation before processing
2267 incomplete vars rather than after it.
2268
11d29d63
JJ
2269 PR debug/83547
2270 * c-typeck.c (c_finish_stmt_expr): Ignore !TREE_SIDE_EFFECTS as
2271 indicator of ({ }), instead skip all trailing DEBUG_BEGIN_STMTs first,
2272 and consider empty ones if there are no other stmts. For
2273 -Wunused-value walk all statements before the one only followed by
2274 DEBUG_BEGIN_STMTs.
2275
170a8bd6 22762017-12-22 Mike Stump <mikestump@comcast.net>
92a285c1 2277 Eric Botcazou <ebotcazou@adacore.com>
170a8bd6
EB
2278
2279 * c-parser.c (c_parser_while_statement): Add unroll parameter and
2280 build ANNOTATE_EXPR if present. Add 3rd operand to ANNOTATE_EXPR.
2281 (c_parser_do_statement): Likewise.
2282 (c_parser_for_statement): Likewise.
2283 (c_parser_statement_after_labels): Adjust calls to above.
2284 (c_parse_pragma_ivdep): New static function.
2285 (c_parser_pragma_unroll): Likewise.
2286 (c_parser_pragma) <PRAGMA_IVDEP>: Add support for pragma Unroll.
2287 <PRAGMA_UNROLL>: New case.
2288
01512446
JJ
22892017-12-19 Jakub Jelinek <jakub@redhat.com>
2290
2291 * c-typeck.c (comptypes_internal, function_types_compatible_p,
2292 perform_integral_promotions, digest_init): Replace Yoda conditions
2293 with typical order conditions.
2294 * c-decl.c (check_bitfield_type_and_width): Likewise.
2295
c65e18d3
BE
22962017-12-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
2297
2298 * c-typeck.c (c_safe_arg_type_equiv_p,
2299 c_safe_function_type_cast_p): New function.
2300 (build_c_cast): Implement -Wcast-function-type.
2301
b7280579
RB
23022017-12-14 Richard Biener <rguenther@suse.de>
2303
2304 PR c/83415
2305 * c-fold.c (c_fully_fold_internal): Treat VIEW_CONVERT_EXPR
2306 like REALPART_EXPR for the behavior of whether its operand
2307 is an lvalue.
2308
49e6a6c0
MP
23092017-12-12 Marek Polacek <polacek@redhat.com>
2310
2311 PR c/82679
2312 * c-decl.c (grokdeclarator): Check declspecs insted of atomicp.
2313
ab20d992 23142017-12-12 Alexandre Oliva <aoliva@redhat.com>
96a95ac1
AO
2315
2316 * c-objc-common.h (LANG_HOOKS_EMITS_BEGIN_STMT): Redefine as true.
2317 * c-parser.c (add_debug_begin_stmt): New.
2318 (c_parser_declaration_or_fndef): Call it.
2319 (c_parser_compound_statement_nostart): Likewise.
2320 (c_parser_statement_after_labels): Likewise.
2321 * c-typeck (c_finish_stmt_expr): Skip begin stmts markers.
2322
4b2b493f
JM
23232017-12-07 Joseph Myers <joseph@codesourcery.com>
2324
2325 * c-decl.c (build_compound_literal): Add parameter alignas_align
2326 and set alignment of decl if nonzero.
2327 * c-parser.c (c_keyword_starts_typename): Allow RID_ALIGNAS.
2328 (c_parser_declspecs): Allow RID_ALIGNAS to follow a type, like a
2329 qualifier.
2330 (c_parser_struct_declaration): Update syntax comment.
2331 (c_parser_type_name): Add alignas_ok argument and pass it to
2332 c_parser_declspecs.
2333 (c_parser_cast_expression): Pass true to c_parser_type_name and
2334 give error if a cast used an _Alignas specifier.
2335 (c_parser_sizeof_expression): Pass true to c_parser_type_name and
2336 give error if sizeof (type-name) used an _Alignas specifier.
2337 (c_parser_alignof_expression): Pass true to c_parser_type_name and
2338 give error if _Alignof (type-name) used an _Alignas specifier.
2339 (c_parser_postfix_expression_after_paren_type): Check specified
2340 alignment for a compound literal and pass it to
2341 build_compound_literal.
2342 * c-parser.h (c_parser_type_name): Update prototype.
2343 * c-tree.h (build_compound_literal): Update prototype.
2344
5d9ae53d
MS
23452017-12-07 Martin Sebor <msebor@redhat.com>
2346
2347 PR c/81544
2348 * c-decl.c (c_decl_attributes): Look up existing declaration and
2349 pass it to decl_attributes.
2350
c79144f8
DM
23512017-12-06 David Malcolm <dmalcolm@redhat.com>
2352
2353 PR c/83236
2354 * c-decl.c (lookup_name_fuzzy): Don't suggest names that are
2355 reserved for use by the implementation.
2356
613bc14f
DM
23572017-12-06 David Malcolm <dmalcolm@redhat.com>
2358
2359 * c-decl.c: Include "c-family/c-spellcheck.h".
2360
05abad4c
ML
23612017-12-05 Martin Liska <mliska@suse.cz>
2362 Jakub Jelinek <jakub@redhat.com>
2363
2364 * c-typeck.c (pointer_diff): Add new argument and instrument
2365 pointer subtraction.
2366 (build_binary_op): Similar for pointer comparison.
2367
cc6534d4
JJ
23682017-12-01 Jakub Jelinek <jakub@redhat.com>
2369
65791f42
JJ
2370 PR c/79153
2371 * c-parser.c: Include tree-iterator.h.
2372 (c_parser_switch_statement): Emit LABEL_EXPR for the break label
2373 into SWITCH_BODY instead of after it and set SWITCH_BREAK_LABEL_P
2374 on it.
2375
cc6534d4
JJ
2376 PR c/83222
2377 * c-tree.h (decl_constant_value_1): Declare.
2378 * c-typeck.c (decl_constant_value_1): New function.
2379 (decl_constant_value): Use it.
2380 * c-fold.c (c_fully_fold_internal): If in_init, use
2381 decl_constant_value_1 instead of decl_constant_value.
2382
5de73c05
JJ
23832017-11-30 Jakub Jelinek <jakub@redhat.com>
2384
2385 * c-parser.c (c_parser_postfix_expression): Use ; instead of ;;.
2386
058f0b9e
JJ
23872017-11-28 Jakub Jelinek <jakub@redhat.com>
2388
2389 PR sanitizer/81275
2390 * c-typeck.c (c_finish_case): Set SWITCH_ALL_CASES_P if
2391 c_switch_covers_all_cases_p returns true.
2392
5e9d6aa4 23932017-11-28 Julia Koval <julia.koval@intel.com>
92a285c1 2394 Sebastian Peryt <sebastian.peryt@intel.com>
5e9d6aa4
JK
2395
2396 * Make-lang.in (c/c-array-notation.o): Remove.
2397 * c-array-notation.c: Delete.
2398 * c-decl.c: Remove cilkplus condition.
2399 * c-parser.c (c_parser_cilk_simd, c_parser_cilk_for,
2400 c_parser_cilk_verify_simd, c_parser_array_notation,
2401 c_parser_cilk_clause_vectorlength, c_parser_cilk_grainsize,
2402 c_parser_cilk_simd_fn_vector_attrs,
2403 c_finish_cilk_simd_fn_tokens): Delete.
2404 (c_parser_declaration_or_fndef): Remove cilkplus condition.
2405 (c_parser_direct_declarator_inner): Ditto.
2406 (CILK_SIMD_FN_CLAUSE_MASK): Delete.
2407 (c_parser_attributes, c_parser_compound_statement,
2408 c_parser_statement_after_labels, c_parser_if_statement,
2409 c_parser_switch_statement, c_parser_while_statement,
2410 c_parser_do_statement, c_parser_for_statement,
2411 c_parser_unary_expression, c_parser_postfix_expression,
2412 c_parser_postfix_expression_after_primary,
2413 c_parser_pragma, c_parser_omp_clause_name, c_parser_omp_all_clauses,
2414 c_parser_omp_for_loop, c_finish_omp_declare_simd): Remove cilkplus
2415 support.
2416 * c-typeck.c (build_array_ref, build_function_call_vec,
2417 convert_arguments,
2418 lvalue_p, build_compound_expr, c_finish_return, c_finish_if_stmt,
2419 c_finish_loop, build_binary_op): Remove cilkplus support.
2420
9e851845
JJ
24212017-11-28 Jakub Jelinek <jakub@redhat.com>
2422
2423 * c-typeck.c (c_start_case): Build SWITCH_EXPR using build2 instead
2424 of build3.
2425
ab20d992 24262017-11-14 Boris Kolpackov <boris@codesynthesis.com>
8c7dbea9
BK
2427
2428 * Make-lang.in (c.install-plugin): Install backend import library.
2429
41521dee
JJ
24302017-11-23 Jakub Jelinek <jakub@redhat.com>
2431
2432 * c-parser.c (c_parser_omp_declare_simd): Reject declare simd in
2433 pragma_stmt context.
2434
ac9effed
EB
24352017-11-23 Mike Stump <mikestump@comcast.net>
2436 Eric Botcazou <ebotcazou@adacore.com>
2437
2438 * c-parser.c (c_parser_while_statement): Pass 3rd operand to
2439 ANNOTATE_EXPR.
2440 (c_parser_do_statement): Likewise.
2441 (c_parser_for_statement): Likewise.
2442
ce95abc4
DM
24432017-11-22 David Malcolm <dmalcolm@redhat.com>
2444
2445 PR c++/62170
2446 * c-objc-common.c (c_tree_printer): Convert penultimate param from
2447 bool to bool *. Within '%T' handling, if showing an "aka", use
2448 "quoted" param to add appropriate quoting.
2449
974aedcc
MP
24502017-11-22 Marek Polacek <polacek@redhat.com>
2451
2452 PR c++/60336
2453 PR middle-end/67239
2454 PR target/68355
2455 * c-decl.c (grokdeclarator): Set DECL_PADDING_P on unnamed bit-fields.
2456
d4300cc6
DM
24572017-11-21 David Malcolm <dmalcolm@redhat.com>
2458
2459 PR c/83056
2460 * c-decl.c (lookup_name_fuzzy): Don't suggest names that came from
2461 earlier failed lookups.
2462
1af4ebf5
MG
24632017-11-21 Marc Glisse <marc.glisse@inria.fr>
2464
2465 * c-fold.c (c_fully_fold_internal): Handle POINTER_DIFF_EXPR.
2466 * c-typeck.c (pointer_diff): Use POINTER_DIFF_EXPR.
2467
26edace6
DM
24682017-11-20 David Malcolm <dmalcolm@redhat.com>
2469
2470 PR c/81404
2471 * c-decl.c: Include "c-family/known-headers.h".
2472 (get_c_name_hint): Rename to get_stdlib_header_for_name and move
2473 to known-headers.cc.
2474 (class suggest_missing_header): Move to known-header.h.
2475 (lookup_name_fuzzy): Call get_c_stdlib_header_for_name rather
2476 than get_c_name_hint.
2477
b1212255
DM
24782017-11-20 David Malcolm <dmalcolm@redhat.com>
2479
2480 * c-decl.c (get_c_name_hint): New function.
2481 (class suggest_missing_header): New class.
2482 (lookup_name_fuzzy): Call get_c_name_hint and use it to
2483 suggest missing headers to the user.
2484
6c7a259b
DM
24852017-11-20 David Malcolm <dmalcolm@redhat.com>
2486
2487 * c-decl.c: Define INCLUDE_UNIQUE_PTR before including system.h.
2488 Include "c-family/name-hint.h"
2489 (implicit_decl_warning): Convert "hint" from
2490 const char * to name_hint. Pass location to
2491 lookup_name_fuzzy. Suppress any deferred diagnostic if the
2492 warning was not printed.
2493 (undeclared_variable): Likewise for "guessed_id".
2494 (lookup_name_fuzzy): Convert return type from const char *
2495 to name_hint. Add location_t param.
2496 * c-parser.c: Define INCLUDE_UNIQUE_PTR before including system.h.
2497 Include "c-family/name-hint.h"
2498 (c_parser_declaration_or_fndef): Convert "hint" from
2499 const char * to name_hint. Pass location to lookup_name_fuzzy.
2500 (c_parser_parameter_declaration): Likewise.
2501
f9c59f7e
JJ
25022017-11-19 Jakub Jelinek <jakub@redhat.com>
2503
2504 PR c/66618
2505 PR c/69960
2506 * c-parser.c (c_parser_omp_atomic): Pass true as LVAL to c_fully_fold
2507 where needed.
2508 * c-typeck.c (build_unary_op, build_modify_expr, build_asm_expr,
2509 handle_omp_array_sections): Likewise.
2510 (digest_init): Don't call decl_constant_value_for_optimization.
2511 * c-tree.h (decl_constant_value_for_optimization): Removed.
2512 * c-fold.c (c_fold_array_ref): New function.
2513 (c_fully_fold_internal): Add LVAL argument, propagate it through
2514 recursive calls. For VAR_P call decl_constant_value and
2515 unshare if not LVAL and either optimizing or IN_INIT. Remove
2516 decl_constant_value_for_optimization calls. If IN_INIT and not LVAL,
2517 fold ARRAY_REF with STRING_CST and INTEGER_CST operands.
2518 (c_fully_fold): Add LVAL argument, pass it through to
2519 c_fully_fold_internal.
2520 (decl_constant_value_for_optimization): Removed.
2521
3ca0dc60
JM
25222017-11-15 Joseph Myers <joseph@codesourcery.com>
2523
2524 PR c/81156
2525 * c-parser.c (check_tgmath_function): New function.
2526 (enum tgmath_parm_kind): New enum.
2527 (c_parser_postfix_expression): Handle __builtin_tgmath.
2528
64a5912c
DM
25292017-10-31 David Malcolm <dmalcolm@redhat.com>
2530
2531 * c-decl.c (implicit_decl_warning): Update for renaming of
2532 pedwarn_at_rich_loc and warning_at_rich_loc.
2533 (implicitly_declare): Likewise for renaming of inform_at_rich_loc.
2534 (undeclared_variable): Likewise for renaming of error_at_rich_loc.
2535 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
2536 (c_parser_struct_or_union_specifier): Likewise for renaming of
2537 pedwarn_at_rich_loc.
2538 (c_parser_parameter_declaration): Likewise for renaming of
2539 error_at_rich_loc.
2540 * c-typeck.c (build_component_ref): Likewise.
2541 (build_unary_op): Likewise for renaming of inform_at_rich_loc.
2542 (pop_init_level): Likewise for renaming of warning_at_rich_loc.
2543 (set_init_label): Likewise for renaming of error_at_rich_loc.
2544
c1136864
RB
25452017-10-30 Richard Biener <rguenther@suse.de>
2546
2547 * gimple-parser.c (c_parser_gimple_statement): Parse conditional
2548 stmts.
2549
ee5fd23a
MM
25502017-10-27 Michael Meissner <meissner@linux.vnet.ibm.com>
2551
2552 * c-decl.c (header_for_builtin_fn): Add support for copysign, fma,
2553 fmax, fmin, and sqrt _Float<N> and _Float<N>X variants.
2554
1a59ccf2
DM
25552017-10-25 David Malcolm <dmalcolm@redhat.com>
2556
2557 PR c/7356
2558 * c-parser.c (c_parser_declaration_or_fndef): Detect missing
2559 semicolons.
2560
bc1a75dd
JJ
25612017-10-25 Jakub Jelinek <jakub@redhat.com>
2562
2563 PR libstdc++/81706
2564 * c-decl.c (merge_decls): Copy "omp declare simd" attributes from
2565 newdecl to corresponding __builtin_ if any.
2566
ff1ff960
PC
25672017-10-24 Paolo Carlini <paolo.carlini@oracle.com>
2568
2569 PR c++/82466
2570 * c-decl.c (diagnose_mismatched_decls): Use
2571 OPT_Wbuiltin_declaration_mismatch.
2572
62e1c678
DM
25732017-10-12 David Malcolm <dmalcolm@redhat.com>
2574
2575 * c-parser.c (c_parser_require): Add "type_is_unique" param and
2576 use it to guard calls to maybe_suggest_missing_token_insertion.
2577 (c_parser_parms_list_declarator): Override default value of new
2578 "type_is_unique" param to c_parser_require.
2579 (c_parser_asm_statement): Likewise.
2580 * c-parser.h (c_parser_require): Add "type_is_unique" param,
2581 defaulting to true.
2582
a92f6726
NS
25832017-10-11 Nathan Sidwell <nathan@acm.org>
2584
2585 * c-decl.c (grokdeclarator): Check HAS_DECL_ASSEMBLER_NAME_P too.
2586
8e6cdc90
RS
25872017-10-10 Richard Sandiford <richard.sandiford@linaro.org>
2588
2589 * c-parser.c (c_parser_cilk_clause_vectorlength): Use wi::to_wide when
2590 operating on trees as wide_ints.
2591 * c-typeck.c (build_c_cast, c_finish_omp_clauses): Likewise.
2592 (c_tree_equal): Likewise.
2593
8139a48e
DM
25942017-10-04 David Malcolm <dmalcolm@redhat.com>
2595
2596 * c-decl.c (push_parm_decl): Store c_parm's location into the
2597 PARAM_DECL.
2598 (build_c_parm): Add "loc" param and store it within the c_parm.
2599 * c-parser.c (struct c_parser): Add "last_token_location" field.
2600 (c_parser_consume_token): Store location of the token into the
2601 new field.
2602 (c_parser_declaration_or_fndef): Store params into DECL_ARGUMENTS
2603 when handling a FUNCTION_DECL, if it doesn't already have them.
2604 (c_parser_parameter_declaration): Generate a location for the
2605 parameter, and pass it to the call to build_c_parm.
2606 * c-tree.h (struct c_parm): Add field "loc".
2607 (build_c_parm): Add location_t param.
2608 * c-typeck.c (get_fndecl_argument_location): New function.
2609 (inform_for_arg): New function.
2610 (convert_for_assignment): Use inform_for_arg when dealing with
2611 ic_argpass.
2612
2a389958
JJ
26132017-09-29 Jakub Jelinek <jakub@redhat.com>
2614
7d386d45
JJ
2615 * c-decl.c (grokfield): Use SET_DECL_C_BIT_FIELD here if
2616 width is non-NULL.
2617 (finish_struct): Test DECL_C_BIT_FIELD instead of DECL_INITIAL,
2618 don't SET_DECL_C_BIT_FIELD here.
2619
2a389958
JJ
2620 PR c/82340
2621 * c-decl.c (build_compound_literal): Use c_apply_type_quals_to_decl
2622 instead of trying to set just TREE_READONLY manually.
2623
ebc6a85e
TV
26242017-09-16 Tom de Vries <tom@codesourcery.com>
2625
2626 PR c/81875
2627 * c-parser.c (c_parser_omp_for_loop): Fold only operands of cond, not
2628 cond itself.
2629
bb75facd
JM
26302017-09-15 Joseph Myers <joseph@codesourcery.com>
2631
2632 PR c/82071
2633 * c-typeck.c (ep_convert_and_check): Just call convert_and_check
2634 for C11.
2635 (build_conditional_expr): For C11, generate result with excess
2636 precision when one argument is an integer and the other is of a
2637 type using excess precision.
2638
1d933576
BE
26392017-09-15 Bernd Edlinger <bernd.edlinger@hotmail.de>
2640
2641 * c-typeck.c (build_c_cast): Implement -Wcast-align=strict.
2642
267bbb6f
MP
26432017-09-13 Marek Polacek <polacek@redhat.com>
2644
2645 PR c/82167
2646 * c-typeck.c (c_expr_sizeof_expr): Use the type of expr.value rather
2647 than expr.original_type.
2648
6836632e
NS
26492017-09-12 Nathan Sidwell <nathan@acm.org>
2650
2651 * c-decl.c (field_decl_cmp, resort_data, resort_field_decl_cmp,
2652 resort_sorted_fields): Moved from c-family/c-common.c.
2653 * c-lang.h (struct sorted_fields_type): Moved from c-family/c-common.h.
2654
e035be33
JM
26552017-09-01 Joseph Myers <joseph@codesourcery.com>
2656
2657 PR c/82071
2658 * c-typeck.c (build_atomic_assign): Handle argument with excess
2659 precision. Ensure any EXCESS_PRECISION_EXPR is present in
2660 argument passed to build_binary_op and convert_for_assignment but
2661 not for call to c_fully_fold.
2662 (build_modify_expr): Do not remove EXCESS_PRECISION_EXPR early.
2663 Ensure build_binary_op is called with argument with original
2664 semantic type. Avoid calling c_fully_fold with an
2665 EXCESS_PRECISION_EXPR from build_binary_op.
2666
d2e05fcb
JJ
26672017-09-01 Jakub Jelinek <jakub@redhat.com>
2668
2669 PR c/81887
2670 * c-parser.c (c_parser_omp_ordered): Handle -fopenmp-simd.
2671
b397965c
RS
26722017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
2673 Alan Hayward <alan.hayward@arm.com>
2674 David Sherwood <david.sherwood@arm.com>
2675
2676 * c-typeck.c (build_binary_op): Use SCALAR_TYPE_MODE.
2677 (c_common_type): Likewise. Use as_a <scalar_mode> when setting
2678 m1 and m2 to the signed equivalent of a fixed-point
2679 SCALAR_TYPE_MODE.
2680
14e18d71
DM
26812017-08-24 David Malcolm <dmalcolm@redhat.com>
2682
2683 * c-tree.h (c_expr::get_location) Use EXPR_HAS_LOCATION rather
2684 than CAN_HAVE_LOCATION_P when determining whether to use the
2685 location_t value within "value".
2686
7f204c0f
DM
26872017-08-21 David Malcolm <dmalcolm@redhat.com>
2688
2689 * c-parser.c (c_parser_expr_list): Use c_expr::get_location ()
2690 rather than peeking the location of the first token.
2691 * c-tree.h (c_expr::get_location): New method.
2692
2f687306
DM
26932017-08-21 David Malcolm <dmalcolm@redhat.com>
2694
2695 * c-typeck.c (build_function_call_vec): Pass arg_loc to call
2696 to check_function_arguments.
2697
3e7b80d7
MP
26982017-08-18 Marek Polacek <polacek@redhat.com>
2699
2700 * c-parser.c (c_parser_postfix_expression): Remove unused code. Update
2701 commentary.
2702
00aa1fa2
L
27032017-08-18 H.J. Lu <hongjiu.lu@intel.com>
2704
2705 PR c/53037
2706 * c-decl.c (merge_decls): Also merge DECL_WARN_IF_NOT_ALIGN.
2707 (check_bitfield_type_and_width): Don't allow bit-field with
2708 warn_if_not_aligned type.
2709
da67acb9
MS
27102017-08-14 Martin Sebor <msebor@redhat.com>
2711
2712 PR c/81117
2713 * c-objc-common.c (c_objc_common_init): Handle 'G'.
2714
bb85aa74
MP
27152017-08-11 Marek Polacek <polacek@redhat.com>
2716
2717 PR c/81795
2718 * c-decl.c (pushtag): Only print inform if the warning was printed.
2719 (grokdeclarator): Likewise.
2720
32129a17
DM
27212017-08-10 David Malcolm <dmalcolm@redhat.com>
2722
2723 * c-parser.c (c_parser_error): Rename to...
2724 (c_parser_error_richloc): ...this, making static, and adding
2725 "richloc" parameter, passing it to the c_parse_error call,
2726 rather than calling c_parser_set_source_position_from_token.
2727 (c_parser_error): Reintroduce, reimplementing in terms of the
2728 above, converting return type from void to bool.
2729 (class token_pair): New class.
2730 (struct matching_paren_traits): New struct.
2731 (matching_parens): New typedef.
2732 (struct matching_brace_traits): New struct.
2733 (matching_braces): New typedef.
2734 (get_matching_symbol): New function.
2735 (c_parser_require): Add param MATCHING_LOCATION, using it to
2736 highlight matching "opening" tokens for missing "closing" tokens.
2737 (c_parser_skip_until_found): Likewise.
2738 (c_parser_static_assert_declaration_no_semi): Convert explicit
2739 parsing of CPP_OPEN_PAREN and CPP_CLOSE_PAREN to use of
2740 class matching_parens, so that the pertinent open parenthesis is
2741 highlighted when there are problems locating the close
2742 parenthesis.
2743 (c_parser_struct_or_union_specifier): Likewise.
2744 (c_parser_typeof_specifier): Likewise.
2745 (c_parser_alignas_specifier): Likewise.
2746 (c_parser_simple_asm_expr): Likewise.
2747 (c_parser_braced_init): Likewise, for matching_braces.
2748 (c_parser_paren_condition): Likewise, for matching_parens.
2749 (c_parser_switch_statement): Likewise.
2750 (c_parser_for_statement): Likewise.
2751 (c_parser_asm_statement): Likewise.
2752 (c_parser_asm_operands): Likewise.
2753 (c_parser_cast_expression): Likewise.
2754 (c_parser_sizeof_expression): Likewise.
2755 (c_parser_alignof_expression): Likewise.
2756 (c_parser_generic_selection): Likewise.
2757 (c_parser_postfix_expression): Likewise for cases RID_VA_ARG,
2758 RID_OFFSETOF, RID_TYPES_COMPATIBLE_P, RID_AT_SELECTOR,
2759 RID_AT_PROTOCOL, RID_AT_ENCODE, reindenting as necessary.
2760 In case CPP_OPEN_PAREN, pass loc_open_paren to the
2761 c_parser_skip_until_found call.
2762 (c_parser_objc_class_definition): Use class matching_parens as
2763 above.
2764 (c_parser_objc_method_decl): Likewise.
2765 (c_parser_objc_try_catch_finally_statement): Likewise.
2766 (c_parser_objc_synchronized_statement): Likewise.
2767 (c_parser_objc_at_property_declaration): Likewise.
2768 (c_parser_oacc_wait_list): Likewise.
2769 (c_parser_omp_var_list_parens): Likewise.
2770 (c_parser_omp_clause_collapse): Likewise.
2771 (c_parser_omp_clause_default): Likewise.
2772 (c_parser_omp_clause_if): Likewise.
2773 (c_parser_omp_clause_num_threads): Likewise.
2774 (c_parser_omp_clause_num_tasks): Likewise.
2775 (c_parser_omp_clause_grainsize): Likewise.
2776 (c_parser_omp_clause_priority): Likewise.
2777 (c_parser_omp_clause_hint): Likewise.
2778 (c_parser_omp_clause_defaultmap): Likewise.
2779 (c_parser_oacc_single_int_clause): Likewise.
2780 (c_parser_omp_clause_ordered): Likewise.
2781 (c_parser_omp_clause_reduction): Likewise.
2782 (c_parser_omp_clause_schedule): Likewise.
2783 (c_parser_omp_clause_num_teams): Likewise.
2784 (c_parser_omp_clause_thread_limit): Likewise.
2785 (c_parser_omp_clause_aligned): Likewise.
2786 (c_parser_omp_clause_linear): Likewise.
2787 (c_parser_omp_clause_safelen): Likewise.
2788 (c_parser_omp_clause_simdlen): Likewise.
2789 (c_parser_omp_clause_depend): Likewise.
2790 (c_parser_omp_clause_map): Likewise.
2791 (c_parser_omp_clause_device): Likewise.
2792 (c_parser_omp_clause_dist_schedule): Likewise.
2793 (c_parser_omp_clause_proc_bind): Likewise.
2794 (c_parser_omp_clause_uniform): Likewise.
2795 (c_parser_omp_for_loop): Likewise.
2796 (c_parser_cilk_clause_vectorlength): Likewise.
2797 (c_parser_cilk_clause_linear): Likewise.
2798 (c_parser_transaction_expression): Likewise.
2799 * c-parser.h (c_parser_require): Add param matching_location with
2800 default UNKNOWN_LOCATION.
2801 (c_parser_error): Convert return type from void to bool.
2802 (c_parser_skip_until_found): Add param matching_location with
2803 default UNKNOWN_LOCATION.
2804
30af3a2b
MP
28052017-08-09 Marek Polacek <polacek@redhat.com>
2806
2807 * c-decl.c (build_enumerator): Use true/false instead of 1/0.
2808 * c-tree.h (build_external_ref): Update declaration.
2809 * c-typeck.c (build_array_ref): Use true/false instead of 1/0.
2810 (build_external_ref): Change the type of a parameter to bool.
2811 (parser_build_binary_op): Use true/false instead of 1/0.
2812 (pointer_diff): Likewise.
2813 (build_modify_expr): Likewise.
2814 (set_designator): Change the type of a parameter to bool.
2815 (set_init_index): Use true/false instead of 1/0.
2816 (set_init_label): Likewise.
2817 (output_init_element): Change the type of a parameter to bool.
2818 (output_pending_init_elements): Use true/false instead of 1/0.
2819 (process_init_element): Likewise.
2820 (build_binary_op): Change the type of a parameter to bool.
2821
296c53ac
MP
28222017-08-09 Marek Polacek <polacek@redhat.com>
2823
2824 PR c/81233
2825 * c-typeck.c (pedwarn_init): Make the function take a variable list.
2826 Call emit_diagnostic_valist instead of pedwarn.
2827 (convert_for_assignment): Unroll the PEDWARN_FOR_ASSIGNMENT macro.
2828 Print the relevant types in diagnostics.
2829
a32c8316
MP
28302017-08-09 Marek Polacek <polacek@redhat.com>
2831
2832 PR c/81417
2833 * c-array-notation.c (fix_builtin_array_notation_fn): Update calls to
ab20d992 2834 build_conditional_expr.
a32c8316
MP
2835 * c-parser.c (c_parser_conditional_expression): Create locations for
2836 EXP1 and EXP2 from their source ranges. Pass the locations down to
2837 build_conditional_expr.
2838 * c-tree.h (build_conditional_expr): Update declaration.
2839 * c-typeck.c (build_conditional_expr): Add location_t parameters.
2840 For -Wsign-compare, also print the types.
2841
314e6352
ML
28422017-08-08 Martin Liska <mliska@suse.cz>
2843
2844 * c-convert.c: Include header files.
2845 * c-typeck.c: Likewise.
2846
577eec56
ML
28472017-08-07 Martin Liska <mliska@suse.cz>
2848
2849 * c-parser.c (c_parser_attributes): Canonicalize name of an
2850 attribute.
2851
f7b6353a
MP
28522017-08-02 Marek Polacek <polacek@redhat.com>
2853
2854 PR c/81289
2855 * c-parser.c (c_parser_unary_expression): Use set_error.
2856
8a6eab34
MP
2857 PR c/81448
2858 PR c/81306
2859 * c-warn.c (warn_for_multistatement_macros): Prevent bogus
2860 warnings. Avoid walking MACRO_MAP_LOCATIONS.
2861
ab20d992 28622017-07-31 Jan Hubicka <hubicka@ucw.cz>
7fef86d3
JH
2863 Martin Liska <mliska@suse.cz>
2864
2865 * c-typeck.c (c_finish_goto_label): Build gimple predict
f7b6353a 2866 statement.
7fef86d3 2867
f34ebeb2
ML
28682017-07-31 Martin Liska <mliska@suse.cz>
2869
2870 PR sanitize/81530
2871 * c-convert.c (convert): Guard condition with flag_sanitize_p
2872 also with current_function_decl non-null equality.
2873 * c-decl.c (grokdeclarator): Likewise.
2874 * c-typeck.c (build_binary_op): Likewise.
2875
8595f67b
MP
28762017-07-25 Marek Polacek <polacek@redhat.com>
2877
2878 * c-decl.c (grokfield): Remove local variable.
2879
d49718d6
MP
28802017-07-25 Marek Polacek <polacek@redhat.com>
2881
2882 PR c/81364
2883 * c-parser.c (c_parser_else_body): Don't warn about multistatement
2884 macro expansion if the body is in { }.
2885 (c_parser_while_statement): Likewise.
2886 (c_parser_for_statement): Likewise.
2887
ff22eb12
NS
28882017-07-18 Nathan Sidwell <nathan@acm.org>
2889
2890 * c-parser.c (c_parser_array_notation): Use TYPE_{MIN,MAX}_VALUE.
2891
eea77d1f
DM
28922017-07-14 David Malcolm <dmalcolm@redhat.com>
2893
2894 * c-decl.c (implicitly_declare): When suggesting a missing
2895 #include, provide a fix-it hint.
2896
b6f43128
DM
28972017-07-06 David Malcolm <dmalcolm@redhat.com>
2898
2899 * c-lang.c (selftest::run_c_tests): Move body to c_family_tests,
2900 and call that instead.
2901 * c-tree.h (selftest::run_c_tests): New decl.
2902
3e2becc4
MP
29032017-06-26 Marek Polacek <polacek@redhat.com>
2904
2905 PR c/80116
2906 * c-parser.c (c_parser_if_body): Set the location of the
2907 body of the conditional after parsing all the labels. Call
2908 warn_for_multistatement_macros.
2909 (c_parser_else_body): Likewise.
2910 (c_parser_switch_statement): Likewise.
2911 (c_parser_while_statement): Likewise.
2912 (c_parser_for_statement): Likewise.
2913 (c_parser_statement): Add a default argument. Save the location
2914 after labels have been parsed.
2915 (c_parser_c99_block_statement): Likewise.
2916
343ae898
RB
29172017-06-19 Richard Biener <rguenther@suse.de>
2918
2919 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
2920 negated _Literals to parse _Literal (int) -1.
2921
45b2222a
ML
29222017-06-13 Martin Liska <mliska@suse.cz>
2923
2924 PR sanitize/78204
2925 * c-convert.c (convert): Use sanitize_flags_p.
2926 * c-decl.c (grokdeclarator): Likewise.
2927 * c-typeck.c (convert_for_assignment): Likewise.
2928 (c_finish_return): Likewise.
2929 (build_binary_op): Likewise.
2930
8ab7005b
JJ
29312017-06-08 Jakub Jelinek <jakub@redhat.com>
2932
2933 PR c/81006
2934 * c-typeck.c (handle_omp_array_sections_1): Convert TYPE_MAX_VALUE
2935 to sizetype before size_binop.
2936
363dc72c
JJ
29372017-06-07 Jakub Jelinek <jakub@redhat.com>
2938
2939 * gimple-parser.c (c_parser_parse_gimple_body): Use TDI_gimple instead
2940 of TDI_generic.
2941
dc949728
MP
29422017-06-06 Marek Polacek <polacek@redhat.com>
2943
2944 PR c/79983
2945 * c-decl.c (start_struct): Use the location of TYPE_STUB_DECL of
2946 ref.
2947 (start_enum): Use the location of TYPE_STUB_DECL of enumtype.
2948
40ffd95f
BE
29492017-06-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
2950
2951 * c-parser.c (c_parser_binary_expression): Implement the
2952 -Wsizeof_pointer_div warning.
2953 (c_parser_postfix_expression): Allow SIZEOF_EXPR as expr.original_code
2954 from a parenthesized expression.
2955 (c_parser_expr_list): Use c_last_sizeof_loc.
2956 * c-tree.h (c_last_sizeof_loc): New external.
2957 * c-typeck.c (c_last_sizeof_loc): New variable.
2958 (c_expr_sizeof_expr, c_expr_sizeof_type): Assign c_last_sizeof_loc.
2959
9fc5e7a4
MM
29602017-05-31 Mikhail Maltsev <maltsevm@gmail.com>
2961
2962 PR testsuite/80580
2963 * gimple-parser.c (c_parser_gimple_if_stmt): Check for empty labels.
2964
f012c8ef
DM
29652017-05-30 David Malcolm <dmalcolm@redhat.com>
2966
2967 * c-objc-common.c (c_tree_printer): Gain bool and const char **
2968 parameters.
2969
3cd211af
MS
29702017-05-24 Martin Sebor <msebor@redhat.com>
2971
2972 PR c/80731
2973 * c-fold.c (c_fully_fold_internal): Adjust.
2974 * c-typeck.c (parser_build_unary_op): Adjust.
2975
fd71a9a2
TS
29762017-05-23 Thomas Schwinge <thomas@codesourcery.com>
2977
2978 * c-parser.c (OACC_KERNELS_CLAUSE_MASK): Add
2979 "PRAGMA_OACC_CLAUSE_NUM_GANGS", "PRAGMA_OACC_CLAUSE_NUM_WORKERS",
2980 "VECTOR_LENGTH".
2981
92fa0f9e
MP
29822017-05-23 Marek Polacek <polacek@redhat.com>
2983
2984 * c-parser.c (c_parser_compound_statement_nostart): Remove redundant
2985 quotes.
2986
d11c168a
JJ
29872017-05-22 Jakub Jelinek <jakub@redhat.com>
2988
2989 * c-fold.c (c_fully_fold_internal): Save the c_fully_fold_internal
2990 result for SAVE_EXPR operand and set SAVE_EXPR_FOLDED_P even if
2991 it returned invariant. Call tree_invariant_p unconditionally
2992 afterwards to decide whether to return expr or op0.
2993
58aca9d9
NS
29942017-05-22 Nathan Sidwell <nathan@acm.org>
2995
2996 * c-decl.c (c_parse_final_cleanups): Drop TDI_tu handling.
2997
7fd549d2
TS
29982017-05-19 Thomas Schwinge <thomas@codesourcery.com>
2999
3000 * c-parser.c (c_parser_omp_clause_default): Handle
3001 "OMP_CLAUSE_DEFAULT_PRESENT".
3002
6ecd2339
BE
30032017-05-18 Bernd Edlinger <bernd.edlinger@hotmail.de>
3004
3005 * config-lang.in (gtfiles): Add c-family/c-format.c.
3006
8a57ecff
NS
30072017-05-18 Nathan Sidwell <nathan@acm.org>
3008
3009 * c-decl.c (pushdecl_top_level): Delete unused function.
3010
6574d78e
MP
30112017-05-18 Marek Polacek <polacek@redhat.com>
3012
3013 * c-decl.c (match_builtin_function_types): Use NULL_TREE instead of 0.
3014 (check_earlier_gotos): Likewise.
3015 (define_label): Likewise.
3016 (pending_xref_error): Likewise.
3017 (smallest_type_quals_location): Likewise.
3018 (grokdeclarator): Likewise.
3019 (grokparms): Likewise.
3020 (identifier_global_value): Likewise.
3021 * c-typeck.c (set_nonincremental_init_from_string): Likewise.
3022 (find_init_member): Likewise.
3023
e3455240
MP
30242017-05-18 Marek Polacek <polacek@redhat.com>
3025
3026 * c-decl.c (start_decl): Use false/true instead of 0/1.
3027 (grokdeclarator): Likewise.
3028 (finish_struct): Likewise.
3029 (start_function): Change the return type to bool. Use false/true
3030 instead of 0/1.
3031 (declspecs_add_qual): Use UNKNOWN_LOCATION instead of 0.
3032 * c-tree.h (start_function): Update.
3033 * c-typeck.c (same_translation_unit_p): Change the return type to bool.
3034 (set_designator): Change the return type to bool. Use false/true
3035 instead of 0/1.
3036
3fa8871b
MP
30372017-05-17 Marek Polacek <polacek@redhat.com>
3038
3039 * c-decl.c: Use NULL_TREE instead of 0 where appropriate.
3040 * c-typeck.c: Likewise.
3041
142473df
MP
30422017-05-17 Marek Polacek <polacek@redhat.com>
3043
3044 PR sanitizer/80659
3045 * c-decl.c (build_compound_literal): Set DECL_ARTIFICIAL and
3046 DECL_IGNORED_P even for non-static compound literals.
3047
1a817418
ML
30482017-05-17 Martin Liska <mliska@suse.cz>
3049
3050 * c-decl.c (c_parse_final_cleanups): Introduce dump_flags_t type and
3051 use it instead of int type.
3052
b2fa0a8b
MP
30532017-05-17 Marek Polacek <polacek@redhat.com>
3054
3055 * c-convert.c (convert): Replace c_save_expr with save_expr. Don't
3056 call c_fully_fold.
3057 (convert) <case COMPLEX_TYPE>: Remove special handling of COMPLEX_TYPEs.
ab20d992 3058 * c-decl.c (grokdeclarator): Replace c_save_expr with save_expr.
b2fa0a8b
MP
3059 * c-fold.c (c_fully_fold_internal): Handle SAVE_EXPR.
3060 * c-parser.c (c_parser_declaration_or_fndef): Replace c_save_expr with
3061 save_expr.
3062 (c_parser_conditional_expression): Likewise.
3063 * c-tree.h (SAVE_EXPR_FOLDED_P): Define.
3064 * c-typeck.c (build_modify_expr): Replace c_save_expr with save_expr.
3065 (process_init_element): Likewise.
3066 (build_binary_op): Likewise.
3067 (handle_omp_array_sections_1): Likewise.
3068
1e47f02b
TS
30692017-05-12 Thomas Schwinge <thomas@codesourcery.com>
3070
3071 * c-parser.c (c_parser_omp_clause_num_gangs)
3072 (c_parser_omp_clause_num_workers)
3073 (c_parser_omp_clause_vector_length): Merge functions into...
3074 (c_parser_oacc_single_int_clause): ... this new function. Adjust
3075 all users.
3076
c24e924f
NS
30772017-05-11 Nathan Sidwell <nathan@acm.org>
3078
3079 * gimple-parser.c: Don't #include tree-dump.h.
3080
c587104e
MM
30812017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
3082
3083 PR testsuite/80580
3084 * gimple-parser.c (c_parser_parse_ssa_name): Validate SSA name base.
3085
67ac9a9d
MM
30862017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
3087
3088 PR testsuite/80580
3089 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
3090 incorrect __MEM syntax.
3091
ac4eb40f
MM
30922017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
3093
3094 PR testsuite/80580
3095 * gimple-parser.c (c_parser_gimple_unary_expression): Check argument
3096 type of unary '*'.
3097
641da50a
NS
30982017-05-09 Nathan Sidwell <nathan@acm.org>
3099
3100 * c-tree.h (pushdecl): Declare.
3101
56d35585
DM
31022017-05-05 David Malcolm <dmalcolm@redhat.com>
3103
3104 * c-decl.c (warn_defaults_to): Replace report_diagnostic
3105 with diagnostic_report_diagnostic.
3106 * c-errors.c (pedwarn_c99): Likewise.
3107 (pedwarn_c90): Likewise.
3108
815d9cc6
XR
31092017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn>
3110
92a285c1 3111 PR c++/80038
815d9cc6
XR
3112 * c-gimplify.c (c_gimplify_expr): Remove calls to
3113 cilk_gimplifY_call_params_in_spawned_fn.
3114
1c4ea66f
DM
31152017-04-25 David Malcolm <dmalcolm@redhat.com>
3116
3117 * c-parser.c (c_parser_struct_or_union_specifier): Add fix-it
3118 hint for removing extra semicolon.
3119
666f7903
JJ
31202017-04-21 Jakub Jelinek <jakub@redhat.com>
3121
3122 PR c/80468
3123 * c-decl.c (finish_declspecs) <case cts_int_n>: If int_n_idx is not
3124 enabled, set specs->type to integer_type_node.
3125
5764ee3c
JW
31262017-04-03 Jonathan Wakely <jwakely@redhat.com>
3127
3128 * c-array-notation.c: Fix typo in comment.
3129
10fa8dfb
MP
31302017-03-29 Marek Polacek <polacek@redhat.com>
3131
3132 PR c/79730
3133 * c-decl.c (finish_decl): Check VAR_P.
3134
a9e4a1a5
JJ
31352017-03-27 Jakub Jelinek <jakub@redhat.com>
3136
3137 PR middle-end/80162
3138 * c-tree.h (c_mark_addressable): Add array_ref_p argument.
3139 * c-typeck.c (c_mark_addressable): Likewise. Look through
3140 VIEW_CONVERT_EXPR unless array_ref_p and VCE is from VECTOR_TYPE
3141 to ARRAY_TYPE.
3142 (build_array_ref): Pass true as array_ref_p to c_mark_addressable.
3143
ee3ff394
MP
31442017-03-23 Marek Polacek <polacek@redhat.com>
3145
3146 * c-tree.h: Remove a C_RID_YYCODE reference.
3147
4d1b8e70
JJ
31482017-03-21 Jakub Jelinek <jakub@redhat.com>
3149
3150 PR c/80097
3151 * c-typeck.c (build_binary_op): Add EXCESS_PRECISION_EXPR only around
3152 optional COMPOUND_EXPR with ubsan instrumentation.
3153
31dc71a8
MP
31542017-03-17 Marek Polacek <polacek@redhat.com>
3155
3156 * c-parser.c: Add C11 references.
3157
d579c385
MP
31582017-03-15 Marek Polacek <polacek@redhat.com>
3159
3160 * c-parser.c (c_parser_enum_specifier): Remove redundant line.
3161
85059a38
MP
31622017-03-11 Marek Polacek <polacek@redhat.com>
3163
3164 * c-decl.c (implicit_decl_warning): Add a comment. Fix formatting.
3165
2f6f187a
DM
31662017-03-10 David Malcolm <dmalcolm@redhat.com>
3167
3168 PR translation/79848
3169 * c-decl.c (declspecs_add_type): Simplify uses of "%<%s%>" to
3170 "%qs".
3171 * c-parser.c (c_parser_oacc_shape_clause): Likewise.
3172
36618428
MP
31732017-03-09 Marek Polacek <polacek@redhat.com>
3174
3175 PR sanitizer/79757
3176 * c-parser.c (c_parser_declaration_or_fndef): Don't sanitize old-style
3177 parameter declarations with initializers.
3178
01e5af5a
JJ
31792017-03-09 Jakub Jelinek <jakub@redhat.com>
3180
3181 PR c/79969
3182 * c-decl.c (start_enum): Adjust DECL_SOURCE_LOCATION of
3183 TYPE_STUB_DECL.
3184
a71dbc63
JJ
31852017-03-07 Jakub Jelinek <jakub@redhat.com>
3186
3187 PR c/79834
3188 * c-parser.c (c_parser_pragma): Use error_at instead of c_parser_error
3189 for "may only be used in compound statements" diagnostics, change it
3190 such that the same translatable string is used for all pragmas. For
3191 PRAGMA_OACC_WAIT use "acc wait" rather than "acc enter data" in the
3192 diagnostics.
3193 (c_parser_omp_cancellation_point, c_parser_omp_target_update,
3194 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Change
3195 "may only be used in compound statements" diagnostics, such that the
3196 same translatable string is used for all pragmas.
3197
1ff4bae6
MP
31982017-03-04 Marek Polacek <polacek@redhat.com>
3199
3200 PR c/79847
3201 * c-decl.c (implicit_decl_warning): Add missing space.
3202
7f5a7d78
MP
32032017-03-03 Marek Polacek <polacek@redhat.com>
3204
3205 PR c/79758
3206 * c-decl.c (store_parm_decls_oldstyle): Check if the element of
3207 current_function_prototype_arg_types is error_mark_node. Fix
3208 formatting. Use TREE_VALUE instead of TREE_TYPE.
3209
883c8f06
JJ
32102017-03-03 Jakub Jelinek <jakub@redhat.com>
3211
79c9b7a8
JJ
3212 PR c/79837
3213 * c-parser.c (c_parser_omp_clause_reduction): Don't mention
3214 %<min%> or %<max%> in the diagnostics, instead mention identifier.
3215 (c_parser_omp_declare_reduction): Don't mention %<min%> in the
3216 diagnostics.
3217
883c8f06
JJ
3218 PR c/79836
3219 * c-parser.c (c_parser_generic_selection): Use %<_Generic%>
3220 instead of %<_Generic>.
3221 (c_parser_omp_ordered): Use %<depend%> instead of %<depend>.
3222 (c_parser_omp_target_exit_data): Use %<release%> instead of
3223 %<release>.
3224
324ff1a0
JJ
32252017-02-28 Jakub Jelinek <jakub@redhat.com>
3226
3227 * c-parser.c (c_parser_asm_statement): Use cond ? G_("...") : G_("...")
3228 instead of just cond ? "..." : "...".
3229 (c_parser_oacc_enter_exit_data): Use %s and ternary operator only
3230 for "enter"/"exit" keyword.
3231 (c_finish_oacc_routine): Don't use %s to supply portions of the
3232 message.
3233
4227c9ad
JJ
32342017-02-24 Jakub Jelinek <jakub@redhat.com>
3235
3236 PR c++/79588
3237 * c-parser.c (c_parser_postfix_expression_after_primary): Don't
3238 handle -Wrestrict here.
3239 * c-typeck.c (build_function_call_vec): Adjust
3240 check_function_arguments caller.
3241
5d972e66
RB
32422017-02-23 Richard Biener <rguenther@suse.de>
3243
3244 PR c/79684
3245 * gimple-parser.c (c_parser_gimple_statement): Use set_error
3246 to initialize c_exprs to return.
3247 (c_parser_gimple_binary_expression): Likewise.
3248 (c_parser_gimple_unary_expression): Likewise.
3249 (c_parser_gimple_postfix_expression): Likewise.
3250
61ac5ebe
MP
32512017-02-22 Marek Polacek <polacek@redhat.com>
3252
3253 PR c/79662
3254 * c-typeck.c (convert_arguments): Handle error_mark_node.
3255
41d1b0b1
PK
32562017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3257
3258 * gimple-parser.c (c_parser_gimple_postfix_expression): Check return
3259 value of c_parser_parse_ssa_name against error_mark_node and emit
3260 error if ssa name is anonymous and written as default definition.
3261
eab1f169
PK
32622017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3263
3264 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
3265 FMA_EXPR.
3266
bcac0b4d
JJ
32672017-02-16 Jakub Jelinek <jakub@redhat.com>
3268
3269 PR c++/79512
3270 * c-parser.c (c_parser_omp_target): For -fopenmp-simd
3271 ignore #pragma omp target even when not followed by identifier.
3272
1be33173
PK
32732017-02-14 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3274
3275 * gimpler-parser.c (c_parser_gimple_statement): Handle ABS_EXPR.
3276 (c_parser_gimple_unary_expression): Likewise.
3277
aa326bfb
JJ
32782017-02-13 Jakub Jelinek <jakub@redhat.com>
3279
3280 * c-parser.c (c_parser_oacc_declare): Add missing space in
3281 diagnostics.
3282
8a398bc5
PK
32832017-02-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3284
3285 PR c/79478
3286 * gimple-parser.c (c_parser_gimple_postfix_expression): Call
3287 set_c_expr_source_range when parsing ssa-name.
3288
3dcde5ef 32892017-02-10 Prasad Ghangal <prasad.ghangal@gmail.com>
ab20d992 3290 Richard Biener <rguenther@suse.de>
3dcde5ef
PG
3291
3292 * gimple-parser.c (c_parser_gimple_binary_expression): Avoid
3293 building IL when arguments are error_mark_node.
3294 (c_parser_gimple_unary_expression): Likewise.
3295 (c_parser_gimple_if_stmt): Likewise.
3296 (c_parser_gimple_switch_stmt): Likewise.
3297 (c_parser_gimple_return_stmt): Likewise.
3298 (c_parser_parse_ssa_name): When name lookup fails do not build
3299 an SSA name. Use undeclared rather than not declared in error
3300 reporting.
3301
192b048b
MP
33022017-02-09 Marek Polacek <polacek@redhat.com>
3303
3304 PR c/79428
3305 * c-parser.c (c_parser_omp_ordered): Call c_parser_skip_to_pragma_eol
3306 instead of c_parser_skip_until_found.
3307
56f71478
JJ
33082017-02-09 Jakub Jelinek <jakub@redhat.com>
3309
3310 PR c/79431
3311 * c-parser.c (c_parser_omp_declare_target): Don't invoke
3312 symtab_node::get on automatic variables.
3313
02889d23
CLT
33142016-02-09 Nathan Sidwell <nathan@codesourcery.com>
3315 Chung-Lin Tang <cltang@codesourcery.com>
3316
3317 * c-parser.c (c_parser_omp_clause_collapse): Disallow tile.
3318 (c_parser_oacc_clause_tile): Disallow collapse. Fix parsing and
3319 semantic checking.
3320 * c-parser.c (c_parser_omp_for_loop): Accept tiling constructs.
3321
7af4b20d
RB
33222017-02-07 Richard Biener <rguenther@suse.de>
3323
3324 * gimple-parser.c (c_parser_gimple_expr_list): Simplify.
3325 (c_parser_gimple_postfix_expression_after_primary):
3326 Do not use c_build_function_call_vec to avoid folding and promotion.
3327 Simplify.
3328
e5e391d6
MO
33292017-01-25 Maxim Ostapenko <m.ostapenko@samsung.com>
3330
3331 PR lto/79061
3332 * c-decl.c (pop_scope): Pass main_input_filename to
3333 build_translation_unit_decl.
3334
c2e84327
DM
33352017-01-24 David Malcolm <dmalcolm@redhat.com>
3336
3337 * c-parser.c: Include "read-rtl-function.h" and
3338 "run-rtl-passes.h".
3339 (c_parser_declaration_or_fndef): Rename "gimple-pass-list" in
3340 grammar to gimple-or-rtl-pass-list. Add rtl-function-definition
3341 production. Update for renaming of field "gimple_pass" to
3342 "gimple_or_rtl_pass". If __RTL was seen, call
3343 c_parser_parse_rtl_body. Convert a timevar_push/pop pair
3344 to an auto_timevar, to cope with early exit.
3345 (c_parser_declspecs): Update RID_GIMPLE handling for renaming of
3346 field "gimple_pass" to "gimple_or_rtl_pass", and for renaming of
3347 c_parser_gimple_pass_list to c_parser_gimple_or_rtl_pass_list.
3348 Handle RID_RTL.
3349 (c_parser_parse_rtl_body): New function.
3350 * c-tree.h (enum c_declspec_word): Add cdw_rtl.
3351 (struct c_declspecs): Rename field "gimple_pass" to
3352 "gimple_or_rtl_pass". Add field "rtl_p".
3353 * gimple-parser.c (c_parser_gimple_pass_list): Rename to...
3354 (c_parser_gimple_or_rtl_pass_list): ...this, updating accordingly.
3355 * gimple-parser.h (c_parser_gimple_pass_list): Rename to...
3356 (c_parser_gimple_or_rtl_pass_list): ...this.
3357
2ebd93e1
MP
33582017-01-20 Marek Polacek <polacek@redhat.com>
3359
3360 PR c/64279
3361 * c-typeck.c (build_conditional_expr): Warn about duplicated branches.
3362
b1c95bb5
RB
33632017-01-13 Richard Biener <rguenther@suse.de>
3364
3365 * gimple-parser.c (c_parser_gimple_compound_statement): Handle
3366 nops.
3367
25329913
RB
33682017-01-13 Richard Biener <rguenther@suse.de>
3369
3370 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
3371 _Literal ( type-name ) number.
3372
6bb4ea5c
RB
33732017-01-12 Richard Biener <rguenther@suse.de>
3374
3375 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
3376 __MEM.
3377
6b5b4e9c
JJ
33782017-01-11 Jakub Jelinek <jakub@redhat.com>
3379
3380 PR c++/72813
3381 * c-decl.c (pop_file_scope): Set flag_syntax_only to 1 after writing
3382 PCH file.
3383
e3252775
RB
33842017-01-11 Richard Biener <rguenther@suse.de>
3385
3386 PR bootstrap/79052
3387 * gimple-parser.c (c_parser_gimple_switch_stmt): Add missing
3388 returns on parse errors.
3389
a9342885
MP
33902017-01-04 Marek Polacek <polacek@redhat.com>
3391
3392 PR c++/64767
3393 * c-parser.c (c_parser_postfix_expression): Mark zero character
3394 constants by setting original_type in c_expr.
3395 * c-typeck.c (parser_build_binary_op): Warn when a pointer is compared
3396 with a zero character constant.
3397 (char_type_p): New function.
3398
5dd9a9d0
DM
33992017-01-04 David Malcolm <dmalcolm@redhat.com>
3400
3401 * c-parser.c (c_parser_declaration_or_fndef): Create a
3402 rich_location at init_loc and parse it to start_init.
3403 (last_init_list_comma): New global.
3404 (c_parser_braced_init): Update last_init_list_comma when parsing
3405 commas. Pass it to pop_init_level. Pass location of closing
3406 brace to pop_init_level.
3407 (c_parser_postfix_expression_after_paren_type): Create a
3408 rich_location at type_loc and parse it to start_init.
3409 (c_parser_omp_declare_reduction): Likewise for loc.
3410 * c-tree.h (start_init): Add rich_location * param.
3411 (pop_init_level): Add location_t param.
3412 * c-typeck.c (struct initializer_stack): Add field
3413 "missing_brace_richloc".
3414 (start_init): Add richloc param, use it to initialize
3415 the stack node's missing_brace_richloc.
3416 (last_init_list_comma): New decl.
3417 (finish_implicit_inits): Pass last_init_list_comma to
3418 pop_init_level.
3419 (push_init_level): When finding missing open braces, add fix-it
3420 hints to the richloc.
3421 (pop_init_level): Add "insert_before" param and pass it
3422 when calling pop_init_level. Add fixits about missing
3423 close braces to any richloc. Use the richloc for the
3424 -Wmissing-braces warning.
3425 (set_designator): Pass last_init_list_comma to pop_init_level.
3426 (process_init_element): Likewise.
3427
cbe34bb5
JJ
34282017-01-01 Jakub Jelinek <jakub@redhat.com>
3429
3430 Update copyright years.
3431
d17680f3
JJ
34322016-12-21 Jakub Jelinek <jakub@redhat.com>
3433
0dba7960
JJ
3434 PR bootstrap/78817
3435 * c-typeck.c (build_function_call_vec): If check_function_arguments
3436 returns true, set TREE_NO_WARNING on CALL_EXPR.
3437
d17680f3
JJ
3438 PR c/77767
3439 * c-decl.c (grokdeclarator): If *expr is non-NULL, append expression
3440 to *expr instead of overwriting it.
3441
aa90531e
RB
34422016-12-20 Richard Biener <rguenther@suse.de>
3443
3444 * gimple-parser.c (c_parser_gimple_compound_statement): Improve
3445 error recovery.
3446 (c_parser_gimple_statement): Only build assigns for non-error
3447 stmts.
3448 (c_parser_gimple_postfix_expression_after): Improve error recovery.
3449
629b3d75
MJ
34502016-12-14 Martin Jambor <mjambor@suse.cz>
3451
3452 * c-parser.c: Include omp-general.h and omp-offload.h instead of
3453 omp-low.h.
3454 (c_finish_oacc_routine): Adjusted call to
3455 get_oacc_fn_attrib, build_oacc_routine_dims and replace_oacc_fn_attrib
3456 to use their new names.
3457 (c_parser_oacc_enter_exit_data): Adjusted call to find_omp_clause to
3458 use its new name.
3459 (c_parser_oacc_update): Likewise.
3460 (c_parser_omp_simd): Likewise.
3461 (c_parser_omp_target_update): Likewise.
3462 * c-typeck.c: Include omp-general.h instead of omp-low.h.
3463 (c_finish_omp_cancel): Adjusted call to find_omp_clause to use its new
3464 name.
3465 (c_finish_omp_cancellation_point): Likewise.
3466 * gimple-parser.c: Do not include omp-low.h
3467
c5af52eb
CP
34682016-12-02 Cesar Philippidis <cesar@codesourcery.com>
3469 James Norris <jnorris@codesourcery.com>
3470
3471 * c-parser.c (c_parser_pragma): Error when PRAGMA_OACC_{ENTER_DATA,
3472 EXIT_DATA,WAIT} are not used in compound statements.
3473 (c_parser_oacc_enter_exit_data): Update diagnostics.
3474
48330c93
BE
34752016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
3476
3477 PR c++/71973
3478 * c-decl.c (diagnose_mismatched_decls): Use
3479 OPT_Wbuiltin_declaration_mismatch here too.
3480
899ca90e 34812016-11-18 Richard Sandiford <richard.sandiford@arm.com>
48330c93
BE
3482 Alan Hayward <alan.hayward@arm.com>
3483 David Sherwood <david.sherwood@arm.com>
899ca90e
RS
3484
3485 * c-decl.c (merge_decls): Use SET_DECL_MODE.
3486 (make_label, finish_struct): Likewise.
3487
1ee62b92 34882016-11-14 Prasad Ghangal <prasad.ghangal@gmail.com>
8e745a17 3489 Richard Biener <rguenther@suse.de>
22b15758 3490
8e745a17
JJ
3491 * Make-lang.in (C_AND_OBJC_OBJS): Add gimple-parser.o.
3492 * config-lang.in (gtfiles): Add c/c-parser.h.
3493 * c-tree.h (enum c_declspec_word): Add cdw_gimple.
3494 (struct c_declspecs): Add gimple_pass member and gimple_p flag.
3495 * c-parser.c (enum c_id_kind, struct c_token,
3496 c_parser_next_token_is, c_parser_next_token_is_not,
3497 c_parser_next_token_is_keyword,
3498 enum c_lookahead_kind, enum c_dtr_syn, enum c_parser_prec):
3499 Split out to ...
3500 * c-parser.h: ... new header.
3501 * c-parser.c: Include c-parser.h and gimple-parser.h.
1ee62b92 3502 (c_parser_peek_token, c_parser_peek_2nd_token,
8e745a17
JJ
3503 c_token_starts_typename, c_parser_next_token_starts_declspecs,
3504 c_parser_next_tokens_start_declaration, c_parser_consume_token,
3505 c_parser_error, c_parser_require, c_parser_skip_until_found,
3506 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
3507 c_parser_type_name): Export.
3508 (c_parser_tokens_buf): New function.
3509 (c_parser_error): Likewise.
3510 (c_parser_set_error): Likewise.
3511 (c_parser_declspecs): Handle RID_GIMPLE.
1ee62b92
PG
3512 (c_parser_declaration_or_fndef): Parse __GIMPLE marked body
3513 via c_parser_parse_gimple_body.
8e745a17
JJ
3514 * c-parser.h (c_parser_peek_token, c_parser_peek_2nd_token,
3515 c_token_starts_typename, c_parser_next_token_starts_declspecs,
3516 c_parser_next_tokens_start_declaration, c_parser_consume_token,
3517 c_parser_error, c_parser_require, c_parser_skip_until_found,
3518 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
3519 c_parser_type_name): Declare.
1ee62b92
PG
3520 (struct c_parser): Declare forward.
3521 (c_parser_tokens_buf): Declare.
8e745a17
JJ
3522 (c_parser_error): Likewise.
3523 (c_parser_set_error): Likewise.
3524 * gimple-parser.c: New file.
3525 * gimple-parser.h: Likewise.
1ee62b92 3526
22b15758
UB
35272016-11-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3528
3529 PR c/35503
3530 * c-parser.c (c_parser_postfix_expression_after_primary): Call
3531 warn_for_restrict.
3532
84ff4775
LCW
35332016-09-11 Le-Chun Wu <lcwu@google.com>
3534 Mark Wielaard <mjw@redhat.com>
3535
3536 * c-decl.c (warn_if_shadowing): Use the warning code corresponding
3537 to the given -Wshadow= variant.
3538
4d0cdd0c
TP
35392016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
3540
3541 * c-typeck.c: Include memmodel.h.
3542
1202f33e
JJ
35432016-10-13 Jakub Jelinek <jakub@redhat.com>
3544
3545 PR target/77957
3546 * c-objc-common.h (LANG_HOOKS_GETDECLS): Use hook_tree_void_null
3547 instead of lhd_return_null_tree_v.
3548
8a14afd0
BS
35492016-10-07 Bernd Schmidt <bschmidt@redhat.com>
3550
3551 PR c++/69733
3552 * c-decl.c (smallest_type_quals_location): New static function.
3553 (grokdeclarator): Try to find the correct location for an ignored
3554 qualifier.
3555
81fea426
MP
35562016-09-26 Marek Polacek <polacek@redhat.com>
3557
3558 PR c/7652
3559 * c-decl.c (pop_scope): Add gcc_fallthrough.
3560
35612016-09-26 Marek Polacek <polacek@redhat.com>
3562
3563 PR c/7652
3564 * c-parser.c (struct c_token): Add flags field.
3565 (c_lex_one_token): Pass it to c_lex_with_flags.
3566 (c_parser_declaration_or_fndef): Turn __attribute__((fallthrough));
3567 into IFN_FALLTHROUGH.
3568 (c_parser_label): Set FALLTHROUGH_LABEL_P on labels. Handle
3569 attribute fallthrough after a case label or default label.
3570 (c_parser_statement_after_labels): Handle RID_ATTRIBUTE.
3571
9a2300e9
MP
35722016-09-24 Marek Polacek <polacek@redhat.com>
3573
3574 PR c/77490
3575 * c-typeck.c (build_unary_op): Warn about bit not on expressions that
3576 have boolean value. Warn about ++/-- on booleans.
3577
7de76362
JJ
35782016-09-23 Jakub Jelinek <jakub@redhat.com>
3579
3580 * c-parser.c (incomplete_record_decls): Remove unnecessary
3581 = vNULL initialization of file scope vec.
3582
5b73d2ab
MP
35832016-09-16 Marek Polacek <polacek@redhat.com>
3584
3585 * c-typeck.c (lvalue_p): Use true and false instead of 1 and 0.
3586
e51fbec3
MP
35872016-09-14 Marek Polacek <polacek@redhat.com>
3588
3589 * c-array-notation.c (create_cmp_incr): Use false instead of 0.
3590 (fix_array_notation_expr): Likewise.
3591 * c-decl.c (finish_decl): Likewise.
3592 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
3593 * c-typeck.c (array_to_pointer_conversion): Use true instead of 1.
3594 (function_to_pointer_conversion): Use false instead of 0.
3595 (convert_lvalue_to_rvalue): Likewise.
3596 (parser_build_unary_op): Likewise.
3597 (build_atomic_assign): Likewise.
3598 (build_unary_op): Change nonconvert parameter type to bool, use
3599 true/false instead of 1/0.
3600 (build_binary_op): Use true instead of 1.
3601
254830ba
DM
36022016-09-13 David Malcolm <dmalcolm@redhat.com>
3603
3604 * c-parser.c (c_parser_declaration_or_fndef): Update for renaming
3605 of add_fixit_insert to add_fixit_insert_before.
3606
4c13ba17
MP
36072016-09-13 Marek Polacek <polacek@redhat.com>
3608
3609 * c-typeck.c (build_unary_op): Rename FLAG parameter to NOCONVERT. Use
3610 it.
3611
54dcdb88
BE
36122016-09-12 Bernd Edlinger <bernd.edlinger@hotmail.de>
3613
3614 PR c++/77496
3615 * c-parser.c (c_parser_conditional_expression): Pass the rightmost
3616 COMPOUND_EXPR to warn_for_omitted_condop.
3617
e5106e27
DM
36182016-09-07 David Malcolm <dmalcolm@redhat.com>
3619
3620 * c-lang.c (LANG_HOOKS_GET_SUBSTRING_LOCATION): Use
3621 c_get_substring_location for this new langhook.
3622
9dc5773f
JJ
36232016-09-02 Jakub Jelinek <jakub@redhat.com>
3624
3625 PR c/65467
3626 * c-parser.c (c_parser_declspecs): Don't sorry about _Atomic if
3627 flag_openmp.
3628 (c_parser_omp_variable_list): Use convert_lvalue_to_rvalue
3629 instead of mark_exp_read on low_bound/length expression.
3630 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_threads,
3631 c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
3632 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
3633 c_parser_omp_clause_num_workers, c_parser_oacc_shape_clause,
3634 c_parser_oacc_clause_tile, c_parser_omp_clause_schedule,
3635 c_parser_omp_clause_vector_length, c_parser_omp_clause_num_teams,
3636 c_parser_omp_clause_thread_limit, c_parser_omp_clause_aligned,
3637 c_parser_omp_clause_linear, c_parser_omp_clause_safelen,
3638 c_parser_omp_clause_simdlen, c_parser_omp_clause_device,
3639 c_parser_omp_clause_dist_schedule): Use convert_lvalue_to_rvalue
3640 instead of mark_expr_read.
3641 (c_parser_omp_declare_reduction): Reject _Atomic qualified types.
3642 * c-objc-common.h (LANG_HOOKS_OMP_CLAUSE_COPY_CTOR,
3643 LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP): Redefine.
3644 * c-tree.h (c_omp_clause_copy_ctor): New prototype.
3645 * c-typeck.c (handle_omp_array_sections_1): Diagnose _Atomic qualified
3646 array section bases outside of depend clause, for depend clause
3647 use convert_lvalue_to_rvalue on the base.
3648 (c_finish_omp_clauses): Reject _Atomic qualified vars in reduction,
3649 linear, aligned, map, to and from clauses.
3650 (c_omp_clause_copy_ctor): New function.
3651
295844f6
MP
36522016-09-01 Marek Polacek <polacek@redhat.com>
3653
3654 PR c/7652
3655 * c-typeck.c (composite_type): Add FALLTHRU comment.
3656
089af25c
DM
36572016-08-31 David Malcolm <dmalcolm@redhat.com>
3658
3659 * c-parser.c (c_parser_declaration_or_fndef): Add trailing space
3660 to the insertion fixits for "struct", "union", and "enum".
3661
f9087798
DM
36622016-08-30 David Malcolm <dmalcolm@redhat.com>
3663
3664 * c-decl.c (implicit_decl_warning): Use add_fixit_replace
3665 rather than add_fixit_misspelled_id.
3666 (undeclared_variable): Likewise.
3667 * c-parser.c (c_parser_declaration_or_fndef): Likewise. Remove
3668 now-redundant "here" params from add_fixit_insert method calls.
3669 (c_parser_parameter_declaration): Likewise.
3670 * c-typeck.c (build_component_ref): Remove now-redundant range
3671 param from add_fixit_replace method calls.
3672
ebef225f
MP
36732016-08-25 Marek Polacek <polacek@redhat.com>
3674
3675 * c-typeck.c (parser_build_binary_op): Pass LHS to
3676 warn_logical_not_parentheses.
3677
fe377a48
MP
36782016-08-25 Marek Polacek <polacek@redhat.com>
3679
3680 PR c/77323
3681 * c-decl.c (declspecs_add_type): Set typespec_word even when __intN
3682 or _FloatN or _FloatNx is not supported.
3683 (finish_declspecs): Set type to integer_type_node when _FloatN or
3684 _FloatNx is not supported.
3685
c65699ef
JM
36862016-08-19 Joseph Myers <joseph@codesourcery.com>
3687
3688 PR c/32187
3689 * c-tree.h (cts_floatn_nx): New enum c_typespec_keyword value.
3690 (struct c_declspecs): Add field floatn_nx_idx.
3691 * c-decl.c (declspecs_add_type, finish_declspecs): Handle _FloatN
3692 and _FloatNx type specifiers.
3693 * c-parser.c (c_keyword_starts_typename, c_token_starts_declspecs)
3694 (c_parser_declspecs, c_parser_attribute_any_word)
3695 (c_parser_objc_selector): Use CASE_RID_FLOATN_NX.
3696 * c-typeck.c (c_common_type): Handle _FloatN and _FloatNx types.
3697 (convert_arguments): Avoid promoting _FloatN and _FloatNx types
3698 narrower than double.
3699
2f1364c2
JJ
37002016-08-12 Jakub Jelinek <jakub@redhat.com>
3701 Martin Liska <mliska@suse.cz>
3702
3703 PR c/67410
3704 * c-typeck.c (set_nonincremental_init_from_string): Use / instead of
3705 % to determine val element to change. Assert that
3706 wchar_bytes * charwidth fits into val array.
3707
191816a3
MP
37082016-08-12 Marek Polacek <polacek@redhat.com>
3709
3710 PR c/7652
3711 * c-parser.c (c_parser_external_declaration): Add FALLTHRU.
3712 (c_parser_postfix_expression): Likewise.
3713 * c-typeck.c (build_unary_op): Adjust fall through comment.
3714 (c_mark_addressable): Likewise.
3715
b95a64bb
JJ
37162016-08-11 Jakub Jelinek <jakub@redhat.com>
3717
3718 PR c/72816
3719 * c-decl.c (grokdeclarator): When adding TYPE_DOMAIN for flexible
3720 array member through typedef, for orig_qual_indirect == 0 clear
3721 orig_qual_type.
3722
895aa8e1
DM
37232016-08-08 David Malcolm <dmalcolm@redhat.com>
3724
3725 PR c/64955
3726 * c-lang.c (LANG_HOOKS_RUN_LANG_SELFTESTS): If CHECKING_P, wire
3727 this up to selftest::run_c_tests.
3728 (selftest::run_c_tests): New function.
3729
0b212d8c
TS
37302016-08-04 Thomas Schwinge <thomas@codesourcery.com>
3731
ae9281fc
TS
3732 * c-parser.c (struct oacc_routine_data): Add error_seen and
3733 fndecl_seen members.
3734 (c_finish_oacc_routine): Use these.
3735 (c_parser_declaration_or_fndef): Adjust.
3736 (c_parser_oacc_routine): Likewise. Support more C language
3737 constructs, and improve diagnostics. Move pragma context
3738 checking...
3739 (c_parser_pragma): ... here.
3740
0b212d8c
TS
3741 * c-parser.c (struct oacc_routine_data): New.
3742 (c_parser_declaration_or_fndef, c_parser_oacc_routine): Use it.
3743 Simplify code.
3744 (c_finish_oacc_routine): Likewise. Don't attach clauses to "omp
3745 declare target" attribute.
3746
76e2c821
JB
37472016-08-01 Jan Beulich <jbeulich@suse.com>
3748
3749 * c-fold.c (c_fully_fold_internal): Also emit shift count
3750 warnings for vector types.
3751 * c-typeck.c (build_binary_op): Likewise.
3752
f618a472
MP
37532016-07-29 Marek Polacek <polacek@redhat.com>
3754
3755 PR c/71742
3756 * c-decl.c (finish_struct): Rephrase an error message.
3757
efd0786f
MP
3758 PR c/71853
3759 * c-parser.c (c_parser_switch_statement): Initialize ce.original_type
3760 to error node for invalid code.
3761
e00dceaf
MP
3762 PR c/71573
3763 * c-decl.c (implicitly_declare): Return decl early not only for
3764 error_mark_nodes, but for anything that is not a FUNCTION_DECL.
3765
673a107a
JJ
37662016-07-29 Jakub Jelinek <jakub@redhat.com>
3767
3768 PR c/71969
3769 * c-decl.c (finish_function): Only set DECL_DISREGARD_INLINE_LIMITS
3770 on GNU extern inline functions.
3771
a5b5c8b6
MP
37722016-07-29 Marek Polacek <polacek@redhat.com>
3773
3774 PR c/71583
3775 * c-parser.c (c_parser_postfix_expression_after_paren_type): Also
3776 check expr.value.
3777
e3fe09c1
UB
37782016-07-22 Uros Bizjak <ubizjak@gmail.com>
3779
3780 * c-typeck.c: Use HOST_WIDE_INT_1 instead of (HOST_WIDE_INT) 1,
3781
7c8f7eaa
DM
37822016-07-20 David Malcolm <dmalcolm@redhat.com>
3783
3784 * c-decl.c (struct edit_distance_traits<cpp_hashnode *>): Move to
3785 spellcheck-tree.h
3786 (best_macro_match): Likewise, converting from a typedef to a
3787 subclass.
3788 (find_closest_macro_cpp_cb): Move to spellcheck-tree.c.
3789 (lookup_name_fuzzy): Update for change of best_macro_match to a
3790 subclass with a ctor that calls cpp_forall_identifiers.
3791
de6a69ee
DM
37922016-07-20 David Malcolm <dmalcolm@redhat.com>
3793
3794 * c-decl.c (implicit_decl_warning): Update for conversion of
3795 return type of lookup_name_fuzzy to const char *.
3796 (undeclared_variable): Likewise.
3797 (lookup_name_fuzzy): Convert return type from tree to
3798 const char *.
3799 * c-parser.c (c_parser_declaration_or_fndef): Update for
3800 conversion of return type of lookup_name_fuzzy to const char *.
3801 (c_parser_parameter_declaration): Likewise.
3802
b1c9c068
CP
38032016-07-15 Cesar Philippidis <cesar@codesourcery.com>
3804
3805 * c-parser.c (c_parser_oacc_declare): Don't scan for
3806 GOMP_MAP_POINTER.
3807 * c-typeck.c (handle_omp_array_sections): Mark data clauses with
3808 GOMP_MAP_FORCE_{PRESENT,TO,FROM,TOFROM} as potentially having
3809 zero-length subarrays.
3810
ddbbcb19
JJ
38112016-07-15 Jakub Jelinek <jakub@redhat.com>
3812
3813 PR c/71858
3814 * c-decl.c (implicit_decl_warning): Use FUZZY_LOOKUP_FUNCTION_NAME
3815 instead of FUZZY_LOOKUP_NAME.
3816 (lookup_name_fuzzy): For FUZZY_LOOKUP_FUNCTION_NAME consider
3817 FUNCTION_DECLs, {VAR,PARM}_DECLs function pointers and macros.
3818
dd36b877
JJ
38192016-07-14 Jakub Jelinek <jakub@redhat.com>
3820
3821 PR c/71858
3822 * c-decl.c (lookup_name_fuzzy): Ignore binding->invisible.
3823
8c681247
TS
38242016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
3825
3826 * c-parser.c (c_parser_generic_selection): Make type of variable
3827 auto_vec.
3828 (c_parser_omp_declare_simd): Likewise.
3829
bf4fa671
TS
38302016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
3831
3832 * c-decl.c (struct c_struct_parse_info): Change member types
3833 from vec to auto_vec.
3834 (start_struct): Adjust.
3835 (finish_struct): Likewise.
3836
557e8c49
JJ
38372016-07-02 Jakub Jelinek <jakub@redhat.com>
3838
3839 PR c/71719
3840 * c-typeck.c (mark_exp_read): Handle VIEW_CONVERT_EXPR.
3841
54d19c3b
TS
38422016-06-29 Thomas Schwinge <thomas@codesourcery.com>
3843
3844 * c-parser.c (c_parser_pragma) <PRAGMA_OMP_CANCELLATION_POINT>:
3845 Move pragma context checking into...
3846 (c_parser_omp_cancellation_point): ... here, and improve
3847 diagnostic messages.
3848 * c-typeck.c (c_finish_omp_cancel)
3849 (c_finish_omp_cancellation_point): Improve diagnostic messages.
3850
152ef731
JJ
38512016-06-29 Jakub Jelinek <jakub@redhat.com>
3852
3853 PR c/71685
3854 * c-typeck.c (c_build_qualified_type): Don't clear
3855 C_TYPE_INCOMPLETE_VARS for the main variant.
3856
38572016-06-28 Martin Sebor <msebor@redhat.com>
4378d117
MS
3858
3859 PR c/71552
3860 * c-typeck.c (output_init_element): Diagnose incompatible types
3861 before non-constant initializers.
3862
e9ac1f86
JJ
38632016-06-28 Jakub Jelinek <jakub@redhat.com>
3864
3865 * Make-lang.in: Don't cat ../stage_current if it does not exist.
3866
277d7ee0
AK
38672016-06-23 Andi Kleen <ak@linux.intel.com>
3868
3869 * Make-lang.in: Add support for autofdo.
3870
1a4f11c8
DM
38712016-06-22 David Malcolm <dmalcolm@redhat.com>
3872
3873 PR c/70339
3874 * c-decl.c: Include spellcheck-tree.h and gcc-rich-location.h.
3875 (implicit_decl_warning): When issuing warnings for implicit
3876 declarations, attempt to provide a suggestion via
3877 lookup_name_fuzzy.
3878 (undeclared_variable): Likewise when issuing errors.
3879 (lookup_name_in_scope): Likewise.
3880 (struct edit_distance_traits<cpp_hashnode *>): New struct.
3881 (best_macro_match): New typedef.
3882 (find_closest_macro_cpp_cb): New function.
3883 (lookup_name_fuzzy): New function.
3884 * c-parser.c: Include gcc-rich-location.h.
3885 (c_token_starts_typename): Split out case CPP_KEYWORD into...
3886 (c_keyword_starts_typename): ...this new function.
3887 (c_parser_declaration_or_fndef): When issuing errors about
3888 missing "struct" etc, add a fixit. For other kinds of errors,
3889 attempt to provide a suggestion via lookup_name_fuzzy.
3890 (c_parser_parms_declarator): When looking ahead to detect typos in
3891 type names, also reject CPP_KEYWORD.
3892 (c_parser_parameter_declaration): When issuing errors about
3893 unknown type names, attempt to provide a suggestion via
3894 lookup_name_fuzzy.
3895 * c-tree.h (c_keyword_starts_typename): New prototype.
3896
5a578671
JM
38972016-06-20 Joseph Myers <joseph@codesourcery.com>
3898
3899 PR c/71601
3900 * c-typeck.c (build_conditional_expr): Return error_mark_node if
3901 c_common_type returns error_mark_node.
3902
3f8257db 39032016-06-19 Martin Sebor <msebor@redhat.com>
aa0db437
MS
3904
3905 PR c/69507
3906 * c-parser.c (c_parser_alignof_expression): Avoid diagnosing
3907 __alignof__ (expression).
3908
6a3f203c
DM
39092016-06-14 David Malcolm <dmalcolm@redhat.com>
3910
3911 * c-typeck.c: Include spellcheck-tree.h rather than spellcheck.h.
3912
264757fb
DM
39132016-06-14 David Malcolm <dmalcolm@redhat.com>
3914
3915 * c-typeck.c (build_component_ref): Simplify fixit code by
3916 using gcc_rich_location::add_fixit_misspelled_id.
3917 (set_init_label): Likewise.
3918
f7e4f2e3
DM
39192016-06-13 David Malcolm <dmalcolm@redhat.com>
3920
3921 * c-parser.c (c_parser_initelt): Provide location of name for new
3922 location_t param of set_init_label.
3923 * c-tree.h (set_init_label): Add location_t param.
3924 * c-typeck.c (set_init_index): Add "fieldname_loc" location_t
3925 param and use it when issuing error messages about unrecognized
3926 field names. Attempt to provide a fixit hint if appropriate,
3927 otherwise update the error message to provide the type name.
3928
4b1ffdb1
TS
39292016-06-10 Thomas Schwinge <thomas@codesourcery.com>
3930
3931 PR c/71381
3932 * c-parser.c (c_parser_omp_variable_list) <OMP_CLAUSE__CACHE_>:
3933 Loosen checking.
3934
44a845ca
MS
39352016-06-08 Martin Sebor <msebor@redhat.com>
3936 Jakub Jelinek <jakub@redhat.com>
3937
3938 PR c++/70507
3939 PR c/68120
3940 * c-typeck.c (convert_arguments): Don't promote last argument
3941 of BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
3942
92a5f2ba
MP
39432016-06-08 Marek Polacek <polacek@redhat.com>
3944
3945 PR c/71418
3946 * c-decl.c (grokdeclarator): Check TYPE_P.
3947
08203f73
MP
3948 PR c/71426
3949 * c-decl.c (get_parm_info): Don't crash on an assert on invalid
3950 code.
3951
6ffd47b7
DM
39522016-06-07 David Malcolm <dmalcolm@redhat.com>
3953
3954 * c-parser.c (c_parser_postfix_expression): In __builtin_offsetof
3955 and structure element reference, capture the location of the
3956 element name token and pass it to build_component_ref.
3957 (c_parser_postfix_expression_after_primary): Likewise for
3958 structure element dereference.
3959 (c_parser_omp_variable_list): Likewise for
3960 OMP_CLAUSE_{_CACHE, MAP, FROM, TO},
3961 * c-tree.h (build_component_ref): Add location_t param.
3962 * c-typeck.c (build_component_ref): Add location_t param
3963 COMPONENT_LOC. Use it, if available, when issuing hints about
3964 mispelled member names to provide a fixit replacement hint.
3965
1f40cff3
MP
39662016-06-06 Marek Polacek <polacek@redhat.com>
3967
3968 PR c/71362
3969 * c-parser.c (c_parser_direct_declarator): Set location.
3970
5545a907
MP
39712016-06-06 Marek Polacek <polacek@redhat.com>
3972
3973 * c-typeck.c (comptypes_internal): Handle comparisons of
3974 INTEGER_TYPE, FIXED_POINT_TYPE, and REAL_TYPE nodes. Don't check
3975 TYPE_REF_CAN_ALIAS_ALL.
3976
b605f663
CLT
39772016-06-03 Chung-Lin Tang <cltang@codesourcery.com>
3978
3979 * c-typeck.c (c_finish_omp_clauses): Mark OpenACC reduction
3980 arguments as addressable when async clause exists.
3981
00631022
JJ
39822016-05-30 Jakub Jelinek <jakub@redhat.com>
3983
3984 PR c++/71349
3985 * c-parser.c (c_parser_omp_for): Don't disallow nowait clause
3986 when combined with target construct.
3987
7211a097
JJ
39882016-05-26 Jakub Jelinek <jakub@redhat.com>
3989
3990 * c-parser.c (c_parser_omp_clause_schedule): Warn if
3991 OMP_CLAUSE_SCHEDULE_CHUNK_EXPR is known not to be positive.
3992
95efe6b6
MP
39932016-05-25 Marek Polacek <polacek@redhat.com>
3994
3995 PR c/71265
3996 * c-decl.c (c_make_fname_decl): Don't check seen_error.
3997
a23faf7a
MP
3998 PR c/71266
3999 * c-decl.c (store_parm_decls_oldstyle): Skip non-PARM_DECLs.
4000
e46c7770
CP
40012016-05-24 Cesar Philippidis <cesar@codesourcery.com>
4002
4003 * c-parser.c (c_parser_oacc_declare): Add support for
4004 GOMP_MAP_FIRSTPRIVATE_POINTER.
4005 * c-typeck.c (handle_omp_array_sections_1): Replace bool is_omp
4006 argument with enum c_omp_region_type ort.
4007 (handle_omp_array_sections): Likewise. Update call to
4008 handle_omp_array_sections_1.
4009 (c_finish_omp_clauses): Add specific errors and warning messages for
4010 OpenACC. Use firsrtprivate pointers for OpenACC subarrays. Update
4011 call to handle_omp_array_sections.
4012
a04e69c0
TS
40132016-05-24 Thomas Schwinge <thomas@codesourcery.com>
4014
4015 * c-parser.c (c_parser_oacc_routine): Tighten syntax checks.
4016
f17a223d
RB
40172016-05-24 Richard Biener <rguenther@suse.de>
4018
4019 PR middle-end/70434
4020 PR c/69504
4021 * c-typeck.c (build_array_ref): Do not complain about indexing
4022 non-lvalue vectors. Adjust for function name change.
4023
79063edd
MS
40242016-05-20 Martin Sebor <msebor@redhat.com>
4025
4026 PR c/71115
4027 * c-typeck.c (error_init): Use
4028 expansion_point_location_if_in_system_header.
4029 (warning_init): Same.
4030
8a40fef3
DM
40312016-05-19 David Malcolm <dmalcolm@redhat.com>
4032
4033 PR c/71171
4034 * c-parser.c (c_parser_generic_selection): Use c_expr::set_error
4035 in error-handling.
4036 (c_parser_postfix_expression): Likewise.
4037 * c-tree.h (c_expr::set_error): New method.
4038 * c-typeck.c (parser_build_binary_op): In error-handling, ensure
4039 that result's range is initialized.
4040
e9892350
JG
40412016-05-17 James Greenhalgh <james.greenhalgh@arm.com>
4042
4043 * c-typeck.c (parser_build_unary_op): Fix formatting.
4044
8fad45f5
MW
40452016-05-16 Matthew Wahab <matthew.wahab@arm.com>
4046
4047 * c-decl.c (grokdeclarator): Remove errmsg and use of
4048 targetm.invalid_return_type.
4049 (grokparms): Remove errmsg and use of
4050 targetm.invalid_parameter_type.
4051
aa4b467b
JM
40522016-05-13 Joseph Myers <joseph@codesourcery.com>
4053
4054 * c-decl.c (grokdeclarator): For C11, discard qualifiers on
4055 function return type.
4056
4f2e1536
MP
40572016-05-12 Marek Polacek <polacek@redhat.com>
4058
4059 PR c/70756
4060 * c-decl.c (build_compound_literal): Pass LOC down to
4061 c_incomplete_type_error.
4062 * c-tree.h (require_complete_type): Adjust declaration.
4063 (c_incomplete_type_error): Likewise.
4064 * c-typeck.c (require_complete_type): Add location parameter, pass it
4065 down to c_incomplete_type_error.
4066 (c_incomplete_type_error): Add location parameter, pass it down to
4067 error_at.
4068 (build_component_ref): Pass location down to c_incomplete_type_error.
4069 (default_conversion): Pass location down to require_complete_type.
4070 (build_array_ref): Likewise.
4071 (build_function_call_vec): Likewise.
4072 (convert_arguments): Likewise.
4073 (build_unary_op): Likewise.
4074 (build_c_cast): Likewise.
4075 (build_modify_expr): Likewise.
4076 (convert_for_assignment): Likewise.
4077 (c_finish_omp_clauses): Likewise.
4078
d6e83a8d
MM
40792016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
4080
4081 PR c/43651
4082 * c-decl.c (declspecs_add_qual): Warn when -Wduplicate-decl-specifier
4083 is enabled.
4084 * c-errors.c (pedwarn_c90): Return true if warned.
4085 * c-tree.h (pedwarn_c90): Change return type to bool.
4086 (enum c_declspec_word): Add new enumerator cdw_atomic.
4087
5c3a10fb
MP
40882016-05-11 Marek Polacek <polacek@redhat.com>
4089
4090 PR c++/71024
4091 * c-decl.c (diagnose_mismatched_decls): Factor out code to
4092 diagnose_mismatched_attributes and call it.
4093
cf68d92c
MP
40942016-05-10 Marek Polacek <polacek@redhat.com>
4095
4096 PR c/70255
4097 * c-decl.c (diagnose_mismatched_decls): Warn for optimize attribute
4098 on a declaration following the definition.
4099
351f85c5
JJ
41002016-05-05 Jakub Jelinek <jakub@redhat.com>
4101
4102 * c-parser.c (c_parser_switch_statement): Add IF_P argument,
4103 parse it through to c_parser_c99_block_statement.
4104 (c_parser_statement_after_labels): Adjust c_parser_switch_statement
4105 caller.
4106
deef7113
MP
41072016-05-04 Marek Polacek <polacek@redhat.com>
4108
4109 * c-parser.c (c_parser_if_statement): Replace OPT_Wparentheses with
4110 OPT_Wdangling_else.
4111
de55efd5
MP
41122016-05-04 Marek Polacek <polacek@redhat.com>
4113
4114 PR c/48778
4115 * c-typeck.c (build_binary_op): Don't issue -Waddress warnings
4116 for macro expansions.
4117
79ce98bc
MP
41182016-05-03 Marek Polacek <polacek@redhat.com>
4119
4120 PR c/70859
4121 * c-typeck.c (build_function_call_vec): Pass LOC and ARG_LOC down to
4122 check_builtin_function_arguments.
4123
fb2647aa
RB
41242016-05-03 Richard Biener <rguenther@suse.de>
4125
4126 * Make-lang.in (cc1-checksum.c): For stage-final re-use
4127 the checksum from the previous stage.
4128
77886428
CP
41292016-05-02 Cesar Philippidis <cesar@codesourcery.com>
4130
4131 * c-parser.c (c_parser_oacc_all_clauses): Update call to
4132 c_finish_omp_clauses.
4133 (c_parser_omp_all_clauses): Likewise.
4134 (c_parser_oacc_cache): Likewise.
4135 (c_parser_oacc_loop): Likewise.
4136 (omp_split_clauses): Likewise.
4137 (c_parser_omp_declare_target): Likewise.
4138 (c_parser_cilk_all_clauses): Likewise.
4139 (c_parser_cilk_for): Likewise.
4140 * c-typeck.c (c_finish_omp_clauses): Replace bool arguments
4141 is_omp, declare_simd, and is_cilk with enum c_omp_region_type ort.
4142
7176a4a0
MP
41432016-05-02 Marek Polacek <polacek@redhat.com>
4144
4145 PR c/70851
4146 * c-decl.c (grokdeclarator): Diagnose when array's size has an
4147 incomplete type.
4148
e7ff0319
CP
41492016-04-29 Cesar Philippidis <cesar@codesourcery.com>
4150
4151 PR middle-end/70626
4152 * c-parser.c (c_parser_oacc_loop): Don't augment mask with
4153 OACC_LOOP_CLAUSE_MASK.
4154 (c_parser_oacc_kernels_parallel): Update call to
4155 c_oacc_split_loop_clauses.
4156
9f405ce1
AM
41572016-04-28 Andrew MacLeod <amacleod@redhat.com>
4158
4159 * c-array-notation.c (fix_builtin_array_notation_fn): Fix final
4160 argument to build_modify_expr in two cases.
4161
c1e1f433
BS
41622016-04-27 Bernd Schmidt <bschmidt@redhat.com>
4163
4164 * c-parser.c (c_parser_postfix_expression_after_primary): Call
4165 warn_for_memset instead of warning directly here.
4166
2448a956
MP
41672016-04-26 Marek Polacek <polacek@redhat.com>
4168
4169 PR c/67784
4170 * c-parser.c (c_parser_maybe_reclassify_token): New function factored
4171 out of ...
4172 (c_parser_for_statement): ... here.
4173 (c_parser_if_statement): Use it.
4174 (c_parser_switch_statement): Use it.
4175 (c_parser_while_statement): Use it.
4176
b02a5e26
MP
4177 PR c/70791
4178 * c-decl.c (pushdecl): Pass LOCUS down to warning.
4179
477d4906
IV
41802016-04-20 Ilya Verbin <ilya.verbin@intel.com>
4181
4182 PR c++/69363
4183 * c-parser.c (c_parser_cilk_all_clauses): Use c_finish_omp_clauses
4184 instead of c_finish_cilk_clauses.
4185 * c-tree.h (c_finish_omp_clauses): Add new default argument.
4186 * c-typeck.c (c_finish_omp_clauses): Add new argument. Allow
4187 floating-point variables in the linear clause for Cilk Plus.
4188
fe37c7af
MM
41892016-04-18 Michael Matz <matz@suse.de>
4190
4191 * c-decl.c (merge_decls): Use SET_DECL_ALIGN and SET_TYPE_ALIGN.
4192 (grokdeclarator, parser_xref_tag, finish_enum): Use SET_TYPE_ALIGN.
4193
949505a9
MP
41942016-04-15 Marek Polacek <polacek@redhat.com>
4195
4196 PR c/70671
4197 * c-typeck.c (build_unary_op): Pass location down to error and
4198 warning call.
4199
dda1bf61
JJ
42002016-04-15 Jakub Jelinek <jakub@redhat.com>
4201
4202 PR c/70436
4203 * c-parser.c (c_parser_pragma): Add IF_P argument, pass it down
4204 where needed.
4205 (c_parser_external_declaration, c_parser_struct_or_union_specifier,
4206 c_parser_parameter_declaration, c_parser_compound_statement_nostart,
4207 c_parser_objc_class_instance_variables, c_parser_objc_methodprotolist):
4208 Adjust c_parser_pragma callers.
4209 (c_parser_statement_after_labels): Likewise. Adjust c_parser_cilk_for
4210 caller.
4211 (c_parser_omp_structured_block): Add IF_P argument, pass it down to
4212 c_parser_statement.
4213 (c_parser_oacc_data, c_parser_oacc_host_data, c_parser_oacc_loop,
4214 c_parser_oacc_kernels_parallel, c_parser_omp_critical,
4215 c_parser_omp_simd, c_parser_omp_for, c_parser_omp_master,
4216 c_parser_omp_ordered, c_parser_omp_parallel, c_parser_omp_single,
4217 c_parser_omp_task, c_parser_omp_taskgroup, c_parser_omp_distribute,
4218 c_parser_omp_teams, c_parser_omp_target_data, c_parser_omp_target,
4219 c_parser_omp_taskloop, c_parser_omp_construct, c_parser_cilk_grainsize,
4220 c_parser_cilk_simd, c_parser_cilk_for): Add IF_P argument, pass it
4221 down where needed.
4222 (c_parser_omp_for_loop): Likewise. Clear IF_P if nbraces.
4223 (c_parser_omp_sections_scope): Adjust c_parser_omp_structured_block
4224 calls.
4225
99cd9857
MP
42262016-04-13 Marek Polacek <polacek@redhat.com>
4227
4228 PR c/70436
4229 * c-parser.c (c_parser_statement_after_labels): Add IF_P argument and
4230 adjust callers.
4231 (c_parser_statement): Likewise.
4232 (c_parser_c99_block_statement): Likewise.
4233 (c_parser_while_statement): Likewise.
4234 (c_parser_for_statement): Likewise.
4235 (c_parser_if_body): Don't set IF_P here.
4236 (c_parser_if_statement): Add IF_P argument. Set IF_P here. Warn
4237 about dangling else here.
4238 * c-tree.h (c_finish_if_stmt): Adjust declaration.
4239 * c-typeck.c (c_finish_if_stmt): Remove NESTED_IF parameter. Don't
4240 warn about dangling else here.
4241
f13355da
MP
42422016-04-04 Marek Polacek <polacek@redhat.com>
4243
4244 PR c/70307
4245 * c-fold.c (c_fully_fold_internal): Handle VEC_COND_EXPR.
4246
5fde6a45
MP
42472016-03-31 Marek Polacek <polacek@redhat.com>
4248
4249 PR c/70297
4250 * c-decl.c (merge_decls): Also set TYPE_ALIGN and TYPE_USER_ALIGN.
4251
4bbf545b
DM
42522016-03-18 David Malcolm <dmalcolm@redhat.com>
4253
4254 PR c/70281
4255 * c-parser.c (c_parser_postfix_expression): Set the source range
4256 for uses of "__builtin_types_compatible_p".
4257
fcc2b74f
JJ
42582016-03-17 Jakub Jelinek <jakub@redhat.com>
4259
4260 PR c/70280
4261 * c-typeck.c (composite_type): Don't count void_list_node
4262 into len, if the list is terminated by void_list_node, start
4263 with void_list_node instead of NULL for newargs. Stop
4264 at void_list_node.
4265
ab4c578f
MP
42662016-03-16 Marek Polacek <polacek@redhat.com>
4267
4268 PR c/70093
4269 * c-typeck.c (build_function_call_vec): Create a TARGET_EXPR for
4270 nested functions returning VM types.
4271
96b3c82d
CP
42722016-03-09 Cesar Philippidis <cesar@codesourcery.com>
4273
4274 * c-parser.c (c_parser_oacc_loop): Update cclauses and clauses
4275 when calling c_finish_omp_clauses.
4276
29b9828f
BS
42772016-03-04 Bernd Schmidt <bschmidt@redhat.com>
4278
4279 PR c/69824
4280 * c-decl.c (get_parm_info): Don't queue implicit function declarations
4281 for later.
4282
7ff6ca38
MP
42832016-03-04 Marek Polacek <polacek@redhat.com>
4284
4285 PR c/69798
4286 * c-parser.c (c_parser_postfix_expression): Call
4287 c_parser_cast_expression rather than c_parser_postfix_expression.
4288
686e2237
JJ
42892016-03-01 Jakub Jelinek <jakub@redhat.com>
4290
4291 PR c/69796
4292 PR c/69974
4293 * c-parser.c (c_parser_translation_unit): Don't change TREE_TYPE
4294 of incomplete decls to error_mark_node.
4295
0b05329b
MP
42962016-02-24 Marek Polacek <polacek@redhat.com>
4297
4298 PR c/69819
4299 * c-decl.c (finish_decl): Don't update the copy of the type of a
4300 different decl type.
4301
067fbd8b
JJ
43022016-02-23 Jakub Jelinek <jakub@redhat.com>
4303
4304 PR objc/69844
4305 * c-parser.c (c_parser_for_statement): Properly handle ObjC classes
4306 in id_kind reclassification.
4307
bf14eba2
JJ
43082016-02-16 Jakub Jelinek <jakub@redhat.com>
4309
4310 PR c/69835
4311 * c-typeck.c (build_binary_op): Revert 2015-09-09 change.
4312
ba539195
JN
43132016-02-16 James Norris <jnorris@codesourcery.com>
4314
4315 PR c/64748
4316 * c-parser.c (c_parser_oacc_data_clause_deviceptr): Allow parms.
4317
16595a1f
BS
43182016-02-12 Bernd Schmidt <bschmidt@redhat.com>
4319
f48dfe98
BS
4320 * c-decl.c (build_null_declspecs): Zero the entire struct.
4321
16595a1f
BS
4322 PR c/69522
4323 * c-parser.c (c_parser_braced_init): New arg outer_obstack. All
4324 callers changed. If nested_p is true, use it to call
4325 finish_implicit_inits.
4326 * c-tree.h (finish_implicit_inits): Declare.
4327 * c-typeck.c (finish_implicit_inits): New function. Move code
4328 from ...
4329 (push_init_level): ... here.
4330 (set_designator, process_init_element): Call finish_implicit_inits.
4331
66756373
JJ
43322016-02-11 Jakub Jelinek <jakub@redhat.com>
4333
4334 PR c/69768
4335 * c-typeck.c (parser_build_binary_op): Strip nops from integer_zerop
4336 arguments for -Waddress warning.
4337
1066e9b5
JJ
43382016-02-04 Jakub Jelinek <jakub@redhat.com>
4339
4340 PR c/69669
4341 * c-decl.c (finish_enum): When honoring mode attribute,
4342 make sure to use proper TYPE_MIN_VALUE and TYPE_MAX_VALUE.
4343
3a5d2ba4
JJ
43442016-01-29 Jakub Jelinek <jakub@redhat.com>
4345
4346 PR debug/69518
4347 * c-decl.c (finish_struct): Clear C_TYPE_INCOMPLETE_VARS in
4348 all type variants, not just TYPE_MAIN_VARIANT.
4349
cbdd8ae0
JJ
43502016-01-27 Jakub Jelinek <jakub@redhat.com>
4351
4352 PR debug/66869
4353 * c-decl.c (c_write_global_declarations_1): Warn with
4354 warn_unused_function if static prototype without definition
4355 is not C_DECL_USED.
4356
fa74a4bc
MP
43572016-01-27 Marek Polacek <polacek@redhat.com>
4358
4359 PR c/68062
4360 * c-typeck.c (build_binary_op) [EQ_EXPR, GE_EXPR]: Promote operand
4361 to unsigned, if needed. Add -Wsign-compare warning.
4362
13f92e8d
JJ
43632016-01-26 Jakub Jelinek <jakub@redhat.com>
4364
4365 PR tree-optimization/69483
4366 * c-parser.c (c_parser_translation_unit): Use FOR_EACH_VEC_ELT.
4367
cd8e73dc 43682016-01-20 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
d25c7690
PK
4369
4370 PR c/24293
4371 * c-tree.h (incomplete_record_decls): Declare.
4372 * c-parser.c (incomplete_record_decls): Define.
4373 (c_parser_translation_unit): Iterate through incomplete_record_decls and
4374 report error if any decl has zero size.
4375 * c-decl.c (finish_decl): Append static decl with incomplete struct/union
4376 or enum type to incomplete_record_decls.
4377
e6d6ec9e
TV
43782016-01-14 Tom de Vries <tom@codesourcery.com>
4379
4380 PR tree-optimization/68773
4381 * c-parser.c (c_parser_oacc_declare, c_parser_omp_declare_target): Don't
4382 set force_output.
4383
00083992
MP
43842016-01-14 Marek Polacek <polacek@redhat.com>
4385
4386 PR c/69262
4387 * c-decl.c (grokdeclarator): Provide more information for invalid
4388 array declarations.
4389
7443cf13
DM
43902016-01-06 David Malcolm <dmalcolm@redhat.com>
4391
4392 * c-parser.c (c_parser_unary_expression): For dereferences, build
4393 a combined location before calling build_indirect_ref, so that
4394 error reports cover the full range, manually updating the c_expr
4395 src_range.
4396
6b131d5b
MP
43972016-01-06 Marek Polacek <polacek@redhat.com>
4398
4399 PR sanitizer/69099
4400 * c-convert.c (convert) [INTEGER_TYPE]: Drop ARG. Don't pass ARG to
4401 ubsan_instrument_float_cast. Fold EXPR. Use NULL_TREE instead of
4402 NULL.
4403
818ab71a
JJ
44042016-01-04 Jakub Jelinek <jakub@redhat.com>
4405
4406 Update copyright years.
4407
2fe0a208
MP
44082016-01-04 Marek Polacek <polacek@redhat.com>
4409
4410 PR c/68908
4411 * c-typeck.c (build_atomic_assign): Improve commentary. Add
4412 optimization to use __atomic_fetch_* built-in if possible.
4413
c7b48c8a
TS
44142015-12-23 Thomas Schwinge <thomas@codesourcery.com>
4415
4416 * c-parser.c (c_parser_oacc_clause_use_device): Merge function
4417 into...
4418 (c_parser_omp_clause_use_device_ptr): ... this function. Adjust
4419 all users.
4420
fda5652f
MP
44212015-12-22 Marek Polacek <polacek@redhat.com>
4422
4423 PR c/69002
4424 * c-typeck.c (build_component_ref): Warn when acessing elements of
4425 atomic structures or unions.
4426
745e411d
DM
44272015-12-21 David Malcolm <dmalcolm@redhat.com>
4428
4429 * c-typeck.c: Include "gcc-rich-location.h".
4430 (build_binary_op): In the two places that call binary_op_error,
4431 create a gcc_rich_location and populate it with the location of
4432 the binary op and its two operands.
4433
94c40e19
DM
44342015-12-16 David Malcolm <dmalcolm@redhat.com>
4435
4436 * c-parser.c (c_parser_statement_after_labels): When calling
4437 c_finish_return, Use the return expression's location if it has
4438 one, falling back to the location of the first token within it.
4439 * c-typeck.c (c_finish_return): When issuing warnings about
4440 the incorrect presence/absence of a return value, issue a note
4441 showing the declaration of the function.
4442
de67c4c3
DM
44432015-12-16 David Malcolm <dmalcolm@redhat.com>
4444
4445 * c-parser.c (struct c_parser): Expand array "tokens_buf" from 2
4446 to 4.
4447 (c_parser_peek_nth_token): New function.
4448 (c_parser_peek_conflict_marker): New function.
4449 (c_parser_error): Detect conflict markers and report them as such.
4450
a10704e1
DM
44512015-12-16 David Malcolm <dmalcolm@redhat.com>
4452
4453 * c-parser.c (c_parser_postfix_expression): Use EXPR_LOC_OR_LOC
4454 to preserve range information for the primary expression
4455 in the call to c_parser_postfix_expression_after_primary.
4456
8062bca6
DM
44572015-12-16 David Malcolm <dmalcolm@redhat.com>
4458
4459 * c-parser.c (c_parser_static_assert_declaration_no_semi): Use the
4460 expression location, falling back on the first token location,
4461 rather than always using the latter.
4462
d06f8b75
MP
44632015-12-16 Marek Polacek <polacek@redhat.com>
4464
4465 PR c/64637
4466 * c-typeck.c (c_process_expr_stmt): Use location of the expression if
4467 available.
4468
2994fb91
MP
44692015-12-15 Marek Polacek <polacek@redhat.com>
4470
4471 PR c/68907
4472 * c-typeck.c (build_atomic_assign): Set TREE_NO_WARNING on an
4473 artificial decl.
4474
a1b93f8d
DM
44752015-12-08 David Malcolm <dmalcolm@redhat.com>
4476
4477 * c-parser.c (c_parser_alignof_expression): Capture location of
4478 closing parenthesis (if any), or of end of unary expression, and
4479 use it to build a src_range for the expression.
4480
46c6e1e2
DM
44812015-12-08 David Malcolm <dmalcolm@redhat.com>
4482
4483 PR c/68757
4484 * c-parser.c (c_parser_get_builtin_args): Add
4485 "out_close_paren_loc" param, and write back to it.
4486 (c_parser_postfix_expression): Capture the closing
4487 parenthesis location for RID_CHOOSE_EXPR,
4488 RID_BUILTIN_CALL_WITH_STATIC_CHAIN, RID_BUILTIN_COMPLEX,
4489 RID_BUILTIN_SHUFFLE and use it to set the source range
4490 for such expressions; within RID_BUILTIN_COMPLEX set
4491 the underlying location.
4492
66189108
MP
44932015-12-07 Marek Polacek <polacek@redhat.com>
4494
4495 PR c/68668
4496 * c-decl.c (grokdeclarator): If ORIG_QUAL_INDIRECT is indirect, use
4497 TREE_TYPE of ORIG_QUAL_TYPE, otherwise decrement ORIG_QUAL_INDIRECT.
4498
f187980b
EB
44992015-12-04 Eric Botcazou <ebotcazou@adacore.com>
4500
4501 * c-tree.h (c_build_va_arg): Adjust prototype.
4502 * c-parser.c (c_parser_postfix_expression): Adjust call to above.
4503 * c-typeck.c (c_build_va_arg): Rename LOC parameter to LOC2, add LOC1
4504 parameter, adjust throughout and issue an error if EXPR is a component
4505 with reverse storage order.
4506
4250754e
JM
45072015-12-02 Jason Merrill <jason@redhat.com>
4508
4509 * c-fold.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
4510 (c_fully_fold_internal, decl_constant_value_for_optimization):
4511 Move from c-common.c.
4512 * c-tree.h: Declare decl_constant_value_for_optimization.
4513 * Make-lang.in (C_AND_OBJC_OBJS): Add c-fold.o.
4514
e9e32ee6
JM
45152015-12-02 Joseph Myers <joseph@codesourcery.com>
4516
4517 PR c/68162
4518 * c-decl.c (grokdeclarator): Set first_non_attr_kind before
4519 following link from declarator to next declarator. Track original
4520 qualified type and pass it to c_build_qualified_type.
4521 * c-typeck.c (c_build_qualified_type): Add arguments
4522 orig_qual_type and orig_qual_indirect.
4523
ff7a55bf
TS
45242015-12-02 Thomas Schwinge <thomas@codesourcery.com>
4525
4526 * c-parser.c (c_parser_omp_clause_name)
4527 (c_parser_oacc_all_clauses): Alphabetical sorting.
4528
657e4e47
JJ
45292015-12-02 Jakub Jelinek <jakub@redhat.com>
4530
4531 PR c/68533
4532 * c-decl.c (get_parm_info): Use b->locus instead of input_location
4533 for diagnostics.
4534
37d5ad46
JB
45352015-12-01 Julian Brown <julian@codesourcery.com>
4536 Cesar Philippidis <cesar@codesourcery.com>
4537 James Norris <James_Norris@mentor.com>
4538
4539 * c-parser.c (c_parser_omp_clause_name): Add use_device support.
4540 (c_parser_oacc_clause_use_device): New function.
4541 (c_parser_oacc_all_clauses): Add use_device support.
4542 (OACC_HOST_DATA_CLAUSE_MASK): New macro.
4543 (c_parser_oacc_host_data): New function.
4544 (c_parser_omp_construct): Add host_data support.
4545 * c-tree.h (c_finish_oacc_host_data): Add prototype.
4546 * c-typeck.c (c_finish_oacc_host_data): New function.
4547 (c_finish_omp_clauses): Add use_device support.
4548
a4850ce9
JH
45492015-11-29 Jan Hubicka <hubicka@ucw.cz>
4550
4551 PR c/67106
4552 * c-decl.c: Set TYPE_PACKED in variants.
4553
b58d3df2
ML
45542015-11-27 Martin Liska <mliska@suse.cz>
4555
4556 PR c++/68312
4557 * c-array-notation.c (fix_builtin_array_notation_fn):
4558 Use release_vec_vec instead of vec::release.
4559 (build_array_notation_expr): Likewise.
4560 (fix_conditional_array_notations_1): Likewise.
4561 (fix_array_notation_expr): Likewise.
4562 (fix_array_notation_call_expr): Likewise.
4563
aec17bfe
JJ
45642015-11-27 Jakub Jelinek <jakub@redhat.com>
4565
4566 PR c/63326
4567 * c-parser.c (c_parser_compound_statement_nostart): If
4568 last_label is true, use pragma_stmt instead of pragma_compound
4569 as second c_parser_pragma argument.
4570 (c_parser_omp_ordered, c_parser_omp_target_update,
4571 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Pass
4572 false as second argument to c_parser_skip_to_pragma_eol after
4573 diagnosing standalone directives used in pragma_stmt context.
4574
688c4de0
IV
45752015-11-24 Ilya Verbin <ilya.verbin@intel.com>
4576
4577 * c-parser.c (c_parser_oacc_declare): Replace "ifdef ENABLE_OFFLOADING"
4578 with "if (ENABLE_OFFLOADING)".
4579
cbd03aee
DM
45802015-11-23 David Malcolm <dmalcolm@redhat.com>
4581
4582 PR objc/68438
4583 * c-parser.c (c_parser_postfix_expression): Set up source ranges
4584 for various Objective-C constructs: Class.name syntax,
4585 @selector(), @protocol(), @encode(), and [] message syntax.
4586
a87a86e1
DM
45872015-11-20 David Malcolm <dmalcolm@redhat.com>
4588
4589 PR 62314
4590 * c-typeck.c (should_suggest_deref_p): New function.
4591 (build_component_ref): Special-case POINTER_TYPE when
4592 generating a "not a structure of union" error message, and
4593 suggest a "->" rather than a ".", providing a fix-it hint.
4594
8ece8dfb
DM
45952015-11-19 David Malcolm <dmalcolm@redhat.com>
4596
4597 * c-typeck.c (lookup_field_fuzzy): Move determination of closest
4598 candidate into a new function, find_closest_identifier.
4599
433068cc
MP
46002015-11-19 Marek Polacek <polacek@redhat.com>
4601
4602 PR c/68412
4603 * c-typeck.c (parser_build_binary_op): Properly handle
4604 C_MAYBE_CONST_EXPR before calling warn_tautological_cmp.
4605
bef08b71
DM
46062015-11-17 David Malcolm <dmalcolm@redhat.com>
4607
4608 * c-parser.c (set_c_expr_source_range): Bulletproof both
4609 overloaded implementations against NULL expr->value.
4610 (c_parser_braced_init): Set src_range for "ret" to a sane pair of
4611 values.
4612 (c_parser_unary_expression): Likewise when handling addresses of
4613 labels.
4614 (c_parser_postfix_expression): Likewise for statement expressions,
4615 for __FUNCTION__, __PRETTY_FUNCTION_ and __func__ keywords, for
4616 __builtin_va_arg, and for __builtin_offset_of.
4617 (c_parser_postfix_expression_after_paren_type): Initialize expr's
4618 src_range using the range of the braced initializer.
4619 (c_parser_transaction_expression): Set src_range for "ret" to a
4620 sane pair of values.
4621
fff77217
KY
46222015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
4623
4624 * c-parser.c (c_finish_omp_declare_simd): Look for
4625 "simd" attribute as well. Update error message.
4626
1d899da2
TS
46272015-11-14 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
4628
4629 * c-parser.c (c_parser_omp_declare_target): Adjust.
4630
e4606348
JJ
46312015-11-14 Jakub Jelinek <jakub@redhat.com>
4632
4633 * c-typeck.c (c_finish_omp_clauses): Don't mark
4634 GOMP_MAP_FIRSTPRIVATE_POINTER decls addressable.
4635
3e636daf
MP
46362015-11-14 Marek Polacek <polacek@redhat.com>
4637
4638 * c-decl.c: Use RECORD_OR_UNION_TYPE_P throughout.
4639 * c-typeck.c: Likewise.
4640
ebedc9a3
DM
46412015-11-13 David Malcolm <dmalcolm@redhat.com>
4642
4643 * c-decl.c (warn_defaults_to): Pass line_table to
4644 rich_location ctor.
4645 * c-errors.c (pedwarn_c99): Likewise.
4646 (pedwarn_c90): Likewise.
4647 * c-parser.c (set_c_expr_source_range): New functions.
4648 (c_token::get_range): New method.
4649 (c_token::get_finish): New method.
4650 (c_parser_expr_no_commas): Call set_c_expr_source_range on the ret
4651 based on the range from the start of the LHS to the end of the
4652 RHS.
4653 (c_parser_conditional_expression): Likewise, based on the range
4654 from the start of the cond.value to the end of exp2.value.
4655 (c_parser_binary_expression): Call set_c_expr_source_range on
4656 the stack values for TRUTH_ANDIF_EXPR and TRUTH_ORIF_EXPR.
4657 (c_parser_cast_expression): Call set_c_expr_source_range on ret
4658 based on the cast_loc through to the end of the expr.
4659 (c_parser_unary_expression): Likewise, based on the
4660 op_loc through to the end of op.
4661 (c_parser_sizeof_expression) Likewise, based on the start of the
4662 sizeof token through to either the closing paren or the end of
4663 expr.
4664 (c_parser_postfix_expression): Likewise, using the token range,
4665 or from the open paren through to the close paren for
4666 parenthesized expressions.
4667 (c_parser_postfix_expression_after_primary): Likewise, for
4668 various kinds of expression.
4669 * c-tree.h (struct c_expr): Add field "src_range".
4670 (c_expr::get_start): New method.
4671 (c_expr::get_finish): New method.
4672 (set_c_expr_source_range): New decls.
4673 * c-typeck.c (parser_build_unary_op): Call set_c_expr_source_range
4674 on ret for prefix unary ops.
4675 (parser_build_binary_op): Likewise, running from the start of
4676 arg1.value through to the end of arg2.value.
4677
ec8b536f
MP
46782015-11-13 Marek Polacek <polacek@redhat.com>
4679
4680 PR c/68320
4681 * c-parser.c (c_parser_for_statement): Treat unknown tokens as IDs.
4682
277fe616
DM
46832015-11-13 David Malcolm <dmalcolm@redhat.com>
4684
4685 * c-typeck.c: Include spellcheck.h.
4686 (lookup_field_fuzzy_find_candidates): New function.
4687 (lookup_field_fuzzy): New function.
4688 (build_component_ref): If the field was not found, try using
4689 lookup_field_fuzzy and potentially offer a suggestion.
4690
6e232ba4
JN
46912015-11-12 James Norris <jnorris@codesourcery.com>
4692 Joseph Myers <joseph@codesourcery.com>
4693
4694 * c-parser.c (c_parser_pragma): Handle PRAGMA_OACC_DECLARE.
4695 (c_parser_omp_clause_name): Handle 'device_resident' clause.
4696 (c_parser_oacc_data_clause): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
4697 and PRAGMA_OMP_CLAUSE_LINK.
4698 (c_parser_oacc_all_clauses): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
4699 and PRAGMA_OACC_CLAUSE_LINK.
4700 (OACC_DECLARE_CLAUSE_MASK): New definition.
4701 (c_parser_oacc_declare): New function.
4702
9be4f715
MP
47032015-11-12 Marek Polacek <polacek@redhat.com>
4704
4705 PR c/67784
4706 * c-parser.c (c_parser_for_statement): Reclassify the token in
4707 a correct scope.
4708
e78bede6
MP
47092015-11-11 Marek Polacek <polacek@redhat.com>
4710
4711 PR c/68107
4712 PR c++/68266
4713 * c-decl.c (grokdeclarator): Call valid_array_size_p. Remove code
4714 checking the size of an array.
4715
69f293c9
AM
47162015-11-11 Andrew MacLeod <amacleod@redhat.com>
4717
4718 * c-array-notation.c: Remove unused header files.
4719 * c-aux-info.c: Likewise.
4720 * c-convert.c: Likewise.
4721 * c-decl.c: Likewise.
4722 * c-errors.c: Likewise.
4723 * c-lang.c: Likewise.
4724 * c-objc-common.c: Likewise.
4725 * c-parser.c: Likewise.
4726 * c-typeck.c: Likewise.
4727 * gccspec.c: Likewise.
4728
3a40d81d
NS
47292015-11-09 Thomas Schwinge <thomas@codesourcery.com>
4730 Cesar Philippidis <cesar@codesourcery.com>
4731 James Norris <jnorris@codesourcery.com>
4732 Julian Brown <julian@codesourcery.com>
4733 Nathan Sidwell <nathan@codesourcery.com>
4734
3a40d81d
NS
4735 * c-parser.c (c_parser_declaration_or_fndef): Add OpenACC
4736 routine arg.
4737 (c_parser_declaration_or_fndef): Call c_finish_oacc_routine.
4738 (c_parser_pragma): Parse 'acc routine'.
4739 (OACC_ROUTINE_CLAUSE_MARK): Define.
4740 (c_parser_oacc_routine, (c_finish_oacc_routine): New.
4741
fc402eec
AA
47422015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
4743
4744 PR debug/67192
4745 * c-typeck.c (c_finish_loop): For unconditional loops, set the
4746 location of the backward-goto to the start of the loop body.
4747
f6b0b3db
AA
47482015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
4749
4750 PR debug/67192
4751 * c-parser.c (c_parser_while_statement): Finish the loop before
4752 parsing ahead for misleading indentation.
4753 (c_parser_for_statement): Likewise.
4754
ee45a32d
EB
47552015-11-08 Eric Botcazou <ebotcazou@adacore.com>
4756
4757 * c-decl.c (finish_struct): If the structure has reverse storage
4758 order, rewrite the type of array fields with scalar component. Call
4759 maybe_apply_pragma_scalar_storage_order on entry.
4760 * c-typeck.c (build_unary_op) <ADDR_EXPR>: Remove left-overs. Issue
4761 errors on bit-fields and reverse SSO here and not...
4762 (c_mark_addressable): ...here.
4763 (output_init_element): Adjust call to initializer_constant_valid_p.
4764 (c_build_qualified_type): Propagate TYPE_REVERSE_STORAGE_ORDER.
4765
8a645150
DM
47662015-11-06 David Malcolm <dmalcolm@redhat.com>
4767
4768 * c-decl.c (warn_defaults_to): Update for change in signature
4769 of diagnostic_set_info.
4770 * c-errors.c (pedwarn_c99): Likewise.
4771 (pedwarn_c90): Likewise.
4772 * c-objc-common.c (c_tree_printer): Update for new "caret_p" param
4773 for textinfo::set_location.
4774
7a5e4956
CP
47752015-11-05 Cesar Philippidis <cesar@codesourcery.com>
4776 Thomas Schwinge <thomas@codesourcery.com>
4777 James Norris <jnorris@codesourcery.com>
4778
4779 * c-parser.c (c_parser_omp_clause_name): Add support for
4780 PRAGMA_OACC_CLAUSE_INDEPENDENT and PRAGMA_OACC_CLAUSE_TILE.
4781 (c_parser_omp_clause_default): Add is_oacc argument. Handle
4782 default(none) in OpenACC.
4783 (c_parser_oacc_shape_clause): Allow pointer variables as gang static
4784 arguments.
4785 (c_parser_oacc_clause_tile): New function.
4786 (c_parser_oacc_all_clauses): Add support for OMP_CLAUSE_DEFAULT,
4787 OMP_CLAUSE_INDEPENDENT and OMP_CLAUSE_TILE.
4788 (OACC_LOOP_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_{PRIVATE,INDEPENDENT,
4789 TILE}.
4790 (OACC_KERNELS_MASK): Add PRAGMA_OACC_CLAUSE_DEFAULT.
4791 (OACC_PARALLEL_MASK): Add PRAGMA_OACC_CLAUSE_{DEFAULT,PRIVATE,
4792 FIRSTPRIVATE}.
4793 (c_parser_omp_all_clauses): Update call to c_parser_omp_clause_default.
4794 (c_parser_oacc_update): Update the error message for missing clauses.
4795 * c-typeck.c (c_finish_omp_clauses): Add support for OMP_CLAUSE_TILE
4796 and OMP_CLAUSE_INDEPENDENT.
4797
bfcfbfa0
MP
47982015-11-05 Marek Polacek <polacek@redhat.com>
4799
4800 PR c/68090
4801 * c-parser.c (c_parser_postfix_expression_after_paren_type): Don't
4802 deal with pre-evaluation on invalid types.
4803
e01d41e5
JJ
48042015-11-05 Jakub Jelinek <jakub@redhat.com>
4805 Ilya Verbin <ilya.verbin@intel.com>
4806
4807 * c-parser.c: Include context.h and gimple-expr.h.
4808 (c_parser_omp_clause_schedule): Parse schedule modifiers, diagnose
4809 monotonic together with nonmonotonic.
4810 (c_parser_omp_for_loop): Call c_omp_check_loop_iv. Call add_stmt here.
4811 (OMP_DISTRIBUTE_CLAUSE_MASK): Add lastprivate clause.
4812 (c_parser_omp_target_data, c_parser_omp_target_enter_data,
4813 c_parser_omp_target_exit_data): Allow GOMP_MAP_ALWAYS_POINTER.
4814 (c_parser_omp_target): Likewise. Evaluate num_teams and thread_limit
4815 expressions on combined target teams before the target.
4816 (c_parser_omp_declare_target): If decl has "omp declare target" or
4817 "omp declare target link" attribute, and cgraph or varpool node already
4818 exists, then set corresponding flags. Call c_finish_omp_clauses
4819 in the parenthesized extended-list syntax case.
4820 * c-decl.c (c_decl_attributes): Don't diagnose block scope vars inside
4821 declare target.
4822 * c-typeck.c (handle_omp_array_sections_1): Allow non-zero low-bound
4823 on OMP_CLAUSE_REDUCTION array sections.
4824 (handle_omp_array_sections): Encode low-bound into the MEM_REF, either
4825 into the constant offset, or for variable low-bound using
4826 POINTER_PLUS_EXPR. For structure element based array sections use
4827 GOMP_MAP_ALWAYS_POINTER instead of GOMP_MAP_FIRSTPRIVATE_POINTER.
4828 (c_finish_omp_clauses): Drop generic_field_head, structure
4829 elements are now always mapped even as array section bases,
4830 diagnose same var in data sharing and mapping clauses. Diagnose if
4831 linear step on declare simd is neither a constant nor a uniform
4832 parameter. Look through POINTER_PLUS_EXPR for array section
4833 reductions. Diagnose the same var or function appearing multiple
4834 times on the same directive. Fix up wording for the to clause if t
4835 is neither a FUNCTION_DECL nor a VAR_DECL. Diagnose nonmonotonic
4836 modifier on kinds other than dynamic or guided or nonmonotonic
4837 modifier together with ordered clause.
4838
4bf9e5a8
TS
48392015-11-03 Thomas Schwinge <thomas@codesourcery.com>
4840 Chung-Lin Tang <cltang@codesourcery.com>
4841
4842 * c-parser.c (c_parser_omp_construct): Handle PRAGMA_OACC_ATOMIC.
4843
2adfab87
AM
48442015-10-29 Andrew MacLeod <amacleod@redhat.com>
4845
4846 * c-array-notation.c: Reorder #include's and remove duplicates.
4847 * c-aux-info.c: Likewise.
4848 * c-convert.c: Likewise.
4849 * c-decl.c: Likewise.
4850 * c-errors.c: Likewise.
4851 * c-lang.c: Likewise.
4852 * c-objc-common.c: Likewise.
4853 * c-parser.c: Likewise.
4854 * c-typeck.c: Likewise.
4855
e922069e
JW
48562015-10-26 Jim Wilson <jim.wilson@linaro.org>
4857
4858 PR debug/66068
4859 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
4860 after calling build_qualified_type.
4861
765dd391
CP
48622015-10-27 Cesar Philippidis <cesar@codesourcery.com>
4863 Thomas Schwinge <thomas@codesourcery.com>
4864 James Norris <jnorris@codesourcery.com>
4865 Joseph Myers <joseph@codesourcery.com>
4866 Julian Brown <julian@codesourcery.com>
4867 Bernd Schmidt <bschmidt@redhat.com>
4868
4869 * c-parser.c (c_parser_oacc_shape_clause): New.
4870 (c_parser_oacc_simple_clause): New.
4871 (c_parser_oacc_all_clauses): Add auto, gang, seq, vector, worker.
4872 (OACC_LOOP_CLAUSE_MASK): Add gang, worker, vector, auto, seq.
4873
88bae6f4
TS
48742015-10-27 Thomas Schwinge <thomas@codesourcery.com>
4875 James Norris <jnorris@codesourcery.com>
4876 Cesar Philippidis <cesar@codesourcery.com>
4877
4878 PR c/64765
4879 PR c/64880
4880 * c-parser.c (c_parser_oacc_loop): Add mask, cclauses formal
4881 parameters, and handle these. Adjust all users.
4882 (c_parser_oacc_kernels, c_parser_oacc_parallel): Merge functions
4883 into...
4884 (c_parser_oacc_kernels_parallel): ... this new function. Adjust
4885 all users.
4886 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels): Don't
4887 declare functions.
4888 (c_finish_omp_construct): Declare function.
4889 * c-typeck.c (c_finish_oacc_parallel, c_finish_oacc_kernels):
4890 Merge functions into...
4891 (c_finish_omp_construct): ... this new function.
4892
a8fc2579
RB
48932015-10-22 Richard Biener <rguenther@suse.de>
4894
4895 * c-typeck.c (c_finish_omp_clauses): Properly convert operands
4896 before folding a MINUS_EXPR.
4897
e9122ef6
MP
48982015-10-21 Marek Polacek <polacek@redhat.com>
4899
4900 PR c/68024
4901 * c-decl.c (start_function): Warn about vararg functions without
4902 a prototype.
4903
9f47c7e5
IE
49042015-10-21 Ilya Enkovich <enkovich.gnu@gmail.com>
4905
4906 * c-typeck.c (build_conditional_expr): Use boolean vector
4907 type for vector comparison.
4908 (build_vec_cmp): New.
4909 (build_binary_op): Use build_vec_cmp for comparison.
4910
fa60eeb9
MP
49112015-10-20 Marek Polacek <polacek@redhat.com>
4912
4913 * c-parser.c (is_cilkplus_vector_p): Don't define here.
4914
2c7020eb
MP
49152015-10-20 Marek Polacek <polacek@redhat.com>
4916
4917 PR c/67964
4918 * c-parser.c (c_parser_attributes): Break out of the loop if the
4919 token after an attribute isn't a comma.
4920
d9a6bd32
JJ
49212015-10-13 Jakub Jelinek <jakub@redhat.com>
4922 Aldy Hernandez <aldyh@redhat.com>
4923
4924 * c-parser.c (c_parser_pragma): Handle PRAGMA_OMP_ORDERED here.
4925 (c_parser_omp_clause_name): Handle OpenMP 4.5 clauses.
4926 (c_parser_omp_variable_list): Handle structure elements for
4927 map, to and from clauses. Handle array sections in reduction
4928 clause. Formatting fixes.
4929 (c_parser_omp_clause_if): Add IS_OMP argument, handle parsing of
4930 if clause modifiers.
4931 (c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
4932 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
4933 c_parser_omp_clause_defaultmap, c_parser_omp_clause_use_device_ptr,
4934 c_parser_omp_clause_is_device_ptr): New functions.
4935 (c_parser_omp_clause_ordered): Parse optional parameter.
4936 (c_parser_omp_clause_reduction): Handle array reductions.
4937 (c_parser_omp_clause_schedule): Parse optional simd modifier.
4938 (c_parser_omp_clause_nogroup, c_parser_omp_clause_orderedkind): New
4939 functions.
4940 (c_parser_omp_clause_linear): Parse linear clause modifiers.
4941 (c_parser_omp_clause_depend_sink): New function.
4942 (c_parser_omp_clause_depend): Parse source/sink depend kinds.
4943 (c_parser_omp_clause_map): Parse release/delete map kinds and
4944 optional always modifier.
4945 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_if
4946 and c_finish_omp_clauses callers.
4947 (c_parser_omp_all_clauses): Likewise. Parse OpenMP 4.5 clauses.
4948 Parse "to" as OMP_CLAUSE_TO_DECLARE if on declare target directive.
4949 (c_parser_oacc_cache): Adjust c_finish_omp_clauses caller.
4950 (OMP_CRITICAL_CLAUSE_MASK): Define.
4951 (c_parser_omp_critical): Parse critical clauses.
4952 (c_parser_omp_for_loop): Handle doacross loops, adjust
4953 c_finish_omp_for and c_finish_omp_clauses callers.
4954 (OMP_SIMD_CLAUSE_MASK): Add simdlen clause.
4955 (c_parser_omp_simd): Allow ordered clause if it has no parameter.
4956 (OMP_FOR_CLAUSE_MASK): Add linear clause.
4957 (c_parser_omp_for): Disallow ordered clause when combined with
4958 distribute. Disallow linear clause when combined with distribute
4959 and not combined with simd.
4960 (OMP_ORDERED_CLAUSE_MASK, OMP_ORDERED_DEPEND_CLAUSE_MASK): Define.
4961 (c_parser_omp_ordered): Add CONTEXT argument, remove LOC argument,
4962 parse clauses and if depend clause is found, don't parse a body.
4963 (c_parser_omp_parallel): Disallow copyin clause on target parallel.
4964 Allow target parallel without for after it.
4965 (OMP_TASK_CLAUSE_MASK): Add priority clause.
4966 (OMP_TARGET_DATA_CLAUSE_MASK): Add use_device_ptr clause.
4967 (c_parser_omp_target_data): Diagnose no map clauses or clauses with
4968 invalid kinds.
4969 (OMP_TARGET_UPDATE_CLAUSE_MASK): Add depend and nowait clauses.
4970 (OMP_TARGET_ENTER_DATA_CLAUSE_MASK,
4971 OMP_TARGET_EXIT_DATA_CLAUSE_MASK): Define.
4972 (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): New
4973 functions.
4974 (OMP_TARGET_CLAUSE_MASK): Add depend, nowait, private, firstprivate,
4975 defaultmap and is_device_ptr clauses.
4976 (c_parser_omp_target): Parse target parallel and target simd. Set
4977 OMP_TARGET_COMBINED on combined constructs. Parse target enter data
4978 and target exit data. Diagnose invalid map kinds.
4979 (OMP_DECLARE_TARGET_CLAUSE_MASK): Define.
4980 (c_parser_omp_declare_target): Parse OpenMP 4.5 forms of this
4981 construct.
4982 (c_parser_omp_declare_reduction): Use STRIP_NOPS when checking for
4983 &omp_priv.
4984 (OMP_TASKLOOP_CLAUSE_MASK): Define.
4985 (c_parser_omp_taskloop): New function.
4986 (c_parser_omp_construct): Don't handle PRAGMA_OMP_ORDERED here,
4987 handle PRAGMA_OMP_TASKLOOP.
4988 (c_parser_cilk_for): Adjust c_finish_omp_clauses callers.
4989 * c-tree.h (c_finish_omp_clauses): Add two new arguments.
4990 * c-typeck.c (handle_omp_array_sections_1): Fix comment typo.
4991 Add IS_OMP argument, handle structure element bases, diagnose
4992 bitfields, pass IS_OMP recursively, diagnose known zero length
4993 array sections in depend clauses, handle array sections in reduction
4994 clause, diagnose negative length even for pointers.
4995 (handle_omp_array_sections): Add IS_OMP argument, use auto_vec for
4996 types, pass IS_OMP down to handle_omp_array_sections_1, handle
4997 array sections in reduction clause, set
4998 OMP_CLAUSE_MAP_MAYBE_ZERO_LENGTH_ARRAY_SECTION if map could be zero
4999 length array section, use GOMP_MAP_FIRSTPRIVATE_POINTER for IS_OMP.
5000 (c_finish_omp_clauses): Add IS_OMP and DECLARE_SIMD arguments.
5001 Handle new OpenMP 4.5 clauses and new restrictions for the old ones.
5002
21ba0cea
MP
50032015-10-06 Marek Polacek <polacek@redhat.com>
5004
5005 * c-parser.c (c_parser_statement_after_labels): Use
5006 protected_set_expr_location.
5007 (c_parser_omp_clause_num_gangs): Likewise.
5008 (c_parser_omp_clause_num_threads): Likewise.
5009 (c_parser_omp_clause_num_workers): Likewise.
5010 (c_parser_omp_clause_vector_length): Likewise.
5011 (c_parser_omp_clause_num_teams): Likewise.
5012 (c_parser_omp_clause_thread_limit): Likewise.
5013 * c-typeck.c (build_c_cast): Likewise.
5014 (c_cast_expr): Likewise.
5015
624d31fe
RS
50162015-10-05 Richard Sandiford <richard.sandiford@arm.com>
5017
5018 * c-typeck.c (c_tree_equal): Use real_equal instead of
5019 REAL_VALUES_EQUAL.
5020
b8fd7909
JM
50212015-10-04 Jason Merrill <jason@redhat.com>
5022
5023 * c-parser.c (c_lex_one_token): Handle @synchronized.
5024 * c-decl.c (match_builtin_function_types): A declaration of a built-in
5025 can change whether the function is transaction_safe.
5026
1c7485af
MP
50272015-10-02 Marek Polacek <polacek@redhat.com>
5028
5029 PR c/67730
5030 * c-typeck.c (convert_for_assignment): Use the expansion point
5031 location throughout.
5032
3e3b8d63
MP
50332015-10-02 Marek Polacek <polacek@redhat.com>
5034
5035 PR c/64249
5036 * c-parser.c (c_parser_statement_after_labels): Add CHAIN parameter
5037 and pass it down to c_parser_if_statement.
5038 (c_parser_else_body): Add CHAIN parameter and pass it down to
5039 c_parser_statement_after_labels.
5040 (c_parser_if_statement): Add CHAIN parameter. Add code to warn about
5041 duplicated if-else-if conditions.
5042
aabef2de
MP
50432015-10-01 Marek Polacek <polacek@redhat.com>
5044
5045 * c-typeck.c (convert_for_assignment): Improve commentary.
5046
de8ddd5f
MP
50472015-09-30 Marek Polacek <polacek@redhat.com>
5048
5049 PR c/67730
5050 * c-typeck.c (c_finish_return): Use the expansion point location for
5051 certain "return with value" warnings.
5052
c4914de6
MLI
50532015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
5054
5055 * c-parser.c (pragma_lex): Add loc argument.
5056
0e36f5c7
MP
50572015-09-15 Marek Polacek <polacek@redhat.com>
5058
5059 PR c/67580
5060 * c-decl.c (tag_exists_p): New function.
5061 * c-parser.c (c_parser_declaration_or_fndef): Give a hint when
5062 struct/union/enum keywords are missing.
5063 * c-tree.h (tag_exists_p): Declare.
5064
2f3bb934
MP
50652015-09-15 Marek Polacek <polacek@redhat.com>
5066
5067 * c-decl.c (lookup_label): Return NULL_TREE instead of 0.
5068 (lookup_tag): Change the type of THISLEVEL_ONLY to bool.
5069 Return NULL_TREE instead of 0.
5070 (lookup_name): Return NULL_TREE instead of 0.
5071 (lookup_name_in_scope): Likewise.
5072 (shadow_tag_warned): Use true instead of 1 and NULL_TREE instead of 0.
5073 (parser_xref_tag): Use false instead of 0.
5074 (start_struct): Use true instead of 1.
5075 (start_enum): Use true instead of 1 and NULL_TREE instead of 0.
5076
aa256c4a
MP
50772015-09-14 Marek Polacek <polacek@redhat.com>
5078
5079 * c-typeck.c (set_nonincremental_init_from_string): Use
5080 HOST_WIDE_INT_M1U when shifting a negative value.
5081
dbb68221
MW
50822015-09-09 Mark Wielaard <mjw@redhat.com>
5083
5084 * c-typeck.c (build_binary_op): Check and warn when nonnull arg
5085 parm against NULL.
5086
a8a098ac
JJ
50872015-09-10 Jakub Jelinek <jakub@redhat.com>
5088
5089 PR c/67502
5090 * c-parser.c (c_parser_omp_for_loop): Emit DECL_EXPR stmts
5091 into OMP_FOR_PRE_BODY rather than before the loop.
5092
f4b189d5
JJ
50932015-09-09 Jakub Jelinek <jakub@redhat.com>
5094
0bb99c11
JJ
5095 PR c/67501
5096 * c-parser.c (c_parser_oacc_all_clauses,
5097 c_parser_omp_all_clauses): Remove invalid clause from
5098 list of clauses even if parser->error is set.
5099
fce5e5e3
JJ
5100 PR c/67500
5101 * c-parser.c (c_parser_omp_clause_aligned,
5102 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen): Fix up
5103 test for errors.
5104 * c-decl.c (temp_pop_parm_decls): Allow b->decl equal to
5105 error_mark_node.
5106
f4b189d5
JJ
5107 PR c/67495
5108 * c-parser.c (c_parser_omp_atomic): Use c_parser_cast_expression
5109 instead of c_parser_unary_expression. If the result is !lvalue_p,
5110 wrap the result of c_fully_fold into NON_LVALUE_EXPR.
5111
b2aaf235
MP
51122015-09-04 Marek Polacek <polacek@redhat.com>
5113
5114 PR sanitizer/67279
5115 * c-typeck.c (build_binary_op): Don't instrument static initializers.
5116
1807ffc1
MS
51172015-09-03 Martin Sebor <msebor@redhat.com>
5118
5119 PR c/66516
8b652e65
JJ
5120 * c-typeck.c (convert_arguments, parser_build_unary_op,
5121 build_conditional_expr, c_cast_expr, convert_for_assignment,
5122 build_binary_op, _objc_common_truthvalue_conversion): Call
1807ffc1
MS
5123 reject_gcc_builtin.
5124 (c_decl_implicit): Define.
5125
d04ff417
MP
51262015-09-02 Marek Polacek <polacek@redhat.com>
5127
5128 PR c/67432
5129 * c-parser.c (c_parser_enum_specifier): Give a better error for
5130 an empty enum.
5131
a79683d5
TS
51322015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
5133
5134 * c-aux-info.c, c-parser.c, c-tree.h: Remove useless typedefs.
5135
191a6b94
MP
51362015-08-12 Marek Polacek <polacek@redhat.com>
5137
5138 * c-decl.c (grokdeclarator): Call error_at instead of error and pass
5139 LOC to it.
5140
420a9d9b
MP
51412015-08-03 Marek Polacek <polacek@redhat.com>
5142
5143 PR c/67088
5144 * c-decl.c (check_bitfield_type_and_width): Add location parameter.
5145 Use it.
5146 (grokdeclarator): Pass LOC down to check_bitfield_type_and_width.
5147
992118a1
PP
51482015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
5149
5150 * c-parser.c (c_parser_if_body): Take token_indent_info
5151 argument. Call warn_for_misleading_indentation even when the
5152 body is a semicolon. Extract token_indent_infos corresponding
5153 to the guard, body and next tokens. Adjust call to
5154 warn_for_misleading_indentation accordingly.
5155 (c_parser_else_body): Likewise.
5156 (c_parser_if_statement): Likewise.
5157 (c_parser_while_statement): Likewise.
5158 (c_parser_for_statement): Likewise.
5159
46308474
LFSM
51602015-07-28 Luis Felipe Strano Moraes <luis.strano@gmail.com>
5161 Manuel López-Ibáñez <manu@gcc.gnu.org>
5162
5163 * c-decl.c (get_parm_info): Remove static var. Update warning
5164 message.
5165
05b28fd6
MP
51662015-07-27 Marek Polacek <polacek@redhat.com>
5167
5168 PR c++/66555
5169 PR c/54979
5170 * c-typeck.c (parser_build_binary_op): Call warn_tautological_cmp.
5171
451b5e48
MP
51722015-07-20 Marek Polacek <polacek@redhat.com>
5173
5174 PR c++/55095
5175 * c-typeck.c (digest_init): Pass OPT_Wpedantic to pedwarn_init.
5176 (build_binary_op): Warn about left shift overflows.
5177
1916bcb5
AM
51782015-07-09 Andrew MacLeod <amacleod@redhat.com>
5179
5180 * c-array-notation.c: Adjust includes for flags.h changes.
5181 * c-objc-common.c: Likewise.
5182
c7131fb2
AM
51832015-07-07 Andrew MacLeod <amacleod@redhat.com>
5184
5185 * c-array-notation.c: Adjust includes.
5186 * c-aux-info.c: Likewise.
5187 * c-convert.c: Likewise.
5188 * c-decl.c: Likewise.
5189 * c-errors.c: Likewise.
5190 * c-lang.c: Likewise.
5191 * c-objc-common.c: Likewise.
5192 * c-parser.c: Likewise.
5193 * c-typeck.c: Likewise.
5194
da2e71c9
MLI
51952015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
5196
5197 PR fortran/66605
5198 * c-decl.c (finish_function): Call do_warn_unused_parameter.
5199
b155cfd9
MP
52002015-06-29 Marek Polacek <polacek@redhat.com>
5201
5202 PR c/66322
5203 * c-typeck.c (struct c_switch): Add BOOL_COND_P and OUTSIDE_RANGE_P.
5204 (c_start_case): Set BOOL_COND_P and OUTSIDE_RANGE_P. Don't warn
5205 about -Wswitch-bool here.
5206 (do_case): Update c_add_case_label call.
5207 (c_finish_case): Update c_do_switch_warnings call.
5208
31521951
MP
52092015-06-27 Marek Polacek <polacek@redhat.com>
5210
5211 * c-typeck.c: Use VECTOR_TYPE_P throughout.
5212
22d03525
MP
52132015-06-26 Marek Polacek <polacek@redhat.com>
5214
5215 * c-array-notation.c (fix_builtin_array_notation_fn): Use
5216 INDIRECT_REF_P.
5217 * c-typeck.c (array_to_pointer_conversion): Likewise.
5218 (build_unary_op): Likewise.
5219 (c_finish_return): Likewise.
5220
f0889939
AM
52212015-06-25 Andrew MacLeod <amacleod@redhat.com>
5222
5223 * c-decl.c: Remove ipa-ref.h and plugin-api.h from include list.
5224 * c-parser.c: Likewise.
5225
8d67ee55
RS
52262015-06-25 Richard Sandiford <richard.sandiford@arm.com>
5227
5228 * c-decl.c (detect_field_duplicates_hash): Use nofree_ptr_hash
5229 instead of pointer_hash.
5230 (detect_field_duplicates): Likewise.
5231
0ae9bd27
MP
52322015-06-25 Marek Polacek <polacek@redhat.com>
5233
5234 * c-array-notation.c: Use VAR_P throughout.
5235 * c-decl.c: Likewise.
5236 * c-objc-common.c: Likewise.
5237 * c-parser.c: Likewise.
5238 * c-typeck.c: Likewise.
5239
62f9079a
MP
52402015-06-25 Marek Polacek <polacek@redhat.com>
5241
5242 * c-decl.c: Use is_global_var throughout.
5243 * c-parser.c: Likewise.
5244 * c-typeck.c: Likewise.
5245
abb226c9
AM
52462015-06-17 Andrew MacLeod <amacleod@redhat.com>
5247
5248 * c-array-notation.c: Do not include input.h, line-map.h or is-a.h.
5249 * c-aux-info.c: Likewise.
5250 * c-convert.c: Likewise.
5251 * c-decl.c: Likewise.
5252 * c-errors.c: Likewise.
5253 * c-lang.c: Likewise.
5254 * c-objc-common.c: Likewise.
5255 * c-parser.c: Likewise.
5256 * c-typeck.c: Likewise.
5257
8cbababc
JH
52582015-06-11 Jan Hubicka <hubicka@ucw.cz>
5259
5260 PR middle-end/66325
5261 * c-decl.c (start_enum): Set TYPE_PACKED consistently among type
5262 variants.
5263
a0349665
PMR
52642015-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
5265
5266 * c-decl.c (pop_scope): Register the main translation unit
5267 through the new debug hook.
5268
13fdf2e2
AM
52692015-06-08 Andrew MacLeod <amacleod@redhat.com>
5270
5271 * c-array-notation.c : Adjust include files.
5272 * c-aux-info.c : Likewise.
5273 * c-convert.c : Likewise.
5274 * c-decl.c : Likewise.
5275 * c-errors.c : Likewise.
5276 * c-lang.c : Likewise.
5277 * c-lang.h : Likewise.
5278 * c-objc-common.c : Likewise.
5279 * c-parser.c : Likewise.
5280 * c-typeck.c : Likewise.
5281
d7438551
AH
52822015-06-05 Aldy Hernandez <aldyh@redhat.com>
5283
5284 * c-decl.c (finish_struct): Save C_TYPE_INCOMPLETE_VARS and
5285 immediately clobber it.
5286 (c_write_global_declarations_1): Remove call to
5287 check_global_declaration_1.
5288 (c_write_global_declarations_2): Remove.
5289 (c_write_final_cleanups): Rename from c_write_global_declarations.
5290 Remove call to finalize_compilation_unit.
5291 Remove calls to debugging hooks.
5292 * c-objc-common.c: Adjust comment for c_warn_unused_global_decl.
5293 * c-objc-common.h: Remove LANG_HOOKS_WRITE_GLOBALS.
5294 * c-tree.h: Remove c_write_global_declarations.
5295
ecb9f223
AM
52962015-06-04 Andrew MacLeod <amacleod@redhat.com>
5297
5298 * c-array-notation.c: Adjust includes for restructured coretypes.h.
5299 * c-aux-info.c: Likewise.
5300 * c-convert.c: Likewise.
5301 * c-decl.c: Likewise.
5302 * c-errors.c: Likewise.
5303 * c-lang.c: Likewise.
5304 * c-objc-common.c: Likewise.
5305 * c-parser.c: Likewise.
5306 * c-typeck.c: Likewise.
5307
9482b620
MP
53082015-06-04 Marek Polacek <polacek@redhat.com>
5309
5310 PR c/66341
5311 * c-typeck.c (build_c_cast): Wrap VALUE into NON_LVALUE_EXPR if
5312 it is a lvalue.
5313
bc51ace3
PK
53142015-06-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
5315
5316 * c-decl.c (warn_cxx_compat_finish_struct): New parameters code, record_loc.
5317 Warn for empty struct.
5318 (finish_struct): Pass TREE_CODE(t) and loc to warn_cxx_compat_finish_struct.
5319
ea5b45b6
AT
53202015-06-02 Andres Tiraboschi <andres.tiraboschi@tallertechnologies.com>
5321
5322 * c-decl.c (start_function): Call plugin before parsing.
5323 (finish_function): Call plugin after parsing.
5324
c2d47482
PK
53252015-06-02 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
5326
5327 PR c/49551
5328 * c-decl.c (merge_decls): Merge DECL_COMMON.
5329
a95492ab
JW
53302015-05-22 Jim Wilson <jim.wilson@linaro.org>
5331
5332 * Make-lang.in (check_gcc_pallelize): Define.
5333
fd5c817a
MP
53342015-05-22 Marek Polacek <polacek@redhat.com>
5335
5336 PR c/47043
5337 * c-parser.c (c_parser_enum_specifier): Parse and apply enumerator
5338 attributes.
5339
c7b70a3c
MP
53402015-05-21 Marek Polacek <polacek@redhat.com>
5341
5342 * c-typeck.c (inform_declaration): Use DECL_IS_BUILTIN instead of
5343 DECL_BUILT_IN.
5344
21b634ae
MP
53452015-05-20 Marek Polacek <polacek@redhat.com>
5346
5347 * c-decl.c: Use VAR_OR_FUNCTION_DECL_P throughout.
5348 * c-typeck.c: Likewise.
5349
296a8c2f
MP
53502015-05-19 Marek Polacek <polacek@redhat.com>
5351
5352 * c-typeck.c (start_init): Use AGGREGATE_TYPE_P.
5353
41b37d5e
JJ
53542015-05-19 Jakub Jelinek <jakub@redhat.com>
5355
5356 PR middle-end/66199
5357 * c-parser.c (c_parser_omp_for_loop): Don't add
5358 OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
5359 OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
5360 (c_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
5361 constructs.
5362
fab27f52
MM
53632015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
5364
5365 * c-typeck.c (build_array_ref): Use std::swap instead of explicit
296a8c2f 5366 swaps.
fab27f52 5367
40de31cf
MLI
53682015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
5369
5370 PR fortran/44054
5371 * c-objc-common.c (c_tree_printer): Replace locus pointer with
5372 accessor function.
5373
3aa3c9fc
MP
53742015-05-14 Marek Polacek <polacek@redhat.com>
5375
5376 PR c/66066
5377 PR c/66127
5378 * c-typeck.c (digest_init): Call pedwarn_init with OPT_Wpedantic
5379 rather than with 0.
5380
c3388e62
DM
53812015-05-12 David Malcolm <dmalcolm@redhat.com>
5382
5383 * c-parser.c (c_parser_if_body): Add param "if_loc", use it
5384 to add a call to warn_for_misleading_indentation.
5385 (c_parser_else_body): Likewise, adding param "else_loc".
5386 (c_parser_if_statement): Check for misleading indentation.
5387 (c_parser_while_statement): Likewise.
5388 (c_parser_for_statement): Likewise.
5389
755e528f
MP
53902015-05-08 Marek Polacek <polacek@redhat.com>
5391
5392 PR c/64918
5393 * c-typeck.c (add_pending_init): Use OPT_Woverride_init_side_effects.
5394 (output_init_element): Likewise.
5395
0173bd2a
MP
53962015-05-07 Marek Polacek <polacek@redhat.com>
5397
5398 PR c/65179
5399 * c-typeck.c (build_binary_op): Warn when left shifting a negative
5400 value.
5401
9babc352
MP
54022015-04-30 Marek Polacek <polacek@redhat.com>
5403
5404 * c-typeck.c (set_init_label): Call error_at instead of error and
5405 pass LOC to it.
5406
ac9f18db
MP
5407 * c-typeck.c (c_incomplete_type_error): Refactor to use %qT. Print
5408 the type of a decl.
5409
ec3fba51
MP
5410 * c-typeck.c (c_build_va_arg): Clarify the error message.
5411
b811915d
TS
54122015-04-29 Thomas Schwinge <thomas@codesourcery.com>
5413
5414 * c-parser.c (c_parser_oacc_enter_exit_data): Use
5415 OMP_STANDALONE_CLAUSES.
5416
f3075008
MP
54172015-04-28 Marek Polacek <polacek@redhat.com>
5418
5419 * c-parser.c (c_parser_binary_expression): Remove duplicate line.
5420
4e81b788
MP
54212015-04-28 Marek Polacek <polacek@redhat.com>
5422
5423 PR c/65901
5424 * c-typeck.c (c_build_va_arg): Require TYPE be a complete type.
5425
6c1db78e
MP
54262015-04-25 Marek Polacek <polacek@redhat.com>
5427
5428 PR c/52085
5429 * c-decl.c (finish_enum): Copy over TYPE_ALIGN. Also check for "mode"
5430 attribute.
5431
5c4abbb8
MP
54322015-04-23 Marek Polacek <polacek@redhat.com>
5433
5434 PR c/65345
5435 * c-decl.c (set_labels_context_r): New function.
5436 (store_parm_decls): Call it via walk_tree_without_duplicates.
5437 * c-typeck.c (convert_lvalue_to_rvalue): Use create_tmp_var_raw
5438 instead of create_tmp_var. Build TARGET_EXPR instead of
5439 COMPOUND_EXPR.
5440 (build_atomic_assign): Use create_tmp_var_raw instead of
5441 create_tmp_var. Build TARGET_EXPRs instead of MODIFY_EXPR.
5442
06aca1d5
IV
54432015-04-20 Ilya Verbin <ilya.verbin@intel.com>
5444
5445 * c-parser.c (c_parser_oacc_enter_exit_data): Remove excess semicolon.
5446 (c_parser_omp_target_update): Add missed %> to error_at ().
5447
8fba1830
BRF
54482015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
5449
5450 PR target/55143
5451 * c-decl.c (c_default_pointer_mode): Remove definition.
5452 * c-tree.h (c_default_pointer_mode): Remove declaration.
5453
62021f64
TB
54542015-03-27 Tobias Burnus <burnus@net-b.de>
5455
5456 PR c/65586
5457 * c-parser.c (c_parser_skip_to_pragma_eol): Optionally, don't
5458 error out.
5459 (c_parser_omp_for, c_parser_omp_parallel, c_parser_omp_distribute,
5460 c_parser_omp_teams, c_parser_omp_target, c_parser_omp_declare):
5461 Update calls to not error for skipped omp pragmas with -fopenmp-simd.
5462
9b65e171
JJ
54632015-03-19 Jakub Jelinek <jakub@redhat.com>
5464
5465 * c-decl.c (c_decl_attributes): Also add "omp declare target"
5466 attribute for DECL_EXTERNAL VAR_DECLs.
5467
17958621
JJ
54682015-03-11 Jakub Jelinek <jakub@redhat.com>
5469
5470 * c-parser.c (c_parse_init): Don't call xstrdup on get_identifier
5471 argument.
5472
7ccb1a11
JJ
54732015-03-10 Jakub Jelinek <jakub@redhat.com>
5474
5475 PR c/65120
5476 * c-typeck.c (parser_build_binary_op): Check for tcc_comparison
5477 before preparing arguments to warn_logical_not_parentheses.
5478
01177669
JJ
54792015-03-09 Jakub Jelinek <jakub@redhat.com>
5480
5481 PR c/65120
5482 * c-typeck.c (parser_build_binary_op): Don't warn for
5483 !!x == y or !b == y where b is _Bool.
5484
802ac282
MP
54852015-03-09 Marek Polacek <polacek@redhat.com>
5486
5487 * c-convert.c (convert): Make use of do_ubsan_in_current_function.
5488 * c-decl.c (grokdeclarator): Likewise.
5489 * c-typeck.c (build_binary_op): Likewise.
5490
e5165b60
MP
54912015-02-27 Marek Polacek <polacek@redhat.com>
5492
5493 PR c/65228
5494 * c-decl.c (start_decl): Return NULL_TREE if decl is an error node.
5495
065d214c
MP
54962015-02-14 Marek Polacek <polacek@redhat.com>
5497
5498 PR c/64768
5499 * c-decl.c (grokdeclarator): Set the range of a flexible array member
5500 declared through a typedef name.
5501
e5d9235b
MP
55022015-02-13 Marek Polacek <polacek@redhat.com>
5503
5504 PR c/65050
5505 * c-decl.c (grokdeclarator): Print also the type when giving
5506 the error message about array's incomplete element type.
5507
fa01ffcc
JJ
55082015-02-11 Jakub Jelinek <jakub@redhat.com>
5509
5510 PR c/64824
5511 * c-parser.c (c_parser_binary_expression): Fix OpenMP stack[sp].prec
5512 check in the POP macro.
5513
c3e38a03
MP
55142015-02-09 Marek Polacek <polacek@redhat.com>
5515
5516 PR c/64856
5517 * c-typeck.c (process_init_element): Don't always wrap
5518 COMPOUND_LITERAL_EXPR in a SAVE_EXPR in C99 mode when
5519 initializing a range of elements.
5520
4886ec8e
JJ
55212015-02-04 Jakub Jelinek <jakub@redhat.com>
5522
5523 PR c/64824
5524 PR c/64868
5525 * c-parser.c (c_parser_omp_atomic): Handle RDIV_EXPR.
5526
c3e38a03 55272015-02-02 Bruno Loff <bruno.loff@gmail.com>
a4bb6959
BL
5528
5529 * c-parser.c (c_parser_declspecs): Call invoke_plugin_callbacks after
5530 processing enum declaration.
5531
7b33f0c8
MP
55322015-01-29 Marek Polacek <polacek@redhat.com>
5533
5534 PR c/64709
5535 * c-typeck.c (pop_init_level): If constructor_elements has
5536 exactly one element with integer_zerop value, set constructor_zeroinit
5537 to 1. Remove braces around warning_init call.
5538
dea63e49
JJ
55392015-01-27 Jakub Jelinek <jakub@redhat.com>
5540
5541 PR c/64766
5542 * c-typeck.c (store_init_value): Don't overwrite DECL_INITIAL
5543 of FUNCTION_DECLs with error_mark_node.
5544
d38f7dce
JJ
55452015-01-26 Jakub Jelinek <jakub@redhat.com>
5546
5547 PR c/64778
5548 * c-typeck.c (convert_arguments): Return -1 if there are
5549 error_args, even if we've diagnosed too many arguments.
5550
cbf5d0e7
RB
55512015-01-21 Richard Biener <rguenther@suse.de>
5552
5553 PR middle-end/64313
5554 * c-decl.c (merge_decls): Call set_builtin_decl_declared_p
5555 for builtins the user declared correctly.
5556
41dbbb37
TS
55572015-01-15 Thomas Schwinge <thomas@codesourcery.com>
5558 Bernd Schmidt <bernds@codesourcery.com>
5559 Cesar Philippidis <cesar@codesourcery.com>
5560 James Norris <jnorris@codesourcery.com>
5561 Jakub Jelinek <jakub@redhat.com>
5562 Ilmir Usmanov <i.usmanov@samsung.com>
5563
5564 * c-parser.c: Include "gomp-constants.h".
5565 (c_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
5566 omp_clause_map_kind. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
5567 Use OMP_CLAUSE_SET_MAP_KIND.
5568 (c_parser_pragma): Handle PRAGMA_OACC_ENTER_DATA,
5569 PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_UPDATE.
5570 (c_parser_omp_construct): Handle PRAGMA_OACC_CACHE,
5571 PRAGMA_OACC_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP,
5572 PRAGMA_OACC_PARALLEL, PRAGMA_OACC_WAIT.
5573 (c_parser_omp_clause_name): Handle "auto", "async", "copy",
5574 "copyout", "create", "delete", "deviceptr", "gang", "host",
5575 "num_gangs", "num_workers", "present", "present_or_copy", "pcopy",
5576 "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
5577 "present_or_create", "pcreate", "seq", "self", "vector",
5578 "vector_length", "wait", "worker".
5579 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
5580 (OACC_ENTER_DATA_CLAUSE_MASK, OACC_EXIT_DATA_CLAUSE_MASK)
5581 (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
5582 (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
5583 (c_parser_omp_variable_list): Handle OMP_CLAUSE__CACHE_.
5584 (c_parser_oacc_wait_list, c_parser_oacc_data_clause)
5585 (c_parser_oacc_data_clause_deviceptr)
5586 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_workers)
5587 (c_parser_oacc_clause_async, c_parser_oacc_clause_wait)
5588 (c_parser_omp_clause_vector_length, c_parser_oacc_all_clauses)
5589 (c_parser_oacc_cache, c_parser_oacc_data, c_parser_oacc_kernels)
5590 (c_parser_oacc_enter_exit_data, c_parser_oacc_loop)
5591 (c_parser_oacc_parallel, c_parser_oacc_update)
5592 (c_parser_oacc_wait): New functions.
5593 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels)
5594 (c_finish_oacc_data): New prototypes.
5595 * c-typeck.c: Include "gomp-constants.h".
5596 (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR. Use
5597 GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use
5598 OMP_CLAUSE_SET_MAP_KIND.
5599 (c_finish_oacc_parallel, c_finish_oacc_kernels)
5600 (c_finish_oacc_data): New functions.
5601 (c_finish_omp_clauses): Handle OMP_CLAUSE__CACHE_,
5602 OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS,
5603 OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_ASYNC, OMP_CLAUSE_WAIT,
5604 OMP_CLAUSE_AUTO, OMP_CLAUSE_SEQ, OMP_CLAUSE_GANG,
5605 OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR, and OMP_CLAUSE_MAP's
5606 GOMP_MAP_FORCE_DEVICEPTR.
5607
adfac8df
JJ
56082015-01-09 Michael Collison <michael.collison@linaro.org>
5609
5610 * c-array-notation.c: Include hash-set.h, machmode.h,
5611 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
5612 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
5613 * c-aux-info.c: Ditto.
5614 * c-convert.c: Ditto.
5615 * c-decl.c: Ditto.
5616 * c-errors.c: Ditto.
5617 * c-lang.c: Dittoxs.
5618 * c-objc-common.c: Ditto.
5619 * c-parser.c: Ditto.
5620 * c-typeck.c: Include hash-set.h, machmode.h,
5621 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
5622 fold-const.h, wide-int.h, inchash.h, real.h and
5623 fixed-value.h due to flattening of tree.h.
5624
2cc901dc
MP
56252015-01-07 Marek Polacek <polacek@redhat.com>
5626
5627 PR c/64417
5628 * c-typeck.c (process_init_element): Disallow initialization of
5629 a flexible array member with a string constant if the structure
5630 is in an array.
5631
5624e564
JJ
56322015-01-05 Jakub Jelinek <jakub@redhat.com>
5633
e5341100
JJ
5634 PR sanitizer/64344
5635 * c-typeck.c (convert_for_assignment, c_finish_return): For
5636 -fsanitize=float-cast-overflow casts from REAL_TYPE to integer/enum
5637 types also set in_late_binary_op around convert call.
5638 * c-convert.c (convert): For -fsanitize=float-cast-overflow REAL_TYPE
5639 to integral type casts, if not in_late_binary_op, pass c_fully_fold
5640 result on expr as last argument to ubsan_instrument_float_cast,
5641 if in_late_binary_op, don't use c_save_expr but save_expr.
5642
5624e564
JJ
5643 Update copyright years.
5644
5bd012f8
MP
56452015-01-05 Marek Polacek <polacek@redhat.com>
5646
5647 PR c/64423
5648 * c-typeck.c (build_array_ref): Pass loc down to
5649 warn_array_subscript_with_type_char.
5650
3f8257db 56512014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
768952be
MU
5652
5653 * c-typeck.c: New behavious for pointers to arrays with qualifiers
8e745a17 5654 (common-pointer-type): For pointers to arrays take qualifiers from
768952be 5655 element type.
8e745a17 5656 (build_conditional_expr): Add warnings for lost qualifiers.
768952be 5657 (comp-target-types): Allow pointers to arrays with different qualifiers.
8e745a17 5658 (convert-for-assignment): Adapt warnings for discarded qualifiers. Add
768952be 5659 WARNING_FOR_QUALIFIERS macro and rename WARN_FOR_QUALIFIERS
8e745a17 5660 to PEDWARN_FOR_QUALIFIERS.
768952be 5661
8f94a8c4
JJ
56622014-12-17 Jakub Jelinek <jakub@redhat.com>
5663
5664 PR sanitizer/64289
5665 * c-convert.c: Include ubsan.h.
5666 (convert): For real -> integral casts and
5667 -fsanitize=float-cast-overflow don't call convert_to_integer, but
5668 instead instrument the float cast directly.
5669
b731b390
JJ
56702014-11-29 Jakub Jelinek <jakub@redhat.com>
5671
5672 * c-typeck.c (convert_lvalue_to_rvalue, build_atomic_assign,
5673 c_finish_stmt_expr): Remove NULL last argument from
5674 create_tmp_var_raw and create_tmp_var calls.
5675 * c-array-notation.c (fix_builtin_array_notation_fn,
5676 build_array_notation_expr, fix_conditional_array_notations_1,
5677 fix_array_notation_expr, fix_array_notation_call_expr): Likewise.
5678
541e35a6
MP
56792014-11-28 Marek Polacek <polacek@redhat.com>
5680
5681 PR c/63862
5682 * c-typeck.c (build_binary_op) <RSHIFT_EXPR, LSHIFT_EXPR>: Don't
5683 convert the right operand to integer type.
5684
b286be94
MP
56852014-11-25 Marek Polacek <polacek@redhat.com>
5686
5687 PR c/63877
5688 * c-decl.c (start_function): Disable -Wmissing-declarations warning
5689 for inline functions.
5690
aa7da51a
JJ
56912014-11-21 Jakub Jelinek <jakub@redhat.com>
5692
5693 PR target/63764
5694 * c-typeck.c (build_array_ref): Adjust
5695 convert_vector_to_pointer_for_subscript caller. If it returns true,
5696 call non_lvalue_loc on the result.
5697
d876207f
RB
56982014-11-11 Richard Biener <rguenther@suse.de>
5699
5700 * c-decl.c (c_init_decl_processing): Do not set pedantic_lvalues
5701 to true.
5702
e5e44252
AK
57032014-11-10 Andi Kleen <ak@linux.intel.com>
5704
5705 PR c/60804
5706 * c-parser.c (c_parser_statement_after_labels): Call
5707 check_no_cilk.
5708 (c_parser_if_statement): Dito.
5709 (c_parser_switch_statement): Dito.
5710 (c_parser_while_statement): Dito.
5711 (c_parser_do_statement): Dito.
5712 (c_parser_for_statement): Dito.
5713 * c-typeck.c (c_finish_loop): Dito.
5714
13c21655
PC
57152014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
5716
5717 * c-typeck.c (build_binary_op): Use OPT_Wshift_count_negative and
5718 OPT_Wshift_count_overflow in the warnings.
5719
2d51fcef
MP
57202014-10-30 Marek Polacek <polacek@redhat.com>
5721
5722 * c-objc-common.c (c_tree_printer) <case 'T'>: For a typedef name,
5723 print the stripped version as well, if they're not the same.
5724
ef4bddc2
RS
57252014-10-29 Richard Sandiford <richard.sandiford@arm.com>
5726
5727 * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from
5728 machine_mode.
5729
c582198b
AM
57302014-10-28 Andrew MacLeod <amacleod@redhat.com>
5731
5732 * c-decl.c: Adjust include files.
5733 * c-parser.c: Ditto.
5734
ddc8de03
PM
57352014-10-27 Phil Muldoon <pmuldoon@redhat.com>
5736 Tom Tromey <tromey@redhat.com>
5737
5738 * c-tree.h (enum c_oracle_request): New.
5739 (c_binding_oracle_function): New typedef.
5740 (c_binding_oracle, c_pushtag, c_bind): Declare.
5741 * c-decl.c (c_binding_oracle): New global.
5742 (I_SYMBOL_CHECKED): New macro.
5743 (i_symbol_binding): New function.
5744 (I_SYMBOL_BINDING, I_SYMBOL_DECL): Redefine.
5745 (I_TAG_CHECKED): New macro.
5746 (i_tag_binding): New function.
5747 (I_TAG_BINDING, I_TAG_DECL): Redefine.
5748 (I_LABEL_CHECKED): New macro.
5749 (i_label_binding): New function.
5750 (I_LABEL_BINDING, I_LABEL_DECL): Redefine.
5751 (c_print_identifier): Save and restore c_binding_oracle.
5752 (c_pushtag, c_bind): New functions.
5753
60393bbc
AM
57542014-10-27 Andrew MacLeod <amacleod@redhat.com>
5755
5756 * c-typeck.c: Adjust include files.
5757
d723bb7c
MLI
57582014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
5759
5760 PR c++/53061
5761 * c-objc-common.c (c_objc_common_init): Do not do diagnostics
5762 initialization here...
5763 (c_initialize_diagnostics): ... but here. Set defaults after
5764 building pretty-printer.
5765
1bc5a451
MP
57662014-10-23 Marek Polacek <polacek@redhat.com>
5767
5768 PR c/63626
5769 * c-decl.c (pop_scope): Don't print warning in external_scope.
5770
4435bb92
MP
57712014-10-19 Marek Polacek <polacek@redhat.com>
5772
5773 PR c/63567
5774 * c-typeck.c (output_init_element): Allow initializing objects with
5775 static storage duration with compound literals even in C99 and add
5776 pedwarn for it.
5777
7278465e
MP
57782014-10-17 Marek Polacek <polacek@redhat.com>
5779
5780 PR c/63567
5781 * c-typeck.c (digest_init): Allow initializing objects with static
5782 storage duration with compound literals even in C99 and add pedwarn
5783 for it.
5784
d9b7be2e
MP
57852014-10-17 Marek Polacek <polacek@redhat.com>
5786
5787 PR c/63543
5788 * c-tree.h (C_TYPE_ERROR_REPORTED): Define.
5789 * c-typeck.c (build_indirect_ref): Don't print the "dereferencing..."
5790 error multiple times. Print the type.
5791
f406ae1f
MP
57922014-10-17 Marek Polacek <polacek@redhat.com>
5793
5794 PR c/63549
5795 * c-typeck.c (build_array_ref): Bail if the index in an incomplete
5796 type.
5797
92574c7c
MP
57982014-10-17 Marek Polacek <polacek@redhat.com>
5799
5800 * c-decl.c (grokdeclarator): Use OPT_Wimplicit_int unconditionally.
5801 (start_function): Use OPT_Wimplicit_int instead of 0.
5802 (store_parm_decls_oldstyle): Likewise.
5803
1bc4a978
MT
58042014-10-17 Alan Modra <amodra@gmail.com>
5805
5806 PR middle-end/61848
5807 * c-decl.c (merge_decls): Don't merge section name or tls model
5808 to newdecl symtab node, instead merge to olddecl. Override
5809 existing olddecl section name. Set tls_model for all thread-local
5810 vars, not just OMP thread-private ones. Remove incorrect comment.
5811
83685514
AM
58122014-10-16 Andrew MacLeod <amacleod@redhat.com>
5813
5814 * c-decl.c: Adjust include files.
5815
78a7c317
DD
58162014-10-14 DJ Delorie <dj@redhat.com>
5817
5818 * c-parser.c (c_parse_init): Add RID entries for each __intN.
5819 (c_token_starts_typename): Check all __intN, not just __int128.
5820 (c_token_starts_declspecs): Likewise.
5821 (c_parser_declspecs): Likewise.
5822 (c_parser_attribute_any_word): Likewise.
5823 (c_parser_objc_selector): Likewise.
5824 * c-tree.h (c_typespec_keyword): cts_int128 -> cts_int_n.
5825 (struct c_declspecs): Add int_n_idx field to record *which* __intN
5826 is specified.
5827 * c-decl.c (declspecs_add_type): Check for all __intN, not just
5828 __int128.
5829 (finish_declspecs): Likewise.
5830
74d98c1e
AB
58312014-10-13 Anthony Brandon <anthony.brandon@gmail.com>
5832
8e745a17 5833 * c-parser.c (c_parser_all_labels): New function to replace
74d98c1e 5834 the duplicate code.
8e745a17 5835 (c_parser_statement): Call the new function.
74d98c1e 5836
84937de2
MP
58372014-10-09 Marek Polacek <polacek@redhat.com>
5838
5839 PR c/63480
5840 * c-typeck.c (pop_init_level): Don't warn about initializing
5841 with { }.
5842
0382aaa0
MP
58432014-10-07 Marek Polacek <polacek@redhat.com>
5844
5845 PR c/59717
5846 * c-decl.c (header_for_builtin_fn): New function.
5847 (implicitly_declare): Suggest which header to include.
5848
7a0ca710
MP
58492014-10-07 Marek Polacek <polacek@redhat.com>
5850
5851 * c-convert.c (convert): Use error_operand_p.
5852 * c-typeck.c (require_complete_type): Likewise.
5853 (really_atomic_lvalue): Likewise.
5854 (digest_init): Likewise.
5855 (handle_omp_array_sections_1): Likewise.
5856
6bc8a126
MP
58572014-10-03 Marek Polacek <polacek@redhat.com>
5858
5859 PR c/63453
5860 * c-decl.c (pop_scope): Don't warn about "inline function declared
5861 but never defined" for functions marked with gnu_inline attribute.
5862
d90c0a59
JJ
58632014-09-25 Jakub Jelinek <jakub@redhat.com>
5864
5865 PR c++/63249
5866 * c-parser.c (c_parser_omp_variable_list): Call mark_exp_read
5867 on low_bound and length.
5868
083e891e
MP
58692014-09-24 Marek Polacek <polacek@redhat.com>
5870
5871 PR c/61405
5872 PR c/53874
5873 * c-parser.c: Don't define CPP_KEYWORD.
5874 (c_parser_switch_statement): Pass original type to c_finish_case.
5875 * c-tree.h (c_finish_case): Update declaration.
5876 * c-typeck.c (c_finish_case): Add TYPE parameter. Pass it
5877 conditionally to c_do_switch_warnings.
5878
8d95fe25
MP
58792014-09-03 Marek Polacek <polacek@redhat.com>
5880
5881 PR c/62024
5882 * c-parser.c (c_parser_static_assert_declaration_no_semi): Strip no-op
5883 conversions.
5884
9a771876
JJ
58852014-09-02 Jakub Jelinek <jakub@redhat.com>
5886 Balaji V. Iyer <balaji.v.iyer@intel.com>
5887 Igor Zamyatin <igor.zamyatin@intel.com>
5888
5889 * c-parser.c (c_parser_cilk_for): New function.
5890 (c_parser_cilk_grainsize): Likewise.
5891 (c_get_temp_regvar): Likewise.
5892 (c_parser_statement_after_labels): Added RID_CILK_FOR case.
5893 (c_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
5894 (c_parser_omp_for_loop): Added CILK_FOR and CILK_SIMD checks.
5895 * c-typeck.c (c_finish_omp_clauses): Added OMP_CLAUSE__CILK_FOR_COUNT_
5896 case.
5897
b7679d96
CG
58982014-08-27 Chen Gang <gang.chen.5i5j@gmail.com>
5899
5900 * c-aux-info.c (gen_type): Resize 'buff' from 10 to 23 bytes,
5901 with using HOST_WIDE_INT without truncation to 'int'
5902
59ea0364
MP
59032014-08-22 Marek Polacek <polacek@redhat.com>
5904
5905 PR c++/62199
5906 * c-typeck.c (parser_build_binary_op): Adjust call to
5907 warn_logical_not_parentheses.
5908
671a475e
IZ
59092014-08-22 Igor Zamyatin <igor.zamyatin@intel.com>
5910
5911 PR other/62008
5912 * c-parser.c (c_parser_array_notation): Check for correct
5913 type of an array added.
5914
04159acf
MP
59152014-08-19 Marek Polacek <polacek@redhat.com>
5916
5917 PR c++/62153
5918 * c-typeck.c (build_binary_op): If either operand of a comparison
5919 is a boolean expression, call maybe_warn_bool_compare.
5920
c77935ee
PP
59212014-08-19 Patrick Palka <ppalka@gcc.gnu.org>
5922
5923 PR c/45584
5924 * c-typeck.c (build_c_cast): Do a conversion even when the
5925 TYPE_MAIN_VARIANTs are the same.
5926
35aff4fb
MP
59272014-08-19 Marek Polacek <polacek@redhat.com>
5928
5929 * c-decl.c (diagnose_mismatched_decls): Unconditionally call
5930 pedwarn_c99 instead of pedwarn.
5931 (grokfield): Likewise.
5932 (warn_defaults_to): New function.
5933 (grokdeclarator): Call warn_defaults_to instead of pedwarn_c99.
5934 Unconditionally call pedwarn_c99 instead of pedwarn.
5935 (start_function): Call warn_defaults_to instead of pedwarn_c99.
5936 (declspecs_add_scspec): Call pedwarn_c99 instead of pedwarn, don't
5937 check flag_isoc11 before.
5938 * c-errors.c (pedwarn_c99): Change the return type to bool.
5939 Handle -Wc99-c11-compat.
5940 * c-parser.c (disable_extension_diagnostics): Handle
5941 warn_c99_c11_compat.
5942 (restore_extension_diagnostics): Likewise.
5943 (c_parser_static_assert_declaration_no_semi): Call pedwarn_c99
5944 instead of pedwarn, don't check flag_isoc11 before.
5945 (c_parser_declspecs): Likewise.
5946 (c_parser_alignas_specifier): Likewise.
5947 (c_parser_alignof_expression): Likewise.
5948 (c_parser_generic_selection): Likewise.
5949 * c-tree.h (pedwarn_c99): Update declaration.
5950 * c-typeck.c (c_finish_return): Call pedwarn or warning_at instead
5951 of pedwarn_c99.
5952
177cce46
MP
59532014-08-19 Marek Polacek <polacek@redhat.com>
5954
5955 * c-decl.c (warn_variable_length_array): Pass OPT_Wvla unconditionally
5956 to pedwarn_c90.
5957 * c-errors.c: Include "opts.h".
5958 (pedwarn_c90): Rewrite to handle -Wno-c90-c99-compat better.
5959 * c-parser.c (disable_extension_diagnostics): Handle negative value
5960 of warn_c90_c99_compat, too.
5961 (restore_extension_diagnostics): Likewise.
5962 (c_parser_compound_statement_nostart): Pass
5963 OPT_Wdeclaration_after_statement unconditionally to pedwarn_c90.
5964
6dc99c33
MP
59652014-08-12 Marek Polacek <polacek@redhat.com>
5966
5967 * c-parser.c (c_parser_postfix_expression) <case RID_FUNCTION_NAME>:
5968 Add pedwarn.
5969 (c_parser_postfix_expression) <case RID_PRETTY_FUNCTION_NAME>:
5970 Likewise.
5971 (c_parser_postfix_expression) <case RID_C99_FUNCTION_NAME>: Likewise.
5972
3f8257db 59732014-08-10 Marek Polacek <polacek@redhat.com>
f3bede71
MP
5974
5975 PR c/51849
5976 * c-decl.c (build_array_declarator): Remove check for !flag_isoc99.
5977 Call pedwarn_c90 instead of pedwarn.
5978 (check_bitfield_type_and_width): Likewise.
5979 (declspecs_add_qual): Likewise.
5980 (declspecs_add_type): Likewise.
5981 (warn_variable_length_array): Unify function for -pedantic and -Wvla.
5982 Adjust to only call pedwarn_c90.
5983 (grokdeclarator): Remove pedantic && !flag_isoc99 check. Call
5984 pedwarn_c90 instead of pedwarn.
5985 * c-errors.c (pedwarn_c90): Handle -Wc90-c99-compat.
5986 * c-parser.c (disable_extension_diagnostics): Handle
5987 warn_c90_c99_compat.
5988 (restore_extension_diagnostics): Likewise.
5989 (c_parser_enum_specifier): Remove check for !flag_isoc99. Call
5990 pedwarn_c90 instead of pedwarn.
5991 (c_parser_initelt): Likewise.
5992 (c_parser_postfix_expression): Likewise.
5993 (c_parser_postfix_expression_after_paren_type): Likewise.
5994 (c_parser_compound_statement_nostart): Remove check for !flag_isoc99.
5995 * c-tree.h: Fix formatting.
5996 * c-typeck.c (build_array_ref): Remove check for !flag_isoc99. Call
5997 pedwarn_c90 instead of pedwarn.
5998
9f25a338
TS
59992014-08-07 Trevor Saunders <tsaunders@mozilla.com>
6000
6001 * c-typeck.c: Remove include of pointer-set.h.
6002
044331a8
MP
60032014-08-07 Marek Polacek <polacek@redhat.com>
6004
6005 * c-typeck.c (pointer_diff): Remove P - (P + CST) optimization.
6006
b787e7a2
TS
60072014-08-02 Trevor Saunders <tsaunders@mozilla.com>
6008
6009 * c-typeck.c: Use hash_map instead of pointer_map.
6010
6e2830c3
TS
60112014-08-02 Trevor Saunders <tsaunders@mozilla.com>
6012
6013 * c-decl.c: Use hash_set instead of pointer_set.
6014
a7ee52fb
IZ
60152014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
6016
6017 PR middle-end/61455
6018 * c-array-notation.c (expand_array_notations): Handling
6019 of DECL_EXPR added.
6020
b4dfdc11
MG
60212014-07-31 Marc Glisse <marc.glisse@inria.fr>
6022
6023 PR c++/60517
6024 * c-typeck.c (c_finish_return): Return 0 instead of the address of
6025 a local variable.
6026
976d5a22
TT
60272014-07-30 Tom Tromey <tromey@redhat.com>
6028
6029 * c-typeck.c (struct constructor_stack) <designator_depth>: New
6030 field.
6031 (really_start_incremental_init, push_init_level): Initialize
6032 designator_depth.
6033 (pop_init_level): Set global designator_depth.
6034 (process_init_element): Check for designated_init attribute.
6035
30281de2
MP
60362014-07-20 Marek Polacek <polacek@redhat.com>
6037
6038 PR c/61852
6039 * c-decl.c (implicit_decl_warning): Add location_t parameter. Use it.
6040 (implicitly_declare): Pass location to implicit_decl_warning.
6041
b108f48f
JJ
60422014-07-14 Jakub Jelinek <jakub@redhat.com>
6043
6044 PR middle-end/61294
6045 * c-parser.c (c_parser_expr_list): Add new argument literal_zero_mask.
6046 If non-NULL, call c_parser_check_literal_zero.
6047 (c_parser_check_literal_zero): New function.
6048 (c_parser_postfix_expression_after_primary): Adjust
6049 c_parser_expr_list caller, handle -Wmemset-transposed-args.
6050
773ec47f
MP
60512014-07-06 Marek Polacek <polacek@redhat.com>
6052
6053 PR c/6940
6054 * c-decl.c (grokdeclarator): Set C_ARRAY_PARAMETER.
6055 * c-tree.h (C_ARRAY_PARAMETER): Define.
6056 * c-typeck.c (c_expr_sizeof_expr): Warn when using sizeof on an array
6057 function parameter.
6058
22e1cf1c 60592014-07-02 Jan Hubicka <hubicka@ucw.cz>
3f8257db 6060 Chen Gang <gang.chen.5i5j@gmail.com>
22e1cf1c
JH
6061
6062 * c-decl.c (duplicate_decls): CLear DECL_STRUCT_FUNCTION before
6063 releasing symbol.
6064
52ec0ea3
MP
60652014-07-01 Marek Polacek <polacek@redhat.com>
6066
6067 * c-typeck.c (convert_for_assignment): Pass OPT_Wint_conversion
6068 instead of 0 to WARN_FOR_ASSIGNMENT.
6069
d5c3d343
MP
60702014-07-01 Marek Polacek <polacek@redhat.com>
6071
6072 PR c/58286
6073 * c-typeck.c (convert_for_assignment): Pass
6074 OPT_Wincompatible_pointer_types instead of 0 to WARN_FOR_ASSIGNMENT.
6075
6a7253a4
MP
60762014-06-30 Marek Polacek <polacek@redhat.com>
6077
6078 * c-decl.c (grokdeclarator): Don't instrument VLAs if the function
6079 has no_sanitize_undefined attribute.
6080
5e88a8f4
IZ
60812014-06-30 Igor Zamyatin <igor.zamyatin@intel.com>
6082
6083 PR middle-end/57541
6084 * c-array-notation.c (fix_builtin_array_notation_fn):
6085 Check for 0 arguments in builtin call. Check that bultin argument is
6086 correct.
6087 * c-parser.c (c_parser_array_notation): Check for incorrect initial
6088 index.
6089
9698b078
SH
60902014-06-27 Sebastian Huber <sebastian.huber@embedded-brains.de>
6091
6092 * c-parser.c (c_parser_declaration_or_fndef): Discard all type
6093 qualifiers in __auto_type for atomic types.
6094 (c_parser_typeof_specifier): Discard all type qualifiers in
6095 __typeof__ for atomic types.
6096
6e07c515
MP
60972014-06-25 Marek Polacek <polacek@redhat.com>
6098
6099 PR c/61162
6100 * c-parser.c (c_parser_statement_after_labels): Pass the location of
6101 the return expression to c_finish_return.
6102
da6f124d
JJ
61032014-06-25 Jakub Jelinek <jakub@redhat.com>
6104
6105 * c-typeck.c (c_finish_omp_clauses): Make sure
6106 OMP_CLAUSE_LINEAR_STEP has correct type.
6107
c203e8a7
TS
61082014-06-24 Trevor Saunders <tsaunders@mozilla.com>
6109
6110 * c-decl.c: Adjust.
6111
56ad0e38
JJ
61122014-06-24 Jakub Jelinek <jakub@redhat.com>
6113
6114 * c-parser.c (c_parser_omp_for_loop): For
6115 #pragma omp parallel for simd move lastprivate clause from parallel
6116 to for rather than simd.
6117
47c2554f
MP
61182014-06-23 Marek Polacek <polacek@redhat.com>
6119
6120 * c-typeck.c (parser_build_binary_op): Don't call
6121 warn_logical_not_parentheses if the RHS is TRUTH_NOT_EXPR.
6122
56363ffd
JH
61232014-06-15 Jan Hubicka <hubicka@ucw.cz>
6124
6125 * c-parser.c (c_parser_omp_threadprivate): Likewise.
6126 * c-decl.c (merge_decls): Likewise.
6127
d7ff7ae5
MP
61282014-06-09 Marek Polacek <polacek@redhat.com>
6129
6130 PR c/36446
6131 * c-typeck.c (error_init): Call inform instead of error_at.
6132 (pedwarn_init): Call inform instead of pedwarn.
6133 (warning_init): Call inform instead of warning_at.
6134
24d047a3
JH
61352014-06-07 Jan Hubicka <hubicka@ucw.cz>
6136
6137 * c-decl.c (merge_decls): Use set_decl_section_name.
6138 (duplicate_decls): Remove node if it exists.
6139
9bac5cbb
G
61402014-06-05 S. Gilles <sgilles@terpmail.umd.edu>
6141
6142 PR c/53119
6143 * c-typeck.c (push_init_level, process_init_element,
6144 pop_init_level): Correct check for zero initialization, move
6145 missing brace warning to respect zero initialization.
6146
8ffcdea8
MP
61472014-06-05 Marek Polacek <polacek@redhat.com>
6148
6149 PR c/56724
6150 * c-typeck.c (convert_for_assignment): Use expr_loc for ic_argpass.
6151
742938c9
MP
61522014-06-05 Marek Polacek <polacek@redhat.com>
6153
6154 PR c/49706
6155 * c-typeck.c (parser_build_binary_op): Warn when logical not is used
ab20d992 6156 on the left hand side operand of a comparison.
742938c9 6157
6447c55d
MP
61582014-06-05 Marek Polacek <polacek@redhat.com>
6159
6160 PR c/48062
6161 * c-decl.c (warn_if_shadowing): Call inform instead of warning_at.
6162 Print note only if the warning was printed.
6163
9dc7743c
IZ
61642014-06-04 Igor Zamyatin <igor.zamyatin@intel.com>
6165
6166 PR c/58942
6167 * c-array-notation.c (fix_builtin_array_notation_fn): Handle the case
6168 with a pointer.
6169
fedfecef
MP
61702014-06-03 Marek Polacek <polacek@redhat.com>
6171
6172 PR c/60439
6173 * c-parser.c (c_parser_switch_statement): Pass explicit_cast_p to
6174 c_start_case.
6175 * c-tree.h (c_start_case): Update.
6176 * c-typeck.c (c_start_case): Add new boolean parameter. Warn if
6177 switch condition has boolean value.
6178
9b2b7279
AM
61792014-06-02 Andrew MacLeod <amacleod@redhat.com>
6180
6181 * c-decl.c: Include builtins.h.
6182 * c-parser.c: Likewise.
6183
5c1bc275
MP
61842014-05-27 Marek Polacek <polacek@redhat.com>
6185
6186 PR c/56724
6187 * c-typeck.c (convert_arguments): Get location of a parameter. Change
6188 error and warning calls to error_at and warning_at. Pass location of
6189 a parameter to it. Call warning_at with OPT_Wtraditional_conversion.
6190 (convert_for_assignment): Add parameter to WARN_FOR_ASSIGNMENT and
6191 WARN_FOR_QUALIFIERS. Pass expr_loc to those.
6192
97563bc8
IZ
61932014-05-26 Igor Zamyatin <igor.zamyatin@intel.com>
6194
6195 PR c/61191
6196 * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid
6197 function parameters.
6198
aede2c10
JH
61992014-05-23 Jan Hubicka <hubicka@ucw.cz>
6200
6201 * c-decl.c (merge_decls): Preserve symtab node pointers.
6202 (duplicate_decls): Free new decl.
6203
edbba2ce
TS
62042014-05-23 Thomas Schwinge <thomas@codesourcery.com>
6205
f3316c6d
TS
6206 * c-typeck.c (c_finish_omp_clauses): Remove duplicated variable
6207 initialization.
6208
edbba2ce
TS
6209 * c-parser.c (c_parser_omp_target): Return bool values.
6210
68c81f24
TS
62112014-05-22 Thomas Schwinge <thomas@codesourcery.com>
6212
6213 * c-parser.c (c_parser_omp_clause_thread_limit): Rename
6214 num_teams_loc variable to num_thread_limit_loc.
6215
632f2871
RS
62162014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
6217
6218 * c-array-notation.c (expand_array_notations): Use void_node
6219 instead of void_zero_node.
6220
766090c2
TS
62212014-05-17 Trevor Saunders <tsaunders@mozilla.com>
6222
6223 * c-decl.c (finish_struct): Adjust.
6224 (finish_enum): Likewise.
6225 (bind): Adjust.
6226 (record_inline_static): Likewise.
6227 (push_scope): Likewise.
6228 (make_label): Likewise.
6229 (lookup_label_for_goto): Likewise.
6230 (finish_struct): Likewise.
6231 (finish_enum): Likewise.
6232 (store_parm_decls): Likewise.
6233 (c_push_function_context): Likewise.
6234 * c-lang.h: Remove usage of variable_size gty attribute.
6235 * c-parser.c (c_parse_init): Adjust.
6236 (c_parse_file): Likewise.
6237
2b107f6b
MP
62382014-05-13 Marek Polacek <polacek@redhat.com>
6239
6240 PR c/61162
6241 * c-typeck.c (convert_for_assignment): Pass location to
6242 WARN_FOR_ASSIGNMENT instead of input_location.
6243
d033409e
MP
62442014-05-10 Marek Polacek <polacek@redhat.com>
6245
6246 * c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
6247 maybe_warn_string_init.
6248 (c_parser_postfix_expression_after_paren_type): Pass type_loc to
6249 maybe_warn_string_init.
6250 * c-tree.h (maybe_warn_string_init): Update declaration.
6251 * c-typeck.c (maybe_warn_string_init): Add location parameter.
6252 Call pedwarn_init with loc instead of with input_location.
6253 (digest_init): Pass init_loc to maybe_warn_string_init.
6254 (pop_init_level): Call pedwarn_init with loc instead of with
6255 input_location.
6256 (set_init_index): Likewise.
6257 (process_init_element): Likewise.
6258
ea58ef42
MP
62592014-05-09 Marek Polacek <polacek@redhat.com>
6260
6261 PR c/61096
6262 * c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level.
6263 (c_parser_initelt): Pass location to set_init_label. Pass array index
6264 location to set_init_index.
6265 * c-tree.h (push_init_level): Update declaration.
6266 (pop_init_level): Likewise.
6267 (set_init_index): Likewise.
6268 (set_init_label): Likewise.
6269 * c-typeck.c (error_init): Add location parameter. Call error_at
6270 instead of error.
6271 (digest_init): Pass init_loc to error_init.
6272 (really_start_incremental_init):
6273 (push_init_level): Add location parameter. Pass loc to pop_init_level
6274 and error_init.
6275 (pop_init_level): Likewise.
6276 (set_designator): Add location parameter. Pass loc to pop_init_level,
6277 push_init_level, and error_init.
6278 (set_init_index): Add location parameter. Pass loc to error_init and
6279 set_designator.
6280 (set_init_label): Likewise.
6281 (output_init_element): Pass loc to error_init.
6282 (process_init_element): Pass loc to error_init, pop_init_level,
6283 pedwarn_init, and push_init_level.
6284
661a0813
MP
62852014-05-09 Marek Polacek <polacek@redhat.com>
6286
6287 PR c/50459
6288 * c-parser.c (c_parser_attributes): Parse the arguments as an
6289 expression-list if the attribute takes identifier.
6290
2793eeab
MP
62912014-05-08 Marek Polacek <polacek@redhat.com>
6292
6293 PR c/61053
6294 * c-decl.c (grokdeclarator): Use min_align_of_type instead of
6295 TYPE_ALIGN_UNIT.
6296
f827930a
MP
62972014-05-08 Marek Polacek <polacek@redhat.com>
6298
6299 PR c/61077
6300 * c-decl.c (start_function): Warn for _Atomic-qualified return type
6301 of main.
6302
1d60af08
KZ
63032014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
6304 Mike Stump <mikestump@comcast.net>
6305 Richard Sandiford <rdsandiford@googlemail.com>
6306
6307 * c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN.
6308 (finish_enum): Use wide-int interfaces.
6309 * c-parser.c (c_parser_cilk_clause_vectorlength): Likewise.
6310 * c-typeck.c (build_c_cast): Likewise.
6311 (set_nonincremental_init_from_string): Likewise.
6312 (c_tree_equal): Likewise.
6313
a0e24419
MP
63142014-05-02 Marek Polacek <polacek@redhat.com>
6315
6316 PR c/25801
6317 * c-typeck.c (c_size_in_bytes): Update comment. Don't call error.
6318 Return size_one_node when the type is not complete.
6319 (pointer_diff): Remove comment.
6320 (build_unary_op): Improve error messages.
6321
19fc9faa
MP
63222014-05-02 Marek Polacek <polacek@redhat.com>
6323
6324 * c-typeck.c (c_finish_return): Separate warning_at calls.
6325
63bc4e87
MP
63262014-05-02 Marek Polacek <polacek@redhat.com>
6327
6328 * c-tree.h (error_init): Remove declaration.
6329 (pedwarn_init): Likewise.
6330 * c-typeck.c (error_init): Make static and move above.
6331 (pedwarn_init): Likewise.
6332 (warning_init): Move above.
6333 (maybe_warn_string_init): Likewise.
6334
4bd2511b
JL
63352014-05-01 Jeff Law <law@redhat.com>
6336
6337 Revert:
6338
6339 2014-04-24 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
6340 * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
6341 avoid goto.
6342
6a358dcb
MP
63432014-05-02 Marek Polacek <polacek@redhat.com>
6344
6345 PR c/60784
6346 * c-typeck.c (push_init_level): Set constructor_designated to
6347 p->designated for structures.
6348
ae5ebda4
MP
63492014-05-01 Marek Polacek <polacek@redhat.com>
6350
6351 PR c/60915
6352 * c-parser.c (c_parser_declaration_or_fndef): Give better error if
6353 function-definition has an attribute after the declarator.
6354
96b40f8d
MP
63552014-05-01 Marek Polacek <polacek@redhat.com>
6356
6357 PR c/60257
6358 * c-typeck.c (warning_init): Add location_t parameter. Call
6359 warning_at instead of warning.
6360 (push_init_level): Pass input_location to warning_init.
6361 (add_pending_init): Add location_t parameter. Pass loc to
6362 warning_init.
6363 (set_nonincremental_init): Pass input_location to add_pending_init.
6364 (set_nonincremental_init_from_string): Likewise.
6365 (output_init_element): Pass loc to warning_init and to
6366 add_pending_init.
6367
32e00768
MP
63682014-05-01 Marek Polacek <polacek@redhat.com>
6369
6370 PR c/43395
6371 * c-typeck.c (c_finish_return): Distinguish between label and variable
6372 when warning about returning local address.
6373
c9379ce2
MP
63742014-05-01 Marek Polacek <polacek@redhat.com>
6375
6376 PR c/29467
6377 * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
6378 in C89 mode.
6379
d00887e8
MP
63802014-05-01 Marek Polacek <polacek@redhat.com>
6381
6382 PR c/43245
6383 * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
6384 instead of 0 to WARN_FOR_QUALIFIERS.
6385
5436fa2e
MP
63862014-05-01 Marek Polacek <polacek@redhat.com>
6387
6388 PR c/56989
6389 * c-typeck.c (default_conversion): Use better location for
6390 error call.
6391
f8ed5150
MP
63922014-04-30 Marek Polacek <polacek@redhat.com>
6393
6394 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
6395 also when SANITIZE_FLOAT_DIVIDE is on.
6396
8337d1db
MP
63972014-04-30 Marek Polacek <polacek@redhat.com>
6398
6399 PR c/60139
6400 * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
6401 and pedwarn_init. Use loc insted of input_location.
6402
c4bdc42f
MP
64032014-04-30 Marek Polacek <polacek@redhat.com>
6404
6405 PR c/60351
6406 * c-typeck.c (build_binary_op): Use location when warning about
6407 shift count.
6408
45484dcf
MP
64092014-04-25 Marek Polacek <polacek@redhat.com>
6410
6411 PR c/18079
6412 * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
6413 always_inline/noinline and hot/cold attributes.
6414
34cf811f
MP
64152014-04-25 Marek Polacek <polacek@redhat.com>
6416
6417 PR c/60114
6418 * c-parser.c (c_parser_initelt): Pass input_location to
6419 process_init_element.
6420 (c_parser_initval): Pass loc to process_init_element.
6421 * c-tree.h (process_init_element): Adjust declaration.
6422 * c-typeck.c (push_init_level): Pass input_location to
6423 process_init_element.
6424 (pop_init_level): Likewise.
6425 (set_designator): Likewise.
6426 (output_init_element): Add location_t parameter. Pass loc to
6427 digest_init.
6428 (output_pending_init_elements): Pass input_location to
6429 output_init_element.
6430 (process_init_element): Add location_t parameter. Pass loc to
6431 output_init_element.
6432
42056eac
JJ
64332014-04-24 Jakub Jelinek <jakub@redhat.com>
6434
6435 * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
6436 atomic-clause, allow comma in between atomic-clause and
6437 seq_cst.
6438
e162a134
JJ
64392014-04-22 Jakub Jelinek <jakub@redhat.com>
6440
6441 PR c/59073
6442 * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
6443 fails, don't set OM_PARALLEL_COMBINED and return NULL.
6444
2f6babac
IZ
64452014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
6446
6447 PR middle-end/60469
6448 * c-array-notation.c (fix_builtin_array_notation_fn): Use
6449 create_tmp_var instead build_decl for creating temps.
6450 (build_array_notation_expr): Likewise.
6451 (fix_conditional_array_notations_1): Likewise.
6452 (fix_array_notation_expr): Likewise.
6453 (fix_array_notation_call_expr): Likewise.
6454
8edbfaa6
JJ
64552014-03-28 Jakub Jelinek <jakub@redhat.com>
6456
6457 PR c++/60689
6458 * c-tree.h (c_build_function_call_vec): New prototype.
6459 * c-typeck.c (build_function_call_vec): Don't call
6460 resolve_overloaded_builtin here.
6461 (c_build_function_call_vec): New wrapper function around
6462 build_function_call_vec. Call resolve_overloaded_builtin here.
6463 (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
6464 Call c_build_function_call_vec instead of build_function_call_vec.
6465 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
6466 * c-decl.c (finish_decl): Likewise.
6467
7485aeea
MLI
64682014-03-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
6469
6470 PR c/55383
6471 * c-typeck.c: Use correct format string in cast-qual warning
6472
b17a8b07
TS
64732014-03-07 Thomas Schwinge <thomas@codesourcery.com>
6474
6475 * c-decl.c (c_decl_attributes): Use
6476 lang_hooks.types.omp_mappable_type.
6477 * c-typeck.c (c_finish_omp_clauses): Likewise.
6478
3af9c5e9
MP
64792014-03-06 Marek Polacek <polacek@redhat.com>
6480
6481 PR c/60197
6482 * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
6483 of checking tree code.
6484
1c9f5f33
PK
64852014-02-19 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
6486
6487 * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
6488 (c_parser_parameter_declaration): Likewise.
6489
cc28fc7f
MP
64902014-02-19 Marek Polacek <polacek@redhat.com>
6491
6492 PR c/60195
6493 * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
6494 Call mark_exp_read on exp.value.
6495 (build_atomic_assign): Set TREE_NO_WARNING on val and old. Set
6496 TREE_ADDRESSABLE on old instead of val.
6497 (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
6498
b581c05c
PK
64992014-02-07 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
6500
6501 * c-parser.c (c_parser_get_builtin_args): Replace calls to
6502 C_EXPR_APPEND by vec_safe_push.
6503 * c-tree.h (C_EXPR_APPEND): Remove.
6504
81e5eca8
MP
65052014-01-31 Marek Polacek <polacek@redhat.com>
6506
6507 PR c/59963
6508 * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
6509 build_function_call_vec.
6510 (build_function_call): Likewise.
6511 (build_atomic_assign): Likewise.
6512 (build_function_call_vec): Add arg_loc parameter. Use it.
6513 (convert_arguments): Likewise.
6514 (convert_for_assignment): Rename rhs_loc to expr_loc.
6515 * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
6516 (c_parser_objc_keywordexpr): Likewise.
6517 (c_parser_postfix_expression_after_primary): Call
6518 build_function_call_vec with expr_loc rather than op_loc.
6519 Call c_parser_expr_list to fill arg_loc. Pass arg_loc to
6520 build_function_call_vec.
6521 (c_parser_expr_list): Add locations parameter. Fill it with locations
6522 of function arguments.
6523 * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
6524
68fca595
MP
65252014-01-30 Marek Polacek <polacek@redhat.com>
6526
6527 PR c/59940
6528 * c-typeck.c (build_function_call_vec): Use loc parameter.
6529 (convert_arguments): Add location parameter. Use it.
6530 (ep_convert_and_check): Likewise.
6531 (build_atomic_assign): Adjust convert_for_assignment call.
6532 (build_modify_expr): Likewise.
6533 (digest_init): Likewise.
6534 (c_finish_return): Likewise.
6535 (build_conditional_expr): Adjust ep_convert_and_check calls.
6536 (convert_for_assignment): Add rhs_loc parameter. Use it.
6537 (build_binary_op): Adjust convert_and_check and ep_convert_and_check
6538 calls.
6539
fa337f3a
RB
65402014-01-30 Richard Biener <rguenther@suse.de>
6541
6542 PR c/59905
6543 * c-typeck.c (build_function_call_vec): Do not replace calls
6544 to a function via an incompatible type with a runtime abort.
6545
b72271b9
BI
65462014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
6547
6548 * c-parser.c (c_parser_declaration_or_fndef): Replaced
6549 flag_enable_cilkplus with flag_cilkplus.
6550 (c_parser_direct_declarator_inner): Likewise.
6551 (c_parser_attribute_any_word): Likewise.
6552 (c_parser_attributes): Likewise.
6553 (c_parser_compound_statement): Likewise.
6554 (c_parser_statement_after_labels): Likewise.
6555 (c_parser_if_statement): Likewise.
6556 (c_parser_switch_statement): Likewise.
6557 (c_parser_do_statement): Likewise.
6558 (c_parser_for_statement): Likewise.
6559 (c_parser_unary_expression): Likewise.
6560 (c_parser_postfix_expression): Likewise.
6561 (c_parser_postfix_expression_after_primary): Likewise.
6562 (c_parser_postfix_expression_after_primary): Likewise.
6563 (c_parser_omp_clause_name): Likewise.
6564 (c_finish_omp_declare_simd): Likewise.
6565 (c_parser_cilk_verify_simd): Likewise.
6566 * c-typeck.c (build_array_ref): Likewise.
6567 (build_function_call_vec): Likewise.
6568 (convert_arguments): Likewise.
6569 (build_compound_expr): Likewise.
6570 (c_finish_return): Likewise.
6571 (c_finish_if_stmt): Likewise.
6572 (c_finish_loop): Likewise.
6573 (build_binary_op): Likewise.
6574
393e8e8b
MP
65752014-01-23 Marek Polacek <polacek@redhat.com>
6576
6577 PR c/59846
6578 * c-typeck.c (parser_build_binary_op): Use location instead of
6579 input_location.
6580 (build_binary_op): Pass location to shorten_compare.
6581
f04dda30
MP
65822014-01-23 Marek Polacek <polacek@redhat.com>
6583
6584 PR c/58346
6585 * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
6586 an empty aggregate.
6587
789eadcd
MP
65882014-01-23 Marek Polacek <polacek@redhat.com>
6589
6590 PR c/59871
6591 * c-typeck.c (build_compound_expr): Warn even for right-hand operand
6592 of a comma expression.
6593 (emit_side_effect_warnings): Likewise.
6594
40f14e9f
BI
65952014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
6596
6597 PR c/59825
6598 * c-array-notation.c (expand_array_notation_exprs): Rewrote this
6599 function to use walk_tree and moved a lot of its functionality to
6600 expand_array_notations.
6601 (expand_array_notations): New function.
6602
74558dd9
BI
66032014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
6604
6605 * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
6606 attribute an attribute without value.
6607
652fea39
JJ
66082014-01-23 Jakub Jelinek <jakub@redhat.com>
6609
6610 PR middle-end/58809
6611 * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
6612 BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
6613
f34f1c87
MP
66142014-01-22 Marek Polacek <polacek@redhat.com>
6615
6616 PR c/59891
6617 * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
6618 of remove_c_maybe_const_expr on op1 and op2.
6619
241f845a
JJ
66202014-01-15 Jakub Jelinek <jakub@redhat.com>
6621
6622 PR c/58943
6623 * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
6624 effects, preevaluate rhs using SAVE_EXPR first.
6625
9a74f20c
BI
66262014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
6627
6628 PR c++/59631
6629 * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
6630 statements with if-elseif statements.
6631
96066ce1
MP
66322014-01-06 Marek Polacek <polacek@redhat.com>
6633
6634 PR c/57773
6635 * c-decl.c (check_bitfield_type_and_width): Warn for implementation
6636 defined bit-field types only in ISO C.
6637
23a5b65a
RS
66382014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
6639
6640 Update copyright years
6641
f9030485
RS
66422014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
6643
6644 * c-array-notation.c: Use the standard form for the copyright notice.
6645
41958c28
BI
66462013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
6647
6648 * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
6649 (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
6650 field in parser is not empty. If not-empty, call the function
6651 c_parser_finish_omp_declare_simd.
6652 (c_parser_cilk_clause_vectorlength): Modified function to be shared
6653 between SIMD-enabled functions and #pragma simd. Added new parameter.
6654 (c_parser_cilk_all_clauses): Modified the usage of the function
6655 c_parser_cilk_clause_vectorlength as mentioned above.
6656 (c_parser_cilk_simd_fn_vector_attrs): New function.
6657 (c_finish_cilk_simd_fn_tokens): Likewise.
6658 (is_cilkplus_vector_p): Likewise.
6659 (c_parser_omp_clause_name): Added checking for "vectorlength,"
6660 "nomask," and "mask" strings in clause name.
6661 (c_parser_omp_all_clauses): Added 3 new case statements:
6662 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
6663 PRAGMA_CILK_CLAUSE_NOMASK.
6664 (c_parser_attributes): Added a cilk_simd_fn_tokens parameter. Added a
6665 check for vector attribute and if so call the function
6666 c_parser_cilk_simd_fn_vector_attrs. Also, when Cilk plus is enabled,
6667 called the function c_finish_cilk_simd_fn_tokens.
6668 (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
6669 parser field is non-empty. If so, parse them as you would parse
6670 the omp declare simd pragma.
6671 (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
6672 Added a check when step is a parameter and flag it as error.
6673 (CILK_SIMD_FN_CLAUSE_MASK): New #define.
6674 (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
6675 pragma_omp_clause.
6676
cef0fd0e
TS
66772013-12-17 Thomas Schwinge <thomas@codesourcery.com>
6678
6679 * c-parser.c (c_parser_omp_parallel): Fix description.
6680
12893402
BI
66812013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
6682
6683 * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
6684 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
6685 (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
6686 * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
6687
296674db
JM
66882013-12-04 Joseph Myers <joseph@codesourcery.com>
6689
6690 PR c/52023
6691 * c-parser.c (c_parser_alignas_specifier): Use
6692 c_sizeof_or_alignof_type instead of c_alignof.
6693 (c_parser_alignof_expression): Likewise, with min_alignof
6694 parameter depending on alignof spelling used.
6695
edd28054
MP
66962013-12-04 Marek Polacek <polacek@redhat.com>
6697
6698 PR c/54113
6699 * c-decl.c (start_function): Don't warn for missing prototype for
6700 inline functions.
6701
da0fc454
MP
67022013-12-03 Marek Polacek <polacek@redhat.com>
6703
6704 PR c/59351
6705 * c-decl.c (build_compound_literal): Allow compound literals with
6706 empty initial value.
6707
4c2ecab0
JM
67082013-12-02 Joseph Myers <joseph@codesourcery.com>
6709
6710 PR c/58235
6711 * c-typeck.c (build_modify_expr): Diagnose assignment to
6712 expression with array type.
6713
340baef7
JM
67142013-11-29 Joseph Myers <joseph@codesourcery.com>
6715
6716 PR c/42262
6717 * c-typeck.c (process_init_element): Do not treat a string as
6718 initializing a whole array when used with a designator for an
6719 individual element.
6720
6763b9f7
JM
67212013-11-29 Joseph Myers <joseph@codesourcery.com>
6722
6723 PR c/57574
6724 * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
6725 an inline function following a static declaration.
6726
e7bd1de1
JJ
67272013-11-28 Jakub Jelinek <jakub@redhat.com>
6728
6729 PR c/59310
6730 * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
6731 to p_name before calling c_parser_omp_teams instead of after.
6732 (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
6733 argument. Remove unused p_name variable.
6734
0136f8f0
AH
67352013-11-27 Aldy Hernandez <aldyh@redhat.com>
6736 Jakub Jelinek <jakub@redhat.com>
6737
6738 * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
6739 external_scope is NULL.
6740
241b71bb
TV
67412013-11-27 Tom de Vries <tom@codesourcery.com>
6742 Marc Glisse <marc.glisse@inria.fr>
6743
6744 PR c++/59032
6745 * c-typeck.c (build_unary_op): Allow vector increment and decrement.
6746
2fb9a547
AM
67472013-11-22 Andrew MacLeod <amacleod@redhat.com>
6748
6749 * c-typeck.c: Add required include files from gimple.h.
6750
8400e75e
DM
67512013-11-22 David Malcolm <dmalcolm@redhat.com>
6752
6753 * c-decl.c (define_label, shadow_tag_warned)
6754 (check_bitfield_type_and_width, grokdeclarator, grokparms,
6755 store_parm_decls_newstyle, store_parm_decls_oldstyle)
6756 (declspecs_add_type): Remove use of in_system_header macro.
6757 * c-parser.c (c_parser_unary_expression): Likewise.
6758 * c-typeck.c (store_init_value, process_init_element)
6759 (c_start_case): Likewise.
6760
6761 * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
6762 macro.
6763
6764 * c-parser.c (c_parser_set_source_position_from_token): Remove
6765 reference to in_system_header from comment.
6766
386b1f1f
RS
67672013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
6768
6769 * c-decl.c (grokdeclarator): Update comment to refer to
6770 tree_to_[su]hwi rather than tree_low_cst.
6771
ae7e9ddd
RS
67722013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
6773
6774 * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
6775 tree_to_uhwi throughout.
6776
9439e9a1
RS
67772013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
6778
6779 * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
6780 throughout.
6781
9541ffee
RS
67822013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
6783
6784 * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
6785 throughout.
6786
c02065fc
AH
67872013-11-15 Aldy Hernandez <aldyh@redhat.com>
6788
6789 * c-parser.c (c_parser_cilk_simd): New.
6790 (c_parser_cilk_verify_simd): New.
6791 (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
6792 (c_parser_omp_for_loop): Add case for NE_EXPR.
6793 Set c_break_label for CILK_SIMD.
6794 (c_parser_cilk_clause_vectorlength): New.
6795 (c_parser_cilk_clause_linear): New.
6796 (c_parser_cilk_clause_name): New.
6797 (c_parser_cilk_all_clauses): New.
6798 * c-typeck.c (build_unary_op): Pass location argument to
6799 readonly_error.
6800 (build_modify_expr): Same.
6801 (build_asm_expr): Same.
6802 (c_finish_bc_stmt): Error on break/continue in loops.
6803
18f429e2
AM
68042013-11-14 Andrew MacLeod <amacleod@redhat.com>
6805
6806 * c-typeck.c: Include only gimplify.h and gimple.h as needed.
6807
d8a2d370
DN
68082013-11-14 Diego Novillo <dnovillo@google.com>
6809
6810 * c-decl.c: Include print-tree.h.
6811 Include stor-layout.h.
6812 Include varasm.h.
6813 Include attribs.h.
6814 Include stringpool.h.
6815 * c-lang.c: Include fold-const.h.
6816 * c-parser.c: Include stringpool.h.
6817 Include attribs.h.
6818 Include stor-layout.h.
6819 Include varasm.h.
6820 Include trans-mem.h.
6821 * c-typeck.c: Include stor-layout.h.
6822 Include trans-mem.h.
6823 Include varasm.h.
6824 Include stmt.h.
6825
38b7bc7f
JM
68262013-11-13 Joseph Myers <joseph@codesourcery.com>
6827
6828 * c-tree.h (c_typespec_keyword): Add cts_auto_type.
6829 * c-decl.c (declspecs_add_type, finish_declspecs): Handle
6830 __auto_type.
6831 * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
6832 (c_parser_attribute_any_word, c_parser_objc_selector): Handle
6833 RID_AUTO_TYPE.
6834 (c_parser_declspecs): Take argument AUTO_TYPE_OK.
6835 (c_parser_declaration_or_fndef, c_parser_struct_declaration)
6836 (c_parser_declarator, c_parser_direct_declarator_inner)
6837 (c_parser_parameter_declaration, c_parser_type_name): All callers
6838 changed.
6839 (c_parser_declaration_or_fndef): Handle declarations with type
6840 determined from the initializer.
6841
45b0be94
AM
68422013-11-12 Andrew MacLeod <amacleod@redhat.com>
6843
18f429e2 6844 * c-typeck.c: Include gimplify.h.
45b0be94 6845
582d9b50
JM
68462013-11-12 Joseph Myers <joseph@codesourcery.com>
6847
6848 * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
6849 * c-parser.c (c_parser_declspecs): Mention _Thread_local in
6850 comment.
6851 * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
6852 or _Thread_local as appropriate in diagnostics.
6853 (build_null_declspecs): Initialize ret->thread_gnu_p.
6854 (declspecs_add_scspec): Handle either __thread or _Thread_local
6855 for RID_THREAD. Diagnose _Thread_local for pre-C11 standards if
6856 pedantic. Do not disallow _Thread_local extern and _Thread_local
6857 static.
6858
267bac10
JM
68592013-11-07 Joseph Myers <joseph@codesourcery.com>
6860 Andrew MacLeod <amacleod@redhat.com>
6861
6862 * c-aux-info.c (gen_type): Handle atomic qualifier.
6863 * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
6864 qualifiers when compating types.
6865 (shadow_tag_warned): Handle atomic_p in declspecs.
6866 (quals_from_declspecs): Likewise.
6867 (start_decl): Use c_type_promotes_to when promoting argument
6868 types.
6869 (grokdeclarator): Handle _Atomic.
6870 (get_parm_info): Diagnose any qualifier on "void" as only
6871 parameter.
6872 (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
6873 comparing types. Use c_type_promotes_to when promoting argument
6874 types.
6875 (finish_function): Use c_type_promotes_to when promoting argument
6876 types.
6877 (build_null_declspecs): Handle atomic_p in declspecs.
6878 (declspecs_add_qual): Handle RID_ATOMIC.
6879 * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
6880 (c_token_starts_declspecs): Handle RID_ATOMIC.
6881 (c_parser_declspecs): Handle atomic type specifiers and
6882 qualifiers.
6883 (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
6884 from types of expressions with atomic type.
6885 (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
6886 (c_parser_attribute_any_word): Handle RID_ATOMIC.
6887 (c_parser_initializer, c_parser_initelt, c_parser_initval)
6888 (c_parser_statement_after_labels, c_parser_switch_statement)
6889 (c_parser_for_statement, c_parser_expr_no_commas)
6890 (c_parser_conditional_expression, c_parser_binary_expression)
6891 (c_parser_cast_expression, c_parser_unary_expression)
6892 (c_parser_postfix_expression)
6893 (c_parser_postfix_expression_after_primary, c_parser_expression):
6894 Use convert_lvalue_to_rvalue.
6895 (c_parser_expression_conv, c_parser_expr_list): Document
6896 conversion of lvalues to rvalues. Use convert_lvalue_to_rvalue.
6897 (c_parser_objc_synchronized_statement): Use
6898 convert_lvalue_to_rvalue.
6899 (c_parser_objc_selector): Handle RID_ATOMIC.
6900 (c_parser_objc_receiver, c_parser_array_notation): Use
6901 convert_lvalue_to_rvalue.
6902 * c-tree.h (ctsk_typeof): Adjust comment to mention use for
6903 _Atomic (type-name).
6904 (struct c_declspecs): Add atomic_p field.
6905 (convert_lvalue_to_rvalue): Declare.
6906 * c-typeck.c (c_type_promotes_to): Promote atomic types to
6907 corresponding atomic types.
6908 (qualify_type): Don't add _Atomic qualifiers from second argument.
6909 (comp_target_types): Do not allow _Atomic mismatches.
6910 (type_lists_compatible_p): Do not remove atomic qualifiers when
6911 comparing types.
6912 (really_atomic_lvalue, convert_lvalue_to_rvalue)
6913 (build_atomic_assign): New functions.
6914 (build_unary_op): Use build_atomic_assign for atomic increment and
6915 decrement.
6916 (build_conditional_expr): Do not treat _Atomic void as a qualified
6917 version of void.
6918 (build_modify_expr): Use build_atomic_assign for atomic LHS.
6919 (find_anonymous_field_with_type, convert_to_anonymous_field)
6920 (convert_for_assignment): Do not remove atomic qualifiers when
6921 comparing types.
6922 (digest_init): Do not accept initialization of arrays of atomic
6923 elements by string constants.
6924 (build_asm_expr): Use convert_lvalue_to_rvalue.
6925 (build_binary_op): Do not treat _Atomic void as a qualified
6926 version of void.
6927
0c249d4b
DD
69282013-11-06 DJ Delorie <dj@redhat.com>
6929
6930 * c-decl.c (locate_old_decl): If a previous conflicting decl is
6931 both explicit and builtin, print the location of the explicit one.
6932
6d7f7e0a
TB
69332013-11-05 Tobias Burnus <burnus@net-b.de>
6934
6935 * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
6936 c_parser_omp_distribute, c_parser_omp_teams,
6937 c_parser_omp_target, c_parser_omp_declare): Handle
6938 -fopenmp-simd.
6939
b906f4ca
MP
69402013-11-03 Marek Polacek <polacek@redhat.com>
6941
6942 * c-decl.c (grokdeclarator): Add VLA instrumentation.
6943
ee1d5a02
JJ
69442013-11-01 Jakub Jelinek <jakub@redhat.com>
6945
6946 * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
6947 check_dup_generic at the end, unless remove is true.
6948 (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
6949 remove = true;.
6950 (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
6951
5a9785fb
JJ
69522013-10-31 Jakub Jelinek <jakub@redhat.com>
6953
6954 * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
6955 with decl that is not pointer nor array.
6956
939b37da
BI
69572013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
6958
6959 * c-decl.c (finish_function): Added a call for insert_cilk_frame when
6960 a spawning function is found.
6961 * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
6962 (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
6963 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
6964 * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
6965 case.
6966 (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
6967 * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
6968 expr.
6969 (c_finish_return): Added a check to reject _Cilk_spawn in return
6970 expression.
6971 (build_cilk_spawn): New function.
6972 (build_cilk_sync): Likewise.
6973 * Makefile.in (c-decl.o): Added cilk.h in dependency list.
ab20d992 6974
d4af74d4
TB
69752013-10-27 Tobias Burnus <burnus@net-b.de>
6976
6977 PR other/33426
6978 * c-parser.c (c_parser_while_statement, c_parser_while_statement,
6979 c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
6980 (c_parser_statement_after_labels): Update calls.
6981
d73749df 69822013-10-24 Tobias Burnus <burnus@net-b.de>
8170608b
TB
6983
6984 PR other/33426
6985 * c-parser.c (c_parser_pragma, c_parser_for_statement):
6986 Handle PRAGMA_IVDEP.
6987 (c_parser_statement_after_labels): Update call.
6988
f28aa681
MP
69892013-10-24 Marek Polacek <polacek@redhat.com>
6990
6991 * c-parser.c (c_parser_struct_declaration): Add a comment.
6992 (c_parser_declarator): Don't allow _Alignas here.
6993
0645c1a2
AM
69942013-10-17 Andrew MacLeod <amacleod@redhat.com>
6995
6996 * c-parser.c: Include omp-low.h.
6997 * c-typeck.c: Likewise.
6998
568a31f2
MP
69992013-10-17 Marek Polacek <polacek@redhat.com>
7000
7001 PR c/58267
7002 * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
7003 Document syntax of the array-declarator.
7004 (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
7005 are not permitted.
7006 (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
7007 (c_parser_struct_declaration): Likewise.
7008 (c_parser_declarator): Likewise.
7009 (c_parser_direct_declarator_inner): Likewise.
7010 (c_parser_parameter_declaration): Likewise.
7011 (c_parser_type_name): Likewise.
7012
acf0174b
JJ
70132013-10-11 Jakub Jelinek <jakub@redhat.com>
7014
7015 * c-lang.h (current_omp_declare_target_attribute): New extern
7016 decl.
7017 * c-parser.c: Include c-lang.h.
7018 (struct c_parser): Change tokens to c_token *.
7019 Add tokens_buf field. Change tokens_avail type to unsigned int.
7020 (c_parser_consume_token): If parser->tokens isn't
7021 &parser->tokens_buf[0], increment parser->tokens.
7022 (c_parser_consume_pragma): Likewise.
7023 (enum pragma_context): Add pragma_struct and pragma_param.
7024 (c_parser_external_declaration): Adjust
7025 c_parser_declaration_or_fndef caller.
7026 (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
7027 argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
7028 Adjust recursive call.
7029 (c_parser_struct_or_union_specifier): Use pragma_struct instead
7030 of pragma_external.
7031 (c_parser_parameter_declaration): Use pragma_param instead of
7032 pragma_external.
7033 (c_parser_compound_statement_nostart, c_parser_label,
7034 c_parser_for_statement): Adjust
7035 c_parser_declaration_or_fndef callers.
7036 (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
7037 it through to c_parser_conditional_expression.
7038 (c_parser_conditional_expression): Add omp_atomic_lhs argument,
7039 pass it through to c_parser_binary_expression. Adjust recursive
7040 call.
7041 (c_parser_binary_expression): Remove prec argument, add
7042 omp_atomic_lhs argument instead. Always start from PREC_NONE, if
7043 omp_atomic_lhs is non-NULL and one of the arguments of toplevel
7044 binop matches it, use build2 instead of parser_build_binary_op.
7045 (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
7046 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
7047 PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
7048 Handle pragma_struct and pragma_param the same as pragma_external.
7049 (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
7050 (c_parser_omp_variable_list): Parse array sections for
7051 OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
7052 (c_parser_omp_clause_collapse): Fully fold collapse expression.
7053 (c_parser_omp_clause_reduction): Handle user defined reductions.
7054 (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
7055 c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
7056 c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
7057 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
7058 c_parser_omp_clause_depend, c_parser_omp_clause_map,
7059 c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
7060 c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
7061 c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
7062 (c_parser_omp_all_clauses): Add finish_p argument. Don't call
7063 c_finish_omp_clauses if it is false. Handle new OpenMP 4.0 clauses.
7064 (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
7065 present to c_finish_omp_atomic. Handle OpenMP 4.0 atomic forms.
7066 (c_parser_omp_for_loop): Add CODE argument, pass it through
7067 to c_finish_omp_for. Change last argument to cclauses,
7068 and adjust uses to grab parallel clauses from the array of all
7069 the split clauses. Adjust c_parser_binary_expression,
7070 c_parser_declaration_or_fndef and c_finish_omp_for callers.
7071 (omp_split_clauses): New function.
7072 (c_parser_omp_simd): New function.
7073 (c_parser_omp_for): Add p_name, mask and cclauses arguments.
7074 Allow the function to be called also when parsing combined constructs,
7075 and call c_parser_omp_simd when parsing for simd.
7076 (c_parser_omp_sections_scope): If section-sequence doesn't start with
7077 #pragma omp section, require exactly one structured-block instead of
7078 sequence of statements.
7079 (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
7080 Allow the function to be called also when parsing combined constructs.
7081 (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
7082 Allow the function to be called also when parsing combined
7083 constructs.
7084 (c_parser_omp_taskgroup, c_parser_omp_cancel,
7085 c_parser_omp_cancellation_point, c_parser_omp_distribute,
7086 c_parser_omp_teams, c_parser_omp_target_data,
7087 c_parser_omp_target_update, c_parser_omp_target,
7088 c_parser_omp_declare_simd, c_finish_omp_declare_simd,
7089 c_parser_omp_declare_target, c_parser_omp_end_declare_target,
7090 c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
7091 (c_parser_omp_construct): Add p_name and mask vars. Handle
7092 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
7093 PRAGMA_OMP_TEAMS. Adjust c_parser_omp_for, c_parser_omp_parallel
7094 and c_parser_omp_sections callers.
7095 (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
7096 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
7097 OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
7098 (OMP_PARALLEL_CLAUSE_MASK): Likewise. Add OMP_CLAUSE_PROC_BIND.
7099 (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. Add
7100 OMP_CLAUSE_DEPEND.
7101 (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
7102 OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
7103 OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
7104 OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
7105 OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
7106 * c-typeck.c: Include tree-inline.h.
7107 (c_finish_omp_cancel, c_finish_omp_cancellation_point,
7108 handle_omp_array_sections_1, handle_omp_array_sections,
7109 c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
7110 (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
7111 user defined reductions.
7112 (c_tree_equal): New function.
7113 * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
7114 c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
7115 c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
7116 c_check_omp_declare_reduction_r): New prototypes.
7117 * c-decl.c (current_omp_declare_target_attribute): New variable.
7118 (c_decl_attributes): New function.
7119 (start_decl, start_function): Use it instead of decl_attributes.
7120 (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
7121 c_omp_reduction_decl, c_omp_reduction_lookup,
7122 c_check_omp_declare_reduction_r): New functions.
7123
0a6c2227
TT
71242013-09-25 Tom Tromey <tromey@redhat.com>
7125
7126 * Make-lang.in (c/gccspec.o): Remove.
7127 (CFLAGS-c/gccspec.o): New variable.
7128 (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
7129 (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
7130 (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
7131
f3bc55f0
TT
71322013-09-25 Tom Tromey <tromey@redhat.com>
7133
7134 * Make-lang.in (c/gccspec.o): Don't use subshell.
7135
a24d975c
MP
71362013-09-18 Marek Polacek <polacek@redhat.com>
7137
7138 PR sanitize/58443
7139 * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
7140 Remove unnecessary check.
7141
ce6923c5
MP
71422013-09-18 Marek Polacek <polacek@redhat.com>
7143
7144 PR sanitizer/58411
7145 * c-typeck.c (build_binary_op): Don't sanitize function if it has the
7146 no_sanitize_undefined attribute.
7147
a1e51df9
KT
71482013-09-13 Kai Tietz <ktietz@redhat.com>
7149
7150 PR target/57848
7151 * c-decl.c (c_builtin_function_ext_scope): Remove
7152 wrong assumption that it is never called on prexisting
7153 symbol.
7154
0af94e6f
JR
71552013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
7156
7157 * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
7158
20059c8b
GDR
71592013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
7160
7161 * c-objc-common.c (c_tree_printer): Tidy.
7162
de5a5fa1
MP
71632013-08-30 Marek Polacek <polacek@redhat.com>
7164
7165 * c-typeck.c (build_binary_op): Add division by zero and shift
7166 instrumentation.
7167
2531a1d9 71682013-08-26 Joern Rennecke <joern.rennecke@embecosm.com>
0fdd4508 7169 Joseph Myers <joseph@codesourcery.com>
2531a1d9 7170
6e2bcc98 7171 PR c/35649
2531a1d9
JR
7172 * c-typeck.c (c_common_type): Prefer double_type_node over
7173 other REAL_TYPE types with the same precision.
7174 (convert_arguments): Likewise.
7175
025311c4
GDR
71762013-08-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
7177
7178 * c-objc-common.c (c_tree_printer): Document the nature of the cast.
7179 (c_initialize_diagnostics): Call a destructor for the early printer.
7180
da6ca2b5
GDR
71812013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
7182
7183 * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
7184 printer initialization.
7185
318cda85 71862013-08-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
da6ca2b5 7187
318cda85
BI
7188 PR c/57490
7189 * c-array-notation.c (fix_conditional_array_notations_1): Added a
7190 check for truth values.
7191 (expand_array_notation_exprs): Added truth values case. Removed an
7192 unwanted else. Added for-loop to walk through subtrees in default
7193 case.
7194
b066401f
GDR
71952013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
7196
7197 * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
7198
fb48aadc
JM
71992013-07-23 Joseph Myers <joseph@codesourcery.com>
7200
7201 * c-parser.c (struct c_generic_association): Fix typo.
7202
433cc7b0
TT
72032013-07-23 Tom Tromey <tromey@redhat.com>
7204 Joseph Myers <joseph@codesourcery.com>
7205
7206 * c-parser.c (struct c_generic_association): New.
7207 (c_generic_association_d): New typedef.
7208 (c_parser_generic_selection): New function.
7209 (c_parser_postfix_expression): Handle RID_GENERIC.
7210
26d40c3d
JM
72112013-07-13 Jason Merrill <jason@redhat.com>
7212
7213 PR c++/57793
7214 * c-decl.c (finish_struct): Check for too-large class.
7215
ecdbd01a 72162013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
40d3d530
JR
7217
7218 PR c/57821
7219 * c-typeck.c (set_init_index): When folding, check for index overflow.
7220
1141ed3f
BI
72212013-06-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
7222
7223 * c-parser.c (c_parser_array_notation): Removed rejection of array
7224 notations in an array of function pointers.
7225
713b46fa
BI
72262013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
7227
7228 * c-array-notation.c (make_triplet_val_inv): New function.
7229 (create_cmp_incr): Likewise.
7230 (create_array_refs): Likewise.
7231 (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
7232 Also modularized common parts between functions and called the function.
7233 (build_array_notation_expr): Likewise.
7234 (fix_conditional_array_notations_1): Likewise.
7235 (fix_array_notation_expr): Likewise.
7236 (fix_array_notation_call_expr): Likewise.
7237
92f20202
MP
72382013-06-18 Marek Polacek <polacek@redhat.com>
7239
7240 PR c/57630
7241 * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
7242
73a23b06
BI
72432013-06-12 Balaji V. Iyer <balaji.v.iyer@intel.com>
7244
7245 * c-array-notation.c (build_array_notation_expr): Reject array notation
7246 mismatch between LHS and RHS even inside a call_expr. Also, removed
7247 a couple while statements that were dead code.
7248
00b8517d
BI
72492013-06-10 Balaji V. Iyer <balaji.v.iyer@intel.com>
7250
7251 * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
7252 excessive precision expressions in function parameters. Also removed
7253 couple unwanted while statements.
7254
1509bdda
BI
72552013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
7256
7257 * c-array-notation.c (expand_array_notation_exprs): Added
7258 ARRAY_NOTATION_REF case.
ab20d992 7259
d60f1706
BI
72602013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
7261
7262 * c-array-notation.c (length_mismatch_in_expr_p): Moved this
7263 function to c-family/array-notation-common.c.
7264 (is_cilkplus_reduce_builtin): Likewise.
7265 (find_rank): Likewise.
7266 (extract_array_notation_exprs): Likewise.
7267 (replace_array_notations): Likewise.
7268 (find_inv_trees): Likewise.
7269 (replace_inv_trees): Likewise.
7270 (contains_array_notation_expr): Likewise.
7271 (find_correct_array_notation_type): Likewise.
7272 (replace_invariant_exprs): Initialized additional_tcodes to NULL.
7273 (struct inv_list): Moved this to c-family/array-notation-common.c.
7274 * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
ab20d992 7275
6d6efbb3
BI
72762013-06-05 Balaji V. Iyer <balaji.v.iyer@intel.com>
7277
7278 * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
7279 reduction functions outside the for-loop. Added a check if the fundecl
7280 is non-NULL. Finally, removed an unwanted if-statement, and made the
7281 body unconditional.
7282
25c22937
BI
72832013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
7284
7285 * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
7286 condition of the if-statement matches the rank of else-block and then-
7287 block when array notations are used.
7288 * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
7289 expression after the entire function body is parsed.
7290 (c_parser_expr_no_commas): Delayed creating array notation expressions
7291 to the end of function parsing.
7292 * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
7293 whole if-statement instead of just the condition.
ab20d992 7294 (expand_array_notation_exprs): Added MODIFY_EXPR case.
25c22937 7295
edd25645
BI
72962013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
7297
7298 PR c/57474
7299 * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
7300 array to NULL_TREE if they are unused. Also added a check for the
7301 field to be NULL before its fields are used in future.
ab20d992 7302
065ce7f1
RO
73032013-05-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
7304
7305 PR bootstrap/57450
7306 * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
7307 (build_array_notation_expr): Likewise.
7308
36536d79
BI
73092013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
7310
7311 * c-typeck.c (build_array_ref): Added a check to see if array's
7312 index is greater than one. If true, then emit an error.
7313 (build_function_call_vec): Exclude error reporting and checking
7314 for builtin array-notation functions.
7315 (convert_arguments): Likewise.
7316 (c_finish_return): Added a check for array notations as a return
7317 expression. If true, then emit an error.
7318 (c_finish_loop): Added a check for array notations in a loop
7319 condition. If true then emit an error.
7320 (lvalue_p): Added a ARRAY_NOTATION_REF case.
7321 (build_binary_op): Added a check for array notation expr inside
7322 op1 and op0. If present, we call another function to find correct
7323 type.
7324 * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
7325 * c-parser.c (c_parser_compound_statement): Check if array
7326 notation code is used in tree, if so, then transform them into
7327 appropriate C code.
7328 (c_parser_expr_no_commas): Check if array notation is used in LHS
7329 or RHS, if so, then build array notation expression instead of
7330 regular modify.
7331 (c_parser_postfix_expression_after_primary): Added a check for
7332 colon(s) after square braces, if so then handle it like an array
7333 notation. Also, break up array notations in unary op if found.
7334 (c_parser_direct_declarator_inner): Added a check for array
7335 notation.
7336 (c_parser_compound_statement): Added a check for array notation in
7337 a stmt. If one is present, then expand array notation expr.
7338 (c_parser_if_statement): Likewise.
7339 (c_parser_switch_statement): Added a check for array notations in
7340 a switch statement's condition. If true, then output an error.
7341 (c_parser_while_statement): Similarly, but for a while.
7342 (c_parser_do_statement): Similarly, but for a do-while.
7343 (c_parser_for_statement): Similarly, but for a for-loop.
7344 (c_parser_unary_expression): Check if array notation is used in a
7345 pre-increment or pre-decrement expression. If true, then expand
7346 them.
7347 (c_parser_array_notation): New function.
7348 * c-array-notation.c: New file.
7349 * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
ab20d992 7350
cd192ccc
MS
73512013-05-23 Mike Stump <mikestump@comcast.net>
7352
7353 * c-typeck.c (convert_for_assignment): Handle references to memory
7354 spaces better.
7355
427b248d
JM
73562013-05-16 Jason Merrill <jason@redhat.com>
7357
7358 * Make-lang.in (cc1$(exeext)): Use link mutex.
7359
44d90fe1
PC
73602013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
7361
7362 * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
7363 to simply use OPT_Wpointer_arith.
7364 (build_unary_op): Likewise.
7365
4e7d7b3d
JJ
73662013-04-03 Jakub Jelinek <jakub@redhat.com>
7367
7368 PR c/19449
7369 * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
7370 argument. If set, or it temporarily for parsing of the first
7371 argument into force_folding_builtin_constant_p.
7372 (c_parser_postfix_expression): Adjust callers.
7373
839b422f
RB
73742013-03-21 Richard Biener <rguenther@suse.de>
7375
7376 * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
7377 instead of DECL_DEBUG_EXPR_IS_FROM. Guard properly.
7378
2ee028f1
MP
73792013-02-12 Marek Polacek <polacek@redhat.com>
7380
7381 PR c/44938
7382 * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
7383 origtypes to NULL.
7384
8824edff
JJ
73852013-01-24 Jakub Jelinek <jakub@redhat.com>
7386
7387 PR c/56078
7388 * c-typeck.c (set_nonincremental_init_from_string): If
7389 constructor_max_index is NULL, treat it as if tree_int_cst_lt
7390 returned false.
7391 (process_init_element): Likewise.
7392
eadd3d0d
JJ
73932012-12-20 Jakub Jelinek <jakub@redhat.com>
7394
7395 PR c++/55619
7396 * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
7397 argument, don't call default_function_array_conversion
7398 nor c_fully_fold here.
7399 (c_parser_asm_statement): Adjust callers.
7400 * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
7401 and outputs here, and call default_function_array_conversion
7402 on inputs that don't need to be addressable.
7403
f8a93a2e
JJ
74042012-12-18 Jakub Jelinek <jakub@redhat.com>
7405
7406 PR c/39464
7407 * c-typeck.c (convert_for_assignment): For -Wpointer-sign
7408 warning require that both c_common_unsigned_type as well as
7409 c_common_signed_type is the same for both mvl and mvr types.
7410
9771b263
DN
74112012-11-16 Diego Novillo <dnovillo@google.com>
7412
7413 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
7414
7415 * c-common.c: Use new vec API in vec.h.
7416 * c-common.h: Likewise.
7417 * c-gimplify.c: Likewise.
7418 * c-pragma.c: Likewise.
7419 * c-pretty-print.c: Likewise.
7420 * c-pretty-print.h: Likewise.
7421 * c-semantics.c: Likewise.
7422 * c-decl.c: Likewise.
7423 * c-parser.c: Likewise.
7424 * c-tree.h: Likewise.
7425 * c-typeck.c: Likewise.
7426
880661a4
JW
74272012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
7428
7429 PR c++/54930
7430 * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
7431
077d1abe
MLI
74322012-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
7433
7434 PR c/53066
7435 * c-decl.c (warn_if_shadowing): Do not warn if a variable
7436 shadows a function, unless the variable is a function or a
7437 pointer-to-function.
7438
3a785c97
JJ
74392012-10-12 Jakub Jelinek <jakub@redhat.com>
7440
7441 PR c/54381
7442 * c-parser.c (struct c_tree_loc_pair): Removed.
7443 (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
7444 add location_t * and tree * arguments, fill in array of 3
7445 sizeof_arg trees and corresponding locs.
7446 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
7447 c_parser_expr_list callers.
7448 (c_parser_postfix_expression_after_primary): Likewise. Pass
7449 array of 3 sizeof_arg trees and locs (corresponding to first
7450 3 arguments) to sizeof_pointer_memaccess_warning.
7451
703c8606
LC
74522012-10-09 Lawrence Crowl <crowl@google.com>
7453
7454 * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
7455 * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
7456 hash table.
7457
5d9de0d0
PC
74582012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
7459
7460 PR c++/54194
7461 * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
7462 call.
7463
a212e43f
MG
74642012-10-09 Marc Glisse <marc.glisse@inria.fr>
7465
7466 PR c++/54427
7467 * c-typeck.c: Include c-common.h.
7468 (enum stv_conv): Moved to c-common.h.
7469 (scalar_to_vector): Moved to c-common.c.
7470 (build_binary_op): Adapt to scalar_to_vector's new prototype.
7471 * Make-lang.in: c-typeck.c depends on c-common.h.
7472
3b78de56
AC
74732012-10-04 Arnaud Charlet <charlet@adacore.com>
7474
7475 * c-decl.c (c_write_global_declarations): Fix handling of
7476 -fdump-ada-spec*.
7477
78c60e3d
SS
74782012-09-30 Sharad Singhai <singhai@google.com>
7479
7480 * c-decl.c (c_write_global_declarations): Use a different method
7481 to determine if the dump has ben initialized.
7482
9f33203d
JM
74832012-09-14 Joseph Myers <joseph@codesourcery.com>
7484
7485 PR c/54552
7486 * c-typeck.c (c_cast_expr): When casting to a type requiring
7487 C_MAYBE_CONST_EXPR to be created, pass the inner expression to
7488 c_fully_fold first.
7489
a27d595d
JM
74902012-09-14 Joseph Myers <joseph@codesourcery.com>
7491
7492 PR c/54103
7493 * c-typeck.c (build_unary_op): Pass original argument of
7494 TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
7495 any C_MAYBE_CONST_EXPR, if it has integer operands.
7496 (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
7497 TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
7498 to c_objc_common_truthvalue_conversion, then remove any
7499 C_MAYBE_CONST_EXPR, if they have integer operands. Use
7500 c_objc_common_truthvalue_conversion not
7501 c_common_truthvalue_conversion.
7502 (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
7503 call note_integer_operands for arguments with integer operands
7504 that are not integer constants.
7505
9feb29df
JJ
75062012-09-13 Jakub Jelinek <jakub@redhat.com>
7507
7508 PR c/54559
7509 * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
7510 COMPLEX_TYPE with in_late_binary_op set temporarily to true.
7511
d409320c
JJ
75122012-08-31 Jakub Jelinek <jakub@redhat.com>
7513
7514 PR c/54428
7515 * c-convert.c (convert): Don't call fold_convert_loc if
7516 TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
7517 is a COMPLEX_EXPR. Remove TYPE_MAIN_VARIANT check from
7518 COMPLEX_TYPE -> COMPLEX_TYPE conversion.
7519
6265d07c
JJ
75202012-08-24 Jakub Jelinek <jakub@redhat.com>
7521
7522 PR c/54355
7523 * c-decl.c (c_parser_label): Pass true as nested and fix up comments
7524 for nested and empty_ok arguments in the call to
7525 c_parser_declaration_or_fndef.
7526
1a4049e7
JJ
75272012-08-17 Jakub Jelinek <jakub@redhat.com>
7528
7529 * c-tree.h (c_last_sizeof_arg): Declare.
7530 * c-parser.c (struct c_tree_loc_pair): New type.
7531 (c_parser_expr_list): Add sizeof_arg argument. Fill it in if
7532 non-NULL.
7533 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
7534 (c_parser_postfix_expression_after_primary): Likewise. Call
7535 sizeof_pointer_memaccess_warning if needed.
7536 (sizeof_ptr_memacc_comptypes): New function.
7537 * c-typeck.c (c_last_sizeof_arg): New global variable.
7538 (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
7539
0229aee9
UB
75402012-07-24 Uros Bizjak <ubizjak@gmail.com>
7541
7542 * c-lang.h (lang_decl): Add variable_size GTY option.
7543
7ee2468b
SB
75442012-07-16 Steven Bosscher <steven@gcc.gnu.org>
7545
7546 * c-decl.c: Include dumpfile.h instead of tree-dump.h.
7547 * Make-lang.in: Fix dependencies.
7548
d4a10d0a
SB
75492012-06-29 Steven Bosscher <steven@gcc.gnu.org>
7550
7551 * Make-lang.in: New file, rules migrated from gcc/Makefile.in
7552 and add language Makefile hooks.
7553 * config-lang.in: New file.
7554 * c-config-lang.in: Moved from gcc/config-lang.in to here, and
7555 add the required "normal" config-lang.in rules.
7556 * c-lang.h: Moved from gcc/ to here.
7557 * c-tree.h: Likewise.
7558 * c-objc-common.c: Likewise.
7559 * c-objc-common.h: Likewise.
7560 * c-typeck.c: Likewise.
7561 * c-convert.c: Likewise.
7562 * c-lang.c: Likewise.
7563 * c-aux-info.c: Likewise.
7564 * c-errors.c: Likewise.
7565 * gccspec.c: Likewise.
7566 * c-decl.c: Likewise. Include gt-c-c-decl.h, not gt-c-decl.h.
7567 * c-parser.c: Likewise. Include gt-c-c-parser.h, not gt-c-parser.h.
7568\f
c48514be 7569Copyright (C) 2012-2021 Free Software Foundation, Inc.
d4a10d0a
SB
7570
7571Copying and distribution of this file, with or without modification,
7572are permitted in any medium without royalty provided the copyright
7573notice and this notice are preserved.