]> gcc.gnu.org Git - gcc.git/blame - gcc/c/ChangeLog
testsuite: Fix up a testcase to find the right ISO_Fortran_binding.h.
[gcc.git] / gcc / c / ChangeLog
CommitLineData
2f7f0d32
GA
12021-01-15 Jakub Jelinek <jakub@redhat.com>
2
3 * c-typeck.c (c_finish_omp_clauses): For reduction build array with
4 unqualified element type and then call c_build_qualified_type on the
5 ARRAY_TYPE.
6
7d187e4f
GA
72021-01-07 Richard Biener <rguenther@suse.de>
8
9 * gimple-parser.c (c_parser_gimple_compound_statement): Only
10 reallocate loop array if it is too small.
11
eefe499f
GA
122020-12-16 Martin Uecker <muecker@gwdg.de>
13
14 PR c/98047
15 * c-typeck.c (build_modify_expr): Drop qualifiers.
16
172020-12-16 Martin Uecker <muecker@gwdg.de>
18
19 PR c/98260
20 * c-parser.c (c_parser_expression): Look into
21 nop expression when marking expressions as read.
22
d52945ce
GA
232020-12-14 Martin Liska <mliska@suse.cz>
24
25 PR sanitizer/98204
26 * c-typeck.c (pointer_diff): Do not emit a top-level
27 sanitization.
28 (build_binary_op): Likewise.
29
ca2bd949
GA
302020-12-09 Tobias Burnus <tobias@codesourcery.com>
31
32 * c-parser.c (c_parser_omp_allocate): New.
33 (c_parser_omp_construct): Call it.
34
352020-12-09 Richard Biener <rguenther@suse.de>
36
37 PR c/98200
38 * gimple-parser.c (c_parser_gimple_postfix_expression): Return
39 early on error.
40
bc8a7013
GA
412020-12-07 Martin Uecker <muecker@gwdg.de>
42
43 PR c/97981
44 * c-typeck.c (convert_lvalue_to_rvalue): Move the code
45 that drops qualifiers to the end of the function.
46
d48df6f2
GA
472020-11-26 Martin Uecker <muecker@gwdg.de>
48
49 PR c/65455
50 PR c/92935
51 * c-parser.c (c_parser_declaration_or_fndef): Remove
52 redundant code to drop qualifiers of _Atomic types for __auto_type.
53 (c_parser_typeof_specifier): Do not drop qualifiers of _Atomic
54 types for __typeof__.
55
1e2c9a27
GA
562020-11-24 Jakub Jelinek <jakub@redhat.com>
57
58 PR c/97958
59 * c-parser.c (c_parser_binary_expression): For omp atomic binary
60 expressions, use make_node instead of build2 to avoid checking build2
61 performs.
62
8e6198d0
GA
632020-11-23 Joseph Myers <joseph@codesourcery.com>
64
65 PR c/95630
66 * c-typeck.c (build_binary_op): Use pedwarn_c99 with OPT_Wpedantic
67 for comparisons of complete and incomplete pointers.
68
7a97e2fc
GA
692020-11-21 Aaron Sawdey <acsawdey@linux.ibm.com>
70
71 * c-aux-info.c (gen_type): Support opaque types.
72
82e5048e
GA
732020-11-20 Martin Sebor <msebor@redhat.com>
74
75 PR middle-end/97879
76 * c-decl.c (start_function): Set ATTR_FLAG_INTERNAL in flags.
77
782020-11-20 Jakub Jelinek <jakub@redhat.com>
79
80 PR other/97911
81 * Make-lang.in (c.serial): Change from goal to a variable.
82 (.PHONY): Drop c.serial.
83
842020-11-20 Martin Uecker <muecker@gwdg.de>
85
86 * c-typeck.c (convert_lvalue_to_rvalue): Drop qualifiers.
87
d62586ee
GA
882020-11-19 Jakub Jelinek <jakub@redhat.com>
89
90 PR c/97860
91 * c-decl.c (get_parm_array_spec): Bail out of nelts is
92 error_operand_p.
93
25bb75f8
GA
942020-11-18 Jakub Jelinek <jakub@redhat.com>
95
96 * Make-lang.in (c.serial): New goal.
97 (.PHONY): Add c.serial c.prev.
98 (cc1$(exeext)): Call LINK_PROGRESS.
99
77f67db2
GA
1002020-11-13 Vladimir N. Makarov <vmakarov@redhat.com>
101
102 * c-parser.c (c_parser_asm_statement): Parse outputs for asm
103 goto too.
104 * c-typeck.c (build_asm_expr): Remove an assert checking output
105 absence for asm goto.
106
1072020-11-13 Jakub Jelinek <jakub@redhat.com>
108
109 * c-typeck.c (c_finish_omp_clauses): Don't clear
110 OMP_CLAUSE_REDUCTION_INSCAN unless reduction_seen == -2.
111
1122020-11-13 Iain Sandoe <iain@sandoe.co.uk>
113
114 PR objc/77404
115 * c-parser.c (c_parser_objc_class_definition): Pass the
116 location of the class name to the interface declaration.
117
bb622641
GA
1182020-11-10 Strager Neds <strager.nds@gmail.com>
119
120 * c-decl.c (merge_decls): Use new overload of
121 set_decl_section_name.
122
1232020-11-10 Chung-Lin Tang <cltang@codesourcery.com>
124
125 * c-parser.c (c_parser_omp_target_data): Add use of
126 new c_omp_adjust_map_clauses function. Add GOMP_MAP_ATTACH_DETACH as
127 handled map clause kind.
128 (c_parser_omp_target_enter_data): Likewise.
129 (c_parser_omp_target_exit_data): Likewise.
130 (c_parser_omp_target): Likewise.
131 * c-typeck.c (handle_omp_array_sections): Adjust COMPONENT_REF case to
132 use GOMP_MAP_ATTACH_DETACH map kind for C_ORT_OMP region type.
133 (c_finish_omp_clauses): Adjust bitmap checks to allow struct decl and
134 same struct field access to co-exist on OpenMP construct.
135
2da7ee05
GA
1362020-11-07 Martin Uecker <muecker@gwdg.de>
137
138 * c-parser.c (c_parser_label): Implement mixing of labels and code.
139 (c_parser_all_labels): Likewise.
140
44cab2d8
GA
1412020-11-06 Iain Sandoe <iain@sandoe.co.uk>
142
143 * c-parser.c (c_parser_objc_at_property_declaration):
144 Improve parsing fidelity. Associate better location info
145 with @property attributes. Clean up the interface to
146 objc_add_property_declaration ().
147
1482020-11-06 Nathan Sidwell <nathan@acm.org>
149
150 * c-decl.c (diagnose_mismatched_decls): Rename
151 DECL_IS_BUILTIN->DECL_IS_UNDECLARED_BUILTIN.
152 (warn_if_shadowing, implicitly_declare, names_builtin_p)
153 (collect_source_refs): Likewise.
154 * c-typeck.c (inform_declaration, inform_for_arg)
155 (convert_for_assignment): Likewise.
156
1572020-11-06 Tobias Burnus <tobias@codesourcery.com>
158
159 * c-parser.c (c_parser_omp_atomic): Add openacc parameter and update
160 OpenACC matching.
161 (c_parser_omp_construct): Update call.
162
35c125cb
GA
1632020-11-04 Jakub Jelinek <jakub@redhat.com>
164
165 PR c++/97670
166 * c-typeck.c (c_finish_omp_clauses): Look through array reductions to
167 find underlying decl to clear in the aligned_head bitmap.
168
1692020-11-04 Joseph Myers <joseph@codesourcery.com>
170
171 * c-decl.c (handle_nodiscard_attribute): New.
172 (std_attribute_table): Add nodiscard.
173 * c-parser.c (c_parser_std_attribute): Expect argument to
174 nodiscard attribute to be a string. Do not special-case ignoring
175 nodiscard.
176 * c-typeck.c (maybe_warn_nodiscard): New.
177 (build_compound_expr, emit_side_effect_warnings): Call
178 maybe_warn_nodiscard.
179 (c_process_expr_stmt, c_finish_stmt_expr): Also call
180 emit_side_effect_warnings if warn_unused_result.
181
4f0606fe
GA
1822020-10-29 Asher Gordon <AsDaGo@posteo.net>
183
184 * c-typeck.c (free_all_tagged_tu_seen_up_to): Replace free
185 with XDELETE.
186 (finish_init): Likewise.
187 (pop_init_level): Likewise.
188
e93aae4a
GA
1892020-10-28 Joseph Myers <joseph@codesourcery.com>
190
191 * c-decl.c (store_parm_decls_newstyle): Use pedwarn_c11 not
192 error_at for omitted parameter name.
193
1942020-10-28 Jakub Jelinek <jakub@redhat.com>
195
196 * c-parser.c (c_parser_omp_clause_name): Handle allocate.
197 (c_parser_omp_clause_allocate): New function.
198 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_ALLOCATE.
199 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
200 OMP_PARALLEL_CLAUSE_MASK, OMP_SINGLE_CLAUSE_MASK,
201 OMP_TASK_CLAUSE_MASK, OMP_TASKGROUP_CLAUSE_MASK,
202 OMP_DISTRIBUTE_CLAUSE_MASK, OMP_TEAMS_CLAUSE_MASK,
203 OMP_TARGET_CLAUSE_MASK, OMP_TASKLOOP_CLAUSE_MASK): Add
204 PRAGMA_OMP_CLAUSE_ALLOCATE.
205 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_ALLOCATE.
206
89bb01e7
GA
2072020-10-27 Joseph Myers <joseph@codesourcery.com>
208
209 * c-parser.c (c_parser_std_attribute_specifier): Allow duplicate
210 standard attributes.
211
efe71fcc
GA
2122020-10-23 Marek Polacek <polacek@redhat.com>
213
214 PR c++/91741
215 * c-parser.c (c_parser_binary_expression): Implement -Wsizeof-array-div.
216 (c_parser_postfix_expression): Set PAREN_SIZEOF_EXPR.
217 (c_parser_expr_list): Handle PAREN_SIZEOF_EXPR like SIZEOF_EXPR.
218 * c-tree.h (char_type_p): Declare.
219 * c-typeck.c (char_type_p): No longer static.
220
2212020-10-23 Martin Sebor <msebor@redhat.com>
222
223 PR middle-end/97552
224 * c-decl.c (get_parm_array_spec): Handle static VLA parameters.
225
2fe5b7d1
GA
2262020-09-19 Martin Sebor <msebor@redhat.com>
227
228 PR c/50584
229 * c-decl.c (lookup_last_decl): Define new function.
230 (c_decl_attributes): Call it.
231 (start_decl): Add argument and use it.
232 (finish_decl): Call build_attr_access_from_parms and decl_attributes.
233 (get_parm_array_spec): Define new function.
234 (push_parm_decl): Call get_parm_array_spec.
235 (start_function): Call warn_parm_array_mismatch. Build attribute
236 access and add it to current function.
237 * c-parser.c (c_parser_declaration_or_fndef): Diagnose mismatches
238 in forms of array parameters.
239 * c-tree.h (start_decl): Add argument.
240
2412020-09-19 Sandra Loosemore <sandra@codesourcery.com>
242
243 * c-decl.c (c_break_label, c_cont_label): Delete, and replace
244 with...
245 (in_statement): New.
246 (start_function): Adjust for above change.
247 (c_push_function_context, c_pop_function_context): Likewise.
248 * c-lang.h (struct language_function): Likewise.
249 * c-objc-common.h (LANG_HOOKS_BLOCK_MAY_FALLTHRU): Define.
250 * c-parser.c (objc_foreach_break_label, objc_foreach_continue_label):
251 New.
252 (c_parser_statement_after_labels): Adjust calls to c_finish_bc_stmt.
253 (c_parser_switch_statement): Adjust break/switch context handling
254 and calls to renamed functions.
255 (c_parser_while_statement): Adjust break/switch context handling and
256 build a WHILE_STMT.
257 (c_parser_do_statement): Ditto, with DO_STMT respectively.
258 (c_parser_for_statement): Ditto, with FOR_STMT respectively.
259 (c_parser_omp_for_loop): Adjust break/switch context handling.
260 * c-tree.h (c_break_label, c_cont_label): Delete.
261 (IN_SWITCH_STMT, IN_ITERATION_STMT): Define.
262 (IN_OMP_BLOCK, IN_OMP_FOR, IN_OBJC_FOREACH): Define.
263 (in_statement, switch_statement_break_seen_p): Declare.
264 (c_start_case, c_finish_case): Renamed to...
265 (c_start_switch, c_finish_switch).
266 (c_finish_bc_stmt): Adjust arguments.
267 * c-typeck.c (build_function_call_vec): Don't try to print
268 statements with %qE format.
269 (struct c_switch): Rename switch_expr field to switch_stmt.
270 Add break_stmt_seen_p field.
271 (c_start_case): Rename to c_start_switch. Build a SWITCH_STMT
272 instead of a SWITCH_EXPR. Update for changes to struct c_switch.
273 (do_case): Update for changes to struct c_switch.
274 (c_finish_case): Rename to c_finish_switch. Update for changes to
275 struct c_switch and change of representation from SWITCH_EXPR to
276 SWITCH_STMT.
277 (c_finish_loop): Delete.
278 (c_finish_bc_stmt): Update to reflect changes to break/continue
279 state representation. Build a BREAK_STMT or CONTINUE_STMT instead
280 of a GOTO_EXPR except for objc foreach loops.
281
e1a4a8a0
GA
2822020-09-01 Jakub Jelinek <jakub@redhat.com>
283
284 PR c++/96867
285 * c-typeck.c (handle_omp_array_sections_1): Test C_ARRAY_PARAMETER
286 only on PARM_DECLs.
287
8f7ea26a
GA
2882020-08-28 Martin Sebor <msebor@redhat.com>
289
290 PR c/96596
291 * c-decl.c (match_builtin_function_types): Avoid dealing with erroneous
292 argument type.
293
8b394f01
GA
2942020-08-27 Martin Liska <mliska@suse.cz>
295
296 * gimple-parser.c (c_parser_gimple_compound_statement): Set exact argument of a vector
297 growth function to true.
298
db0f6efe
GA
2992020-08-25 Tobias Burnus <tobias@codesourcery.com>
300
301 PR c/96678
302 * c-typeck.c (handle_omp_array_sections_1): Talk about
303 array function parameter in the error message.
304
5c265693
GA
3052020-08-18 Jakub Jelinek <jakub@redhat.com>
306
307 PR c/96571
308 * c-parser.c (c_parser_generic_selection): Change match_found from bool
309 to int, holding index of the match. Call mark_exp_read on the selector
310 expression and on expressions other than the selected one.
311
4967ca2f
GA
3122020-08-01 Richard Sandiford <richard.sandiford@arm.com>
313
314 PR c/96377
315 * c-typeck.c (process_init_element): Split test for whether to
316 recurse into a record, union or array into...
317 (initialize_elementwise_p): ...this new function. Don't recurse
318 into a vector type if the initialization value is also a vector.
319
48cc2e46
GA
3202020-07-31 Richard Biener <rguenther@suse.de>
321
322 PR debug/96383
323 * c-objc-common.h (LANG_HOOKS_FINALIZE_EARLY_DEBUG):
324 Define to c_common_finalize_early_debug.
325
3ea9abca
GA
3262020-07-22 Tobias Burnus <tobias@codesourcery.com>
327
328 * c-parser.c (c_parser_omp_clause_hint): Require nonnegative hint clause.
329 (c_parser_omp_critical): Permit hint(0) clause without named critical.
330 (c_parser_omp_construct): Don't assert if error_mark_node is returned.
331
30430061
GA
3322020-07-21 Sunil K Pandey <skpgkp2@gmail.com>
333
334 PR target/95237
335 * c-decl.c (finish_decl): Call target hook
336 lower_local_decl_alignment to lower local decl alignment.
337
3f8ca9cb
GA
3382020-07-09 Julian Brown <julian@codesourcery.com>
339 Thomas Schwinge <thomas@codesourcery.com>
340
341 PR middle-end/95270
342 * c-typeck.c (c_finish_omp_clauses): Set OMP_CLAUSE_SIZE (bias) to zero
343 for standalone attach/detach clauses.
344
a82c4c4c 3452020-07-08 Eric Botcazou <ebotcazou@adacore.com>
50873cc5
GA
346
347 * c-typeck.c (convert_for_assignment): If -Wscalar-storage-order is
348 set, warn for conversion between pointers that point to incompatible
349 scalar storage orders.
350
f60ee68d
GA
3512020-07-07 Kaipeng Zhou <zhoukaipeng3@huawei.com>
352
353 * c-parser.c (c_parser_statement_after_labels): Pass correct
354 parameters to c_parser_do_statement.
355
56638b9b
GA
3562020-06-16 Jakub Jelinek <jakub@redhat.com>
357
358 * c-parser.c (c_parser_expr_no_commas): Save, clear and restore
359 c_in_omp_for.
360 (c_parser_omp_for_loop): Set c_in_omp_for around some calls to avoid
361 premature c_fully_fold. Defer explicit c_fully_fold calls to after
362 c_finish_omp_for.
363 * c-tree.h (c_in_omp_for): Declare.
364 * c-typeck.c (c_in_omp_for): Define.
365 (build_modify_expr): Avoid c_fully_fold if c_in_omp_for.
366 (digest_init): Likewise.
367 (build_binary_op): Likewise.
368
3692020-06-16 Jakub Jelinek <jakub@redhat.com>
370
371 * c-parser.c (c_parser_omp_clause_schedule): Reject modifier separated
372 from kind by comma rather than colon.
373
1a59f3db
GA
3742020-06-05 Mark Wielaard <mark@klomp.org>
375
376 * c-decl.c (implicit_decl_warning): When warned and olddecl is
377 an undeclared builtin, then add a fixit header hint, if found.
378 (implicitly_declare): Add OPT_Wbuiltin_declaration_mismatch to
379 warning_at about implicit builtin declaration type mismatch.
380
9a5b7438
GA
3812020-06-03 Mark Wielaard <mark@klomp.org>
382
383 * c-parser.c (struct c_parser): Add seen_string_literal
384 bitfield.
385 (c_parser_consume_token): Reset seen_string_literal.
386 (c_parser_error_richloc): Add name_hint if seen_string_literal
387 and next token is a CPP_NAME and we have a missing header
388 suggestion for the name.
389 (c_parser_string_literal): Set seen_string_literal.
390
3912020-06-03 Mark Wielaard <mark@klomp.org>
392
393 * c-parser.c (c_parser_postfix_expression_after_primary): Add
394 scope with matching_parens after CPP_OPEN_PAREN.
395
3962020-06-03 Tobias Burnus <tobias@codesourcery.com>
397
398 * c-objc-common.h (LANG_HOOKS_OMP_PREDETERMINED_MAPPING): Redefine.
399
53ffb43a
GA
4002020-05-28 Nicolas Bértolo <nicolasbertolo@gmail.com>
401
402 * Make-lang.in: Remove extra slash.
403
8f66f175
ML
4042020-05-19 Martin Liska <mliska@suse.cz>
405
406 * c-parser.c: Fix typo.
407
49ddde69
JJ
4082020-05-14 Jakub Jelinek <jakub@redhat.com>
409
410 * c-parser.c (c_parser_omp_target): Set cfun->has_omp_target.
411
eb72dc66
RB
4122020-05-07 Richard Biener <rguenther@suse.de>
413
414 PR middle-end/94703
415 * gimple-parser.c (c_parser_parse_ssa_name): Do not set
416 DECL_GIMPLE_REG_P.
417
bf915591
JJ
4182020-04-30 Jakub Jelinek <jakub@redhat.com>
419
420 PR c/94842
421 * c-decl.c (set_labels_context_r): In addition to context-less
422 LABEL_DECLs adjust also LABEL_DECLs with context equal to
423 parent function if any.
424 (store_parm_decls): Adjust comment.
425
e1113ffb
JJ
4262020-04-19 Jakub Jelinek <jakub@redhat.com>
427
428 PR objc/94637
429 * c-parser.c (c_parser_objc_selector_arg): Handle CPP_SCOPE like
430 two CPP_COLON tokens.
431
2e389749
JJ
4322020-04-17 Jakub Jelinek <jakub@redhat.com>
433
434 PR other/94629
435 * c-parser.c (c_parser_oacc_routine): Remove redundant assignment
436 to data.clauses.
437
2dc9294c
JJ
4382020-04-15 Jakub Jelinek <jakub@redhat.com>
439
440 PR c/94593
441 * c-parser.c (c_parser_pragma) <case PRAGMA_OMP_REQUIRES>: Reject
442 requires directive when not at file scope.
443
13e41d8b
TB
4442020-04-08 Tobias Burnus <tobias@codesourcery.com>
445
446 PR middle-end/94120
447 * c-decl.c (c_check_in_current_scope): New function.
448 * c-tree.h (c_check_in_current_scope): Declare it.
449 * c-parser.c (c_parser_oacc_declare): Add check that variables
450 are declared in the same scope as the directive. Fix handling
451 of namespace vars.
452
4df50a05
JJ
4532020-04-07 Jakub Jelinek <jakub@redhat.com>
454
455 PR c++/94512
456 * c-parser.c (c_parser_omp_parallel): Set OMP_PARALLEL_COMBINED
457 if c_parser_omp_master succeeded.
458
5db9e893
JJ
4592020-03-23 Jakub Jelinek <jakub@redhat.com>
460
461 PR gcov-profile/94029
462 PR c/94239
463 * c-parser.c (c_parser_declaration_or_fndef): Initialize endloc to
464 the function_start_locus location. Don't do that afterwards for the
465 __GIMPLE body parsing.
466
9def91e9
JJ
4672020-03-19 Jakub Jelinek <jakub@redhat.com>
468
469 PR gcov-profile/94029
470 * c-tree.h (finish_function): Add location_t argument defaulted to
471 input_location.
472 * c-parser.c (c_parser_compound_statement): Add endlocp argument and
473 set it to the locus of closing } if non-NULL.
474 (c_parser_compound_statement_nostart): Return locus of closing }.
475 (c_parser_parse_rtl_body): Likewise.
476 (c_parser_declaration_or_fndef): Propagate locus of closing } to
477 finish_function.
478 * c-decl.c (finish_function): Add end_loc argument, use it instead of
479 input_location to set function_end_locus.
480
046c5890
JJ
4812020-03-17 Jakub Jelinek <jakub@redhat.com>
482
483 PR c/94172
484 * c-tree.h (C_TYPE_INCOMPLETE_VARS): Define to TYPE_LANG_SLOT_1
485 instead of TYPE_VFIELD, and support it on {RECORD,UNION,ENUMERAL}_TYPE.
486 (TYPE_ACTUAL_ARG_TYPES): Check that it is only used on FUNCTION_TYPEs.
487 * c-decl.c (pushdecl): Push C_TYPE_INCOMPLETE_VARS also to
488 ENUMERAL_TYPEs.
489 (finish_incomplete_vars): New function, moved from finish_struct. Use
490 relayout_decl instead of layout_decl.
491 (finish_struct): Remove obsolete comment about C_TYPE_INCOMPLETE_VARS
492 being TYPE_VFIELD. Use finish_incomplete_vars.
493 (finish_enum): Clear C_TYPE_INCOMPLETE_VARS. Call
494 finish_incomplete_vars.
495 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
496 also on ENUMERAL_TYPEs.
497
c015ff8c
JJ
4982020-03-16 Jakub Jelinek <jakub@redhat.com>
499
500 PR c/94179
501 * c-fold.c (c_fully_fold_internal): Handle MEM_REF.
502
f2e9fe5f
MS
5032020-03-13 Martin Sebor <msebor@redhat.com>
504
505 PR c/94040
506 * c-decl.c (builtin_structptr_type_count): New constant.
507 (match_builtin_function_types): Reject decls that are incompatible
508 in types pointed to by pointers.
509 (diagnose_mismatched_decls): Adjust comments.
510
c9d70946
JM
5112020-03-05 Joseph Myers <joseph@codesourcery.com>
512
513 PR c/93577
514 * c-typeck.c (pop_init_level): Do not diagnose initializers as
515 empty when initialized type is error_mark_node.
516 (set_designator, process_init_element): Ignore initializers for
517 elements of a variable-size type or of error_mark_node.
518
726e292d
MS
5192020-03-01 Martin Sebor <msebor@redhat.com>
520
521 PR middle-end/93926
522 * c-decl.c (types_close_enough_to_match): New function.
523 (match_builtin_function_types):
524 (diagnose_mismatched_decls): Add missing inform call to a warning.
525
a499c2f8
MS
5262020-03-01 Martin Sebor <msebor@redhat.com>
527
528 PR c/93812
529 * c-typeck.c (build_functype_attribute_variant): New function.
530 (composite_type): Call it.
531
9c3da8cc
JJ
5322020-02-25 Jakub Jelinek <jakub@redhat.com>
533
534 PR other/93912
535 * gimple-parser.c (c_parser_gimple_parse_bb_spec_edge_probability):
536 Rename last argument from probablity to probability.
537
bacdd5e9
JJ
5382020-02-13 Jakub Jelinek <jakub@redhat.com>
539
540 PR c/93576
541 * c-decl.c (grokdeclarator): If this_size_varies, only push size into
542 *expr if it has side effects.
543
f9eb0973
JL
5442020-01-30 Jeff Law <law@redhat.com>
545
546 PR c/88660
547 * c-parser.c (c_parser_switch_statement): Make sure to request
548 marking the switch expr as used.
549
ac68e287
JM
5502020-01-22 Joseph Myers <joseph@codesourcery.com>
551
552 PR c/93348
553 * c-typeck.c (build_c_cast): Call remove_c_maybe_const_expr on
554 argument with integer operands.
555
852f0ae8
KK
5562020-01-16 Kerem Kat <keremkat@gmail.com>
557
558 PR c/92833
559 * c-parser.c (c_parser_consume_token): Fix peeked token stack pop
560 to support 4 available tokens.
561
e2346a33
JM
5622020-01-15 Joseph Myers <joseph@codesourcery.com>
563
564 PR c/93072
565 * c-decl.c (pushdecl): Use TREE_PUBLIC, not DECL_EXTERNAL, to
566 determine whether to set DECL_CONTEXT.
567
3d77686d
JM
5682020-01-13 Joseph Myers <joseph@codesourcery.com>
569
570 PR c/93241
571 * c-typeck.c (build_c_cast): Check for expressions with integer
572 operands that can occur in an unevaluated part of an integer
573 constant expression and call note_integer_operands as needed.
574
f74c4b2c
RB
5752019-01-08 Richard Biener <rguenther@suse.de>
576
577 PR middle-end/93199
578 * gimple-parser.c (c_parser_parse_gimple_body): Remove __PHI IFN
579 permanently.
580
8d9254fc
JJ
5812020-01-01 Jakub Jelinek <jakub@redhat.com>
582
583 Update copyright years.
584
39292e25
EB
5852019-12-20 Eric Botcazou <ebotcazou@adacore.com>
586
587 * c-decl.c (collect_source_ref_cb): Delete.
588 (for_each_global_decl): Rename into...
589 (collect_source_refs): ...this. Call collect_source_ref directly.
590 (c_parse_final_cleanups): Always call collect_source_ref on the main
591 input filename.
592
519d7496
JB
5932019-12-19 Julian Brown <julian@codesourcery.com>
594 Cesar Philippidis <cesar@codesourcery.com>
595
596 * c-parser.c (c_parser_omp_clause_name): Add parsing of attach and
597 detach clauses.
598 (c_parser_omp_variable_list): Add ALLOW_DEREF optional parameter.
599 Allow deref (->) in variable lists if true.
600 (c_parser_omp_var_list_parens): Add ALLOW_DEREF optional parameter.
601 Pass to c_parser_omp_variable_list.
602 (c_parser_oacc_data_clause): Support attach and detach clauses. Update
603 call to c_parser_omp_variable_list.
604 (c_parser_oacc_all_clauses): Support attach and detach clauses.
605 (OACC_DATA_CLAUSE_MASK, OACC_ENTER_DATA_CLAUSE_MASK,
606 OACC_KERNELS_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK,
607 OACC_SERIAL_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_ATTACH.
608 (OACC_EXIT_DATA_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_DETACH.
609 * c-typeck.c (handle_omp_array_sections_1): Reject subarrays for attach
610 and detach. Support deref.
611 (handle_omp_array_sections): Use GOMP_MAP_ATTACH_DETACH instead of
612 GOMP_MAP_ALWAYS_POINTER for OpenACC.
613 (c_oacc_check_attachments): New function.
614 (c_finish_omp_clauses): Check attach/detach arguments for being
615 pointers using above. Support deref.
616
a6163563
JB
6172019-12-19 Julian Brown <julian@codesourcery.com>
618 Maciej W. Rozycki <macro@codesourcery.com>
619 Tobias Burnus <tobias@codesourcery.com>
620 Thomas Schwinge <thomas@codesourcery.com>
621
622 * c-parser.c (c_parser_omp_clause_name): Support no_create.
623 (c_parser_oacc_data_clause): Likewise.
624 (c_parser_oacc_all_clauses): Likewise.
625 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
626 (OACC_PARALLEL_CLAUSE_MASK, OACC_SERIAL_CLAUSE_MASK): Add
627 PRAGMA_OACC_CLAUSE_NO_CREATE.
628 * c-typeck.c (handle_omp_array_sections): Support
629 GOMP_MAP_NO_ALLOC.
630
d68f5d45
DM
6312019-12-09 David Malcolm <dmalcolm@redhat.com>
632
633 * c-objc-common.c (range_label_for_type_mismatch::get_text):
634 Replace label_text ctor calls.
635
4691bf46
JM
6362019-12-04 Joseph Myers <joseph@codesourcery.com>
637
638 PR c/36941
639 PR c/88827
640 * c-typeck.c (convert_lvalue_to_rvalue): Call
641 require_complete_type for arguments not of void types.
642 (build_indirect_ref): Do not diagnose dereferencing pointers to
643 incomplete types.
644 * c-tree.h (C_TYPE_ERROR_REPORTED): Remove.
645
85d11957
JM
6462019-12-03 Joseph Myers <joseph@codesourcery.com>
647
648 PR c/88704
649 * c-decl.c (store_parm_decls_oldstyle): Diagnose use of [*] in
650 old-style parameter definitions.
651
4569f8b3
SL
6522019-12-01 Sandra Loosemore <sandra@codesourcery.com>
653
654 PR target/92499
655
656 * c-decl.c (flexible_array_type_p): Move to common code.
657
65ef05d0
RS
6582019-11-30 Richard Sandiford <richard.sandiford@arm.com>
659
660 * c-decl.c (start_decl): Allow initialization of variables whose
661 size is a POLY_INT_CST.
662 (finish_decl): Use verify_type_context to check whether the target
663 allows variables with a particular type to have static or thread-local
664 storage duration. Don't raise a second error if such variables do
665 not have a constant size.
666 (grokdeclarator): Use verify_type_context to check whether the
667 target allows fields or array elements to have a particular type.
668 * c-typeck.c (pointer_diff): Use verify_type_context to test whether
669 the target allows pointer difference for the types involved.
670 (build_unary_op): Likewise for pointer increment and decrement.
671
34b43828
JM
6722019-11-29 Joseph Myers <joseph@codesourcery.com>
673
674 * c-parser.c (struct c_parser): Add members raw_tokens and
675 raw_tokens_used.
676 (c_lex_one_token): Add argument raw. Handle lexing raw tokens and
677 using previously-lexed raw tokens.
678 (c_parser_peek_nth_token_raw)
679 (c_parser_check_balanced_raw_token_sequence): New functions.
680 (c_parser_nth_token_starts_std_attributes): Use
681 c_parser_check_balanced_raw_token_sequence for Objective-C.
682
5b8d9367
JM
6832019-11-25 Joseph Myers <joseph@codesourcery.com>
684
685 PR c/91985
686 * c-decl.c (finish_declspecs): Use int instead of decimal
687 floating-point types if decimal floating-point not supported.
688
1723e1be
JM
6892019-11-25 Joseph Myers <joseph@codesourcery.com>
690
691 * c-tree.h (struct c_declarator): Use a structure for id member.
692 * c-decl.c (grokdeclarator): Extract attributes from cdk_id
693 declarators at the start, not when handling individual declarators
694 later. Use u.id.id instead of u.id.
695 (grokfield): Use u.id.id instead of u.id.
696 (build_id_declarator): Set u.id.id and u.id.attrs.
697 (finish_declspecs): Handle postfix attributes in case of typedef
698 name or typeof used.
699 * c-parser.c (c_parser_direct_declarator)
700 (c_parser_direct_declarator_inner): Place declarator for
701 attributes inside that for function or array, not outside. Set
702 u.id.attrs for identifiers.
703 (c_parser_parameter_declaration): Use u.id.id instead of u.id.
704 * gimple-parser.c (c_parser_gimple_declaration): Use u.id.id
705 instead of u.id.
706
bdaf8be1
JJ
7072019-11-22 Jakub Jelinek <jakub@redhat.com>
708
709 PR c/90677
710 * c-decl.c (identifier_global_tag): Define.
711
3e00ba47
RB
7122019-11-20 Richard Biener <rguenther@suse.de>
713
714 PR c/92088
715 * c-decl.c (grokdeclarator): Prevent inlining of nested
716 function with VLA arguments.
717
8c5b727a
JM
7182019-11-20 Joseph Myers <joseph@codesourcery.com>
719
720 * c-decl.c (c_warn_type_attributes): New function.
721 (groktypename, grokdeclarator, finish_declspecs): Call
722 c_warn_type_attributes before applying attributes to types.
723 * c-tree.h (c_warn_type_attributes): Declare.
724
192961ff
JM
7252019-11-19 Joseph Myers <joseph@codesourcery.com>
726
727 * c-decl.c (c_warn_unused_attributes): Use pedwarn not warning for
728 standard attributes.
729 * c-parser.c (c_parser_std_attribute): Take argument for_tm. Use
730 pedwarn for unknown standard attributes and return error_mark_node
731 for them.
732
20a38017
MM
7332019-11-18 Matthew Malcomson <matthew.malcomson@arm.com>
734
735 * c-parser.c (c_parser_parse_rtl_body): Always call
736 run_rtl_passes, even if startwith pass is not provided.
737
d5fbe5e0
JM
7382019-11-15 Joseph Myers <joseph@codesourcery.com>
739
740 * c-parser.c (c_parser_std_attribute_specifier): Diagnose
741 duplicate standard attributes.
742
97cc1187
JM
7432019-11-15 Joseph Myers <joseph@codesourcery.com>
744
745 * c-decl.c (std_attribute_table): Add maybe_unused.
746
f8aea5e3
JM
7472019-11-15 Joseph Myers <joseph@codesourcery.com>
748
749 * c-decl.c (std_attribute_table): Add fallthrough.
750 * c-parser.c (c_parser_declaration_or_fndef): Diagnose fallthrough
751 attribute at top level.
752
2cc94aa8
JM
7532019-11-15 Joseph Myers <joseph@codesourcery.com>
754
755 * c-decl.c (std_attribute_table): New.
756 (c_init_decl_processing): Register attributes from
757 std_attribute_table.
758 * c-parser.c (c_parser_attribute_arguments): Add arguments
759 require_string and allow_empty_args. All callers changed.
760 (c_parser_std_attribute): Set require_string argument for
761 "deprecated" attribute.
762
7c5890cc
JM
7632019-11-14 Joseph Myers <joseph@codesourcery.com>
764
765 * c-parser.c (c_parser_postfix_expression)
766 (c_parser_check_literal_zero): Handle CPP_UTF8CHAR.
767 * gimple-parser.c (c_parser_gimple_postfix_expression): Likewise.
768
e8738f4e
RS
7692019-11-14 Richard Sandiford <richard.sandiford@arm.com>
770
771 * c-typeck.c (build_conditional_expr): Use truth_type_for instead
772 of build_same_sized_truth_vector_type.
773 (build_vec_cmp): Likewise.
774
b2417b59
JJ
7752019-11-14 Jakub Jelinek <jakub@redhat.com>
776
bedb7f04
JJ
777 * c-parser.c (c_parser_omp_context_selector): Don't require score
778 argument to fit into shwi, just to be INTEGER_CST. Diagnose
779 negative score.
780
b2417b59
JJ
781 * c-parser.c (c_parser_omp_context_selector): Rename
782 CTX_PROPERTY_IDLIST to CTX_PROPERTY_NAME_LIST, add CTX_PROPERTY_ID.
783 Use CTX_PROPERTY_ID for atomic_default_mem_order, only allow a single
784 identifier in that. For CTX_PROPERTY_NAME_LIST, allow identifiers
785 and string literals.
786
4e03c3a7
JM
7872019-11-14 Joseph Myers <joseph@codesourcery.com>
788
789 * c-tree.h (enum c_typespec_kind): Add ctsk_tagref_attrs and
790 ctsk_tagfirstref_attrs.
791 (struct c_declspecs): Update description of attrs. Add
792 postfix_attrs and non_std_attrs_seen_p. Increase size of
793 typespec_kind bit-field.
794 (c_warn_unused_attributes): New declaration.
795 (parser_xref_tag): Update prototype.
796 * c-decl.c (c_warn_unused_attributes): New function.
797 (shadow_tag_warned): Handle ctsk_tagfirstref_attrs and
798 ctsk_tagref_attrs. Handle attribute declarations.
799 (check_compound_literal_type): Handle ctsk_tagfirstref_attrs.
800 (grokdeclarator): Handle standard attributes.
801 (parser_xref_tag): Add arguments have_std_attrs and attrs. Apply
802 attributes to incomplete type reference.
803 (xref_tag): Update call to parser_xref_tag.
804 (declspecs_add_addrspace, declspecs_add_type)
805 (declspecs_add_scspec, declspecs_add_attrs): Set
806 non_std_attrs_seen_p.
807 (finish_declspecs): Apply postfix standard attributes to type.
808 * c-parser.c (c_token_starts_declspecs)
809 (c_token_starts_declaration, c_parser_next_token_starts_declspecs)
810 (c_parser_next_tokens_start_declaration): Update comments.
811 (c_parser_consume_token, c_parser_consume_pragma): Handle moving
812 parser->tokens[2] to parser->tokens[1].
813 (c_parser_nth_token_starts_std_attributes)
814 (c_parser_std_attribute_specifier_sequence): New functions.
815 (c_parser_declaration_or_fndef): Add arguments have_attrs and
816 attrs. All callers changed. Handle standard attributes.
817 (c_parser_parms_declarator, c_parser_parms_list_declarator)
818 (c_parser_parameter_declaration): Add argument have_gnu_attrs.
819 All callers changed.
820 (c_parser_declspecs): Add arguments start_std_attr_ok and
821 end_std_attr_ok. All callers changed. Handle standard
822 attributes.
823 (c_parser_enum_specifier, c_parser_struct_or_union_specifier)
824 (c_parser_direct_declarator, c_parser_direct_declarator_inner)
825 (c_parser_compound_statement_nostart, c_parser_all_labels)
826 (c_parser_label, c_parser_statement, c_parser_for_statement):
827 Handle standard attributes.
828 * c-parser.h (c_parser_declspecs): Update prototype.
829 * gimple-parser.c (c_parser_gimple_declaration): Update call to
830 c_parser_declspecs.
831
0c29cac4
ML
8322019-11-12 Martin Liska <mliska@suse.cz>
833
834 * gimple-parser.c: Do not include params.h.
835
028d4092
ML
8362019-11-12 Martin Liska <mliska@suse.cz>
837
838 * gimple-parser.c (c_parser_parse_gimple_body): Replace old parameter syntax
839 with the new one, include opts.h if needed. Use SET_OPTION_IF_UNSET
840 macro.
841
62aee289
MR
8422019-11-12 Maciej W. Rozycki <macro@codesourcery.com>
843 Frederik Harwath <frederik@codesourcery.com>
844
845 gcc/c/
846 * c-parser.c (OACC_SERIAL_CLAUSE_MASK): New macro.
847 (c_parser_oacc_kernels_parallel): Rename function to...
848 (c_parser_oacc_compute): ... this. Handle PRAGMA_OACC_SERIAL.
849 (c_parser_omp_construct): Update accordingly.
850
851
7cec9588
JJ
8522019-11-11 Jakub Jelinek <jakub@redhat.com>
853
854 * c-parser.c (c_parser_translation_unit): Diagnose declare target
855 without corresponding end declare target.
856
f486280c
RS
8572019-11-08 Richard Sandiford <richard.sandiford@arm.com>
858
859 * c-convert.c (convert): Only handle vector conversions if one of
860 the types satisfies gnu_vector_type_p or if -flax-vector-conversions
861 allows it.
862 * c-typeck.c (build_array_ref): Only allow vector indexing if the
863 vectors satisfy gnu_vector_type_p.
864 (build_unary_op): Only allow unary operators to be applied to
865 vectors if they satisfy gnu_vector_type_p.
866 (digest_init): Only allow by-element initialization of vectors
867 if they satisfy gnu_vector_type_p.
868 (really_start_incremental_init): Likewise.
869 (push_init_level): Likewise.
870 (pop_init_level): Likewise.
871 (process_init_element): Likewise.
872 (build_binary_op): Only allow binary operators to be applied to
873 vectors if they satisfy gnu_vector_type_p.
874
017c6491
JM
8752019-11-08 Joseph Myers <joseph@codesourcery.com>
876
877 * c-decl.c (grokparms): Convert () in a function definition to
878 (void) for C2x.
879 (store_parm_decls_oldstyle): Pedwarn for C2x.
880 (store_parm_decls): Update comment about () not generating a
881 prototype.
882
c01bd174
JM
8832019-11-07 Joseph Myers <joseph@codesourcery.com>
884
885 * c-parser.c (c_parser_attribute_arguments): New function.
886 Factored out of c_parser_gnu_attribute.
887 (c_parser_gnu_attribute): Use c_parser_attribute_arguments.
888 (c_parser_balanced_token_sequence, c_parser_std_attribute)
889 (c_parser_std_attribute_specifier): New functions.
890 (c_parser_transaction_attributes): Use
891 c_parser_std_attribute_specifier.
892
471c5330
JM
8932019-11-07 Joseph Myers <joseph@codesourcery.com>
894
895 * c-parser.c (c_parser): Remove lex_untranslated_string. Add
896 lex_joined_string and translate_strings_p.
897 (c_lex_one_token): Pass 0 or C_LEX_STRING_NO_JOIN to
898 c_lex_with_flags.
899 (c_parser_string_literal): New function.
900 (c_parser_static_assert_declaration_no_semi): Use
901 c_parser_string_literal. Do not set lex_untranslated_string.
902 (c_parser_asm_string_literal): Use c_parser_string_literal.
903 (c_parser_simple_asm_expr): Do not set lex_untranslated_string.
904 (c_parser_gnu_attributes): Set and restore translate_strings_p
905 instead of lex_untranslated_string.
906 (c_parser_asm_statement): Do not set lex_untranslated_string.
907 (c_parser_asm_operands): Likewise.
908 (c_parser_has_attribute_expression): Set and restore
909 translate_strings_p instead of lex_untranslated_string.
910 (c_parser_postfix_expression): Use c_parser_string_literal.
911 (pragma_lex): Likewise.
912 (c_parser_pragma_pch_preprocess): Set lex_joined_string.
913 (c_parse_file): Set translate_strings_p.
914 * gimple-parser.c (c_parser_gimple_postfix_expression)
915 (c_parser_gimple_or_rtl_pass_list): Use c_parser_string_literal.
916 * c-parser.c (c_parser_string_literal): Declare function.
917
d0c464d2
JJ
9182019-11-02 Jakub Jelinek <jakub@redhat.com>
919
920 * c-parser.c (c_finish_omp_declare_variant): Use
921 omp_get_context_selector instead of c_omp_get_context_selector.
922
ac2cfa6c
RS
9232019-10-29 Richard Sandiford <richard.sandiford@arm.com>
924
925 * c-tree.h (c_simulate_enum_decl): Declare.
926 * c-decl.c (c_simulate_enum_decl): New function.
927 * c-objc-common.h (LANG_HOOKS_SIMULATE_ENUM_DECL): Define to the above.
928
74078538
RS
9292019-10-29 Richard Sandiford <richard.sandiford@arm.com>
930
931 * c-tree.h (c_simulate_builtin_function_decl): Declare.
932 * c-decl.c (c_simulate_builtin_function_decl): New function.
933 * c-objc-common.h (LANG_HOOKS_SIMULATE_BUILTIN_FUNCTION_DECL): Define
934 to the above.
935
ad1539d5
MS
9362019-10-28 Martin Sebor <msebor@redhat.com>
937
938 PR c/66970
939 * c-decl.c (names_builtin_p): Define a new function.
940
cb73e4e7
RB
9412019-10-28 Richard Biener <rguenther@suse.de>
942
943 PR c/92249
944 * gimple-parser.c (c_parser_parse_gimple_body): Make
945 current_bb the entry block initially to easier recover
946 from errors.
947 (c_parser_gimple_compound_statement): Adjust.
948
135df52c
JJ
9492019-10-24 Jakub Jelinek <jakub@redhat.com>
950
951 * c-parser.c (c_finish_omp_declare_variant): Use
952 omp_context_selector_matches instead of
953 c_omp_context_selector_matches.
954 * c-decl.c (c_decl_attributes): Add "omp declare target block"
955 attribute in between declare target and end declare target
956 pragmas.
957
783bfe5e
JM
9582019-10-15 Joseph Myers <joseph@codesourcery.com>
959
960 * c-parser.c (c_parser_attribute_any_word): Rename to
961 c_parser_gnu_attribute_any_word. All callers changed.
962 (c_parser_attribute): Rename to c_parser_gnu_attribute. All
963 callers changed.
964 (c_parser_attributes): Rename to c_parser_gnu_attributes. All
965 callers changed.
966 (c_parser_declaration_or_fndef, c_parser_declspecs)
967 (c_parser_enum_specifier, c_parser_struct_or_union_specifier)
968 (c_parser_struct_declaration, c_parser_declarator)
969 (c_parser_gnu_attribute, c_parser_compound_statement)
970 (c_parser_label, c_parser_statement, c_parser_objc_method_decl)
971 (c_parser_transaction_attributes): Add "gnu-" prefix to names of
972 attribute-related syntax productions.
973
56898e43
RS
9742019-10-14 Richard Sandiford <richard.sandiford@arm.com>
975
976 * c-objc-common.c (useful_aka_type_p): Replace with...
977 (get_aka_type): ...this new function. Given the original type,
978 decide which aka type to print (if any). Only look through typedefs
979 if user_facing_original_type_p.
980 (print_type): Update accordingly.
981
b9424661
JJ
9822019-10-14 Jakub Jelinek <jakub@redhat.com>
983
984 * c-parser.c (c_parser_omp_all_clauses): Change bool NESTED_P argument
985 into int NESTED, if it is 2, diagnose missing commas in between
986 clauses.
987 (c_parser_omp_context_selector): Pass 2 as last argument to
988 c_parser_omp_all_clauses.
989
20de9568
JJ
9902019-10-12 Jakub Jelinek <jakub@redhat.com>
991
992 * c-parser.c (c_parser_omp_context_selector): Improve error recovery.
993 For simd properties, put them directly into TREE_VALUE.
994 (c_finish_omp_declare_variant): Call c_omp_mark_declare_variant.
995 If c_omp_context_selector_matches is 0, don't add attribute, otherwise
996 add "omp declare variant base" attribute rather than
997 "omp declare variant".
998
fe2bc27c
JM
9992019-10-11 Joseph Myers <joseph@codesourcery.com>
1000
1001 * c-decl.c (declspecs_add_type): Use pedwarn_c11 for DFP types.
1002
94e7f906
JJ
10032019-10-10 Jakub Jelinek <jakub@redhat.com>
1004
1005 * c-parser.c (c_parser_omp_all_clauses): Add NESTED_P argument, if
1006 true, terminate processing on closing paren and don't skip to end of
1007 pragma line.
1008 (c_parser_omp_declare_simd): Handle also declare variant.
1009 (omp_construct_selectors, omp_device_selectors,
1010 omp_implementation_selectors, omp_user_selectors): New variables.
1011 (c_parser_omp_context_selector,
1012 c_parser_omp_context_selector_specification,
1013 c_finish_omp_declare_variant): New functions.
1014 (c_finish_omp_declare_simd): Handle both declare simd and
1015 declare variant.
1016 (c_parser_omp_declare): Handle declare variant.
1017
93313b94
JM
10182019-10-02 Joseph Myers <joseph@codesourcery.com>
1019
1020 * c-parser.c (c_parser_asm_statement): Handle CPP_SCOPE like two
1021 CPP_COLON tokens.
1022
55879815
RS
10232019-10-01 Richard Sandiford <richard.sandiford@arm.com>
1024
1025 * c-objc-common.c (useful_aka_type_p): New function.
1026 (print_type): Use it to decide whether an aka type is worth printing.
1027
59bc434a
JJ
10282019-09-27 Jakub Jelinek <jakub@redhat.com>
1029
1030 PR c++/88203
1031 * c-parser.c (c_parser_predefined_identifier): New function.
1032 (c_parser_postfix_expression): Use it.
1033 (c_parser_omp_variable_list): Parse predefined identifiers.
1034 * c-typeck.c (c_finish_omp_clauses): Allow predefined variables
1035 in shared and firstprivate clauses, even when they are predetermined
1036 shared.
1037
c6447c20
RS
10382019-09-27 Richard Sandiford <richard.sandiford@arm.com>
1039
1040 * c-typeck.c (build_function_call_vec): Take the original function
1041 decl as an optional final parameter. Pass all built-in calls to
1042 check_builtin_function_arguments.
1043
522da4c2
EB
10442019-09-20 Eric Botcazou <ebotcazou@adacore.com>
1045
1046 PR c/91815
1047 * c-decl.c (pushdecl): In C detect duplicate declarations across scopes
1048 of identifiers in the external scope only for variables and functions.
1049
68e2c199
PK
10502019-09-04 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1051
1052 PR c/78736
1053 * c-typeck.c (convert_for_assignment): Handle Wenum-conversion.
1054
22f8849d
IS
10552019-08-23 Iain Sandoe <iain@sandoe.co.uk>
1056
1057 PR pch/61250
1058 * c-parser.c (c_parse_file): Call c_common_no_more_pch ()
1059 after determining that the first token is not
1060 PRAGMA_GCC_PCH_PREPROCESS.
1061
db376f45
EB
10622019-08-22 Eric Botcazou <ebotcazou@adacore.com>
1063
1064 * c-parser.c (c_parser_declaration_or_fndef): Set DECL_ARGUMENTS of a
1065 FUNCTION_DECL to the right value in the presence of nested declarators.
1066
4d732405
RS
10672019-08-13 Richard Sandiford <richard.sandiford@arm.com>
1068
1069 PR middle-end/91421
1070 * c-decl.c (merge_decls): Use copy_decl_built_in_function.
1071
cb1180d5
RS
10722019-08-13 Richard Sandiford <richard.sandiford@arm.com>
1073
1074 PR middle-end/91421
1075 * c-decl.c (header_for_builtin_fn): Take a FUNCTION_DECL instead
1076 of a built_in_function.
1077 (diagnose_mismatched_decls, implicitly_declare): Update accordingly.
1078
77eb117f
JJ
10792019-08-10 Jakub Jelinek <jakub@redhat.com>
1080
1081 * c-parser.c (c_parser_omp_clause_name): Parse device_type.
1082 (c_parser_omp_clause_device_type): New function.
1083 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_DEVICE_TYPE.
1084 (OMP_DECLARE_TARGET_CLAUSE_MASK): Add PRAGMA_OMP_CLAUSE_DEVICE_TYPE.
1085 (c_parser_omp_declare_target): Handle device_type clauses. Remove
1086 diagnostics for declare target with clauses nested in clause-less
1087 declare target declaration-definition-seq.
1088 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_DEVICE_TYPE.
1089
2c3b8bad
JJ
10902019-08-09 Jakub Jelinek <jakub@redhat.com>
1091
bb522e2e
JJ
1092 * c-parser.c (check_no_duplicate_clause): Simplify using
1093 omp_find_clause.
1094 (c_parser_omp_clause_if): Fix up printing of target {enter,exit} data
1095 directive name modifiers.
1096 (c_parser_omp_clause_proc_bind): Check for duplicate proc_bind clause.
1097
2c3b8bad
JJ
1098 PR c/91401
1099 * c-parser.c (c_parser_omp_clause_dist_schedule): Fix up typos in the
1100 check_no_duplicate_clause call. Comment it out, instead emit a
1101 warning for duplicate dist_schedule clauses.
1102
99769e7f
RS
11032019-08-08 Richard Sandiford <richard.sandiford@arm.com>
1104
1105 * c-decl.c (finish_enum): Clear C_TYPE_BEING_DEFINED.
1106
8860d270
JJ
11072019-08-08 Jakub Jelinek <jakub@redhat.com>
1108
1109 * c-typeck.c (c_finish_omp_clauses): For C_ORT_OMP
1110 OMP_CLAUSE_USE_DEVICE_* clauses use oacc_reduction_head bitmap
1111 instead of generic_head to track duplicates.
1112
398e3feb
JJ
11132019-08-07 Jakub Jelinek <jakub@redhat.com>
1114
1115 * c-parser.c (c_parser_omp_clause_name): Parse use_device_addr clause.
1116 (c_parser_omp_clause_use_device_addr): New function.
1117 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR.
1118 (OMP_TARGET_DATA_CLAUSE_MASK): Add PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR.
1119 (c_parser_omp_target_data): Handle PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR
1120 like PRAGMA_OMP_CLAUSE_USE_DEVICE_PTR, adjust diagnostics about no
1121 map or use_device_* clauses.
1122 * c-typeck.c (c_finish_omp_clauses): For OMP_CLAUSE_USE_DEVICE_PTR
1123 in OpenMP, require pointer type rather than pointer or array type.
1124 Handle OMP_CLAUSE_USE_DEVICE_ADDR.
1125
a28351e7
JJ
11262019-07-31 Jakub Jelinek <jakub@redhat.com>
1127
1128 PR c/91192
1129 * c-parser.c (c_parser_sizeof_expression): Call set_c_expr_source_range
1130 even if finish is UNKNOWN_LOCATION, just use start as finish in that
1131 case.
1132
6343b6bf
ML
11332019-07-25 Martin Liska <mliska@suse.cz>
1134 Dominik Infuhr <dominik.infuehr@theobroma-systems.com>
1135
1136 PR c++/23383
1137 * c-decl.c (merge_decls): Merge OPERATOR_DELETE flag.
1138
cb50701e
ML
11392019-07-25 Martin Liska <mliska@suse.cz>
1140
1141 * c-decl.c (merge_decls): Use new macros
1142 (e.g. DECL_SET_LAMBDA_FUNCTION and DECL_LAMBDA_FUNCTION_P).
1143
62e3e66f
RB
11442019-07-23 Richard Biener <rguenther@suse.de>
1145
1146 PR tree-optimization/83518
1147 * gimple-parser.c (c_parser_parse_gimple_body): When we have
1148 a CFG also rebuild cgraph edges.
1149
554a530f
JJ
11502019-07-20 Jakub Jelinek <jakub@redhat.com>
1151
1152 * c-parser.c (c_parser_omp_clause_name): Handle bind clause.
1153 (c_parser_omp_clause_bind): New function.
1154 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_BIND.
1155 (OMP_LOOP_CLAUSE_MASK): Define.
1156 (c_parser_omp_loop): New function.
1157 (c_parser_omp_parallel, c_parser_omp_teams): Handle parsing of
1158 loop combined with parallel or teams.
1159 (c_parser_omp_construct): Handle PRAGMA_OMP_LOOP.
1160 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_BIND.
1161
d119bf79
RS
11622019-07-18 Richard Sandiford <richard.sandiford@arm.com>
1163
1164 PR c/53633
1165 * c-decl.c (finish_function): Check targetm.warn_func_return
1166 before issuing a -Wreturn-type warning.
1167
ab20d992 11682019-07-12 Alexandre Oliva <oliva@adacore.com>
fdc1f343
AO
1169
1170 * gimple-parser.c (c_parser_gimple_try_stmt): New.
1171 (c_parser_compound_statement): Call it.
1172
1fdd6f04
JJ
11732019-07-12 Jakub Jelinek <jakub@redhat.com>
1174
1175 * c-parser.c (c_parser_omp_clause_name): Handle order clause.
1176 (c_parser_omp_clause_order): New function.
1177 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_ORDER.
1178 (OMP_SIMD_CLAUSE_MASK, OMP_FOR_CLAUSE_MASK): Add
1179 PRAGMA_OMP_CLAUSE_ORDER.
1180 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_ORDER.
1181
8389386c
RB
11822019-07-10 Richard Biener <rguenther@suse.de>
1183
1184 * gimple-parser.c (c_parser_gimple_postfix_expression): Support
1185 _Literal (int *) &x for address literals.
1186
99b1c316
MS
11872019-07-09 Martin Sebor <msebor@redhat.com>
1188
1189 PR c++/61339
1190 * c-decl.c (xref_tag): Change class-key of PODs to struct and others
1191 to class.
1192 (field_decl_cmp): Same.
1193 * c-parser.c (c_parser_struct_or_union_specifier): Same.
1194 * c-tree.h: Same.
1195 * gimple-parser.c (c_parser_gimple_compound_statement): Same.
1196
6c1dae73
MS
11972019-07-09 Martin Sebor <msebor@redhat.com>
1198
1199 PR c++/61339
1200 * c-decl.c: Change class-key from class to struct and vice versa
1201 to match convention and avoid -Wclass-is-pod and -Wstruct-no-pod.
1202 * gimple-parser.c: Same.
1203
69b5279e
RB
12042019-07-01 Richard Biener <rguenther@suse.de>
1205
1206 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
1207 _Literal (char *) &"foo" for address literals pointing to
1208 STRING_CSTs.
1209
ab20d992
JJ
12102019-06-25 Jozef Lawrynowicz <jozef.l@mittosystems.com>
1211
1212 * c-parser.c (c_parse_init): Create keyword for "__intN__" type.
1213 * c-decl.c (declspecs_add_type): Don't pedwarn about "__intN" ISO
1214 C incompatibility if alternate "__intN__" form is used.
1215
1e3d475e
MS
12162019-06-24 Martin Sebor <msebor@redhat.com>
1217
1218 * c-typeck.c (build_binary_op): Hyphenate floating-point.
1219
bf38f7e9
JJ
12202019-06-10 Jakub Jelinek <jakub@redhat.com>
1221
1222 * c-parser.c (c_parser_pragma): Reject PRAGMA_OMP_SCAN.
1223 (c_parser_omp_clause_reduction): Don't sorry_at on inscan reductions.
1224 (c_parser_omp_scan_loop_body): New function.
1225 (c_parser_omp_for_loop): Call c_parser_omp_scan_loop_body if there are
1226 inscan reduction clauses.
1227 * c-typeck.c (c_finish_omp_clauses): Reject mixing inscan with
1228 non-inscan reductions on the same construct, or inscan reductions with
1229 ordered or schedule clauses, or inscan array reductions.
1230
65985d78
MS
12312019-06-05 Martin Sebor <msebor@redhat.com>
1232
1233 PR c/90737
1234 * c-typeck.c (c_finish_return): Only consider functions returning
1235 pointers as candidates for -Wreturn-local-addr.
1236
0ecf545c
MS
12372019-06-05 Martin Sebor <msebor@redhat.com>
1238
1239 * c-decl.c (start_decl): Adjust quoting and hyphenation
1240 in diagnostics.
1241 (finish_decl): Same.
1242 (finish_enum): Same.
1243 (start_function): Same.
1244 (declspecs_add_type): Same.
1245 * c-parser.c (warn_for_abs): Same.
1246 * c-typeck.c (build_binary_op): Same.
1247
e03436e7
TS
12482019-05-17 Thomas Schwinge <thomas@codesourcery.com>
1249
b48f44bf
TS
1250 PR c/89433
1251 * c-parser.c (c_finish_oacc_routine): Rework checking if already
1252 marked with an OpenACC 'routine' directive.
1253
5bf04509
TS
1254 PR c/89433
1255 * c-parser.c (c_parser_oacc_routine): Normalize order of clauses.
1256 (c_finish_oacc_routine): Call oacc_verify_routine_clauses.
1257
e03436e7
TS
1258 PR c/89433
1259 * c-parser.c (c_finish_oacc_routine): Refer to OpenACC 'routine'
1260 clauses from "omp declare target" attribute.
1261
a9c697b8
MS
12622019-05-16 Martin Sebor <msebor@redhat.com>
1263
ab20d992
JJ
1264 * c-decl.c (start_decl): Quote keywords, operators, and
1265 types in diagnostics.
1266 (finish_decl): Same.
1267 * c-parser.c (c_parser_asm_statement): Same.
1268 (c_parser_conditional_expression): Same.
1269 (c_parser_transaction_cancel): Same.
1270 * c-typeck.c (c_common_type): Same.
1271 (build_conditional_expr): Same.
1272 (digest_init): Same.
1273 (process_init_element): Same.
1274 (build_binary_op): Same.
a9c697b8 1275
c4499192
RB
12762019-05-17 Richard Biener <rguenther@suse.de>
1277
1278 * gimple-parser.c (c_parser_gimple_statement): Handle __VEC_PERM.
1279 (c_parser_gimple_unary_expression): Likewise.
1280 (c_parser_gimple_parentized_ternary_expression): New function.
1281
adfe6e4b
RB
12822019-05-16 Richard Biener <rguenther@suse.de>
1283
1284 * gimple-parser.c (c_parser_gimple_statement): Handle __BIT_INSERT.
1285 (c_parser_gimple_unary_expression): Likewise.
1286
186dabf2
RB
12872019-05-15 Richard Biener <rguenther@suse.de>
1288
1289 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
1290 __BIT_FIELD_REF.
1291
1158c5b4
RB
12922019-05-14 Richard Biener <rguenther@suse.de>
1293
1294 * gimple-parser.c (c_parser_gimple_statement): Remove
1295 questionable auto-promotion to VIEW_CONVERT_EXPR.
1296 (c_parser_gimple_typespec): Split out from __MEM parsing.
1297 (c_parser_gimple_postfix_expression): Handle __VIEW_CONVERT.
1298 * tree-pretty-print.c (dump_generic_node): Dump VIEW_CONVERT_EXPR
1299 as __VIEW_CONVERT with -gimple.
1300
fd4485aa
ML
13012019-05-09 Martin Liska <mliska@suse.cz>
1302
1303 * gimple-parser.c (c_parser_gimple_statement): Support __MIN and
1304 __MAX.
1305 (c_parser_gimple_unary_expression): Parse also binary expression
1306 __MIN and __MAX.
1307 (c_parser_gimple_parentized_binary_expression): New function.
1308
d276406a
ML
13092019-05-09 Martin Liska <mliska@suse.cz>
1310
1311 * gimple-parser.c (struct gimple_parser): Add probability.
1312 for gimple_parser_edge.
1313 (gimple_parser::push_edge): Add new argument probability.
1314 (c_parser_gimple_parse_bb_spec): Parse also probability
1315 if present.
1316 (c_parser_parse_gimple_body): Set edge probability.
1317 (c_parser_gimple_compound_statement): Consume token
1318 before calling c_parser_gimple_goto_stmt.
1319 Parse BB counts.
1320 (c_parser_gimple_statement): Pass new argument.
1321 (c_parser_gimple_goto_stmt): Likewise.
1322 (c_parser_gimple_if_stmt): Likewise.
1323 (c_parser_gimple_or_rtl_pass_list): Parse hot_bb_threshold.
1324 * c-parser.c (c_parser_declaration_or_fndef): Pass
1325 hot_bb_threshold argument.
1326 * c-tree.h (struct c_declspecs): Add hot_bb_threshold
1327 field.
1328 (c_parser_gimple_parse_bb_spec_edge_probability): New.
1329
f179b64e
JJ
13302019-04-26 Jakub Jelinek <jakub@redhat.com>
1331
1332 PR debug/90197
1333 * c-tree.h (c_finish_loop): Add 2 further location_t arguments.
1334 * c-parser.c (c_parser_while_statement): Adjust c_finish_loop caller.
1335 (c_parser_do_statement): Likewise.
1336 (c_parser_for_statement): Likewise. Formatting fixes.
1337 * c-typeck.c (c_finish_loop): Add COND_LOCUS and INCR_LOCUS arguments,
1338 emit DEBUG_BEGIN_STMTs if needed.
1339
e7178413
JJ
13402019-04-19 Jakub Jelinek <jakub@redhat.com>
1341
c280b7ee
JJ
1342 PR c/89888
1343 * c-typeck.c (struct c_switch): Remove outside_range_p member.
1344 (c_start_case): Don't clear it.
1345 (do_case): Adjust c_add_case_label caller.
1346 (c_finish_case): Adjust c_do_switch_warnings caller.
1347
e7178413
JJ
1348 PR c++/90108
1349 * c-decl.c (merge_decls): If remove is main variant and
1350 DECL_ORIGINAL_TYPE is some other type, remove a DECL_ORIGINAL_TYPE
1351 variant that has newdecl as TYPE_NAME if any.
1352
60a2c645
JJ
13532019-04-12 Jakub Jelinek <jakub@redhat.com>
1354
1355 PR c/89933
1356 * c-decl.c (merge_decls): When newdecl's type is its main variant,
1357 don't try to remove it from the variant list, but instead assert
1358 it has no variants.
1359
2a82beaa
RB
13602019-04-01 Richard Biener <rguenther@suse.de>
1361
1362 PR c/71598
1363 * c-tree.h (c_get_alias_set): Declare.
1364 * c-objc-common.h (LANG_HOOKS_GET_ALIAS_SET): Use c_get_alias_set.
1365 * c-objc-common.c (c_get_alias_set): Treat enumeral types
1366 as the underlying integer type.
1367
bec1da64
MS
13682019-03-19 Martin Sebor <msebor@redhat.com>
1369
1370 PR tree-optimization/89688
1371 * c-decl.c (finish_decl): Call braced_lists_to_string for more
1372 kinds of initializers.
1373
855cd9b1
JJ
13742019-03-19 Jakub Jelinek <jakub@redhat.com>
1375
1376 PR c/89734
1377 * c-decl.c (grokdeclarator): Call c_build_qualified_type on function
1378 return type even if quals_used is 0. Formatting fixes.
1379
baa09dc5
RB
13802019-03-14 Richard Biener <rguenther@suse.de>
1381
1382 * c-tree.h (enum c_declspec_il): New.
1383 (struct c_declspecs): Merge gimple_p and rtl_p into declspec_il
1384 enum bitfield.
1385 * c-parser.c (c_parser_declaration_or_fndef): Adjust accordingly.
1386 Pass start pass and declspec_il to c_parser_parse_gimple_body.
1387 (c_parser_declspecs): Adjust.
1388 * gimple-parser.c: Include cfg.h, cfghooks.h, cfganal.h, tree-cfg.h,
1389 gimple-iterator.h, cfgloop.h, tree-phinodes.h, tree-into-ssa.h
1390 and bitmap.h.
1391 (struct gimple_parser): New.
1392 (gimple_parser::push_edge): New method.
1393 (c_parser_gimple_parse_bb_spec): New helper.
1394 (c_parser_parse_gimple_body): Get start pass and IL specification.
1395 Initialize SSA and CFG.
1396 (c_parser_gimple_compound_statement): Handle CFG and SSA build.
1397 Build a gimple_parser parsing state and pass it along.
1398 (c_parser_gimple_statement): Change intermittend __PHI internal
1399 function argument for the edge.
1400 (c_parser_gimple_or_rtl_pass_list): Handle ssa, cfg flags.
1401 (c_parser_gimple_goto_stmt): Record edges to build.
1402 (c_parser_gimple_if_stmt): Likewise.
1403 * gimple-parser.h (c_parser_parse_gimple_body): Adjust.
1404 (c_parser_gimple_or_rtl_pass_list): Likewise.
1405
a3f9f006
ML
14062019-03-11 Martin Liska <mliska@suse.cz>
1407
1408 * c-decl.c (check_for_loop_decls): Wrap an option name
1409 in a string format message and fix GNU coding style.
1410 * c-parser.c (c_parser_declspecs): Likewise.
1411
1db01ff9
JJ
14122019-03-08 Jakub Jelinek <jakub@redhat.com>
1413
1414 PR tree-optimization/89550
1415 * c-decl.c (finish_function): Only set TREE_NO_WARNING if warning_at
1416 returned true.
1417 (c_write_global_declarations_1): Only set TREE_NO_WARNING if pedwarn
1418 or warning returned true.
1419
66dcb747
JJ
14202019-02-28 Jakub Jelinek <jakub@redhat.com>
1421
1422 PR c/89525
1423 * c-typeck.c (convert_arguments): Call inform_declaration only if
1424 the previous warning_at call returned true.
1425
2263c9f2
TS
14262019-02-22 Thomas Schwinge <thomas@codesourcery.com>
1427
1428 * c-parser.c (c_parser_oacc_shape_clause): Add loc formal
1429 parameter. Adjust all users.
1430 (c_parser_oacc_simple_clause): Replace parser with loc formal
1431 parameter. Adjust all users.
1432
ab20d992 14332019-02-19 Chung-Lin Tang <cltang@codesourcery.com>
19695f4d
CLT
1434
1435 PR c/87924
1436 * c-parser.c (c_parser_oacc_clause_wait): Add representation of wait
1437 clause without argument as 'wait (GOMP_ASYNC_NOVAL)', adjust comments.
1438
5f88ba10
JJ
14392019-02-15 Jakub Jelinek <jakub@redhat.com>
1440
1441 PR c/89340
1442 * c-decl.c (start_function): Clear TREE_PUBLIC on nested functions
1443 before c_decl_attributes rather than after it.
1444
cfc30fd1
JJ
14452019-02-06 Jakub Jelinek <jakub@redhat.com>
1446
1447 PR c/89211
1448 * c-parser.c (c_parser_declaration_or_fndef): Don't update
1449 DECL_ARGUMENTS of d if it has been defined already. Use a single if
1450 instead of 3 nested ifs.
1451
fbe83e6b
JM
14522019-02-06 Joseph Myers <joseph@codesourcery.com>
1453
1454 PR c/88584
1455 * c-decl.c (finish_decl): Do not complete array types for arrays
1456 with external linkage not at file scope.
1457
f461f938
RB
14582019-02-05 Richard Biener <rguenther@suse.de>
1459
1460 PR c/88606
1461 * c-decl.c (finish_struct): Reset TYPE_TRANSPARENT_AGGR on
1462 all type variants when not supported.
1463
fe509359
JJ
14642019-01-30 Jakub Jelinek <jakub@redhat.com>
1465
1466 PR c/89061
1467 * c-tree.h (C_DECL_COMPOUND_LITERAL_P): Define.
1468 * c-decl.c (decl_jump_unsafe): Return false for
1469 C_DECL_COMPOUND_LITERAL_P decls.
1470 (build_compound_literal): Set C_DECL_COMPOUND_LITERAL_P.
1471
6a335b96
JJ
14722019-01-29 Jakub Jelinek <jakub@redhat.com>
1473
f4b7e754
JJ
1474 PR c/89045
1475 * c-decl.c (build_compound_literal): Don't pushdecl if in parameter
1476 scope.
1477
6a335b96
JJ
1478 PR c/86125
1479 * c-decl.c (last_fileptr_type): Remove.
1480 (last_structptr_types): New variable.
1481 (match_builtin_function_types): Compare TYPE_MAIN_VARIANT of
1482 {old,new}rettype instead of the types themselves. Assert
1483 last_structptr_types array has the same number of elements
1484 as builtin_structptr_types array. Use TYPE_MAIN_VARIANT for
1485 argument oldtype and newtype. Instead of handling
1486 just fileptr_type_node specially, handle all builtin_structptr_types
1487 pointer nodes. Formatting fix.
1488
d8b5a1a0
MS
14892019-01-24 Martin Sebor <msebor@redhat.com>
1490
1491 PR c/86125
1492 PR c/88886
1493 PR middle-end/86308
1494 * c-decl.c (match_builtin_function_types): Add arguments.
1495 (diagnose_mismatched_decls): Diagnose mismatched declarations
1496 of built-ins more strictly.
1497
e21c4491
JJ
14982019-01-24 Jakub Jelinek <jakub@redhat.com>
1499
1500 PR c++/88976
1501 * c-typeck.c (c_finish_omp_cancel): Diagnose more than one if
1502 on #pragma omp cancel with different modifiers.
1503
420183d9
L
15042019-01-18 H.J. Lu <hongjiu.lu@intel.com>
1505
1506 PR c/51628
1507 PR c/88664
1508 * c-typeck.c (convert_for_assignment): Upate the
1509 warn_for_address_or_pointer_of_packed_member call.
1510
17ad43dd
TH
15112019-01-16 Tom Honermann <tom@honermann.net>
1512 Jason Merrill <jason@redhat.com>
1513
1514 * c-typeck.c (digest_init): Revised the error message produced for
1515 ill-formed cases of array initialization with a string literal.
1516 (error_init): Make variadic.
1517
5f07d78a
JJ
15182019-01-12 Jakub Jelinek <jakub@redhat.com>
1519
1520 * c-typeck.c (convert_for_assignment): Fix a comment typo.
1521
c4581bbf
JJ
15222019-01-07 Jakub Jelinek <jakub@redhat.com>
1523
1524 PR c/88701
1525 * c-decl.c (build_compound_literal): If not TREE_STATIC, only pushdecl
1526 if current_function_decl is non-NULL.
1527
65c5b1eb
JM
15282019-01-07 Joseph Myers <joseph@codesourcery.com>
1529
1530 PR c/88720
1531 PR c/88726
1532 * c-decl.c (pop_scope): Use TREE_PUBLIC and b->nested to determine
1533 whether a function is nested, not DECL_EXTERNAL. Diagnose inline
1534 functions declared but never defined only for external scope, not
1535 for other scopes.
1536
d8fcab68
JJ
15372019-01-07 Jakub Jelinek <jakub@redhat.com>
1538
1539 PR c++/85052
1540 * c-parser.c (c_parser_postfix_expression): Parse
1541 __builtin_convertvector.
1542
a5544970
JJ
15432019-01-01 Jakub Jelinek <jakub@redhat.com>
1544
1545 Update copyright years.
1546
da77eace
L
15472018-12-20 H.J. Lu <hongjiu.lu@intel.com>
1548
1549 PR c/51628
1550 * c-typeck.c (convert_for_assignment): Call
1551 warn_for_address_or_pointer_of_packed_member.
1552
1edf8866
SB
15532018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
1554
1555 * c-parser.c (c_parser_asm_statement) <RID_CONST, RID_RESTRICT>: Give
1556 a more specific error message (instead of just falling through).
1557
db4fd626
SB
15582018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
1559
1560 * c-parser.c (c_parser_asm_statement): Keep track of the location each
1561 asm qualifier is first seen; use that to give nicer "duplicate asm
1562 qualifier" messages. Delete 'quals" variable, instead pass the
1563 "is_volatile_ flag to build_asm_stmt directly.
1564 * c-tree.h (build_asm_stmt): Make the first arg bool instead of tree.
1565 * c-typeck.c (build_asm_stmt): Ditto; adjust.
1566
9c9cfcbb
SB
15672018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
1568
1569 * c-parser.c (c_parser_asm_statement): Rewrite the loop to work without
1570 "done" boolean variable.
1571
a14feb3c
DM
15722018-12-19 David Malcolm <dmalcolm@redhat.com>
1573
1574 PR c++/87504
1575 * c-typeck.c (class maybe_range_label_for_tree_type_mismatch):
1576 Move from here to gcc-rich-location.h and gcc-rich-location.c.
1577 (build_binary_op): Use struct op_location_t and
1578 class binary_op_rich_location.
1579
6d939173
JJ
15802018-12-11 Jakub Jelinek <jakub@redhat.com>
1581
1582 PR sanitizer/88426
1583 * c-convert.c (convert): Call c_fully_fold before calling
1584 ubsan_instrument_float_cast.
1585
b7055028
SB
15862018-12-08 Segher Boessenkool <segher@kernel.crashing.org>
1587
1588 * c-parser (c_parser_asm_statement) [RID_INLINE]: Delete stray line
1589 setting "quals".
1590
5b76e75f
SB
15912018-12-06 Segher Boessenkool <segher@kernel.crashing.org>
1592
1593 * c-parser.c (c_parser_asm_statement): Detect the inline keyword
1594 after asm. Pass a flag for it to build_asm_expr.
1595 * c-tree.h (build_asm_expr): Update declaration.
1596 * c-typeck.c (build_asm_stmt): Add is_inline parameter. Use it to
1597 set ASM_INLINE_P.
1598
30bd42b9
SB
15992018-12-06 Segher Boessenkool <segher@kernel.crashing.org>
1600
1601 PR inline-asm/55681
1602 * c-parser.c (c_parser_asm_statement): Update grammar. Allow any
1603 combination of volatile and goto, in any order, without repetitions.
1604
9df6c0e4
JB
16052018-12-04 James Norris <jnorris@codesourcery.com>
1606 Cesar Philippidis <cesar@codesourcery.com>
1607 Julian Brown <julian@codesourcery.com>
1608
1609 * c-parser.c (c_parser_oacc_wait_list): Remove dead diagnostic
1610 code.
1611
f44697b7
RB
16122018-11-30 Richard Biener <rguenther@suse.de>
1613
1614 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
1615 _Literal (type) { ... } as empty aggregate or vector constructor.
1616
550dfbdc
MS
16172018-11-29 Martin Sebor <msebor@redhat.com>
1618
1619 PR c/88091
1620 * c-typeck.c (convert_argument): Add a parameter. Adjust indentation.
1621 (convert_arguments): Add comments. Pass additional argument to
1622 the function above.
1623
673670da
MS
16242018-11-29 Martin Sebor <msebor@redhat.com>
1625
1626 PR c/88172
1627 PR testsuite/88208
1628 * c-decl.c (declspec_add_alignas): Adjust call to check_user_alignment.
1629
db1d09b0
MS
16302018-11-23 Martin Sebor <msebor@redhat.com>
1631
1632 PR testsuite/88098
1633 * c-typeck.c (convert_arguments): Call builtin_decl_explicit instead.
1634 (maybe_warn_builtin_no_proto_arg): Handle short enum to int promotion.
1635
98f08eb8
MS
16362018-11-20 Martin Sebor <msebor@redhat.com>
1637
1638 * c-parser.c (c_parser_has_attribute_expression): New function.
1639 (c_parser_attribute): New function.
1640 (c_parser_attributes): Move code into c_parser_attribute.
1641 (c_parser_unary_expression): Handle RID_HAS_ATTRIBUTE_EXPRESSION.
1642
cd5da983
MS
16432018-11-15 Martin Sebor <msebor@redhat.com>
1644
1645 PR c/83656
1646 * c-decl.c (header_for_builtin_fn): Declare.
1647 (diagnose_mismatched_decls): Diagnose declarations of built-in
1648 functions without a prototype.
1649 * c-typeck.c (maybe_warn_builtin_no_proto_arg): New function.
1650 (convert_argument): Same.
1651 (convert_arguments): Factor code out into convert_argument.
1652 Detect mismatches between built-in formal arguments in calls
1653 to built-in without prototype.
1654 (build_conditional_expr): Same.
1655 (type_or_builtin_type): New function.
1656 (convert_for_assignment): Add argument. Conditionally issue
1657 warnings instead of errors for mismatches.
1658
620e594b
DM
16592018-11-13 David Malcolm <dmalcolm@redhat.com>
1660
1661 * c-decl.c: Replace "source_location" with "location_t".
1662 * c-tree.h: Likewise.
1663 * c-typeck.c: Likewise.
1664 * gimple-parser.c: Likewise.
1665
3179ebae
JJ
16662018-11-09 Jakub Jelinek <jakub@redhat.com>
1667
81a227c6
JJ
1668 * c-parser.c (c_parser_omp_clause_final): Use
1669 c_parser_expr_no_commas, convert_lvalue_to_rvalue,
1670 c_objc_common_truthvalue_conversion, c_fully_fold and parentheses
1671 parsing instead of c_parser_paren_condition.
1672 (c_parser_omp_clause_if): Use c_parser_expr_no_commas,
1673 convert_lvalue_to_rvalue, c_objc_common_truthvalue_conversion and
1674 c_fully_fold instead of c_parser_condition.
1675 (c_parser_omp_clause_num_threads, c_parser_omp_clause_num_tasks,
1676 c_parser_omp_clause_grainsize, c_parser_omp_clause_priority,
1677 c_parser_omp_clause_hint, c_parser_omp_clause_num_teams,
1678 c_parser_omp_clause_thread_limit, c_parser_omp_clause_linear): Use
1679 c_parser_expr_no_commas instead of c_parser_expression.
1680
98c91c56
JJ
1681 * c-parser.c (c_parser_omp_clause_reduction): Call sorry_at on
1682 reduction clause with inscan modifier.
1683
3179ebae
JJ
1684 * c-parser.c (c_parser_omp_requires): Call sorry_at on requires
1685 clauses other than atomic_default_mem_order.
1686
28567c40
JJ
16872018-11-08 Jakub Jelinek <jakub@redhat.com>
1688
1689 * c-parser.c: Include memmode.h.
1690 (c_parser_omp_depobj, c_parser_omp_requires): New functions.
1691 (c_parser_pragma): Handle PRAGMA_OMP_DEPOBJ and PRAGMA_OMP_REQUIRES.
1692 (c_parser_omp_clause_name): Handle nontemporal, in_reduction and
1693 task_reduction clauses.
1694 (c_parser_omp_variable_list): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION.
1695 For OMP_CLAUSE_DEPEND, parse clause operands as either an array
1696 section, or lvalue assignment expression.
1697 (c_parser_omp_clause_if): Handle cancel and simd modifiers.
1698 (c_parser_omp_clause_lastprivate): Parse optional
1699 conditional: modifier.
1700 (c_parser_omp_clause_hint): Require constant integer expression rather
1701 than just integer expression.
1702 (c_parser_omp_clause_defaultmap): Parse new kinds of defaultmap
1703 clause.
1704 (c_parser_omp_clause_reduction): Add IS_OMP and KIND arguments.
1705 Parse reduction modifiers. Pass KIND to c_parser_omp_variable_list.
1706 (c_parser_omp_clause_nontemporal, c_parser_omp_iterators): New
1707 functions.
1708 (c_parser_omp_clause_depend): Parse iterator modifier and handle
1709 iterators. Parse mutexinoutset and depobj kinds.
1710 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_reduction
1711 callers.
1712 (c_parser_omp_all_clauses): Likewise. Handle
1713 PRAGMA_OMP_CLAUSE_NONTEMPORAL and
1714 PRAGMA_OMP_CLAUSE_{IN,TASK}_REDUCTION.
1715 (c_parser_omp_atomic): Parse hint and memory order clauses. Handle
1716 default memory order from requires directive if any. Adjust
1717 c_finish_omp_atomic caller.
1718 (c_parser_omp_critical): Allow comma in between (name) and hint clause.
1719 (c_parser_omp_flush): Parse flush with memory-order-clause.
1720 (c_parser_omp_for_loop): Allow NE_EXPR even in
1721 OpenMP loops, adjust c_finish_omp_for caller.
1722 (OMP_SIMD_CLAUSE_MASK): Add if and nontemporal clauses.
1723 (c_parser_omp_master): Add p_name, mask and cclauses arguments.
1724 Allow to be called while parsing combined parallel master.
1725 Parse combined master taskloop{, simd}.
1726 (c_parser_omp_parallel): Parse combined
1727 parallel master{, taskloop{, simd}} constructs.
1728 (OMP_TASK_CLAUSE_MASK): Add in_reduction clause.
1729 (OMP_TASKGROUP_CLAUSE_MASK): Define.
1730 (c_parser_omp_taskgroup): Add LOC argument. Parse taskgroup clauses.
1731 (OMP_TASKWAIT_CLAUSE_MASK): Define.
1732 (c_parser_omp_taskwait): Handle taskwait with depend clauses.
1733 (c_parser_omp_teams): Force a BIND_EXPR with BLOCK
1734 around teams body. Use SET_EXPR_LOCATION.
1735 (c_parser_omp_target_data): Allow target data
1736 with only use_device_ptr clauses.
1737 (c_parser_omp_target): Use SET_EXPR_LOCATION. Set
1738 OMP_REQUIRES_TARGET_USED bit in omp_requires_mask.
1739 (c_parser_omp_requires): New function.
1740 (c_finish_taskloop_clauses): New function.
1741 (OMP_TASKLOOP_CLAUSE_MASK): Add reduction and in_reduction clauses.
1742 (c_parser_omp_taskloop): Use c_finish_taskloop_clauses. Add forward
1743 declaration. Disallow in_reduction clause when combined with parallel
1744 master.
1745 (c_parser_omp_construct): Adjust c_parser_omp_master and
1746 c_parser_omp_taskgroup callers.
1747 * c-typeck.c (c_finish_omp_cancel): Diagnose if clause with modifier
1748 other than cancel.
1749 (handle_omp_array_sections_1): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION
1750 like OMP_CLAUSE_REDUCTION.
1751 (handle_omp_array_sections): Likewise. Call save_expr on array
1752 reductions before calling build_index_type. Handle depend clauses
1753 with iterators.
1754 (struct c_find_omp_var_s): New type.
1755 (c_find_omp_var_r, c_omp_finish_iterators): New functions.
1756 (c_finish_omp_clauses): Don't diagnose nonmonotonic clause
1757 with static, runtime or auto schedule kinds. Call save_expr for whole
1758 array reduction sizes. Diagnose reductions with zero sized elements
1759 or variable length structures. Diagnose nogroup clause used with
1760 reduction clause(s). Handle depend clause with
1761 OMP_CLAUSE_DEPEND_DEPOBJ. Diagnose bit-fields. Require
1762 omp_depend_t type for OMP_CLAUSE_DEPEND_DEPOBJ kinds and
1763 some different type for other kinds. Use build_unary_op with
1764 ADDR_EXPR and build_indirect_ref instead of c_mark_addressable.
1765 Handle depend clauses with iterators. Remove no longer needed special
1766 case that predetermined const qualified vars may be specified in
1767 firstprivate clause. Complain if const qualified vars are mentioned
1768 in data-sharing clauses other than firstprivate or shared. Use
1769 error_at with OMP_CLAUSE_LOCATION (c) as first argument instead of
1770 error. Formatting fix. Handle OMP_CLAUSE_NONTEMPORAL and
1771 OMP_CLAUSE_{IN,TASK}_REDUCTION. Allow any lvalue as
1772 OMP_CLAUSE_DEPEND operand (besides array section), adjust diagnostics.
1773
7e2de6df
DM
17742018-10-29 David Malcolm <dmalcolm@redhat.com>
1775
1776 * c-decl.c (implicit_decl_warning): Update "is there a suggestion"
1777 logic for change to name_hint::operator bool.
1778 (undeclared_variable): Likewise.
1779 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
1780 (c_parser_parameter_declaration): Likewise.
1781
9f936c86
JM
17822018-10-17 Joseph Myers <joseph@codesourcery.com>
1783
1784 * c-errors.c (pedwarn_c11): New function.
1785 * c-parser.c (disable_extension_diagnostics): Save
1786 warn_c11_c2x_compat and set it to 0.
1787 (restore_extension_diagnostics): Restore warn_c11_c2x_compat.
1788 (c_parser_static_assert_declaration_no_semi): Handle
1789 _Static_assert without string constant.
1790 * c-tree.h (pedwarn_c11): New prototype.
1791
033eb567
DM
17922018-10-17 David Malcolm <dmalcolm@redhat.com>
1793
1794 * Make-lang.in (selftest-c): New.
1795 (C_SELFTEST_FLAGS, C_SELFTEST_DEPS, s-selftest-c, selftest-c-gdb)
1796 (selftest-gdb, selftest-c-valgrind, selftest-valgrind): Move here
1797 from gcc/Makefile.in.
1798
0edf3afe
RB
17992018-10-02 Richard Biener <rguenther@suse.de>
1800
1801 * c-decl.c (warn_if_shadowing): Do not test DECL_FROM_INLINE.
1802
8313a764
JM
18032018-09-26 Joseph Myers <joseph@codesourcery.com>
1804
1805 PR c/87390
1806 * c-typeck.c (build_binary_op): Use excess precision for
1807 comparisons of integers and floating-point for C11 and later.
1808
ce6f0888
MJ
18092018-09-26 Martin Jambor <mjambor@suse.cz>
1810
1811 PR c/87347
1812 * c-parser.c (warn_for_abs): Bail out if TYPE_ARG_TYPES is NULL. Fix
ab20d992 1813 comment.
ce6f0888 1814
9c4a4b3c
DM
18152018-09-17 David Malcolm <dmalcolm@redhat.com>
1816
1817 * c-objc-common.c (range_label_for_type_mismatch::get_text):
1818 Update for new param.
1819 * c-typeck.c (maybe_range_label_for_tree_type_mismatch::get_text):
1820 Likewise.
1821
80c6d1f4
MJ
18222018-09-17 Martin Jambor <mjambor@suse.cz>
1823
1824 PR c/63886
1825 * c-parser.c: (warn_for_abs): New function.
1826 (c_parser_postfix_expression_after_primary): Call it.
1827
4a426e36
BE
18282018-09-13 Bernd Edlinger <bernd.edlinger@hotmail.de>
1829
1830 * c-typeck.c (digest_init): Shorten overlength strings.
1831
6d900107
BE
18322018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
1833
1834 * c-decl.c (finish_decl): Call complete_flexible_array_elts.
1835
b5764229
BE
18362018-09-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
1837
1838 * c-decl.c (finish_decl): Call braced_list_to_string here ...
1839 * c-parser.c (c_parser_declaration_or_fndef): ... instead of here.
1840
22eea6b2
AM
18412018-08-30 Alexander Monakov <amonakov@ispras.ru>
1842
1843 * gimple-parser.c (c_parser_gimple_binary_expression): Accept infix
1844 "__MULT_HIGHPART" for MULT_HIGHPART_EXPR.
1845
85204e23
DM
18462018-08-27 David Malcolm <dmalcolm@redhat.com>
1847
1848 PR 87091
1849 * c-decl.c (implicitly_declare): Update call to
1850 maybe_add_include_fixit to suggest overriding the location, as it
1851 is for a note.
1852 * c-objc-common.c (c_tree_printer): Update for conversion of
1853 show_caret_p to a tri-state.
1854
3d78e008
ML
18552018-08-27 Martin Liska <mliska@suse.cz>
1856
1857 * c-decl.c (locate_old_decl): Use new function
92a285c1
ML
1858 fndecl_built_in_p and remove check for FUNCTION_DECL if
1859 possible.
3d78e008
ML
1860 (diagnose_mismatched_decls): Likewise.
1861 (merge_decls): Likewise.
1862 (warn_if_shadowing): Likewise.
1863 (pushdecl): Likewise.
1864 (implicitly_declare): Likewise.
1865 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
1866 * c-tree.h (C_DECL_ISNT_PROTOTYPE): Likewise.
1867 * c-typeck.c (build_function_call_vec): Likewise.
1868 (convert_arguments): Likewise.
1869
097f82ec
DM
18702018-08-20 David Malcolm <dmalcolm@redhat.com>
1871
1872 PR other/84889
1873 * c-decl.c (pushtag): Add auto_diagnostic_group instance.
1874 (diagnose_mismatched_decls): Likewise, in various places.
1875 (warn_if_shadowing): Likewise.
1876 (implicit_decl_warning): Likewise.
1877 (implicitly_declare): Likewise.
1878 (undeclared_variable): Likewise.
1879 (declare_label): Likewise.
1880 (grokdeclarator): Likewise.
1881 (start_function): Likewise.
1882 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
1883 (c_parser_parameter_declaration): Likewise.
1884 (c_parser_binary_expression): Likewise.
1885 * c-typeck.c (c_expr_sizeof_expr): Likewise.
1886 (parser_build_binary_op): Likewise.
1887 (build_unary_op): Likewise.
1888 (error_init): Likewise.
1889 (pedwarn_init): Likewise.
1890 (warning_init): Likewise.
1891 (convert_for_assignment): Likewise.
1892
96e6ae57
DM
18932018-08-15 David Malcolm <dmalcolm@redhat.com>
1894
1895 * c-objc-common.c: Include "gcc-rich-location.h".
1896 (c_tree_printer): Move implemenation of '%T' to...
1897 (print_type): ...this new function.
1898 (range_label_for_type_mismatch::get_text): New function.
1899 * c-typeck.c (convert_for_assignment): Add type labels to the rhs
1900 range for the various ic_argpass cases.
1901 (class maybe_range_label_for_tree_type_mismatch): New class.
1902 (build_binary_op): Use it when calling binary_op_error.
1903
0cd020ae 19042018-08-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
ab20d992 1905
0cd020ae
PK
1906 * c-decl.c (start_decl): Do not warn if variables is named as main
1907 and is a local variable.
1908
72733314
IS
19092018-08-15 Iain Sandoe <iain@sandoe.co.uk>
1910
1911 PR c/19315
1912 * c-decl.c (finish_decl): Don't add the 'extern' storage class to
1913 objects of unknown size.
1914
23aa9f7c
MS
19152018-08-13 Martin Sebor <msebor@redhat.com>
1916
1917 PR tree-optimization/71625
1918 * c-parser.c (c_parser_declaration_or_fndef): Call
1919 braced_list_to_string.
1920
e5e7e50d
BH
19212018-08-03 Bogdan Harjoc <harjoc@gmail.com>
1922
1923 PR c/86690
1924 * c-typeck.c (lookup_field): Do not use TYPE_LANG_SPECIFIC after
1925 errors.
1926
8a45b051
MS
19272018-08-01 Martin Sebor <msebor@redhat.com>
1928
1929 PR tree-optimization/86650
1930 * c-objc-common.c (c_tree_printer): Move usage of EXPR_LOCATION (t)
1931 and TREE_BLOCK (t) from within percent_K_format to this callsite.
1932
5922dcb5
JJ
19332018-08-01 Jakub Jelinek <jakub@redhat.com>
1934
1935 PR c/85704
1936 * c-typeck.c (init_field_decl_cmp): New function.
1937 (output_pending_init_elements): Use it for field comparisons
1938 instead of pure bit_position comparisons.
1939
9b452033
JJ
19402018-07-12 Jakub Jelinek <jakub@redhat.com>
1941
1942 * c-decl.c (c_decl_attributes): Don't diagnose vars without mappable
1943 type here, instead add "omp declare target implicit" attribute.
1944 (finish_decl): Diagnose vars without mappable type here.
1945
ab20d992
JJ
19462018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
1947 Thomas Schwinge <thomas@codesourcery.com>
829c6349
CLT
1948 Cesar Philippidis <cesar@codesourcery.com>
1949
1950 * c-parser.c (c_parser_omp_clause_name): Add support for finalize
1951 and if_present. Make present_or_{copy,copyin,copyout,create} aliases
1952 to their non-present_or_* counterparts. Make 'self' an alias to
1953 PRAGMA_OACC_CLAUSE_HOST.
1954 (c_parser_oacc_data_clause): Update GOMP mappings for
1955 PRAGMA_OACC_CLAUSE_{COPY,COPYIN,COPYOUT,CREATE,DELETE}. Remove
1956 PRAGMA_OACC_CLAUSE_{SELF,PRESENT_OR_*}.
1957 (c_parser_oacc_all_clauses): Handle finalize and if_present clauses.
1958 Remove support for present_or_* clauses.
1959 (OACC_KERNELS_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
1960 (OACC_PARALLEL_CLAUSE_MASK): Likewise.
1961 (OACC_DECLARE_CLAUSE_MASK): Likewise.
1962 (OACC_DATA_CLAUSE_MASK): Likewise.
1963 (OACC_ENTER_DATA_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
1964 (OACC_EXIT_DATA_CLAUSE_MASK): Add FINALIZE clause.
1965 (OACC_UPDATE_CLAUSE_MASK): Remove SELF, add IF_PRESENT.
1966 (c_parser_oacc_declare): Remove PRESENT_OR_* clauses.
1967 * c-typeck.c (c_finish_omp_clauses): Handle IF_PRESENT and FINALIZE.
1968
e197e64e
KV
19692018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
1970
1971 * c-typeck.c (build_unary_op): Handle ABSU_EXPR;
1972 * gimple-parser.c (c_parser_gimple_statement): Likewise.
1973 (c_parser_gimple_unary_expression): Likewise.
1974
487f2f61
JJ
19752018-06-15 Jakub Jelinek <jakub@redhat.com>
1976
1977 PR c/86093
1978 * c-typeck.c (pointer_diff): Cast both pointers to unqualified types
1979 before doing POINTER_DIFF_EXPR.
1980
e4d44a37
MP
19812018-06-07 Marek Polacek <polacek@redhat.com>
1982
1983 PR c/85318
1984 * c-decl.c (check_for_loop_decls): Add -Wc90-c99-compat warning about
1985 for loop initial declarations.
1986
b67b9225
DP
19872018-05-30 David Pagan <dave.pagan@oracle.com>
1988
1989 PR c/55976
1990 * c-decl.c (grokdeclarator): Update check for return type warnings.
1991 (start_function): Likewise.
1992 (finish_function): Likewise.
1993 * c-typeck.c (c_finish_return): Update check for return type warnings.
1994 Pass OPT_Wreturn_type to pedwarn when appropriate.
1995
c566cc9f
RS
19962018-05-18 Richard Sandiford <richard.sandiford@linaro.org>
1997
1998 * gimple-parser.c (c_parser_gimple_postfix_expression): Remove
1999 __FMA_EXPR handlng.
2000
e4f81565
RS
20012018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
2002
2003 * gimple-parser.c: Include internal-fn.h.
2004 (c_parser_gimple_statement): Treat a leading CPP_DOT as a call.
2005 (c_parser_gimple_call_internal): New function.
2006 (c_parser_gimple_postfix_expression): Use it to handle CPP_DOT.
2007 Fix typos in comment.
2008
79e7b1fe
JJ
20092018-05-10 Jakub Jelinek <jakub@redhat.com>
2010
2011 PR c++/85662
2012 * c-fold.c (c_fully_fold_internal): Use fold_offsetof rather than
2013 fold_offsetof_1, pass TREE_TYPE (expr) as TYPE to it and drop the
2014 fold_convert_loc.
2015 * c-typeck.c (build_unary_op): Use fold_offsetof rather than
2016 fold_offsetof_1, pass argtype as TYPE to it and drop the
2017 fold_convert_loc.
2018
f7584c81
DP
20192018-05-02 David Pagan <dave.pagan@oracle.com>
2020
2021 PR c/30552
2022 * c-decl.c (old_style_parameter_scope): New function.
2023 * c-parser.c (c_parser_postfix_expression): Check for statement
2024 expressions in old-style function parameter list declarations.
2025 * c-parser.h (old_style_parameter_scope): New extern declaration.
2026
b33a0cb3
JJ
20272018-04-25 Jakub Jelinek <jakub@redhat.com>
2028
2029 PR sanitizer/84307
2030 * c-decl.c (build_compound_literal): Call pushdecl (decl) even when
2031 it is not TREE_STATIC.
2032 * c-typeck.c (c_mark_addressable) <case COMPOUND_LITERAL_EXPR>: Mark
2033 not just the COMPOUND_LITERAL_EXPR node itself addressable, but also
2034 its COMPOUND_LITERAL_EXPR_DECL.
2035
c5c5822a
JM
20362018-03-21 Joseph Myers <joseph@codesourcery.com>
2037
2038 * c-parser.c (c_parser_postfix_expression): For __builtin_tgmath
2039 where all functions return the same _FloatN or _FloatNx type,
2040 treat integer types as _Float64 instead of double.
2041
aa1c9429
JJ
20422018-03-21 Jakub Jelinek <jakub@redhat.com>
2043
2044 PR c/84999
2045 * c-typeck.c (build_binary_op): If c_common_type_for_size fails when
2046 building vector comparison, diagnose it and return error_mark_node.
2047
9bb45a95
JJ
20482018-03-15 Jakub Jelinek <jakub@redhat.com>
2049
2050 PR c/84853
2051 * c-typeck.c (build_binary_op) <case RSHIFT_EXPR, case LSHIFT_EXPR>:
2052 If code1 is INTEGER_TYPE, only allow code0 VECTOR_TYPE if it has
2053 INTEGER_TYPE element type.
2054
ada6bad9
DP
20552018-03-13 David Pagan <dave.pagan@oracle.com>
2056
2057 PR c/46921
2058 * c-typeck.c (output_init_element): Ensure field initializer
2059 expression is always evaluated if there are side effects.
2060
849bbdb9
JJ
20612018-03-06 Jakub Jelinek <jakub@redhat.com>
2062
2063 PR c/84721
2064 * c-parser.c (add_debug_begin_stmt): Don't add DEBUG_BEGIN_STMT if
2065 !building_stmt_list_p ().
2066
d74641bd
RS
20672018-02-13 Richard Sandiford <richard.sandiford@linaro.org>
2068
2069 PR c/84305
2070 * c-decl.c (grokdeclarator): Create an anonymous TYPE_DECL
2071 in PARM and TYPENAME contexts too, but attach it to a BIND_EXPR
2072 and include the BIND_EXPR in the list of things that need to be
2073 pre-evaluated.
2074
0444aa9c
NS
20752018-02-09 Nathan Sidwell <nathan@acm.org>
2076
2077 PR c/84293
2078 * c-typeck.c (build_indirect_ref, build_c_cast): Pass expr location
2079 to strict_aliasing_warning.
2080
7c30b12a
PC
20812018-02-02 Paolo Carlini <paolo.carlini@oracle.com>
2082
2083 * c-typeck.c (really_start_incremental_init, push_init_level,
2084 set_nonincremental_init, output_init_element, process_init_element):
2085 Use DECL_UNNAMED_BIT_FIELD.
2086
2be4dfcb
MP
20872018-01-31 Marek Polacek <polacek@redhat.com>
2088
2089 PR c/81779
2090 * c-parser.c (c_parser_compound_statement_nostart): Call
2091 expansion_point_location_if_in_system_header.
2092
bb9869d5
DM
20932018-01-17 David Malcolm <dmalcolm@redhat.com>
2094
2095 PR c++/83814
2096 * c-fold.c (fold_for_warn): Move from c-common.c, reducing to just
2097 the C part.
2098
b4923738
JJ
20992018-01-13 Jakub Jelinek <jakub@redhat.com>
2100
2101 PR c/83801
2102 * c-tree.h (decl_constant_value_1): Add a bool argument.
2103 * c-typeck.c (decl_constant_value_1): Add IN_INIT argument, allow
2104 returning a CONSTRUCTOR if it is true. Use error_operand_p.
2105 (decl_constant_value): Adjust caller.
2106 * c-fold.c (c_fully_fold_internal): If in_init, pass true to
2107 decl_constant_value_1 as IN_INIT. Otherwise, punt if
2108 decl_constant_value returns initializer that has BLKmode or
2109 array type.
2110 (c_fully_fold_internal) <case COMPONENT_REF>: Fold if !lval.
2111
928686b1
RS
21122018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
2113 Alan Hayward <alan.hayward@arm.com>
2114 David Sherwood <david.sherwood@arm.com>
2115
2116 * c-typeck.c (comptypes_internal, build_binary_op): Handle polynomial
2117 TYPE_VECTOR_SUBPARTS.
2118
85ec4feb
JJ
21192018-01-03 Jakub Jelinek <jakub@redhat.com>
2120
2121 Update copyright years.
2122
913884f7
JJ
21232018-01-01 Jakub Jelinek <jakub@redhat.com>
2124
2125 PR c/83595
2126 * c-parser.c (c_parser_braced_init, c_parser_initelt,
2127 c_parser_conditional_expression, c_parser_cast_expression,
2128 c_parser_sizeof_expression, c_parser_alignof_expression,
2129 c_parser_postfix_expression, c_parser_omp_declare_reduction,
2130 c_parser_transaction_expression): Use set_error () method instead
2131 of setting value member to error_mark_node.
2132
c6cfa2bf
MM
21332017-12-28 Michael Meissner <meissner@linux.vnet.ibm.com>
2134
2135 * c-decl.c (header_for_builtin_fn): Add integer rounding _Float<N>
2136 and _Float<N>X built-in functions.
2137
11d29d63
JJ
21382017-12-22 Jakub Jelinek <jakub@redhat.com>
2139
14ec014e
JJ
2140 PR debug/83550
2141 * c-decl.c (finish_struct): Set DECL_SOURCE_LOCATION on
2142 TYPE_STUB_DECL and call rest_of_type_compilation before processing
2143 incomplete vars rather than after it.
2144
11d29d63
JJ
2145 PR debug/83547
2146 * c-typeck.c (c_finish_stmt_expr): Ignore !TREE_SIDE_EFFECTS as
2147 indicator of ({ }), instead skip all trailing DEBUG_BEGIN_STMTs first,
2148 and consider empty ones if there are no other stmts. For
2149 -Wunused-value walk all statements before the one only followed by
2150 DEBUG_BEGIN_STMTs.
2151
170a8bd6 21522017-12-22 Mike Stump <mikestump@comcast.net>
92a285c1 2153 Eric Botcazou <ebotcazou@adacore.com>
170a8bd6
EB
2154
2155 * c-parser.c (c_parser_while_statement): Add unroll parameter and
2156 build ANNOTATE_EXPR if present. Add 3rd operand to ANNOTATE_EXPR.
2157 (c_parser_do_statement): Likewise.
2158 (c_parser_for_statement): Likewise.
2159 (c_parser_statement_after_labels): Adjust calls to above.
2160 (c_parse_pragma_ivdep): New static function.
2161 (c_parser_pragma_unroll): Likewise.
2162 (c_parser_pragma) <PRAGMA_IVDEP>: Add support for pragma Unroll.
2163 <PRAGMA_UNROLL>: New case.
2164
01512446
JJ
21652017-12-19 Jakub Jelinek <jakub@redhat.com>
2166
2167 * c-typeck.c (comptypes_internal, function_types_compatible_p,
2168 perform_integral_promotions, digest_init): Replace Yoda conditions
2169 with typical order conditions.
2170 * c-decl.c (check_bitfield_type_and_width): Likewise.
2171
c65e18d3
BE
21722017-12-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
2173
2174 * c-typeck.c (c_safe_arg_type_equiv_p,
2175 c_safe_function_type_cast_p): New function.
2176 (build_c_cast): Implement -Wcast-function-type.
2177
b7280579
RB
21782017-12-14 Richard Biener <rguenther@suse.de>
2179
2180 PR c/83415
2181 * c-fold.c (c_fully_fold_internal): Treat VIEW_CONVERT_EXPR
2182 like REALPART_EXPR for the behavior of whether its operand
2183 is an lvalue.
2184
49e6a6c0
MP
21852017-12-12 Marek Polacek <polacek@redhat.com>
2186
2187 PR c/82679
2188 * c-decl.c (grokdeclarator): Check declspecs insted of atomicp.
2189
ab20d992 21902017-12-12 Alexandre Oliva <aoliva@redhat.com>
96a95ac1
AO
2191
2192 * c-objc-common.h (LANG_HOOKS_EMITS_BEGIN_STMT): Redefine as true.
2193 * c-parser.c (add_debug_begin_stmt): New.
2194 (c_parser_declaration_or_fndef): Call it.
2195 (c_parser_compound_statement_nostart): Likewise.
2196 (c_parser_statement_after_labels): Likewise.
2197 * c-typeck (c_finish_stmt_expr): Skip begin stmts markers.
2198
4b2b493f
JM
21992017-12-07 Joseph Myers <joseph@codesourcery.com>
2200
2201 * c-decl.c (build_compound_literal): Add parameter alignas_align
2202 and set alignment of decl if nonzero.
2203 * c-parser.c (c_keyword_starts_typename): Allow RID_ALIGNAS.
2204 (c_parser_declspecs): Allow RID_ALIGNAS to follow a type, like a
2205 qualifier.
2206 (c_parser_struct_declaration): Update syntax comment.
2207 (c_parser_type_name): Add alignas_ok argument and pass it to
2208 c_parser_declspecs.
2209 (c_parser_cast_expression): Pass true to c_parser_type_name and
2210 give error if a cast used an _Alignas specifier.
2211 (c_parser_sizeof_expression): Pass true to c_parser_type_name and
2212 give error if sizeof (type-name) used an _Alignas specifier.
2213 (c_parser_alignof_expression): Pass true to c_parser_type_name and
2214 give error if _Alignof (type-name) used an _Alignas specifier.
2215 (c_parser_postfix_expression_after_paren_type): Check specified
2216 alignment for a compound literal and pass it to
2217 build_compound_literal.
2218 * c-parser.h (c_parser_type_name): Update prototype.
2219 * c-tree.h (build_compound_literal): Update prototype.
2220
5d9ae53d
MS
22212017-12-07 Martin Sebor <msebor@redhat.com>
2222
2223 PR c/81544
2224 * c-decl.c (c_decl_attributes): Look up existing declaration and
2225 pass it to decl_attributes.
2226
c79144f8
DM
22272017-12-06 David Malcolm <dmalcolm@redhat.com>
2228
2229 PR c/83236
2230 * c-decl.c (lookup_name_fuzzy): Don't suggest names that are
2231 reserved for use by the implementation.
2232
613bc14f
DM
22332017-12-06 David Malcolm <dmalcolm@redhat.com>
2234
2235 * c-decl.c: Include "c-family/c-spellcheck.h".
2236
05abad4c
ML
22372017-12-05 Martin Liska <mliska@suse.cz>
2238 Jakub Jelinek <jakub@redhat.com>
2239
2240 * c-typeck.c (pointer_diff): Add new argument and instrument
2241 pointer subtraction.
2242 (build_binary_op): Similar for pointer comparison.
2243
cc6534d4
JJ
22442017-12-01 Jakub Jelinek <jakub@redhat.com>
2245
65791f42
JJ
2246 PR c/79153
2247 * c-parser.c: Include tree-iterator.h.
2248 (c_parser_switch_statement): Emit LABEL_EXPR for the break label
2249 into SWITCH_BODY instead of after it and set SWITCH_BREAK_LABEL_P
2250 on it.
2251
cc6534d4
JJ
2252 PR c/83222
2253 * c-tree.h (decl_constant_value_1): Declare.
2254 * c-typeck.c (decl_constant_value_1): New function.
2255 (decl_constant_value): Use it.
2256 * c-fold.c (c_fully_fold_internal): If in_init, use
2257 decl_constant_value_1 instead of decl_constant_value.
2258
5de73c05
JJ
22592017-11-30 Jakub Jelinek <jakub@redhat.com>
2260
2261 * c-parser.c (c_parser_postfix_expression): Use ; instead of ;;.
2262
058f0b9e
JJ
22632017-11-28 Jakub Jelinek <jakub@redhat.com>
2264
2265 PR sanitizer/81275
2266 * c-typeck.c (c_finish_case): Set SWITCH_ALL_CASES_P if
2267 c_switch_covers_all_cases_p returns true.
2268
5e9d6aa4 22692017-11-28 Julia Koval <julia.koval@intel.com>
92a285c1 2270 Sebastian Peryt <sebastian.peryt@intel.com>
5e9d6aa4
JK
2271
2272 * Make-lang.in (c/c-array-notation.o): Remove.
2273 * c-array-notation.c: Delete.
2274 * c-decl.c: Remove cilkplus condition.
2275 * c-parser.c (c_parser_cilk_simd, c_parser_cilk_for,
2276 c_parser_cilk_verify_simd, c_parser_array_notation,
2277 c_parser_cilk_clause_vectorlength, c_parser_cilk_grainsize,
2278 c_parser_cilk_simd_fn_vector_attrs,
2279 c_finish_cilk_simd_fn_tokens): Delete.
2280 (c_parser_declaration_or_fndef): Remove cilkplus condition.
2281 (c_parser_direct_declarator_inner): Ditto.
2282 (CILK_SIMD_FN_CLAUSE_MASK): Delete.
2283 (c_parser_attributes, c_parser_compound_statement,
2284 c_parser_statement_after_labels, c_parser_if_statement,
2285 c_parser_switch_statement, c_parser_while_statement,
2286 c_parser_do_statement, c_parser_for_statement,
2287 c_parser_unary_expression, c_parser_postfix_expression,
2288 c_parser_postfix_expression_after_primary,
2289 c_parser_pragma, c_parser_omp_clause_name, c_parser_omp_all_clauses,
2290 c_parser_omp_for_loop, c_finish_omp_declare_simd): Remove cilkplus
2291 support.
2292 * c-typeck.c (build_array_ref, build_function_call_vec,
2293 convert_arguments,
2294 lvalue_p, build_compound_expr, c_finish_return, c_finish_if_stmt,
2295 c_finish_loop, build_binary_op): Remove cilkplus support.
2296
9e851845
JJ
22972017-11-28 Jakub Jelinek <jakub@redhat.com>
2298
2299 * c-typeck.c (c_start_case): Build SWITCH_EXPR using build2 instead
2300 of build3.
2301
ab20d992 23022017-11-14 Boris Kolpackov <boris@codesynthesis.com>
8c7dbea9
BK
2303
2304 * Make-lang.in (c.install-plugin): Install backend import library.
2305
41521dee
JJ
23062017-11-23 Jakub Jelinek <jakub@redhat.com>
2307
2308 * c-parser.c (c_parser_omp_declare_simd): Reject declare simd in
2309 pragma_stmt context.
2310
ac9effed
EB
23112017-11-23 Mike Stump <mikestump@comcast.net>
2312 Eric Botcazou <ebotcazou@adacore.com>
2313
2314 * c-parser.c (c_parser_while_statement): Pass 3rd operand to
2315 ANNOTATE_EXPR.
2316 (c_parser_do_statement): Likewise.
2317 (c_parser_for_statement): Likewise.
2318
ce95abc4
DM
23192017-11-22 David Malcolm <dmalcolm@redhat.com>
2320
2321 PR c++/62170
2322 * c-objc-common.c (c_tree_printer): Convert penultimate param from
2323 bool to bool *. Within '%T' handling, if showing an "aka", use
2324 "quoted" param to add appropriate quoting.
2325
974aedcc
MP
23262017-11-22 Marek Polacek <polacek@redhat.com>
2327
2328 PR c++/60336
2329 PR middle-end/67239
2330 PR target/68355
2331 * c-decl.c (grokdeclarator): Set DECL_PADDING_P on unnamed bit-fields.
2332
d4300cc6
DM
23332017-11-21 David Malcolm <dmalcolm@redhat.com>
2334
2335 PR c/83056
2336 * c-decl.c (lookup_name_fuzzy): Don't suggest names that came from
2337 earlier failed lookups.
2338
1af4ebf5
MG
23392017-11-21 Marc Glisse <marc.glisse@inria.fr>
2340
2341 * c-fold.c (c_fully_fold_internal): Handle POINTER_DIFF_EXPR.
2342 * c-typeck.c (pointer_diff): Use POINTER_DIFF_EXPR.
2343
26edace6
DM
23442017-11-20 David Malcolm <dmalcolm@redhat.com>
2345
2346 PR c/81404
2347 * c-decl.c: Include "c-family/known-headers.h".
2348 (get_c_name_hint): Rename to get_stdlib_header_for_name and move
2349 to known-headers.cc.
2350 (class suggest_missing_header): Move to known-header.h.
2351 (lookup_name_fuzzy): Call get_c_stdlib_header_for_name rather
2352 than get_c_name_hint.
2353
b1212255
DM
23542017-11-20 David Malcolm <dmalcolm@redhat.com>
2355
2356 * c-decl.c (get_c_name_hint): New function.
2357 (class suggest_missing_header): New class.
2358 (lookup_name_fuzzy): Call get_c_name_hint and use it to
2359 suggest missing headers to the user.
2360
6c7a259b
DM
23612017-11-20 David Malcolm <dmalcolm@redhat.com>
2362
2363 * c-decl.c: Define INCLUDE_UNIQUE_PTR before including system.h.
2364 Include "c-family/name-hint.h"
2365 (implicit_decl_warning): Convert "hint" from
2366 const char * to name_hint. Pass location to
2367 lookup_name_fuzzy. Suppress any deferred diagnostic if the
2368 warning was not printed.
2369 (undeclared_variable): Likewise for "guessed_id".
2370 (lookup_name_fuzzy): Convert return type from const char *
2371 to name_hint. Add location_t param.
2372 * c-parser.c: Define INCLUDE_UNIQUE_PTR before including system.h.
2373 Include "c-family/name-hint.h"
2374 (c_parser_declaration_or_fndef): Convert "hint" from
2375 const char * to name_hint. Pass location to lookup_name_fuzzy.
2376 (c_parser_parameter_declaration): Likewise.
2377
f9c59f7e
JJ
23782017-11-19 Jakub Jelinek <jakub@redhat.com>
2379
2380 PR c/66618
2381 PR c/69960
2382 * c-parser.c (c_parser_omp_atomic): Pass true as LVAL to c_fully_fold
2383 where needed.
2384 * c-typeck.c (build_unary_op, build_modify_expr, build_asm_expr,
2385 handle_omp_array_sections): Likewise.
2386 (digest_init): Don't call decl_constant_value_for_optimization.
2387 * c-tree.h (decl_constant_value_for_optimization): Removed.
2388 * c-fold.c (c_fold_array_ref): New function.
2389 (c_fully_fold_internal): Add LVAL argument, propagate it through
2390 recursive calls. For VAR_P call decl_constant_value and
2391 unshare if not LVAL and either optimizing or IN_INIT. Remove
2392 decl_constant_value_for_optimization calls. If IN_INIT and not LVAL,
2393 fold ARRAY_REF with STRING_CST and INTEGER_CST operands.
2394 (c_fully_fold): Add LVAL argument, pass it through to
2395 c_fully_fold_internal.
2396 (decl_constant_value_for_optimization): Removed.
2397
3ca0dc60
JM
23982017-11-15 Joseph Myers <joseph@codesourcery.com>
2399
2400 PR c/81156
2401 * c-parser.c (check_tgmath_function): New function.
2402 (enum tgmath_parm_kind): New enum.
2403 (c_parser_postfix_expression): Handle __builtin_tgmath.
2404
64a5912c
DM
24052017-10-31 David Malcolm <dmalcolm@redhat.com>
2406
2407 * c-decl.c (implicit_decl_warning): Update for renaming of
2408 pedwarn_at_rich_loc and warning_at_rich_loc.
2409 (implicitly_declare): Likewise for renaming of inform_at_rich_loc.
2410 (undeclared_variable): Likewise for renaming of error_at_rich_loc.
2411 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
2412 (c_parser_struct_or_union_specifier): Likewise for renaming of
2413 pedwarn_at_rich_loc.
2414 (c_parser_parameter_declaration): Likewise for renaming of
2415 error_at_rich_loc.
2416 * c-typeck.c (build_component_ref): Likewise.
2417 (build_unary_op): Likewise for renaming of inform_at_rich_loc.
2418 (pop_init_level): Likewise for renaming of warning_at_rich_loc.
2419 (set_init_label): Likewise for renaming of error_at_rich_loc.
2420
c1136864
RB
24212017-10-30 Richard Biener <rguenther@suse.de>
2422
2423 * gimple-parser.c (c_parser_gimple_statement): Parse conditional
2424 stmts.
2425
ee5fd23a
MM
24262017-10-27 Michael Meissner <meissner@linux.vnet.ibm.com>
2427
2428 * c-decl.c (header_for_builtin_fn): Add support for copysign, fma,
2429 fmax, fmin, and sqrt _Float<N> and _Float<N>X variants.
2430
1a59ccf2
DM
24312017-10-25 David Malcolm <dmalcolm@redhat.com>
2432
2433 PR c/7356
2434 * c-parser.c (c_parser_declaration_or_fndef): Detect missing
2435 semicolons.
2436
bc1a75dd
JJ
24372017-10-25 Jakub Jelinek <jakub@redhat.com>
2438
2439 PR libstdc++/81706
2440 * c-decl.c (merge_decls): Copy "omp declare simd" attributes from
2441 newdecl to corresponding __builtin_ if any.
2442
ff1ff960
PC
24432017-10-24 Paolo Carlini <paolo.carlini@oracle.com>
2444
2445 PR c++/82466
2446 * c-decl.c (diagnose_mismatched_decls): Use
2447 OPT_Wbuiltin_declaration_mismatch.
2448
62e1c678
DM
24492017-10-12 David Malcolm <dmalcolm@redhat.com>
2450
2451 * c-parser.c (c_parser_require): Add "type_is_unique" param and
2452 use it to guard calls to maybe_suggest_missing_token_insertion.
2453 (c_parser_parms_list_declarator): Override default value of new
2454 "type_is_unique" param to c_parser_require.
2455 (c_parser_asm_statement): Likewise.
2456 * c-parser.h (c_parser_require): Add "type_is_unique" param,
2457 defaulting to true.
2458
a92f6726
NS
24592017-10-11 Nathan Sidwell <nathan@acm.org>
2460
2461 * c-decl.c (grokdeclarator): Check HAS_DECL_ASSEMBLER_NAME_P too.
2462
8e6cdc90
RS
24632017-10-10 Richard Sandiford <richard.sandiford@linaro.org>
2464
2465 * c-parser.c (c_parser_cilk_clause_vectorlength): Use wi::to_wide when
2466 operating on trees as wide_ints.
2467 * c-typeck.c (build_c_cast, c_finish_omp_clauses): Likewise.
2468 (c_tree_equal): Likewise.
2469
8139a48e
DM
24702017-10-04 David Malcolm <dmalcolm@redhat.com>
2471
2472 * c-decl.c (push_parm_decl): Store c_parm's location into the
2473 PARAM_DECL.
2474 (build_c_parm): Add "loc" param and store it within the c_parm.
2475 * c-parser.c (struct c_parser): Add "last_token_location" field.
2476 (c_parser_consume_token): Store location of the token into the
2477 new field.
2478 (c_parser_declaration_or_fndef): Store params into DECL_ARGUMENTS
2479 when handling a FUNCTION_DECL, if it doesn't already have them.
2480 (c_parser_parameter_declaration): Generate a location for the
2481 parameter, and pass it to the call to build_c_parm.
2482 * c-tree.h (struct c_parm): Add field "loc".
2483 (build_c_parm): Add location_t param.
2484 * c-typeck.c (get_fndecl_argument_location): New function.
2485 (inform_for_arg): New function.
2486 (convert_for_assignment): Use inform_for_arg when dealing with
2487 ic_argpass.
2488
2a389958
JJ
24892017-09-29 Jakub Jelinek <jakub@redhat.com>
2490
7d386d45
JJ
2491 * c-decl.c (grokfield): Use SET_DECL_C_BIT_FIELD here if
2492 width is non-NULL.
2493 (finish_struct): Test DECL_C_BIT_FIELD instead of DECL_INITIAL,
2494 don't SET_DECL_C_BIT_FIELD here.
2495
2a389958
JJ
2496 PR c/82340
2497 * c-decl.c (build_compound_literal): Use c_apply_type_quals_to_decl
2498 instead of trying to set just TREE_READONLY manually.
2499
ebc6a85e
TV
25002017-09-16 Tom de Vries <tom@codesourcery.com>
2501
2502 PR c/81875
2503 * c-parser.c (c_parser_omp_for_loop): Fold only operands of cond, not
2504 cond itself.
2505
bb75facd
JM
25062017-09-15 Joseph Myers <joseph@codesourcery.com>
2507
2508 PR c/82071
2509 * c-typeck.c (ep_convert_and_check): Just call convert_and_check
2510 for C11.
2511 (build_conditional_expr): For C11, generate result with excess
2512 precision when one argument is an integer and the other is of a
2513 type using excess precision.
2514
1d933576
BE
25152017-09-15 Bernd Edlinger <bernd.edlinger@hotmail.de>
2516
2517 * c-typeck.c (build_c_cast): Implement -Wcast-align=strict.
2518
267bbb6f
MP
25192017-09-13 Marek Polacek <polacek@redhat.com>
2520
2521 PR c/82167
2522 * c-typeck.c (c_expr_sizeof_expr): Use the type of expr.value rather
2523 than expr.original_type.
2524
6836632e
NS
25252017-09-12 Nathan Sidwell <nathan@acm.org>
2526
2527 * c-decl.c (field_decl_cmp, resort_data, resort_field_decl_cmp,
2528 resort_sorted_fields): Moved from c-family/c-common.c.
2529 * c-lang.h (struct sorted_fields_type): Moved from c-family/c-common.h.
2530
e035be33
JM
25312017-09-01 Joseph Myers <joseph@codesourcery.com>
2532
2533 PR c/82071
2534 * c-typeck.c (build_atomic_assign): Handle argument with excess
2535 precision. Ensure any EXCESS_PRECISION_EXPR is present in
2536 argument passed to build_binary_op and convert_for_assignment but
2537 not for call to c_fully_fold.
2538 (build_modify_expr): Do not remove EXCESS_PRECISION_EXPR early.
2539 Ensure build_binary_op is called with argument with original
2540 semantic type. Avoid calling c_fully_fold with an
2541 EXCESS_PRECISION_EXPR from build_binary_op.
2542
d2e05fcb
JJ
25432017-09-01 Jakub Jelinek <jakub@redhat.com>
2544
2545 PR c/81887
2546 * c-parser.c (c_parser_omp_ordered): Handle -fopenmp-simd.
2547
b397965c
RS
25482017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
2549 Alan Hayward <alan.hayward@arm.com>
2550 David Sherwood <david.sherwood@arm.com>
2551
2552 * c-typeck.c (build_binary_op): Use SCALAR_TYPE_MODE.
2553 (c_common_type): Likewise. Use as_a <scalar_mode> when setting
2554 m1 and m2 to the signed equivalent of a fixed-point
2555 SCALAR_TYPE_MODE.
2556
14e18d71
DM
25572017-08-24 David Malcolm <dmalcolm@redhat.com>
2558
2559 * c-tree.h (c_expr::get_location) Use EXPR_HAS_LOCATION rather
2560 than CAN_HAVE_LOCATION_P when determining whether to use the
2561 location_t value within "value".
2562
7f204c0f
DM
25632017-08-21 David Malcolm <dmalcolm@redhat.com>
2564
2565 * c-parser.c (c_parser_expr_list): Use c_expr::get_location ()
2566 rather than peeking the location of the first token.
2567 * c-tree.h (c_expr::get_location): New method.
2568
2f687306
DM
25692017-08-21 David Malcolm <dmalcolm@redhat.com>
2570
2571 * c-typeck.c (build_function_call_vec): Pass arg_loc to call
2572 to check_function_arguments.
2573
3e7b80d7
MP
25742017-08-18 Marek Polacek <polacek@redhat.com>
2575
2576 * c-parser.c (c_parser_postfix_expression): Remove unused code. Update
2577 commentary.
2578
00aa1fa2
L
25792017-08-18 H.J. Lu <hongjiu.lu@intel.com>
2580
2581 PR c/53037
2582 * c-decl.c (merge_decls): Also merge DECL_WARN_IF_NOT_ALIGN.
2583 (check_bitfield_type_and_width): Don't allow bit-field with
2584 warn_if_not_aligned type.
2585
da67acb9
MS
25862017-08-14 Martin Sebor <msebor@redhat.com>
2587
2588 PR c/81117
2589 * c-objc-common.c (c_objc_common_init): Handle 'G'.
2590
bb85aa74
MP
25912017-08-11 Marek Polacek <polacek@redhat.com>
2592
2593 PR c/81795
2594 * c-decl.c (pushtag): Only print inform if the warning was printed.
2595 (grokdeclarator): Likewise.
2596
32129a17
DM
25972017-08-10 David Malcolm <dmalcolm@redhat.com>
2598
2599 * c-parser.c (c_parser_error): Rename to...
2600 (c_parser_error_richloc): ...this, making static, and adding
2601 "richloc" parameter, passing it to the c_parse_error call,
2602 rather than calling c_parser_set_source_position_from_token.
2603 (c_parser_error): Reintroduce, reimplementing in terms of the
2604 above, converting return type from void to bool.
2605 (class token_pair): New class.
2606 (struct matching_paren_traits): New struct.
2607 (matching_parens): New typedef.
2608 (struct matching_brace_traits): New struct.
2609 (matching_braces): New typedef.
2610 (get_matching_symbol): New function.
2611 (c_parser_require): Add param MATCHING_LOCATION, using it to
2612 highlight matching "opening" tokens for missing "closing" tokens.
2613 (c_parser_skip_until_found): Likewise.
2614 (c_parser_static_assert_declaration_no_semi): Convert explicit
2615 parsing of CPP_OPEN_PAREN and CPP_CLOSE_PAREN to use of
2616 class matching_parens, so that the pertinent open parenthesis is
2617 highlighted when there are problems locating the close
2618 parenthesis.
2619 (c_parser_struct_or_union_specifier): Likewise.
2620 (c_parser_typeof_specifier): Likewise.
2621 (c_parser_alignas_specifier): Likewise.
2622 (c_parser_simple_asm_expr): Likewise.
2623 (c_parser_braced_init): Likewise, for matching_braces.
2624 (c_parser_paren_condition): Likewise, for matching_parens.
2625 (c_parser_switch_statement): Likewise.
2626 (c_parser_for_statement): Likewise.
2627 (c_parser_asm_statement): Likewise.
2628 (c_parser_asm_operands): Likewise.
2629 (c_parser_cast_expression): Likewise.
2630 (c_parser_sizeof_expression): Likewise.
2631 (c_parser_alignof_expression): Likewise.
2632 (c_parser_generic_selection): Likewise.
2633 (c_parser_postfix_expression): Likewise for cases RID_VA_ARG,
2634 RID_OFFSETOF, RID_TYPES_COMPATIBLE_P, RID_AT_SELECTOR,
2635 RID_AT_PROTOCOL, RID_AT_ENCODE, reindenting as necessary.
2636 In case CPP_OPEN_PAREN, pass loc_open_paren to the
2637 c_parser_skip_until_found call.
2638 (c_parser_objc_class_definition): Use class matching_parens as
2639 above.
2640 (c_parser_objc_method_decl): Likewise.
2641 (c_parser_objc_try_catch_finally_statement): Likewise.
2642 (c_parser_objc_synchronized_statement): Likewise.
2643 (c_parser_objc_at_property_declaration): Likewise.
2644 (c_parser_oacc_wait_list): Likewise.
2645 (c_parser_omp_var_list_parens): Likewise.
2646 (c_parser_omp_clause_collapse): Likewise.
2647 (c_parser_omp_clause_default): Likewise.
2648 (c_parser_omp_clause_if): Likewise.
2649 (c_parser_omp_clause_num_threads): Likewise.
2650 (c_parser_omp_clause_num_tasks): Likewise.
2651 (c_parser_omp_clause_grainsize): Likewise.
2652 (c_parser_omp_clause_priority): Likewise.
2653 (c_parser_omp_clause_hint): Likewise.
2654 (c_parser_omp_clause_defaultmap): Likewise.
2655 (c_parser_oacc_single_int_clause): Likewise.
2656 (c_parser_omp_clause_ordered): Likewise.
2657 (c_parser_omp_clause_reduction): Likewise.
2658 (c_parser_omp_clause_schedule): Likewise.
2659 (c_parser_omp_clause_num_teams): Likewise.
2660 (c_parser_omp_clause_thread_limit): Likewise.
2661 (c_parser_omp_clause_aligned): Likewise.
2662 (c_parser_omp_clause_linear): Likewise.
2663 (c_parser_omp_clause_safelen): Likewise.
2664 (c_parser_omp_clause_simdlen): Likewise.
2665 (c_parser_omp_clause_depend): Likewise.
2666 (c_parser_omp_clause_map): Likewise.
2667 (c_parser_omp_clause_device): Likewise.
2668 (c_parser_omp_clause_dist_schedule): Likewise.
2669 (c_parser_omp_clause_proc_bind): Likewise.
2670 (c_parser_omp_clause_uniform): Likewise.
2671 (c_parser_omp_for_loop): Likewise.
2672 (c_parser_cilk_clause_vectorlength): Likewise.
2673 (c_parser_cilk_clause_linear): Likewise.
2674 (c_parser_transaction_expression): Likewise.
2675 * c-parser.h (c_parser_require): Add param matching_location with
2676 default UNKNOWN_LOCATION.
2677 (c_parser_error): Convert return type from void to bool.
2678 (c_parser_skip_until_found): Add param matching_location with
2679 default UNKNOWN_LOCATION.
2680
30af3a2b
MP
26812017-08-09 Marek Polacek <polacek@redhat.com>
2682
2683 * c-decl.c (build_enumerator): Use true/false instead of 1/0.
2684 * c-tree.h (build_external_ref): Update declaration.
2685 * c-typeck.c (build_array_ref): Use true/false instead of 1/0.
2686 (build_external_ref): Change the type of a parameter to bool.
2687 (parser_build_binary_op): Use true/false instead of 1/0.
2688 (pointer_diff): Likewise.
2689 (build_modify_expr): Likewise.
2690 (set_designator): Change the type of a parameter to bool.
2691 (set_init_index): Use true/false instead of 1/0.
2692 (set_init_label): Likewise.
2693 (output_init_element): Change the type of a parameter to bool.
2694 (output_pending_init_elements): Use true/false instead of 1/0.
2695 (process_init_element): Likewise.
2696 (build_binary_op): Change the type of a parameter to bool.
2697
296c53ac
MP
26982017-08-09 Marek Polacek <polacek@redhat.com>
2699
2700 PR c/81233
2701 * c-typeck.c (pedwarn_init): Make the function take a variable list.
2702 Call emit_diagnostic_valist instead of pedwarn.
2703 (convert_for_assignment): Unroll the PEDWARN_FOR_ASSIGNMENT macro.
2704 Print the relevant types in diagnostics.
2705
a32c8316
MP
27062017-08-09 Marek Polacek <polacek@redhat.com>
2707
2708 PR c/81417
2709 * c-array-notation.c (fix_builtin_array_notation_fn): Update calls to
ab20d992 2710 build_conditional_expr.
a32c8316
MP
2711 * c-parser.c (c_parser_conditional_expression): Create locations for
2712 EXP1 and EXP2 from their source ranges. Pass the locations down to
2713 build_conditional_expr.
2714 * c-tree.h (build_conditional_expr): Update declaration.
2715 * c-typeck.c (build_conditional_expr): Add location_t parameters.
2716 For -Wsign-compare, also print the types.
2717
314e6352
ML
27182017-08-08 Martin Liska <mliska@suse.cz>
2719
2720 * c-convert.c: Include header files.
2721 * c-typeck.c: Likewise.
2722
577eec56
ML
27232017-08-07 Martin Liska <mliska@suse.cz>
2724
2725 * c-parser.c (c_parser_attributes): Canonicalize name of an
2726 attribute.
2727
f7b6353a
MP
27282017-08-02 Marek Polacek <polacek@redhat.com>
2729
2730 PR c/81289
2731 * c-parser.c (c_parser_unary_expression): Use set_error.
2732
8a6eab34
MP
2733 PR c/81448
2734 PR c/81306
2735 * c-warn.c (warn_for_multistatement_macros): Prevent bogus
2736 warnings. Avoid walking MACRO_MAP_LOCATIONS.
2737
ab20d992 27382017-07-31 Jan Hubicka <hubicka@ucw.cz>
7fef86d3
JH
2739 Martin Liska <mliska@suse.cz>
2740
2741 * c-typeck.c (c_finish_goto_label): Build gimple predict
f7b6353a 2742 statement.
7fef86d3 2743
f34ebeb2
ML
27442017-07-31 Martin Liska <mliska@suse.cz>
2745
2746 PR sanitize/81530
2747 * c-convert.c (convert): Guard condition with flag_sanitize_p
2748 also with current_function_decl non-null equality.
2749 * c-decl.c (grokdeclarator): Likewise.
2750 * c-typeck.c (build_binary_op): Likewise.
2751
8595f67b
MP
27522017-07-25 Marek Polacek <polacek@redhat.com>
2753
2754 * c-decl.c (grokfield): Remove local variable.
2755
d49718d6
MP
27562017-07-25 Marek Polacek <polacek@redhat.com>
2757
2758 PR c/81364
2759 * c-parser.c (c_parser_else_body): Don't warn about multistatement
2760 macro expansion if the body is in { }.
2761 (c_parser_while_statement): Likewise.
2762 (c_parser_for_statement): Likewise.
2763
ff22eb12
NS
27642017-07-18 Nathan Sidwell <nathan@acm.org>
2765
2766 * c-parser.c (c_parser_array_notation): Use TYPE_{MIN,MAX}_VALUE.
2767
eea77d1f
DM
27682017-07-14 David Malcolm <dmalcolm@redhat.com>
2769
2770 * c-decl.c (implicitly_declare): When suggesting a missing
2771 #include, provide a fix-it hint.
2772
b6f43128
DM
27732017-07-06 David Malcolm <dmalcolm@redhat.com>
2774
2775 * c-lang.c (selftest::run_c_tests): Move body to c_family_tests,
2776 and call that instead.
2777 * c-tree.h (selftest::run_c_tests): New decl.
2778
3e2becc4
MP
27792017-06-26 Marek Polacek <polacek@redhat.com>
2780
2781 PR c/80116
2782 * c-parser.c (c_parser_if_body): Set the location of the
2783 body of the conditional after parsing all the labels. Call
2784 warn_for_multistatement_macros.
2785 (c_parser_else_body): Likewise.
2786 (c_parser_switch_statement): Likewise.
2787 (c_parser_while_statement): Likewise.
2788 (c_parser_for_statement): Likewise.
2789 (c_parser_statement): Add a default argument. Save the location
2790 after labels have been parsed.
2791 (c_parser_c99_block_statement): Likewise.
2792
343ae898
RB
27932017-06-19 Richard Biener <rguenther@suse.de>
2794
2795 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
2796 negated _Literals to parse _Literal (int) -1.
2797
45b2222a
ML
27982017-06-13 Martin Liska <mliska@suse.cz>
2799
2800 PR sanitize/78204
2801 * c-convert.c (convert): Use sanitize_flags_p.
2802 * c-decl.c (grokdeclarator): Likewise.
2803 * c-typeck.c (convert_for_assignment): Likewise.
2804 (c_finish_return): Likewise.
2805 (build_binary_op): Likewise.
2806
8ab7005b
JJ
28072017-06-08 Jakub Jelinek <jakub@redhat.com>
2808
2809 PR c/81006
2810 * c-typeck.c (handle_omp_array_sections_1): Convert TYPE_MAX_VALUE
2811 to sizetype before size_binop.
2812
363dc72c
JJ
28132017-06-07 Jakub Jelinek <jakub@redhat.com>
2814
2815 * gimple-parser.c (c_parser_parse_gimple_body): Use TDI_gimple instead
2816 of TDI_generic.
2817
dc949728
MP
28182017-06-06 Marek Polacek <polacek@redhat.com>
2819
2820 PR c/79983
2821 * c-decl.c (start_struct): Use the location of TYPE_STUB_DECL of
2822 ref.
2823 (start_enum): Use the location of TYPE_STUB_DECL of enumtype.
2824
40ffd95f
BE
28252017-06-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
2826
2827 * c-parser.c (c_parser_binary_expression): Implement the
2828 -Wsizeof_pointer_div warning.
2829 (c_parser_postfix_expression): Allow SIZEOF_EXPR as expr.original_code
2830 from a parenthesized expression.
2831 (c_parser_expr_list): Use c_last_sizeof_loc.
2832 * c-tree.h (c_last_sizeof_loc): New external.
2833 * c-typeck.c (c_last_sizeof_loc): New variable.
2834 (c_expr_sizeof_expr, c_expr_sizeof_type): Assign c_last_sizeof_loc.
2835
9fc5e7a4
MM
28362017-05-31 Mikhail Maltsev <maltsevm@gmail.com>
2837
2838 PR testsuite/80580
2839 * gimple-parser.c (c_parser_gimple_if_stmt): Check for empty labels.
2840
f012c8ef
DM
28412017-05-30 David Malcolm <dmalcolm@redhat.com>
2842
2843 * c-objc-common.c (c_tree_printer): Gain bool and const char **
2844 parameters.
2845
3cd211af
MS
28462017-05-24 Martin Sebor <msebor@redhat.com>
2847
2848 PR c/80731
2849 * c-fold.c (c_fully_fold_internal): Adjust.
2850 * c-typeck.c (parser_build_unary_op): Adjust.
2851
fd71a9a2
TS
28522017-05-23 Thomas Schwinge <thomas@codesourcery.com>
2853
2854 * c-parser.c (OACC_KERNELS_CLAUSE_MASK): Add
2855 "PRAGMA_OACC_CLAUSE_NUM_GANGS", "PRAGMA_OACC_CLAUSE_NUM_WORKERS",
2856 "VECTOR_LENGTH".
2857
92fa0f9e
MP
28582017-05-23 Marek Polacek <polacek@redhat.com>
2859
2860 * c-parser.c (c_parser_compound_statement_nostart): Remove redundant
2861 quotes.
2862
d11c168a
JJ
28632017-05-22 Jakub Jelinek <jakub@redhat.com>
2864
2865 * c-fold.c (c_fully_fold_internal): Save the c_fully_fold_internal
2866 result for SAVE_EXPR operand and set SAVE_EXPR_FOLDED_P even if
2867 it returned invariant. Call tree_invariant_p unconditionally
2868 afterwards to decide whether to return expr or op0.
2869
58aca9d9
NS
28702017-05-22 Nathan Sidwell <nathan@acm.org>
2871
2872 * c-decl.c (c_parse_final_cleanups): Drop TDI_tu handling.
2873
7fd549d2
TS
28742017-05-19 Thomas Schwinge <thomas@codesourcery.com>
2875
2876 * c-parser.c (c_parser_omp_clause_default): Handle
2877 "OMP_CLAUSE_DEFAULT_PRESENT".
2878
6ecd2339
BE
28792017-05-18 Bernd Edlinger <bernd.edlinger@hotmail.de>
2880
2881 * config-lang.in (gtfiles): Add c-family/c-format.c.
2882
8a57ecff
NS
28832017-05-18 Nathan Sidwell <nathan@acm.org>
2884
2885 * c-decl.c (pushdecl_top_level): Delete unused function.
2886
6574d78e
MP
28872017-05-18 Marek Polacek <polacek@redhat.com>
2888
2889 * c-decl.c (match_builtin_function_types): Use NULL_TREE instead of 0.
2890 (check_earlier_gotos): Likewise.
2891 (define_label): Likewise.
2892 (pending_xref_error): Likewise.
2893 (smallest_type_quals_location): Likewise.
2894 (grokdeclarator): Likewise.
2895 (grokparms): Likewise.
2896 (identifier_global_value): Likewise.
2897 * c-typeck.c (set_nonincremental_init_from_string): Likewise.
2898 (find_init_member): Likewise.
2899
e3455240
MP
29002017-05-18 Marek Polacek <polacek@redhat.com>
2901
2902 * c-decl.c (start_decl): Use false/true instead of 0/1.
2903 (grokdeclarator): Likewise.
2904 (finish_struct): Likewise.
2905 (start_function): Change the return type to bool. Use false/true
2906 instead of 0/1.
2907 (declspecs_add_qual): Use UNKNOWN_LOCATION instead of 0.
2908 * c-tree.h (start_function): Update.
2909 * c-typeck.c (same_translation_unit_p): Change the return type to bool.
2910 (set_designator): Change the return type to bool. Use false/true
2911 instead of 0/1.
2912
3fa8871b
MP
29132017-05-17 Marek Polacek <polacek@redhat.com>
2914
2915 * c-decl.c: Use NULL_TREE instead of 0 where appropriate.
2916 * c-typeck.c: Likewise.
2917
142473df
MP
29182017-05-17 Marek Polacek <polacek@redhat.com>
2919
2920 PR sanitizer/80659
2921 * c-decl.c (build_compound_literal): Set DECL_ARTIFICIAL and
2922 DECL_IGNORED_P even for non-static compound literals.
2923
1a817418
ML
29242017-05-17 Martin Liska <mliska@suse.cz>
2925
2926 * c-decl.c (c_parse_final_cleanups): Introduce dump_flags_t type and
2927 use it instead of int type.
2928
b2fa0a8b
MP
29292017-05-17 Marek Polacek <polacek@redhat.com>
2930
2931 * c-convert.c (convert): Replace c_save_expr with save_expr. Don't
2932 call c_fully_fold.
2933 (convert) <case COMPLEX_TYPE>: Remove special handling of COMPLEX_TYPEs.
ab20d992 2934 * c-decl.c (grokdeclarator): Replace c_save_expr with save_expr.
b2fa0a8b
MP
2935 * c-fold.c (c_fully_fold_internal): Handle SAVE_EXPR.
2936 * c-parser.c (c_parser_declaration_or_fndef): Replace c_save_expr with
2937 save_expr.
2938 (c_parser_conditional_expression): Likewise.
2939 * c-tree.h (SAVE_EXPR_FOLDED_P): Define.
2940 * c-typeck.c (build_modify_expr): Replace c_save_expr with save_expr.
2941 (process_init_element): Likewise.
2942 (build_binary_op): Likewise.
2943 (handle_omp_array_sections_1): Likewise.
2944
1e47f02b
TS
29452017-05-12 Thomas Schwinge <thomas@codesourcery.com>
2946
2947 * c-parser.c (c_parser_omp_clause_num_gangs)
2948 (c_parser_omp_clause_num_workers)
2949 (c_parser_omp_clause_vector_length): Merge functions into...
2950 (c_parser_oacc_single_int_clause): ... this new function. Adjust
2951 all users.
2952
c24e924f
NS
29532017-05-11 Nathan Sidwell <nathan@acm.org>
2954
2955 * gimple-parser.c: Don't #include tree-dump.h.
2956
c587104e
MM
29572017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
2958
2959 PR testsuite/80580
2960 * gimple-parser.c (c_parser_parse_ssa_name): Validate SSA name base.
2961
67ac9a9d
MM
29622017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
2963
2964 PR testsuite/80580
2965 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
2966 incorrect __MEM syntax.
2967
ac4eb40f
MM
29682017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
2969
2970 PR testsuite/80580
2971 * gimple-parser.c (c_parser_gimple_unary_expression): Check argument
2972 type of unary '*'.
2973
641da50a
NS
29742017-05-09 Nathan Sidwell <nathan@acm.org>
2975
2976 * c-tree.h (pushdecl): Declare.
2977
56d35585
DM
29782017-05-05 David Malcolm <dmalcolm@redhat.com>
2979
2980 * c-decl.c (warn_defaults_to): Replace report_diagnostic
2981 with diagnostic_report_diagnostic.
2982 * c-errors.c (pedwarn_c99): Likewise.
2983 (pedwarn_c90): Likewise.
2984
815d9cc6
XR
29852017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn>
2986
92a285c1 2987 PR c++/80038
815d9cc6
XR
2988 * c-gimplify.c (c_gimplify_expr): Remove calls to
2989 cilk_gimplifY_call_params_in_spawned_fn.
2990
1c4ea66f
DM
29912017-04-25 David Malcolm <dmalcolm@redhat.com>
2992
2993 * c-parser.c (c_parser_struct_or_union_specifier): Add fix-it
2994 hint for removing extra semicolon.
2995
666f7903
JJ
29962017-04-21 Jakub Jelinek <jakub@redhat.com>
2997
2998 PR c/80468
2999 * c-decl.c (finish_declspecs) <case cts_int_n>: If int_n_idx is not
3000 enabled, set specs->type to integer_type_node.
3001
5764ee3c
JW
30022017-04-03 Jonathan Wakely <jwakely@redhat.com>
3003
3004 * c-array-notation.c: Fix typo in comment.
3005
10fa8dfb
MP
30062017-03-29 Marek Polacek <polacek@redhat.com>
3007
3008 PR c/79730
3009 * c-decl.c (finish_decl): Check VAR_P.
3010
a9e4a1a5
JJ
30112017-03-27 Jakub Jelinek <jakub@redhat.com>
3012
3013 PR middle-end/80162
3014 * c-tree.h (c_mark_addressable): Add array_ref_p argument.
3015 * c-typeck.c (c_mark_addressable): Likewise. Look through
3016 VIEW_CONVERT_EXPR unless array_ref_p and VCE is from VECTOR_TYPE
3017 to ARRAY_TYPE.
3018 (build_array_ref): Pass true as array_ref_p to c_mark_addressable.
3019
ee3ff394
MP
30202017-03-23 Marek Polacek <polacek@redhat.com>
3021
3022 * c-tree.h: Remove a C_RID_YYCODE reference.
3023
4d1b8e70
JJ
30242017-03-21 Jakub Jelinek <jakub@redhat.com>
3025
3026 PR c/80097
3027 * c-typeck.c (build_binary_op): Add EXCESS_PRECISION_EXPR only around
3028 optional COMPOUND_EXPR with ubsan instrumentation.
3029
31dc71a8
MP
30302017-03-17 Marek Polacek <polacek@redhat.com>
3031
3032 * c-parser.c: Add C11 references.
3033
d579c385
MP
30342017-03-15 Marek Polacek <polacek@redhat.com>
3035
3036 * c-parser.c (c_parser_enum_specifier): Remove redundant line.
3037
85059a38
MP
30382017-03-11 Marek Polacek <polacek@redhat.com>
3039
3040 * c-decl.c (implicit_decl_warning): Add a comment. Fix formatting.
3041
2f6f187a
DM
30422017-03-10 David Malcolm <dmalcolm@redhat.com>
3043
3044 PR translation/79848
3045 * c-decl.c (declspecs_add_type): Simplify uses of "%<%s%>" to
3046 "%qs".
3047 * c-parser.c (c_parser_oacc_shape_clause): Likewise.
3048
36618428
MP
30492017-03-09 Marek Polacek <polacek@redhat.com>
3050
3051 PR sanitizer/79757
3052 * c-parser.c (c_parser_declaration_or_fndef): Don't sanitize old-style
3053 parameter declarations with initializers.
3054
01e5af5a
JJ
30552017-03-09 Jakub Jelinek <jakub@redhat.com>
3056
3057 PR c/79969
3058 * c-decl.c (start_enum): Adjust DECL_SOURCE_LOCATION of
3059 TYPE_STUB_DECL.
3060
a71dbc63
JJ
30612017-03-07 Jakub Jelinek <jakub@redhat.com>
3062
3063 PR c/79834
3064 * c-parser.c (c_parser_pragma): Use error_at instead of c_parser_error
3065 for "may only be used in compound statements" diagnostics, change it
3066 such that the same translatable string is used for all pragmas. For
3067 PRAGMA_OACC_WAIT use "acc wait" rather than "acc enter data" in the
3068 diagnostics.
3069 (c_parser_omp_cancellation_point, c_parser_omp_target_update,
3070 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Change
3071 "may only be used in compound statements" diagnostics, such that the
3072 same translatable string is used for all pragmas.
3073
1ff4bae6
MP
30742017-03-04 Marek Polacek <polacek@redhat.com>
3075
3076 PR c/79847
3077 * c-decl.c (implicit_decl_warning): Add missing space.
3078
7f5a7d78
MP
30792017-03-03 Marek Polacek <polacek@redhat.com>
3080
3081 PR c/79758
3082 * c-decl.c (store_parm_decls_oldstyle): Check if the element of
3083 current_function_prototype_arg_types is error_mark_node. Fix
3084 formatting. Use TREE_VALUE instead of TREE_TYPE.
3085
883c8f06
JJ
30862017-03-03 Jakub Jelinek <jakub@redhat.com>
3087
79c9b7a8
JJ
3088 PR c/79837
3089 * c-parser.c (c_parser_omp_clause_reduction): Don't mention
3090 %<min%> or %<max%> in the diagnostics, instead mention identifier.
3091 (c_parser_omp_declare_reduction): Don't mention %<min%> in the
3092 diagnostics.
3093
883c8f06
JJ
3094 PR c/79836
3095 * c-parser.c (c_parser_generic_selection): Use %<_Generic%>
3096 instead of %<_Generic>.
3097 (c_parser_omp_ordered): Use %<depend%> instead of %<depend>.
3098 (c_parser_omp_target_exit_data): Use %<release%> instead of
3099 %<release>.
3100
324ff1a0
JJ
31012017-02-28 Jakub Jelinek <jakub@redhat.com>
3102
3103 * c-parser.c (c_parser_asm_statement): Use cond ? G_("...") : G_("...")
3104 instead of just cond ? "..." : "...".
3105 (c_parser_oacc_enter_exit_data): Use %s and ternary operator only
3106 for "enter"/"exit" keyword.
3107 (c_finish_oacc_routine): Don't use %s to supply portions of the
3108 message.
3109
4227c9ad
JJ
31102017-02-24 Jakub Jelinek <jakub@redhat.com>
3111
3112 PR c++/79588
3113 * c-parser.c (c_parser_postfix_expression_after_primary): Don't
3114 handle -Wrestrict here.
3115 * c-typeck.c (build_function_call_vec): Adjust
3116 check_function_arguments caller.
3117
5d972e66
RB
31182017-02-23 Richard Biener <rguenther@suse.de>
3119
3120 PR c/79684
3121 * gimple-parser.c (c_parser_gimple_statement): Use set_error
3122 to initialize c_exprs to return.
3123 (c_parser_gimple_binary_expression): Likewise.
3124 (c_parser_gimple_unary_expression): Likewise.
3125 (c_parser_gimple_postfix_expression): Likewise.
3126
61ac5ebe
MP
31272017-02-22 Marek Polacek <polacek@redhat.com>
3128
3129 PR c/79662
3130 * c-typeck.c (convert_arguments): Handle error_mark_node.
3131
41d1b0b1
PK
31322017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3133
3134 * gimple-parser.c (c_parser_gimple_postfix_expression): Check return
3135 value of c_parser_parse_ssa_name against error_mark_node and emit
3136 error if ssa name is anonymous and written as default definition.
3137
eab1f169
PK
31382017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3139
3140 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
3141 FMA_EXPR.
3142
bcac0b4d
JJ
31432017-02-16 Jakub Jelinek <jakub@redhat.com>
3144
3145 PR c++/79512
3146 * c-parser.c (c_parser_omp_target): For -fopenmp-simd
3147 ignore #pragma omp target even when not followed by identifier.
3148
1be33173
PK
31492017-02-14 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3150
3151 * gimpler-parser.c (c_parser_gimple_statement): Handle ABS_EXPR.
3152 (c_parser_gimple_unary_expression): Likewise.
3153
aa326bfb
JJ
31542017-02-13 Jakub Jelinek <jakub@redhat.com>
3155
3156 * c-parser.c (c_parser_oacc_declare): Add missing space in
3157 diagnostics.
3158
8a398bc5
PK
31592017-02-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3160
3161 PR c/79478
3162 * gimple-parser.c (c_parser_gimple_postfix_expression): Call
3163 set_c_expr_source_range when parsing ssa-name.
3164
3dcde5ef 31652017-02-10 Prasad Ghangal <prasad.ghangal@gmail.com>
ab20d992 3166 Richard Biener <rguenther@suse.de>
3dcde5ef
PG
3167
3168 * gimple-parser.c (c_parser_gimple_binary_expression): Avoid
3169 building IL when arguments are error_mark_node.
3170 (c_parser_gimple_unary_expression): Likewise.
3171 (c_parser_gimple_if_stmt): Likewise.
3172 (c_parser_gimple_switch_stmt): Likewise.
3173 (c_parser_gimple_return_stmt): Likewise.
3174 (c_parser_parse_ssa_name): When name lookup fails do not build
3175 an SSA name. Use undeclared rather than not declared in error
3176 reporting.
3177
192b048b
MP
31782017-02-09 Marek Polacek <polacek@redhat.com>
3179
3180 PR c/79428
3181 * c-parser.c (c_parser_omp_ordered): Call c_parser_skip_to_pragma_eol
3182 instead of c_parser_skip_until_found.
3183
56f71478
JJ
31842017-02-09 Jakub Jelinek <jakub@redhat.com>
3185
3186 PR c/79431
3187 * c-parser.c (c_parser_omp_declare_target): Don't invoke
3188 symtab_node::get on automatic variables.
3189
02889d23
CLT
31902016-02-09 Nathan Sidwell <nathan@codesourcery.com>
3191 Chung-Lin Tang <cltang@codesourcery.com>
3192
3193 * c-parser.c (c_parser_omp_clause_collapse): Disallow tile.
3194 (c_parser_oacc_clause_tile): Disallow collapse. Fix parsing and
3195 semantic checking.
3196 * c-parser.c (c_parser_omp_for_loop): Accept tiling constructs.
3197
7af4b20d
RB
31982017-02-07 Richard Biener <rguenther@suse.de>
3199
3200 * gimple-parser.c (c_parser_gimple_expr_list): Simplify.
3201 (c_parser_gimple_postfix_expression_after_primary):
3202 Do not use c_build_function_call_vec to avoid folding and promotion.
3203 Simplify.
3204
e5e391d6
MO
32052017-01-25 Maxim Ostapenko <m.ostapenko@samsung.com>
3206
3207 PR lto/79061
3208 * c-decl.c (pop_scope): Pass main_input_filename to
3209 build_translation_unit_decl.
3210
c2e84327
DM
32112017-01-24 David Malcolm <dmalcolm@redhat.com>
3212
3213 * c-parser.c: Include "read-rtl-function.h" and
3214 "run-rtl-passes.h".
3215 (c_parser_declaration_or_fndef): Rename "gimple-pass-list" in
3216 grammar to gimple-or-rtl-pass-list. Add rtl-function-definition
3217 production. Update for renaming of field "gimple_pass" to
3218 "gimple_or_rtl_pass". If __RTL was seen, call
3219 c_parser_parse_rtl_body. Convert a timevar_push/pop pair
3220 to an auto_timevar, to cope with early exit.
3221 (c_parser_declspecs): Update RID_GIMPLE handling for renaming of
3222 field "gimple_pass" to "gimple_or_rtl_pass", and for renaming of
3223 c_parser_gimple_pass_list to c_parser_gimple_or_rtl_pass_list.
3224 Handle RID_RTL.
3225 (c_parser_parse_rtl_body): New function.
3226 * c-tree.h (enum c_declspec_word): Add cdw_rtl.
3227 (struct c_declspecs): Rename field "gimple_pass" to
3228 "gimple_or_rtl_pass". Add field "rtl_p".
3229 * gimple-parser.c (c_parser_gimple_pass_list): Rename to...
3230 (c_parser_gimple_or_rtl_pass_list): ...this, updating accordingly.
3231 * gimple-parser.h (c_parser_gimple_pass_list): Rename to...
3232 (c_parser_gimple_or_rtl_pass_list): ...this.
3233
2ebd93e1
MP
32342017-01-20 Marek Polacek <polacek@redhat.com>
3235
3236 PR c/64279
3237 * c-typeck.c (build_conditional_expr): Warn about duplicated branches.
3238
b1c95bb5
RB
32392017-01-13 Richard Biener <rguenther@suse.de>
3240
3241 * gimple-parser.c (c_parser_gimple_compound_statement): Handle
3242 nops.
3243
25329913
RB
32442017-01-13 Richard Biener <rguenther@suse.de>
3245
3246 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
3247 _Literal ( type-name ) number.
3248
6bb4ea5c
RB
32492017-01-12 Richard Biener <rguenther@suse.de>
3250
3251 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
3252 __MEM.
3253
6b5b4e9c
JJ
32542017-01-11 Jakub Jelinek <jakub@redhat.com>
3255
3256 PR c++/72813
3257 * c-decl.c (pop_file_scope): Set flag_syntax_only to 1 after writing
3258 PCH file.
3259
e3252775
RB
32602017-01-11 Richard Biener <rguenther@suse.de>
3261
3262 PR bootstrap/79052
3263 * gimple-parser.c (c_parser_gimple_switch_stmt): Add missing
3264 returns on parse errors.
3265
a9342885
MP
32662017-01-04 Marek Polacek <polacek@redhat.com>
3267
3268 PR c++/64767
3269 * c-parser.c (c_parser_postfix_expression): Mark zero character
3270 constants by setting original_type in c_expr.
3271 * c-typeck.c (parser_build_binary_op): Warn when a pointer is compared
3272 with a zero character constant.
3273 (char_type_p): New function.
3274
5dd9a9d0
DM
32752017-01-04 David Malcolm <dmalcolm@redhat.com>
3276
3277 * c-parser.c (c_parser_declaration_or_fndef): Create a
3278 rich_location at init_loc and parse it to start_init.
3279 (last_init_list_comma): New global.
3280 (c_parser_braced_init): Update last_init_list_comma when parsing
3281 commas. Pass it to pop_init_level. Pass location of closing
3282 brace to pop_init_level.
3283 (c_parser_postfix_expression_after_paren_type): Create a
3284 rich_location at type_loc and parse it to start_init.
3285 (c_parser_omp_declare_reduction): Likewise for loc.
3286 * c-tree.h (start_init): Add rich_location * param.
3287 (pop_init_level): Add location_t param.
3288 * c-typeck.c (struct initializer_stack): Add field
3289 "missing_brace_richloc".
3290 (start_init): Add richloc param, use it to initialize
3291 the stack node's missing_brace_richloc.
3292 (last_init_list_comma): New decl.
3293 (finish_implicit_inits): Pass last_init_list_comma to
3294 pop_init_level.
3295 (push_init_level): When finding missing open braces, add fix-it
3296 hints to the richloc.
3297 (pop_init_level): Add "insert_before" param and pass it
3298 when calling pop_init_level. Add fixits about missing
3299 close braces to any richloc. Use the richloc for the
3300 -Wmissing-braces warning.
3301 (set_designator): Pass last_init_list_comma to pop_init_level.
3302 (process_init_element): Likewise.
3303
cbe34bb5
JJ
33042017-01-01 Jakub Jelinek <jakub@redhat.com>
3305
3306 Update copyright years.
3307
d17680f3
JJ
33082016-12-21 Jakub Jelinek <jakub@redhat.com>
3309
0dba7960
JJ
3310 PR bootstrap/78817
3311 * c-typeck.c (build_function_call_vec): If check_function_arguments
3312 returns true, set TREE_NO_WARNING on CALL_EXPR.
3313
d17680f3
JJ
3314 PR c/77767
3315 * c-decl.c (grokdeclarator): If *expr is non-NULL, append expression
3316 to *expr instead of overwriting it.
3317
aa90531e
RB
33182016-12-20 Richard Biener <rguenther@suse.de>
3319
3320 * gimple-parser.c (c_parser_gimple_compound_statement): Improve
3321 error recovery.
3322 (c_parser_gimple_statement): Only build assigns for non-error
3323 stmts.
3324 (c_parser_gimple_postfix_expression_after): Improve error recovery.
3325
629b3d75
MJ
33262016-12-14 Martin Jambor <mjambor@suse.cz>
3327
3328 * c-parser.c: Include omp-general.h and omp-offload.h instead of
3329 omp-low.h.
3330 (c_finish_oacc_routine): Adjusted call to
3331 get_oacc_fn_attrib, build_oacc_routine_dims and replace_oacc_fn_attrib
3332 to use their new names.
3333 (c_parser_oacc_enter_exit_data): Adjusted call to find_omp_clause to
3334 use its new name.
3335 (c_parser_oacc_update): Likewise.
3336 (c_parser_omp_simd): Likewise.
3337 (c_parser_omp_target_update): Likewise.
3338 * c-typeck.c: Include omp-general.h instead of omp-low.h.
3339 (c_finish_omp_cancel): Adjusted call to find_omp_clause to use its new
3340 name.
3341 (c_finish_omp_cancellation_point): Likewise.
3342 * gimple-parser.c: Do not include omp-low.h
3343
c5af52eb
CP
33442016-12-02 Cesar Philippidis <cesar@codesourcery.com>
3345 James Norris <jnorris@codesourcery.com>
3346
3347 * c-parser.c (c_parser_pragma): Error when PRAGMA_OACC_{ENTER_DATA,
3348 EXIT_DATA,WAIT} are not used in compound statements.
3349 (c_parser_oacc_enter_exit_data): Update diagnostics.
3350
48330c93
BE
33512016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
3352
3353 PR c++/71973
3354 * c-decl.c (diagnose_mismatched_decls): Use
3355 OPT_Wbuiltin_declaration_mismatch here too.
3356
899ca90e 33572016-11-18 Richard Sandiford <richard.sandiford@arm.com>
48330c93
BE
3358 Alan Hayward <alan.hayward@arm.com>
3359 David Sherwood <david.sherwood@arm.com>
899ca90e
RS
3360
3361 * c-decl.c (merge_decls): Use SET_DECL_MODE.
3362 (make_label, finish_struct): Likewise.
3363
1ee62b92 33642016-11-14 Prasad Ghangal <prasad.ghangal@gmail.com>
8e745a17 3365 Richard Biener <rguenther@suse.de>
22b15758 3366
8e745a17
JJ
3367 * Make-lang.in (C_AND_OBJC_OBJS): Add gimple-parser.o.
3368 * config-lang.in (gtfiles): Add c/c-parser.h.
3369 * c-tree.h (enum c_declspec_word): Add cdw_gimple.
3370 (struct c_declspecs): Add gimple_pass member and gimple_p flag.
3371 * c-parser.c (enum c_id_kind, struct c_token,
3372 c_parser_next_token_is, c_parser_next_token_is_not,
3373 c_parser_next_token_is_keyword,
3374 enum c_lookahead_kind, enum c_dtr_syn, enum c_parser_prec):
3375 Split out to ...
3376 * c-parser.h: ... new header.
3377 * c-parser.c: Include c-parser.h and gimple-parser.h.
1ee62b92 3378 (c_parser_peek_token, c_parser_peek_2nd_token,
8e745a17
JJ
3379 c_token_starts_typename, c_parser_next_token_starts_declspecs,
3380 c_parser_next_tokens_start_declaration, c_parser_consume_token,
3381 c_parser_error, c_parser_require, c_parser_skip_until_found,
3382 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
3383 c_parser_type_name): Export.
3384 (c_parser_tokens_buf): New function.
3385 (c_parser_error): Likewise.
3386 (c_parser_set_error): Likewise.
3387 (c_parser_declspecs): Handle RID_GIMPLE.
1ee62b92
PG
3388 (c_parser_declaration_or_fndef): Parse __GIMPLE marked body
3389 via c_parser_parse_gimple_body.
8e745a17
JJ
3390 * c-parser.h (c_parser_peek_token, c_parser_peek_2nd_token,
3391 c_token_starts_typename, c_parser_next_token_starts_declspecs,
3392 c_parser_next_tokens_start_declaration, c_parser_consume_token,
3393 c_parser_error, c_parser_require, c_parser_skip_until_found,
3394 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
3395 c_parser_type_name): Declare.
1ee62b92
PG
3396 (struct c_parser): Declare forward.
3397 (c_parser_tokens_buf): Declare.
8e745a17
JJ
3398 (c_parser_error): Likewise.
3399 (c_parser_set_error): Likewise.
3400 * gimple-parser.c: New file.
3401 * gimple-parser.h: Likewise.
1ee62b92 3402
22b15758
UB
34032016-11-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3404
3405 PR c/35503
3406 * c-parser.c (c_parser_postfix_expression_after_primary): Call
3407 warn_for_restrict.
3408
84ff4775
LCW
34092016-09-11 Le-Chun Wu <lcwu@google.com>
3410 Mark Wielaard <mjw@redhat.com>
3411
3412 * c-decl.c (warn_if_shadowing): Use the warning code corresponding
3413 to the given -Wshadow= variant.
3414
4d0cdd0c
TP
34152016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
3416
3417 * c-typeck.c: Include memmodel.h.
3418
1202f33e
JJ
34192016-10-13 Jakub Jelinek <jakub@redhat.com>
3420
3421 PR target/77957
3422 * c-objc-common.h (LANG_HOOKS_GETDECLS): Use hook_tree_void_null
3423 instead of lhd_return_null_tree_v.
3424
8a14afd0
BS
34252016-10-07 Bernd Schmidt <bschmidt@redhat.com>
3426
3427 PR c++/69733
3428 * c-decl.c (smallest_type_quals_location): New static function.
3429 (grokdeclarator): Try to find the correct location for an ignored
3430 qualifier.
3431
81fea426
MP
34322016-09-26 Marek Polacek <polacek@redhat.com>
3433
3434 PR c/7652
3435 * c-decl.c (pop_scope): Add gcc_fallthrough.
3436
34372016-09-26 Marek Polacek <polacek@redhat.com>
3438
3439 PR c/7652
3440 * c-parser.c (struct c_token): Add flags field.
3441 (c_lex_one_token): Pass it to c_lex_with_flags.
3442 (c_parser_declaration_or_fndef): Turn __attribute__((fallthrough));
3443 into IFN_FALLTHROUGH.
3444 (c_parser_label): Set FALLTHROUGH_LABEL_P on labels. Handle
3445 attribute fallthrough after a case label or default label.
3446 (c_parser_statement_after_labels): Handle RID_ATTRIBUTE.
3447
9a2300e9
MP
34482016-09-24 Marek Polacek <polacek@redhat.com>
3449
3450 PR c/77490
3451 * c-typeck.c (build_unary_op): Warn about bit not on expressions that
3452 have boolean value. Warn about ++/-- on booleans.
3453
7de76362
JJ
34542016-09-23 Jakub Jelinek <jakub@redhat.com>
3455
3456 * c-parser.c (incomplete_record_decls): Remove unnecessary
3457 = vNULL initialization of file scope vec.
3458
5b73d2ab
MP
34592016-09-16 Marek Polacek <polacek@redhat.com>
3460
3461 * c-typeck.c (lvalue_p): Use true and false instead of 1 and 0.
3462
e51fbec3
MP
34632016-09-14 Marek Polacek <polacek@redhat.com>
3464
3465 * c-array-notation.c (create_cmp_incr): Use false instead of 0.
3466 (fix_array_notation_expr): Likewise.
3467 * c-decl.c (finish_decl): Likewise.
3468 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
3469 * c-typeck.c (array_to_pointer_conversion): Use true instead of 1.
3470 (function_to_pointer_conversion): Use false instead of 0.
3471 (convert_lvalue_to_rvalue): Likewise.
3472 (parser_build_unary_op): Likewise.
3473 (build_atomic_assign): Likewise.
3474 (build_unary_op): Change nonconvert parameter type to bool, use
3475 true/false instead of 1/0.
3476 (build_binary_op): Use true instead of 1.
3477
254830ba
DM
34782016-09-13 David Malcolm <dmalcolm@redhat.com>
3479
3480 * c-parser.c (c_parser_declaration_or_fndef): Update for renaming
3481 of add_fixit_insert to add_fixit_insert_before.
3482
4c13ba17
MP
34832016-09-13 Marek Polacek <polacek@redhat.com>
3484
3485 * c-typeck.c (build_unary_op): Rename FLAG parameter to NOCONVERT. Use
3486 it.
3487
54dcdb88
BE
34882016-09-12 Bernd Edlinger <bernd.edlinger@hotmail.de>
3489
3490 PR c++/77496
3491 * c-parser.c (c_parser_conditional_expression): Pass the rightmost
3492 COMPOUND_EXPR to warn_for_omitted_condop.
3493
e5106e27
DM
34942016-09-07 David Malcolm <dmalcolm@redhat.com>
3495
3496 * c-lang.c (LANG_HOOKS_GET_SUBSTRING_LOCATION): Use
3497 c_get_substring_location for this new langhook.
3498
9dc5773f
JJ
34992016-09-02 Jakub Jelinek <jakub@redhat.com>
3500
3501 PR c/65467
3502 * c-parser.c (c_parser_declspecs): Don't sorry about _Atomic if
3503 flag_openmp.
3504 (c_parser_omp_variable_list): Use convert_lvalue_to_rvalue
3505 instead of mark_exp_read on low_bound/length expression.
3506 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_threads,
3507 c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
3508 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
3509 c_parser_omp_clause_num_workers, c_parser_oacc_shape_clause,
3510 c_parser_oacc_clause_tile, c_parser_omp_clause_schedule,
3511 c_parser_omp_clause_vector_length, c_parser_omp_clause_num_teams,
3512 c_parser_omp_clause_thread_limit, c_parser_omp_clause_aligned,
3513 c_parser_omp_clause_linear, c_parser_omp_clause_safelen,
3514 c_parser_omp_clause_simdlen, c_parser_omp_clause_device,
3515 c_parser_omp_clause_dist_schedule): Use convert_lvalue_to_rvalue
3516 instead of mark_expr_read.
3517 (c_parser_omp_declare_reduction): Reject _Atomic qualified types.
3518 * c-objc-common.h (LANG_HOOKS_OMP_CLAUSE_COPY_CTOR,
3519 LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP): Redefine.
3520 * c-tree.h (c_omp_clause_copy_ctor): New prototype.
3521 * c-typeck.c (handle_omp_array_sections_1): Diagnose _Atomic qualified
3522 array section bases outside of depend clause, for depend clause
3523 use convert_lvalue_to_rvalue on the base.
3524 (c_finish_omp_clauses): Reject _Atomic qualified vars in reduction,
3525 linear, aligned, map, to and from clauses.
3526 (c_omp_clause_copy_ctor): New function.
3527
295844f6
MP
35282016-09-01 Marek Polacek <polacek@redhat.com>
3529
3530 PR c/7652
3531 * c-typeck.c (composite_type): Add FALLTHRU comment.
3532
089af25c
DM
35332016-08-31 David Malcolm <dmalcolm@redhat.com>
3534
3535 * c-parser.c (c_parser_declaration_or_fndef): Add trailing space
3536 to the insertion fixits for "struct", "union", and "enum".
3537
f9087798
DM
35382016-08-30 David Malcolm <dmalcolm@redhat.com>
3539
3540 * c-decl.c (implicit_decl_warning): Use add_fixit_replace
3541 rather than add_fixit_misspelled_id.
3542 (undeclared_variable): Likewise.
3543 * c-parser.c (c_parser_declaration_or_fndef): Likewise. Remove
3544 now-redundant "here" params from add_fixit_insert method calls.
3545 (c_parser_parameter_declaration): Likewise.
3546 * c-typeck.c (build_component_ref): Remove now-redundant range
3547 param from add_fixit_replace method calls.
3548
ebef225f
MP
35492016-08-25 Marek Polacek <polacek@redhat.com>
3550
3551 * c-typeck.c (parser_build_binary_op): Pass LHS to
3552 warn_logical_not_parentheses.
3553
fe377a48
MP
35542016-08-25 Marek Polacek <polacek@redhat.com>
3555
3556 PR c/77323
3557 * c-decl.c (declspecs_add_type): Set typespec_word even when __intN
3558 or _FloatN or _FloatNx is not supported.
3559 (finish_declspecs): Set type to integer_type_node when _FloatN or
3560 _FloatNx is not supported.
3561
c65699ef
JM
35622016-08-19 Joseph Myers <joseph@codesourcery.com>
3563
3564 PR c/32187
3565 * c-tree.h (cts_floatn_nx): New enum c_typespec_keyword value.
3566 (struct c_declspecs): Add field floatn_nx_idx.
3567 * c-decl.c (declspecs_add_type, finish_declspecs): Handle _FloatN
3568 and _FloatNx type specifiers.
3569 * c-parser.c (c_keyword_starts_typename, c_token_starts_declspecs)
3570 (c_parser_declspecs, c_parser_attribute_any_word)
3571 (c_parser_objc_selector): Use CASE_RID_FLOATN_NX.
3572 * c-typeck.c (c_common_type): Handle _FloatN and _FloatNx types.
3573 (convert_arguments): Avoid promoting _FloatN and _FloatNx types
3574 narrower than double.
3575
2f1364c2
JJ
35762016-08-12 Jakub Jelinek <jakub@redhat.com>
3577 Martin Liska <mliska@suse.cz>
3578
3579 PR c/67410
3580 * c-typeck.c (set_nonincremental_init_from_string): Use / instead of
3581 % to determine val element to change. Assert that
3582 wchar_bytes * charwidth fits into val array.
3583
191816a3
MP
35842016-08-12 Marek Polacek <polacek@redhat.com>
3585
3586 PR c/7652
3587 * c-parser.c (c_parser_external_declaration): Add FALLTHRU.
3588 (c_parser_postfix_expression): Likewise.
3589 * c-typeck.c (build_unary_op): Adjust fall through comment.
3590 (c_mark_addressable): Likewise.
3591
b95a64bb
JJ
35922016-08-11 Jakub Jelinek <jakub@redhat.com>
3593
3594 PR c/72816
3595 * c-decl.c (grokdeclarator): When adding TYPE_DOMAIN for flexible
3596 array member through typedef, for orig_qual_indirect == 0 clear
3597 orig_qual_type.
3598
895aa8e1
DM
35992016-08-08 David Malcolm <dmalcolm@redhat.com>
3600
3601 PR c/64955
3602 * c-lang.c (LANG_HOOKS_RUN_LANG_SELFTESTS): If CHECKING_P, wire
3603 this up to selftest::run_c_tests.
3604 (selftest::run_c_tests): New function.
3605
0b212d8c
TS
36062016-08-04 Thomas Schwinge <thomas@codesourcery.com>
3607
ae9281fc
TS
3608 * c-parser.c (struct oacc_routine_data): Add error_seen and
3609 fndecl_seen members.
3610 (c_finish_oacc_routine): Use these.
3611 (c_parser_declaration_or_fndef): Adjust.
3612 (c_parser_oacc_routine): Likewise. Support more C language
3613 constructs, and improve diagnostics. Move pragma context
3614 checking...
3615 (c_parser_pragma): ... here.
3616
0b212d8c
TS
3617 * c-parser.c (struct oacc_routine_data): New.
3618 (c_parser_declaration_or_fndef, c_parser_oacc_routine): Use it.
3619 Simplify code.
3620 (c_finish_oacc_routine): Likewise. Don't attach clauses to "omp
3621 declare target" attribute.
3622
76e2c821
JB
36232016-08-01 Jan Beulich <jbeulich@suse.com>
3624
3625 * c-fold.c (c_fully_fold_internal): Also emit shift count
3626 warnings for vector types.
3627 * c-typeck.c (build_binary_op): Likewise.
3628
f618a472
MP
36292016-07-29 Marek Polacek <polacek@redhat.com>
3630
3631 PR c/71742
3632 * c-decl.c (finish_struct): Rephrase an error message.
3633
efd0786f
MP
3634 PR c/71853
3635 * c-parser.c (c_parser_switch_statement): Initialize ce.original_type
3636 to error node for invalid code.
3637
e00dceaf
MP
3638 PR c/71573
3639 * c-decl.c (implicitly_declare): Return decl early not only for
3640 error_mark_nodes, but for anything that is not a FUNCTION_DECL.
3641
673a107a
JJ
36422016-07-29 Jakub Jelinek <jakub@redhat.com>
3643
3644 PR c/71969
3645 * c-decl.c (finish_function): Only set DECL_DISREGARD_INLINE_LIMITS
3646 on GNU extern inline functions.
3647
a5b5c8b6
MP
36482016-07-29 Marek Polacek <polacek@redhat.com>
3649
3650 PR c/71583
3651 * c-parser.c (c_parser_postfix_expression_after_paren_type): Also
3652 check expr.value.
3653
e3fe09c1
UB
36542016-07-22 Uros Bizjak <ubizjak@gmail.com>
3655
3656 * c-typeck.c: Use HOST_WIDE_INT_1 instead of (HOST_WIDE_INT) 1,
3657
7c8f7eaa
DM
36582016-07-20 David Malcolm <dmalcolm@redhat.com>
3659
3660 * c-decl.c (struct edit_distance_traits<cpp_hashnode *>): Move to
3661 spellcheck-tree.h
3662 (best_macro_match): Likewise, converting from a typedef to a
3663 subclass.
3664 (find_closest_macro_cpp_cb): Move to spellcheck-tree.c.
3665 (lookup_name_fuzzy): Update for change of best_macro_match to a
3666 subclass with a ctor that calls cpp_forall_identifiers.
3667
de6a69ee
DM
36682016-07-20 David Malcolm <dmalcolm@redhat.com>
3669
3670 * c-decl.c (implicit_decl_warning): Update for conversion of
3671 return type of lookup_name_fuzzy to const char *.
3672 (undeclared_variable): Likewise.
3673 (lookup_name_fuzzy): Convert return type from tree to
3674 const char *.
3675 * c-parser.c (c_parser_declaration_or_fndef): Update for
3676 conversion of return type of lookup_name_fuzzy to const char *.
3677 (c_parser_parameter_declaration): Likewise.
3678
b1c9c068
CP
36792016-07-15 Cesar Philippidis <cesar@codesourcery.com>
3680
3681 * c-parser.c (c_parser_oacc_declare): Don't scan for
3682 GOMP_MAP_POINTER.
3683 * c-typeck.c (handle_omp_array_sections): Mark data clauses with
3684 GOMP_MAP_FORCE_{PRESENT,TO,FROM,TOFROM} as potentially having
3685 zero-length subarrays.
3686
ddbbcb19
JJ
36872016-07-15 Jakub Jelinek <jakub@redhat.com>
3688
3689 PR c/71858
3690 * c-decl.c (implicit_decl_warning): Use FUZZY_LOOKUP_FUNCTION_NAME
3691 instead of FUZZY_LOOKUP_NAME.
3692 (lookup_name_fuzzy): For FUZZY_LOOKUP_FUNCTION_NAME consider
3693 FUNCTION_DECLs, {VAR,PARM}_DECLs function pointers and macros.
3694
dd36b877
JJ
36952016-07-14 Jakub Jelinek <jakub@redhat.com>
3696
3697 PR c/71858
3698 * c-decl.c (lookup_name_fuzzy): Ignore binding->invisible.
3699
8c681247
TS
37002016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
3701
3702 * c-parser.c (c_parser_generic_selection): Make type of variable
3703 auto_vec.
3704 (c_parser_omp_declare_simd): Likewise.
3705
bf4fa671
TS
37062016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
3707
3708 * c-decl.c (struct c_struct_parse_info): Change member types
3709 from vec to auto_vec.
3710 (start_struct): Adjust.
3711 (finish_struct): Likewise.
3712
557e8c49
JJ
37132016-07-02 Jakub Jelinek <jakub@redhat.com>
3714
3715 PR c/71719
3716 * c-typeck.c (mark_exp_read): Handle VIEW_CONVERT_EXPR.
3717
54d19c3b
TS
37182016-06-29 Thomas Schwinge <thomas@codesourcery.com>
3719
3720 * c-parser.c (c_parser_pragma) <PRAGMA_OMP_CANCELLATION_POINT>:
3721 Move pragma context checking into...
3722 (c_parser_omp_cancellation_point): ... here, and improve
3723 diagnostic messages.
3724 * c-typeck.c (c_finish_omp_cancel)
3725 (c_finish_omp_cancellation_point): Improve diagnostic messages.
3726
152ef731
JJ
37272016-06-29 Jakub Jelinek <jakub@redhat.com>
3728
3729 PR c/71685
3730 * c-typeck.c (c_build_qualified_type): Don't clear
3731 C_TYPE_INCOMPLETE_VARS for the main variant.
3732
37332016-06-28 Martin Sebor <msebor@redhat.com>
4378d117
MS
3734
3735 PR c/71552
3736 * c-typeck.c (output_init_element): Diagnose incompatible types
3737 before non-constant initializers.
3738
e9ac1f86
JJ
37392016-06-28 Jakub Jelinek <jakub@redhat.com>
3740
3741 * Make-lang.in: Don't cat ../stage_current if it does not exist.
3742
277d7ee0
AK
37432016-06-23 Andi Kleen <ak@linux.intel.com>
3744
3745 * Make-lang.in: Add support for autofdo.
3746
1a4f11c8
DM
37472016-06-22 David Malcolm <dmalcolm@redhat.com>
3748
3749 PR c/70339
3750 * c-decl.c: Include spellcheck-tree.h and gcc-rich-location.h.
3751 (implicit_decl_warning): When issuing warnings for implicit
3752 declarations, attempt to provide a suggestion via
3753 lookup_name_fuzzy.
3754 (undeclared_variable): Likewise when issuing errors.
3755 (lookup_name_in_scope): Likewise.
3756 (struct edit_distance_traits<cpp_hashnode *>): New struct.
3757 (best_macro_match): New typedef.
3758 (find_closest_macro_cpp_cb): New function.
3759 (lookup_name_fuzzy): New function.
3760 * c-parser.c: Include gcc-rich-location.h.
3761 (c_token_starts_typename): Split out case CPP_KEYWORD into...
3762 (c_keyword_starts_typename): ...this new function.
3763 (c_parser_declaration_or_fndef): When issuing errors about
3764 missing "struct" etc, add a fixit. For other kinds of errors,
3765 attempt to provide a suggestion via lookup_name_fuzzy.
3766 (c_parser_parms_declarator): When looking ahead to detect typos in
3767 type names, also reject CPP_KEYWORD.
3768 (c_parser_parameter_declaration): When issuing errors about
3769 unknown type names, attempt to provide a suggestion via
3770 lookup_name_fuzzy.
3771 * c-tree.h (c_keyword_starts_typename): New prototype.
3772
5a578671
JM
37732016-06-20 Joseph Myers <joseph@codesourcery.com>
3774
3775 PR c/71601
3776 * c-typeck.c (build_conditional_expr): Return error_mark_node if
3777 c_common_type returns error_mark_node.
3778
3f8257db 37792016-06-19 Martin Sebor <msebor@redhat.com>
aa0db437
MS
3780
3781 PR c/69507
3782 * c-parser.c (c_parser_alignof_expression): Avoid diagnosing
3783 __alignof__ (expression).
3784
6a3f203c
DM
37852016-06-14 David Malcolm <dmalcolm@redhat.com>
3786
3787 * c-typeck.c: Include spellcheck-tree.h rather than spellcheck.h.
3788
264757fb
DM
37892016-06-14 David Malcolm <dmalcolm@redhat.com>
3790
3791 * c-typeck.c (build_component_ref): Simplify fixit code by
3792 using gcc_rich_location::add_fixit_misspelled_id.
3793 (set_init_label): Likewise.
3794
f7e4f2e3
DM
37952016-06-13 David Malcolm <dmalcolm@redhat.com>
3796
3797 * c-parser.c (c_parser_initelt): Provide location of name for new
3798 location_t param of set_init_label.
3799 * c-tree.h (set_init_label): Add location_t param.
3800 * c-typeck.c (set_init_index): Add "fieldname_loc" location_t
3801 param and use it when issuing error messages about unrecognized
3802 field names. Attempt to provide a fixit hint if appropriate,
3803 otherwise update the error message to provide the type name.
3804
4b1ffdb1
TS
38052016-06-10 Thomas Schwinge <thomas@codesourcery.com>
3806
3807 PR c/71381
3808 * c-parser.c (c_parser_omp_variable_list) <OMP_CLAUSE__CACHE_>:
3809 Loosen checking.
3810
44a845ca
MS
38112016-06-08 Martin Sebor <msebor@redhat.com>
3812 Jakub Jelinek <jakub@redhat.com>
3813
3814 PR c++/70507
3815 PR c/68120
3816 * c-typeck.c (convert_arguments): Don't promote last argument
3817 of BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
3818
92a5f2ba
MP
38192016-06-08 Marek Polacek <polacek@redhat.com>
3820
3821 PR c/71418
3822 * c-decl.c (grokdeclarator): Check TYPE_P.
3823
08203f73
MP
3824 PR c/71426
3825 * c-decl.c (get_parm_info): Don't crash on an assert on invalid
3826 code.
3827
6ffd47b7
DM
38282016-06-07 David Malcolm <dmalcolm@redhat.com>
3829
3830 * c-parser.c (c_parser_postfix_expression): In __builtin_offsetof
3831 and structure element reference, capture the location of the
3832 element name token and pass it to build_component_ref.
3833 (c_parser_postfix_expression_after_primary): Likewise for
3834 structure element dereference.
3835 (c_parser_omp_variable_list): Likewise for
3836 OMP_CLAUSE_{_CACHE, MAP, FROM, TO},
3837 * c-tree.h (build_component_ref): Add location_t param.
3838 * c-typeck.c (build_component_ref): Add location_t param
3839 COMPONENT_LOC. Use it, if available, when issuing hints about
3840 mispelled member names to provide a fixit replacement hint.
3841
1f40cff3
MP
38422016-06-06 Marek Polacek <polacek@redhat.com>
3843
3844 PR c/71362
3845 * c-parser.c (c_parser_direct_declarator): Set location.
3846
5545a907
MP
38472016-06-06 Marek Polacek <polacek@redhat.com>
3848
3849 * c-typeck.c (comptypes_internal): Handle comparisons of
3850 INTEGER_TYPE, FIXED_POINT_TYPE, and REAL_TYPE nodes. Don't check
3851 TYPE_REF_CAN_ALIAS_ALL.
3852
b605f663
CLT
38532016-06-03 Chung-Lin Tang <cltang@codesourcery.com>
3854
3855 * c-typeck.c (c_finish_omp_clauses): Mark OpenACC reduction
3856 arguments as addressable when async clause exists.
3857
00631022
JJ
38582016-05-30 Jakub Jelinek <jakub@redhat.com>
3859
3860 PR c++/71349
3861 * c-parser.c (c_parser_omp_for): Don't disallow nowait clause
3862 when combined with target construct.
3863
7211a097
JJ
38642016-05-26 Jakub Jelinek <jakub@redhat.com>
3865
3866 * c-parser.c (c_parser_omp_clause_schedule): Warn if
3867 OMP_CLAUSE_SCHEDULE_CHUNK_EXPR is known not to be positive.
3868
95efe6b6
MP
38692016-05-25 Marek Polacek <polacek@redhat.com>
3870
3871 PR c/71265
3872 * c-decl.c (c_make_fname_decl): Don't check seen_error.
3873
a23faf7a
MP
3874 PR c/71266
3875 * c-decl.c (store_parm_decls_oldstyle): Skip non-PARM_DECLs.
3876
e46c7770
CP
38772016-05-24 Cesar Philippidis <cesar@codesourcery.com>
3878
3879 * c-parser.c (c_parser_oacc_declare): Add support for
3880 GOMP_MAP_FIRSTPRIVATE_POINTER.
3881 * c-typeck.c (handle_omp_array_sections_1): Replace bool is_omp
3882 argument with enum c_omp_region_type ort.
3883 (handle_omp_array_sections): Likewise. Update call to
3884 handle_omp_array_sections_1.
3885 (c_finish_omp_clauses): Add specific errors and warning messages for
3886 OpenACC. Use firsrtprivate pointers for OpenACC subarrays. Update
3887 call to handle_omp_array_sections.
3888
a04e69c0
TS
38892016-05-24 Thomas Schwinge <thomas@codesourcery.com>
3890
3891 * c-parser.c (c_parser_oacc_routine): Tighten syntax checks.
3892
f17a223d
RB
38932016-05-24 Richard Biener <rguenther@suse.de>
3894
3895 PR middle-end/70434
3896 PR c/69504
3897 * c-typeck.c (build_array_ref): Do not complain about indexing
3898 non-lvalue vectors. Adjust for function name change.
3899
79063edd
MS
39002016-05-20 Martin Sebor <msebor@redhat.com>
3901
3902 PR c/71115
3903 * c-typeck.c (error_init): Use
3904 expansion_point_location_if_in_system_header.
3905 (warning_init): Same.
3906
8a40fef3
DM
39072016-05-19 David Malcolm <dmalcolm@redhat.com>
3908
3909 PR c/71171
3910 * c-parser.c (c_parser_generic_selection): Use c_expr::set_error
3911 in error-handling.
3912 (c_parser_postfix_expression): Likewise.
3913 * c-tree.h (c_expr::set_error): New method.
3914 * c-typeck.c (parser_build_binary_op): In error-handling, ensure
3915 that result's range is initialized.
3916
e9892350
JG
39172016-05-17 James Greenhalgh <james.greenhalgh@arm.com>
3918
3919 * c-typeck.c (parser_build_unary_op): Fix formatting.
3920
8fad45f5
MW
39212016-05-16 Matthew Wahab <matthew.wahab@arm.com>
3922
3923 * c-decl.c (grokdeclarator): Remove errmsg and use of
3924 targetm.invalid_return_type.
3925 (grokparms): Remove errmsg and use of
3926 targetm.invalid_parameter_type.
3927
aa4b467b
JM
39282016-05-13 Joseph Myers <joseph@codesourcery.com>
3929
3930 * c-decl.c (grokdeclarator): For C11, discard qualifiers on
3931 function return type.
3932
4f2e1536
MP
39332016-05-12 Marek Polacek <polacek@redhat.com>
3934
3935 PR c/70756
3936 * c-decl.c (build_compound_literal): Pass LOC down to
3937 c_incomplete_type_error.
3938 * c-tree.h (require_complete_type): Adjust declaration.
3939 (c_incomplete_type_error): Likewise.
3940 * c-typeck.c (require_complete_type): Add location parameter, pass it
3941 down to c_incomplete_type_error.
3942 (c_incomplete_type_error): Add location parameter, pass it down to
3943 error_at.
3944 (build_component_ref): Pass location down to c_incomplete_type_error.
3945 (default_conversion): Pass location down to require_complete_type.
3946 (build_array_ref): Likewise.
3947 (build_function_call_vec): Likewise.
3948 (convert_arguments): Likewise.
3949 (build_unary_op): Likewise.
3950 (build_c_cast): Likewise.
3951 (build_modify_expr): Likewise.
3952 (convert_for_assignment): Likewise.
3953 (c_finish_omp_clauses): Likewise.
3954
d6e83a8d
MM
39552016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
3956
3957 PR c/43651
3958 * c-decl.c (declspecs_add_qual): Warn when -Wduplicate-decl-specifier
3959 is enabled.
3960 * c-errors.c (pedwarn_c90): Return true if warned.
3961 * c-tree.h (pedwarn_c90): Change return type to bool.
3962 (enum c_declspec_word): Add new enumerator cdw_atomic.
3963
5c3a10fb
MP
39642016-05-11 Marek Polacek <polacek@redhat.com>
3965
3966 PR c++/71024
3967 * c-decl.c (diagnose_mismatched_decls): Factor out code to
3968 diagnose_mismatched_attributes and call it.
3969
cf68d92c
MP
39702016-05-10 Marek Polacek <polacek@redhat.com>
3971
3972 PR c/70255
3973 * c-decl.c (diagnose_mismatched_decls): Warn for optimize attribute
3974 on a declaration following the definition.
3975
351f85c5
JJ
39762016-05-05 Jakub Jelinek <jakub@redhat.com>
3977
3978 * c-parser.c (c_parser_switch_statement): Add IF_P argument,
3979 parse it through to c_parser_c99_block_statement.
3980 (c_parser_statement_after_labels): Adjust c_parser_switch_statement
3981 caller.
3982
deef7113
MP
39832016-05-04 Marek Polacek <polacek@redhat.com>
3984
3985 * c-parser.c (c_parser_if_statement): Replace OPT_Wparentheses with
3986 OPT_Wdangling_else.
3987
de55efd5
MP
39882016-05-04 Marek Polacek <polacek@redhat.com>
3989
3990 PR c/48778
3991 * c-typeck.c (build_binary_op): Don't issue -Waddress warnings
3992 for macro expansions.
3993
79ce98bc
MP
39942016-05-03 Marek Polacek <polacek@redhat.com>
3995
3996 PR c/70859
3997 * c-typeck.c (build_function_call_vec): Pass LOC and ARG_LOC down to
3998 check_builtin_function_arguments.
3999
fb2647aa
RB
40002016-05-03 Richard Biener <rguenther@suse.de>
4001
4002 * Make-lang.in (cc1-checksum.c): For stage-final re-use
4003 the checksum from the previous stage.
4004
77886428
CP
40052016-05-02 Cesar Philippidis <cesar@codesourcery.com>
4006
4007 * c-parser.c (c_parser_oacc_all_clauses): Update call to
4008 c_finish_omp_clauses.
4009 (c_parser_omp_all_clauses): Likewise.
4010 (c_parser_oacc_cache): Likewise.
4011 (c_parser_oacc_loop): Likewise.
4012 (omp_split_clauses): Likewise.
4013 (c_parser_omp_declare_target): Likewise.
4014 (c_parser_cilk_all_clauses): Likewise.
4015 (c_parser_cilk_for): Likewise.
4016 * c-typeck.c (c_finish_omp_clauses): Replace bool arguments
4017 is_omp, declare_simd, and is_cilk with enum c_omp_region_type ort.
4018
7176a4a0
MP
40192016-05-02 Marek Polacek <polacek@redhat.com>
4020
4021 PR c/70851
4022 * c-decl.c (grokdeclarator): Diagnose when array's size has an
4023 incomplete type.
4024
e7ff0319
CP
40252016-04-29 Cesar Philippidis <cesar@codesourcery.com>
4026
4027 PR middle-end/70626
4028 * c-parser.c (c_parser_oacc_loop): Don't augment mask with
4029 OACC_LOOP_CLAUSE_MASK.
4030 (c_parser_oacc_kernels_parallel): Update call to
4031 c_oacc_split_loop_clauses.
4032
9f405ce1
AM
40332016-04-28 Andrew MacLeod <amacleod@redhat.com>
4034
4035 * c-array-notation.c (fix_builtin_array_notation_fn): Fix final
4036 argument to build_modify_expr in two cases.
4037
c1e1f433
BS
40382016-04-27 Bernd Schmidt <bschmidt@redhat.com>
4039
4040 * c-parser.c (c_parser_postfix_expression_after_primary): Call
4041 warn_for_memset instead of warning directly here.
4042
2448a956
MP
40432016-04-26 Marek Polacek <polacek@redhat.com>
4044
4045 PR c/67784
4046 * c-parser.c (c_parser_maybe_reclassify_token): New function factored
4047 out of ...
4048 (c_parser_for_statement): ... here.
4049 (c_parser_if_statement): Use it.
4050 (c_parser_switch_statement): Use it.
4051 (c_parser_while_statement): Use it.
4052
b02a5e26
MP
4053 PR c/70791
4054 * c-decl.c (pushdecl): Pass LOCUS down to warning.
4055
477d4906
IV
40562016-04-20 Ilya Verbin <ilya.verbin@intel.com>
4057
4058 PR c++/69363
4059 * c-parser.c (c_parser_cilk_all_clauses): Use c_finish_omp_clauses
4060 instead of c_finish_cilk_clauses.
4061 * c-tree.h (c_finish_omp_clauses): Add new default argument.
4062 * c-typeck.c (c_finish_omp_clauses): Add new argument. Allow
4063 floating-point variables in the linear clause for Cilk Plus.
4064
fe37c7af
MM
40652016-04-18 Michael Matz <matz@suse.de>
4066
4067 * c-decl.c (merge_decls): Use SET_DECL_ALIGN and SET_TYPE_ALIGN.
4068 (grokdeclarator, parser_xref_tag, finish_enum): Use SET_TYPE_ALIGN.
4069
949505a9
MP
40702016-04-15 Marek Polacek <polacek@redhat.com>
4071
4072 PR c/70671
4073 * c-typeck.c (build_unary_op): Pass location down to error and
4074 warning call.
4075
dda1bf61
JJ
40762016-04-15 Jakub Jelinek <jakub@redhat.com>
4077
4078 PR c/70436
4079 * c-parser.c (c_parser_pragma): Add IF_P argument, pass it down
4080 where needed.
4081 (c_parser_external_declaration, c_parser_struct_or_union_specifier,
4082 c_parser_parameter_declaration, c_parser_compound_statement_nostart,
4083 c_parser_objc_class_instance_variables, c_parser_objc_methodprotolist):
4084 Adjust c_parser_pragma callers.
4085 (c_parser_statement_after_labels): Likewise. Adjust c_parser_cilk_for
4086 caller.
4087 (c_parser_omp_structured_block): Add IF_P argument, pass it down to
4088 c_parser_statement.
4089 (c_parser_oacc_data, c_parser_oacc_host_data, c_parser_oacc_loop,
4090 c_parser_oacc_kernels_parallel, c_parser_omp_critical,
4091 c_parser_omp_simd, c_parser_omp_for, c_parser_omp_master,
4092 c_parser_omp_ordered, c_parser_omp_parallel, c_parser_omp_single,
4093 c_parser_omp_task, c_parser_omp_taskgroup, c_parser_omp_distribute,
4094 c_parser_omp_teams, c_parser_omp_target_data, c_parser_omp_target,
4095 c_parser_omp_taskloop, c_parser_omp_construct, c_parser_cilk_grainsize,
4096 c_parser_cilk_simd, c_parser_cilk_for): Add IF_P argument, pass it
4097 down where needed.
4098 (c_parser_omp_for_loop): Likewise. Clear IF_P if nbraces.
4099 (c_parser_omp_sections_scope): Adjust c_parser_omp_structured_block
4100 calls.
4101
99cd9857
MP
41022016-04-13 Marek Polacek <polacek@redhat.com>
4103
4104 PR c/70436
4105 * c-parser.c (c_parser_statement_after_labels): Add IF_P argument and
4106 adjust callers.
4107 (c_parser_statement): Likewise.
4108 (c_parser_c99_block_statement): Likewise.
4109 (c_parser_while_statement): Likewise.
4110 (c_parser_for_statement): Likewise.
4111 (c_parser_if_body): Don't set IF_P here.
4112 (c_parser_if_statement): Add IF_P argument. Set IF_P here. Warn
4113 about dangling else here.
4114 * c-tree.h (c_finish_if_stmt): Adjust declaration.
4115 * c-typeck.c (c_finish_if_stmt): Remove NESTED_IF parameter. Don't
4116 warn about dangling else here.
4117
f13355da
MP
41182016-04-04 Marek Polacek <polacek@redhat.com>
4119
4120 PR c/70307
4121 * c-fold.c (c_fully_fold_internal): Handle VEC_COND_EXPR.
4122
5fde6a45
MP
41232016-03-31 Marek Polacek <polacek@redhat.com>
4124
4125 PR c/70297
4126 * c-decl.c (merge_decls): Also set TYPE_ALIGN and TYPE_USER_ALIGN.
4127
4bbf545b
DM
41282016-03-18 David Malcolm <dmalcolm@redhat.com>
4129
4130 PR c/70281
4131 * c-parser.c (c_parser_postfix_expression): Set the source range
4132 for uses of "__builtin_types_compatible_p".
4133
fcc2b74f
JJ
41342016-03-17 Jakub Jelinek <jakub@redhat.com>
4135
4136 PR c/70280
4137 * c-typeck.c (composite_type): Don't count void_list_node
4138 into len, if the list is terminated by void_list_node, start
4139 with void_list_node instead of NULL for newargs. Stop
4140 at void_list_node.
4141
ab4c578f
MP
41422016-03-16 Marek Polacek <polacek@redhat.com>
4143
4144 PR c/70093
4145 * c-typeck.c (build_function_call_vec): Create a TARGET_EXPR for
4146 nested functions returning VM types.
4147
96b3c82d
CP
41482016-03-09 Cesar Philippidis <cesar@codesourcery.com>
4149
4150 * c-parser.c (c_parser_oacc_loop): Update cclauses and clauses
4151 when calling c_finish_omp_clauses.
4152
29b9828f
BS
41532016-03-04 Bernd Schmidt <bschmidt@redhat.com>
4154
4155 PR c/69824
4156 * c-decl.c (get_parm_info): Don't queue implicit function declarations
4157 for later.
4158
7ff6ca38
MP
41592016-03-04 Marek Polacek <polacek@redhat.com>
4160
4161 PR c/69798
4162 * c-parser.c (c_parser_postfix_expression): Call
4163 c_parser_cast_expression rather than c_parser_postfix_expression.
4164
686e2237
JJ
41652016-03-01 Jakub Jelinek <jakub@redhat.com>
4166
4167 PR c/69796
4168 PR c/69974
4169 * c-parser.c (c_parser_translation_unit): Don't change TREE_TYPE
4170 of incomplete decls to error_mark_node.
4171
0b05329b
MP
41722016-02-24 Marek Polacek <polacek@redhat.com>
4173
4174 PR c/69819
4175 * c-decl.c (finish_decl): Don't update the copy of the type of a
4176 different decl type.
4177
067fbd8b
JJ
41782016-02-23 Jakub Jelinek <jakub@redhat.com>
4179
4180 PR objc/69844
4181 * c-parser.c (c_parser_for_statement): Properly handle ObjC classes
4182 in id_kind reclassification.
4183
bf14eba2
JJ
41842016-02-16 Jakub Jelinek <jakub@redhat.com>
4185
4186 PR c/69835
4187 * c-typeck.c (build_binary_op): Revert 2015-09-09 change.
4188
ba539195
JN
41892016-02-16 James Norris <jnorris@codesourcery.com>
4190
4191 PR c/64748
4192 * c-parser.c (c_parser_oacc_data_clause_deviceptr): Allow parms.
4193
16595a1f
BS
41942016-02-12 Bernd Schmidt <bschmidt@redhat.com>
4195
f48dfe98
BS
4196 * c-decl.c (build_null_declspecs): Zero the entire struct.
4197
16595a1f
BS
4198 PR c/69522
4199 * c-parser.c (c_parser_braced_init): New arg outer_obstack. All
4200 callers changed. If nested_p is true, use it to call
4201 finish_implicit_inits.
4202 * c-tree.h (finish_implicit_inits): Declare.
4203 * c-typeck.c (finish_implicit_inits): New function. Move code
4204 from ...
4205 (push_init_level): ... here.
4206 (set_designator, process_init_element): Call finish_implicit_inits.
4207
66756373
JJ
42082016-02-11 Jakub Jelinek <jakub@redhat.com>
4209
4210 PR c/69768
4211 * c-typeck.c (parser_build_binary_op): Strip nops from integer_zerop
4212 arguments for -Waddress warning.
4213
1066e9b5
JJ
42142016-02-04 Jakub Jelinek <jakub@redhat.com>
4215
4216 PR c/69669
4217 * c-decl.c (finish_enum): When honoring mode attribute,
4218 make sure to use proper TYPE_MIN_VALUE and TYPE_MAX_VALUE.
4219
3a5d2ba4
JJ
42202016-01-29 Jakub Jelinek <jakub@redhat.com>
4221
4222 PR debug/69518
4223 * c-decl.c (finish_struct): Clear C_TYPE_INCOMPLETE_VARS in
4224 all type variants, not just TYPE_MAIN_VARIANT.
4225
cbdd8ae0
JJ
42262016-01-27 Jakub Jelinek <jakub@redhat.com>
4227
4228 PR debug/66869
4229 * c-decl.c (c_write_global_declarations_1): Warn with
4230 warn_unused_function if static prototype without definition
4231 is not C_DECL_USED.
4232
fa74a4bc
MP
42332016-01-27 Marek Polacek <polacek@redhat.com>
4234
4235 PR c/68062
4236 * c-typeck.c (build_binary_op) [EQ_EXPR, GE_EXPR]: Promote operand
4237 to unsigned, if needed. Add -Wsign-compare warning.
4238
13f92e8d
JJ
42392016-01-26 Jakub Jelinek <jakub@redhat.com>
4240
4241 PR tree-optimization/69483
4242 * c-parser.c (c_parser_translation_unit): Use FOR_EACH_VEC_ELT.
4243
cd8e73dc 42442016-01-20 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
d25c7690
PK
4245
4246 PR c/24293
4247 * c-tree.h (incomplete_record_decls): Declare.
4248 * c-parser.c (incomplete_record_decls): Define.
4249 (c_parser_translation_unit): Iterate through incomplete_record_decls and
4250 report error if any decl has zero size.
4251 * c-decl.c (finish_decl): Append static decl with incomplete struct/union
4252 or enum type to incomplete_record_decls.
4253
e6d6ec9e
TV
42542016-01-14 Tom de Vries <tom@codesourcery.com>
4255
4256 PR tree-optimization/68773
4257 * c-parser.c (c_parser_oacc_declare, c_parser_omp_declare_target): Don't
4258 set force_output.
4259
00083992
MP
42602016-01-14 Marek Polacek <polacek@redhat.com>
4261
4262 PR c/69262
4263 * c-decl.c (grokdeclarator): Provide more information for invalid
4264 array declarations.
4265
7443cf13
DM
42662016-01-06 David Malcolm <dmalcolm@redhat.com>
4267
4268 * c-parser.c (c_parser_unary_expression): For dereferences, build
4269 a combined location before calling build_indirect_ref, so that
4270 error reports cover the full range, manually updating the c_expr
4271 src_range.
4272
6b131d5b
MP
42732016-01-06 Marek Polacek <polacek@redhat.com>
4274
4275 PR sanitizer/69099
4276 * c-convert.c (convert) [INTEGER_TYPE]: Drop ARG. Don't pass ARG to
4277 ubsan_instrument_float_cast. Fold EXPR. Use NULL_TREE instead of
4278 NULL.
4279
818ab71a
JJ
42802016-01-04 Jakub Jelinek <jakub@redhat.com>
4281
4282 Update copyright years.
4283
2fe0a208
MP
42842016-01-04 Marek Polacek <polacek@redhat.com>
4285
4286 PR c/68908
4287 * c-typeck.c (build_atomic_assign): Improve commentary. Add
4288 optimization to use __atomic_fetch_* built-in if possible.
4289
c7b48c8a
TS
42902015-12-23 Thomas Schwinge <thomas@codesourcery.com>
4291
4292 * c-parser.c (c_parser_oacc_clause_use_device): Merge function
4293 into...
4294 (c_parser_omp_clause_use_device_ptr): ... this function. Adjust
4295 all users.
4296
fda5652f
MP
42972015-12-22 Marek Polacek <polacek@redhat.com>
4298
4299 PR c/69002
4300 * c-typeck.c (build_component_ref): Warn when acessing elements of
4301 atomic structures or unions.
4302
745e411d
DM
43032015-12-21 David Malcolm <dmalcolm@redhat.com>
4304
4305 * c-typeck.c: Include "gcc-rich-location.h".
4306 (build_binary_op): In the two places that call binary_op_error,
4307 create a gcc_rich_location and populate it with the location of
4308 the binary op and its two operands.
4309
94c40e19
DM
43102015-12-16 David Malcolm <dmalcolm@redhat.com>
4311
4312 * c-parser.c (c_parser_statement_after_labels): When calling
4313 c_finish_return, Use the return expression's location if it has
4314 one, falling back to the location of the first token within it.
4315 * c-typeck.c (c_finish_return): When issuing warnings about
4316 the incorrect presence/absence of a return value, issue a note
4317 showing the declaration of the function.
4318
de67c4c3
DM
43192015-12-16 David Malcolm <dmalcolm@redhat.com>
4320
4321 * c-parser.c (struct c_parser): Expand array "tokens_buf" from 2
4322 to 4.
4323 (c_parser_peek_nth_token): New function.
4324 (c_parser_peek_conflict_marker): New function.
4325 (c_parser_error): Detect conflict markers and report them as such.
4326
a10704e1
DM
43272015-12-16 David Malcolm <dmalcolm@redhat.com>
4328
4329 * c-parser.c (c_parser_postfix_expression): Use EXPR_LOC_OR_LOC
4330 to preserve range information for the primary expression
4331 in the call to c_parser_postfix_expression_after_primary.
4332
8062bca6
DM
43332015-12-16 David Malcolm <dmalcolm@redhat.com>
4334
4335 * c-parser.c (c_parser_static_assert_declaration_no_semi): Use the
4336 expression location, falling back on the first token location,
4337 rather than always using the latter.
4338
d06f8b75
MP
43392015-12-16 Marek Polacek <polacek@redhat.com>
4340
4341 PR c/64637
4342 * c-typeck.c (c_process_expr_stmt): Use location of the expression if
4343 available.
4344
2994fb91
MP
43452015-12-15 Marek Polacek <polacek@redhat.com>
4346
4347 PR c/68907
4348 * c-typeck.c (build_atomic_assign): Set TREE_NO_WARNING on an
4349 artificial decl.
4350
a1b93f8d
DM
43512015-12-08 David Malcolm <dmalcolm@redhat.com>
4352
4353 * c-parser.c (c_parser_alignof_expression): Capture location of
4354 closing parenthesis (if any), or of end of unary expression, and
4355 use it to build a src_range for the expression.
4356
46c6e1e2
DM
43572015-12-08 David Malcolm <dmalcolm@redhat.com>
4358
4359 PR c/68757
4360 * c-parser.c (c_parser_get_builtin_args): Add
4361 "out_close_paren_loc" param, and write back to it.
4362 (c_parser_postfix_expression): Capture the closing
4363 parenthesis location for RID_CHOOSE_EXPR,
4364 RID_BUILTIN_CALL_WITH_STATIC_CHAIN, RID_BUILTIN_COMPLEX,
4365 RID_BUILTIN_SHUFFLE and use it to set the source range
4366 for such expressions; within RID_BUILTIN_COMPLEX set
4367 the underlying location.
4368
66189108
MP
43692015-12-07 Marek Polacek <polacek@redhat.com>
4370
4371 PR c/68668
4372 * c-decl.c (grokdeclarator): If ORIG_QUAL_INDIRECT is indirect, use
4373 TREE_TYPE of ORIG_QUAL_TYPE, otherwise decrement ORIG_QUAL_INDIRECT.
4374
f187980b
EB
43752015-12-04 Eric Botcazou <ebotcazou@adacore.com>
4376
4377 * c-tree.h (c_build_va_arg): Adjust prototype.
4378 * c-parser.c (c_parser_postfix_expression): Adjust call to above.
4379 * c-typeck.c (c_build_va_arg): Rename LOC parameter to LOC2, add LOC1
4380 parameter, adjust throughout and issue an error if EXPR is a component
4381 with reverse storage order.
4382
4250754e
JM
43832015-12-02 Jason Merrill <jason@redhat.com>
4384
4385 * c-fold.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
4386 (c_fully_fold_internal, decl_constant_value_for_optimization):
4387 Move from c-common.c.
4388 * c-tree.h: Declare decl_constant_value_for_optimization.
4389 * Make-lang.in (C_AND_OBJC_OBJS): Add c-fold.o.
4390
e9e32ee6
JM
43912015-12-02 Joseph Myers <joseph@codesourcery.com>
4392
4393 PR c/68162
4394 * c-decl.c (grokdeclarator): Set first_non_attr_kind before
4395 following link from declarator to next declarator. Track original
4396 qualified type and pass it to c_build_qualified_type.
4397 * c-typeck.c (c_build_qualified_type): Add arguments
4398 orig_qual_type and orig_qual_indirect.
4399
ff7a55bf
TS
44002015-12-02 Thomas Schwinge <thomas@codesourcery.com>
4401
4402 * c-parser.c (c_parser_omp_clause_name)
4403 (c_parser_oacc_all_clauses): Alphabetical sorting.
4404
657e4e47
JJ
44052015-12-02 Jakub Jelinek <jakub@redhat.com>
4406
4407 PR c/68533
4408 * c-decl.c (get_parm_info): Use b->locus instead of input_location
4409 for diagnostics.
4410
37d5ad46
JB
44112015-12-01 Julian Brown <julian@codesourcery.com>
4412 Cesar Philippidis <cesar@codesourcery.com>
4413 James Norris <James_Norris@mentor.com>
4414
4415 * c-parser.c (c_parser_omp_clause_name): Add use_device support.
4416 (c_parser_oacc_clause_use_device): New function.
4417 (c_parser_oacc_all_clauses): Add use_device support.
4418 (OACC_HOST_DATA_CLAUSE_MASK): New macro.
4419 (c_parser_oacc_host_data): New function.
4420 (c_parser_omp_construct): Add host_data support.
4421 * c-tree.h (c_finish_oacc_host_data): Add prototype.
4422 * c-typeck.c (c_finish_oacc_host_data): New function.
4423 (c_finish_omp_clauses): Add use_device support.
4424
a4850ce9
JH
44252015-11-29 Jan Hubicka <hubicka@ucw.cz>
4426
4427 PR c/67106
4428 * c-decl.c: Set TYPE_PACKED in variants.
4429
b58d3df2
ML
44302015-11-27 Martin Liska <mliska@suse.cz>
4431
4432 PR c++/68312
4433 * c-array-notation.c (fix_builtin_array_notation_fn):
4434 Use release_vec_vec instead of vec::release.
4435 (build_array_notation_expr): Likewise.
4436 (fix_conditional_array_notations_1): Likewise.
4437 (fix_array_notation_expr): Likewise.
4438 (fix_array_notation_call_expr): Likewise.
4439
aec17bfe
JJ
44402015-11-27 Jakub Jelinek <jakub@redhat.com>
4441
4442 PR c/63326
4443 * c-parser.c (c_parser_compound_statement_nostart): If
4444 last_label is true, use pragma_stmt instead of pragma_compound
4445 as second c_parser_pragma argument.
4446 (c_parser_omp_ordered, c_parser_omp_target_update,
4447 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Pass
4448 false as second argument to c_parser_skip_to_pragma_eol after
4449 diagnosing standalone directives used in pragma_stmt context.
4450
688c4de0
IV
44512015-11-24 Ilya Verbin <ilya.verbin@intel.com>
4452
4453 * c-parser.c (c_parser_oacc_declare): Replace "ifdef ENABLE_OFFLOADING"
4454 with "if (ENABLE_OFFLOADING)".
4455
cbd03aee
DM
44562015-11-23 David Malcolm <dmalcolm@redhat.com>
4457
4458 PR objc/68438
4459 * c-parser.c (c_parser_postfix_expression): Set up source ranges
4460 for various Objective-C constructs: Class.name syntax,
4461 @selector(), @protocol(), @encode(), and [] message syntax.
4462
a87a86e1
DM
44632015-11-20 David Malcolm <dmalcolm@redhat.com>
4464
4465 PR 62314
4466 * c-typeck.c (should_suggest_deref_p): New function.
4467 (build_component_ref): Special-case POINTER_TYPE when
4468 generating a "not a structure of union" error message, and
4469 suggest a "->" rather than a ".", providing a fix-it hint.
4470
8ece8dfb
DM
44712015-11-19 David Malcolm <dmalcolm@redhat.com>
4472
4473 * c-typeck.c (lookup_field_fuzzy): Move determination of closest
4474 candidate into a new function, find_closest_identifier.
4475
433068cc
MP
44762015-11-19 Marek Polacek <polacek@redhat.com>
4477
4478 PR c/68412
4479 * c-typeck.c (parser_build_binary_op): Properly handle
4480 C_MAYBE_CONST_EXPR before calling warn_tautological_cmp.
4481
bef08b71
DM
44822015-11-17 David Malcolm <dmalcolm@redhat.com>
4483
4484 * c-parser.c (set_c_expr_source_range): Bulletproof both
4485 overloaded implementations against NULL expr->value.
4486 (c_parser_braced_init): Set src_range for "ret" to a sane pair of
4487 values.
4488 (c_parser_unary_expression): Likewise when handling addresses of
4489 labels.
4490 (c_parser_postfix_expression): Likewise for statement expressions,
4491 for __FUNCTION__, __PRETTY_FUNCTION_ and __func__ keywords, for
4492 __builtin_va_arg, and for __builtin_offset_of.
4493 (c_parser_postfix_expression_after_paren_type): Initialize expr's
4494 src_range using the range of the braced initializer.
4495 (c_parser_transaction_expression): Set src_range for "ret" to a
4496 sane pair of values.
4497
fff77217
KY
44982015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
4499
4500 * c-parser.c (c_finish_omp_declare_simd): Look for
4501 "simd" attribute as well. Update error message.
4502
1d899da2
TS
45032015-11-14 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
4504
4505 * c-parser.c (c_parser_omp_declare_target): Adjust.
4506
e4606348
JJ
45072015-11-14 Jakub Jelinek <jakub@redhat.com>
4508
4509 * c-typeck.c (c_finish_omp_clauses): Don't mark
4510 GOMP_MAP_FIRSTPRIVATE_POINTER decls addressable.
4511
3e636daf
MP
45122015-11-14 Marek Polacek <polacek@redhat.com>
4513
4514 * c-decl.c: Use RECORD_OR_UNION_TYPE_P throughout.
4515 * c-typeck.c: Likewise.
4516
ebedc9a3
DM
45172015-11-13 David Malcolm <dmalcolm@redhat.com>
4518
4519 * c-decl.c (warn_defaults_to): Pass line_table to
4520 rich_location ctor.
4521 * c-errors.c (pedwarn_c99): Likewise.
4522 (pedwarn_c90): Likewise.
4523 * c-parser.c (set_c_expr_source_range): New functions.
4524 (c_token::get_range): New method.
4525 (c_token::get_finish): New method.
4526 (c_parser_expr_no_commas): Call set_c_expr_source_range on the ret
4527 based on the range from the start of the LHS to the end of the
4528 RHS.
4529 (c_parser_conditional_expression): Likewise, based on the range
4530 from the start of the cond.value to the end of exp2.value.
4531 (c_parser_binary_expression): Call set_c_expr_source_range on
4532 the stack values for TRUTH_ANDIF_EXPR and TRUTH_ORIF_EXPR.
4533 (c_parser_cast_expression): Call set_c_expr_source_range on ret
4534 based on the cast_loc through to the end of the expr.
4535 (c_parser_unary_expression): Likewise, based on the
4536 op_loc through to the end of op.
4537 (c_parser_sizeof_expression) Likewise, based on the start of the
4538 sizeof token through to either the closing paren or the end of
4539 expr.
4540 (c_parser_postfix_expression): Likewise, using the token range,
4541 or from the open paren through to the close paren for
4542 parenthesized expressions.
4543 (c_parser_postfix_expression_after_primary): Likewise, for
4544 various kinds of expression.
4545 * c-tree.h (struct c_expr): Add field "src_range".
4546 (c_expr::get_start): New method.
4547 (c_expr::get_finish): New method.
4548 (set_c_expr_source_range): New decls.
4549 * c-typeck.c (parser_build_unary_op): Call set_c_expr_source_range
4550 on ret for prefix unary ops.
4551 (parser_build_binary_op): Likewise, running from the start of
4552 arg1.value through to the end of arg2.value.
4553
ec8b536f
MP
45542015-11-13 Marek Polacek <polacek@redhat.com>
4555
4556 PR c/68320
4557 * c-parser.c (c_parser_for_statement): Treat unknown tokens as IDs.
4558
277fe616
DM
45592015-11-13 David Malcolm <dmalcolm@redhat.com>
4560
4561 * c-typeck.c: Include spellcheck.h.
4562 (lookup_field_fuzzy_find_candidates): New function.
4563 (lookup_field_fuzzy): New function.
4564 (build_component_ref): If the field was not found, try using
4565 lookup_field_fuzzy and potentially offer a suggestion.
4566
6e232ba4
JN
45672015-11-12 James Norris <jnorris@codesourcery.com>
4568 Joseph Myers <joseph@codesourcery.com>
4569
4570 * c-parser.c (c_parser_pragma): Handle PRAGMA_OACC_DECLARE.
4571 (c_parser_omp_clause_name): Handle 'device_resident' clause.
4572 (c_parser_oacc_data_clause): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
4573 and PRAGMA_OMP_CLAUSE_LINK.
4574 (c_parser_oacc_all_clauses): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
4575 and PRAGMA_OACC_CLAUSE_LINK.
4576 (OACC_DECLARE_CLAUSE_MASK): New definition.
4577 (c_parser_oacc_declare): New function.
4578
9be4f715
MP
45792015-11-12 Marek Polacek <polacek@redhat.com>
4580
4581 PR c/67784
4582 * c-parser.c (c_parser_for_statement): Reclassify the token in
4583 a correct scope.
4584
e78bede6
MP
45852015-11-11 Marek Polacek <polacek@redhat.com>
4586
4587 PR c/68107
4588 PR c++/68266
4589 * c-decl.c (grokdeclarator): Call valid_array_size_p. Remove code
4590 checking the size of an array.
4591
69f293c9
AM
45922015-11-11 Andrew MacLeod <amacleod@redhat.com>
4593
4594 * c-array-notation.c: Remove unused header files.
4595 * c-aux-info.c: Likewise.
4596 * c-convert.c: Likewise.
4597 * c-decl.c: Likewise.
4598 * c-errors.c: Likewise.
4599 * c-lang.c: Likewise.
4600 * c-objc-common.c: Likewise.
4601 * c-parser.c: Likewise.
4602 * c-typeck.c: Likewise.
4603 * gccspec.c: Likewise.
4604
3a40d81d
NS
46052015-11-09 Thomas Schwinge <thomas@codesourcery.com>
4606 Cesar Philippidis <cesar@codesourcery.com>
4607 James Norris <jnorris@codesourcery.com>
4608 Julian Brown <julian@codesourcery.com>
4609 Nathan Sidwell <nathan@codesourcery.com>
4610
3a40d81d
NS
4611 * c-parser.c (c_parser_declaration_or_fndef): Add OpenACC
4612 routine arg.
4613 (c_parser_declaration_or_fndef): Call c_finish_oacc_routine.
4614 (c_parser_pragma): Parse 'acc routine'.
4615 (OACC_ROUTINE_CLAUSE_MARK): Define.
4616 (c_parser_oacc_routine, (c_finish_oacc_routine): New.
4617
fc402eec
AA
46182015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
4619
4620 PR debug/67192
4621 * c-typeck.c (c_finish_loop): For unconditional loops, set the
4622 location of the backward-goto to the start of the loop body.
4623
f6b0b3db
AA
46242015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
4625
4626 PR debug/67192
4627 * c-parser.c (c_parser_while_statement): Finish the loop before
4628 parsing ahead for misleading indentation.
4629 (c_parser_for_statement): Likewise.
4630
ee45a32d
EB
46312015-11-08 Eric Botcazou <ebotcazou@adacore.com>
4632
4633 * c-decl.c (finish_struct): If the structure has reverse storage
4634 order, rewrite the type of array fields with scalar component. Call
4635 maybe_apply_pragma_scalar_storage_order on entry.
4636 * c-typeck.c (build_unary_op) <ADDR_EXPR>: Remove left-overs. Issue
4637 errors on bit-fields and reverse SSO here and not...
4638 (c_mark_addressable): ...here.
4639 (output_init_element): Adjust call to initializer_constant_valid_p.
4640 (c_build_qualified_type): Propagate TYPE_REVERSE_STORAGE_ORDER.
4641
8a645150
DM
46422015-11-06 David Malcolm <dmalcolm@redhat.com>
4643
4644 * c-decl.c (warn_defaults_to): Update for change in signature
4645 of diagnostic_set_info.
4646 * c-errors.c (pedwarn_c99): Likewise.
4647 (pedwarn_c90): Likewise.
4648 * c-objc-common.c (c_tree_printer): Update for new "caret_p" param
4649 for textinfo::set_location.
4650
7a5e4956
CP
46512015-11-05 Cesar Philippidis <cesar@codesourcery.com>
4652 Thomas Schwinge <thomas@codesourcery.com>
4653 James Norris <jnorris@codesourcery.com>
4654
4655 * c-parser.c (c_parser_omp_clause_name): Add support for
4656 PRAGMA_OACC_CLAUSE_INDEPENDENT and PRAGMA_OACC_CLAUSE_TILE.
4657 (c_parser_omp_clause_default): Add is_oacc argument. Handle
4658 default(none) in OpenACC.
4659 (c_parser_oacc_shape_clause): Allow pointer variables as gang static
4660 arguments.
4661 (c_parser_oacc_clause_tile): New function.
4662 (c_parser_oacc_all_clauses): Add support for OMP_CLAUSE_DEFAULT,
4663 OMP_CLAUSE_INDEPENDENT and OMP_CLAUSE_TILE.
4664 (OACC_LOOP_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_{PRIVATE,INDEPENDENT,
4665 TILE}.
4666 (OACC_KERNELS_MASK): Add PRAGMA_OACC_CLAUSE_DEFAULT.
4667 (OACC_PARALLEL_MASK): Add PRAGMA_OACC_CLAUSE_{DEFAULT,PRIVATE,
4668 FIRSTPRIVATE}.
4669 (c_parser_omp_all_clauses): Update call to c_parser_omp_clause_default.
4670 (c_parser_oacc_update): Update the error message for missing clauses.
4671 * c-typeck.c (c_finish_omp_clauses): Add support for OMP_CLAUSE_TILE
4672 and OMP_CLAUSE_INDEPENDENT.
4673
bfcfbfa0
MP
46742015-11-05 Marek Polacek <polacek@redhat.com>
4675
4676 PR c/68090
4677 * c-parser.c (c_parser_postfix_expression_after_paren_type): Don't
4678 deal with pre-evaluation on invalid types.
4679
e01d41e5
JJ
46802015-11-05 Jakub Jelinek <jakub@redhat.com>
4681 Ilya Verbin <ilya.verbin@intel.com>
4682
4683 * c-parser.c: Include context.h and gimple-expr.h.
4684 (c_parser_omp_clause_schedule): Parse schedule modifiers, diagnose
4685 monotonic together with nonmonotonic.
4686 (c_parser_omp_for_loop): Call c_omp_check_loop_iv. Call add_stmt here.
4687 (OMP_DISTRIBUTE_CLAUSE_MASK): Add lastprivate clause.
4688 (c_parser_omp_target_data, c_parser_omp_target_enter_data,
4689 c_parser_omp_target_exit_data): Allow GOMP_MAP_ALWAYS_POINTER.
4690 (c_parser_omp_target): Likewise. Evaluate num_teams and thread_limit
4691 expressions on combined target teams before the target.
4692 (c_parser_omp_declare_target): If decl has "omp declare target" or
4693 "omp declare target link" attribute, and cgraph or varpool node already
4694 exists, then set corresponding flags. Call c_finish_omp_clauses
4695 in the parenthesized extended-list syntax case.
4696 * c-decl.c (c_decl_attributes): Don't diagnose block scope vars inside
4697 declare target.
4698 * c-typeck.c (handle_omp_array_sections_1): Allow non-zero low-bound
4699 on OMP_CLAUSE_REDUCTION array sections.
4700 (handle_omp_array_sections): Encode low-bound into the MEM_REF, either
4701 into the constant offset, or for variable low-bound using
4702 POINTER_PLUS_EXPR. For structure element based array sections use
4703 GOMP_MAP_ALWAYS_POINTER instead of GOMP_MAP_FIRSTPRIVATE_POINTER.
4704 (c_finish_omp_clauses): Drop generic_field_head, structure
4705 elements are now always mapped even as array section bases,
4706 diagnose same var in data sharing and mapping clauses. Diagnose if
4707 linear step on declare simd is neither a constant nor a uniform
4708 parameter. Look through POINTER_PLUS_EXPR for array section
4709 reductions. Diagnose the same var or function appearing multiple
4710 times on the same directive. Fix up wording for the to clause if t
4711 is neither a FUNCTION_DECL nor a VAR_DECL. Diagnose nonmonotonic
4712 modifier on kinds other than dynamic or guided or nonmonotonic
4713 modifier together with ordered clause.
4714
4bf9e5a8
TS
47152015-11-03 Thomas Schwinge <thomas@codesourcery.com>
4716 Chung-Lin Tang <cltang@codesourcery.com>
4717
4718 * c-parser.c (c_parser_omp_construct): Handle PRAGMA_OACC_ATOMIC.
4719
2adfab87
AM
47202015-10-29 Andrew MacLeod <amacleod@redhat.com>
4721
4722 * c-array-notation.c: Reorder #include's and remove duplicates.
4723 * c-aux-info.c: Likewise.
4724 * c-convert.c: Likewise.
4725 * c-decl.c: Likewise.
4726 * c-errors.c: Likewise.
4727 * c-lang.c: Likewise.
4728 * c-objc-common.c: Likewise.
4729 * c-parser.c: Likewise.
4730 * c-typeck.c: Likewise.
4731
e922069e
JW
47322015-10-26 Jim Wilson <jim.wilson@linaro.org>
4733
4734 PR debug/66068
4735 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
4736 after calling build_qualified_type.
4737
765dd391
CP
47382015-10-27 Cesar Philippidis <cesar@codesourcery.com>
4739 Thomas Schwinge <thomas@codesourcery.com>
4740 James Norris <jnorris@codesourcery.com>
4741 Joseph Myers <joseph@codesourcery.com>
4742 Julian Brown <julian@codesourcery.com>
4743 Bernd Schmidt <bschmidt@redhat.com>
4744
4745 * c-parser.c (c_parser_oacc_shape_clause): New.
4746 (c_parser_oacc_simple_clause): New.
4747 (c_parser_oacc_all_clauses): Add auto, gang, seq, vector, worker.
4748 (OACC_LOOP_CLAUSE_MASK): Add gang, worker, vector, auto, seq.
4749
88bae6f4
TS
47502015-10-27 Thomas Schwinge <thomas@codesourcery.com>
4751 James Norris <jnorris@codesourcery.com>
4752 Cesar Philippidis <cesar@codesourcery.com>
4753
4754 PR c/64765
4755 PR c/64880
4756 * c-parser.c (c_parser_oacc_loop): Add mask, cclauses formal
4757 parameters, and handle these. Adjust all users.
4758 (c_parser_oacc_kernels, c_parser_oacc_parallel): Merge functions
4759 into...
4760 (c_parser_oacc_kernels_parallel): ... this new function. Adjust
4761 all users.
4762 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels): Don't
4763 declare functions.
4764 (c_finish_omp_construct): Declare function.
4765 * c-typeck.c (c_finish_oacc_parallel, c_finish_oacc_kernels):
4766 Merge functions into...
4767 (c_finish_omp_construct): ... this new function.
4768
a8fc2579
RB
47692015-10-22 Richard Biener <rguenther@suse.de>
4770
4771 * c-typeck.c (c_finish_omp_clauses): Properly convert operands
4772 before folding a MINUS_EXPR.
4773
e9122ef6
MP
47742015-10-21 Marek Polacek <polacek@redhat.com>
4775
4776 PR c/68024
4777 * c-decl.c (start_function): Warn about vararg functions without
4778 a prototype.
4779
9f47c7e5
IE
47802015-10-21 Ilya Enkovich <enkovich.gnu@gmail.com>
4781
4782 * c-typeck.c (build_conditional_expr): Use boolean vector
4783 type for vector comparison.
4784 (build_vec_cmp): New.
4785 (build_binary_op): Use build_vec_cmp for comparison.
4786
fa60eeb9
MP
47872015-10-20 Marek Polacek <polacek@redhat.com>
4788
4789 * c-parser.c (is_cilkplus_vector_p): Don't define here.
4790
2c7020eb
MP
47912015-10-20 Marek Polacek <polacek@redhat.com>
4792
4793 PR c/67964
4794 * c-parser.c (c_parser_attributes): Break out of the loop if the
4795 token after an attribute isn't a comma.
4796
d9a6bd32
JJ
47972015-10-13 Jakub Jelinek <jakub@redhat.com>
4798 Aldy Hernandez <aldyh@redhat.com>
4799
4800 * c-parser.c (c_parser_pragma): Handle PRAGMA_OMP_ORDERED here.
4801 (c_parser_omp_clause_name): Handle OpenMP 4.5 clauses.
4802 (c_parser_omp_variable_list): Handle structure elements for
4803 map, to and from clauses. Handle array sections in reduction
4804 clause. Formatting fixes.
4805 (c_parser_omp_clause_if): Add IS_OMP argument, handle parsing of
4806 if clause modifiers.
4807 (c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
4808 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
4809 c_parser_omp_clause_defaultmap, c_parser_omp_clause_use_device_ptr,
4810 c_parser_omp_clause_is_device_ptr): New functions.
4811 (c_parser_omp_clause_ordered): Parse optional parameter.
4812 (c_parser_omp_clause_reduction): Handle array reductions.
4813 (c_parser_omp_clause_schedule): Parse optional simd modifier.
4814 (c_parser_omp_clause_nogroup, c_parser_omp_clause_orderedkind): New
4815 functions.
4816 (c_parser_omp_clause_linear): Parse linear clause modifiers.
4817 (c_parser_omp_clause_depend_sink): New function.
4818 (c_parser_omp_clause_depend): Parse source/sink depend kinds.
4819 (c_parser_omp_clause_map): Parse release/delete map kinds and
4820 optional always modifier.
4821 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_if
4822 and c_finish_omp_clauses callers.
4823 (c_parser_omp_all_clauses): Likewise. Parse OpenMP 4.5 clauses.
4824 Parse "to" as OMP_CLAUSE_TO_DECLARE if on declare target directive.
4825 (c_parser_oacc_cache): Adjust c_finish_omp_clauses caller.
4826 (OMP_CRITICAL_CLAUSE_MASK): Define.
4827 (c_parser_omp_critical): Parse critical clauses.
4828 (c_parser_omp_for_loop): Handle doacross loops, adjust
4829 c_finish_omp_for and c_finish_omp_clauses callers.
4830 (OMP_SIMD_CLAUSE_MASK): Add simdlen clause.
4831 (c_parser_omp_simd): Allow ordered clause if it has no parameter.
4832 (OMP_FOR_CLAUSE_MASK): Add linear clause.
4833 (c_parser_omp_for): Disallow ordered clause when combined with
4834 distribute. Disallow linear clause when combined with distribute
4835 and not combined with simd.
4836 (OMP_ORDERED_CLAUSE_MASK, OMP_ORDERED_DEPEND_CLAUSE_MASK): Define.
4837 (c_parser_omp_ordered): Add CONTEXT argument, remove LOC argument,
4838 parse clauses and if depend clause is found, don't parse a body.
4839 (c_parser_omp_parallel): Disallow copyin clause on target parallel.
4840 Allow target parallel without for after it.
4841 (OMP_TASK_CLAUSE_MASK): Add priority clause.
4842 (OMP_TARGET_DATA_CLAUSE_MASK): Add use_device_ptr clause.
4843 (c_parser_omp_target_data): Diagnose no map clauses or clauses with
4844 invalid kinds.
4845 (OMP_TARGET_UPDATE_CLAUSE_MASK): Add depend and nowait clauses.
4846 (OMP_TARGET_ENTER_DATA_CLAUSE_MASK,
4847 OMP_TARGET_EXIT_DATA_CLAUSE_MASK): Define.
4848 (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): New
4849 functions.
4850 (OMP_TARGET_CLAUSE_MASK): Add depend, nowait, private, firstprivate,
4851 defaultmap and is_device_ptr clauses.
4852 (c_parser_omp_target): Parse target parallel and target simd. Set
4853 OMP_TARGET_COMBINED on combined constructs. Parse target enter data
4854 and target exit data. Diagnose invalid map kinds.
4855 (OMP_DECLARE_TARGET_CLAUSE_MASK): Define.
4856 (c_parser_omp_declare_target): Parse OpenMP 4.5 forms of this
4857 construct.
4858 (c_parser_omp_declare_reduction): Use STRIP_NOPS when checking for
4859 &omp_priv.
4860 (OMP_TASKLOOP_CLAUSE_MASK): Define.
4861 (c_parser_omp_taskloop): New function.
4862 (c_parser_omp_construct): Don't handle PRAGMA_OMP_ORDERED here,
4863 handle PRAGMA_OMP_TASKLOOP.
4864 (c_parser_cilk_for): Adjust c_finish_omp_clauses callers.
4865 * c-tree.h (c_finish_omp_clauses): Add two new arguments.
4866 * c-typeck.c (handle_omp_array_sections_1): Fix comment typo.
4867 Add IS_OMP argument, handle structure element bases, diagnose
4868 bitfields, pass IS_OMP recursively, diagnose known zero length
4869 array sections in depend clauses, handle array sections in reduction
4870 clause, diagnose negative length even for pointers.
4871 (handle_omp_array_sections): Add IS_OMP argument, use auto_vec for
4872 types, pass IS_OMP down to handle_omp_array_sections_1, handle
4873 array sections in reduction clause, set
4874 OMP_CLAUSE_MAP_MAYBE_ZERO_LENGTH_ARRAY_SECTION if map could be zero
4875 length array section, use GOMP_MAP_FIRSTPRIVATE_POINTER for IS_OMP.
4876 (c_finish_omp_clauses): Add IS_OMP and DECLARE_SIMD arguments.
4877 Handle new OpenMP 4.5 clauses and new restrictions for the old ones.
4878
21ba0cea
MP
48792015-10-06 Marek Polacek <polacek@redhat.com>
4880
4881 * c-parser.c (c_parser_statement_after_labels): Use
4882 protected_set_expr_location.
4883 (c_parser_omp_clause_num_gangs): Likewise.
4884 (c_parser_omp_clause_num_threads): Likewise.
4885 (c_parser_omp_clause_num_workers): Likewise.
4886 (c_parser_omp_clause_vector_length): Likewise.
4887 (c_parser_omp_clause_num_teams): Likewise.
4888 (c_parser_omp_clause_thread_limit): Likewise.
4889 * c-typeck.c (build_c_cast): Likewise.
4890 (c_cast_expr): Likewise.
4891
624d31fe
RS
48922015-10-05 Richard Sandiford <richard.sandiford@arm.com>
4893
4894 * c-typeck.c (c_tree_equal): Use real_equal instead of
4895 REAL_VALUES_EQUAL.
4896
b8fd7909
JM
48972015-10-04 Jason Merrill <jason@redhat.com>
4898
4899 * c-parser.c (c_lex_one_token): Handle @synchronized.
4900 * c-decl.c (match_builtin_function_types): A declaration of a built-in
4901 can change whether the function is transaction_safe.
4902
1c7485af
MP
49032015-10-02 Marek Polacek <polacek@redhat.com>
4904
4905 PR c/67730
4906 * c-typeck.c (convert_for_assignment): Use the expansion point
4907 location throughout.
4908
3e3b8d63
MP
49092015-10-02 Marek Polacek <polacek@redhat.com>
4910
4911 PR c/64249
4912 * c-parser.c (c_parser_statement_after_labels): Add CHAIN parameter
4913 and pass it down to c_parser_if_statement.
4914 (c_parser_else_body): Add CHAIN parameter and pass it down to
4915 c_parser_statement_after_labels.
4916 (c_parser_if_statement): Add CHAIN parameter. Add code to warn about
4917 duplicated if-else-if conditions.
4918
aabef2de
MP
49192015-10-01 Marek Polacek <polacek@redhat.com>
4920
4921 * c-typeck.c (convert_for_assignment): Improve commentary.
4922
de8ddd5f
MP
49232015-09-30 Marek Polacek <polacek@redhat.com>
4924
4925 PR c/67730
4926 * c-typeck.c (c_finish_return): Use the expansion point location for
4927 certain "return with value" warnings.
4928
c4914de6
MLI
49292015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
4930
4931 * c-parser.c (pragma_lex): Add loc argument.
4932
0e36f5c7
MP
49332015-09-15 Marek Polacek <polacek@redhat.com>
4934
4935 PR c/67580
4936 * c-decl.c (tag_exists_p): New function.
4937 * c-parser.c (c_parser_declaration_or_fndef): Give a hint when
4938 struct/union/enum keywords are missing.
4939 * c-tree.h (tag_exists_p): Declare.
4940
2f3bb934
MP
49412015-09-15 Marek Polacek <polacek@redhat.com>
4942
4943 * c-decl.c (lookup_label): Return NULL_TREE instead of 0.
4944 (lookup_tag): Change the type of THISLEVEL_ONLY to bool.
4945 Return NULL_TREE instead of 0.
4946 (lookup_name): Return NULL_TREE instead of 0.
4947 (lookup_name_in_scope): Likewise.
4948 (shadow_tag_warned): Use true instead of 1 and NULL_TREE instead of 0.
4949 (parser_xref_tag): Use false instead of 0.
4950 (start_struct): Use true instead of 1.
4951 (start_enum): Use true instead of 1 and NULL_TREE instead of 0.
4952
aa256c4a
MP
49532015-09-14 Marek Polacek <polacek@redhat.com>
4954
4955 * c-typeck.c (set_nonincremental_init_from_string): Use
4956 HOST_WIDE_INT_M1U when shifting a negative value.
4957
dbb68221
MW
49582015-09-09 Mark Wielaard <mjw@redhat.com>
4959
4960 * c-typeck.c (build_binary_op): Check and warn when nonnull arg
4961 parm against NULL.
4962
a8a098ac
JJ
49632015-09-10 Jakub Jelinek <jakub@redhat.com>
4964
4965 PR c/67502
4966 * c-parser.c (c_parser_omp_for_loop): Emit DECL_EXPR stmts
4967 into OMP_FOR_PRE_BODY rather than before the loop.
4968
f4b189d5
JJ
49692015-09-09 Jakub Jelinek <jakub@redhat.com>
4970
0bb99c11
JJ
4971 PR c/67501
4972 * c-parser.c (c_parser_oacc_all_clauses,
4973 c_parser_omp_all_clauses): Remove invalid clause from
4974 list of clauses even if parser->error is set.
4975
fce5e5e3
JJ
4976 PR c/67500
4977 * c-parser.c (c_parser_omp_clause_aligned,
4978 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen): Fix up
4979 test for errors.
4980 * c-decl.c (temp_pop_parm_decls): Allow b->decl equal to
4981 error_mark_node.
4982
f4b189d5
JJ
4983 PR c/67495
4984 * c-parser.c (c_parser_omp_atomic): Use c_parser_cast_expression
4985 instead of c_parser_unary_expression. If the result is !lvalue_p,
4986 wrap the result of c_fully_fold into NON_LVALUE_EXPR.
4987
b2aaf235
MP
49882015-09-04 Marek Polacek <polacek@redhat.com>
4989
4990 PR sanitizer/67279
4991 * c-typeck.c (build_binary_op): Don't instrument static initializers.
4992
1807ffc1
MS
49932015-09-03 Martin Sebor <msebor@redhat.com>
4994
4995 PR c/66516
8b652e65
JJ
4996 * c-typeck.c (convert_arguments, parser_build_unary_op,
4997 build_conditional_expr, c_cast_expr, convert_for_assignment,
4998 build_binary_op, _objc_common_truthvalue_conversion): Call
1807ffc1
MS
4999 reject_gcc_builtin.
5000 (c_decl_implicit): Define.
5001
d04ff417
MP
50022015-09-02 Marek Polacek <polacek@redhat.com>
5003
5004 PR c/67432
5005 * c-parser.c (c_parser_enum_specifier): Give a better error for
5006 an empty enum.
5007
a79683d5
TS
50082015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
5009
5010 * c-aux-info.c, c-parser.c, c-tree.h: Remove useless typedefs.
5011
191a6b94
MP
50122015-08-12 Marek Polacek <polacek@redhat.com>
5013
5014 * c-decl.c (grokdeclarator): Call error_at instead of error and pass
5015 LOC to it.
5016
420a9d9b
MP
50172015-08-03 Marek Polacek <polacek@redhat.com>
5018
5019 PR c/67088
5020 * c-decl.c (check_bitfield_type_and_width): Add location parameter.
5021 Use it.
5022 (grokdeclarator): Pass LOC down to check_bitfield_type_and_width.
5023
992118a1
PP
50242015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
5025
5026 * c-parser.c (c_parser_if_body): Take token_indent_info
5027 argument. Call warn_for_misleading_indentation even when the
5028 body is a semicolon. Extract token_indent_infos corresponding
5029 to the guard, body and next tokens. Adjust call to
5030 warn_for_misleading_indentation accordingly.
5031 (c_parser_else_body): Likewise.
5032 (c_parser_if_statement): Likewise.
5033 (c_parser_while_statement): Likewise.
5034 (c_parser_for_statement): Likewise.
5035
46308474
LFSM
50362015-07-28 Luis Felipe Strano Moraes <luis.strano@gmail.com>
5037 Manuel López-Ibáñez <manu@gcc.gnu.org>
5038
5039 * c-decl.c (get_parm_info): Remove static var. Update warning
5040 message.
5041
05b28fd6
MP
50422015-07-27 Marek Polacek <polacek@redhat.com>
5043
5044 PR c++/66555
5045 PR c/54979
5046 * c-typeck.c (parser_build_binary_op): Call warn_tautological_cmp.
5047
451b5e48
MP
50482015-07-20 Marek Polacek <polacek@redhat.com>
5049
5050 PR c++/55095
5051 * c-typeck.c (digest_init): Pass OPT_Wpedantic to pedwarn_init.
5052 (build_binary_op): Warn about left shift overflows.
5053
1916bcb5
AM
50542015-07-09 Andrew MacLeod <amacleod@redhat.com>
5055
5056 * c-array-notation.c: Adjust includes for flags.h changes.
5057 * c-objc-common.c: Likewise.
5058
c7131fb2
AM
50592015-07-07 Andrew MacLeod <amacleod@redhat.com>
5060
5061 * c-array-notation.c: Adjust includes.
5062 * c-aux-info.c: Likewise.
5063 * c-convert.c: Likewise.
5064 * c-decl.c: Likewise.
5065 * c-errors.c: Likewise.
5066 * c-lang.c: Likewise.
5067 * c-objc-common.c: Likewise.
5068 * c-parser.c: Likewise.
5069 * c-typeck.c: Likewise.
5070
da2e71c9
MLI
50712015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
5072
5073 PR fortran/66605
5074 * c-decl.c (finish_function): Call do_warn_unused_parameter.
5075
b155cfd9
MP
50762015-06-29 Marek Polacek <polacek@redhat.com>
5077
5078 PR c/66322
5079 * c-typeck.c (struct c_switch): Add BOOL_COND_P and OUTSIDE_RANGE_P.
5080 (c_start_case): Set BOOL_COND_P and OUTSIDE_RANGE_P. Don't warn
5081 about -Wswitch-bool here.
5082 (do_case): Update c_add_case_label call.
5083 (c_finish_case): Update c_do_switch_warnings call.
5084
31521951
MP
50852015-06-27 Marek Polacek <polacek@redhat.com>
5086
5087 * c-typeck.c: Use VECTOR_TYPE_P throughout.
5088
22d03525
MP
50892015-06-26 Marek Polacek <polacek@redhat.com>
5090
5091 * c-array-notation.c (fix_builtin_array_notation_fn): Use
5092 INDIRECT_REF_P.
5093 * c-typeck.c (array_to_pointer_conversion): Likewise.
5094 (build_unary_op): Likewise.
5095 (c_finish_return): Likewise.
5096
f0889939
AM
50972015-06-25 Andrew MacLeod <amacleod@redhat.com>
5098
5099 * c-decl.c: Remove ipa-ref.h and plugin-api.h from include list.
5100 * c-parser.c: Likewise.
5101
8d67ee55
RS
51022015-06-25 Richard Sandiford <richard.sandiford@arm.com>
5103
5104 * c-decl.c (detect_field_duplicates_hash): Use nofree_ptr_hash
5105 instead of pointer_hash.
5106 (detect_field_duplicates): Likewise.
5107
0ae9bd27
MP
51082015-06-25 Marek Polacek <polacek@redhat.com>
5109
5110 * c-array-notation.c: Use VAR_P throughout.
5111 * c-decl.c: Likewise.
5112 * c-objc-common.c: Likewise.
5113 * c-parser.c: Likewise.
5114 * c-typeck.c: Likewise.
5115
62f9079a
MP
51162015-06-25 Marek Polacek <polacek@redhat.com>
5117
5118 * c-decl.c: Use is_global_var throughout.
5119 * c-parser.c: Likewise.
5120 * c-typeck.c: Likewise.
5121
abb226c9
AM
51222015-06-17 Andrew MacLeod <amacleod@redhat.com>
5123
5124 * c-array-notation.c: Do not include input.h, line-map.h or is-a.h.
5125 * c-aux-info.c: Likewise.
5126 * c-convert.c: Likewise.
5127 * c-decl.c: Likewise.
5128 * c-errors.c: Likewise.
5129 * c-lang.c: Likewise.
5130 * c-objc-common.c: Likewise.
5131 * c-parser.c: Likewise.
5132 * c-typeck.c: Likewise.
5133
8cbababc
JH
51342015-06-11 Jan Hubicka <hubicka@ucw.cz>
5135
5136 PR middle-end/66325
5137 * c-decl.c (start_enum): Set TYPE_PACKED consistently among type
5138 variants.
5139
a0349665
PMR
51402015-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
5141
5142 * c-decl.c (pop_scope): Register the main translation unit
5143 through the new debug hook.
5144
13fdf2e2
AM
51452015-06-08 Andrew MacLeod <amacleod@redhat.com>
5146
5147 * c-array-notation.c : Adjust include files.
5148 * c-aux-info.c : Likewise.
5149 * c-convert.c : Likewise.
5150 * c-decl.c : Likewise.
5151 * c-errors.c : Likewise.
5152 * c-lang.c : Likewise.
5153 * c-lang.h : Likewise.
5154 * c-objc-common.c : Likewise.
5155 * c-parser.c : Likewise.
5156 * c-typeck.c : Likewise.
5157
d7438551
AH
51582015-06-05 Aldy Hernandez <aldyh@redhat.com>
5159
5160 * c-decl.c (finish_struct): Save C_TYPE_INCOMPLETE_VARS and
5161 immediately clobber it.
5162 (c_write_global_declarations_1): Remove call to
5163 check_global_declaration_1.
5164 (c_write_global_declarations_2): Remove.
5165 (c_write_final_cleanups): Rename from c_write_global_declarations.
5166 Remove call to finalize_compilation_unit.
5167 Remove calls to debugging hooks.
5168 * c-objc-common.c: Adjust comment for c_warn_unused_global_decl.
5169 * c-objc-common.h: Remove LANG_HOOKS_WRITE_GLOBALS.
5170 * c-tree.h: Remove c_write_global_declarations.
5171
ecb9f223
AM
51722015-06-04 Andrew MacLeod <amacleod@redhat.com>
5173
5174 * c-array-notation.c: Adjust includes for restructured coretypes.h.
5175 * c-aux-info.c: Likewise.
5176 * c-convert.c: Likewise.
5177 * c-decl.c: Likewise.
5178 * c-errors.c: Likewise.
5179 * c-lang.c: Likewise.
5180 * c-objc-common.c: Likewise.
5181 * c-parser.c: Likewise.
5182 * c-typeck.c: Likewise.
5183
9482b620
MP
51842015-06-04 Marek Polacek <polacek@redhat.com>
5185
5186 PR c/66341
5187 * c-typeck.c (build_c_cast): Wrap VALUE into NON_LVALUE_EXPR if
5188 it is a lvalue.
5189
bc51ace3
PK
51902015-06-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
5191
5192 * c-decl.c (warn_cxx_compat_finish_struct): New parameters code, record_loc.
5193 Warn for empty struct.
5194 (finish_struct): Pass TREE_CODE(t) and loc to warn_cxx_compat_finish_struct.
5195
ea5b45b6
AT
51962015-06-02 Andres Tiraboschi <andres.tiraboschi@tallertechnologies.com>
5197
5198 * c-decl.c (start_function): Call plugin before parsing.
5199 (finish_function): Call plugin after parsing.
5200
c2d47482
PK
52012015-06-02 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
5202
5203 PR c/49551
5204 * c-decl.c (merge_decls): Merge DECL_COMMON.
5205
a95492ab
JW
52062015-05-22 Jim Wilson <jim.wilson@linaro.org>
5207
5208 * Make-lang.in (check_gcc_pallelize): Define.
5209
fd5c817a
MP
52102015-05-22 Marek Polacek <polacek@redhat.com>
5211
5212 PR c/47043
5213 * c-parser.c (c_parser_enum_specifier): Parse and apply enumerator
5214 attributes.
5215
c7b70a3c
MP
52162015-05-21 Marek Polacek <polacek@redhat.com>
5217
5218 * c-typeck.c (inform_declaration): Use DECL_IS_BUILTIN instead of
5219 DECL_BUILT_IN.
5220
21b634ae
MP
52212015-05-20 Marek Polacek <polacek@redhat.com>
5222
5223 * c-decl.c: Use VAR_OR_FUNCTION_DECL_P throughout.
5224 * c-typeck.c: Likewise.
5225
296a8c2f
MP
52262015-05-19 Marek Polacek <polacek@redhat.com>
5227
5228 * c-typeck.c (start_init): Use AGGREGATE_TYPE_P.
5229
41b37d5e
JJ
52302015-05-19 Jakub Jelinek <jakub@redhat.com>
5231
5232 PR middle-end/66199
5233 * c-parser.c (c_parser_omp_for_loop): Don't add
5234 OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
5235 OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
5236 (c_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
5237 constructs.
5238
fab27f52
MM
52392015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
5240
5241 * c-typeck.c (build_array_ref): Use std::swap instead of explicit
296a8c2f 5242 swaps.
fab27f52 5243
40de31cf
MLI
52442015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
5245
5246 PR fortran/44054
5247 * c-objc-common.c (c_tree_printer): Replace locus pointer with
5248 accessor function.
5249
3aa3c9fc
MP
52502015-05-14 Marek Polacek <polacek@redhat.com>
5251
5252 PR c/66066
5253 PR c/66127
5254 * c-typeck.c (digest_init): Call pedwarn_init with OPT_Wpedantic
5255 rather than with 0.
5256
c3388e62
DM
52572015-05-12 David Malcolm <dmalcolm@redhat.com>
5258
5259 * c-parser.c (c_parser_if_body): Add param "if_loc", use it
5260 to add a call to warn_for_misleading_indentation.
5261 (c_parser_else_body): Likewise, adding param "else_loc".
5262 (c_parser_if_statement): Check for misleading indentation.
5263 (c_parser_while_statement): Likewise.
5264 (c_parser_for_statement): Likewise.
5265
755e528f
MP
52662015-05-08 Marek Polacek <polacek@redhat.com>
5267
5268 PR c/64918
5269 * c-typeck.c (add_pending_init): Use OPT_Woverride_init_side_effects.
5270 (output_init_element): Likewise.
5271
0173bd2a
MP
52722015-05-07 Marek Polacek <polacek@redhat.com>
5273
5274 PR c/65179
5275 * c-typeck.c (build_binary_op): Warn when left shifting a negative
5276 value.
5277
9babc352
MP
52782015-04-30 Marek Polacek <polacek@redhat.com>
5279
5280 * c-typeck.c (set_init_label): Call error_at instead of error and
5281 pass LOC to it.
5282
ac9f18db
MP
5283 * c-typeck.c (c_incomplete_type_error): Refactor to use %qT. Print
5284 the type of a decl.
5285
ec3fba51
MP
5286 * c-typeck.c (c_build_va_arg): Clarify the error message.
5287
b811915d
TS
52882015-04-29 Thomas Schwinge <thomas@codesourcery.com>
5289
5290 * c-parser.c (c_parser_oacc_enter_exit_data): Use
5291 OMP_STANDALONE_CLAUSES.
5292
f3075008
MP
52932015-04-28 Marek Polacek <polacek@redhat.com>
5294
5295 * c-parser.c (c_parser_binary_expression): Remove duplicate line.
5296
4e81b788
MP
52972015-04-28 Marek Polacek <polacek@redhat.com>
5298
5299 PR c/65901
5300 * c-typeck.c (c_build_va_arg): Require TYPE be a complete type.
5301
6c1db78e
MP
53022015-04-25 Marek Polacek <polacek@redhat.com>
5303
5304 PR c/52085
5305 * c-decl.c (finish_enum): Copy over TYPE_ALIGN. Also check for "mode"
5306 attribute.
5307
5c4abbb8
MP
53082015-04-23 Marek Polacek <polacek@redhat.com>
5309
5310 PR c/65345
5311 * c-decl.c (set_labels_context_r): New function.
5312 (store_parm_decls): Call it via walk_tree_without_duplicates.
5313 * c-typeck.c (convert_lvalue_to_rvalue): Use create_tmp_var_raw
5314 instead of create_tmp_var. Build TARGET_EXPR instead of
5315 COMPOUND_EXPR.
5316 (build_atomic_assign): Use create_tmp_var_raw instead of
5317 create_tmp_var. Build TARGET_EXPRs instead of MODIFY_EXPR.
5318
06aca1d5
IV
53192015-04-20 Ilya Verbin <ilya.verbin@intel.com>
5320
5321 * c-parser.c (c_parser_oacc_enter_exit_data): Remove excess semicolon.
5322 (c_parser_omp_target_update): Add missed %> to error_at ().
5323
8fba1830
BRF
53242015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
5325
5326 PR target/55143
5327 * c-decl.c (c_default_pointer_mode): Remove definition.
5328 * c-tree.h (c_default_pointer_mode): Remove declaration.
5329
62021f64
TB
53302015-03-27 Tobias Burnus <burnus@net-b.de>
5331
5332 PR c/65586
5333 * c-parser.c (c_parser_skip_to_pragma_eol): Optionally, don't
5334 error out.
5335 (c_parser_omp_for, c_parser_omp_parallel, c_parser_omp_distribute,
5336 c_parser_omp_teams, c_parser_omp_target, c_parser_omp_declare):
5337 Update calls to not error for skipped omp pragmas with -fopenmp-simd.
5338
9b65e171
JJ
53392015-03-19 Jakub Jelinek <jakub@redhat.com>
5340
5341 * c-decl.c (c_decl_attributes): Also add "omp declare target"
5342 attribute for DECL_EXTERNAL VAR_DECLs.
5343
17958621
JJ
53442015-03-11 Jakub Jelinek <jakub@redhat.com>
5345
5346 * c-parser.c (c_parse_init): Don't call xstrdup on get_identifier
5347 argument.
5348
7ccb1a11
JJ
53492015-03-10 Jakub Jelinek <jakub@redhat.com>
5350
5351 PR c/65120
5352 * c-typeck.c (parser_build_binary_op): Check for tcc_comparison
5353 before preparing arguments to warn_logical_not_parentheses.
5354
01177669
JJ
53552015-03-09 Jakub Jelinek <jakub@redhat.com>
5356
5357 PR c/65120
5358 * c-typeck.c (parser_build_binary_op): Don't warn for
5359 !!x == y or !b == y where b is _Bool.
5360
802ac282
MP
53612015-03-09 Marek Polacek <polacek@redhat.com>
5362
5363 * c-convert.c (convert): Make use of do_ubsan_in_current_function.
5364 * c-decl.c (grokdeclarator): Likewise.
5365 * c-typeck.c (build_binary_op): Likewise.
5366
e5165b60
MP
53672015-02-27 Marek Polacek <polacek@redhat.com>
5368
5369 PR c/65228
5370 * c-decl.c (start_decl): Return NULL_TREE if decl is an error node.
5371
065d214c
MP
53722015-02-14 Marek Polacek <polacek@redhat.com>
5373
5374 PR c/64768
5375 * c-decl.c (grokdeclarator): Set the range of a flexible array member
5376 declared through a typedef name.
5377
e5d9235b
MP
53782015-02-13 Marek Polacek <polacek@redhat.com>
5379
5380 PR c/65050
5381 * c-decl.c (grokdeclarator): Print also the type when giving
5382 the error message about array's incomplete element type.
5383
fa01ffcc
JJ
53842015-02-11 Jakub Jelinek <jakub@redhat.com>
5385
5386 PR c/64824
5387 * c-parser.c (c_parser_binary_expression): Fix OpenMP stack[sp].prec
5388 check in the POP macro.
5389
c3e38a03
MP
53902015-02-09 Marek Polacek <polacek@redhat.com>
5391
5392 PR c/64856
5393 * c-typeck.c (process_init_element): Don't always wrap
5394 COMPOUND_LITERAL_EXPR in a SAVE_EXPR in C99 mode when
5395 initializing a range of elements.
5396
4886ec8e
JJ
53972015-02-04 Jakub Jelinek <jakub@redhat.com>
5398
5399 PR c/64824
5400 PR c/64868
5401 * c-parser.c (c_parser_omp_atomic): Handle RDIV_EXPR.
5402
c3e38a03 54032015-02-02 Bruno Loff <bruno.loff@gmail.com>
a4bb6959
BL
5404
5405 * c-parser.c (c_parser_declspecs): Call invoke_plugin_callbacks after
5406 processing enum declaration.
5407
7b33f0c8
MP
54082015-01-29 Marek Polacek <polacek@redhat.com>
5409
5410 PR c/64709
5411 * c-typeck.c (pop_init_level): If constructor_elements has
5412 exactly one element with integer_zerop value, set constructor_zeroinit
5413 to 1. Remove braces around warning_init call.
5414
dea63e49
JJ
54152015-01-27 Jakub Jelinek <jakub@redhat.com>
5416
5417 PR c/64766
5418 * c-typeck.c (store_init_value): Don't overwrite DECL_INITIAL
5419 of FUNCTION_DECLs with error_mark_node.
5420
d38f7dce
JJ
54212015-01-26 Jakub Jelinek <jakub@redhat.com>
5422
5423 PR c/64778
5424 * c-typeck.c (convert_arguments): Return -1 if there are
5425 error_args, even if we've diagnosed too many arguments.
5426
cbf5d0e7
RB
54272015-01-21 Richard Biener <rguenther@suse.de>
5428
5429 PR middle-end/64313
5430 * c-decl.c (merge_decls): Call set_builtin_decl_declared_p
5431 for builtins the user declared correctly.
5432
41dbbb37
TS
54332015-01-15 Thomas Schwinge <thomas@codesourcery.com>
5434 Bernd Schmidt <bernds@codesourcery.com>
5435 Cesar Philippidis <cesar@codesourcery.com>
5436 James Norris <jnorris@codesourcery.com>
5437 Jakub Jelinek <jakub@redhat.com>
5438 Ilmir Usmanov <i.usmanov@samsung.com>
5439
5440 * c-parser.c: Include "gomp-constants.h".
5441 (c_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
5442 omp_clause_map_kind. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
5443 Use OMP_CLAUSE_SET_MAP_KIND.
5444 (c_parser_pragma): Handle PRAGMA_OACC_ENTER_DATA,
5445 PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_UPDATE.
5446 (c_parser_omp_construct): Handle PRAGMA_OACC_CACHE,
5447 PRAGMA_OACC_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP,
5448 PRAGMA_OACC_PARALLEL, PRAGMA_OACC_WAIT.
5449 (c_parser_omp_clause_name): Handle "auto", "async", "copy",
5450 "copyout", "create", "delete", "deviceptr", "gang", "host",
5451 "num_gangs", "num_workers", "present", "present_or_copy", "pcopy",
5452 "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
5453 "present_or_create", "pcreate", "seq", "self", "vector",
5454 "vector_length", "wait", "worker".
5455 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
5456 (OACC_ENTER_DATA_CLAUSE_MASK, OACC_EXIT_DATA_CLAUSE_MASK)
5457 (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
5458 (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
5459 (c_parser_omp_variable_list): Handle OMP_CLAUSE__CACHE_.
5460 (c_parser_oacc_wait_list, c_parser_oacc_data_clause)
5461 (c_parser_oacc_data_clause_deviceptr)
5462 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_workers)
5463 (c_parser_oacc_clause_async, c_parser_oacc_clause_wait)
5464 (c_parser_omp_clause_vector_length, c_parser_oacc_all_clauses)
5465 (c_parser_oacc_cache, c_parser_oacc_data, c_parser_oacc_kernels)
5466 (c_parser_oacc_enter_exit_data, c_parser_oacc_loop)
5467 (c_parser_oacc_parallel, c_parser_oacc_update)
5468 (c_parser_oacc_wait): New functions.
5469 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels)
5470 (c_finish_oacc_data): New prototypes.
5471 * c-typeck.c: Include "gomp-constants.h".
5472 (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR. Use
5473 GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use
5474 OMP_CLAUSE_SET_MAP_KIND.
5475 (c_finish_oacc_parallel, c_finish_oacc_kernels)
5476 (c_finish_oacc_data): New functions.
5477 (c_finish_omp_clauses): Handle OMP_CLAUSE__CACHE_,
5478 OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS,
5479 OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_ASYNC, OMP_CLAUSE_WAIT,
5480 OMP_CLAUSE_AUTO, OMP_CLAUSE_SEQ, OMP_CLAUSE_GANG,
5481 OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR, and OMP_CLAUSE_MAP's
5482 GOMP_MAP_FORCE_DEVICEPTR.
5483
adfac8df
JJ
54842015-01-09 Michael Collison <michael.collison@linaro.org>
5485
5486 * c-array-notation.c: Include hash-set.h, machmode.h,
5487 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
5488 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
5489 * c-aux-info.c: Ditto.
5490 * c-convert.c: Ditto.
5491 * c-decl.c: Ditto.
5492 * c-errors.c: Ditto.
5493 * c-lang.c: Dittoxs.
5494 * c-objc-common.c: Ditto.
5495 * c-parser.c: Ditto.
5496 * c-typeck.c: Include hash-set.h, machmode.h,
5497 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
5498 fold-const.h, wide-int.h, inchash.h, real.h and
5499 fixed-value.h due to flattening of tree.h.
5500
2cc901dc
MP
55012015-01-07 Marek Polacek <polacek@redhat.com>
5502
5503 PR c/64417
5504 * c-typeck.c (process_init_element): Disallow initialization of
5505 a flexible array member with a string constant if the structure
5506 is in an array.
5507
5624e564
JJ
55082015-01-05 Jakub Jelinek <jakub@redhat.com>
5509
e5341100
JJ
5510 PR sanitizer/64344
5511 * c-typeck.c (convert_for_assignment, c_finish_return): For
5512 -fsanitize=float-cast-overflow casts from REAL_TYPE to integer/enum
5513 types also set in_late_binary_op around convert call.
5514 * c-convert.c (convert): For -fsanitize=float-cast-overflow REAL_TYPE
5515 to integral type casts, if not in_late_binary_op, pass c_fully_fold
5516 result on expr as last argument to ubsan_instrument_float_cast,
5517 if in_late_binary_op, don't use c_save_expr but save_expr.
5518
5624e564
JJ
5519 Update copyright years.
5520
5bd012f8
MP
55212015-01-05 Marek Polacek <polacek@redhat.com>
5522
5523 PR c/64423
5524 * c-typeck.c (build_array_ref): Pass loc down to
5525 warn_array_subscript_with_type_char.
5526
3f8257db 55272014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
768952be
MU
5528
5529 * c-typeck.c: New behavious for pointers to arrays with qualifiers
8e745a17 5530 (common-pointer-type): For pointers to arrays take qualifiers from
768952be 5531 element type.
8e745a17 5532 (build_conditional_expr): Add warnings for lost qualifiers.
768952be 5533 (comp-target-types): Allow pointers to arrays with different qualifiers.
8e745a17 5534 (convert-for-assignment): Adapt warnings for discarded qualifiers. Add
768952be 5535 WARNING_FOR_QUALIFIERS macro and rename WARN_FOR_QUALIFIERS
8e745a17 5536 to PEDWARN_FOR_QUALIFIERS.
768952be 5537
8f94a8c4
JJ
55382014-12-17 Jakub Jelinek <jakub@redhat.com>
5539
5540 PR sanitizer/64289
5541 * c-convert.c: Include ubsan.h.
5542 (convert): For real -> integral casts and
5543 -fsanitize=float-cast-overflow don't call convert_to_integer, but
5544 instead instrument the float cast directly.
5545
b731b390
JJ
55462014-11-29 Jakub Jelinek <jakub@redhat.com>
5547
5548 * c-typeck.c (convert_lvalue_to_rvalue, build_atomic_assign,
5549 c_finish_stmt_expr): Remove NULL last argument from
5550 create_tmp_var_raw and create_tmp_var calls.
5551 * c-array-notation.c (fix_builtin_array_notation_fn,
5552 build_array_notation_expr, fix_conditional_array_notations_1,
5553 fix_array_notation_expr, fix_array_notation_call_expr): Likewise.
5554
541e35a6
MP
55552014-11-28 Marek Polacek <polacek@redhat.com>
5556
5557 PR c/63862
5558 * c-typeck.c (build_binary_op) <RSHIFT_EXPR, LSHIFT_EXPR>: Don't
5559 convert the right operand to integer type.
5560
b286be94
MP
55612014-11-25 Marek Polacek <polacek@redhat.com>
5562
5563 PR c/63877
5564 * c-decl.c (start_function): Disable -Wmissing-declarations warning
5565 for inline functions.
5566
aa7da51a
JJ
55672014-11-21 Jakub Jelinek <jakub@redhat.com>
5568
5569 PR target/63764
5570 * c-typeck.c (build_array_ref): Adjust
5571 convert_vector_to_pointer_for_subscript caller. If it returns true,
5572 call non_lvalue_loc on the result.
5573
d876207f
RB
55742014-11-11 Richard Biener <rguenther@suse.de>
5575
5576 * c-decl.c (c_init_decl_processing): Do not set pedantic_lvalues
5577 to true.
5578
e5e44252
AK
55792014-11-10 Andi Kleen <ak@linux.intel.com>
5580
5581 PR c/60804
5582 * c-parser.c (c_parser_statement_after_labels): Call
5583 check_no_cilk.
5584 (c_parser_if_statement): Dito.
5585 (c_parser_switch_statement): Dito.
5586 (c_parser_while_statement): Dito.
5587 (c_parser_do_statement): Dito.
5588 (c_parser_for_statement): Dito.
5589 * c-typeck.c (c_finish_loop): Dito.
5590
13c21655
PC
55912014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
5592
5593 * c-typeck.c (build_binary_op): Use OPT_Wshift_count_negative and
5594 OPT_Wshift_count_overflow in the warnings.
5595
2d51fcef
MP
55962014-10-30 Marek Polacek <polacek@redhat.com>
5597
5598 * c-objc-common.c (c_tree_printer) <case 'T'>: For a typedef name,
5599 print the stripped version as well, if they're not the same.
5600
ef4bddc2
RS
56012014-10-29 Richard Sandiford <richard.sandiford@arm.com>
5602
5603 * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from
5604 machine_mode.
5605
c582198b
AM
56062014-10-28 Andrew MacLeod <amacleod@redhat.com>
5607
5608 * c-decl.c: Adjust include files.
5609 * c-parser.c: Ditto.
5610
ddc8de03
PM
56112014-10-27 Phil Muldoon <pmuldoon@redhat.com>
5612 Tom Tromey <tromey@redhat.com>
5613
5614 * c-tree.h (enum c_oracle_request): New.
5615 (c_binding_oracle_function): New typedef.
5616 (c_binding_oracle, c_pushtag, c_bind): Declare.
5617 * c-decl.c (c_binding_oracle): New global.
5618 (I_SYMBOL_CHECKED): New macro.
5619 (i_symbol_binding): New function.
5620 (I_SYMBOL_BINDING, I_SYMBOL_DECL): Redefine.
5621 (I_TAG_CHECKED): New macro.
5622 (i_tag_binding): New function.
5623 (I_TAG_BINDING, I_TAG_DECL): Redefine.
5624 (I_LABEL_CHECKED): New macro.
5625 (i_label_binding): New function.
5626 (I_LABEL_BINDING, I_LABEL_DECL): Redefine.
5627 (c_print_identifier): Save and restore c_binding_oracle.
5628 (c_pushtag, c_bind): New functions.
5629
60393bbc
AM
56302014-10-27 Andrew MacLeod <amacleod@redhat.com>
5631
5632 * c-typeck.c: Adjust include files.
5633
d723bb7c
MLI
56342014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
5635
5636 PR c++/53061
5637 * c-objc-common.c (c_objc_common_init): Do not do diagnostics
5638 initialization here...
5639 (c_initialize_diagnostics): ... but here. Set defaults after
5640 building pretty-printer.
5641
1bc5a451
MP
56422014-10-23 Marek Polacek <polacek@redhat.com>
5643
5644 PR c/63626
5645 * c-decl.c (pop_scope): Don't print warning in external_scope.
5646
4435bb92
MP
56472014-10-19 Marek Polacek <polacek@redhat.com>
5648
5649 PR c/63567
5650 * c-typeck.c (output_init_element): Allow initializing objects with
5651 static storage duration with compound literals even in C99 and add
5652 pedwarn for it.
5653
7278465e
MP
56542014-10-17 Marek Polacek <polacek@redhat.com>
5655
5656 PR c/63567
5657 * c-typeck.c (digest_init): Allow initializing objects with static
5658 storage duration with compound literals even in C99 and add pedwarn
5659 for it.
5660
d9b7be2e
MP
56612014-10-17 Marek Polacek <polacek@redhat.com>
5662
5663 PR c/63543
5664 * c-tree.h (C_TYPE_ERROR_REPORTED): Define.
5665 * c-typeck.c (build_indirect_ref): Don't print the "dereferencing..."
5666 error multiple times. Print the type.
5667
f406ae1f
MP
56682014-10-17 Marek Polacek <polacek@redhat.com>
5669
5670 PR c/63549
5671 * c-typeck.c (build_array_ref): Bail if the index in an incomplete
5672 type.
5673
92574c7c
MP
56742014-10-17 Marek Polacek <polacek@redhat.com>
5675
5676 * c-decl.c (grokdeclarator): Use OPT_Wimplicit_int unconditionally.
5677 (start_function): Use OPT_Wimplicit_int instead of 0.
5678 (store_parm_decls_oldstyle): Likewise.
5679
1bc4a978
MT
56802014-10-17 Alan Modra <amodra@gmail.com>
5681
5682 PR middle-end/61848
5683 * c-decl.c (merge_decls): Don't merge section name or tls model
5684 to newdecl symtab node, instead merge to olddecl. Override
5685 existing olddecl section name. Set tls_model for all thread-local
5686 vars, not just OMP thread-private ones. Remove incorrect comment.
5687
83685514
AM
56882014-10-16 Andrew MacLeod <amacleod@redhat.com>
5689
5690 * c-decl.c: Adjust include files.
5691
78a7c317
DD
56922014-10-14 DJ Delorie <dj@redhat.com>
5693
5694 * c-parser.c (c_parse_init): Add RID entries for each __intN.
5695 (c_token_starts_typename): Check all __intN, not just __int128.
5696 (c_token_starts_declspecs): Likewise.
5697 (c_parser_declspecs): Likewise.
5698 (c_parser_attribute_any_word): Likewise.
5699 (c_parser_objc_selector): Likewise.
5700 * c-tree.h (c_typespec_keyword): cts_int128 -> cts_int_n.
5701 (struct c_declspecs): Add int_n_idx field to record *which* __intN
5702 is specified.
5703 * c-decl.c (declspecs_add_type): Check for all __intN, not just
5704 __int128.
5705 (finish_declspecs): Likewise.
5706
74d98c1e
AB
57072014-10-13 Anthony Brandon <anthony.brandon@gmail.com>
5708
8e745a17 5709 * c-parser.c (c_parser_all_labels): New function to replace
74d98c1e 5710 the duplicate code.
8e745a17 5711 (c_parser_statement): Call the new function.
74d98c1e 5712
84937de2
MP
57132014-10-09 Marek Polacek <polacek@redhat.com>
5714
5715 PR c/63480
5716 * c-typeck.c (pop_init_level): Don't warn about initializing
5717 with { }.
5718
0382aaa0
MP
57192014-10-07 Marek Polacek <polacek@redhat.com>
5720
5721 PR c/59717
5722 * c-decl.c (header_for_builtin_fn): New function.
5723 (implicitly_declare): Suggest which header to include.
5724
7a0ca710
MP
57252014-10-07 Marek Polacek <polacek@redhat.com>
5726
5727 * c-convert.c (convert): Use error_operand_p.
5728 * c-typeck.c (require_complete_type): Likewise.
5729 (really_atomic_lvalue): Likewise.
5730 (digest_init): Likewise.
5731 (handle_omp_array_sections_1): Likewise.
5732
6bc8a126
MP
57332014-10-03 Marek Polacek <polacek@redhat.com>
5734
5735 PR c/63453
5736 * c-decl.c (pop_scope): Don't warn about "inline function declared
5737 but never defined" for functions marked with gnu_inline attribute.
5738
d90c0a59
JJ
57392014-09-25 Jakub Jelinek <jakub@redhat.com>
5740
5741 PR c++/63249
5742 * c-parser.c (c_parser_omp_variable_list): Call mark_exp_read
5743 on low_bound and length.
5744
083e891e
MP
57452014-09-24 Marek Polacek <polacek@redhat.com>
5746
5747 PR c/61405
5748 PR c/53874
5749 * c-parser.c: Don't define CPP_KEYWORD.
5750 (c_parser_switch_statement): Pass original type to c_finish_case.
5751 * c-tree.h (c_finish_case): Update declaration.
5752 * c-typeck.c (c_finish_case): Add TYPE parameter. Pass it
5753 conditionally to c_do_switch_warnings.
5754
8d95fe25
MP
57552014-09-03 Marek Polacek <polacek@redhat.com>
5756
5757 PR c/62024
5758 * c-parser.c (c_parser_static_assert_declaration_no_semi): Strip no-op
5759 conversions.
5760
9a771876
JJ
57612014-09-02 Jakub Jelinek <jakub@redhat.com>
5762 Balaji V. Iyer <balaji.v.iyer@intel.com>
5763 Igor Zamyatin <igor.zamyatin@intel.com>
5764
5765 * c-parser.c (c_parser_cilk_for): New function.
5766 (c_parser_cilk_grainsize): Likewise.
5767 (c_get_temp_regvar): Likewise.
5768 (c_parser_statement_after_labels): Added RID_CILK_FOR case.
5769 (c_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
5770 (c_parser_omp_for_loop): Added CILK_FOR and CILK_SIMD checks.
5771 * c-typeck.c (c_finish_omp_clauses): Added OMP_CLAUSE__CILK_FOR_COUNT_
5772 case.
5773
b7679d96
CG
57742014-08-27 Chen Gang <gang.chen.5i5j@gmail.com>
5775
5776 * c-aux-info.c (gen_type): Resize 'buff' from 10 to 23 bytes,
5777 with using HOST_WIDE_INT without truncation to 'int'
5778
59ea0364
MP
57792014-08-22 Marek Polacek <polacek@redhat.com>
5780
5781 PR c++/62199
5782 * c-typeck.c (parser_build_binary_op): Adjust call to
5783 warn_logical_not_parentheses.
5784
671a475e
IZ
57852014-08-22 Igor Zamyatin <igor.zamyatin@intel.com>
5786
5787 PR other/62008
5788 * c-parser.c (c_parser_array_notation): Check for correct
5789 type of an array added.
5790
04159acf
MP
57912014-08-19 Marek Polacek <polacek@redhat.com>
5792
5793 PR c++/62153
5794 * c-typeck.c (build_binary_op): If either operand of a comparison
5795 is a boolean expression, call maybe_warn_bool_compare.
5796
c77935ee
PP
57972014-08-19 Patrick Palka <ppalka@gcc.gnu.org>
5798
5799 PR c/45584
5800 * c-typeck.c (build_c_cast): Do a conversion even when the
5801 TYPE_MAIN_VARIANTs are the same.
5802
35aff4fb
MP
58032014-08-19 Marek Polacek <polacek@redhat.com>
5804
5805 * c-decl.c (diagnose_mismatched_decls): Unconditionally call
5806 pedwarn_c99 instead of pedwarn.
5807 (grokfield): Likewise.
5808 (warn_defaults_to): New function.
5809 (grokdeclarator): Call warn_defaults_to instead of pedwarn_c99.
5810 Unconditionally call pedwarn_c99 instead of pedwarn.
5811 (start_function): Call warn_defaults_to instead of pedwarn_c99.
5812 (declspecs_add_scspec): Call pedwarn_c99 instead of pedwarn, don't
5813 check flag_isoc11 before.
5814 * c-errors.c (pedwarn_c99): Change the return type to bool.
5815 Handle -Wc99-c11-compat.
5816 * c-parser.c (disable_extension_diagnostics): Handle
5817 warn_c99_c11_compat.
5818 (restore_extension_diagnostics): Likewise.
5819 (c_parser_static_assert_declaration_no_semi): Call pedwarn_c99
5820 instead of pedwarn, don't check flag_isoc11 before.
5821 (c_parser_declspecs): Likewise.
5822 (c_parser_alignas_specifier): Likewise.
5823 (c_parser_alignof_expression): Likewise.
5824 (c_parser_generic_selection): Likewise.
5825 * c-tree.h (pedwarn_c99): Update declaration.
5826 * c-typeck.c (c_finish_return): Call pedwarn or warning_at instead
5827 of pedwarn_c99.
5828
177cce46
MP
58292014-08-19 Marek Polacek <polacek@redhat.com>
5830
5831 * c-decl.c (warn_variable_length_array): Pass OPT_Wvla unconditionally
5832 to pedwarn_c90.
5833 * c-errors.c: Include "opts.h".
5834 (pedwarn_c90): Rewrite to handle -Wno-c90-c99-compat better.
5835 * c-parser.c (disable_extension_diagnostics): Handle negative value
5836 of warn_c90_c99_compat, too.
5837 (restore_extension_diagnostics): Likewise.
5838 (c_parser_compound_statement_nostart): Pass
5839 OPT_Wdeclaration_after_statement unconditionally to pedwarn_c90.
5840
6dc99c33
MP
58412014-08-12 Marek Polacek <polacek@redhat.com>
5842
5843 * c-parser.c (c_parser_postfix_expression) <case RID_FUNCTION_NAME>:
5844 Add pedwarn.
5845 (c_parser_postfix_expression) <case RID_PRETTY_FUNCTION_NAME>:
5846 Likewise.
5847 (c_parser_postfix_expression) <case RID_C99_FUNCTION_NAME>: Likewise.
5848
3f8257db 58492014-08-10 Marek Polacek <polacek@redhat.com>
f3bede71
MP
5850
5851 PR c/51849
5852 * c-decl.c (build_array_declarator): Remove check for !flag_isoc99.
5853 Call pedwarn_c90 instead of pedwarn.
5854 (check_bitfield_type_and_width): Likewise.
5855 (declspecs_add_qual): Likewise.
5856 (declspecs_add_type): Likewise.
5857 (warn_variable_length_array): Unify function for -pedantic and -Wvla.
5858 Adjust to only call pedwarn_c90.
5859 (grokdeclarator): Remove pedantic && !flag_isoc99 check. Call
5860 pedwarn_c90 instead of pedwarn.
5861 * c-errors.c (pedwarn_c90): Handle -Wc90-c99-compat.
5862 * c-parser.c (disable_extension_diagnostics): Handle
5863 warn_c90_c99_compat.
5864 (restore_extension_diagnostics): Likewise.
5865 (c_parser_enum_specifier): Remove check for !flag_isoc99. Call
5866 pedwarn_c90 instead of pedwarn.
5867 (c_parser_initelt): Likewise.
5868 (c_parser_postfix_expression): Likewise.
5869 (c_parser_postfix_expression_after_paren_type): Likewise.
5870 (c_parser_compound_statement_nostart): Remove check for !flag_isoc99.
5871 * c-tree.h: Fix formatting.
5872 * c-typeck.c (build_array_ref): Remove check for !flag_isoc99. Call
5873 pedwarn_c90 instead of pedwarn.
5874
9f25a338
TS
58752014-08-07 Trevor Saunders <tsaunders@mozilla.com>
5876
5877 * c-typeck.c: Remove include of pointer-set.h.
5878
044331a8
MP
58792014-08-07 Marek Polacek <polacek@redhat.com>
5880
5881 * c-typeck.c (pointer_diff): Remove P - (P + CST) optimization.
5882
b787e7a2
TS
58832014-08-02 Trevor Saunders <tsaunders@mozilla.com>
5884
5885 * c-typeck.c: Use hash_map instead of pointer_map.
5886
6e2830c3
TS
58872014-08-02 Trevor Saunders <tsaunders@mozilla.com>
5888
5889 * c-decl.c: Use hash_set instead of pointer_set.
5890
a7ee52fb
IZ
58912014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
5892
5893 PR middle-end/61455
5894 * c-array-notation.c (expand_array_notations): Handling
5895 of DECL_EXPR added.
5896
b4dfdc11
MG
58972014-07-31 Marc Glisse <marc.glisse@inria.fr>
5898
5899 PR c++/60517
5900 * c-typeck.c (c_finish_return): Return 0 instead of the address of
5901 a local variable.
5902
976d5a22
TT
59032014-07-30 Tom Tromey <tromey@redhat.com>
5904
5905 * c-typeck.c (struct constructor_stack) <designator_depth>: New
5906 field.
5907 (really_start_incremental_init, push_init_level): Initialize
5908 designator_depth.
5909 (pop_init_level): Set global designator_depth.
5910 (process_init_element): Check for designated_init attribute.
5911
30281de2
MP
59122014-07-20 Marek Polacek <polacek@redhat.com>
5913
5914 PR c/61852
5915 * c-decl.c (implicit_decl_warning): Add location_t parameter. Use it.
5916 (implicitly_declare): Pass location to implicit_decl_warning.
5917
b108f48f
JJ
59182014-07-14 Jakub Jelinek <jakub@redhat.com>
5919
5920 PR middle-end/61294
5921 * c-parser.c (c_parser_expr_list): Add new argument literal_zero_mask.
5922 If non-NULL, call c_parser_check_literal_zero.
5923 (c_parser_check_literal_zero): New function.
5924 (c_parser_postfix_expression_after_primary): Adjust
5925 c_parser_expr_list caller, handle -Wmemset-transposed-args.
5926
773ec47f
MP
59272014-07-06 Marek Polacek <polacek@redhat.com>
5928
5929 PR c/6940
5930 * c-decl.c (grokdeclarator): Set C_ARRAY_PARAMETER.
5931 * c-tree.h (C_ARRAY_PARAMETER): Define.
5932 * c-typeck.c (c_expr_sizeof_expr): Warn when using sizeof on an array
5933 function parameter.
5934
22e1cf1c 59352014-07-02 Jan Hubicka <hubicka@ucw.cz>
3f8257db 5936 Chen Gang <gang.chen.5i5j@gmail.com>
22e1cf1c
JH
5937
5938 * c-decl.c (duplicate_decls): CLear DECL_STRUCT_FUNCTION before
5939 releasing symbol.
5940
52ec0ea3
MP
59412014-07-01 Marek Polacek <polacek@redhat.com>
5942
5943 * c-typeck.c (convert_for_assignment): Pass OPT_Wint_conversion
5944 instead of 0 to WARN_FOR_ASSIGNMENT.
5945
d5c3d343
MP
59462014-07-01 Marek Polacek <polacek@redhat.com>
5947
5948 PR c/58286
5949 * c-typeck.c (convert_for_assignment): Pass
5950 OPT_Wincompatible_pointer_types instead of 0 to WARN_FOR_ASSIGNMENT.
5951
6a7253a4
MP
59522014-06-30 Marek Polacek <polacek@redhat.com>
5953
5954 * c-decl.c (grokdeclarator): Don't instrument VLAs if the function
5955 has no_sanitize_undefined attribute.
5956
5e88a8f4
IZ
59572014-06-30 Igor Zamyatin <igor.zamyatin@intel.com>
5958
5959 PR middle-end/57541
5960 * c-array-notation.c (fix_builtin_array_notation_fn):
5961 Check for 0 arguments in builtin call. Check that bultin argument is
5962 correct.
5963 * c-parser.c (c_parser_array_notation): Check for incorrect initial
5964 index.
5965
9698b078
SH
59662014-06-27 Sebastian Huber <sebastian.huber@embedded-brains.de>
5967
5968 * c-parser.c (c_parser_declaration_or_fndef): Discard all type
5969 qualifiers in __auto_type for atomic types.
5970 (c_parser_typeof_specifier): Discard all type qualifiers in
5971 __typeof__ for atomic types.
5972
6e07c515
MP
59732014-06-25 Marek Polacek <polacek@redhat.com>
5974
5975 PR c/61162
5976 * c-parser.c (c_parser_statement_after_labels): Pass the location of
5977 the return expression to c_finish_return.
5978
da6f124d
JJ
59792014-06-25 Jakub Jelinek <jakub@redhat.com>
5980
5981 * c-typeck.c (c_finish_omp_clauses): Make sure
5982 OMP_CLAUSE_LINEAR_STEP has correct type.
5983
c203e8a7
TS
59842014-06-24 Trevor Saunders <tsaunders@mozilla.com>
5985
5986 * c-decl.c: Adjust.
5987
56ad0e38
JJ
59882014-06-24 Jakub Jelinek <jakub@redhat.com>
5989
5990 * c-parser.c (c_parser_omp_for_loop): For
5991 #pragma omp parallel for simd move lastprivate clause from parallel
5992 to for rather than simd.
5993
47c2554f
MP
59942014-06-23 Marek Polacek <polacek@redhat.com>
5995
5996 * c-typeck.c (parser_build_binary_op): Don't call
5997 warn_logical_not_parentheses if the RHS is TRUTH_NOT_EXPR.
5998
56363ffd
JH
59992014-06-15 Jan Hubicka <hubicka@ucw.cz>
6000
6001 * c-parser.c (c_parser_omp_threadprivate): Likewise.
6002 * c-decl.c (merge_decls): Likewise.
6003
d7ff7ae5
MP
60042014-06-09 Marek Polacek <polacek@redhat.com>
6005
6006 PR c/36446
6007 * c-typeck.c (error_init): Call inform instead of error_at.
6008 (pedwarn_init): Call inform instead of pedwarn.
6009 (warning_init): Call inform instead of warning_at.
6010
24d047a3
JH
60112014-06-07 Jan Hubicka <hubicka@ucw.cz>
6012
6013 * c-decl.c (merge_decls): Use set_decl_section_name.
6014 (duplicate_decls): Remove node if it exists.
6015
9bac5cbb
G
60162014-06-05 S. Gilles <sgilles@terpmail.umd.edu>
6017
6018 PR c/53119
6019 * c-typeck.c (push_init_level, process_init_element,
6020 pop_init_level): Correct check for zero initialization, move
6021 missing brace warning to respect zero initialization.
6022
8ffcdea8
MP
60232014-06-05 Marek Polacek <polacek@redhat.com>
6024
6025 PR c/56724
6026 * c-typeck.c (convert_for_assignment): Use expr_loc for ic_argpass.
6027
742938c9
MP
60282014-06-05 Marek Polacek <polacek@redhat.com>
6029
6030 PR c/49706
6031 * c-typeck.c (parser_build_binary_op): Warn when logical not is used
ab20d992 6032 on the left hand side operand of a comparison.
742938c9 6033
6447c55d
MP
60342014-06-05 Marek Polacek <polacek@redhat.com>
6035
6036 PR c/48062
6037 * c-decl.c (warn_if_shadowing): Call inform instead of warning_at.
6038 Print note only if the warning was printed.
6039
9dc7743c
IZ
60402014-06-04 Igor Zamyatin <igor.zamyatin@intel.com>
6041
6042 PR c/58942
6043 * c-array-notation.c (fix_builtin_array_notation_fn): Handle the case
6044 with a pointer.
6045
fedfecef
MP
60462014-06-03 Marek Polacek <polacek@redhat.com>
6047
6048 PR c/60439
6049 * c-parser.c (c_parser_switch_statement): Pass explicit_cast_p to
6050 c_start_case.
6051 * c-tree.h (c_start_case): Update.
6052 * c-typeck.c (c_start_case): Add new boolean parameter. Warn if
6053 switch condition has boolean value.
6054
9b2b7279
AM
60552014-06-02 Andrew MacLeod <amacleod@redhat.com>
6056
6057 * c-decl.c: Include builtins.h.
6058 * c-parser.c: Likewise.
6059
5c1bc275
MP
60602014-05-27 Marek Polacek <polacek@redhat.com>
6061
6062 PR c/56724
6063 * c-typeck.c (convert_arguments): Get location of a parameter. Change
6064 error and warning calls to error_at and warning_at. Pass location of
6065 a parameter to it. Call warning_at with OPT_Wtraditional_conversion.
6066 (convert_for_assignment): Add parameter to WARN_FOR_ASSIGNMENT and
6067 WARN_FOR_QUALIFIERS. Pass expr_loc to those.
6068
97563bc8
IZ
60692014-05-26 Igor Zamyatin <igor.zamyatin@intel.com>
6070
6071 PR c/61191
6072 * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid
6073 function parameters.
6074
aede2c10
JH
60752014-05-23 Jan Hubicka <hubicka@ucw.cz>
6076
6077 * c-decl.c (merge_decls): Preserve symtab node pointers.
6078 (duplicate_decls): Free new decl.
6079
edbba2ce
TS
60802014-05-23 Thomas Schwinge <thomas@codesourcery.com>
6081
f3316c6d
TS
6082 * c-typeck.c (c_finish_omp_clauses): Remove duplicated variable
6083 initialization.
6084
edbba2ce
TS
6085 * c-parser.c (c_parser_omp_target): Return bool values.
6086
68c81f24
TS
60872014-05-22 Thomas Schwinge <thomas@codesourcery.com>
6088
6089 * c-parser.c (c_parser_omp_clause_thread_limit): Rename
6090 num_teams_loc variable to num_thread_limit_loc.
6091
632f2871
RS
60922014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
6093
6094 * c-array-notation.c (expand_array_notations): Use void_node
6095 instead of void_zero_node.
6096
766090c2
TS
60972014-05-17 Trevor Saunders <tsaunders@mozilla.com>
6098
6099 * c-decl.c (finish_struct): Adjust.
6100 (finish_enum): Likewise.
6101 (bind): Adjust.
6102 (record_inline_static): Likewise.
6103 (push_scope): Likewise.
6104 (make_label): Likewise.
6105 (lookup_label_for_goto): Likewise.
6106 (finish_struct): Likewise.
6107 (finish_enum): Likewise.
6108 (store_parm_decls): Likewise.
6109 (c_push_function_context): Likewise.
6110 * c-lang.h: Remove usage of variable_size gty attribute.
6111 * c-parser.c (c_parse_init): Adjust.
6112 (c_parse_file): Likewise.
6113
2b107f6b
MP
61142014-05-13 Marek Polacek <polacek@redhat.com>
6115
6116 PR c/61162
6117 * c-typeck.c (convert_for_assignment): Pass location to
6118 WARN_FOR_ASSIGNMENT instead of input_location.
6119
d033409e
MP
61202014-05-10 Marek Polacek <polacek@redhat.com>
6121
6122 * c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
6123 maybe_warn_string_init.
6124 (c_parser_postfix_expression_after_paren_type): Pass type_loc to
6125 maybe_warn_string_init.
6126 * c-tree.h (maybe_warn_string_init): Update declaration.
6127 * c-typeck.c (maybe_warn_string_init): Add location parameter.
6128 Call pedwarn_init with loc instead of with input_location.
6129 (digest_init): Pass init_loc to maybe_warn_string_init.
6130 (pop_init_level): Call pedwarn_init with loc instead of with
6131 input_location.
6132 (set_init_index): Likewise.
6133 (process_init_element): Likewise.
6134
ea58ef42
MP
61352014-05-09 Marek Polacek <polacek@redhat.com>
6136
6137 PR c/61096
6138 * c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level.
6139 (c_parser_initelt): Pass location to set_init_label. Pass array index
6140 location to set_init_index.
6141 * c-tree.h (push_init_level): Update declaration.
6142 (pop_init_level): Likewise.
6143 (set_init_index): Likewise.
6144 (set_init_label): Likewise.
6145 * c-typeck.c (error_init): Add location parameter. Call error_at
6146 instead of error.
6147 (digest_init): Pass init_loc to error_init.
6148 (really_start_incremental_init):
6149 (push_init_level): Add location parameter. Pass loc to pop_init_level
6150 and error_init.
6151 (pop_init_level): Likewise.
6152 (set_designator): Add location parameter. Pass loc to pop_init_level,
6153 push_init_level, and error_init.
6154 (set_init_index): Add location parameter. Pass loc to error_init and
6155 set_designator.
6156 (set_init_label): Likewise.
6157 (output_init_element): Pass loc to error_init.
6158 (process_init_element): Pass loc to error_init, pop_init_level,
6159 pedwarn_init, and push_init_level.
6160
661a0813
MP
61612014-05-09 Marek Polacek <polacek@redhat.com>
6162
6163 PR c/50459
6164 * c-parser.c (c_parser_attributes): Parse the arguments as an
6165 expression-list if the attribute takes identifier.
6166
2793eeab
MP
61672014-05-08 Marek Polacek <polacek@redhat.com>
6168
6169 PR c/61053
6170 * c-decl.c (grokdeclarator): Use min_align_of_type instead of
6171 TYPE_ALIGN_UNIT.
6172
f827930a
MP
61732014-05-08 Marek Polacek <polacek@redhat.com>
6174
6175 PR c/61077
6176 * c-decl.c (start_function): Warn for _Atomic-qualified return type
6177 of main.
6178
1d60af08
KZ
61792014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
6180 Mike Stump <mikestump@comcast.net>
6181 Richard Sandiford <rdsandiford@googlemail.com>
6182
6183 * c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN.
6184 (finish_enum): Use wide-int interfaces.
6185 * c-parser.c (c_parser_cilk_clause_vectorlength): Likewise.
6186 * c-typeck.c (build_c_cast): Likewise.
6187 (set_nonincremental_init_from_string): Likewise.
6188 (c_tree_equal): Likewise.
6189
a0e24419
MP
61902014-05-02 Marek Polacek <polacek@redhat.com>
6191
6192 PR c/25801
6193 * c-typeck.c (c_size_in_bytes): Update comment. Don't call error.
6194 Return size_one_node when the type is not complete.
6195 (pointer_diff): Remove comment.
6196 (build_unary_op): Improve error messages.
6197
19fc9faa
MP
61982014-05-02 Marek Polacek <polacek@redhat.com>
6199
6200 * c-typeck.c (c_finish_return): Separate warning_at calls.
6201
63bc4e87
MP
62022014-05-02 Marek Polacek <polacek@redhat.com>
6203
6204 * c-tree.h (error_init): Remove declaration.
6205 (pedwarn_init): Likewise.
6206 * c-typeck.c (error_init): Make static and move above.
6207 (pedwarn_init): Likewise.
6208 (warning_init): Move above.
6209 (maybe_warn_string_init): Likewise.
6210
4bd2511b
JL
62112014-05-01 Jeff Law <law@redhat.com>
6212
6213 Revert:
6214
6215 2014-04-24 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
6216 * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
6217 avoid goto.
6218
6a358dcb
MP
62192014-05-02 Marek Polacek <polacek@redhat.com>
6220
6221 PR c/60784
6222 * c-typeck.c (push_init_level): Set constructor_designated to
6223 p->designated for structures.
6224
ae5ebda4
MP
62252014-05-01 Marek Polacek <polacek@redhat.com>
6226
6227 PR c/60915
6228 * c-parser.c (c_parser_declaration_or_fndef): Give better error if
6229 function-definition has an attribute after the declarator.
6230
96b40f8d
MP
62312014-05-01 Marek Polacek <polacek@redhat.com>
6232
6233 PR c/60257
6234 * c-typeck.c (warning_init): Add location_t parameter. Call
6235 warning_at instead of warning.
6236 (push_init_level): Pass input_location to warning_init.
6237 (add_pending_init): Add location_t parameter. Pass loc to
6238 warning_init.
6239 (set_nonincremental_init): Pass input_location to add_pending_init.
6240 (set_nonincremental_init_from_string): Likewise.
6241 (output_init_element): Pass loc to warning_init and to
6242 add_pending_init.
6243
32e00768
MP
62442014-05-01 Marek Polacek <polacek@redhat.com>
6245
6246 PR c/43395
6247 * c-typeck.c (c_finish_return): Distinguish between label and variable
6248 when warning about returning local address.
6249
c9379ce2
MP
62502014-05-01 Marek Polacek <polacek@redhat.com>
6251
6252 PR c/29467
6253 * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
6254 in C89 mode.
6255
d00887e8
MP
62562014-05-01 Marek Polacek <polacek@redhat.com>
6257
6258 PR c/43245
6259 * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
6260 instead of 0 to WARN_FOR_QUALIFIERS.
6261
5436fa2e
MP
62622014-05-01 Marek Polacek <polacek@redhat.com>
6263
6264 PR c/56989
6265 * c-typeck.c (default_conversion): Use better location for
6266 error call.
6267
f8ed5150
MP
62682014-04-30 Marek Polacek <polacek@redhat.com>
6269
6270 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
6271 also when SANITIZE_FLOAT_DIVIDE is on.
6272
8337d1db
MP
62732014-04-30 Marek Polacek <polacek@redhat.com>
6274
6275 PR c/60139
6276 * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
6277 and pedwarn_init. Use loc insted of input_location.
6278
c4bdc42f
MP
62792014-04-30 Marek Polacek <polacek@redhat.com>
6280
6281 PR c/60351
6282 * c-typeck.c (build_binary_op): Use location when warning about
6283 shift count.
6284
45484dcf
MP
62852014-04-25 Marek Polacek <polacek@redhat.com>
6286
6287 PR c/18079
6288 * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
6289 always_inline/noinline and hot/cold attributes.
6290
34cf811f
MP
62912014-04-25 Marek Polacek <polacek@redhat.com>
6292
6293 PR c/60114
6294 * c-parser.c (c_parser_initelt): Pass input_location to
6295 process_init_element.
6296 (c_parser_initval): Pass loc to process_init_element.
6297 * c-tree.h (process_init_element): Adjust declaration.
6298 * c-typeck.c (push_init_level): Pass input_location to
6299 process_init_element.
6300 (pop_init_level): Likewise.
6301 (set_designator): Likewise.
6302 (output_init_element): Add location_t parameter. Pass loc to
6303 digest_init.
6304 (output_pending_init_elements): Pass input_location to
6305 output_init_element.
6306 (process_init_element): Add location_t parameter. Pass loc to
6307 output_init_element.
6308
42056eac
JJ
63092014-04-24 Jakub Jelinek <jakub@redhat.com>
6310
6311 * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
6312 atomic-clause, allow comma in between atomic-clause and
6313 seq_cst.
6314
e162a134
JJ
63152014-04-22 Jakub Jelinek <jakub@redhat.com>
6316
6317 PR c/59073
6318 * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
6319 fails, don't set OM_PARALLEL_COMBINED and return NULL.
6320
2f6babac
IZ
63212014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
6322
6323 PR middle-end/60469
6324 * c-array-notation.c (fix_builtin_array_notation_fn): Use
6325 create_tmp_var instead build_decl for creating temps.
6326 (build_array_notation_expr): Likewise.
6327 (fix_conditional_array_notations_1): Likewise.
6328 (fix_array_notation_expr): Likewise.
6329 (fix_array_notation_call_expr): Likewise.
6330
8edbfaa6
JJ
63312014-03-28 Jakub Jelinek <jakub@redhat.com>
6332
6333 PR c++/60689
6334 * c-tree.h (c_build_function_call_vec): New prototype.
6335 * c-typeck.c (build_function_call_vec): Don't call
6336 resolve_overloaded_builtin here.
6337 (c_build_function_call_vec): New wrapper function around
6338 build_function_call_vec. Call resolve_overloaded_builtin here.
6339 (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
6340 Call c_build_function_call_vec instead of build_function_call_vec.
6341 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
6342 * c-decl.c (finish_decl): Likewise.
6343
7485aeea
MLI
63442014-03-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
6345
6346 PR c/55383
6347 * c-typeck.c: Use correct format string in cast-qual warning
6348
b17a8b07
TS
63492014-03-07 Thomas Schwinge <thomas@codesourcery.com>
6350
6351 * c-decl.c (c_decl_attributes): Use
6352 lang_hooks.types.omp_mappable_type.
6353 * c-typeck.c (c_finish_omp_clauses): Likewise.
6354
3af9c5e9
MP
63552014-03-06 Marek Polacek <polacek@redhat.com>
6356
6357 PR c/60197
6358 * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
6359 of checking tree code.
6360
1c9f5f33
PK
63612014-02-19 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
6362
6363 * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
6364 (c_parser_parameter_declaration): Likewise.
6365
cc28fc7f
MP
63662014-02-19 Marek Polacek <polacek@redhat.com>
6367
6368 PR c/60195
6369 * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
6370 Call mark_exp_read on exp.value.
6371 (build_atomic_assign): Set TREE_NO_WARNING on val and old. Set
6372 TREE_ADDRESSABLE on old instead of val.
6373 (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
6374
b581c05c
PK
63752014-02-07 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
6376
6377 * c-parser.c (c_parser_get_builtin_args): Replace calls to
6378 C_EXPR_APPEND by vec_safe_push.
6379 * c-tree.h (C_EXPR_APPEND): Remove.
6380
81e5eca8
MP
63812014-01-31 Marek Polacek <polacek@redhat.com>
6382
6383 PR c/59963
6384 * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
6385 build_function_call_vec.
6386 (build_function_call): Likewise.
6387 (build_atomic_assign): Likewise.
6388 (build_function_call_vec): Add arg_loc parameter. Use it.
6389 (convert_arguments): Likewise.
6390 (convert_for_assignment): Rename rhs_loc to expr_loc.
6391 * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
6392 (c_parser_objc_keywordexpr): Likewise.
6393 (c_parser_postfix_expression_after_primary): Call
6394 build_function_call_vec with expr_loc rather than op_loc.
6395 Call c_parser_expr_list to fill arg_loc. Pass arg_loc to
6396 build_function_call_vec.
6397 (c_parser_expr_list): Add locations parameter. Fill it with locations
6398 of function arguments.
6399 * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
6400
68fca595
MP
64012014-01-30 Marek Polacek <polacek@redhat.com>
6402
6403 PR c/59940
6404 * c-typeck.c (build_function_call_vec): Use loc parameter.
6405 (convert_arguments): Add location parameter. Use it.
6406 (ep_convert_and_check): Likewise.
6407 (build_atomic_assign): Adjust convert_for_assignment call.
6408 (build_modify_expr): Likewise.
6409 (digest_init): Likewise.
6410 (c_finish_return): Likewise.
6411 (build_conditional_expr): Adjust ep_convert_and_check calls.
6412 (convert_for_assignment): Add rhs_loc parameter. Use it.
6413 (build_binary_op): Adjust convert_and_check and ep_convert_and_check
6414 calls.
6415
fa337f3a
RB
64162014-01-30 Richard Biener <rguenther@suse.de>
6417
6418 PR c/59905
6419 * c-typeck.c (build_function_call_vec): Do not replace calls
6420 to a function via an incompatible type with a runtime abort.
6421
b72271b9
BI
64222014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
6423
6424 * c-parser.c (c_parser_declaration_or_fndef): Replaced
6425 flag_enable_cilkplus with flag_cilkplus.
6426 (c_parser_direct_declarator_inner): Likewise.
6427 (c_parser_attribute_any_word): Likewise.
6428 (c_parser_attributes): Likewise.
6429 (c_parser_compound_statement): Likewise.
6430 (c_parser_statement_after_labels): Likewise.
6431 (c_parser_if_statement): Likewise.
6432 (c_parser_switch_statement): Likewise.
6433 (c_parser_do_statement): Likewise.
6434 (c_parser_for_statement): Likewise.
6435 (c_parser_unary_expression): Likewise.
6436 (c_parser_postfix_expression): Likewise.
6437 (c_parser_postfix_expression_after_primary): Likewise.
6438 (c_parser_postfix_expression_after_primary): Likewise.
6439 (c_parser_omp_clause_name): Likewise.
6440 (c_finish_omp_declare_simd): Likewise.
6441 (c_parser_cilk_verify_simd): Likewise.
6442 * c-typeck.c (build_array_ref): Likewise.
6443 (build_function_call_vec): Likewise.
6444 (convert_arguments): Likewise.
6445 (build_compound_expr): Likewise.
6446 (c_finish_return): Likewise.
6447 (c_finish_if_stmt): Likewise.
6448 (c_finish_loop): Likewise.
6449 (build_binary_op): Likewise.
6450
393e8e8b
MP
64512014-01-23 Marek Polacek <polacek@redhat.com>
6452
6453 PR c/59846
6454 * c-typeck.c (parser_build_binary_op): Use location instead of
6455 input_location.
6456 (build_binary_op): Pass location to shorten_compare.
6457
f04dda30
MP
64582014-01-23 Marek Polacek <polacek@redhat.com>
6459
6460 PR c/58346
6461 * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
6462 an empty aggregate.
6463
789eadcd
MP
64642014-01-23 Marek Polacek <polacek@redhat.com>
6465
6466 PR c/59871
6467 * c-typeck.c (build_compound_expr): Warn even for right-hand operand
6468 of a comma expression.
6469 (emit_side_effect_warnings): Likewise.
6470
40f14e9f
BI
64712014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
6472
6473 PR c/59825
6474 * c-array-notation.c (expand_array_notation_exprs): Rewrote this
6475 function to use walk_tree and moved a lot of its functionality to
6476 expand_array_notations.
6477 (expand_array_notations): New function.
6478
74558dd9
BI
64792014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
6480
6481 * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
6482 attribute an attribute without value.
6483
652fea39
JJ
64842014-01-23 Jakub Jelinek <jakub@redhat.com>
6485
6486 PR middle-end/58809
6487 * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
6488 BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
6489
f34f1c87
MP
64902014-01-22 Marek Polacek <polacek@redhat.com>
6491
6492 PR c/59891
6493 * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
6494 of remove_c_maybe_const_expr on op1 and op2.
6495
241f845a
JJ
64962014-01-15 Jakub Jelinek <jakub@redhat.com>
6497
6498 PR c/58943
6499 * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
6500 effects, preevaluate rhs using SAVE_EXPR first.
6501
9a74f20c
BI
65022014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
6503
6504 PR c++/59631
6505 * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
6506 statements with if-elseif statements.
6507
96066ce1
MP
65082014-01-06 Marek Polacek <polacek@redhat.com>
6509
6510 PR c/57773
6511 * c-decl.c (check_bitfield_type_and_width): Warn for implementation
6512 defined bit-field types only in ISO C.
6513
23a5b65a
RS
65142014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
6515
6516 Update copyright years
6517
f9030485
RS
65182014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
6519
6520 * c-array-notation.c: Use the standard form for the copyright notice.
6521
41958c28
BI
65222013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
6523
6524 * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
6525 (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
6526 field in parser is not empty. If not-empty, call the function
6527 c_parser_finish_omp_declare_simd.
6528 (c_parser_cilk_clause_vectorlength): Modified function to be shared
6529 between SIMD-enabled functions and #pragma simd. Added new parameter.
6530 (c_parser_cilk_all_clauses): Modified the usage of the function
6531 c_parser_cilk_clause_vectorlength as mentioned above.
6532 (c_parser_cilk_simd_fn_vector_attrs): New function.
6533 (c_finish_cilk_simd_fn_tokens): Likewise.
6534 (is_cilkplus_vector_p): Likewise.
6535 (c_parser_omp_clause_name): Added checking for "vectorlength,"
6536 "nomask," and "mask" strings in clause name.
6537 (c_parser_omp_all_clauses): Added 3 new case statements:
6538 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
6539 PRAGMA_CILK_CLAUSE_NOMASK.
6540 (c_parser_attributes): Added a cilk_simd_fn_tokens parameter. Added a
6541 check for vector attribute and if so call the function
6542 c_parser_cilk_simd_fn_vector_attrs. Also, when Cilk plus is enabled,
6543 called the function c_finish_cilk_simd_fn_tokens.
6544 (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
6545 parser field is non-empty. If so, parse them as you would parse
6546 the omp declare simd pragma.
6547 (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
6548 Added a check when step is a parameter and flag it as error.
6549 (CILK_SIMD_FN_CLAUSE_MASK): New #define.
6550 (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
6551 pragma_omp_clause.
6552
cef0fd0e
TS
65532013-12-17 Thomas Schwinge <thomas@codesourcery.com>
6554
6555 * c-parser.c (c_parser_omp_parallel): Fix description.
6556
12893402
BI
65572013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
6558
6559 * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
6560 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
6561 (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
6562 * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
6563
296674db
JM
65642013-12-04 Joseph Myers <joseph@codesourcery.com>
6565
6566 PR c/52023
6567 * c-parser.c (c_parser_alignas_specifier): Use
6568 c_sizeof_or_alignof_type instead of c_alignof.
6569 (c_parser_alignof_expression): Likewise, with min_alignof
6570 parameter depending on alignof spelling used.
6571
edd28054
MP
65722013-12-04 Marek Polacek <polacek@redhat.com>
6573
6574 PR c/54113
6575 * c-decl.c (start_function): Don't warn for missing prototype for
6576 inline functions.
6577
da0fc454
MP
65782013-12-03 Marek Polacek <polacek@redhat.com>
6579
6580 PR c/59351
6581 * c-decl.c (build_compound_literal): Allow compound literals with
6582 empty initial value.
6583
4c2ecab0
JM
65842013-12-02 Joseph Myers <joseph@codesourcery.com>
6585
6586 PR c/58235
6587 * c-typeck.c (build_modify_expr): Diagnose assignment to
6588 expression with array type.
6589
340baef7
JM
65902013-11-29 Joseph Myers <joseph@codesourcery.com>
6591
6592 PR c/42262
6593 * c-typeck.c (process_init_element): Do not treat a string as
6594 initializing a whole array when used with a designator for an
6595 individual element.
6596
6763b9f7
JM
65972013-11-29 Joseph Myers <joseph@codesourcery.com>
6598
6599 PR c/57574
6600 * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
6601 an inline function following a static declaration.
6602
e7bd1de1
JJ
66032013-11-28 Jakub Jelinek <jakub@redhat.com>
6604
6605 PR c/59310
6606 * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
6607 to p_name before calling c_parser_omp_teams instead of after.
6608 (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
6609 argument. Remove unused p_name variable.
6610
0136f8f0
AH
66112013-11-27 Aldy Hernandez <aldyh@redhat.com>
6612 Jakub Jelinek <jakub@redhat.com>
6613
6614 * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
6615 external_scope is NULL.
6616
241b71bb
TV
66172013-11-27 Tom de Vries <tom@codesourcery.com>
6618 Marc Glisse <marc.glisse@inria.fr>
6619
6620 PR c++/59032
6621 * c-typeck.c (build_unary_op): Allow vector increment and decrement.
6622
2fb9a547
AM
66232013-11-22 Andrew MacLeod <amacleod@redhat.com>
6624
6625 * c-typeck.c: Add required include files from gimple.h.
6626
8400e75e
DM
66272013-11-22 David Malcolm <dmalcolm@redhat.com>
6628
6629 * c-decl.c (define_label, shadow_tag_warned)
6630 (check_bitfield_type_and_width, grokdeclarator, grokparms,
6631 store_parm_decls_newstyle, store_parm_decls_oldstyle)
6632 (declspecs_add_type): Remove use of in_system_header macro.
6633 * c-parser.c (c_parser_unary_expression): Likewise.
6634 * c-typeck.c (store_init_value, process_init_element)
6635 (c_start_case): Likewise.
6636
6637 * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
6638 macro.
6639
6640 * c-parser.c (c_parser_set_source_position_from_token): Remove
6641 reference to in_system_header from comment.
6642
386b1f1f
RS
66432013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
6644
6645 * c-decl.c (grokdeclarator): Update comment to refer to
6646 tree_to_[su]hwi rather than tree_low_cst.
6647
ae7e9ddd
RS
66482013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
6649
6650 * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
6651 tree_to_uhwi throughout.
6652
9439e9a1
RS
66532013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
6654
6655 * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
6656 throughout.
6657
9541ffee
RS
66582013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
6659
6660 * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
6661 throughout.
6662
c02065fc
AH
66632013-11-15 Aldy Hernandez <aldyh@redhat.com>
6664
6665 * c-parser.c (c_parser_cilk_simd): New.
6666 (c_parser_cilk_verify_simd): New.
6667 (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
6668 (c_parser_omp_for_loop): Add case for NE_EXPR.
6669 Set c_break_label for CILK_SIMD.
6670 (c_parser_cilk_clause_vectorlength): New.
6671 (c_parser_cilk_clause_linear): New.
6672 (c_parser_cilk_clause_name): New.
6673 (c_parser_cilk_all_clauses): New.
6674 * c-typeck.c (build_unary_op): Pass location argument to
6675 readonly_error.
6676 (build_modify_expr): Same.
6677 (build_asm_expr): Same.
6678 (c_finish_bc_stmt): Error on break/continue in loops.
6679
18f429e2
AM
66802013-11-14 Andrew MacLeod <amacleod@redhat.com>
6681
6682 * c-typeck.c: Include only gimplify.h and gimple.h as needed.
6683
d8a2d370
DN
66842013-11-14 Diego Novillo <dnovillo@google.com>
6685
6686 * c-decl.c: Include print-tree.h.
6687 Include stor-layout.h.
6688 Include varasm.h.
6689 Include attribs.h.
6690 Include stringpool.h.
6691 * c-lang.c: Include fold-const.h.
6692 * c-parser.c: Include stringpool.h.
6693 Include attribs.h.
6694 Include stor-layout.h.
6695 Include varasm.h.
6696 Include trans-mem.h.
6697 * c-typeck.c: Include stor-layout.h.
6698 Include trans-mem.h.
6699 Include varasm.h.
6700 Include stmt.h.
6701
38b7bc7f
JM
67022013-11-13 Joseph Myers <joseph@codesourcery.com>
6703
6704 * c-tree.h (c_typespec_keyword): Add cts_auto_type.
6705 * c-decl.c (declspecs_add_type, finish_declspecs): Handle
6706 __auto_type.
6707 * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
6708 (c_parser_attribute_any_word, c_parser_objc_selector): Handle
6709 RID_AUTO_TYPE.
6710 (c_parser_declspecs): Take argument AUTO_TYPE_OK.
6711 (c_parser_declaration_or_fndef, c_parser_struct_declaration)
6712 (c_parser_declarator, c_parser_direct_declarator_inner)
6713 (c_parser_parameter_declaration, c_parser_type_name): All callers
6714 changed.
6715 (c_parser_declaration_or_fndef): Handle declarations with type
6716 determined from the initializer.
6717
45b0be94
AM
67182013-11-12 Andrew MacLeod <amacleod@redhat.com>
6719
18f429e2 6720 * c-typeck.c: Include gimplify.h.
45b0be94 6721
582d9b50
JM
67222013-11-12 Joseph Myers <joseph@codesourcery.com>
6723
6724 * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
6725 * c-parser.c (c_parser_declspecs): Mention _Thread_local in
6726 comment.
6727 * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
6728 or _Thread_local as appropriate in diagnostics.
6729 (build_null_declspecs): Initialize ret->thread_gnu_p.
6730 (declspecs_add_scspec): Handle either __thread or _Thread_local
6731 for RID_THREAD. Diagnose _Thread_local for pre-C11 standards if
6732 pedantic. Do not disallow _Thread_local extern and _Thread_local
6733 static.
6734
267bac10
JM
67352013-11-07 Joseph Myers <joseph@codesourcery.com>
6736 Andrew MacLeod <amacleod@redhat.com>
6737
6738 * c-aux-info.c (gen_type): Handle atomic qualifier.
6739 * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
6740 qualifiers when compating types.
6741 (shadow_tag_warned): Handle atomic_p in declspecs.
6742 (quals_from_declspecs): Likewise.
6743 (start_decl): Use c_type_promotes_to when promoting argument
6744 types.
6745 (grokdeclarator): Handle _Atomic.
6746 (get_parm_info): Diagnose any qualifier on "void" as only
6747 parameter.
6748 (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
6749 comparing types. Use c_type_promotes_to when promoting argument
6750 types.
6751 (finish_function): Use c_type_promotes_to when promoting argument
6752 types.
6753 (build_null_declspecs): Handle atomic_p in declspecs.
6754 (declspecs_add_qual): Handle RID_ATOMIC.
6755 * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
6756 (c_token_starts_declspecs): Handle RID_ATOMIC.
6757 (c_parser_declspecs): Handle atomic type specifiers and
6758 qualifiers.
6759 (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
6760 from types of expressions with atomic type.
6761 (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
6762 (c_parser_attribute_any_word): Handle RID_ATOMIC.
6763 (c_parser_initializer, c_parser_initelt, c_parser_initval)
6764 (c_parser_statement_after_labels, c_parser_switch_statement)
6765 (c_parser_for_statement, c_parser_expr_no_commas)
6766 (c_parser_conditional_expression, c_parser_binary_expression)
6767 (c_parser_cast_expression, c_parser_unary_expression)
6768 (c_parser_postfix_expression)
6769 (c_parser_postfix_expression_after_primary, c_parser_expression):
6770 Use convert_lvalue_to_rvalue.
6771 (c_parser_expression_conv, c_parser_expr_list): Document
6772 conversion of lvalues to rvalues. Use convert_lvalue_to_rvalue.
6773 (c_parser_objc_synchronized_statement): Use
6774 convert_lvalue_to_rvalue.
6775 (c_parser_objc_selector): Handle RID_ATOMIC.
6776 (c_parser_objc_receiver, c_parser_array_notation): Use
6777 convert_lvalue_to_rvalue.
6778 * c-tree.h (ctsk_typeof): Adjust comment to mention use for
6779 _Atomic (type-name).
6780 (struct c_declspecs): Add atomic_p field.
6781 (convert_lvalue_to_rvalue): Declare.
6782 * c-typeck.c (c_type_promotes_to): Promote atomic types to
6783 corresponding atomic types.
6784 (qualify_type): Don't add _Atomic qualifiers from second argument.
6785 (comp_target_types): Do not allow _Atomic mismatches.
6786 (type_lists_compatible_p): Do not remove atomic qualifiers when
6787 comparing types.
6788 (really_atomic_lvalue, convert_lvalue_to_rvalue)
6789 (build_atomic_assign): New functions.
6790 (build_unary_op): Use build_atomic_assign for atomic increment and
6791 decrement.
6792 (build_conditional_expr): Do not treat _Atomic void as a qualified
6793 version of void.
6794 (build_modify_expr): Use build_atomic_assign for atomic LHS.
6795 (find_anonymous_field_with_type, convert_to_anonymous_field)
6796 (convert_for_assignment): Do not remove atomic qualifiers when
6797 comparing types.
6798 (digest_init): Do not accept initialization of arrays of atomic
6799 elements by string constants.
6800 (build_asm_expr): Use convert_lvalue_to_rvalue.
6801 (build_binary_op): Do not treat _Atomic void as a qualified
6802 version of void.
6803
0c249d4b
DD
68042013-11-06 DJ Delorie <dj@redhat.com>
6805
6806 * c-decl.c (locate_old_decl): If a previous conflicting decl is
6807 both explicit and builtin, print the location of the explicit one.
6808
6d7f7e0a
TB
68092013-11-05 Tobias Burnus <burnus@net-b.de>
6810
6811 * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
6812 c_parser_omp_distribute, c_parser_omp_teams,
6813 c_parser_omp_target, c_parser_omp_declare): Handle
6814 -fopenmp-simd.
6815
b906f4ca
MP
68162013-11-03 Marek Polacek <polacek@redhat.com>
6817
6818 * c-decl.c (grokdeclarator): Add VLA instrumentation.
6819
ee1d5a02
JJ
68202013-11-01 Jakub Jelinek <jakub@redhat.com>
6821
6822 * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
6823 check_dup_generic at the end, unless remove is true.
6824 (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
6825 remove = true;.
6826 (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
6827
5a9785fb
JJ
68282013-10-31 Jakub Jelinek <jakub@redhat.com>
6829
6830 * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
6831 with decl that is not pointer nor array.
6832
939b37da
BI
68332013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
6834
6835 * c-decl.c (finish_function): Added a call for insert_cilk_frame when
6836 a spawning function is found.
6837 * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
6838 (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
6839 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
6840 * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
6841 case.
6842 (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
6843 * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
6844 expr.
6845 (c_finish_return): Added a check to reject _Cilk_spawn in return
6846 expression.
6847 (build_cilk_spawn): New function.
6848 (build_cilk_sync): Likewise.
6849 * Makefile.in (c-decl.o): Added cilk.h in dependency list.
ab20d992 6850
d4af74d4
TB
68512013-10-27 Tobias Burnus <burnus@net-b.de>
6852
6853 PR other/33426
6854 * c-parser.c (c_parser_while_statement, c_parser_while_statement,
6855 c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
6856 (c_parser_statement_after_labels): Update calls.
6857
d73749df 68582013-10-24 Tobias Burnus <burnus@net-b.de>
8170608b
TB
6859
6860 PR other/33426
6861 * c-parser.c (c_parser_pragma, c_parser_for_statement):
6862 Handle PRAGMA_IVDEP.
6863 (c_parser_statement_after_labels): Update call.
6864
f28aa681
MP
68652013-10-24 Marek Polacek <polacek@redhat.com>
6866
6867 * c-parser.c (c_parser_struct_declaration): Add a comment.
6868 (c_parser_declarator): Don't allow _Alignas here.
6869
0645c1a2
AM
68702013-10-17 Andrew MacLeod <amacleod@redhat.com>
6871
6872 * c-parser.c: Include omp-low.h.
6873 * c-typeck.c: Likewise.
6874
568a31f2
MP
68752013-10-17 Marek Polacek <polacek@redhat.com>
6876
6877 PR c/58267
6878 * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
6879 Document syntax of the array-declarator.
6880 (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
6881 are not permitted.
6882 (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
6883 (c_parser_struct_declaration): Likewise.
6884 (c_parser_declarator): Likewise.
6885 (c_parser_direct_declarator_inner): Likewise.
6886 (c_parser_parameter_declaration): Likewise.
6887 (c_parser_type_name): Likewise.
6888
acf0174b
JJ
68892013-10-11 Jakub Jelinek <jakub@redhat.com>
6890
6891 * c-lang.h (current_omp_declare_target_attribute): New extern
6892 decl.
6893 * c-parser.c: Include c-lang.h.
6894 (struct c_parser): Change tokens to c_token *.
6895 Add tokens_buf field. Change tokens_avail type to unsigned int.
6896 (c_parser_consume_token): If parser->tokens isn't
6897 &parser->tokens_buf[0], increment parser->tokens.
6898 (c_parser_consume_pragma): Likewise.
6899 (enum pragma_context): Add pragma_struct and pragma_param.
6900 (c_parser_external_declaration): Adjust
6901 c_parser_declaration_or_fndef caller.
6902 (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
6903 argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
6904 Adjust recursive call.
6905 (c_parser_struct_or_union_specifier): Use pragma_struct instead
6906 of pragma_external.
6907 (c_parser_parameter_declaration): Use pragma_param instead of
6908 pragma_external.
6909 (c_parser_compound_statement_nostart, c_parser_label,
6910 c_parser_for_statement): Adjust
6911 c_parser_declaration_or_fndef callers.
6912 (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
6913 it through to c_parser_conditional_expression.
6914 (c_parser_conditional_expression): Add omp_atomic_lhs argument,
6915 pass it through to c_parser_binary_expression. Adjust recursive
6916 call.
6917 (c_parser_binary_expression): Remove prec argument, add
6918 omp_atomic_lhs argument instead. Always start from PREC_NONE, if
6919 omp_atomic_lhs is non-NULL and one of the arguments of toplevel
6920 binop matches it, use build2 instead of parser_build_binary_op.
6921 (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
6922 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
6923 PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
6924 Handle pragma_struct and pragma_param the same as pragma_external.
6925 (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
6926 (c_parser_omp_variable_list): Parse array sections for
6927 OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
6928 (c_parser_omp_clause_collapse): Fully fold collapse expression.
6929 (c_parser_omp_clause_reduction): Handle user defined reductions.
6930 (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
6931 c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
6932 c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
6933 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
6934 c_parser_omp_clause_depend, c_parser_omp_clause_map,
6935 c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
6936 c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
6937 c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
6938 (c_parser_omp_all_clauses): Add finish_p argument. Don't call
6939 c_finish_omp_clauses if it is false. Handle new OpenMP 4.0 clauses.
6940 (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
6941 present to c_finish_omp_atomic. Handle OpenMP 4.0 atomic forms.
6942 (c_parser_omp_for_loop): Add CODE argument, pass it through
6943 to c_finish_omp_for. Change last argument to cclauses,
6944 and adjust uses to grab parallel clauses from the array of all
6945 the split clauses. Adjust c_parser_binary_expression,
6946 c_parser_declaration_or_fndef and c_finish_omp_for callers.
6947 (omp_split_clauses): New function.
6948 (c_parser_omp_simd): New function.
6949 (c_parser_omp_for): Add p_name, mask and cclauses arguments.
6950 Allow the function to be called also when parsing combined constructs,
6951 and call c_parser_omp_simd when parsing for simd.
6952 (c_parser_omp_sections_scope): If section-sequence doesn't start with
6953 #pragma omp section, require exactly one structured-block instead of
6954 sequence of statements.
6955 (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
6956 Allow the function to be called also when parsing combined constructs.
6957 (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
6958 Allow the function to be called also when parsing combined
6959 constructs.
6960 (c_parser_omp_taskgroup, c_parser_omp_cancel,
6961 c_parser_omp_cancellation_point, c_parser_omp_distribute,
6962 c_parser_omp_teams, c_parser_omp_target_data,
6963 c_parser_omp_target_update, c_parser_omp_target,
6964 c_parser_omp_declare_simd, c_finish_omp_declare_simd,
6965 c_parser_omp_declare_target, c_parser_omp_end_declare_target,
6966 c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
6967 (c_parser_omp_construct): Add p_name and mask vars. Handle
6968 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
6969 PRAGMA_OMP_TEAMS. Adjust c_parser_omp_for, c_parser_omp_parallel
6970 and c_parser_omp_sections callers.
6971 (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
6972 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
6973 OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
6974 (OMP_PARALLEL_CLAUSE_MASK): Likewise. Add OMP_CLAUSE_PROC_BIND.
6975 (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. Add
6976 OMP_CLAUSE_DEPEND.
6977 (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
6978 OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
6979 OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
6980 OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
6981 OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
6982 * c-typeck.c: Include tree-inline.h.
6983 (c_finish_omp_cancel, c_finish_omp_cancellation_point,
6984 handle_omp_array_sections_1, handle_omp_array_sections,
6985 c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
6986 (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
6987 user defined reductions.
6988 (c_tree_equal): New function.
6989 * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
6990 c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
6991 c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
6992 c_check_omp_declare_reduction_r): New prototypes.
6993 * c-decl.c (current_omp_declare_target_attribute): New variable.
6994 (c_decl_attributes): New function.
6995 (start_decl, start_function): Use it instead of decl_attributes.
6996 (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
6997 c_omp_reduction_decl, c_omp_reduction_lookup,
6998 c_check_omp_declare_reduction_r): New functions.
6999
0a6c2227
TT
70002013-09-25 Tom Tromey <tromey@redhat.com>
7001
7002 * Make-lang.in (c/gccspec.o): Remove.
7003 (CFLAGS-c/gccspec.o): New variable.
7004 (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
7005 (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
7006 (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
7007
f3bc55f0
TT
70082013-09-25 Tom Tromey <tromey@redhat.com>
7009
7010 * Make-lang.in (c/gccspec.o): Don't use subshell.
7011
a24d975c
MP
70122013-09-18 Marek Polacek <polacek@redhat.com>
7013
7014 PR sanitize/58443
7015 * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
7016 Remove unnecessary check.
7017
ce6923c5
MP
70182013-09-18 Marek Polacek <polacek@redhat.com>
7019
7020 PR sanitizer/58411
7021 * c-typeck.c (build_binary_op): Don't sanitize function if it has the
7022 no_sanitize_undefined attribute.
7023
a1e51df9
KT
70242013-09-13 Kai Tietz <ktietz@redhat.com>
7025
7026 PR target/57848
7027 * c-decl.c (c_builtin_function_ext_scope): Remove
7028 wrong assumption that it is never called on prexisting
7029 symbol.
7030
0af94e6f
JR
70312013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
7032
7033 * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
7034
20059c8b
GDR
70352013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
7036
7037 * c-objc-common.c (c_tree_printer): Tidy.
7038
de5a5fa1
MP
70392013-08-30 Marek Polacek <polacek@redhat.com>
7040
7041 * c-typeck.c (build_binary_op): Add division by zero and shift
7042 instrumentation.
7043
2531a1d9 70442013-08-26 Joern Rennecke <joern.rennecke@embecosm.com>
0fdd4508 7045 Joseph Myers <joseph@codesourcery.com>
2531a1d9 7046
6e2bcc98 7047 PR c/35649
2531a1d9
JR
7048 * c-typeck.c (c_common_type): Prefer double_type_node over
7049 other REAL_TYPE types with the same precision.
7050 (convert_arguments): Likewise.
7051
025311c4
GDR
70522013-08-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
7053
7054 * c-objc-common.c (c_tree_printer): Document the nature of the cast.
7055 (c_initialize_diagnostics): Call a destructor for the early printer.
7056
da6ca2b5
GDR
70572013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
7058
7059 * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
7060 printer initialization.
7061
318cda85 70622013-08-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
da6ca2b5 7063
318cda85
BI
7064 PR c/57490
7065 * c-array-notation.c (fix_conditional_array_notations_1): Added a
7066 check for truth values.
7067 (expand_array_notation_exprs): Added truth values case. Removed an
7068 unwanted else. Added for-loop to walk through subtrees in default
7069 case.
7070
b066401f
GDR
70712013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
7072
7073 * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
7074
fb48aadc
JM
70752013-07-23 Joseph Myers <joseph@codesourcery.com>
7076
7077 * c-parser.c (struct c_generic_association): Fix typo.
7078
433cc7b0
TT
70792013-07-23 Tom Tromey <tromey@redhat.com>
7080 Joseph Myers <joseph@codesourcery.com>
7081
7082 * c-parser.c (struct c_generic_association): New.
7083 (c_generic_association_d): New typedef.
7084 (c_parser_generic_selection): New function.
7085 (c_parser_postfix_expression): Handle RID_GENERIC.
7086
26d40c3d
JM
70872013-07-13 Jason Merrill <jason@redhat.com>
7088
7089 PR c++/57793
7090 * c-decl.c (finish_struct): Check for too-large class.
7091
ecdbd01a 70922013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
40d3d530
JR
7093
7094 PR c/57821
7095 * c-typeck.c (set_init_index): When folding, check for index overflow.
7096
1141ed3f
BI
70972013-06-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
7098
7099 * c-parser.c (c_parser_array_notation): Removed rejection of array
7100 notations in an array of function pointers.
7101
713b46fa
BI
71022013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
7103
7104 * c-array-notation.c (make_triplet_val_inv): New function.
7105 (create_cmp_incr): Likewise.
7106 (create_array_refs): Likewise.
7107 (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
7108 Also modularized common parts between functions and called the function.
7109 (build_array_notation_expr): Likewise.
7110 (fix_conditional_array_notations_1): Likewise.
7111 (fix_array_notation_expr): Likewise.
7112 (fix_array_notation_call_expr): Likewise.
7113
92f20202
MP
71142013-06-18 Marek Polacek <polacek@redhat.com>
7115
7116 PR c/57630
7117 * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
7118
73a23b06
BI
71192013-06-12 Balaji V. Iyer <balaji.v.iyer@intel.com>
7120
7121 * c-array-notation.c (build_array_notation_expr): Reject array notation
7122 mismatch between LHS and RHS even inside a call_expr. Also, removed
7123 a couple while statements that were dead code.
7124
00b8517d
BI
71252013-06-10 Balaji V. Iyer <balaji.v.iyer@intel.com>
7126
7127 * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
7128 excessive precision expressions in function parameters. Also removed
7129 couple unwanted while statements.
7130
1509bdda
BI
71312013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
7132
7133 * c-array-notation.c (expand_array_notation_exprs): Added
7134 ARRAY_NOTATION_REF case.
ab20d992 7135
d60f1706
BI
71362013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
7137
7138 * c-array-notation.c (length_mismatch_in_expr_p): Moved this
7139 function to c-family/array-notation-common.c.
7140 (is_cilkplus_reduce_builtin): Likewise.
7141 (find_rank): Likewise.
7142 (extract_array_notation_exprs): Likewise.
7143 (replace_array_notations): Likewise.
7144 (find_inv_trees): Likewise.
7145 (replace_inv_trees): Likewise.
7146 (contains_array_notation_expr): Likewise.
7147 (find_correct_array_notation_type): Likewise.
7148 (replace_invariant_exprs): Initialized additional_tcodes to NULL.
7149 (struct inv_list): Moved this to c-family/array-notation-common.c.
7150 * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
ab20d992 7151
6d6efbb3
BI
71522013-06-05 Balaji V. Iyer <balaji.v.iyer@intel.com>
7153
7154 * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
7155 reduction functions outside the for-loop. Added a check if the fundecl
7156 is non-NULL. Finally, removed an unwanted if-statement, and made the
7157 body unconditional.
7158
25c22937
BI
71592013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
7160
7161 * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
7162 condition of the if-statement matches the rank of else-block and then-
7163 block when array notations are used.
7164 * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
7165 expression after the entire function body is parsed.
7166 (c_parser_expr_no_commas): Delayed creating array notation expressions
7167 to the end of function parsing.
7168 * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
7169 whole if-statement instead of just the condition.
ab20d992 7170 (expand_array_notation_exprs): Added MODIFY_EXPR case.
25c22937 7171
edd25645
BI
71722013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
7173
7174 PR c/57474
7175 * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
7176 array to NULL_TREE if they are unused. Also added a check for the
7177 field to be NULL before its fields are used in future.
ab20d992 7178
065ce7f1
RO
71792013-05-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
7180
7181 PR bootstrap/57450
7182 * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
7183 (build_array_notation_expr): Likewise.
7184
36536d79
BI
71852013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
7186
7187 * c-typeck.c (build_array_ref): Added a check to see if array's
7188 index is greater than one. If true, then emit an error.
7189 (build_function_call_vec): Exclude error reporting and checking
7190 for builtin array-notation functions.
7191 (convert_arguments): Likewise.
7192 (c_finish_return): Added a check for array notations as a return
7193 expression. If true, then emit an error.
7194 (c_finish_loop): Added a check for array notations in a loop
7195 condition. If true then emit an error.
7196 (lvalue_p): Added a ARRAY_NOTATION_REF case.
7197 (build_binary_op): Added a check for array notation expr inside
7198 op1 and op0. If present, we call another function to find correct
7199 type.
7200 * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
7201 * c-parser.c (c_parser_compound_statement): Check if array
7202 notation code is used in tree, if so, then transform them into
7203 appropriate C code.
7204 (c_parser_expr_no_commas): Check if array notation is used in LHS
7205 or RHS, if so, then build array notation expression instead of
7206 regular modify.
7207 (c_parser_postfix_expression_after_primary): Added a check for
7208 colon(s) after square braces, if so then handle it like an array
7209 notation. Also, break up array notations in unary op if found.
7210 (c_parser_direct_declarator_inner): Added a check for array
7211 notation.
7212 (c_parser_compound_statement): Added a check for array notation in
7213 a stmt. If one is present, then expand array notation expr.
7214 (c_parser_if_statement): Likewise.
7215 (c_parser_switch_statement): Added a check for array notations in
7216 a switch statement's condition. If true, then output an error.
7217 (c_parser_while_statement): Similarly, but for a while.
7218 (c_parser_do_statement): Similarly, but for a do-while.
7219 (c_parser_for_statement): Similarly, but for a for-loop.
7220 (c_parser_unary_expression): Check if array notation is used in a
7221 pre-increment or pre-decrement expression. If true, then expand
7222 them.
7223 (c_parser_array_notation): New function.
7224 * c-array-notation.c: New file.
7225 * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
ab20d992 7226
cd192ccc
MS
72272013-05-23 Mike Stump <mikestump@comcast.net>
7228
7229 * c-typeck.c (convert_for_assignment): Handle references to memory
7230 spaces better.
7231
427b248d
JM
72322013-05-16 Jason Merrill <jason@redhat.com>
7233
7234 * Make-lang.in (cc1$(exeext)): Use link mutex.
7235
44d90fe1
PC
72362013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
7237
7238 * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
7239 to simply use OPT_Wpointer_arith.
7240 (build_unary_op): Likewise.
7241
4e7d7b3d
JJ
72422013-04-03 Jakub Jelinek <jakub@redhat.com>
7243
7244 PR c/19449
7245 * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
7246 argument. If set, or it temporarily for parsing of the first
7247 argument into force_folding_builtin_constant_p.
7248 (c_parser_postfix_expression): Adjust callers.
7249
839b422f
RB
72502013-03-21 Richard Biener <rguenther@suse.de>
7251
7252 * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
7253 instead of DECL_DEBUG_EXPR_IS_FROM. Guard properly.
7254
2ee028f1
MP
72552013-02-12 Marek Polacek <polacek@redhat.com>
7256
7257 PR c/44938
7258 * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
7259 origtypes to NULL.
7260
8824edff
JJ
72612013-01-24 Jakub Jelinek <jakub@redhat.com>
7262
7263 PR c/56078
7264 * c-typeck.c (set_nonincremental_init_from_string): If
7265 constructor_max_index is NULL, treat it as if tree_int_cst_lt
7266 returned false.
7267 (process_init_element): Likewise.
7268
eadd3d0d
JJ
72692012-12-20 Jakub Jelinek <jakub@redhat.com>
7270
7271 PR c++/55619
7272 * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
7273 argument, don't call default_function_array_conversion
7274 nor c_fully_fold here.
7275 (c_parser_asm_statement): Adjust callers.
7276 * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
7277 and outputs here, and call default_function_array_conversion
7278 on inputs that don't need to be addressable.
7279
f8a93a2e
JJ
72802012-12-18 Jakub Jelinek <jakub@redhat.com>
7281
7282 PR c/39464
7283 * c-typeck.c (convert_for_assignment): For -Wpointer-sign
7284 warning require that both c_common_unsigned_type as well as
7285 c_common_signed_type is the same for both mvl and mvr types.
7286
9771b263
DN
72872012-11-16 Diego Novillo <dnovillo@google.com>
7288
7289 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
7290
7291 * c-common.c: Use new vec API in vec.h.
7292 * c-common.h: Likewise.
7293 * c-gimplify.c: Likewise.
7294 * c-pragma.c: Likewise.
7295 * c-pretty-print.c: Likewise.
7296 * c-pretty-print.h: Likewise.
7297 * c-semantics.c: Likewise.
7298 * c-decl.c: Likewise.
7299 * c-parser.c: Likewise.
7300 * c-tree.h: Likewise.
7301 * c-typeck.c: Likewise.
7302
880661a4
JW
73032012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
7304
7305 PR c++/54930
7306 * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
7307
077d1abe
MLI
73082012-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
7309
7310 PR c/53066
7311 * c-decl.c (warn_if_shadowing): Do not warn if a variable
7312 shadows a function, unless the variable is a function or a
7313 pointer-to-function.
7314
3a785c97
JJ
73152012-10-12 Jakub Jelinek <jakub@redhat.com>
7316
7317 PR c/54381
7318 * c-parser.c (struct c_tree_loc_pair): Removed.
7319 (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
7320 add location_t * and tree * arguments, fill in array of 3
7321 sizeof_arg trees and corresponding locs.
7322 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
7323 c_parser_expr_list callers.
7324 (c_parser_postfix_expression_after_primary): Likewise. Pass
7325 array of 3 sizeof_arg trees and locs (corresponding to first
7326 3 arguments) to sizeof_pointer_memaccess_warning.
7327
703c8606
LC
73282012-10-09 Lawrence Crowl <crowl@google.com>
7329
7330 * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
7331 * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
7332 hash table.
7333
5d9de0d0
PC
73342012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
7335
7336 PR c++/54194
7337 * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
7338 call.
7339
a212e43f
MG
73402012-10-09 Marc Glisse <marc.glisse@inria.fr>
7341
7342 PR c++/54427
7343 * c-typeck.c: Include c-common.h.
7344 (enum stv_conv): Moved to c-common.h.
7345 (scalar_to_vector): Moved to c-common.c.
7346 (build_binary_op): Adapt to scalar_to_vector's new prototype.
7347 * Make-lang.in: c-typeck.c depends on c-common.h.
7348
3b78de56
AC
73492012-10-04 Arnaud Charlet <charlet@adacore.com>
7350
7351 * c-decl.c (c_write_global_declarations): Fix handling of
7352 -fdump-ada-spec*.
7353
78c60e3d
SS
73542012-09-30 Sharad Singhai <singhai@google.com>
7355
7356 * c-decl.c (c_write_global_declarations): Use a different method
7357 to determine if the dump has ben initialized.
7358
9f33203d
JM
73592012-09-14 Joseph Myers <joseph@codesourcery.com>
7360
7361 PR c/54552
7362 * c-typeck.c (c_cast_expr): When casting to a type requiring
7363 C_MAYBE_CONST_EXPR to be created, pass the inner expression to
7364 c_fully_fold first.
7365
a27d595d
JM
73662012-09-14 Joseph Myers <joseph@codesourcery.com>
7367
7368 PR c/54103
7369 * c-typeck.c (build_unary_op): Pass original argument of
7370 TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
7371 any C_MAYBE_CONST_EXPR, if it has integer operands.
7372 (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
7373 TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
7374 to c_objc_common_truthvalue_conversion, then remove any
7375 C_MAYBE_CONST_EXPR, if they have integer operands. Use
7376 c_objc_common_truthvalue_conversion not
7377 c_common_truthvalue_conversion.
7378 (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
7379 call note_integer_operands for arguments with integer operands
7380 that are not integer constants.
7381
9feb29df
JJ
73822012-09-13 Jakub Jelinek <jakub@redhat.com>
7383
7384 PR c/54559
7385 * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
7386 COMPLEX_TYPE with in_late_binary_op set temporarily to true.
7387
d409320c
JJ
73882012-08-31 Jakub Jelinek <jakub@redhat.com>
7389
7390 PR c/54428
7391 * c-convert.c (convert): Don't call fold_convert_loc if
7392 TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
7393 is a COMPLEX_EXPR. Remove TYPE_MAIN_VARIANT check from
7394 COMPLEX_TYPE -> COMPLEX_TYPE conversion.
7395
6265d07c
JJ
73962012-08-24 Jakub Jelinek <jakub@redhat.com>
7397
7398 PR c/54355
7399 * c-decl.c (c_parser_label): Pass true as nested and fix up comments
7400 for nested and empty_ok arguments in the call to
7401 c_parser_declaration_or_fndef.
7402
1a4049e7
JJ
74032012-08-17 Jakub Jelinek <jakub@redhat.com>
7404
7405 * c-tree.h (c_last_sizeof_arg): Declare.
7406 * c-parser.c (struct c_tree_loc_pair): New type.
7407 (c_parser_expr_list): Add sizeof_arg argument. Fill it in if
7408 non-NULL.
7409 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
7410 (c_parser_postfix_expression_after_primary): Likewise. Call
7411 sizeof_pointer_memaccess_warning if needed.
7412 (sizeof_ptr_memacc_comptypes): New function.
7413 * c-typeck.c (c_last_sizeof_arg): New global variable.
7414 (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
7415
0229aee9
UB
74162012-07-24 Uros Bizjak <ubizjak@gmail.com>
7417
7418 * c-lang.h (lang_decl): Add variable_size GTY option.
7419
7ee2468b
SB
74202012-07-16 Steven Bosscher <steven@gcc.gnu.org>
7421
7422 * c-decl.c: Include dumpfile.h instead of tree-dump.h.
7423 * Make-lang.in: Fix dependencies.
7424
d4a10d0a
SB
74252012-06-29 Steven Bosscher <steven@gcc.gnu.org>
7426
7427 * Make-lang.in: New file, rules migrated from gcc/Makefile.in
7428 and add language Makefile hooks.
7429 * config-lang.in: New file.
7430 * c-config-lang.in: Moved from gcc/config-lang.in to here, and
7431 add the required "normal" config-lang.in rules.
7432 * c-lang.h: Moved from gcc/ to here.
7433 * c-tree.h: Likewise.
7434 * c-objc-common.c: Likewise.
7435 * c-objc-common.h: Likewise.
7436 * c-typeck.c: Likewise.
7437 * c-convert.c: Likewise.
7438 * c-lang.c: Likewise.
7439 * c-aux-info.c: Likewise.
7440 * c-errors.c: Likewise.
7441 * gccspec.c: Likewise.
7442 * c-decl.c: Likewise. Include gt-c-c-decl.h, not gt-c-decl.h.
7443 * c-parser.c: Likewise. Include gt-c-c-parser.h, not gt-c-parser.h.
7444\f
c48514be 7445Copyright (C) 2012-2021 Free Software Foundation, Inc.
d4a10d0a
SB
7446
7447Copying and distribution of this file, with or without modification,
7448are permitted in any medium without royalty provided the copyright
7449notice and this notice are preserved.
This page took 3.05878 seconds and 5 git commands to generate.