]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/c/ChangeLog
Daily bump.
[thirdparty/gcc.git] / gcc / c / ChangeLog
CommitLineData
59cf67d1
GA
12021-01-16 Kwok Cheung Yeung <kcy@codesourcery.com>
2
3 * c-parser.c (c_parser_omp_clause_detach): New.
4 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_DETACH clause.
5 (OMP_TASK_CLAUSE_MASK): Add mask for PRAGMA_OMP_CLAUSE_DETACH.
6 * c-typeck.c (c_finish_omp_clauses): Handle PRAGMA_OMP_CLAUSE_DETACH
7 clause. Prevent use of detach with mergeable and overriding the
8 data sharing mode of the event handle.
9
2f7f0d32
GA
102021-01-15 Jakub Jelinek <jakub@redhat.com>
11
12 * c-typeck.c (c_finish_omp_clauses): For reduction build array with
13 unqualified element type and then call c_build_qualified_type on the
14 ARRAY_TYPE.
15
7d187e4f
GA
162021-01-07 Richard Biener <rguenther@suse.de>
17
18 * gimple-parser.c (c_parser_gimple_compound_statement): Only
19 reallocate loop array if it is too small.
20
eefe499f
GA
212020-12-16 Martin Uecker <muecker@gwdg.de>
22
23 PR c/98047
24 * c-typeck.c (build_modify_expr): Drop qualifiers.
25
262020-12-16 Martin Uecker <muecker@gwdg.de>
27
28 PR c/98260
29 * c-parser.c (c_parser_expression): Look into
30 nop expression when marking expressions as read.
31
d52945ce
GA
322020-12-14 Martin Liska <mliska@suse.cz>
33
34 PR sanitizer/98204
35 * c-typeck.c (pointer_diff): Do not emit a top-level
36 sanitization.
37 (build_binary_op): Likewise.
38
ca2bd949
GA
392020-12-09 Tobias Burnus <tobias@codesourcery.com>
40
41 * c-parser.c (c_parser_omp_allocate): New.
42 (c_parser_omp_construct): Call it.
43
442020-12-09 Richard Biener <rguenther@suse.de>
45
46 PR c/98200
47 * gimple-parser.c (c_parser_gimple_postfix_expression): Return
48 early on error.
49
bc8a7013
GA
502020-12-07 Martin Uecker <muecker@gwdg.de>
51
52 PR c/97981
53 * c-typeck.c (convert_lvalue_to_rvalue): Move the code
54 that drops qualifiers to the end of the function.
55
d48df6f2
GA
562020-11-26 Martin Uecker <muecker@gwdg.de>
57
58 PR c/65455
59 PR c/92935
60 * c-parser.c (c_parser_declaration_or_fndef): Remove
61 redundant code to drop qualifiers of _Atomic types for __auto_type.
62 (c_parser_typeof_specifier): Do not drop qualifiers of _Atomic
63 types for __typeof__.
64
1e2c9a27
GA
652020-11-24 Jakub Jelinek <jakub@redhat.com>
66
67 PR c/97958
68 * c-parser.c (c_parser_binary_expression): For omp atomic binary
69 expressions, use make_node instead of build2 to avoid checking build2
70 performs.
71
8e6198d0
GA
722020-11-23 Joseph Myers <joseph@codesourcery.com>
73
74 PR c/95630
75 * c-typeck.c (build_binary_op): Use pedwarn_c99 with OPT_Wpedantic
76 for comparisons of complete and incomplete pointers.
77
7a97e2fc
GA
782020-11-21 Aaron Sawdey <acsawdey@linux.ibm.com>
79
80 * c-aux-info.c (gen_type): Support opaque types.
81
82e5048e
GA
822020-11-20 Martin Sebor <msebor@redhat.com>
83
84 PR middle-end/97879
85 * c-decl.c (start_function): Set ATTR_FLAG_INTERNAL in flags.
86
872020-11-20 Jakub Jelinek <jakub@redhat.com>
88
89 PR other/97911
90 * Make-lang.in (c.serial): Change from goal to a variable.
91 (.PHONY): Drop c.serial.
92
932020-11-20 Martin Uecker <muecker@gwdg.de>
94
95 * c-typeck.c (convert_lvalue_to_rvalue): Drop qualifiers.
96
d62586ee
GA
972020-11-19 Jakub Jelinek <jakub@redhat.com>
98
99 PR c/97860
100 * c-decl.c (get_parm_array_spec): Bail out of nelts is
101 error_operand_p.
102
25bb75f8
GA
1032020-11-18 Jakub Jelinek <jakub@redhat.com>
104
105 * Make-lang.in (c.serial): New goal.
106 (.PHONY): Add c.serial c.prev.
107 (cc1$(exeext)): Call LINK_PROGRESS.
108
77f67db2
GA
1092020-11-13 Vladimir N. Makarov <vmakarov@redhat.com>
110
111 * c-parser.c (c_parser_asm_statement): Parse outputs for asm
112 goto too.
113 * c-typeck.c (build_asm_expr): Remove an assert checking output
114 absence for asm goto.
115
1162020-11-13 Jakub Jelinek <jakub@redhat.com>
117
118 * c-typeck.c (c_finish_omp_clauses): Don't clear
119 OMP_CLAUSE_REDUCTION_INSCAN unless reduction_seen == -2.
120
1212020-11-13 Iain Sandoe <iain@sandoe.co.uk>
122
123 PR objc/77404
124 * c-parser.c (c_parser_objc_class_definition): Pass the
125 location of the class name to the interface declaration.
126
bb622641
GA
1272020-11-10 Strager Neds <strager.nds@gmail.com>
128
129 * c-decl.c (merge_decls): Use new overload of
130 set_decl_section_name.
131
1322020-11-10 Chung-Lin Tang <cltang@codesourcery.com>
133
134 * c-parser.c (c_parser_omp_target_data): Add use of
135 new c_omp_adjust_map_clauses function. Add GOMP_MAP_ATTACH_DETACH as
136 handled map clause kind.
137 (c_parser_omp_target_enter_data): Likewise.
138 (c_parser_omp_target_exit_data): Likewise.
139 (c_parser_omp_target): Likewise.
140 * c-typeck.c (handle_omp_array_sections): Adjust COMPONENT_REF case to
141 use GOMP_MAP_ATTACH_DETACH map kind for C_ORT_OMP region type.
142 (c_finish_omp_clauses): Adjust bitmap checks to allow struct decl and
143 same struct field access to co-exist on OpenMP construct.
144
2da7ee05
GA
1452020-11-07 Martin Uecker <muecker@gwdg.de>
146
147 * c-parser.c (c_parser_label): Implement mixing of labels and code.
148 (c_parser_all_labels): Likewise.
149
44cab2d8
GA
1502020-11-06 Iain Sandoe <iain@sandoe.co.uk>
151
152 * c-parser.c (c_parser_objc_at_property_declaration):
153 Improve parsing fidelity. Associate better location info
154 with @property attributes. Clean up the interface to
155 objc_add_property_declaration ().
156
1572020-11-06 Nathan Sidwell <nathan@acm.org>
158
159 * c-decl.c (diagnose_mismatched_decls): Rename
160 DECL_IS_BUILTIN->DECL_IS_UNDECLARED_BUILTIN.
161 (warn_if_shadowing, implicitly_declare, names_builtin_p)
162 (collect_source_refs): Likewise.
163 * c-typeck.c (inform_declaration, inform_for_arg)
164 (convert_for_assignment): Likewise.
165
1662020-11-06 Tobias Burnus <tobias@codesourcery.com>
167
168 * c-parser.c (c_parser_omp_atomic): Add openacc parameter and update
169 OpenACC matching.
170 (c_parser_omp_construct): Update call.
171
35c125cb
GA
1722020-11-04 Jakub Jelinek <jakub@redhat.com>
173
174 PR c++/97670
175 * c-typeck.c (c_finish_omp_clauses): Look through array reductions to
176 find underlying decl to clear in the aligned_head bitmap.
177
1782020-11-04 Joseph Myers <joseph@codesourcery.com>
179
180 * c-decl.c (handle_nodiscard_attribute): New.
181 (std_attribute_table): Add nodiscard.
182 * c-parser.c (c_parser_std_attribute): Expect argument to
183 nodiscard attribute to be a string. Do not special-case ignoring
184 nodiscard.
185 * c-typeck.c (maybe_warn_nodiscard): New.
186 (build_compound_expr, emit_side_effect_warnings): Call
187 maybe_warn_nodiscard.
188 (c_process_expr_stmt, c_finish_stmt_expr): Also call
189 emit_side_effect_warnings if warn_unused_result.
190
4f0606fe
GA
1912020-10-29 Asher Gordon <AsDaGo@posteo.net>
192
193 * c-typeck.c (free_all_tagged_tu_seen_up_to): Replace free
194 with XDELETE.
195 (finish_init): Likewise.
196 (pop_init_level): Likewise.
197
e93aae4a
GA
1982020-10-28 Joseph Myers <joseph@codesourcery.com>
199
200 * c-decl.c (store_parm_decls_newstyle): Use pedwarn_c11 not
201 error_at for omitted parameter name.
202
2032020-10-28 Jakub Jelinek <jakub@redhat.com>
204
205 * c-parser.c (c_parser_omp_clause_name): Handle allocate.
206 (c_parser_omp_clause_allocate): New function.
207 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_ALLOCATE.
208 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
209 OMP_PARALLEL_CLAUSE_MASK, OMP_SINGLE_CLAUSE_MASK,
210 OMP_TASK_CLAUSE_MASK, OMP_TASKGROUP_CLAUSE_MASK,
211 OMP_DISTRIBUTE_CLAUSE_MASK, OMP_TEAMS_CLAUSE_MASK,
212 OMP_TARGET_CLAUSE_MASK, OMP_TASKLOOP_CLAUSE_MASK): Add
213 PRAGMA_OMP_CLAUSE_ALLOCATE.
214 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_ALLOCATE.
215
89bb01e7
GA
2162020-10-27 Joseph Myers <joseph@codesourcery.com>
217
218 * c-parser.c (c_parser_std_attribute_specifier): Allow duplicate
219 standard attributes.
220
efe71fcc
GA
2212020-10-23 Marek Polacek <polacek@redhat.com>
222
223 PR c++/91741
224 * c-parser.c (c_parser_binary_expression): Implement -Wsizeof-array-div.
225 (c_parser_postfix_expression): Set PAREN_SIZEOF_EXPR.
226 (c_parser_expr_list): Handle PAREN_SIZEOF_EXPR like SIZEOF_EXPR.
227 * c-tree.h (char_type_p): Declare.
228 * c-typeck.c (char_type_p): No longer static.
229
2302020-10-23 Martin Sebor <msebor@redhat.com>
231
232 PR middle-end/97552
233 * c-decl.c (get_parm_array_spec): Handle static VLA parameters.
234
2fe5b7d1
GA
2352020-09-19 Martin Sebor <msebor@redhat.com>
236
237 PR c/50584
238 * c-decl.c (lookup_last_decl): Define new function.
239 (c_decl_attributes): Call it.
240 (start_decl): Add argument and use it.
241 (finish_decl): Call build_attr_access_from_parms and decl_attributes.
242 (get_parm_array_spec): Define new function.
243 (push_parm_decl): Call get_parm_array_spec.
244 (start_function): Call warn_parm_array_mismatch. Build attribute
245 access and add it to current function.
246 * c-parser.c (c_parser_declaration_or_fndef): Diagnose mismatches
247 in forms of array parameters.
248 * c-tree.h (start_decl): Add argument.
249
2502020-09-19 Sandra Loosemore <sandra@codesourcery.com>
251
252 * c-decl.c (c_break_label, c_cont_label): Delete, and replace
253 with...
254 (in_statement): New.
255 (start_function): Adjust for above change.
256 (c_push_function_context, c_pop_function_context): Likewise.
257 * c-lang.h (struct language_function): Likewise.
258 * c-objc-common.h (LANG_HOOKS_BLOCK_MAY_FALLTHRU): Define.
259 * c-parser.c (objc_foreach_break_label, objc_foreach_continue_label):
260 New.
261 (c_parser_statement_after_labels): Adjust calls to c_finish_bc_stmt.
262 (c_parser_switch_statement): Adjust break/switch context handling
263 and calls to renamed functions.
264 (c_parser_while_statement): Adjust break/switch context handling and
265 build a WHILE_STMT.
266 (c_parser_do_statement): Ditto, with DO_STMT respectively.
267 (c_parser_for_statement): Ditto, with FOR_STMT respectively.
268 (c_parser_omp_for_loop): Adjust break/switch context handling.
269 * c-tree.h (c_break_label, c_cont_label): Delete.
270 (IN_SWITCH_STMT, IN_ITERATION_STMT): Define.
271 (IN_OMP_BLOCK, IN_OMP_FOR, IN_OBJC_FOREACH): Define.
272 (in_statement, switch_statement_break_seen_p): Declare.
273 (c_start_case, c_finish_case): Renamed to...
274 (c_start_switch, c_finish_switch).
275 (c_finish_bc_stmt): Adjust arguments.
276 * c-typeck.c (build_function_call_vec): Don't try to print
277 statements with %qE format.
278 (struct c_switch): Rename switch_expr field to switch_stmt.
279 Add break_stmt_seen_p field.
280 (c_start_case): Rename to c_start_switch. Build a SWITCH_STMT
281 instead of a SWITCH_EXPR. Update for changes to struct c_switch.
282 (do_case): Update for changes to struct c_switch.
283 (c_finish_case): Rename to c_finish_switch. Update for changes to
284 struct c_switch and change of representation from SWITCH_EXPR to
285 SWITCH_STMT.
286 (c_finish_loop): Delete.
287 (c_finish_bc_stmt): Update to reflect changes to break/continue
288 state representation. Build a BREAK_STMT or CONTINUE_STMT instead
289 of a GOTO_EXPR except for objc foreach loops.
290
e1a4a8a0
GA
2912020-09-01 Jakub Jelinek <jakub@redhat.com>
292
293 PR c++/96867
294 * c-typeck.c (handle_omp_array_sections_1): Test C_ARRAY_PARAMETER
295 only on PARM_DECLs.
296
8f7ea26a
GA
2972020-08-28 Martin Sebor <msebor@redhat.com>
298
299 PR c/96596
300 * c-decl.c (match_builtin_function_types): Avoid dealing with erroneous
301 argument type.
302
8b394f01
GA
3032020-08-27 Martin Liska <mliska@suse.cz>
304
305 * gimple-parser.c (c_parser_gimple_compound_statement): Set exact argument of a vector
306 growth function to true.
307
db0f6efe
GA
3082020-08-25 Tobias Burnus <tobias@codesourcery.com>
309
310 PR c/96678
311 * c-typeck.c (handle_omp_array_sections_1): Talk about
312 array function parameter in the error message.
313
5c265693
GA
3142020-08-18 Jakub Jelinek <jakub@redhat.com>
315
316 PR c/96571
317 * c-parser.c (c_parser_generic_selection): Change match_found from bool
318 to int, holding index of the match. Call mark_exp_read on the selector
319 expression and on expressions other than the selected one.
320
4967ca2f
GA
3212020-08-01 Richard Sandiford <richard.sandiford@arm.com>
322
323 PR c/96377
324 * c-typeck.c (process_init_element): Split test for whether to
325 recurse into a record, union or array into...
326 (initialize_elementwise_p): ...this new function. Don't recurse
327 into a vector type if the initialization value is also a vector.
328
48cc2e46
GA
3292020-07-31 Richard Biener <rguenther@suse.de>
330
331 PR debug/96383
332 * c-objc-common.h (LANG_HOOKS_FINALIZE_EARLY_DEBUG):
333 Define to c_common_finalize_early_debug.
334
3ea9abca
GA
3352020-07-22 Tobias Burnus <tobias@codesourcery.com>
336
337 * c-parser.c (c_parser_omp_clause_hint): Require nonnegative hint clause.
338 (c_parser_omp_critical): Permit hint(0) clause without named critical.
339 (c_parser_omp_construct): Don't assert if error_mark_node is returned.
340
30430061
GA
3412020-07-21 Sunil K Pandey <skpgkp2@gmail.com>
342
343 PR target/95237
344 * c-decl.c (finish_decl): Call target hook
345 lower_local_decl_alignment to lower local decl alignment.
346
3f8ca9cb
GA
3472020-07-09 Julian Brown <julian@codesourcery.com>
348 Thomas Schwinge <thomas@codesourcery.com>
349
350 PR middle-end/95270
351 * c-typeck.c (c_finish_omp_clauses): Set OMP_CLAUSE_SIZE (bias) to zero
352 for standalone attach/detach clauses.
353
a82c4c4c 3542020-07-08 Eric Botcazou <ebotcazou@adacore.com>
50873cc5
GA
355
356 * c-typeck.c (convert_for_assignment): If -Wscalar-storage-order is
357 set, warn for conversion between pointers that point to incompatible
358 scalar storage orders.
359
f60ee68d
GA
3602020-07-07 Kaipeng Zhou <zhoukaipeng3@huawei.com>
361
362 * c-parser.c (c_parser_statement_after_labels): Pass correct
363 parameters to c_parser_do_statement.
364
56638b9b
GA
3652020-06-16 Jakub Jelinek <jakub@redhat.com>
366
367 * c-parser.c (c_parser_expr_no_commas): Save, clear and restore
368 c_in_omp_for.
369 (c_parser_omp_for_loop): Set c_in_omp_for around some calls to avoid
370 premature c_fully_fold. Defer explicit c_fully_fold calls to after
371 c_finish_omp_for.
372 * c-tree.h (c_in_omp_for): Declare.
373 * c-typeck.c (c_in_omp_for): Define.
374 (build_modify_expr): Avoid c_fully_fold if c_in_omp_for.
375 (digest_init): Likewise.
376 (build_binary_op): Likewise.
377
3782020-06-16 Jakub Jelinek <jakub@redhat.com>
379
380 * c-parser.c (c_parser_omp_clause_schedule): Reject modifier separated
381 from kind by comma rather than colon.
382
1a59f3db
GA
3832020-06-05 Mark Wielaard <mark@klomp.org>
384
385 * c-decl.c (implicit_decl_warning): When warned and olddecl is
386 an undeclared builtin, then add a fixit header hint, if found.
387 (implicitly_declare): Add OPT_Wbuiltin_declaration_mismatch to
388 warning_at about implicit builtin declaration type mismatch.
389
9a5b7438
GA
3902020-06-03 Mark Wielaard <mark@klomp.org>
391
392 * c-parser.c (struct c_parser): Add seen_string_literal
393 bitfield.
394 (c_parser_consume_token): Reset seen_string_literal.
395 (c_parser_error_richloc): Add name_hint if seen_string_literal
396 and next token is a CPP_NAME and we have a missing header
397 suggestion for the name.
398 (c_parser_string_literal): Set seen_string_literal.
399
4002020-06-03 Mark Wielaard <mark@klomp.org>
401
402 * c-parser.c (c_parser_postfix_expression_after_primary): Add
403 scope with matching_parens after CPP_OPEN_PAREN.
404
4052020-06-03 Tobias Burnus <tobias@codesourcery.com>
406
407 * c-objc-common.h (LANG_HOOKS_OMP_PREDETERMINED_MAPPING): Redefine.
408
53ffb43a
GA
4092020-05-28 Nicolas Bértolo <nicolasbertolo@gmail.com>
410
411 * Make-lang.in: Remove extra slash.
412
8f66f175
ML
4132020-05-19 Martin Liska <mliska@suse.cz>
414
415 * c-parser.c: Fix typo.
416
49ddde69
JJ
4172020-05-14 Jakub Jelinek <jakub@redhat.com>
418
419 * c-parser.c (c_parser_omp_target): Set cfun->has_omp_target.
420
eb72dc66
RB
4212020-05-07 Richard Biener <rguenther@suse.de>
422
423 PR middle-end/94703
424 * gimple-parser.c (c_parser_parse_ssa_name): Do not set
425 DECL_GIMPLE_REG_P.
426
bf915591
JJ
4272020-04-30 Jakub Jelinek <jakub@redhat.com>
428
429 PR c/94842
430 * c-decl.c (set_labels_context_r): In addition to context-less
431 LABEL_DECLs adjust also LABEL_DECLs with context equal to
432 parent function if any.
433 (store_parm_decls): Adjust comment.
434
e1113ffb
JJ
4352020-04-19 Jakub Jelinek <jakub@redhat.com>
436
437 PR objc/94637
438 * c-parser.c (c_parser_objc_selector_arg): Handle CPP_SCOPE like
439 two CPP_COLON tokens.
440
2e389749
JJ
4412020-04-17 Jakub Jelinek <jakub@redhat.com>
442
443 PR other/94629
444 * c-parser.c (c_parser_oacc_routine): Remove redundant assignment
445 to data.clauses.
446
2dc9294c
JJ
4472020-04-15 Jakub Jelinek <jakub@redhat.com>
448
449 PR c/94593
450 * c-parser.c (c_parser_pragma) <case PRAGMA_OMP_REQUIRES>: Reject
451 requires directive when not at file scope.
452
13e41d8b
TB
4532020-04-08 Tobias Burnus <tobias@codesourcery.com>
454
455 PR middle-end/94120
456 * c-decl.c (c_check_in_current_scope): New function.
457 * c-tree.h (c_check_in_current_scope): Declare it.
458 * c-parser.c (c_parser_oacc_declare): Add check that variables
459 are declared in the same scope as the directive. Fix handling
460 of namespace vars.
461
4df50a05
JJ
4622020-04-07 Jakub Jelinek <jakub@redhat.com>
463
464 PR c++/94512
465 * c-parser.c (c_parser_omp_parallel): Set OMP_PARALLEL_COMBINED
466 if c_parser_omp_master succeeded.
467
5db9e893
JJ
4682020-03-23 Jakub Jelinek <jakub@redhat.com>
469
470 PR gcov-profile/94029
471 PR c/94239
472 * c-parser.c (c_parser_declaration_or_fndef): Initialize endloc to
473 the function_start_locus location. Don't do that afterwards for the
474 __GIMPLE body parsing.
475
9def91e9
JJ
4762020-03-19 Jakub Jelinek <jakub@redhat.com>
477
478 PR gcov-profile/94029
479 * c-tree.h (finish_function): Add location_t argument defaulted to
480 input_location.
481 * c-parser.c (c_parser_compound_statement): Add endlocp argument and
482 set it to the locus of closing } if non-NULL.
483 (c_parser_compound_statement_nostart): Return locus of closing }.
484 (c_parser_parse_rtl_body): Likewise.
485 (c_parser_declaration_or_fndef): Propagate locus of closing } to
486 finish_function.
487 * c-decl.c (finish_function): Add end_loc argument, use it instead of
488 input_location to set function_end_locus.
489
046c5890
JJ
4902020-03-17 Jakub Jelinek <jakub@redhat.com>
491
492 PR c/94172
493 * c-tree.h (C_TYPE_INCOMPLETE_VARS): Define to TYPE_LANG_SLOT_1
494 instead of TYPE_VFIELD, and support it on {RECORD,UNION,ENUMERAL}_TYPE.
495 (TYPE_ACTUAL_ARG_TYPES): Check that it is only used on FUNCTION_TYPEs.
496 * c-decl.c (pushdecl): Push C_TYPE_INCOMPLETE_VARS also to
497 ENUMERAL_TYPEs.
498 (finish_incomplete_vars): New function, moved from finish_struct. Use
499 relayout_decl instead of layout_decl.
500 (finish_struct): Remove obsolete comment about C_TYPE_INCOMPLETE_VARS
501 being TYPE_VFIELD. Use finish_incomplete_vars.
502 (finish_enum): Clear C_TYPE_INCOMPLETE_VARS. Call
503 finish_incomplete_vars.
504 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
505 also on ENUMERAL_TYPEs.
506
c015ff8c
JJ
5072020-03-16 Jakub Jelinek <jakub@redhat.com>
508
509 PR c/94179
510 * c-fold.c (c_fully_fold_internal): Handle MEM_REF.
511
f2e9fe5f
MS
5122020-03-13 Martin Sebor <msebor@redhat.com>
513
514 PR c/94040
515 * c-decl.c (builtin_structptr_type_count): New constant.
516 (match_builtin_function_types): Reject decls that are incompatible
517 in types pointed to by pointers.
518 (diagnose_mismatched_decls): Adjust comments.
519
c9d70946
JM
5202020-03-05 Joseph Myers <joseph@codesourcery.com>
521
522 PR c/93577
523 * c-typeck.c (pop_init_level): Do not diagnose initializers as
524 empty when initialized type is error_mark_node.
525 (set_designator, process_init_element): Ignore initializers for
526 elements of a variable-size type or of error_mark_node.
527
726e292d
MS
5282020-03-01 Martin Sebor <msebor@redhat.com>
529
530 PR middle-end/93926
531 * c-decl.c (types_close_enough_to_match): New function.
532 (match_builtin_function_types):
533 (diagnose_mismatched_decls): Add missing inform call to a warning.
534
a499c2f8
MS
5352020-03-01 Martin Sebor <msebor@redhat.com>
536
537 PR c/93812
538 * c-typeck.c (build_functype_attribute_variant): New function.
539 (composite_type): Call it.
540
9c3da8cc
JJ
5412020-02-25 Jakub Jelinek <jakub@redhat.com>
542
543 PR other/93912
544 * gimple-parser.c (c_parser_gimple_parse_bb_spec_edge_probability):
545 Rename last argument from probablity to probability.
546
bacdd5e9
JJ
5472020-02-13 Jakub Jelinek <jakub@redhat.com>
548
549 PR c/93576
550 * c-decl.c (grokdeclarator): If this_size_varies, only push size into
551 *expr if it has side effects.
552
f9eb0973
JL
5532020-01-30 Jeff Law <law@redhat.com>
554
555 PR c/88660
556 * c-parser.c (c_parser_switch_statement): Make sure to request
557 marking the switch expr as used.
558
ac68e287
JM
5592020-01-22 Joseph Myers <joseph@codesourcery.com>
560
561 PR c/93348
562 * c-typeck.c (build_c_cast): Call remove_c_maybe_const_expr on
563 argument with integer operands.
564
852f0ae8
KK
5652020-01-16 Kerem Kat <keremkat@gmail.com>
566
567 PR c/92833
568 * c-parser.c (c_parser_consume_token): Fix peeked token stack pop
569 to support 4 available tokens.
570
e2346a33
JM
5712020-01-15 Joseph Myers <joseph@codesourcery.com>
572
573 PR c/93072
574 * c-decl.c (pushdecl): Use TREE_PUBLIC, not DECL_EXTERNAL, to
575 determine whether to set DECL_CONTEXT.
576
3d77686d
JM
5772020-01-13 Joseph Myers <joseph@codesourcery.com>
578
579 PR c/93241
580 * c-typeck.c (build_c_cast): Check for expressions with integer
581 operands that can occur in an unevaluated part of an integer
582 constant expression and call note_integer_operands as needed.
583
f74c4b2c
RB
5842019-01-08 Richard Biener <rguenther@suse.de>
585
586 PR middle-end/93199
587 * gimple-parser.c (c_parser_parse_gimple_body): Remove __PHI IFN
588 permanently.
589
8d9254fc
JJ
5902020-01-01 Jakub Jelinek <jakub@redhat.com>
591
592 Update copyright years.
593
39292e25
EB
5942019-12-20 Eric Botcazou <ebotcazou@adacore.com>
595
596 * c-decl.c (collect_source_ref_cb): Delete.
597 (for_each_global_decl): Rename into...
598 (collect_source_refs): ...this. Call collect_source_ref directly.
599 (c_parse_final_cleanups): Always call collect_source_ref on the main
600 input filename.
601
519d7496
JB
6022019-12-19 Julian Brown <julian@codesourcery.com>
603 Cesar Philippidis <cesar@codesourcery.com>
604
605 * c-parser.c (c_parser_omp_clause_name): Add parsing of attach and
606 detach clauses.
607 (c_parser_omp_variable_list): Add ALLOW_DEREF optional parameter.
608 Allow deref (->) in variable lists if true.
609 (c_parser_omp_var_list_parens): Add ALLOW_DEREF optional parameter.
610 Pass to c_parser_omp_variable_list.
611 (c_parser_oacc_data_clause): Support attach and detach clauses. Update
612 call to c_parser_omp_variable_list.
613 (c_parser_oacc_all_clauses): Support attach and detach clauses.
614 (OACC_DATA_CLAUSE_MASK, OACC_ENTER_DATA_CLAUSE_MASK,
615 OACC_KERNELS_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK,
616 OACC_SERIAL_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_ATTACH.
617 (OACC_EXIT_DATA_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_DETACH.
618 * c-typeck.c (handle_omp_array_sections_1): Reject subarrays for attach
619 and detach. Support deref.
620 (handle_omp_array_sections): Use GOMP_MAP_ATTACH_DETACH instead of
621 GOMP_MAP_ALWAYS_POINTER for OpenACC.
622 (c_oacc_check_attachments): New function.
623 (c_finish_omp_clauses): Check attach/detach arguments for being
624 pointers using above. Support deref.
625
a6163563
JB
6262019-12-19 Julian Brown <julian@codesourcery.com>
627 Maciej W. Rozycki <macro@codesourcery.com>
628 Tobias Burnus <tobias@codesourcery.com>
629 Thomas Schwinge <thomas@codesourcery.com>
630
631 * c-parser.c (c_parser_omp_clause_name): Support no_create.
632 (c_parser_oacc_data_clause): Likewise.
633 (c_parser_oacc_all_clauses): Likewise.
634 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
635 (OACC_PARALLEL_CLAUSE_MASK, OACC_SERIAL_CLAUSE_MASK): Add
636 PRAGMA_OACC_CLAUSE_NO_CREATE.
637 * c-typeck.c (handle_omp_array_sections): Support
638 GOMP_MAP_NO_ALLOC.
639
d68f5d45
DM
6402019-12-09 David Malcolm <dmalcolm@redhat.com>
641
642 * c-objc-common.c (range_label_for_type_mismatch::get_text):
643 Replace label_text ctor calls.
644
4691bf46
JM
6452019-12-04 Joseph Myers <joseph@codesourcery.com>
646
647 PR c/36941
648 PR c/88827
649 * c-typeck.c (convert_lvalue_to_rvalue): Call
650 require_complete_type for arguments not of void types.
651 (build_indirect_ref): Do not diagnose dereferencing pointers to
652 incomplete types.
653 * c-tree.h (C_TYPE_ERROR_REPORTED): Remove.
654
85d11957
JM
6552019-12-03 Joseph Myers <joseph@codesourcery.com>
656
657 PR c/88704
658 * c-decl.c (store_parm_decls_oldstyle): Diagnose use of [*] in
659 old-style parameter definitions.
660
4569f8b3
SL
6612019-12-01 Sandra Loosemore <sandra@codesourcery.com>
662
663 PR target/92499
664
665 * c-decl.c (flexible_array_type_p): Move to common code.
666
65ef05d0
RS
6672019-11-30 Richard Sandiford <richard.sandiford@arm.com>
668
669 * c-decl.c (start_decl): Allow initialization of variables whose
670 size is a POLY_INT_CST.
671 (finish_decl): Use verify_type_context to check whether the target
672 allows variables with a particular type to have static or thread-local
673 storage duration. Don't raise a second error if such variables do
674 not have a constant size.
675 (grokdeclarator): Use verify_type_context to check whether the
676 target allows fields or array elements to have a particular type.
677 * c-typeck.c (pointer_diff): Use verify_type_context to test whether
678 the target allows pointer difference for the types involved.
679 (build_unary_op): Likewise for pointer increment and decrement.
680
34b43828
JM
6812019-11-29 Joseph Myers <joseph@codesourcery.com>
682
683 * c-parser.c (struct c_parser): Add members raw_tokens and
684 raw_tokens_used.
685 (c_lex_one_token): Add argument raw. Handle lexing raw tokens and
686 using previously-lexed raw tokens.
687 (c_parser_peek_nth_token_raw)
688 (c_parser_check_balanced_raw_token_sequence): New functions.
689 (c_parser_nth_token_starts_std_attributes): Use
690 c_parser_check_balanced_raw_token_sequence for Objective-C.
691
5b8d9367
JM
6922019-11-25 Joseph Myers <joseph@codesourcery.com>
693
694 PR c/91985
695 * c-decl.c (finish_declspecs): Use int instead of decimal
696 floating-point types if decimal floating-point not supported.
697
1723e1be
JM
6982019-11-25 Joseph Myers <joseph@codesourcery.com>
699
700 * c-tree.h (struct c_declarator): Use a structure for id member.
701 * c-decl.c (grokdeclarator): Extract attributes from cdk_id
702 declarators at the start, not when handling individual declarators
703 later. Use u.id.id instead of u.id.
704 (grokfield): Use u.id.id instead of u.id.
705 (build_id_declarator): Set u.id.id and u.id.attrs.
706 (finish_declspecs): Handle postfix attributes in case of typedef
707 name or typeof used.
708 * c-parser.c (c_parser_direct_declarator)
709 (c_parser_direct_declarator_inner): Place declarator for
710 attributes inside that for function or array, not outside. Set
711 u.id.attrs for identifiers.
712 (c_parser_parameter_declaration): Use u.id.id instead of u.id.
713 * gimple-parser.c (c_parser_gimple_declaration): Use u.id.id
714 instead of u.id.
715
bdaf8be1
JJ
7162019-11-22 Jakub Jelinek <jakub@redhat.com>
717
718 PR c/90677
719 * c-decl.c (identifier_global_tag): Define.
720
3e00ba47
RB
7212019-11-20 Richard Biener <rguenther@suse.de>
722
723 PR c/92088
724 * c-decl.c (grokdeclarator): Prevent inlining of nested
725 function with VLA arguments.
726
8c5b727a
JM
7272019-11-20 Joseph Myers <joseph@codesourcery.com>
728
729 * c-decl.c (c_warn_type_attributes): New function.
730 (groktypename, grokdeclarator, finish_declspecs): Call
731 c_warn_type_attributes before applying attributes to types.
732 * c-tree.h (c_warn_type_attributes): Declare.
733
192961ff
JM
7342019-11-19 Joseph Myers <joseph@codesourcery.com>
735
736 * c-decl.c (c_warn_unused_attributes): Use pedwarn not warning for
737 standard attributes.
738 * c-parser.c (c_parser_std_attribute): Take argument for_tm. Use
739 pedwarn for unknown standard attributes and return error_mark_node
740 for them.
741
20a38017
MM
7422019-11-18 Matthew Malcomson <matthew.malcomson@arm.com>
743
744 * c-parser.c (c_parser_parse_rtl_body): Always call
745 run_rtl_passes, even if startwith pass is not provided.
746
d5fbe5e0
JM
7472019-11-15 Joseph Myers <joseph@codesourcery.com>
748
749 * c-parser.c (c_parser_std_attribute_specifier): Diagnose
750 duplicate standard attributes.
751
97cc1187
JM
7522019-11-15 Joseph Myers <joseph@codesourcery.com>
753
754 * c-decl.c (std_attribute_table): Add maybe_unused.
755
f8aea5e3
JM
7562019-11-15 Joseph Myers <joseph@codesourcery.com>
757
758 * c-decl.c (std_attribute_table): Add fallthrough.
759 * c-parser.c (c_parser_declaration_or_fndef): Diagnose fallthrough
760 attribute at top level.
761
2cc94aa8
JM
7622019-11-15 Joseph Myers <joseph@codesourcery.com>
763
764 * c-decl.c (std_attribute_table): New.
765 (c_init_decl_processing): Register attributes from
766 std_attribute_table.
767 * c-parser.c (c_parser_attribute_arguments): Add arguments
768 require_string and allow_empty_args. All callers changed.
769 (c_parser_std_attribute): Set require_string argument for
770 "deprecated" attribute.
771
7c5890cc
JM
7722019-11-14 Joseph Myers <joseph@codesourcery.com>
773
774 * c-parser.c (c_parser_postfix_expression)
775 (c_parser_check_literal_zero): Handle CPP_UTF8CHAR.
776 * gimple-parser.c (c_parser_gimple_postfix_expression): Likewise.
777
e8738f4e
RS
7782019-11-14 Richard Sandiford <richard.sandiford@arm.com>
779
780 * c-typeck.c (build_conditional_expr): Use truth_type_for instead
781 of build_same_sized_truth_vector_type.
782 (build_vec_cmp): Likewise.
783
b2417b59
JJ
7842019-11-14 Jakub Jelinek <jakub@redhat.com>
785
bedb7f04
JJ
786 * c-parser.c (c_parser_omp_context_selector): Don't require score
787 argument to fit into shwi, just to be INTEGER_CST. Diagnose
788 negative score.
789
b2417b59
JJ
790 * c-parser.c (c_parser_omp_context_selector): Rename
791 CTX_PROPERTY_IDLIST to CTX_PROPERTY_NAME_LIST, add CTX_PROPERTY_ID.
792 Use CTX_PROPERTY_ID for atomic_default_mem_order, only allow a single
793 identifier in that. For CTX_PROPERTY_NAME_LIST, allow identifiers
794 and string literals.
795
4e03c3a7
JM
7962019-11-14 Joseph Myers <joseph@codesourcery.com>
797
798 * c-tree.h (enum c_typespec_kind): Add ctsk_tagref_attrs and
799 ctsk_tagfirstref_attrs.
800 (struct c_declspecs): Update description of attrs. Add
801 postfix_attrs and non_std_attrs_seen_p. Increase size of
802 typespec_kind bit-field.
803 (c_warn_unused_attributes): New declaration.
804 (parser_xref_tag): Update prototype.
805 * c-decl.c (c_warn_unused_attributes): New function.
806 (shadow_tag_warned): Handle ctsk_tagfirstref_attrs and
807 ctsk_tagref_attrs. Handle attribute declarations.
808 (check_compound_literal_type): Handle ctsk_tagfirstref_attrs.
809 (grokdeclarator): Handle standard attributes.
810 (parser_xref_tag): Add arguments have_std_attrs and attrs. Apply
811 attributes to incomplete type reference.
812 (xref_tag): Update call to parser_xref_tag.
813 (declspecs_add_addrspace, declspecs_add_type)
814 (declspecs_add_scspec, declspecs_add_attrs): Set
815 non_std_attrs_seen_p.
816 (finish_declspecs): Apply postfix standard attributes to type.
817 * c-parser.c (c_token_starts_declspecs)
818 (c_token_starts_declaration, c_parser_next_token_starts_declspecs)
819 (c_parser_next_tokens_start_declaration): Update comments.
820 (c_parser_consume_token, c_parser_consume_pragma): Handle moving
821 parser->tokens[2] to parser->tokens[1].
822 (c_parser_nth_token_starts_std_attributes)
823 (c_parser_std_attribute_specifier_sequence): New functions.
824 (c_parser_declaration_or_fndef): Add arguments have_attrs and
825 attrs. All callers changed. Handle standard attributes.
826 (c_parser_parms_declarator, c_parser_parms_list_declarator)
827 (c_parser_parameter_declaration): Add argument have_gnu_attrs.
828 All callers changed.
829 (c_parser_declspecs): Add arguments start_std_attr_ok and
830 end_std_attr_ok. All callers changed. Handle standard
831 attributes.
832 (c_parser_enum_specifier, c_parser_struct_or_union_specifier)
833 (c_parser_direct_declarator, c_parser_direct_declarator_inner)
834 (c_parser_compound_statement_nostart, c_parser_all_labels)
835 (c_parser_label, c_parser_statement, c_parser_for_statement):
836 Handle standard attributes.
837 * c-parser.h (c_parser_declspecs): Update prototype.
838 * gimple-parser.c (c_parser_gimple_declaration): Update call to
839 c_parser_declspecs.
840
0c29cac4
ML
8412019-11-12 Martin Liska <mliska@suse.cz>
842
843 * gimple-parser.c: Do not include params.h.
844
028d4092
ML
8452019-11-12 Martin Liska <mliska@suse.cz>
846
847 * gimple-parser.c (c_parser_parse_gimple_body): Replace old parameter syntax
848 with the new one, include opts.h if needed. Use SET_OPTION_IF_UNSET
849 macro.
850
62aee289
MR
8512019-11-12 Maciej W. Rozycki <macro@codesourcery.com>
852 Frederik Harwath <frederik@codesourcery.com>
853
854 gcc/c/
855 * c-parser.c (OACC_SERIAL_CLAUSE_MASK): New macro.
856 (c_parser_oacc_kernels_parallel): Rename function to...
857 (c_parser_oacc_compute): ... this. Handle PRAGMA_OACC_SERIAL.
858 (c_parser_omp_construct): Update accordingly.
859
860
7cec9588
JJ
8612019-11-11 Jakub Jelinek <jakub@redhat.com>
862
863 * c-parser.c (c_parser_translation_unit): Diagnose declare target
864 without corresponding end declare target.
865
f486280c
RS
8662019-11-08 Richard Sandiford <richard.sandiford@arm.com>
867
868 * c-convert.c (convert): Only handle vector conversions if one of
869 the types satisfies gnu_vector_type_p or if -flax-vector-conversions
870 allows it.
871 * c-typeck.c (build_array_ref): Only allow vector indexing if the
872 vectors satisfy gnu_vector_type_p.
873 (build_unary_op): Only allow unary operators to be applied to
874 vectors if they satisfy gnu_vector_type_p.
875 (digest_init): Only allow by-element initialization of vectors
876 if they satisfy gnu_vector_type_p.
877 (really_start_incremental_init): Likewise.
878 (push_init_level): Likewise.
879 (pop_init_level): Likewise.
880 (process_init_element): Likewise.
881 (build_binary_op): Only allow binary operators to be applied to
882 vectors if they satisfy gnu_vector_type_p.
883
017c6491
JM
8842019-11-08 Joseph Myers <joseph@codesourcery.com>
885
886 * c-decl.c (grokparms): Convert () in a function definition to
887 (void) for C2x.
888 (store_parm_decls_oldstyle): Pedwarn for C2x.
889 (store_parm_decls): Update comment about () not generating a
890 prototype.
891
c01bd174
JM
8922019-11-07 Joseph Myers <joseph@codesourcery.com>
893
894 * c-parser.c (c_parser_attribute_arguments): New function.
895 Factored out of c_parser_gnu_attribute.
896 (c_parser_gnu_attribute): Use c_parser_attribute_arguments.
897 (c_parser_balanced_token_sequence, c_parser_std_attribute)
898 (c_parser_std_attribute_specifier): New functions.
899 (c_parser_transaction_attributes): Use
900 c_parser_std_attribute_specifier.
901
471c5330
JM
9022019-11-07 Joseph Myers <joseph@codesourcery.com>
903
904 * c-parser.c (c_parser): Remove lex_untranslated_string. Add
905 lex_joined_string and translate_strings_p.
906 (c_lex_one_token): Pass 0 or C_LEX_STRING_NO_JOIN to
907 c_lex_with_flags.
908 (c_parser_string_literal): New function.
909 (c_parser_static_assert_declaration_no_semi): Use
910 c_parser_string_literal. Do not set lex_untranslated_string.
911 (c_parser_asm_string_literal): Use c_parser_string_literal.
912 (c_parser_simple_asm_expr): Do not set lex_untranslated_string.
913 (c_parser_gnu_attributes): Set and restore translate_strings_p
914 instead of lex_untranslated_string.
915 (c_parser_asm_statement): Do not set lex_untranslated_string.
916 (c_parser_asm_operands): Likewise.
917 (c_parser_has_attribute_expression): Set and restore
918 translate_strings_p instead of lex_untranslated_string.
919 (c_parser_postfix_expression): Use c_parser_string_literal.
920 (pragma_lex): Likewise.
921 (c_parser_pragma_pch_preprocess): Set lex_joined_string.
922 (c_parse_file): Set translate_strings_p.
923 * gimple-parser.c (c_parser_gimple_postfix_expression)
924 (c_parser_gimple_or_rtl_pass_list): Use c_parser_string_literal.
925 * c-parser.c (c_parser_string_literal): Declare function.
926
d0c464d2
JJ
9272019-11-02 Jakub Jelinek <jakub@redhat.com>
928
929 * c-parser.c (c_finish_omp_declare_variant): Use
930 omp_get_context_selector instead of c_omp_get_context_selector.
931
ac2cfa6c
RS
9322019-10-29 Richard Sandiford <richard.sandiford@arm.com>
933
934 * c-tree.h (c_simulate_enum_decl): Declare.
935 * c-decl.c (c_simulate_enum_decl): New function.
936 * c-objc-common.h (LANG_HOOKS_SIMULATE_ENUM_DECL): Define to the above.
937
74078538
RS
9382019-10-29 Richard Sandiford <richard.sandiford@arm.com>
939
940 * c-tree.h (c_simulate_builtin_function_decl): Declare.
941 * c-decl.c (c_simulate_builtin_function_decl): New function.
942 * c-objc-common.h (LANG_HOOKS_SIMULATE_BUILTIN_FUNCTION_DECL): Define
943 to the above.
944
ad1539d5
MS
9452019-10-28 Martin Sebor <msebor@redhat.com>
946
947 PR c/66970
948 * c-decl.c (names_builtin_p): Define a new function.
949
cb73e4e7
RB
9502019-10-28 Richard Biener <rguenther@suse.de>
951
952 PR c/92249
953 * gimple-parser.c (c_parser_parse_gimple_body): Make
954 current_bb the entry block initially to easier recover
955 from errors.
956 (c_parser_gimple_compound_statement): Adjust.
957
135df52c
JJ
9582019-10-24 Jakub Jelinek <jakub@redhat.com>
959
960 * c-parser.c (c_finish_omp_declare_variant): Use
961 omp_context_selector_matches instead of
962 c_omp_context_selector_matches.
963 * c-decl.c (c_decl_attributes): Add "omp declare target block"
964 attribute in between declare target and end declare target
965 pragmas.
966
783bfe5e
JM
9672019-10-15 Joseph Myers <joseph@codesourcery.com>
968
969 * c-parser.c (c_parser_attribute_any_word): Rename to
970 c_parser_gnu_attribute_any_word. All callers changed.
971 (c_parser_attribute): Rename to c_parser_gnu_attribute. All
972 callers changed.
973 (c_parser_attributes): Rename to c_parser_gnu_attributes. All
974 callers changed.
975 (c_parser_declaration_or_fndef, c_parser_declspecs)
976 (c_parser_enum_specifier, c_parser_struct_or_union_specifier)
977 (c_parser_struct_declaration, c_parser_declarator)
978 (c_parser_gnu_attribute, c_parser_compound_statement)
979 (c_parser_label, c_parser_statement, c_parser_objc_method_decl)
980 (c_parser_transaction_attributes): Add "gnu-" prefix to names of
981 attribute-related syntax productions.
982
56898e43
RS
9832019-10-14 Richard Sandiford <richard.sandiford@arm.com>
984
985 * c-objc-common.c (useful_aka_type_p): Replace with...
986 (get_aka_type): ...this new function. Given the original type,
987 decide which aka type to print (if any). Only look through typedefs
988 if user_facing_original_type_p.
989 (print_type): Update accordingly.
990
b9424661
JJ
9912019-10-14 Jakub Jelinek <jakub@redhat.com>
992
993 * c-parser.c (c_parser_omp_all_clauses): Change bool NESTED_P argument
994 into int NESTED, if it is 2, diagnose missing commas in between
995 clauses.
996 (c_parser_omp_context_selector): Pass 2 as last argument to
997 c_parser_omp_all_clauses.
998
20de9568
JJ
9992019-10-12 Jakub Jelinek <jakub@redhat.com>
1000
1001 * c-parser.c (c_parser_omp_context_selector): Improve error recovery.
1002 For simd properties, put them directly into TREE_VALUE.
1003 (c_finish_omp_declare_variant): Call c_omp_mark_declare_variant.
1004 If c_omp_context_selector_matches is 0, don't add attribute, otherwise
1005 add "omp declare variant base" attribute rather than
1006 "omp declare variant".
1007
fe2bc27c
JM
10082019-10-11 Joseph Myers <joseph@codesourcery.com>
1009
1010 * c-decl.c (declspecs_add_type): Use pedwarn_c11 for DFP types.
1011
94e7f906
JJ
10122019-10-10 Jakub Jelinek <jakub@redhat.com>
1013
1014 * c-parser.c (c_parser_omp_all_clauses): Add NESTED_P argument, if
1015 true, terminate processing on closing paren and don't skip to end of
1016 pragma line.
1017 (c_parser_omp_declare_simd): Handle also declare variant.
1018 (omp_construct_selectors, omp_device_selectors,
1019 omp_implementation_selectors, omp_user_selectors): New variables.
1020 (c_parser_omp_context_selector,
1021 c_parser_omp_context_selector_specification,
1022 c_finish_omp_declare_variant): New functions.
1023 (c_finish_omp_declare_simd): Handle both declare simd and
1024 declare variant.
1025 (c_parser_omp_declare): Handle declare variant.
1026
93313b94
JM
10272019-10-02 Joseph Myers <joseph@codesourcery.com>
1028
1029 * c-parser.c (c_parser_asm_statement): Handle CPP_SCOPE like two
1030 CPP_COLON tokens.
1031
55879815
RS
10322019-10-01 Richard Sandiford <richard.sandiford@arm.com>
1033
1034 * c-objc-common.c (useful_aka_type_p): New function.
1035 (print_type): Use it to decide whether an aka type is worth printing.
1036
59bc434a
JJ
10372019-09-27 Jakub Jelinek <jakub@redhat.com>
1038
1039 PR c++/88203
1040 * c-parser.c (c_parser_predefined_identifier): New function.
1041 (c_parser_postfix_expression): Use it.
1042 (c_parser_omp_variable_list): Parse predefined identifiers.
1043 * c-typeck.c (c_finish_omp_clauses): Allow predefined variables
1044 in shared and firstprivate clauses, even when they are predetermined
1045 shared.
1046
c6447c20
RS
10472019-09-27 Richard Sandiford <richard.sandiford@arm.com>
1048
1049 * c-typeck.c (build_function_call_vec): Take the original function
1050 decl as an optional final parameter. Pass all built-in calls to
1051 check_builtin_function_arguments.
1052
522da4c2
EB
10532019-09-20 Eric Botcazou <ebotcazou@adacore.com>
1054
1055 PR c/91815
1056 * c-decl.c (pushdecl): In C detect duplicate declarations across scopes
1057 of identifiers in the external scope only for variables and functions.
1058
68e2c199
PK
10592019-09-04 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1060
1061 PR c/78736
1062 * c-typeck.c (convert_for_assignment): Handle Wenum-conversion.
1063
22f8849d
IS
10642019-08-23 Iain Sandoe <iain@sandoe.co.uk>
1065
1066 PR pch/61250
1067 * c-parser.c (c_parse_file): Call c_common_no_more_pch ()
1068 after determining that the first token is not
1069 PRAGMA_GCC_PCH_PREPROCESS.
1070
db376f45
EB
10712019-08-22 Eric Botcazou <ebotcazou@adacore.com>
1072
1073 * c-parser.c (c_parser_declaration_or_fndef): Set DECL_ARGUMENTS of a
1074 FUNCTION_DECL to the right value in the presence of nested declarators.
1075
4d732405
RS
10762019-08-13 Richard Sandiford <richard.sandiford@arm.com>
1077
1078 PR middle-end/91421
1079 * c-decl.c (merge_decls): Use copy_decl_built_in_function.
1080
cb1180d5
RS
10812019-08-13 Richard Sandiford <richard.sandiford@arm.com>
1082
1083 PR middle-end/91421
1084 * c-decl.c (header_for_builtin_fn): Take a FUNCTION_DECL instead
1085 of a built_in_function.
1086 (diagnose_mismatched_decls, implicitly_declare): Update accordingly.
1087
77eb117f
JJ
10882019-08-10 Jakub Jelinek <jakub@redhat.com>
1089
1090 * c-parser.c (c_parser_omp_clause_name): Parse device_type.
1091 (c_parser_omp_clause_device_type): New function.
1092 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_DEVICE_TYPE.
1093 (OMP_DECLARE_TARGET_CLAUSE_MASK): Add PRAGMA_OMP_CLAUSE_DEVICE_TYPE.
1094 (c_parser_omp_declare_target): Handle device_type clauses. Remove
1095 diagnostics for declare target with clauses nested in clause-less
1096 declare target declaration-definition-seq.
1097 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_DEVICE_TYPE.
1098
2c3b8bad
JJ
10992019-08-09 Jakub Jelinek <jakub@redhat.com>
1100
bb522e2e
JJ
1101 * c-parser.c (check_no_duplicate_clause): Simplify using
1102 omp_find_clause.
1103 (c_parser_omp_clause_if): Fix up printing of target {enter,exit} data
1104 directive name modifiers.
1105 (c_parser_omp_clause_proc_bind): Check for duplicate proc_bind clause.
1106
2c3b8bad
JJ
1107 PR c/91401
1108 * c-parser.c (c_parser_omp_clause_dist_schedule): Fix up typos in the
1109 check_no_duplicate_clause call. Comment it out, instead emit a
1110 warning for duplicate dist_schedule clauses.
1111
99769e7f
RS
11122019-08-08 Richard Sandiford <richard.sandiford@arm.com>
1113
1114 * c-decl.c (finish_enum): Clear C_TYPE_BEING_DEFINED.
1115
8860d270
JJ
11162019-08-08 Jakub Jelinek <jakub@redhat.com>
1117
1118 * c-typeck.c (c_finish_omp_clauses): For C_ORT_OMP
1119 OMP_CLAUSE_USE_DEVICE_* clauses use oacc_reduction_head bitmap
1120 instead of generic_head to track duplicates.
1121
398e3feb
JJ
11222019-08-07 Jakub Jelinek <jakub@redhat.com>
1123
1124 * c-parser.c (c_parser_omp_clause_name): Parse use_device_addr clause.
1125 (c_parser_omp_clause_use_device_addr): New function.
1126 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR.
1127 (OMP_TARGET_DATA_CLAUSE_MASK): Add PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR.
1128 (c_parser_omp_target_data): Handle PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR
1129 like PRAGMA_OMP_CLAUSE_USE_DEVICE_PTR, adjust diagnostics about no
1130 map or use_device_* clauses.
1131 * c-typeck.c (c_finish_omp_clauses): For OMP_CLAUSE_USE_DEVICE_PTR
1132 in OpenMP, require pointer type rather than pointer or array type.
1133 Handle OMP_CLAUSE_USE_DEVICE_ADDR.
1134
a28351e7
JJ
11352019-07-31 Jakub Jelinek <jakub@redhat.com>
1136
1137 PR c/91192
1138 * c-parser.c (c_parser_sizeof_expression): Call set_c_expr_source_range
1139 even if finish is UNKNOWN_LOCATION, just use start as finish in that
1140 case.
1141
6343b6bf
ML
11422019-07-25 Martin Liska <mliska@suse.cz>
1143 Dominik Infuhr <dominik.infuehr@theobroma-systems.com>
1144
1145 PR c++/23383
1146 * c-decl.c (merge_decls): Merge OPERATOR_DELETE flag.
1147
cb50701e
ML
11482019-07-25 Martin Liska <mliska@suse.cz>
1149
1150 * c-decl.c (merge_decls): Use new macros
1151 (e.g. DECL_SET_LAMBDA_FUNCTION and DECL_LAMBDA_FUNCTION_P).
1152
62e3e66f
RB
11532019-07-23 Richard Biener <rguenther@suse.de>
1154
1155 PR tree-optimization/83518
1156 * gimple-parser.c (c_parser_parse_gimple_body): When we have
1157 a CFG also rebuild cgraph edges.
1158
554a530f
JJ
11592019-07-20 Jakub Jelinek <jakub@redhat.com>
1160
1161 * c-parser.c (c_parser_omp_clause_name): Handle bind clause.
1162 (c_parser_omp_clause_bind): New function.
1163 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_BIND.
1164 (OMP_LOOP_CLAUSE_MASK): Define.
1165 (c_parser_omp_loop): New function.
1166 (c_parser_omp_parallel, c_parser_omp_teams): Handle parsing of
1167 loop combined with parallel or teams.
1168 (c_parser_omp_construct): Handle PRAGMA_OMP_LOOP.
1169 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_BIND.
1170
d119bf79
RS
11712019-07-18 Richard Sandiford <richard.sandiford@arm.com>
1172
1173 PR c/53633
1174 * c-decl.c (finish_function): Check targetm.warn_func_return
1175 before issuing a -Wreturn-type warning.
1176
ab20d992 11772019-07-12 Alexandre Oliva <oliva@adacore.com>
fdc1f343
AO
1178
1179 * gimple-parser.c (c_parser_gimple_try_stmt): New.
1180 (c_parser_compound_statement): Call it.
1181
1fdd6f04
JJ
11822019-07-12 Jakub Jelinek <jakub@redhat.com>
1183
1184 * c-parser.c (c_parser_omp_clause_name): Handle order clause.
1185 (c_parser_omp_clause_order): New function.
1186 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_ORDER.
1187 (OMP_SIMD_CLAUSE_MASK, OMP_FOR_CLAUSE_MASK): Add
1188 PRAGMA_OMP_CLAUSE_ORDER.
1189 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_ORDER.
1190
8389386c
RB
11912019-07-10 Richard Biener <rguenther@suse.de>
1192
1193 * gimple-parser.c (c_parser_gimple_postfix_expression): Support
1194 _Literal (int *) &x for address literals.
1195
99b1c316
MS
11962019-07-09 Martin Sebor <msebor@redhat.com>
1197
1198 PR c++/61339
1199 * c-decl.c (xref_tag): Change class-key of PODs to struct and others
1200 to class.
1201 (field_decl_cmp): Same.
1202 * c-parser.c (c_parser_struct_or_union_specifier): Same.
1203 * c-tree.h: Same.
1204 * gimple-parser.c (c_parser_gimple_compound_statement): Same.
1205
6c1dae73
MS
12062019-07-09 Martin Sebor <msebor@redhat.com>
1207
1208 PR c++/61339
1209 * c-decl.c: Change class-key from class to struct and vice versa
1210 to match convention and avoid -Wclass-is-pod and -Wstruct-no-pod.
1211 * gimple-parser.c: Same.
1212
69b5279e
RB
12132019-07-01 Richard Biener <rguenther@suse.de>
1214
1215 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
1216 _Literal (char *) &"foo" for address literals pointing to
1217 STRING_CSTs.
1218
ab20d992
JJ
12192019-06-25 Jozef Lawrynowicz <jozef.l@mittosystems.com>
1220
1221 * c-parser.c (c_parse_init): Create keyword for "__intN__" type.
1222 * c-decl.c (declspecs_add_type): Don't pedwarn about "__intN" ISO
1223 C incompatibility if alternate "__intN__" form is used.
1224
1e3d475e
MS
12252019-06-24 Martin Sebor <msebor@redhat.com>
1226
1227 * c-typeck.c (build_binary_op): Hyphenate floating-point.
1228
bf38f7e9
JJ
12292019-06-10 Jakub Jelinek <jakub@redhat.com>
1230
1231 * c-parser.c (c_parser_pragma): Reject PRAGMA_OMP_SCAN.
1232 (c_parser_omp_clause_reduction): Don't sorry_at on inscan reductions.
1233 (c_parser_omp_scan_loop_body): New function.
1234 (c_parser_omp_for_loop): Call c_parser_omp_scan_loop_body if there are
1235 inscan reduction clauses.
1236 * c-typeck.c (c_finish_omp_clauses): Reject mixing inscan with
1237 non-inscan reductions on the same construct, or inscan reductions with
1238 ordered or schedule clauses, or inscan array reductions.
1239
65985d78
MS
12402019-06-05 Martin Sebor <msebor@redhat.com>
1241
1242 PR c/90737
1243 * c-typeck.c (c_finish_return): Only consider functions returning
1244 pointers as candidates for -Wreturn-local-addr.
1245
0ecf545c
MS
12462019-06-05 Martin Sebor <msebor@redhat.com>
1247
1248 * c-decl.c (start_decl): Adjust quoting and hyphenation
1249 in diagnostics.
1250 (finish_decl): Same.
1251 (finish_enum): Same.
1252 (start_function): Same.
1253 (declspecs_add_type): Same.
1254 * c-parser.c (warn_for_abs): Same.
1255 * c-typeck.c (build_binary_op): Same.
1256
e03436e7
TS
12572019-05-17 Thomas Schwinge <thomas@codesourcery.com>
1258
b48f44bf
TS
1259 PR c/89433
1260 * c-parser.c (c_finish_oacc_routine): Rework checking if already
1261 marked with an OpenACC 'routine' directive.
1262
5bf04509
TS
1263 PR c/89433
1264 * c-parser.c (c_parser_oacc_routine): Normalize order of clauses.
1265 (c_finish_oacc_routine): Call oacc_verify_routine_clauses.
1266
e03436e7
TS
1267 PR c/89433
1268 * c-parser.c (c_finish_oacc_routine): Refer to OpenACC 'routine'
1269 clauses from "omp declare target" attribute.
1270
a9c697b8
MS
12712019-05-16 Martin Sebor <msebor@redhat.com>
1272
ab20d992
JJ
1273 * c-decl.c (start_decl): Quote keywords, operators, and
1274 types in diagnostics.
1275 (finish_decl): Same.
1276 * c-parser.c (c_parser_asm_statement): Same.
1277 (c_parser_conditional_expression): Same.
1278 (c_parser_transaction_cancel): Same.
1279 * c-typeck.c (c_common_type): Same.
1280 (build_conditional_expr): Same.
1281 (digest_init): Same.
1282 (process_init_element): Same.
1283 (build_binary_op): Same.
a9c697b8 1284
c4499192
RB
12852019-05-17 Richard Biener <rguenther@suse.de>
1286
1287 * gimple-parser.c (c_parser_gimple_statement): Handle __VEC_PERM.
1288 (c_parser_gimple_unary_expression): Likewise.
1289 (c_parser_gimple_parentized_ternary_expression): New function.
1290
adfe6e4b
RB
12912019-05-16 Richard Biener <rguenther@suse.de>
1292
1293 * gimple-parser.c (c_parser_gimple_statement): Handle __BIT_INSERT.
1294 (c_parser_gimple_unary_expression): Likewise.
1295
186dabf2
RB
12962019-05-15 Richard Biener <rguenther@suse.de>
1297
1298 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
1299 __BIT_FIELD_REF.
1300
1158c5b4
RB
13012019-05-14 Richard Biener <rguenther@suse.de>
1302
1303 * gimple-parser.c (c_parser_gimple_statement): Remove
1304 questionable auto-promotion to VIEW_CONVERT_EXPR.
1305 (c_parser_gimple_typespec): Split out from __MEM parsing.
1306 (c_parser_gimple_postfix_expression): Handle __VIEW_CONVERT.
1307 * tree-pretty-print.c (dump_generic_node): Dump VIEW_CONVERT_EXPR
1308 as __VIEW_CONVERT with -gimple.
1309
fd4485aa
ML
13102019-05-09 Martin Liska <mliska@suse.cz>
1311
1312 * gimple-parser.c (c_parser_gimple_statement): Support __MIN and
1313 __MAX.
1314 (c_parser_gimple_unary_expression): Parse also binary expression
1315 __MIN and __MAX.
1316 (c_parser_gimple_parentized_binary_expression): New function.
1317
d276406a
ML
13182019-05-09 Martin Liska <mliska@suse.cz>
1319
1320 * gimple-parser.c (struct gimple_parser): Add probability.
1321 for gimple_parser_edge.
1322 (gimple_parser::push_edge): Add new argument probability.
1323 (c_parser_gimple_parse_bb_spec): Parse also probability
1324 if present.
1325 (c_parser_parse_gimple_body): Set edge probability.
1326 (c_parser_gimple_compound_statement): Consume token
1327 before calling c_parser_gimple_goto_stmt.
1328 Parse BB counts.
1329 (c_parser_gimple_statement): Pass new argument.
1330 (c_parser_gimple_goto_stmt): Likewise.
1331 (c_parser_gimple_if_stmt): Likewise.
1332 (c_parser_gimple_or_rtl_pass_list): Parse hot_bb_threshold.
1333 * c-parser.c (c_parser_declaration_or_fndef): Pass
1334 hot_bb_threshold argument.
1335 * c-tree.h (struct c_declspecs): Add hot_bb_threshold
1336 field.
1337 (c_parser_gimple_parse_bb_spec_edge_probability): New.
1338
f179b64e
JJ
13392019-04-26 Jakub Jelinek <jakub@redhat.com>
1340
1341 PR debug/90197
1342 * c-tree.h (c_finish_loop): Add 2 further location_t arguments.
1343 * c-parser.c (c_parser_while_statement): Adjust c_finish_loop caller.
1344 (c_parser_do_statement): Likewise.
1345 (c_parser_for_statement): Likewise. Formatting fixes.
1346 * c-typeck.c (c_finish_loop): Add COND_LOCUS and INCR_LOCUS arguments,
1347 emit DEBUG_BEGIN_STMTs if needed.
1348
e7178413
JJ
13492019-04-19 Jakub Jelinek <jakub@redhat.com>
1350
c280b7ee
JJ
1351 PR c/89888
1352 * c-typeck.c (struct c_switch): Remove outside_range_p member.
1353 (c_start_case): Don't clear it.
1354 (do_case): Adjust c_add_case_label caller.
1355 (c_finish_case): Adjust c_do_switch_warnings caller.
1356
e7178413
JJ
1357 PR c++/90108
1358 * c-decl.c (merge_decls): If remove is main variant and
1359 DECL_ORIGINAL_TYPE is some other type, remove a DECL_ORIGINAL_TYPE
1360 variant that has newdecl as TYPE_NAME if any.
1361
60a2c645
JJ
13622019-04-12 Jakub Jelinek <jakub@redhat.com>
1363
1364 PR c/89933
1365 * c-decl.c (merge_decls): When newdecl's type is its main variant,
1366 don't try to remove it from the variant list, but instead assert
1367 it has no variants.
1368
2a82beaa
RB
13692019-04-01 Richard Biener <rguenther@suse.de>
1370
1371 PR c/71598
1372 * c-tree.h (c_get_alias_set): Declare.
1373 * c-objc-common.h (LANG_HOOKS_GET_ALIAS_SET): Use c_get_alias_set.
1374 * c-objc-common.c (c_get_alias_set): Treat enumeral types
1375 as the underlying integer type.
1376
bec1da64
MS
13772019-03-19 Martin Sebor <msebor@redhat.com>
1378
1379 PR tree-optimization/89688
1380 * c-decl.c (finish_decl): Call braced_lists_to_string for more
1381 kinds of initializers.
1382
855cd9b1
JJ
13832019-03-19 Jakub Jelinek <jakub@redhat.com>
1384
1385 PR c/89734
1386 * c-decl.c (grokdeclarator): Call c_build_qualified_type on function
1387 return type even if quals_used is 0. Formatting fixes.
1388
baa09dc5
RB
13892019-03-14 Richard Biener <rguenther@suse.de>
1390
1391 * c-tree.h (enum c_declspec_il): New.
1392 (struct c_declspecs): Merge gimple_p and rtl_p into declspec_il
1393 enum bitfield.
1394 * c-parser.c (c_parser_declaration_or_fndef): Adjust accordingly.
1395 Pass start pass and declspec_il to c_parser_parse_gimple_body.
1396 (c_parser_declspecs): Adjust.
1397 * gimple-parser.c: Include cfg.h, cfghooks.h, cfganal.h, tree-cfg.h,
1398 gimple-iterator.h, cfgloop.h, tree-phinodes.h, tree-into-ssa.h
1399 and bitmap.h.
1400 (struct gimple_parser): New.
1401 (gimple_parser::push_edge): New method.
1402 (c_parser_gimple_parse_bb_spec): New helper.
1403 (c_parser_parse_gimple_body): Get start pass and IL specification.
1404 Initialize SSA and CFG.
1405 (c_parser_gimple_compound_statement): Handle CFG and SSA build.
1406 Build a gimple_parser parsing state and pass it along.
1407 (c_parser_gimple_statement): Change intermittend __PHI internal
1408 function argument for the edge.
1409 (c_parser_gimple_or_rtl_pass_list): Handle ssa, cfg flags.
1410 (c_parser_gimple_goto_stmt): Record edges to build.
1411 (c_parser_gimple_if_stmt): Likewise.
1412 * gimple-parser.h (c_parser_parse_gimple_body): Adjust.
1413 (c_parser_gimple_or_rtl_pass_list): Likewise.
1414
a3f9f006
ML
14152019-03-11 Martin Liska <mliska@suse.cz>
1416
1417 * c-decl.c (check_for_loop_decls): Wrap an option name
1418 in a string format message and fix GNU coding style.
1419 * c-parser.c (c_parser_declspecs): Likewise.
1420
1db01ff9
JJ
14212019-03-08 Jakub Jelinek <jakub@redhat.com>
1422
1423 PR tree-optimization/89550
1424 * c-decl.c (finish_function): Only set TREE_NO_WARNING if warning_at
1425 returned true.
1426 (c_write_global_declarations_1): Only set TREE_NO_WARNING if pedwarn
1427 or warning returned true.
1428
66dcb747
JJ
14292019-02-28 Jakub Jelinek <jakub@redhat.com>
1430
1431 PR c/89525
1432 * c-typeck.c (convert_arguments): Call inform_declaration only if
1433 the previous warning_at call returned true.
1434
2263c9f2
TS
14352019-02-22 Thomas Schwinge <thomas@codesourcery.com>
1436
1437 * c-parser.c (c_parser_oacc_shape_clause): Add loc formal
1438 parameter. Adjust all users.
1439 (c_parser_oacc_simple_clause): Replace parser with loc formal
1440 parameter. Adjust all users.
1441
ab20d992 14422019-02-19 Chung-Lin Tang <cltang@codesourcery.com>
19695f4d
CLT
1443
1444 PR c/87924
1445 * c-parser.c (c_parser_oacc_clause_wait): Add representation of wait
1446 clause without argument as 'wait (GOMP_ASYNC_NOVAL)', adjust comments.
1447
5f88ba10
JJ
14482019-02-15 Jakub Jelinek <jakub@redhat.com>
1449
1450 PR c/89340
1451 * c-decl.c (start_function): Clear TREE_PUBLIC on nested functions
1452 before c_decl_attributes rather than after it.
1453
cfc30fd1
JJ
14542019-02-06 Jakub Jelinek <jakub@redhat.com>
1455
1456 PR c/89211
1457 * c-parser.c (c_parser_declaration_or_fndef): Don't update
1458 DECL_ARGUMENTS of d if it has been defined already. Use a single if
1459 instead of 3 nested ifs.
1460
fbe83e6b
JM
14612019-02-06 Joseph Myers <joseph@codesourcery.com>
1462
1463 PR c/88584
1464 * c-decl.c (finish_decl): Do not complete array types for arrays
1465 with external linkage not at file scope.
1466
f461f938
RB
14672019-02-05 Richard Biener <rguenther@suse.de>
1468
1469 PR c/88606
1470 * c-decl.c (finish_struct): Reset TYPE_TRANSPARENT_AGGR on
1471 all type variants when not supported.
1472
fe509359
JJ
14732019-01-30 Jakub Jelinek <jakub@redhat.com>
1474
1475 PR c/89061
1476 * c-tree.h (C_DECL_COMPOUND_LITERAL_P): Define.
1477 * c-decl.c (decl_jump_unsafe): Return false for
1478 C_DECL_COMPOUND_LITERAL_P decls.
1479 (build_compound_literal): Set C_DECL_COMPOUND_LITERAL_P.
1480
6a335b96
JJ
14812019-01-29 Jakub Jelinek <jakub@redhat.com>
1482
f4b7e754
JJ
1483 PR c/89045
1484 * c-decl.c (build_compound_literal): Don't pushdecl if in parameter
1485 scope.
1486
6a335b96
JJ
1487 PR c/86125
1488 * c-decl.c (last_fileptr_type): Remove.
1489 (last_structptr_types): New variable.
1490 (match_builtin_function_types): Compare TYPE_MAIN_VARIANT of
1491 {old,new}rettype instead of the types themselves. Assert
1492 last_structptr_types array has the same number of elements
1493 as builtin_structptr_types array. Use TYPE_MAIN_VARIANT for
1494 argument oldtype and newtype. Instead of handling
1495 just fileptr_type_node specially, handle all builtin_structptr_types
1496 pointer nodes. Formatting fix.
1497
d8b5a1a0
MS
14982019-01-24 Martin Sebor <msebor@redhat.com>
1499
1500 PR c/86125
1501 PR c/88886
1502 PR middle-end/86308
1503 * c-decl.c (match_builtin_function_types): Add arguments.
1504 (diagnose_mismatched_decls): Diagnose mismatched declarations
1505 of built-ins more strictly.
1506
e21c4491
JJ
15072019-01-24 Jakub Jelinek <jakub@redhat.com>
1508
1509 PR c++/88976
1510 * c-typeck.c (c_finish_omp_cancel): Diagnose more than one if
1511 on #pragma omp cancel with different modifiers.
1512
420183d9
L
15132019-01-18 H.J. Lu <hongjiu.lu@intel.com>
1514
1515 PR c/51628
1516 PR c/88664
1517 * c-typeck.c (convert_for_assignment): Upate the
1518 warn_for_address_or_pointer_of_packed_member call.
1519
17ad43dd
TH
15202019-01-16 Tom Honermann <tom@honermann.net>
1521 Jason Merrill <jason@redhat.com>
1522
1523 * c-typeck.c (digest_init): Revised the error message produced for
1524 ill-formed cases of array initialization with a string literal.
1525 (error_init): Make variadic.
1526
5f07d78a
JJ
15272019-01-12 Jakub Jelinek <jakub@redhat.com>
1528
1529 * c-typeck.c (convert_for_assignment): Fix a comment typo.
1530
c4581bbf
JJ
15312019-01-07 Jakub Jelinek <jakub@redhat.com>
1532
1533 PR c/88701
1534 * c-decl.c (build_compound_literal): If not TREE_STATIC, only pushdecl
1535 if current_function_decl is non-NULL.
1536
65c5b1eb
JM
15372019-01-07 Joseph Myers <joseph@codesourcery.com>
1538
1539 PR c/88720
1540 PR c/88726
1541 * c-decl.c (pop_scope): Use TREE_PUBLIC and b->nested to determine
1542 whether a function is nested, not DECL_EXTERNAL. Diagnose inline
1543 functions declared but never defined only for external scope, not
1544 for other scopes.
1545
d8fcab68
JJ
15462019-01-07 Jakub Jelinek <jakub@redhat.com>
1547
1548 PR c++/85052
1549 * c-parser.c (c_parser_postfix_expression): Parse
1550 __builtin_convertvector.
1551
a5544970
JJ
15522019-01-01 Jakub Jelinek <jakub@redhat.com>
1553
1554 Update copyright years.
1555
da77eace
L
15562018-12-20 H.J. Lu <hongjiu.lu@intel.com>
1557
1558 PR c/51628
1559 * c-typeck.c (convert_for_assignment): Call
1560 warn_for_address_or_pointer_of_packed_member.
1561
1edf8866
SB
15622018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
1563
1564 * c-parser.c (c_parser_asm_statement) <RID_CONST, RID_RESTRICT>: Give
1565 a more specific error message (instead of just falling through).
1566
db4fd626
SB
15672018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
1568
1569 * c-parser.c (c_parser_asm_statement): Keep track of the location each
1570 asm qualifier is first seen; use that to give nicer "duplicate asm
1571 qualifier" messages. Delete 'quals" variable, instead pass the
1572 "is_volatile_ flag to build_asm_stmt directly.
1573 * c-tree.h (build_asm_stmt): Make the first arg bool instead of tree.
1574 * c-typeck.c (build_asm_stmt): Ditto; adjust.
1575
9c9cfcbb
SB
15762018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
1577
1578 * c-parser.c (c_parser_asm_statement): Rewrite the loop to work without
1579 "done" boolean variable.
1580
a14feb3c
DM
15812018-12-19 David Malcolm <dmalcolm@redhat.com>
1582
1583 PR c++/87504
1584 * c-typeck.c (class maybe_range_label_for_tree_type_mismatch):
1585 Move from here to gcc-rich-location.h and gcc-rich-location.c.
1586 (build_binary_op): Use struct op_location_t and
1587 class binary_op_rich_location.
1588
6d939173
JJ
15892018-12-11 Jakub Jelinek <jakub@redhat.com>
1590
1591 PR sanitizer/88426
1592 * c-convert.c (convert): Call c_fully_fold before calling
1593 ubsan_instrument_float_cast.
1594
b7055028
SB
15952018-12-08 Segher Boessenkool <segher@kernel.crashing.org>
1596
1597 * c-parser (c_parser_asm_statement) [RID_INLINE]: Delete stray line
1598 setting "quals".
1599
5b76e75f
SB
16002018-12-06 Segher Boessenkool <segher@kernel.crashing.org>
1601
1602 * c-parser.c (c_parser_asm_statement): Detect the inline keyword
1603 after asm. Pass a flag for it to build_asm_expr.
1604 * c-tree.h (build_asm_expr): Update declaration.
1605 * c-typeck.c (build_asm_stmt): Add is_inline parameter. Use it to
1606 set ASM_INLINE_P.
1607
30bd42b9
SB
16082018-12-06 Segher Boessenkool <segher@kernel.crashing.org>
1609
1610 PR inline-asm/55681
1611 * c-parser.c (c_parser_asm_statement): Update grammar. Allow any
1612 combination of volatile and goto, in any order, without repetitions.
1613
9df6c0e4
JB
16142018-12-04 James Norris <jnorris@codesourcery.com>
1615 Cesar Philippidis <cesar@codesourcery.com>
1616 Julian Brown <julian@codesourcery.com>
1617
1618 * c-parser.c (c_parser_oacc_wait_list): Remove dead diagnostic
1619 code.
1620
f44697b7
RB
16212018-11-30 Richard Biener <rguenther@suse.de>
1622
1623 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
1624 _Literal (type) { ... } as empty aggregate or vector constructor.
1625
550dfbdc
MS
16262018-11-29 Martin Sebor <msebor@redhat.com>
1627
1628 PR c/88091
1629 * c-typeck.c (convert_argument): Add a parameter. Adjust indentation.
1630 (convert_arguments): Add comments. Pass additional argument to
1631 the function above.
1632
673670da
MS
16332018-11-29 Martin Sebor <msebor@redhat.com>
1634
1635 PR c/88172
1636 PR testsuite/88208
1637 * c-decl.c (declspec_add_alignas): Adjust call to check_user_alignment.
1638
db1d09b0
MS
16392018-11-23 Martin Sebor <msebor@redhat.com>
1640
1641 PR testsuite/88098
1642 * c-typeck.c (convert_arguments): Call builtin_decl_explicit instead.
1643 (maybe_warn_builtin_no_proto_arg): Handle short enum to int promotion.
1644
98f08eb8
MS
16452018-11-20 Martin Sebor <msebor@redhat.com>
1646
1647 * c-parser.c (c_parser_has_attribute_expression): New function.
1648 (c_parser_attribute): New function.
1649 (c_parser_attributes): Move code into c_parser_attribute.
1650 (c_parser_unary_expression): Handle RID_HAS_ATTRIBUTE_EXPRESSION.
1651
cd5da983
MS
16522018-11-15 Martin Sebor <msebor@redhat.com>
1653
1654 PR c/83656
1655 * c-decl.c (header_for_builtin_fn): Declare.
1656 (diagnose_mismatched_decls): Diagnose declarations of built-in
1657 functions without a prototype.
1658 * c-typeck.c (maybe_warn_builtin_no_proto_arg): New function.
1659 (convert_argument): Same.
1660 (convert_arguments): Factor code out into convert_argument.
1661 Detect mismatches between built-in formal arguments in calls
1662 to built-in without prototype.
1663 (build_conditional_expr): Same.
1664 (type_or_builtin_type): New function.
1665 (convert_for_assignment): Add argument. Conditionally issue
1666 warnings instead of errors for mismatches.
1667
620e594b
DM
16682018-11-13 David Malcolm <dmalcolm@redhat.com>
1669
1670 * c-decl.c: Replace "source_location" with "location_t".
1671 * c-tree.h: Likewise.
1672 * c-typeck.c: Likewise.
1673 * gimple-parser.c: Likewise.
1674
3179ebae
JJ
16752018-11-09 Jakub Jelinek <jakub@redhat.com>
1676
81a227c6
JJ
1677 * c-parser.c (c_parser_omp_clause_final): Use
1678 c_parser_expr_no_commas, convert_lvalue_to_rvalue,
1679 c_objc_common_truthvalue_conversion, c_fully_fold and parentheses
1680 parsing instead of c_parser_paren_condition.
1681 (c_parser_omp_clause_if): Use c_parser_expr_no_commas,
1682 convert_lvalue_to_rvalue, c_objc_common_truthvalue_conversion and
1683 c_fully_fold instead of c_parser_condition.
1684 (c_parser_omp_clause_num_threads, c_parser_omp_clause_num_tasks,
1685 c_parser_omp_clause_grainsize, c_parser_omp_clause_priority,
1686 c_parser_omp_clause_hint, c_parser_omp_clause_num_teams,
1687 c_parser_omp_clause_thread_limit, c_parser_omp_clause_linear): Use
1688 c_parser_expr_no_commas instead of c_parser_expression.
1689
98c91c56
JJ
1690 * c-parser.c (c_parser_omp_clause_reduction): Call sorry_at on
1691 reduction clause with inscan modifier.
1692
3179ebae
JJ
1693 * c-parser.c (c_parser_omp_requires): Call sorry_at on requires
1694 clauses other than atomic_default_mem_order.
1695
28567c40
JJ
16962018-11-08 Jakub Jelinek <jakub@redhat.com>
1697
1698 * c-parser.c: Include memmode.h.
1699 (c_parser_omp_depobj, c_parser_omp_requires): New functions.
1700 (c_parser_pragma): Handle PRAGMA_OMP_DEPOBJ and PRAGMA_OMP_REQUIRES.
1701 (c_parser_omp_clause_name): Handle nontemporal, in_reduction and
1702 task_reduction clauses.
1703 (c_parser_omp_variable_list): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION.
1704 For OMP_CLAUSE_DEPEND, parse clause operands as either an array
1705 section, or lvalue assignment expression.
1706 (c_parser_omp_clause_if): Handle cancel and simd modifiers.
1707 (c_parser_omp_clause_lastprivate): Parse optional
1708 conditional: modifier.
1709 (c_parser_omp_clause_hint): Require constant integer expression rather
1710 than just integer expression.
1711 (c_parser_omp_clause_defaultmap): Parse new kinds of defaultmap
1712 clause.
1713 (c_parser_omp_clause_reduction): Add IS_OMP and KIND arguments.
1714 Parse reduction modifiers. Pass KIND to c_parser_omp_variable_list.
1715 (c_parser_omp_clause_nontemporal, c_parser_omp_iterators): New
1716 functions.
1717 (c_parser_omp_clause_depend): Parse iterator modifier and handle
1718 iterators. Parse mutexinoutset and depobj kinds.
1719 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_reduction
1720 callers.
1721 (c_parser_omp_all_clauses): Likewise. Handle
1722 PRAGMA_OMP_CLAUSE_NONTEMPORAL and
1723 PRAGMA_OMP_CLAUSE_{IN,TASK}_REDUCTION.
1724 (c_parser_omp_atomic): Parse hint and memory order clauses. Handle
1725 default memory order from requires directive if any. Adjust
1726 c_finish_omp_atomic caller.
1727 (c_parser_omp_critical): Allow comma in between (name) and hint clause.
1728 (c_parser_omp_flush): Parse flush with memory-order-clause.
1729 (c_parser_omp_for_loop): Allow NE_EXPR even in
1730 OpenMP loops, adjust c_finish_omp_for caller.
1731 (OMP_SIMD_CLAUSE_MASK): Add if and nontemporal clauses.
1732 (c_parser_omp_master): Add p_name, mask and cclauses arguments.
1733 Allow to be called while parsing combined parallel master.
1734 Parse combined master taskloop{, simd}.
1735 (c_parser_omp_parallel): Parse combined
1736 parallel master{, taskloop{, simd}} constructs.
1737 (OMP_TASK_CLAUSE_MASK): Add in_reduction clause.
1738 (OMP_TASKGROUP_CLAUSE_MASK): Define.
1739 (c_parser_omp_taskgroup): Add LOC argument. Parse taskgroup clauses.
1740 (OMP_TASKWAIT_CLAUSE_MASK): Define.
1741 (c_parser_omp_taskwait): Handle taskwait with depend clauses.
1742 (c_parser_omp_teams): Force a BIND_EXPR with BLOCK
1743 around teams body. Use SET_EXPR_LOCATION.
1744 (c_parser_omp_target_data): Allow target data
1745 with only use_device_ptr clauses.
1746 (c_parser_omp_target): Use SET_EXPR_LOCATION. Set
1747 OMP_REQUIRES_TARGET_USED bit in omp_requires_mask.
1748 (c_parser_omp_requires): New function.
1749 (c_finish_taskloop_clauses): New function.
1750 (OMP_TASKLOOP_CLAUSE_MASK): Add reduction and in_reduction clauses.
1751 (c_parser_omp_taskloop): Use c_finish_taskloop_clauses. Add forward
1752 declaration. Disallow in_reduction clause when combined with parallel
1753 master.
1754 (c_parser_omp_construct): Adjust c_parser_omp_master and
1755 c_parser_omp_taskgroup callers.
1756 * c-typeck.c (c_finish_omp_cancel): Diagnose if clause with modifier
1757 other than cancel.
1758 (handle_omp_array_sections_1): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION
1759 like OMP_CLAUSE_REDUCTION.
1760 (handle_omp_array_sections): Likewise. Call save_expr on array
1761 reductions before calling build_index_type. Handle depend clauses
1762 with iterators.
1763 (struct c_find_omp_var_s): New type.
1764 (c_find_omp_var_r, c_omp_finish_iterators): New functions.
1765 (c_finish_omp_clauses): Don't diagnose nonmonotonic clause
1766 with static, runtime or auto schedule kinds. Call save_expr for whole
1767 array reduction sizes. Diagnose reductions with zero sized elements
1768 or variable length structures. Diagnose nogroup clause used with
1769 reduction clause(s). Handle depend clause with
1770 OMP_CLAUSE_DEPEND_DEPOBJ. Diagnose bit-fields. Require
1771 omp_depend_t type for OMP_CLAUSE_DEPEND_DEPOBJ kinds and
1772 some different type for other kinds. Use build_unary_op with
1773 ADDR_EXPR and build_indirect_ref instead of c_mark_addressable.
1774 Handle depend clauses with iterators. Remove no longer needed special
1775 case that predetermined const qualified vars may be specified in
1776 firstprivate clause. Complain if const qualified vars are mentioned
1777 in data-sharing clauses other than firstprivate or shared. Use
1778 error_at with OMP_CLAUSE_LOCATION (c) as first argument instead of
1779 error. Formatting fix. Handle OMP_CLAUSE_NONTEMPORAL and
1780 OMP_CLAUSE_{IN,TASK}_REDUCTION. Allow any lvalue as
1781 OMP_CLAUSE_DEPEND operand (besides array section), adjust diagnostics.
1782
7e2de6df
DM
17832018-10-29 David Malcolm <dmalcolm@redhat.com>
1784
1785 * c-decl.c (implicit_decl_warning): Update "is there a suggestion"
1786 logic for change to name_hint::operator bool.
1787 (undeclared_variable): Likewise.
1788 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
1789 (c_parser_parameter_declaration): Likewise.
1790
9f936c86
JM
17912018-10-17 Joseph Myers <joseph@codesourcery.com>
1792
1793 * c-errors.c (pedwarn_c11): New function.
1794 * c-parser.c (disable_extension_diagnostics): Save
1795 warn_c11_c2x_compat and set it to 0.
1796 (restore_extension_diagnostics): Restore warn_c11_c2x_compat.
1797 (c_parser_static_assert_declaration_no_semi): Handle
1798 _Static_assert without string constant.
1799 * c-tree.h (pedwarn_c11): New prototype.
1800
033eb567
DM
18012018-10-17 David Malcolm <dmalcolm@redhat.com>
1802
1803 * Make-lang.in (selftest-c): New.
1804 (C_SELFTEST_FLAGS, C_SELFTEST_DEPS, s-selftest-c, selftest-c-gdb)
1805 (selftest-gdb, selftest-c-valgrind, selftest-valgrind): Move here
1806 from gcc/Makefile.in.
1807
0edf3afe
RB
18082018-10-02 Richard Biener <rguenther@suse.de>
1809
1810 * c-decl.c (warn_if_shadowing): Do not test DECL_FROM_INLINE.
1811
8313a764
JM
18122018-09-26 Joseph Myers <joseph@codesourcery.com>
1813
1814 PR c/87390
1815 * c-typeck.c (build_binary_op): Use excess precision for
1816 comparisons of integers and floating-point for C11 and later.
1817
ce6f0888
MJ
18182018-09-26 Martin Jambor <mjambor@suse.cz>
1819
1820 PR c/87347
1821 * c-parser.c (warn_for_abs): Bail out if TYPE_ARG_TYPES is NULL. Fix
ab20d992 1822 comment.
ce6f0888 1823
9c4a4b3c
DM
18242018-09-17 David Malcolm <dmalcolm@redhat.com>
1825
1826 * c-objc-common.c (range_label_for_type_mismatch::get_text):
1827 Update for new param.
1828 * c-typeck.c (maybe_range_label_for_tree_type_mismatch::get_text):
1829 Likewise.
1830
80c6d1f4
MJ
18312018-09-17 Martin Jambor <mjambor@suse.cz>
1832
1833 PR c/63886
1834 * c-parser.c: (warn_for_abs): New function.
1835 (c_parser_postfix_expression_after_primary): Call it.
1836
4a426e36
BE
18372018-09-13 Bernd Edlinger <bernd.edlinger@hotmail.de>
1838
1839 * c-typeck.c (digest_init): Shorten overlength strings.
1840
6d900107
BE
18412018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
1842
1843 * c-decl.c (finish_decl): Call complete_flexible_array_elts.
1844
b5764229
BE
18452018-09-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
1846
1847 * c-decl.c (finish_decl): Call braced_list_to_string here ...
1848 * c-parser.c (c_parser_declaration_or_fndef): ... instead of here.
1849
22eea6b2
AM
18502018-08-30 Alexander Monakov <amonakov@ispras.ru>
1851
1852 * gimple-parser.c (c_parser_gimple_binary_expression): Accept infix
1853 "__MULT_HIGHPART" for MULT_HIGHPART_EXPR.
1854
85204e23
DM
18552018-08-27 David Malcolm <dmalcolm@redhat.com>
1856
1857 PR 87091
1858 * c-decl.c (implicitly_declare): Update call to
1859 maybe_add_include_fixit to suggest overriding the location, as it
1860 is for a note.
1861 * c-objc-common.c (c_tree_printer): Update for conversion of
1862 show_caret_p to a tri-state.
1863
3d78e008
ML
18642018-08-27 Martin Liska <mliska@suse.cz>
1865
1866 * c-decl.c (locate_old_decl): Use new function
92a285c1
ML
1867 fndecl_built_in_p and remove check for FUNCTION_DECL if
1868 possible.
3d78e008
ML
1869 (diagnose_mismatched_decls): Likewise.
1870 (merge_decls): Likewise.
1871 (warn_if_shadowing): Likewise.
1872 (pushdecl): Likewise.
1873 (implicitly_declare): Likewise.
1874 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
1875 * c-tree.h (C_DECL_ISNT_PROTOTYPE): Likewise.
1876 * c-typeck.c (build_function_call_vec): Likewise.
1877 (convert_arguments): Likewise.
1878
097f82ec
DM
18792018-08-20 David Malcolm <dmalcolm@redhat.com>
1880
1881 PR other/84889
1882 * c-decl.c (pushtag): Add auto_diagnostic_group instance.
1883 (diagnose_mismatched_decls): Likewise, in various places.
1884 (warn_if_shadowing): Likewise.
1885 (implicit_decl_warning): Likewise.
1886 (implicitly_declare): Likewise.
1887 (undeclared_variable): Likewise.
1888 (declare_label): Likewise.
1889 (grokdeclarator): Likewise.
1890 (start_function): Likewise.
1891 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
1892 (c_parser_parameter_declaration): Likewise.
1893 (c_parser_binary_expression): Likewise.
1894 * c-typeck.c (c_expr_sizeof_expr): Likewise.
1895 (parser_build_binary_op): Likewise.
1896 (build_unary_op): Likewise.
1897 (error_init): Likewise.
1898 (pedwarn_init): Likewise.
1899 (warning_init): Likewise.
1900 (convert_for_assignment): Likewise.
1901
96e6ae57
DM
19022018-08-15 David Malcolm <dmalcolm@redhat.com>
1903
1904 * c-objc-common.c: Include "gcc-rich-location.h".
1905 (c_tree_printer): Move implemenation of '%T' to...
1906 (print_type): ...this new function.
1907 (range_label_for_type_mismatch::get_text): New function.
1908 * c-typeck.c (convert_for_assignment): Add type labels to the rhs
1909 range for the various ic_argpass cases.
1910 (class maybe_range_label_for_tree_type_mismatch): New class.
1911 (build_binary_op): Use it when calling binary_op_error.
1912
0cd020ae 19132018-08-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
ab20d992 1914
0cd020ae
PK
1915 * c-decl.c (start_decl): Do not warn if variables is named as main
1916 and is a local variable.
1917
72733314
IS
19182018-08-15 Iain Sandoe <iain@sandoe.co.uk>
1919
1920 PR c/19315
1921 * c-decl.c (finish_decl): Don't add the 'extern' storage class to
1922 objects of unknown size.
1923
23aa9f7c
MS
19242018-08-13 Martin Sebor <msebor@redhat.com>
1925
1926 PR tree-optimization/71625
1927 * c-parser.c (c_parser_declaration_or_fndef): Call
1928 braced_list_to_string.
1929
e5e7e50d
BH
19302018-08-03 Bogdan Harjoc <harjoc@gmail.com>
1931
1932 PR c/86690
1933 * c-typeck.c (lookup_field): Do not use TYPE_LANG_SPECIFIC after
1934 errors.
1935
8a45b051
MS
19362018-08-01 Martin Sebor <msebor@redhat.com>
1937
1938 PR tree-optimization/86650
1939 * c-objc-common.c (c_tree_printer): Move usage of EXPR_LOCATION (t)
1940 and TREE_BLOCK (t) from within percent_K_format to this callsite.
1941
5922dcb5
JJ
19422018-08-01 Jakub Jelinek <jakub@redhat.com>
1943
1944 PR c/85704
1945 * c-typeck.c (init_field_decl_cmp): New function.
1946 (output_pending_init_elements): Use it for field comparisons
1947 instead of pure bit_position comparisons.
1948
9b452033
JJ
19492018-07-12 Jakub Jelinek <jakub@redhat.com>
1950
1951 * c-decl.c (c_decl_attributes): Don't diagnose vars without mappable
1952 type here, instead add "omp declare target implicit" attribute.
1953 (finish_decl): Diagnose vars without mappable type here.
1954
ab20d992
JJ
19552018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
1956 Thomas Schwinge <thomas@codesourcery.com>
829c6349
CLT
1957 Cesar Philippidis <cesar@codesourcery.com>
1958
1959 * c-parser.c (c_parser_omp_clause_name): Add support for finalize
1960 and if_present. Make present_or_{copy,copyin,copyout,create} aliases
1961 to their non-present_or_* counterparts. Make 'self' an alias to
1962 PRAGMA_OACC_CLAUSE_HOST.
1963 (c_parser_oacc_data_clause): Update GOMP mappings for
1964 PRAGMA_OACC_CLAUSE_{COPY,COPYIN,COPYOUT,CREATE,DELETE}. Remove
1965 PRAGMA_OACC_CLAUSE_{SELF,PRESENT_OR_*}.
1966 (c_parser_oacc_all_clauses): Handle finalize and if_present clauses.
1967 Remove support for present_or_* clauses.
1968 (OACC_KERNELS_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
1969 (OACC_PARALLEL_CLAUSE_MASK): Likewise.
1970 (OACC_DECLARE_CLAUSE_MASK): Likewise.
1971 (OACC_DATA_CLAUSE_MASK): Likewise.
1972 (OACC_ENTER_DATA_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
1973 (OACC_EXIT_DATA_CLAUSE_MASK): Add FINALIZE clause.
1974 (OACC_UPDATE_CLAUSE_MASK): Remove SELF, add IF_PRESENT.
1975 (c_parser_oacc_declare): Remove PRESENT_OR_* clauses.
1976 * c-typeck.c (c_finish_omp_clauses): Handle IF_PRESENT and FINALIZE.
1977
e197e64e
KV
19782018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
1979
1980 * c-typeck.c (build_unary_op): Handle ABSU_EXPR;
1981 * gimple-parser.c (c_parser_gimple_statement): Likewise.
1982 (c_parser_gimple_unary_expression): Likewise.
1983
487f2f61
JJ
19842018-06-15 Jakub Jelinek <jakub@redhat.com>
1985
1986 PR c/86093
1987 * c-typeck.c (pointer_diff): Cast both pointers to unqualified types
1988 before doing POINTER_DIFF_EXPR.
1989
e4d44a37
MP
19902018-06-07 Marek Polacek <polacek@redhat.com>
1991
1992 PR c/85318
1993 * c-decl.c (check_for_loop_decls): Add -Wc90-c99-compat warning about
1994 for loop initial declarations.
1995
b67b9225
DP
19962018-05-30 David Pagan <dave.pagan@oracle.com>
1997
1998 PR c/55976
1999 * c-decl.c (grokdeclarator): Update check for return type warnings.
2000 (start_function): Likewise.
2001 (finish_function): Likewise.
2002 * c-typeck.c (c_finish_return): Update check for return type warnings.
2003 Pass OPT_Wreturn_type to pedwarn when appropriate.
2004
c566cc9f
RS
20052018-05-18 Richard Sandiford <richard.sandiford@linaro.org>
2006
2007 * gimple-parser.c (c_parser_gimple_postfix_expression): Remove
2008 __FMA_EXPR handlng.
2009
e4f81565
RS
20102018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
2011
2012 * gimple-parser.c: Include internal-fn.h.
2013 (c_parser_gimple_statement): Treat a leading CPP_DOT as a call.
2014 (c_parser_gimple_call_internal): New function.
2015 (c_parser_gimple_postfix_expression): Use it to handle CPP_DOT.
2016 Fix typos in comment.
2017
79e7b1fe
JJ
20182018-05-10 Jakub Jelinek <jakub@redhat.com>
2019
2020 PR c++/85662
2021 * c-fold.c (c_fully_fold_internal): Use fold_offsetof rather than
2022 fold_offsetof_1, pass TREE_TYPE (expr) as TYPE to it and drop the
2023 fold_convert_loc.
2024 * c-typeck.c (build_unary_op): Use fold_offsetof rather than
2025 fold_offsetof_1, pass argtype as TYPE to it and drop the
2026 fold_convert_loc.
2027
f7584c81
DP
20282018-05-02 David Pagan <dave.pagan@oracle.com>
2029
2030 PR c/30552
2031 * c-decl.c (old_style_parameter_scope): New function.
2032 * c-parser.c (c_parser_postfix_expression): Check for statement
2033 expressions in old-style function parameter list declarations.
2034 * c-parser.h (old_style_parameter_scope): New extern declaration.
2035
b33a0cb3
JJ
20362018-04-25 Jakub Jelinek <jakub@redhat.com>
2037
2038 PR sanitizer/84307
2039 * c-decl.c (build_compound_literal): Call pushdecl (decl) even when
2040 it is not TREE_STATIC.
2041 * c-typeck.c (c_mark_addressable) <case COMPOUND_LITERAL_EXPR>: Mark
2042 not just the COMPOUND_LITERAL_EXPR node itself addressable, but also
2043 its COMPOUND_LITERAL_EXPR_DECL.
2044
c5c5822a
JM
20452018-03-21 Joseph Myers <joseph@codesourcery.com>
2046
2047 * c-parser.c (c_parser_postfix_expression): For __builtin_tgmath
2048 where all functions return the same _FloatN or _FloatNx type,
2049 treat integer types as _Float64 instead of double.
2050
aa1c9429
JJ
20512018-03-21 Jakub Jelinek <jakub@redhat.com>
2052
2053 PR c/84999
2054 * c-typeck.c (build_binary_op): If c_common_type_for_size fails when
2055 building vector comparison, diagnose it and return error_mark_node.
2056
9bb45a95
JJ
20572018-03-15 Jakub Jelinek <jakub@redhat.com>
2058
2059 PR c/84853
2060 * c-typeck.c (build_binary_op) <case RSHIFT_EXPR, case LSHIFT_EXPR>:
2061 If code1 is INTEGER_TYPE, only allow code0 VECTOR_TYPE if it has
2062 INTEGER_TYPE element type.
2063
ada6bad9
DP
20642018-03-13 David Pagan <dave.pagan@oracle.com>
2065
2066 PR c/46921
2067 * c-typeck.c (output_init_element): Ensure field initializer
2068 expression is always evaluated if there are side effects.
2069
849bbdb9
JJ
20702018-03-06 Jakub Jelinek <jakub@redhat.com>
2071
2072 PR c/84721
2073 * c-parser.c (add_debug_begin_stmt): Don't add DEBUG_BEGIN_STMT if
2074 !building_stmt_list_p ().
2075
d74641bd
RS
20762018-02-13 Richard Sandiford <richard.sandiford@linaro.org>
2077
2078 PR c/84305
2079 * c-decl.c (grokdeclarator): Create an anonymous TYPE_DECL
2080 in PARM and TYPENAME contexts too, but attach it to a BIND_EXPR
2081 and include the BIND_EXPR in the list of things that need to be
2082 pre-evaluated.
2083
0444aa9c
NS
20842018-02-09 Nathan Sidwell <nathan@acm.org>
2085
2086 PR c/84293
2087 * c-typeck.c (build_indirect_ref, build_c_cast): Pass expr location
2088 to strict_aliasing_warning.
2089
7c30b12a
PC
20902018-02-02 Paolo Carlini <paolo.carlini@oracle.com>
2091
2092 * c-typeck.c (really_start_incremental_init, push_init_level,
2093 set_nonincremental_init, output_init_element, process_init_element):
2094 Use DECL_UNNAMED_BIT_FIELD.
2095
2be4dfcb
MP
20962018-01-31 Marek Polacek <polacek@redhat.com>
2097
2098 PR c/81779
2099 * c-parser.c (c_parser_compound_statement_nostart): Call
2100 expansion_point_location_if_in_system_header.
2101
bb9869d5
DM
21022018-01-17 David Malcolm <dmalcolm@redhat.com>
2103
2104 PR c++/83814
2105 * c-fold.c (fold_for_warn): Move from c-common.c, reducing to just
2106 the C part.
2107
b4923738
JJ
21082018-01-13 Jakub Jelinek <jakub@redhat.com>
2109
2110 PR c/83801
2111 * c-tree.h (decl_constant_value_1): Add a bool argument.
2112 * c-typeck.c (decl_constant_value_1): Add IN_INIT argument, allow
2113 returning a CONSTRUCTOR if it is true. Use error_operand_p.
2114 (decl_constant_value): Adjust caller.
2115 * c-fold.c (c_fully_fold_internal): If in_init, pass true to
2116 decl_constant_value_1 as IN_INIT. Otherwise, punt if
2117 decl_constant_value returns initializer that has BLKmode or
2118 array type.
2119 (c_fully_fold_internal) <case COMPONENT_REF>: Fold if !lval.
2120
928686b1
RS
21212018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
2122 Alan Hayward <alan.hayward@arm.com>
2123 David Sherwood <david.sherwood@arm.com>
2124
2125 * c-typeck.c (comptypes_internal, build_binary_op): Handle polynomial
2126 TYPE_VECTOR_SUBPARTS.
2127
85ec4feb
JJ
21282018-01-03 Jakub Jelinek <jakub@redhat.com>
2129
2130 Update copyright years.
2131
913884f7
JJ
21322018-01-01 Jakub Jelinek <jakub@redhat.com>
2133
2134 PR c/83595
2135 * c-parser.c (c_parser_braced_init, c_parser_initelt,
2136 c_parser_conditional_expression, c_parser_cast_expression,
2137 c_parser_sizeof_expression, c_parser_alignof_expression,
2138 c_parser_postfix_expression, c_parser_omp_declare_reduction,
2139 c_parser_transaction_expression): Use set_error () method instead
2140 of setting value member to error_mark_node.
2141
c6cfa2bf
MM
21422017-12-28 Michael Meissner <meissner@linux.vnet.ibm.com>
2143
2144 * c-decl.c (header_for_builtin_fn): Add integer rounding _Float<N>
2145 and _Float<N>X built-in functions.
2146
11d29d63
JJ
21472017-12-22 Jakub Jelinek <jakub@redhat.com>
2148
14ec014e
JJ
2149 PR debug/83550
2150 * c-decl.c (finish_struct): Set DECL_SOURCE_LOCATION on
2151 TYPE_STUB_DECL and call rest_of_type_compilation before processing
2152 incomplete vars rather than after it.
2153
11d29d63
JJ
2154 PR debug/83547
2155 * c-typeck.c (c_finish_stmt_expr): Ignore !TREE_SIDE_EFFECTS as
2156 indicator of ({ }), instead skip all trailing DEBUG_BEGIN_STMTs first,
2157 and consider empty ones if there are no other stmts. For
2158 -Wunused-value walk all statements before the one only followed by
2159 DEBUG_BEGIN_STMTs.
2160
170a8bd6 21612017-12-22 Mike Stump <mikestump@comcast.net>
92a285c1 2162 Eric Botcazou <ebotcazou@adacore.com>
170a8bd6
EB
2163
2164 * c-parser.c (c_parser_while_statement): Add unroll parameter and
2165 build ANNOTATE_EXPR if present. Add 3rd operand to ANNOTATE_EXPR.
2166 (c_parser_do_statement): Likewise.
2167 (c_parser_for_statement): Likewise.
2168 (c_parser_statement_after_labels): Adjust calls to above.
2169 (c_parse_pragma_ivdep): New static function.
2170 (c_parser_pragma_unroll): Likewise.
2171 (c_parser_pragma) <PRAGMA_IVDEP>: Add support for pragma Unroll.
2172 <PRAGMA_UNROLL>: New case.
2173
01512446
JJ
21742017-12-19 Jakub Jelinek <jakub@redhat.com>
2175
2176 * c-typeck.c (comptypes_internal, function_types_compatible_p,
2177 perform_integral_promotions, digest_init): Replace Yoda conditions
2178 with typical order conditions.
2179 * c-decl.c (check_bitfield_type_and_width): Likewise.
2180
c65e18d3
BE
21812017-12-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
2182
2183 * c-typeck.c (c_safe_arg_type_equiv_p,
2184 c_safe_function_type_cast_p): New function.
2185 (build_c_cast): Implement -Wcast-function-type.
2186
b7280579
RB
21872017-12-14 Richard Biener <rguenther@suse.de>
2188
2189 PR c/83415
2190 * c-fold.c (c_fully_fold_internal): Treat VIEW_CONVERT_EXPR
2191 like REALPART_EXPR for the behavior of whether its operand
2192 is an lvalue.
2193
49e6a6c0
MP
21942017-12-12 Marek Polacek <polacek@redhat.com>
2195
2196 PR c/82679
2197 * c-decl.c (grokdeclarator): Check declspecs insted of atomicp.
2198
ab20d992 21992017-12-12 Alexandre Oliva <aoliva@redhat.com>
96a95ac1
AO
2200
2201 * c-objc-common.h (LANG_HOOKS_EMITS_BEGIN_STMT): Redefine as true.
2202 * c-parser.c (add_debug_begin_stmt): New.
2203 (c_parser_declaration_or_fndef): Call it.
2204 (c_parser_compound_statement_nostart): Likewise.
2205 (c_parser_statement_after_labels): Likewise.
2206 * c-typeck (c_finish_stmt_expr): Skip begin stmts markers.
2207
4b2b493f
JM
22082017-12-07 Joseph Myers <joseph@codesourcery.com>
2209
2210 * c-decl.c (build_compound_literal): Add parameter alignas_align
2211 and set alignment of decl if nonzero.
2212 * c-parser.c (c_keyword_starts_typename): Allow RID_ALIGNAS.
2213 (c_parser_declspecs): Allow RID_ALIGNAS to follow a type, like a
2214 qualifier.
2215 (c_parser_struct_declaration): Update syntax comment.
2216 (c_parser_type_name): Add alignas_ok argument and pass it to
2217 c_parser_declspecs.
2218 (c_parser_cast_expression): Pass true to c_parser_type_name and
2219 give error if a cast used an _Alignas specifier.
2220 (c_parser_sizeof_expression): Pass true to c_parser_type_name and
2221 give error if sizeof (type-name) used an _Alignas specifier.
2222 (c_parser_alignof_expression): Pass true to c_parser_type_name and
2223 give error if _Alignof (type-name) used an _Alignas specifier.
2224 (c_parser_postfix_expression_after_paren_type): Check specified
2225 alignment for a compound literal and pass it to
2226 build_compound_literal.
2227 * c-parser.h (c_parser_type_name): Update prototype.
2228 * c-tree.h (build_compound_literal): Update prototype.
2229
5d9ae53d
MS
22302017-12-07 Martin Sebor <msebor@redhat.com>
2231
2232 PR c/81544
2233 * c-decl.c (c_decl_attributes): Look up existing declaration and
2234 pass it to decl_attributes.
2235
c79144f8
DM
22362017-12-06 David Malcolm <dmalcolm@redhat.com>
2237
2238 PR c/83236
2239 * c-decl.c (lookup_name_fuzzy): Don't suggest names that are
2240 reserved for use by the implementation.
2241
613bc14f
DM
22422017-12-06 David Malcolm <dmalcolm@redhat.com>
2243
2244 * c-decl.c: Include "c-family/c-spellcheck.h".
2245
05abad4c
ML
22462017-12-05 Martin Liska <mliska@suse.cz>
2247 Jakub Jelinek <jakub@redhat.com>
2248
2249 * c-typeck.c (pointer_diff): Add new argument and instrument
2250 pointer subtraction.
2251 (build_binary_op): Similar for pointer comparison.
2252
cc6534d4
JJ
22532017-12-01 Jakub Jelinek <jakub@redhat.com>
2254
65791f42
JJ
2255 PR c/79153
2256 * c-parser.c: Include tree-iterator.h.
2257 (c_parser_switch_statement): Emit LABEL_EXPR for the break label
2258 into SWITCH_BODY instead of after it and set SWITCH_BREAK_LABEL_P
2259 on it.
2260
cc6534d4
JJ
2261 PR c/83222
2262 * c-tree.h (decl_constant_value_1): Declare.
2263 * c-typeck.c (decl_constant_value_1): New function.
2264 (decl_constant_value): Use it.
2265 * c-fold.c (c_fully_fold_internal): If in_init, use
2266 decl_constant_value_1 instead of decl_constant_value.
2267
5de73c05
JJ
22682017-11-30 Jakub Jelinek <jakub@redhat.com>
2269
2270 * c-parser.c (c_parser_postfix_expression): Use ; instead of ;;.
2271
058f0b9e
JJ
22722017-11-28 Jakub Jelinek <jakub@redhat.com>
2273
2274 PR sanitizer/81275
2275 * c-typeck.c (c_finish_case): Set SWITCH_ALL_CASES_P if
2276 c_switch_covers_all_cases_p returns true.
2277
5e9d6aa4 22782017-11-28 Julia Koval <julia.koval@intel.com>
92a285c1 2279 Sebastian Peryt <sebastian.peryt@intel.com>
5e9d6aa4
JK
2280
2281 * Make-lang.in (c/c-array-notation.o): Remove.
2282 * c-array-notation.c: Delete.
2283 * c-decl.c: Remove cilkplus condition.
2284 * c-parser.c (c_parser_cilk_simd, c_parser_cilk_for,
2285 c_parser_cilk_verify_simd, c_parser_array_notation,
2286 c_parser_cilk_clause_vectorlength, c_parser_cilk_grainsize,
2287 c_parser_cilk_simd_fn_vector_attrs,
2288 c_finish_cilk_simd_fn_tokens): Delete.
2289 (c_parser_declaration_or_fndef): Remove cilkplus condition.
2290 (c_parser_direct_declarator_inner): Ditto.
2291 (CILK_SIMD_FN_CLAUSE_MASK): Delete.
2292 (c_parser_attributes, c_parser_compound_statement,
2293 c_parser_statement_after_labels, c_parser_if_statement,
2294 c_parser_switch_statement, c_parser_while_statement,
2295 c_parser_do_statement, c_parser_for_statement,
2296 c_parser_unary_expression, c_parser_postfix_expression,
2297 c_parser_postfix_expression_after_primary,
2298 c_parser_pragma, c_parser_omp_clause_name, c_parser_omp_all_clauses,
2299 c_parser_omp_for_loop, c_finish_omp_declare_simd): Remove cilkplus
2300 support.
2301 * c-typeck.c (build_array_ref, build_function_call_vec,
2302 convert_arguments,
2303 lvalue_p, build_compound_expr, c_finish_return, c_finish_if_stmt,
2304 c_finish_loop, build_binary_op): Remove cilkplus support.
2305
9e851845
JJ
23062017-11-28 Jakub Jelinek <jakub@redhat.com>
2307
2308 * c-typeck.c (c_start_case): Build SWITCH_EXPR using build2 instead
2309 of build3.
2310
ab20d992 23112017-11-14 Boris Kolpackov <boris@codesynthesis.com>
8c7dbea9
BK
2312
2313 * Make-lang.in (c.install-plugin): Install backend import library.
2314
41521dee
JJ
23152017-11-23 Jakub Jelinek <jakub@redhat.com>
2316
2317 * c-parser.c (c_parser_omp_declare_simd): Reject declare simd in
2318 pragma_stmt context.
2319
ac9effed
EB
23202017-11-23 Mike Stump <mikestump@comcast.net>
2321 Eric Botcazou <ebotcazou@adacore.com>
2322
2323 * c-parser.c (c_parser_while_statement): Pass 3rd operand to
2324 ANNOTATE_EXPR.
2325 (c_parser_do_statement): Likewise.
2326 (c_parser_for_statement): Likewise.
2327
ce95abc4
DM
23282017-11-22 David Malcolm <dmalcolm@redhat.com>
2329
2330 PR c++/62170
2331 * c-objc-common.c (c_tree_printer): Convert penultimate param from
2332 bool to bool *. Within '%T' handling, if showing an "aka", use
2333 "quoted" param to add appropriate quoting.
2334
974aedcc
MP
23352017-11-22 Marek Polacek <polacek@redhat.com>
2336
2337 PR c++/60336
2338 PR middle-end/67239
2339 PR target/68355
2340 * c-decl.c (grokdeclarator): Set DECL_PADDING_P on unnamed bit-fields.
2341
d4300cc6
DM
23422017-11-21 David Malcolm <dmalcolm@redhat.com>
2343
2344 PR c/83056
2345 * c-decl.c (lookup_name_fuzzy): Don't suggest names that came from
2346 earlier failed lookups.
2347
1af4ebf5
MG
23482017-11-21 Marc Glisse <marc.glisse@inria.fr>
2349
2350 * c-fold.c (c_fully_fold_internal): Handle POINTER_DIFF_EXPR.
2351 * c-typeck.c (pointer_diff): Use POINTER_DIFF_EXPR.
2352
26edace6
DM
23532017-11-20 David Malcolm <dmalcolm@redhat.com>
2354
2355 PR c/81404
2356 * c-decl.c: Include "c-family/known-headers.h".
2357 (get_c_name_hint): Rename to get_stdlib_header_for_name and move
2358 to known-headers.cc.
2359 (class suggest_missing_header): Move to known-header.h.
2360 (lookup_name_fuzzy): Call get_c_stdlib_header_for_name rather
2361 than get_c_name_hint.
2362
b1212255
DM
23632017-11-20 David Malcolm <dmalcolm@redhat.com>
2364
2365 * c-decl.c (get_c_name_hint): New function.
2366 (class suggest_missing_header): New class.
2367 (lookup_name_fuzzy): Call get_c_name_hint and use it to
2368 suggest missing headers to the user.
2369
6c7a259b
DM
23702017-11-20 David Malcolm <dmalcolm@redhat.com>
2371
2372 * c-decl.c: Define INCLUDE_UNIQUE_PTR before including system.h.
2373 Include "c-family/name-hint.h"
2374 (implicit_decl_warning): Convert "hint" from
2375 const char * to name_hint. Pass location to
2376 lookup_name_fuzzy. Suppress any deferred diagnostic if the
2377 warning was not printed.
2378 (undeclared_variable): Likewise for "guessed_id".
2379 (lookup_name_fuzzy): Convert return type from const char *
2380 to name_hint. Add location_t param.
2381 * c-parser.c: Define INCLUDE_UNIQUE_PTR before including system.h.
2382 Include "c-family/name-hint.h"
2383 (c_parser_declaration_or_fndef): Convert "hint" from
2384 const char * to name_hint. Pass location to lookup_name_fuzzy.
2385 (c_parser_parameter_declaration): Likewise.
2386
f9c59f7e
JJ
23872017-11-19 Jakub Jelinek <jakub@redhat.com>
2388
2389 PR c/66618
2390 PR c/69960
2391 * c-parser.c (c_parser_omp_atomic): Pass true as LVAL to c_fully_fold
2392 where needed.
2393 * c-typeck.c (build_unary_op, build_modify_expr, build_asm_expr,
2394 handle_omp_array_sections): Likewise.
2395 (digest_init): Don't call decl_constant_value_for_optimization.
2396 * c-tree.h (decl_constant_value_for_optimization): Removed.
2397 * c-fold.c (c_fold_array_ref): New function.
2398 (c_fully_fold_internal): Add LVAL argument, propagate it through
2399 recursive calls. For VAR_P call decl_constant_value and
2400 unshare if not LVAL and either optimizing or IN_INIT. Remove
2401 decl_constant_value_for_optimization calls. If IN_INIT and not LVAL,
2402 fold ARRAY_REF with STRING_CST and INTEGER_CST operands.
2403 (c_fully_fold): Add LVAL argument, pass it through to
2404 c_fully_fold_internal.
2405 (decl_constant_value_for_optimization): Removed.
2406
3ca0dc60
JM
24072017-11-15 Joseph Myers <joseph@codesourcery.com>
2408
2409 PR c/81156
2410 * c-parser.c (check_tgmath_function): New function.
2411 (enum tgmath_parm_kind): New enum.
2412 (c_parser_postfix_expression): Handle __builtin_tgmath.
2413
64a5912c
DM
24142017-10-31 David Malcolm <dmalcolm@redhat.com>
2415
2416 * c-decl.c (implicit_decl_warning): Update for renaming of
2417 pedwarn_at_rich_loc and warning_at_rich_loc.
2418 (implicitly_declare): Likewise for renaming of inform_at_rich_loc.
2419 (undeclared_variable): Likewise for renaming of error_at_rich_loc.
2420 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
2421 (c_parser_struct_or_union_specifier): Likewise for renaming of
2422 pedwarn_at_rich_loc.
2423 (c_parser_parameter_declaration): Likewise for renaming of
2424 error_at_rich_loc.
2425 * c-typeck.c (build_component_ref): Likewise.
2426 (build_unary_op): Likewise for renaming of inform_at_rich_loc.
2427 (pop_init_level): Likewise for renaming of warning_at_rich_loc.
2428 (set_init_label): Likewise for renaming of error_at_rich_loc.
2429
c1136864
RB
24302017-10-30 Richard Biener <rguenther@suse.de>
2431
2432 * gimple-parser.c (c_parser_gimple_statement): Parse conditional
2433 stmts.
2434
ee5fd23a
MM
24352017-10-27 Michael Meissner <meissner@linux.vnet.ibm.com>
2436
2437 * c-decl.c (header_for_builtin_fn): Add support for copysign, fma,
2438 fmax, fmin, and sqrt _Float<N> and _Float<N>X variants.
2439
1a59ccf2
DM
24402017-10-25 David Malcolm <dmalcolm@redhat.com>
2441
2442 PR c/7356
2443 * c-parser.c (c_parser_declaration_or_fndef): Detect missing
2444 semicolons.
2445
bc1a75dd
JJ
24462017-10-25 Jakub Jelinek <jakub@redhat.com>
2447
2448 PR libstdc++/81706
2449 * c-decl.c (merge_decls): Copy "omp declare simd" attributes from
2450 newdecl to corresponding __builtin_ if any.
2451
ff1ff960
PC
24522017-10-24 Paolo Carlini <paolo.carlini@oracle.com>
2453
2454 PR c++/82466
2455 * c-decl.c (diagnose_mismatched_decls): Use
2456 OPT_Wbuiltin_declaration_mismatch.
2457
62e1c678
DM
24582017-10-12 David Malcolm <dmalcolm@redhat.com>
2459
2460 * c-parser.c (c_parser_require): Add "type_is_unique" param and
2461 use it to guard calls to maybe_suggest_missing_token_insertion.
2462 (c_parser_parms_list_declarator): Override default value of new
2463 "type_is_unique" param to c_parser_require.
2464 (c_parser_asm_statement): Likewise.
2465 * c-parser.h (c_parser_require): Add "type_is_unique" param,
2466 defaulting to true.
2467
a92f6726
NS
24682017-10-11 Nathan Sidwell <nathan@acm.org>
2469
2470 * c-decl.c (grokdeclarator): Check HAS_DECL_ASSEMBLER_NAME_P too.
2471
8e6cdc90
RS
24722017-10-10 Richard Sandiford <richard.sandiford@linaro.org>
2473
2474 * c-parser.c (c_parser_cilk_clause_vectorlength): Use wi::to_wide when
2475 operating on trees as wide_ints.
2476 * c-typeck.c (build_c_cast, c_finish_omp_clauses): Likewise.
2477 (c_tree_equal): Likewise.
2478
8139a48e
DM
24792017-10-04 David Malcolm <dmalcolm@redhat.com>
2480
2481 * c-decl.c (push_parm_decl): Store c_parm's location into the
2482 PARAM_DECL.
2483 (build_c_parm): Add "loc" param and store it within the c_parm.
2484 * c-parser.c (struct c_parser): Add "last_token_location" field.
2485 (c_parser_consume_token): Store location of the token into the
2486 new field.
2487 (c_parser_declaration_or_fndef): Store params into DECL_ARGUMENTS
2488 when handling a FUNCTION_DECL, if it doesn't already have them.
2489 (c_parser_parameter_declaration): Generate a location for the
2490 parameter, and pass it to the call to build_c_parm.
2491 * c-tree.h (struct c_parm): Add field "loc".
2492 (build_c_parm): Add location_t param.
2493 * c-typeck.c (get_fndecl_argument_location): New function.
2494 (inform_for_arg): New function.
2495 (convert_for_assignment): Use inform_for_arg when dealing with
2496 ic_argpass.
2497
2a389958
JJ
24982017-09-29 Jakub Jelinek <jakub@redhat.com>
2499
7d386d45
JJ
2500 * c-decl.c (grokfield): Use SET_DECL_C_BIT_FIELD here if
2501 width is non-NULL.
2502 (finish_struct): Test DECL_C_BIT_FIELD instead of DECL_INITIAL,
2503 don't SET_DECL_C_BIT_FIELD here.
2504
2a389958
JJ
2505 PR c/82340
2506 * c-decl.c (build_compound_literal): Use c_apply_type_quals_to_decl
2507 instead of trying to set just TREE_READONLY manually.
2508
ebc6a85e
TV
25092017-09-16 Tom de Vries <tom@codesourcery.com>
2510
2511 PR c/81875
2512 * c-parser.c (c_parser_omp_for_loop): Fold only operands of cond, not
2513 cond itself.
2514
bb75facd
JM
25152017-09-15 Joseph Myers <joseph@codesourcery.com>
2516
2517 PR c/82071
2518 * c-typeck.c (ep_convert_and_check): Just call convert_and_check
2519 for C11.
2520 (build_conditional_expr): For C11, generate result with excess
2521 precision when one argument is an integer and the other is of a
2522 type using excess precision.
2523
1d933576
BE
25242017-09-15 Bernd Edlinger <bernd.edlinger@hotmail.de>
2525
2526 * c-typeck.c (build_c_cast): Implement -Wcast-align=strict.
2527
267bbb6f
MP
25282017-09-13 Marek Polacek <polacek@redhat.com>
2529
2530 PR c/82167
2531 * c-typeck.c (c_expr_sizeof_expr): Use the type of expr.value rather
2532 than expr.original_type.
2533
6836632e
NS
25342017-09-12 Nathan Sidwell <nathan@acm.org>
2535
2536 * c-decl.c (field_decl_cmp, resort_data, resort_field_decl_cmp,
2537 resort_sorted_fields): Moved from c-family/c-common.c.
2538 * c-lang.h (struct sorted_fields_type): Moved from c-family/c-common.h.
2539
e035be33
JM
25402017-09-01 Joseph Myers <joseph@codesourcery.com>
2541
2542 PR c/82071
2543 * c-typeck.c (build_atomic_assign): Handle argument with excess
2544 precision. Ensure any EXCESS_PRECISION_EXPR is present in
2545 argument passed to build_binary_op and convert_for_assignment but
2546 not for call to c_fully_fold.
2547 (build_modify_expr): Do not remove EXCESS_PRECISION_EXPR early.
2548 Ensure build_binary_op is called with argument with original
2549 semantic type. Avoid calling c_fully_fold with an
2550 EXCESS_PRECISION_EXPR from build_binary_op.
2551
d2e05fcb
JJ
25522017-09-01 Jakub Jelinek <jakub@redhat.com>
2553
2554 PR c/81887
2555 * c-parser.c (c_parser_omp_ordered): Handle -fopenmp-simd.
2556
b397965c
RS
25572017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
2558 Alan Hayward <alan.hayward@arm.com>
2559 David Sherwood <david.sherwood@arm.com>
2560
2561 * c-typeck.c (build_binary_op): Use SCALAR_TYPE_MODE.
2562 (c_common_type): Likewise. Use as_a <scalar_mode> when setting
2563 m1 and m2 to the signed equivalent of a fixed-point
2564 SCALAR_TYPE_MODE.
2565
14e18d71
DM
25662017-08-24 David Malcolm <dmalcolm@redhat.com>
2567
2568 * c-tree.h (c_expr::get_location) Use EXPR_HAS_LOCATION rather
2569 than CAN_HAVE_LOCATION_P when determining whether to use the
2570 location_t value within "value".
2571
7f204c0f
DM
25722017-08-21 David Malcolm <dmalcolm@redhat.com>
2573
2574 * c-parser.c (c_parser_expr_list): Use c_expr::get_location ()
2575 rather than peeking the location of the first token.
2576 * c-tree.h (c_expr::get_location): New method.
2577
2f687306
DM
25782017-08-21 David Malcolm <dmalcolm@redhat.com>
2579
2580 * c-typeck.c (build_function_call_vec): Pass arg_loc to call
2581 to check_function_arguments.
2582
3e7b80d7
MP
25832017-08-18 Marek Polacek <polacek@redhat.com>
2584
2585 * c-parser.c (c_parser_postfix_expression): Remove unused code. Update
2586 commentary.
2587
00aa1fa2
L
25882017-08-18 H.J. Lu <hongjiu.lu@intel.com>
2589
2590 PR c/53037
2591 * c-decl.c (merge_decls): Also merge DECL_WARN_IF_NOT_ALIGN.
2592 (check_bitfield_type_and_width): Don't allow bit-field with
2593 warn_if_not_aligned type.
2594
da67acb9
MS
25952017-08-14 Martin Sebor <msebor@redhat.com>
2596
2597 PR c/81117
2598 * c-objc-common.c (c_objc_common_init): Handle 'G'.
2599
bb85aa74
MP
26002017-08-11 Marek Polacek <polacek@redhat.com>
2601
2602 PR c/81795
2603 * c-decl.c (pushtag): Only print inform if the warning was printed.
2604 (grokdeclarator): Likewise.
2605
32129a17
DM
26062017-08-10 David Malcolm <dmalcolm@redhat.com>
2607
2608 * c-parser.c (c_parser_error): Rename to...
2609 (c_parser_error_richloc): ...this, making static, and adding
2610 "richloc" parameter, passing it to the c_parse_error call,
2611 rather than calling c_parser_set_source_position_from_token.
2612 (c_parser_error): Reintroduce, reimplementing in terms of the
2613 above, converting return type from void to bool.
2614 (class token_pair): New class.
2615 (struct matching_paren_traits): New struct.
2616 (matching_parens): New typedef.
2617 (struct matching_brace_traits): New struct.
2618 (matching_braces): New typedef.
2619 (get_matching_symbol): New function.
2620 (c_parser_require): Add param MATCHING_LOCATION, using it to
2621 highlight matching "opening" tokens for missing "closing" tokens.
2622 (c_parser_skip_until_found): Likewise.
2623 (c_parser_static_assert_declaration_no_semi): Convert explicit
2624 parsing of CPP_OPEN_PAREN and CPP_CLOSE_PAREN to use of
2625 class matching_parens, so that the pertinent open parenthesis is
2626 highlighted when there are problems locating the close
2627 parenthesis.
2628 (c_parser_struct_or_union_specifier): Likewise.
2629 (c_parser_typeof_specifier): Likewise.
2630 (c_parser_alignas_specifier): Likewise.
2631 (c_parser_simple_asm_expr): Likewise.
2632 (c_parser_braced_init): Likewise, for matching_braces.
2633 (c_parser_paren_condition): Likewise, for matching_parens.
2634 (c_parser_switch_statement): Likewise.
2635 (c_parser_for_statement): Likewise.
2636 (c_parser_asm_statement): Likewise.
2637 (c_parser_asm_operands): Likewise.
2638 (c_parser_cast_expression): Likewise.
2639 (c_parser_sizeof_expression): Likewise.
2640 (c_parser_alignof_expression): Likewise.
2641 (c_parser_generic_selection): Likewise.
2642 (c_parser_postfix_expression): Likewise for cases RID_VA_ARG,
2643 RID_OFFSETOF, RID_TYPES_COMPATIBLE_P, RID_AT_SELECTOR,
2644 RID_AT_PROTOCOL, RID_AT_ENCODE, reindenting as necessary.
2645 In case CPP_OPEN_PAREN, pass loc_open_paren to the
2646 c_parser_skip_until_found call.
2647 (c_parser_objc_class_definition): Use class matching_parens as
2648 above.
2649 (c_parser_objc_method_decl): Likewise.
2650 (c_parser_objc_try_catch_finally_statement): Likewise.
2651 (c_parser_objc_synchronized_statement): Likewise.
2652 (c_parser_objc_at_property_declaration): Likewise.
2653 (c_parser_oacc_wait_list): Likewise.
2654 (c_parser_omp_var_list_parens): Likewise.
2655 (c_parser_omp_clause_collapse): Likewise.
2656 (c_parser_omp_clause_default): Likewise.
2657 (c_parser_omp_clause_if): Likewise.
2658 (c_parser_omp_clause_num_threads): Likewise.
2659 (c_parser_omp_clause_num_tasks): Likewise.
2660 (c_parser_omp_clause_grainsize): Likewise.
2661 (c_parser_omp_clause_priority): Likewise.
2662 (c_parser_omp_clause_hint): Likewise.
2663 (c_parser_omp_clause_defaultmap): Likewise.
2664 (c_parser_oacc_single_int_clause): Likewise.
2665 (c_parser_omp_clause_ordered): Likewise.
2666 (c_parser_omp_clause_reduction): Likewise.
2667 (c_parser_omp_clause_schedule): Likewise.
2668 (c_parser_omp_clause_num_teams): Likewise.
2669 (c_parser_omp_clause_thread_limit): Likewise.
2670 (c_parser_omp_clause_aligned): Likewise.
2671 (c_parser_omp_clause_linear): Likewise.
2672 (c_parser_omp_clause_safelen): Likewise.
2673 (c_parser_omp_clause_simdlen): Likewise.
2674 (c_parser_omp_clause_depend): Likewise.
2675 (c_parser_omp_clause_map): Likewise.
2676 (c_parser_omp_clause_device): Likewise.
2677 (c_parser_omp_clause_dist_schedule): Likewise.
2678 (c_parser_omp_clause_proc_bind): Likewise.
2679 (c_parser_omp_clause_uniform): Likewise.
2680 (c_parser_omp_for_loop): Likewise.
2681 (c_parser_cilk_clause_vectorlength): Likewise.
2682 (c_parser_cilk_clause_linear): Likewise.
2683 (c_parser_transaction_expression): Likewise.
2684 * c-parser.h (c_parser_require): Add param matching_location with
2685 default UNKNOWN_LOCATION.
2686 (c_parser_error): Convert return type from void to bool.
2687 (c_parser_skip_until_found): Add param matching_location with
2688 default UNKNOWN_LOCATION.
2689
30af3a2b
MP
26902017-08-09 Marek Polacek <polacek@redhat.com>
2691
2692 * c-decl.c (build_enumerator): Use true/false instead of 1/0.
2693 * c-tree.h (build_external_ref): Update declaration.
2694 * c-typeck.c (build_array_ref): Use true/false instead of 1/0.
2695 (build_external_ref): Change the type of a parameter to bool.
2696 (parser_build_binary_op): Use true/false instead of 1/0.
2697 (pointer_diff): Likewise.
2698 (build_modify_expr): Likewise.
2699 (set_designator): Change the type of a parameter to bool.
2700 (set_init_index): Use true/false instead of 1/0.
2701 (set_init_label): Likewise.
2702 (output_init_element): Change the type of a parameter to bool.
2703 (output_pending_init_elements): Use true/false instead of 1/0.
2704 (process_init_element): Likewise.
2705 (build_binary_op): Change the type of a parameter to bool.
2706
296c53ac
MP
27072017-08-09 Marek Polacek <polacek@redhat.com>
2708
2709 PR c/81233
2710 * c-typeck.c (pedwarn_init): Make the function take a variable list.
2711 Call emit_diagnostic_valist instead of pedwarn.
2712 (convert_for_assignment): Unroll the PEDWARN_FOR_ASSIGNMENT macro.
2713 Print the relevant types in diagnostics.
2714
a32c8316
MP
27152017-08-09 Marek Polacek <polacek@redhat.com>
2716
2717 PR c/81417
2718 * c-array-notation.c (fix_builtin_array_notation_fn): Update calls to
ab20d992 2719 build_conditional_expr.
a32c8316
MP
2720 * c-parser.c (c_parser_conditional_expression): Create locations for
2721 EXP1 and EXP2 from their source ranges. Pass the locations down to
2722 build_conditional_expr.
2723 * c-tree.h (build_conditional_expr): Update declaration.
2724 * c-typeck.c (build_conditional_expr): Add location_t parameters.
2725 For -Wsign-compare, also print the types.
2726
314e6352
ML
27272017-08-08 Martin Liska <mliska@suse.cz>
2728
2729 * c-convert.c: Include header files.
2730 * c-typeck.c: Likewise.
2731
577eec56
ML
27322017-08-07 Martin Liska <mliska@suse.cz>
2733
2734 * c-parser.c (c_parser_attributes): Canonicalize name of an
2735 attribute.
2736
f7b6353a
MP
27372017-08-02 Marek Polacek <polacek@redhat.com>
2738
2739 PR c/81289
2740 * c-parser.c (c_parser_unary_expression): Use set_error.
2741
8a6eab34
MP
2742 PR c/81448
2743 PR c/81306
2744 * c-warn.c (warn_for_multistatement_macros): Prevent bogus
2745 warnings. Avoid walking MACRO_MAP_LOCATIONS.
2746
ab20d992 27472017-07-31 Jan Hubicka <hubicka@ucw.cz>
7fef86d3
JH
2748 Martin Liska <mliska@suse.cz>
2749
2750 * c-typeck.c (c_finish_goto_label): Build gimple predict
f7b6353a 2751 statement.
7fef86d3 2752
f34ebeb2
ML
27532017-07-31 Martin Liska <mliska@suse.cz>
2754
2755 PR sanitize/81530
2756 * c-convert.c (convert): Guard condition with flag_sanitize_p
2757 also with current_function_decl non-null equality.
2758 * c-decl.c (grokdeclarator): Likewise.
2759 * c-typeck.c (build_binary_op): Likewise.
2760
8595f67b
MP
27612017-07-25 Marek Polacek <polacek@redhat.com>
2762
2763 * c-decl.c (grokfield): Remove local variable.
2764
d49718d6
MP
27652017-07-25 Marek Polacek <polacek@redhat.com>
2766
2767 PR c/81364
2768 * c-parser.c (c_parser_else_body): Don't warn about multistatement
2769 macro expansion if the body is in { }.
2770 (c_parser_while_statement): Likewise.
2771 (c_parser_for_statement): Likewise.
2772
ff22eb12
NS
27732017-07-18 Nathan Sidwell <nathan@acm.org>
2774
2775 * c-parser.c (c_parser_array_notation): Use TYPE_{MIN,MAX}_VALUE.
2776
eea77d1f
DM
27772017-07-14 David Malcolm <dmalcolm@redhat.com>
2778
2779 * c-decl.c (implicitly_declare): When suggesting a missing
2780 #include, provide a fix-it hint.
2781
b6f43128
DM
27822017-07-06 David Malcolm <dmalcolm@redhat.com>
2783
2784 * c-lang.c (selftest::run_c_tests): Move body to c_family_tests,
2785 and call that instead.
2786 * c-tree.h (selftest::run_c_tests): New decl.
2787
3e2becc4
MP
27882017-06-26 Marek Polacek <polacek@redhat.com>
2789
2790 PR c/80116
2791 * c-parser.c (c_parser_if_body): Set the location of the
2792 body of the conditional after parsing all the labels. Call
2793 warn_for_multistatement_macros.
2794 (c_parser_else_body): Likewise.
2795 (c_parser_switch_statement): Likewise.
2796 (c_parser_while_statement): Likewise.
2797 (c_parser_for_statement): Likewise.
2798 (c_parser_statement): Add a default argument. Save the location
2799 after labels have been parsed.
2800 (c_parser_c99_block_statement): Likewise.
2801
343ae898
RB
28022017-06-19 Richard Biener <rguenther@suse.de>
2803
2804 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
2805 negated _Literals to parse _Literal (int) -1.
2806
45b2222a
ML
28072017-06-13 Martin Liska <mliska@suse.cz>
2808
2809 PR sanitize/78204
2810 * c-convert.c (convert): Use sanitize_flags_p.
2811 * c-decl.c (grokdeclarator): Likewise.
2812 * c-typeck.c (convert_for_assignment): Likewise.
2813 (c_finish_return): Likewise.
2814 (build_binary_op): Likewise.
2815
8ab7005b
JJ
28162017-06-08 Jakub Jelinek <jakub@redhat.com>
2817
2818 PR c/81006
2819 * c-typeck.c (handle_omp_array_sections_1): Convert TYPE_MAX_VALUE
2820 to sizetype before size_binop.
2821
363dc72c
JJ
28222017-06-07 Jakub Jelinek <jakub@redhat.com>
2823
2824 * gimple-parser.c (c_parser_parse_gimple_body): Use TDI_gimple instead
2825 of TDI_generic.
2826
dc949728
MP
28272017-06-06 Marek Polacek <polacek@redhat.com>
2828
2829 PR c/79983
2830 * c-decl.c (start_struct): Use the location of TYPE_STUB_DECL of
2831 ref.
2832 (start_enum): Use the location of TYPE_STUB_DECL of enumtype.
2833
40ffd95f
BE
28342017-06-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
2835
2836 * c-parser.c (c_parser_binary_expression): Implement the
2837 -Wsizeof_pointer_div warning.
2838 (c_parser_postfix_expression): Allow SIZEOF_EXPR as expr.original_code
2839 from a parenthesized expression.
2840 (c_parser_expr_list): Use c_last_sizeof_loc.
2841 * c-tree.h (c_last_sizeof_loc): New external.
2842 * c-typeck.c (c_last_sizeof_loc): New variable.
2843 (c_expr_sizeof_expr, c_expr_sizeof_type): Assign c_last_sizeof_loc.
2844
9fc5e7a4
MM
28452017-05-31 Mikhail Maltsev <maltsevm@gmail.com>
2846
2847 PR testsuite/80580
2848 * gimple-parser.c (c_parser_gimple_if_stmt): Check for empty labels.
2849
f012c8ef
DM
28502017-05-30 David Malcolm <dmalcolm@redhat.com>
2851
2852 * c-objc-common.c (c_tree_printer): Gain bool and const char **
2853 parameters.
2854
3cd211af
MS
28552017-05-24 Martin Sebor <msebor@redhat.com>
2856
2857 PR c/80731
2858 * c-fold.c (c_fully_fold_internal): Adjust.
2859 * c-typeck.c (parser_build_unary_op): Adjust.
2860
fd71a9a2
TS
28612017-05-23 Thomas Schwinge <thomas@codesourcery.com>
2862
2863 * c-parser.c (OACC_KERNELS_CLAUSE_MASK): Add
2864 "PRAGMA_OACC_CLAUSE_NUM_GANGS", "PRAGMA_OACC_CLAUSE_NUM_WORKERS",
2865 "VECTOR_LENGTH".
2866
92fa0f9e
MP
28672017-05-23 Marek Polacek <polacek@redhat.com>
2868
2869 * c-parser.c (c_parser_compound_statement_nostart): Remove redundant
2870 quotes.
2871
d11c168a
JJ
28722017-05-22 Jakub Jelinek <jakub@redhat.com>
2873
2874 * c-fold.c (c_fully_fold_internal): Save the c_fully_fold_internal
2875 result for SAVE_EXPR operand and set SAVE_EXPR_FOLDED_P even if
2876 it returned invariant. Call tree_invariant_p unconditionally
2877 afterwards to decide whether to return expr or op0.
2878
58aca9d9
NS
28792017-05-22 Nathan Sidwell <nathan@acm.org>
2880
2881 * c-decl.c (c_parse_final_cleanups): Drop TDI_tu handling.
2882
7fd549d2
TS
28832017-05-19 Thomas Schwinge <thomas@codesourcery.com>
2884
2885 * c-parser.c (c_parser_omp_clause_default): Handle
2886 "OMP_CLAUSE_DEFAULT_PRESENT".
2887
6ecd2339
BE
28882017-05-18 Bernd Edlinger <bernd.edlinger@hotmail.de>
2889
2890 * config-lang.in (gtfiles): Add c-family/c-format.c.
2891
8a57ecff
NS
28922017-05-18 Nathan Sidwell <nathan@acm.org>
2893
2894 * c-decl.c (pushdecl_top_level): Delete unused function.
2895
6574d78e
MP
28962017-05-18 Marek Polacek <polacek@redhat.com>
2897
2898 * c-decl.c (match_builtin_function_types): Use NULL_TREE instead of 0.
2899 (check_earlier_gotos): Likewise.
2900 (define_label): Likewise.
2901 (pending_xref_error): Likewise.
2902 (smallest_type_quals_location): Likewise.
2903 (grokdeclarator): Likewise.
2904 (grokparms): Likewise.
2905 (identifier_global_value): Likewise.
2906 * c-typeck.c (set_nonincremental_init_from_string): Likewise.
2907 (find_init_member): Likewise.
2908
e3455240
MP
29092017-05-18 Marek Polacek <polacek@redhat.com>
2910
2911 * c-decl.c (start_decl): Use false/true instead of 0/1.
2912 (grokdeclarator): Likewise.
2913 (finish_struct): Likewise.
2914 (start_function): Change the return type to bool. Use false/true
2915 instead of 0/1.
2916 (declspecs_add_qual): Use UNKNOWN_LOCATION instead of 0.
2917 * c-tree.h (start_function): Update.
2918 * c-typeck.c (same_translation_unit_p): Change the return type to bool.
2919 (set_designator): Change the return type to bool. Use false/true
2920 instead of 0/1.
2921
3fa8871b
MP
29222017-05-17 Marek Polacek <polacek@redhat.com>
2923
2924 * c-decl.c: Use NULL_TREE instead of 0 where appropriate.
2925 * c-typeck.c: Likewise.
2926
142473df
MP
29272017-05-17 Marek Polacek <polacek@redhat.com>
2928
2929 PR sanitizer/80659
2930 * c-decl.c (build_compound_literal): Set DECL_ARTIFICIAL and
2931 DECL_IGNORED_P even for non-static compound literals.
2932
1a817418
ML
29332017-05-17 Martin Liska <mliska@suse.cz>
2934
2935 * c-decl.c (c_parse_final_cleanups): Introduce dump_flags_t type and
2936 use it instead of int type.
2937
b2fa0a8b
MP
29382017-05-17 Marek Polacek <polacek@redhat.com>
2939
2940 * c-convert.c (convert): Replace c_save_expr with save_expr. Don't
2941 call c_fully_fold.
2942 (convert) <case COMPLEX_TYPE>: Remove special handling of COMPLEX_TYPEs.
ab20d992 2943 * c-decl.c (grokdeclarator): Replace c_save_expr with save_expr.
b2fa0a8b
MP
2944 * c-fold.c (c_fully_fold_internal): Handle SAVE_EXPR.
2945 * c-parser.c (c_parser_declaration_or_fndef): Replace c_save_expr with
2946 save_expr.
2947 (c_parser_conditional_expression): Likewise.
2948 * c-tree.h (SAVE_EXPR_FOLDED_P): Define.
2949 * c-typeck.c (build_modify_expr): Replace c_save_expr with save_expr.
2950 (process_init_element): Likewise.
2951 (build_binary_op): Likewise.
2952 (handle_omp_array_sections_1): Likewise.
2953
1e47f02b
TS
29542017-05-12 Thomas Schwinge <thomas@codesourcery.com>
2955
2956 * c-parser.c (c_parser_omp_clause_num_gangs)
2957 (c_parser_omp_clause_num_workers)
2958 (c_parser_omp_clause_vector_length): Merge functions into...
2959 (c_parser_oacc_single_int_clause): ... this new function. Adjust
2960 all users.
2961
c24e924f
NS
29622017-05-11 Nathan Sidwell <nathan@acm.org>
2963
2964 * gimple-parser.c: Don't #include tree-dump.h.
2965
c587104e
MM
29662017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
2967
2968 PR testsuite/80580
2969 * gimple-parser.c (c_parser_parse_ssa_name): Validate SSA name base.
2970
67ac9a9d
MM
29712017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
2972
2973 PR testsuite/80580
2974 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
2975 incorrect __MEM syntax.
2976
ac4eb40f
MM
29772017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
2978
2979 PR testsuite/80580
2980 * gimple-parser.c (c_parser_gimple_unary_expression): Check argument
2981 type of unary '*'.
2982
641da50a
NS
29832017-05-09 Nathan Sidwell <nathan@acm.org>
2984
2985 * c-tree.h (pushdecl): Declare.
2986
56d35585
DM
29872017-05-05 David Malcolm <dmalcolm@redhat.com>
2988
2989 * c-decl.c (warn_defaults_to): Replace report_diagnostic
2990 with diagnostic_report_diagnostic.
2991 * c-errors.c (pedwarn_c99): Likewise.
2992 (pedwarn_c90): Likewise.
2993
815d9cc6
XR
29942017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn>
2995
92a285c1 2996 PR c++/80038
815d9cc6
XR
2997 * c-gimplify.c (c_gimplify_expr): Remove calls to
2998 cilk_gimplifY_call_params_in_spawned_fn.
2999
1c4ea66f
DM
30002017-04-25 David Malcolm <dmalcolm@redhat.com>
3001
3002 * c-parser.c (c_parser_struct_or_union_specifier): Add fix-it
3003 hint for removing extra semicolon.
3004
666f7903
JJ
30052017-04-21 Jakub Jelinek <jakub@redhat.com>
3006
3007 PR c/80468
3008 * c-decl.c (finish_declspecs) <case cts_int_n>: If int_n_idx is not
3009 enabled, set specs->type to integer_type_node.
3010
5764ee3c
JW
30112017-04-03 Jonathan Wakely <jwakely@redhat.com>
3012
3013 * c-array-notation.c: Fix typo in comment.
3014
10fa8dfb
MP
30152017-03-29 Marek Polacek <polacek@redhat.com>
3016
3017 PR c/79730
3018 * c-decl.c (finish_decl): Check VAR_P.
3019
a9e4a1a5
JJ
30202017-03-27 Jakub Jelinek <jakub@redhat.com>
3021
3022 PR middle-end/80162
3023 * c-tree.h (c_mark_addressable): Add array_ref_p argument.
3024 * c-typeck.c (c_mark_addressable): Likewise. Look through
3025 VIEW_CONVERT_EXPR unless array_ref_p and VCE is from VECTOR_TYPE
3026 to ARRAY_TYPE.
3027 (build_array_ref): Pass true as array_ref_p to c_mark_addressable.
3028
ee3ff394
MP
30292017-03-23 Marek Polacek <polacek@redhat.com>
3030
3031 * c-tree.h: Remove a C_RID_YYCODE reference.
3032
4d1b8e70
JJ
30332017-03-21 Jakub Jelinek <jakub@redhat.com>
3034
3035 PR c/80097
3036 * c-typeck.c (build_binary_op): Add EXCESS_PRECISION_EXPR only around
3037 optional COMPOUND_EXPR with ubsan instrumentation.
3038
31dc71a8
MP
30392017-03-17 Marek Polacek <polacek@redhat.com>
3040
3041 * c-parser.c: Add C11 references.
3042
d579c385
MP
30432017-03-15 Marek Polacek <polacek@redhat.com>
3044
3045 * c-parser.c (c_parser_enum_specifier): Remove redundant line.
3046
85059a38
MP
30472017-03-11 Marek Polacek <polacek@redhat.com>
3048
3049 * c-decl.c (implicit_decl_warning): Add a comment. Fix formatting.
3050
2f6f187a
DM
30512017-03-10 David Malcolm <dmalcolm@redhat.com>
3052
3053 PR translation/79848
3054 * c-decl.c (declspecs_add_type): Simplify uses of "%<%s%>" to
3055 "%qs".
3056 * c-parser.c (c_parser_oacc_shape_clause): Likewise.
3057
36618428
MP
30582017-03-09 Marek Polacek <polacek@redhat.com>
3059
3060 PR sanitizer/79757
3061 * c-parser.c (c_parser_declaration_or_fndef): Don't sanitize old-style
3062 parameter declarations with initializers.
3063
01e5af5a
JJ
30642017-03-09 Jakub Jelinek <jakub@redhat.com>
3065
3066 PR c/79969
3067 * c-decl.c (start_enum): Adjust DECL_SOURCE_LOCATION of
3068 TYPE_STUB_DECL.
3069
a71dbc63
JJ
30702017-03-07 Jakub Jelinek <jakub@redhat.com>
3071
3072 PR c/79834
3073 * c-parser.c (c_parser_pragma): Use error_at instead of c_parser_error
3074 for "may only be used in compound statements" diagnostics, change it
3075 such that the same translatable string is used for all pragmas. For
3076 PRAGMA_OACC_WAIT use "acc wait" rather than "acc enter data" in the
3077 diagnostics.
3078 (c_parser_omp_cancellation_point, c_parser_omp_target_update,
3079 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Change
3080 "may only be used in compound statements" diagnostics, such that the
3081 same translatable string is used for all pragmas.
3082
1ff4bae6
MP
30832017-03-04 Marek Polacek <polacek@redhat.com>
3084
3085 PR c/79847
3086 * c-decl.c (implicit_decl_warning): Add missing space.
3087
7f5a7d78
MP
30882017-03-03 Marek Polacek <polacek@redhat.com>
3089
3090 PR c/79758
3091 * c-decl.c (store_parm_decls_oldstyle): Check if the element of
3092 current_function_prototype_arg_types is error_mark_node. Fix
3093 formatting. Use TREE_VALUE instead of TREE_TYPE.
3094
883c8f06
JJ
30952017-03-03 Jakub Jelinek <jakub@redhat.com>
3096
79c9b7a8
JJ
3097 PR c/79837
3098 * c-parser.c (c_parser_omp_clause_reduction): Don't mention
3099 %<min%> or %<max%> in the diagnostics, instead mention identifier.
3100 (c_parser_omp_declare_reduction): Don't mention %<min%> in the
3101 diagnostics.
3102
883c8f06
JJ
3103 PR c/79836
3104 * c-parser.c (c_parser_generic_selection): Use %<_Generic%>
3105 instead of %<_Generic>.
3106 (c_parser_omp_ordered): Use %<depend%> instead of %<depend>.
3107 (c_parser_omp_target_exit_data): Use %<release%> instead of
3108 %<release>.
3109
324ff1a0
JJ
31102017-02-28 Jakub Jelinek <jakub@redhat.com>
3111
3112 * c-parser.c (c_parser_asm_statement): Use cond ? G_("...") : G_("...")
3113 instead of just cond ? "..." : "...".
3114 (c_parser_oacc_enter_exit_data): Use %s and ternary operator only
3115 for "enter"/"exit" keyword.
3116 (c_finish_oacc_routine): Don't use %s to supply portions of the
3117 message.
3118
4227c9ad
JJ
31192017-02-24 Jakub Jelinek <jakub@redhat.com>
3120
3121 PR c++/79588
3122 * c-parser.c (c_parser_postfix_expression_after_primary): Don't
3123 handle -Wrestrict here.
3124 * c-typeck.c (build_function_call_vec): Adjust
3125 check_function_arguments caller.
3126
5d972e66
RB
31272017-02-23 Richard Biener <rguenther@suse.de>
3128
3129 PR c/79684
3130 * gimple-parser.c (c_parser_gimple_statement): Use set_error
3131 to initialize c_exprs to return.
3132 (c_parser_gimple_binary_expression): Likewise.
3133 (c_parser_gimple_unary_expression): Likewise.
3134 (c_parser_gimple_postfix_expression): Likewise.
3135
61ac5ebe
MP
31362017-02-22 Marek Polacek <polacek@redhat.com>
3137
3138 PR c/79662
3139 * c-typeck.c (convert_arguments): Handle error_mark_node.
3140
41d1b0b1
PK
31412017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3142
3143 * gimple-parser.c (c_parser_gimple_postfix_expression): Check return
3144 value of c_parser_parse_ssa_name against error_mark_node and emit
3145 error if ssa name is anonymous and written as default definition.
3146
eab1f169
PK
31472017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3148
3149 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
3150 FMA_EXPR.
3151
bcac0b4d
JJ
31522017-02-16 Jakub Jelinek <jakub@redhat.com>
3153
3154 PR c++/79512
3155 * c-parser.c (c_parser_omp_target): For -fopenmp-simd
3156 ignore #pragma omp target even when not followed by identifier.
3157
1be33173
PK
31582017-02-14 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3159
3160 * gimpler-parser.c (c_parser_gimple_statement): Handle ABS_EXPR.
3161 (c_parser_gimple_unary_expression): Likewise.
3162
aa326bfb
JJ
31632017-02-13 Jakub Jelinek <jakub@redhat.com>
3164
3165 * c-parser.c (c_parser_oacc_declare): Add missing space in
3166 diagnostics.
3167
8a398bc5
PK
31682017-02-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3169
3170 PR c/79478
3171 * gimple-parser.c (c_parser_gimple_postfix_expression): Call
3172 set_c_expr_source_range when parsing ssa-name.
3173
3dcde5ef 31742017-02-10 Prasad Ghangal <prasad.ghangal@gmail.com>
ab20d992 3175 Richard Biener <rguenther@suse.de>
3dcde5ef
PG
3176
3177 * gimple-parser.c (c_parser_gimple_binary_expression): Avoid
3178 building IL when arguments are error_mark_node.
3179 (c_parser_gimple_unary_expression): Likewise.
3180 (c_parser_gimple_if_stmt): Likewise.
3181 (c_parser_gimple_switch_stmt): Likewise.
3182 (c_parser_gimple_return_stmt): Likewise.
3183 (c_parser_parse_ssa_name): When name lookup fails do not build
3184 an SSA name. Use undeclared rather than not declared in error
3185 reporting.
3186
192b048b
MP
31872017-02-09 Marek Polacek <polacek@redhat.com>
3188
3189 PR c/79428
3190 * c-parser.c (c_parser_omp_ordered): Call c_parser_skip_to_pragma_eol
3191 instead of c_parser_skip_until_found.
3192
56f71478
JJ
31932017-02-09 Jakub Jelinek <jakub@redhat.com>
3194
3195 PR c/79431
3196 * c-parser.c (c_parser_omp_declare_target): Don't invoke
3197 symtab_node::get on automatic variables.
3198
02889d23
CLT
31992016-02-09 Nathan Sidwell <nathan@codesourcery.com>
3200 Chung-Lin Tang <cltang@codesourcery.com>
3201
3202 * c-parser.c (c_parser_omp_clause_collapse): Disallow tile.
3203 (c_parser_oacc_clause_tile): Disallow collapse. Fix parsing and
3204 semantic checking.
3205 * c-parser.c (c_parser_omp_for_loop): Accept tiling constructs.
3206
7af4b20d
RB
32072017-02-07 Richard Biener <rguenther@suse.de>
3208
3209 * gimple-parser.c (c_parser_gimple_expr_list): Simplify.
3210 (c_parser_gimple_postfix_expression_after_primary):
3211 Do not use c_build_function_call_vec to avoid folding and promotion.
3212 Simplify.
3213
e5e391d6
MO
32142017-01-25 Maxim Ostapenko <m.ostapenko@samsung.com>
3215
3216 PR lto/79061
3217 * c-decl.c (pop_scope): Pass main_input_filename to
3218 build_translation_unit_decl.
3219
c2e84327
DM
32202017-01-24 David Malcolm <dmalcolm@redhat.com>
3221
3222 * c-parser.c: Include "read-rtl-function.h" and
3223 "run-rtl-passes.h".
3224 (c_parser_declaration_or_fndef): Rename "gimple-pass-list" in
3225 grammar to gimple-or-rtl-pass-list. Add rtl-function-definition
3226 production. Update for renaming of field "gimple_pass" to
3227 "gimple_or_rtl_pass". If __RTL was seen, call
3228 c_parser_parse_rtl_body. Convert a timevar_push/pop pair
3229 to an auto_timevar, to cope with early exit.
3230 (c_parser_declspecs): Update RID_GIMPLE handling for renaming of
3231 field "gimple_pass" to "gimple_or_rtl_pass", and for renaming of
3232 c_parser_gimple_pass_list to c_parser_gimple_or_rtl_pass_list.
3233 Handle RID_RTL.
3234 (c_parser_parse_rtl_body): New function.
3235 * c-tree.h (enum c_declspec_word): Add cdw_rtl.
3236 (struct c_declspecs): Rename field "gimple_pass" to
3237 "gimple_or_rtl_pass". Add field "rtl_p".
3238 * gimple-parser.c (c_parser_gimple_pass_list): Rename to...
3239 (c_parser_gimple_or_rtl_pass_list): ...this, updating accordingly.
3240 * gimple-parser.h (c_parser_gimple_pass_list): Rename to...
3241 (c_parser_gimple_or_rtl_pass_list): ...this.
3242
2ebd93e1
MP
32432017-01-20 Marek Polacek <polacek@redhat.com>
3244
3245 PR c/64279
3246 * c-typeck.c (build_conditional_expr): Warn about duplicated branches.
3247
b1c95bb5
RB
32482017-01-13 Richard Biener <rguenther@suse.de>
3249
3250 * gimple-parser.c (c_parser_gimple_compound_statement): Handle
3251 nops.
3252
25329913
RB
32532017-01-13 Richard Biener <rguenther@suse.de>
3254
3255 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
3256 _Literal ( type-name ) number.
3257
6bb4ea5c
RB
32582017-01-12 Richard Biener <rguenther@suse.de>
3259
3260 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
3261 __MEM.
3262
6b5b4e9c
JJ
32632017-01-11 Jakub Jelinek <jakub@redhat.com>
3264
3265 PR c++/72813
3266 * c-decl.c (pop_file_scope): Set flag_syntax_only to 1 after writing
3267 PCH file.
3268
e3252775
RB
32692017-01-11 Richard Biener <rguenther@suse.de>
3270
3271 PR bootstrap/79052
3272 * gimple-parser.c (c_parser_gimple_switch_stmt): Add missing
3273 returns on parse errors.
3274
a9342885
MP
32752017-01-04 Marek Polacek <polacek@redhat.com>
3276
3277 PR c++/64767
3278 * c-parser.c (c_parser_postfix_expression): Mark zero character
3279 constants by setting original_type in c_expr.
3280 * c-typeck.c (parser_build_binary_op): Warn when a pointer is compared
3281 with a zero character constant.
3282 (char_type_p): New function.
3283
5dd9a9d0
DM
32842017-01-04 David Malcolm <dmalcolm@redhat.com>
3285
3286 * c-parser.c (c_parser_declaration_or_fndef): Create a
3287 rich_location at init_loc and parse it to start_init.
3288 (last_init_list_comma): New global.
3289 (c_parser_braced_init): Update last_init_list_comma when parsing
3290 commas. Pass it to pop_init_level. Pass location of closing
3291 brace to pop_init_level.
3292 (c_parser_postfix_expression_after_paren_type): Create a
3293 rich_location at type_loc and parse it to start_init.
3294 (c_parser_omp_declare_reduction): Likewise for loc.
3295 * c-tree.h (start_init): Add rich_location * param.
3296 (pop_init_level): Add location_t param.
3297 * c-typeck.c (struct initializer_stack): Add field
3298 "missing_brace_richloc".
3299 (start_init): Add richloc param, use it to initialize
3300 the stack node's missing_brace_richloc.
3301 (last_init_list_comma): New decl.
3302 (finish_implicit_inits): Pass last_init_list_comma to
3303 pop_init_level.
3304 (push_init_level): When finding missing open braces, add fix-it
3305 hints to the richloc.
3306 (pop_init_level): Add "insert_before" param and pass it
3307 when calling pop_init_level. Add fixits about missing
3308 close braces to any richloc. Use the richloc for the
3309 -Wmissing-braces warning.
3310 (set_designator): Pass last_init_list_comma to pop_init_level.
3311 (process_init_element): Likewise.
3312
cbe34bb5
JJ
33132017-01-01 Jakub Jelinek <jakub@redhat.com>
3314
3315 Update copyright years.
3316
d17680f3
JJ
33172016-12-21 Jakub Jelinek <jakub@redhat.com>
3318
0dba7960
JJ
3319 PR bootstrap/78817
3320 * c-typeck.c (build_function_call_vec): If check_function_arguments
3321 returns true, set TREE_NO_WARNING on CALL_EXPR.
3322
d17680f3
JJ
3323 PR c/77767
3324 * c-decl.c (grokdeclarator): If *expr is non-NULL, append expression
3325 to *expr instead of overwriting it.
3326
aa90531e
RB
33272016-12-20 Richard Biener <rguenther@suse.de>
3328
3329 * gimple-parser.c (c_parser_gimple_compound_statement): Improve
3330 error recovery.
3331 (c_parser_gimple_statement): Only build assigns for non-error
3332 stmts.
3333 (c_parser_gimple_postfix_expression_after): Improve error recovery.
3334
629b3d75
MJ
33352016-12-14 Martin Jambor <mjambor@suse.cz>
3336
3337 * c-parser.c: Include omp-general.h and omp-offload.h instead of
3338 omp-low.h.
3339 (c_finish_oacc_routine): Adjusted call to
3340 get_oacc_fn_attrib, build_oacc_routine_dims and replace_oacc_fn_attrib
3341 to use their new names.
3342 (c_parser_oacc_enter_exit_data): Adjusted call to find_omp_clause to
3343 use its new name.
3344 (c_parser_oacc_update): Likewise.
3345 (c_parser_omp_simd): Likewise.
3346 (c_parser_omp_target_update): Likewise.
3347 * c-typeck.c: Include omp-general.h instead of omp-low.h.
3348 (c_finish_omp_cancel): Adjusted call to find_omp_clause to use its new
3349 name.
3350 (c_finish_omp_cancellation_point): Likewise.
3351 * gimple-parser.c: Do not include omp-low.h
3352
c5af52eb
CP
33532016-12-02 Cesar Philippidis <cesar@codesourcery.com>
3354 James Norris <jnorris@codesourcery.com>
3355
3356 * c-parser.c (c_parser_pragma): Error when PRAGMA_OACC_{ENTER_DATA,
3357 EXIT_DATA,WAIT} are not used in compound statements.
3358 (c_parser_oacc_enter_exit_data): Update diagnostics.
3359
48330c93
BE
33602016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
3361
3362 PR c++/71973
3363 * c-decl.c (diagnose_mismatched_decls): Use
3364 OPT_Wbuiltin_declaration_mismatch here too.
3365
899ca90e 33662016-11-18 Richard Sandiford <richard.sandiford@arm.com>
48330c93
BE
3367 Alan Hayward <alan.hayward@arm.com>
3368 David Sherwood <david.sherwood@arm.com>
899ca90e
RS
3369
3370 * c-decl.c (merge_decls): Use SET_DECL_MODE.
3371 (make_label, finish_struct): Likewise.
3372
1ee62b92 33732016-11-14 Prasad Ghangal <prasad.ghangal@gmail.com>
8e745a17 3374 Richard Biener <rguenther@suse.de>
22b15758 3375
8e745a17
JJ
3376 * Make-lang.in (C_AND_OBJC_OBJS): Add gimple-parser.o.
3377 * config-lang.in (gtfiles): Add c/c-parser.h.
3378 * c-tree.h (enum c_declspec_word): Add cdw_gimple.
3379 (struct c_declspecs): Add gimple_pass member and gimple_p flag.
3380 * c-parser.c (enum c_id_kind, struct c_token,
3381 c_parser_next_token_is, c_parser_next_token_is_not,
3382 c_parser_next_token_is_keyword,
3383 enum c_lookahead_kind, enum c_dtr_syn, enum c_parser_prec):
3384 Split out to ...
3385 * c-parser.h: ... new header.
3386 * c-parser.c: Include c-parser.h and gimple-parser.h.
1ee62b92 3387 (c_parser_peek_token, c_parser_peek_2nd_token,
8e745a17
JJ
3388 c_token_starts_typename, c_parser_next_token_starts_declspecs,
3389 c_parser_next_tokens_start_declaration, c_parser_consume_token,
3390 c_parser_error, c_parser_require, c_parser_skip_until_found,
3391 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
3392 c_parser_type_name): Export.
3393 (c_parser_tokens_buf): New function.
3394 (c_parser_error): Likewise.
3395 (c_parser_set_error): Likewise.
3396 (c_parser_declspecs): Handle RID_GIMPLE.
1ee62b92
PG
3397 (c_parser_declaration_or_fndef): Parse __GIMPLE marked body
3398 via c_parser_parse_gimple_body.
8e745a17
JJ
3399 * c-parser.h (c_parser_peek_token, c_parser_peek_2nd_token,
3400 c_token_starts_typename, c_parser_next_token_starts_declspecs,
3401 c_parser_next_tokens_start_declaration, c_parser_consume_token,
3402 c_parser_error, c_parser_require, c_parser_skip_until_found,
3403 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
3404 c_parser_type_name): Declare.
1ee62b92
PG
3405 (struct c_parser): Declare forward.
3406 (c_parser_tokens_buf): Declare.
8e745a17
JJ
3407 (c_parser_error): Likewise.
3408 (c_parser_set_error): Likewise.
3409 * gimple-parser.c: New file.
3410 * gimple-parser.h: Likewise.
1ee62b92 3411
22b15758
UB
34122016-11-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3413
3414 PR c/35503
3415 * c-parser.c (c_parser_postfix_expression_after_primary): Call
3416 warn_for_restrict.
3417
84ff4775
LCW
34182016-09-11 Le-Chun Wu <lcwu@google.com>
3419 Mark Wielaard <mjw@redhat.com>
3420
3421 * c-decl.c (warn_if_shadowing): Use the warning code corresponding
3422 to the given -Wshadow= variant.
3423
4d0cdd0c
TP
34242016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
3425
3426 * c-typeck.c: Include memmodel.h.
3427
1202f33e
JJ
34282016-10-13 Jakub Jelinek <jakub@redhat.com>
3429
3430 PR target/77957
3431 * c-objc-common.h (LANG_HOOKS_GETDECLS): Use hook_tree_void_null
3432 instead of lhd_return_null_tree_v.
3433
8a14afd0
BS
34342016-10-07 Bernd Schmidt <bschmidt@redhat.com>
3435
3436 PR c++/69733
3437 * c-decl.c (smallest_type_quals_location): New static function.
3438 (grokdeclarator): Try to find the correct location for an ignored
3439 qualifier.
3440
81fea426
MP
34412016-09-26 Marek Polacek <polacek@redhat.com>
3442
3443 PR c/7652
3444 * c-decl.c (pop_scope): Add gcc_fallthrough.
3445
34462016-09-26 Marek Polacek <polacek@redhat.com>
3447
3448 PR c/7652
3449 * c-parser.c (struct c_token): Add flags field.
3450 (c_lex_one_token): Pass it to c_lex_with_flags.
3451 (c_parser_declaration_or_fndef): Turn __attribute__((fallthrough));
3452 into IFN_FALLTHROUGH.
3453 (c_parser_label): Set FALLTHROUGH_LABEL_P on labels. Handle
3454 attribute fallthrough after a case label or default label.
3455 (c_parser_statement_after_labels): Handle RID_ATTRIBUTE.
3456
9a2300e9
MP
34572016-09-24 Marek Polacek <polacek@redhat.com>
3458
3459 PR c/77490
3460 * c-typeck.c (build_unary_op): Warn about bit not on expressions that
3461 have boolean value. Warn about ++/-- on booleans.
3462
7de76362
JJ
34632016-09-23 Jakub Jelinek <jakub@redhat.com>
3464
3465 * c-parser.c (incomplete_record_decls): Remove unnecessary
3466 = vNULL initialization of file scope vec.
3467
5b73d2ab
MP
34682016-09-16 Marek Polacek <polacek@redhat.com>
3469
3470 * c-typeck.c (lvalue_p): Use true and false instead of 1 and 0.
3471
e51fbec3
MP
34722016-09-14 Marek Polacek <polacek@redhat.com>
3473
3474 * c-array-notation.c (create_cmp_incr): Use false instead of 0.
3475 (fix_array_notation_expr): Likewise.
3476 * c-decl.c (finish_decl): Likewise.
3477 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
3478 * c-typeck.c (array_to_pointer_conversion): Use true instead of 1.
3479 (function_to_pointer_conversion): Use false instead of 0.
3480 (convert_lvalue_to_rvalue): Likewise.
3481 (parser_build_unary_op): Likewise.
3482 (build_atomic_assign): Likewise.
3483 (build_unary_op): Change nonconvert parameter type to bool, use
3484 true/false instead of 1/0.
3485 (build_binary_op): Use true instead of 1.
3486
254830ba
DM
34872016-09-13 David Malcolm <dmalcolm@redhat.com>
3488
3489 * c-parser.c (c_parser_declaration_or_fndef): Update for renaming
3490 of add_fixit_insert to add_fixit_insert_before.
3491
4c13ba17
MP
34922016-09-13 Marek Polacek <polacek@redhat.com>
3493
3494 * c-typeck.c (build_unary_op): Rename FLAG parameter to NOCONVERT. Use
3495 it.
3496
54dcdb88
BE
34972016-09-12 Bernd Edlinger <bernd.edlinger@hotmail.de>
3498
3499 PR c++/77496
3500 * c-parser.c (c_parser_conditional_expression): Pass the rightmost
3501 COMPOUND_EXPR to warn_for_omitted_condop.
3502
e5106e27
DM
35032016-09-07 David Malcolm <dmalcolm@redhat.com>
3504
3505 * c-lang.c (LANG_HOOKS_GET_SUBSTRING_LOCATION): Use
3506 c_get_substring_location for this new langhook.
3507
9dc5773f
JJ
35082016-09-02 Jakub Jelinek <jakub@redhat.com>
3509
3510 PR c/65467
3511 * c-parser.c (c_parser_declspecs): Don't sorry about _Atomic if
3512 flag_openmp.
3513 (c_parser_omp_variable_list): Use convert_lvalue_to_rvalue
3514 instead of mark_exp_read on low_bound/length expression.
3515 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_threads,
3516 c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
3517 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
3518 c_parser_omp_clause_num_workers, c_parser_oacc_shape_clause,
3519 c_parser_oacc_clause_tile, c_parser_omp_clause_schedule,
3520 c_parser_omp_clause_vector_length, c_parser_omp_clause_num_teams,
3521 c_parser_omp_clause_thread_limit, c_parser_omp_clause_aligned,
3522 c_parser_omp_clause_linear, c_parser_omp_clause_safelen,
3523 c_parser_omp_clause_simdlen, c_parser_omp_clause_device,
3524 c_parser_omp_clause_dist_schedule): Use convert_lvalue_to_rvalue
3525 instead of mark_expr_read.
3526 (c_parser_omp_declare_reduction): Reject _Atomic qualified types.
3527 * c-objc-common.h (LANG_HOOKS_OMP_CLAUSE_COPY_CTOR,
3528 LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP): Redefine.
3529 * c-tree.h (c_omp_clause_copy_ctor): New prototype.
3530 * c-typeck.c (handle_omp_array_sections_1): Diagnose _Atomic qualified
3531 array section bases outside of depend clause, for depend clause
3532 use convert_lvalue_to_rvalue on the base.
3533 (c_finish_omp_clauses): Reject _Atomic qualified vars in reduction,
3534 linear, aligned, map, to and from clauses.
3535 (c_omp_clause_copy_ctor): New function.
3536
295844f6
MP
35372016-09-01 Marek Polacek <polacek@redhat.com>
3538
3539 PR c/7652
3540 * c-typeck.c (composite_type): Add FALLTHRU comment.
3541
089af25c
DM
35422016-08-31 David Malcolm <dmalcolm@redhat.com>
3543
3544 * c-parser.c (c_parser_declaration_or_fndef): Add trailing space
3545 to the insertion fixits for "struct", "union", and "enum".
3546
f9087798
DM
35472016-08-30 David Malcolm <dmalcolm@redhat.com>
3548
3549 * c-decl.c (implicit_decl_warning): Use add_fixit_replace
3550 rather than add_fixit_misspelled_id.
3551 (undeclared_variable): Likewise.
3552 * c-parser.c (c_parser_declaration_or_fndef): Likewise. Remove
3553 now-redundant "here" params from add_fixit_insert method calls.
3554 (c_parser_parameter_declaration): Likewise.
3555 * c-typeck.c (build_component_ref): Remove now-redundant range
3556 param from add_fixit_replace method calls.
3557
ebef225f
MP
35582016-08-25 Marek Polacek <polacek@redhat.com>
3559
3560 * c-typeck.c (parser_build_binary_op): Pass LHS to
3561 warn_logical_not_parentheses.
3562
fe377a48
MP
35632016-08-25 Marek Polacek <polacek@redhat.com>
3564
3565 PR c/77323
3566 * c-decl.c (declspecs_add_type): Set typespec_word even when __intN
3567 or _FloatN or _FloatNx is not supported.
3568 (finish_declspecs): Set type to integer_type_node when _FloatN or
3569 _FloatNx is not supported.
3570
c65699ef
JM
35712016-08-19 Joseph Myers <joseph@codesourcery.com>
3572
3573 PR c/32187
3574 * c-tree.h (cts_floatn_nx): New enum c_typespec_keyword value.
3575 (struct c_declspecs): Add field floatn_nx_idx.
3576 * c-decl.c (declspecs_add_type, finish_declspecs): Handle _FloatN
3577 and _FloatNx type specifiers.
3578 * c-parser.c (c_keyword_starts_typename, c_token_starts_declspecs)
3579 (c_parser_declspecs, c_parser_attribute_any_word)
3580 (c_parser_objc_selector): Use CASE_RID_FLOATN_NX.
3581 * c-typeck.c (c_common_type): Handle _FloatN and _FloatNx types.
3582 (convert_arguments): Avoid promoting _FloatN and _FloatNx types
3583 narrower than double.
3584
2f1364c2
JJ
35852016-08-12 Jakub Jelinek <jakub@redhat.com>
3586 Martin Liska <mliska@suse.cz>
3587
3588 PR c/67410
3589 * c-typeck.c (set_nonincremental_init_from_string): Use / instead of
3590 % to determine val element to change. Assert that
3591 wchar_bytes * charwidth fits into val array.
3592
191816a3
MP
35932016-08-12 Marek Polacek <polacek@redhat.com>
3594
3595 PR c/7652
3596 * c-parser.c (c_parser_external_declaration): Add FALLTHRU.
3597 (c_parser_postfix_expression): Likewise.
3598 * c-typeck.c (build_unary_op): Adjust fall through comment.
3599 (c_mark_addressable): Likewise.
3600
b95a64bb
JJ
36012016-08-11 Jakub Jelinek <jakub@redhat.com>
3602
3603 PR c/72816
3604 * c-decl.c (grokdeclarator): When adding TYPE_DOMAIN for flexible
3605 array member through typedef, for orig_qual_indirect == 0 clear
3606 orig_qual_type.
3607
895aa8e1
DM
36082016-08-08 David Malcolm <dmalcolm@redhat.com>
3609
3610 PR c/64955
3611 * c-lang.c (LANG_HOOKS_RUN_LANG_SELFTESTS): If CHECKING_P, wire
3612 this up to selftest::run_c_tests.
3613 (selftest::run_c_tests): New function.
3614
0b212d8c
TS
36152016-08-04 Thomas Schwinge <thomas@codesourcery.com>
3616
ae9281fc
TS
3617 * c-parser.c (struct oacc_routine_data): Add error_seen and
3618 fndecl_seen members.
3619 (c_finish_oacc_routine): Use these.
3620 (c_parser_declaration_or_fndef): Adjust.
3621 (c_parser_oacc_routine): Likewise. Support more C language
3622 constructs, and improve diagnostics. Move pragma context
3623 checking...
3624 (c_parser_pragma): ... here.
3625
0b212d8c
TS
3626 * c-parser.c (struct oacc_routine_data): New.
3627 (c_parser_declaration_or_fndef, c_parser_oacc_routine): Use it.
3628 Simplify code.
3629 (c_finish_oacc_routine): Likewise. Don't attach clauses to "omp
3630 declare target" attribute.
3631
76e2c821
JB
36322016-08-01 Jan Beulich <jbeulich@suse.com>
3633
3634 * c-fold.c (c_fully_fold_internal): Also emit shift count
3635 warnings for vector types.
3636 * c-typeck.c (build_binary_op): Likewise.
3637
f618a472
MP
36382016-07-29 Marek Polacek <polacek@redhat.com>
3639
3640 PR c/71742
3641 * c-decl.c (finish_struct): Rephrase an error message.
3642
efd0786f
MP
3643 PR c/71853
3644 * c-parser.c (c_parser_switch_statement): Initialize ce.original_type
3645 to error node for invalid code.
3646
e00dceaf
MP
3647 PR c/71573
3648 * c-decl.c (implicitly_declare): Return decl early not only for
3649 error_mark_nodes, but for anything that is not a FUNCTION_DECL.
3650
673a107a
JJ
36512016-07-29 Jakub Jelinek <jakub@redhat.com>
3652
3653 PR c/71969
3654 * c-decl.c (finish_function): Only set DECL_DISREGARD_INLINE_LIMITS
3655 on GNU extern inline functions.
3656
a5b5c8b6
MP
36572016-07-29 Marek Polacek <polacek@redhat.com>
3658
3659 PR c/71583
3660 * c-parser.c (c_parser_postfix_expression_after_paren_type): Also
3661 check expr.value.
3662
e3fe09c1
UB
36632016-07-22 Uros Bizjak <ubizjak@gmail.com>
3664
3665 * c-typeck.c: Use HOST_WIDE_INT_1 instead of (HOST_WIDE_INT) 1,
3666
7c8f7eaa
DM
36672016-07-20 David Malcolm <dmalcolm@redhat.com>
3668
3669 * c-decl.c (struct edit_distance_traits<cpp_hashnode *>): Move to
3670 spellcheck-tree.h
3671 (best_macro_match): Likewise, converting from a typedef to a
3672 subclass.
3673 (find_closest_macro_cpp_cb): Move to spellcheck-tree.c.
3674 (lookup_name_fuzzy): Update for change of best_macro_match to a
3675 subclass with a ctor that calls cpp_forall_identifiers.
3676
de6a69ee
DM
36772016-07-20 David Malcolm <dmalcolm@redhat.com>
3678
3679 * c-decl.c (implicit_decl_warning): Update for conversion of
3680 return type of lookup_name_fuzzy to const char *.
3681 (undeclared_variable): Likewise.
3682 (lookup_name_fuzzy): Convert return type from tree to
3683 const char *.
3684 * c-parser.c (c_parser_declaration_or_fndef): Update for
3685 conversion of return type of lookup_name_fuzzy to const char *.
3686 (c_parser_parameter_declaration): Likewise.
3687
b1c9c068
CP
36882016-07-15 Cesar Philippidis <cesar@codesourcery.com>
3689
3690 * c-parser.c (c_parser_oacc_declare): Don't scan for
3691 GOMP_MAP_POINTER.
3692 * c-typeck.c (handle_omp_array_sections): Mark data clauses with
3693 GOMP_MAP_FORCE_{PRESENT,TO,FROM,TOFROM} as potentially having
3694 zero-length subarrays.
3695
ddbbcb19
JJ
36962016-07-15 Jakub Jelinek <jakub@redhat.com>
3697
3698 PR c/71858
3699 * c-decl.c (implicit_decl_warning): Use FUZZY_LOOKUP_FUNCTION_NAME
3700 instead of FUZZY_LOOKUP_NAME.
3701 (lookup_name_fuzzy): For FUZZY_LOOKUP_FUNCTION_NAME consider
3702 FUNCTION_DECLs, {VAR,PARM}_DECLs function pointers and macros.
3703
dd36b877
JJ
37042016-07-14 Jakub Jelinek <jakub@redhat.com>
3705
3706 PR c/71858
3707 * c-decl.c (lookup_name_fuzzy): Ignore binding->invisible.
3708
8c681247
TS
37092016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
3710
3711 * c-parser.c (c_parser_generic_selection): Make type of variable
3712 auto_vec.
3713 (c_parser_omp_declare_simd): Likewise.
3714
bf4fa671
TS
37152016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
3716
3717 * c-decl.c (struct c_struct_parse_info): Change member types
3718 from vec to auto_vec.
3719 (start_struct): Adjust.
3720 (finish_struct): Likewise.
3721
557e8c49
JJ
37222016-07-02 Jakub Jelinek <jakub@redhat.com>
3723
3724 PR c/71719
3725 * c-typeck.c (mark_exp_read): Handle VIEW_CONVERT_EXPR.
3726
54d19c3b
TS
37272016-06-29 Thomas Schwinge <thomas@codesourcery.com>
3728
3729 * c-parser.c (c_parser_pragma) <PRAGMA_OMP_CANCELLATION_POINT>:
3730 Move pragma context checking into...
3731 (c_parser_omp_cancellation_point): ... here, and improve
3732 diagnostic messages.
3733 * c-typeck.c (c_finish_omp_cancel)
3734 (c_finish_omp_cancellation_point): Improve diagnostic messages.
3735
152ef731
JJ
37362016-06-29 Jakub Jelinek <jakub@redhat.com>
3737
3738 PR c/71685
3739 * c-typeck.c (c_build_qualified_type): Don't clear
3740 C_TYPE_INCOMPLETE_VARS for the main variant.
3741
37422016-06-28 Martin Sebor <msebor@redhat.com>
4378d117
MS
3743
3744 PR c/71552
3745 * c-typeck.c (output_init_element): Diagnose incompatible types
3746 before non-constant initializers.
3747
e9ac1f86
JJ
37482016-06-28 Jakub Jelinek <jakub@redhat.com>
3749
3750 * Make-lang.in: Don't cat ../stage_current if it does not exist.
3751
277d7ee0
AK
37522016-06-23 Andi Kleen <ak@linux.intel.com>
3753
3754 * Make-lang.in: Add support for autofdo.
3755
1a4f11c8
DM
37562016-06-22 David Malcolm <dmalcolm@redhat.com>
3757
3758 PR c/70339
3759 * c-decl.c: Include spellcheck-tree.h and gcc-rich-location.h.
3760 (implicit_decl_warning): When issuing warnings for implicit
3761 declarations, attempt to provide a suggestion via
3762 lookup_name_fuzzy.
3763 (undeclared_variable): Likewise when issuing errors.
3764 (lookup_name_in_scope): Likewise.
3765 (struct edit_distance_traits<cpp_hashnode *>): New struct.
3766 (best_macro_match): New typedef.
3767 (find_closest_macro_cpp_cb): New function.
3768 (lookup_name_fuzzy): New function.
3769 * c-parser.c: Include gcc-rich-location.h.
3770 (c_token_starts_typename): Split out case CPP_KEYWORD into...
3771 (c_keyword_starts_typename): ...this new function.
3772 (c_parser_declaration_or_fndef): When issuing errors about
3773 missing "struct" etc, add a fixit. For other kinds of errors,
3774 attempt to provide a suggestion via lookup_name_fuzzy.
3775 (c_parser_parms_declarator): When looking ahead to detect typos in
3776 type names, also reject CPP_KEYWORD.
3777 (c_parser_parameter_declaration): When issuing errors about
3778 unknown type names, attempt to provide a suggestion via
3779 lookup_name_fuzzy.
3780 * c-tree.h (c_keyword_starts_typename): New prototype.
3781
5a578671
JM
37822016-06-20 Joseph Myers <joseph@codesourcery.com>
3783
3784 PR c/71601
3785 * c-typeck.c (build_conditional_expr): Return error_mark_node if
3786 c_common_type returns error_mark_node.
3787
3f8257db 37882016-06-19 Martin Sebor <msebor@redhat.com>
aa0db437
MS
3789
3790 PR c/69507
3791 * c-parser.c (c_parser_alignof_expression): Avoid diagnosing
3792 __alignof__ (expression).
3793
6a3f203c
DM
37942016-06-14 David Malcolm <dmalcolm@redhat.com>
3795
3796 * c-typeck.c: Include spellcheck-tree.h rather than spellcheck.h.
3797
264757fb
DM
37982016-06-14 David Malcolm <dmalcolm@redhat.com>
3799
3800 * c-typeck.c (build_component_ref): Simplify fixit code by
3801 using gcc_rich_location::add_fixit_misspelled_id.
3802 (set_init_label): Likewise.
3803
f7e4f2e3
DM
38042016-06-13 David Malcolm <dmalcolm@redhat.com>
3805
3806 * c-parser.c (c_parser_initelt): Provide location of name for new
3807 location_t param of set_init_label.
3808 * c-tree.h (set_init_label): Add location_t param.
3809 * c-typeck.c (set_init_index): Add "fieldname_loc" location_t
3810 param and use it when issuing error messages about unrecognized
3811 field names. Attempt to provide a fixit hint if appropriate,
3812 otherwise update the error message to provide the type name.
3813
4b1ffdb1
TS
38142016-06-10 Thomas Schwinge <thomas@codesourcery.com>
3815
3816 PR c/71381
3817 * c-parser.c (c_parser_omp_variable_list) <OMP_CLAUSE__CACHE_>:
3818 Loosen checking.
3819
44a845ca
MS
38202016-06-08 Martin Sebor <msebor@redhat.com>
3821 Jakub Jelinek <jakub@redhat.com>
3822
3823 PR c++/70507
3824 PR c/68120
3825 * c-typeck.c (convert_arguments): Don't promote last argument
3826 of BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
3827
92a5f2ba
MP
38282016-06-08 Marek Polacek <polacek@redhat.com>
3829
3830 PR c/71418
3831 * c-decl.c (grokdeclarator): Check TYPE_P.
3832
08203f73
MP
3833 PR c/71426
3834 * c-decl.c (get_parm_info): Don't crash on an assert on invalid
3835 code.
3836
6ffd47b7
DM
38372016-06-07 David Malcolm <dmalcolm@redhat.com>
3838
3839 * c-parser.c (c_parser_postfix_expression): In __builtin_offsetof
3840 and structure element reference, capture the location of the
3841 element name token and pass it to build_component_ref.
3842 (c_parser_postfix_expression_after_primary): Likewise for
3843 structure element dereference.
3844 (c_parser_omp_variable_list): Likewise for
3845 OMP_CLAUSE_{_CACHE, MAP, FROM, TO},
3846 * c-tree.h (build_component_ref): Add location_t param.
3847 * c-typeck.c (build_component_ref): Add location_t param
3848 COMPONENT_LOC. Use it, if available, when issuing hints about
3849 mispelled member names to provide a fixit replacement hint.
3850
1f40cff3
MP
38512016-06-06 Marek Polacek <polacek@redhat.com>
3852
3853 PR c/71362
3854 * c-parser.c (c_parser_direct_declarator): Set location.
3855
5545a907
MP
38562016-06-06 Marek Polacek <polacek@redhat.com>
3857
3858 * c-typeck.c (comptypes_internal): Handle comparisons of
3859 INTEGER_TYPE, FIXED_POINT_TYPE, and REAL_TYPE nodes. Don't check
3860 TYPE_REF_CAN_ALIAS_ALL.
3861
b605f663
CLT
38622016-06-03 Chung-Lin Tang <cltang@codesourcery.com>
3863
3864 * c-typeck.c (c_finish_omp_clauses): Mark OpenACC reduction
3865 arguments as addressable when async clause exists.
3866
00631022
JJ
38672016-05-30 Jakub Jelinek <jakub@redhat.com>
3868
3869 PR c++/71349
3870 * c-parser.c (c_parser_omp_for): Don't disallow nowait clause
3871 when combined with target construct.
3872
7211a097
JJ
38732016-05-26 Jakub Jelinek <jakub@redhat.com>
3874
3875 * c-parser.c (c_parser_omp_clause_schedule): Warn if
3876 OMP_CLAUSE_SCHEDULE_CHUNK_EXPR is known not to be positive.
3877
95efe6b6
MP
38782016-05-25 Marek Polacek <polacek@redhat.com>
3879
3880 PR c/71265
3881 * c-decl.c (c_make_fname_decl): Don't check seen_error.
3882
a23faf7a
MP
3883 PR c/71266
3884 * c-decl.c (store_parm_decls_oldstyle): Skip non-PARM_DECLs.
3885
e46c7770
CP
38862016-05-24 Cesar Philippidis <cesar@codesourcery.com>
3887
3888 * c-parser.c (c_parser_oacc_declare): Add support for
3889 GOMP_MAP_FIRSTPRIVATE_POINTER.
3890 * c-typeck.c (handle_omp_array_sections_1): Replace bool is_omp
3891 argument with enum c_omp_region_type ort.
3892 (handle_omp_array_sections): Likewise. Update call to
3893 handle_omp_array_sections_1.
3894 (c_finish_omp_clauses): Add specific errors and warning messages for
3895 OpenACC. Use firsrtprivate pointers for OpenACC subarrays. Update
3896 call to handle_omp_array_sections.
3897
a04e69c0
TS
38982016-05-24 Thomas Schwinge <thomas@codesourcery.com>
3899
3900 * c-parser.c (c_parser_oacc_routine): Tighten syntax checks.
3901
f17a223d
RB
39022016-05-24 Richard Biener <rguenther@suse.de>
3903
3904 PR middle-end/70434
3905 PR c/69504
3906 * c-typeck.c (build_array_ref): Do not complain about indexing
3907 non-lvalue vectors. Adjust for function name change.
3908
79063edd
MS
39092016-05-20 Martin Sebor <msebor@redhat.com>
3910
3911 PR c/71115
3912 * c-typeck.c (error_init): Use
3913 expansion_point_location_if_in_system_header.
3914 (warning_init): Same.
3915
8a40fef3
DM
39162016-05-19 David Malcolm <dmalcolm@redhat.com>
3917
3918 PR c/71171
3919 * c-parser.c (c_parser_generic_selection): Use c_expr::set_error
3920 in error-handling.
3921 (c_parser_postfix_expression): Likewise.
3922 * c-tree.h (c_expr::set_error): New method.
3923 * c-typeck.c (parser_build_binary_op): In error-handling, ensure
3924 that result's range is initialized.
3925
e9892350
JG
39262016-05-17 James Greenhalgh <james.greenhalgh@arm.com>
3927
3928 * c-typeck.c (parser_build_unary_op): Fix formatting.
3929
8fad45f5
MW
39302016-05-16 Matthew Wahab <matthew.wahab@arm.com>
3931
3932 * c-decl.c (grokdeclarator): Remove errmsg and use of
3933 targetm.invalid_return_type.
3934 (grokparms): Remove errmsg and use of
3935 targetm.invalid_parameter_type.
3936
aa4b467b
JM
39372016-05-13 Joseph Myers <joseph@codesourcery.com>
3938
3939 * c-decl.c (grokdeclarator): For C11, discard qualifiers on
3940 function return type.
3941
4f2e1536
MP
39422016-05-12 Marek Polacek <polacek@redhat.com>
3943
3944 PR c/70756
3945 * c-decl.c (build_compound_literal): Pass LOC down to
3946 c_incomplete_type_error.
3947 * c-tree.h (require_complete_type): Adjust declaration.
3948 (c_incomplete_type_error): Likewise.
3949 * c-typeck.c (require_complete_type): Add location parameter, pass it
3950 down to c_incomplete_type_error.
3951 (c_incomplete_type_error): Add location parameter, pass it down to
3952 error_at.
3953 (build_component_ref): Pass location down to c_incomplete_type_error.
3954 (default_conversion): Pass location down to require_complete_type.
3955 (build_array_ref): Likewise.
3956 (build_function_call_vec): Likewise.
3957 (convert_arguments): Likewise.
3958 (build_unary_op): Likewise.
3959 (build_c_cast): Likewise.
3960 (build_modify_expr): Likewise.
3961 (convert_for_assignment): Likewise.
3962 (c_finish_omp_clauses): Likewise.
3963
d6e83a8d
MM
39642016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
3965
3966 PR c/43651
3967 * c-decl.c (declspecs_add_qual): Warn when -Wduplicate-decl-specifier
3968 is enabled.
3969 * c-errors.c (pedwarn_c90): Return true if warned.
3970 * c-tree.h (pedwarn_c90): Change return type to bool.
3971 (enum c_declspec_word): Add new enumerator cdw_atomic.
3972
5c3a10fb
MP
39732016-05-11 Marek Polacek <polacek@redhat.com>
3974
3975 PR c++/71024
3976 * c-decl.c (diagnose_mismatched_decls): Factor out code to
3977 diagnose_mismatched_attributes and call it.
3978
cf68d92c
MP
39792016-05-10 Marek Polacek <polacek@redhat.com>
3980
3981 PR c/70255
3982 * c-decl.c (diagnose_mismatched_decls): Warn for optimize attribute
3983 on a declaration following the definition.
3984
351f85c5
JJ
39852016-05-05 Jakub Jelinek <jakub@redhat.com>
3986
3987 * c-parser.c (c_parser_switch_statement): Add IF_P argument,
3988 parse it through to c_parser_c99_block_statement.
3989 (c_parser_statement_after_labels): Adjust c_parser_switch_statement
3990 caller.
3991
deef7113
MP
39922016-05-04 Marek Polacek <polacek@redhat.com>
3993
3994 * c-parser.c (c_parser_if_statement): Replace OPT_Wparentheses with
3995 OPT_Wdangling_else.
3996
de55efd5
MP
39972016-05-04 Marek Polacek <polacek@redhat.com>
3998
3999 PR c/48778
4000 * c-typeck.c (build_binary_op): Don't issue -Waddress warnings
4001 for macro expansions.
4002
79ce98bc
MP
40032016-05-03 Marek Polacek <polacek@redhat.com>
4004
4005 PR c/70859
4006 * c-typeck.c (build_function_call_vec): Pass LOC and ARG_LOC down to
4007 check_builtin_function_arguments.
4008
fb2647aa
RB
40092016-05-03 Richard Biener <rguenther@suse.de>
4010
4011 * Make-lang.in (cc1-checksum.c): For stage-final re-use
4012 the checksum from the previous stage.
4013
77886428
CP
40142016-05-02 Cesar Philippidis <cesar@codesourcery.com>
4015
4016 * c-parser.c (c_parser_oacc_all_clauses): Update call to
4017 c_finish_omp_clauses.
4018 (c_parser_omp_all_clauses): Likewise.
4019 (c_parser_oacc_cache): Likewise.
4020 (c_parser_oacc_loop): Likewise.
4021 (omp_split_clauses): Likewise.
4022 (c_parser_omp_declare_target): Likewise.
4023 (c_parser_cilk_all_clauses): Likewise.
4024 (c_parser_cilk_for): Likewise.
4025 * c-typeck.c (c_finish_omp_clauses): Replace bool arguments
4026 is_omp, declare_simd, and is_cilk with enum c_omp_region_type ort.
4027
7176a4a0
MP
40282016-05-02 Marek Polacek <polacek@redhat.com>
4029
4030 PR c/70851
4031 * c-decl.c (grokdeclarator): Diagnose when array's size has an
4032 incomplete type.
4033
e7ff0319
CP
40342016-04-29 Cesar Philippidis <cesar@codesourcery.com>
4035
4036 PR middle-end/70626
4037 * c-parser.c (c_parser_oacc_loop): Don't augment mask with
4038 OACC_LOOP_CLAUSE_MASK.
4039 (c_parser_oacc_kernels_parallel): Update call to
4040 c_oacc_split_loop_clauses.
4041
9f405ce1
AM
40422016-04-28 Andrew MacLeod <amacleod@redhat.com>
4043
4044 * c-array-notation.c (fix_builtin_array_notation_fn): Fix final
4045 argument to build_modify_expr in two cases.
4046
c1e1f433
BS
40472016-04-27 Bernd Schmidt <bschmidt@redhat.com>
4048
4049 * c-parser.c (c_parser_postfix_expression_after_primary): Call
4050 warn_for_memset instead of warning directly here.
4051
2448a956
MP
40522016-04-26 Marek Polacek <polacek@redhat.com>
4053
4054 PR c/67784
4055 * c-parser.c (c_parser_maybe_reclassify_token): New function factored
4056 out of ...
4057 (c_parser_for_statement): ... here.
4058 (c_parser_if_statement): Use it.
4059 (c_parser_switch_statement): Use it.
4060 (c_parser_while_statement): Use it.
4061
b02a5e26
MP
4062 PR c/70791
4063 * c-decl.c (pushdecl): Pass LOCUS down to warning.
4064
477d4906
IV
40652016-04-20 Ilya Verbin <ilya.verbin@intel.com>
4066
4067 PR c++/69363
4068 * c-parser.c (c_parser_cilk_all_clauses): Use c_finish_omp_clauses
4069 instead of c_finish_cilk_clauses.
4070 * c-tree.h (c_finish_omp_clauses): Add new default argument.
4071 * c-typeck.c (c_finish_omp_clauses): Add new argument. Allow
4072 floating-point variables in the linear clause for Cilk Plus.
4073
fe37c7af
MM
40742016-04-18 Michael Matz <matz@suse.de>
4075
4076 * c-decl.c (merge_decls): Use SET_DECL_ALIGN and SET_TYPE_ALIGN.
4077 (grokdeclarator, parser_xref_tag, finish_enum): Use SET_TYPE_ALIGN.
4078
949505a9
MP
40792016-04-15 Marek Polacek <polacek@redhat.com>
4080
4081 PR c/70671
4082 * c-typeck.c (build_unary_op): Pass location down to error and
4083 warning call.
4084
dda1bf61
JJ
40852016-04-15 Jakub Jelinek <jakub@redhat.com>
4086
4087 PR c/70436
4088 * c-parser.c (c_parser_pragma): Add IF_P argument, pass it down
4089 where needed.
4090 (c_parser_external_declaration, c_parser_struct_or_union_specifier,
4091 c_parser_parameter_declaration, c_parser_compound_statement_nostart,
4092 c_parser_objc_class_instance_variables, c_parser_objc_methodprotolist):
4093 Adjust c_parser_pragma callers.
4094 (c_parser_statement_after_labels): Likewise. Adjust c_parser_cilk_for
4095 caller.
4096 (c_parser_omp_structured_block): Add IF_P argument, pass it down to
4097 c_parser_statement.
4098 (c_parser_oacc_data, c_parser_oacc_host_data, c_parser_oacc_loop,
4099 c_parser_oacc_kernels_parallel, c_parser_omp_critical,
4100 c_parser_omp_simd, c_parser_omp_for, c_parser_omp_master,
4101 c_parser_omp_ordered, c_parser_omp_parallel, c_parser_omp_single,
4102 c_parser_omp_task, c_parser_omp_taskgroup, c_parser_omp_distribute,
4103 c_parser_omp_teams, c_parser_omp_target_data, c_parser_omp_target,
4104 c_parser_omp_taskloop, c_parser_omp_construct, c_parser_cilk_grainsize,
4105 c_parser_cilk_simd, c_parser_cilk_for): Add IF_P argument, pass it
4106 down where needed.
4107 (c_parser_omp_for_loop): Likewise. Clear IF_P if nbraces.
4108 (c_parser_omp_sections_scope): Adjust c_parser_omp_structured_block
4109 calls.
4110
99cd9857
MP
41112016-04-13 Marek Polacek <polacek@redhat.com>
4112
4113 PR c/70436
4114 * c-parser.c (c_parser_statement_after_labels): Add IF_P argument and
4115 adjust callers.
4116 (c_parser_statement): Likewise.
4117 (c_parser_c99_block_statement): Likewise.
4118 (c_parser_while_statement): Likewise.
4119 (c_parser_for_statement): Likewise.
4120 (c_parser_if_body): Don't set IF_P here.
4121 (c_parser_if_statement): Add IF_P argument. Set IF_P here. Warn
4122 about dangling else here.
4123 * c-tree.h (c_finish_if_stmt): Adjust declaration.
4124 * c-typeck.c (c_finish_if_stmt): Remove NESTED_IF parameter. Don't
4125 warn about dangling else here.
4126
f13355da
MP
41272016-04-04 Marek Polacek <polacek@redhat.com>
4128
4129 PR c/70307
4130 * c-fold.c (c_fully_fold_internal): Handle VEC_COND_EXPR.
4131
5fde6a45
MP
41322016-03-31 Marek Polacek <polacek@redhat.com>
4133
4134 PR c/70297
4135 * c-decl.c (merge_decls): Also set TYPE_ALIGN and TYPE_USER_ALIGN.
4136
4bbf545b
DM
41372016-03-18 David Malcolm <dmalcolm@redhat.com>
4138
4139 PR c/70281
4140 * c-parser.c (c_parser_postfix_expression): Set the source range
4141 for uses of "__builtin_types_compatible_p".
4142
fcc2b74f
JJ
41432016-03-17 Jakub Jelinek <jakub@redhat.com>
4144
4145 PR c/70280
4146 * c-typeck.c (composite_type): Don't count void_list_node
4147 into len, if the list is terminated by void_list_node, start
4148 with void_list_node instead of NULL for newargs. Stop
4149 at void_list_node.
4150
ab4c578f
MP
41512016-03-16 Marek Polacek <polacek@redhat.com>
4152
4153 PR c/70093
4154 * c-typeck.c (build_function_call_vec): Create a TARGET_EXPR for
4155 nested functions returning VM types.
4156
96b3c82d
CP
41572016-03-09 Cesar Philippidis <cesar@codesourcery.com>
4158
4159 * c-parser.c (c_parser_oacc_loop): Update cclauses and clauses
4160 when calling c_finish_omp_clauses.
4161
29b9828f
BS
41622016-03-04 Bernd Schmidt <bschmidt@redhat.com>
4163
4164 PR c/69824
4165 * c-decl.c (get_parm_info): Don't queue implicit function declarations
4166 for later.
4167
7ff6ca38
MP
41682016-03-04 Marek Polacek <polacek@redhat.com>
4169
4170 PR c/69798
4171 * c-parser.c (c_parser_postfix_expression): Call
4172 c_parser_cast_expression rather than c_parser_postfix_expression.
4173
686e2237
JJ
41742016-03-01 Jakub Jelinek <jakub@redhat.com>
4175
4176 PR c/69796
4177 PR c/69974
4178 * c-parser.c (c_parser_translation_unit): Don't change TREE_TYPE
4179 of incomplete decls to error_mark_node.
4180
0b05329b
MP
41812016-02-24 Marek Polacek <polacek@redhat.com>
4182
4183 PR c/69819
4184 * c-decl.c (finish_decl): Don't update the copy of the type of a
4185 different decl type.
4186
067fbd8b
JJ
41872016-02-23 Jakub Jelinek <jakub@redhat.com>
4188
4189 PR objc/69844
4190 * c-parser.c (c_parser_for_statement): Properly handle ObjC classes
4191 in id_kind reclassification.
4192
bf14eba2
JJ
41932016-02-16 Jakub Jelinek <jakub@redhat.com>
4194
4195 PR c/69835
4196 * c-typeck.c (build_binary_op): Revert 2015-09-09 change.
4197
ba539195
JN
41982016-02-16 James Norris <jnorris@codesourcery.com>
4199
4200 PR c/64748
4201 * c-parser.c (c_parser_oacc_data_clause_deviceptr): Allow parms.
4202
16595a1f
BS
42032016-02-12 Bernd Schmidt <bschmidt@redhat.com>
4204
f48dfe98
BS
4205 * c-decl.c (build_null_declspecs): Zero the entire struct.
4206
16595a1f
BS
4207 PR c/69522
4208 * c-parser.c (c_parser_braced_init): New arg outer_obstack. All
4209 callers changed. If nested_p is true, use it to call
4210 finish_implicit_inits.
4211 * c-tree.h (finish_implicit_inits): Declare.
4212 * c-typeck.c (finish_implicit_inits): New function. Move code
4213 from ...
4214 (push_init_level): ... here.
4215 (set_designator, process_init_element): Call finish_implicit_inits.
4216
66756373
JJ
42172016-02-11 Jakub Jelinek <jakub@redhat.com>
4218
4219 PR c/69768
4220 * c-typeck.c (parser_build_binary_op): Strip nops from integer_zerop
4221 arguments for -Waddress warning.
4222
1066e9b5
JJ
42232016-02-04 Jakub Jelinek <jakub@redhat.com>
4224
4225 PR c/69669
4226 * c-decl.c (finish_enum): When honoring mode attribute,
4227 make sure to use proper TYPE_MIN_VALUE and TYPE_MAX_VALUE.
4228
3a5d2ba4
JJ
42292016-01-29 Jakub Jelinek <jakub@redhat.com>
4230
4231 PR debug/69518
4232 * c-decl.c (finish_struct): Clear C_TYPE_INCOMPLETE_VARS in
4233 all type variants, not just TYPE_MAIN_VARIANT.
4234
cbdd8ae0
JJ
42352016-01-27 Jakub Jelinek <jakub@redhat.com>
4236
4237 PR debug/66869
4238 * c-decl.c (c_write_global_declarations_1): Warn with
4239 warn_unused_function if static prototype without definition
4240 is not C_DECL_USED.
4241
fa74a4bc
MP
42422016-01-27 Marek Polacek <polacek@redhat.com>
4243
4244 PR c/68062
4245 * c-typeck.c (build_binary_op) [EQ_EXPR, GE_EXPR]: Promote operand
4246 to unsigned, if needed. Add -Wsign-compare warning.
4247
13f92e8d
JJ
42482016-01-26 Jakub Jelinek <jakub@redhat.com>
4249
4250 PR tree-optimization/69483
4251 * c-parser.c (c_parser_translation_unit): Use FOR_EACH_VEC_ELT.
4252
cd8e73dc 42532016-01-20 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
d25c7690
PK
4254
4255 PR c/24293
4256 * c-tree.h (incomplete_record_decls): Declare.
4257 * c-parser.c (incomplete_record_decls): Define.
4258 (c_parser_translation_unit): Iterate through incomplete_record_decls and
4259 report error if any decl has zero size.
4260 * c-decl.c (finish_decl): Append static decl with incomplete struct/union
4261 or enum type to incomplete_record_decls.
4262
e6d6ec9e
TV
42632016-01-14 Tom de Vries <tom@codesourcery.com>
4264
4265 PR tree-optimization/68773
4266 * c-parser.c (c_parser_oacc_declare, c_parser_omp_declare_target): Don't
4267 set force_output.
4268
00083992
MP
42692016-01-14 Marek Polacek <polacek@redhat.com>
4270
4271 PR c/69262
4272 * c-decl.c (grokdeclarator): Provide more information for invalid
4273 array declarations.
4274
7443cf13
DM
42752016-01-06 David Malcolm <dmalcolm@redhat.com>
4276
4277 * c-parser.c (c_parser_unary_expression): For dereferences, build
4278 a combined location before calling build_indirect_ref, so that
4279 error reports cover the full range, manually updating the c_expr
4280 src_range.
4281
6b131d5b
MP
42822016-01-06 Marek Polacek <polacek@redhat.com>
4283
4284 PR sanitizer/69099
4285 * c-convert.c (convert) [INTEGER_TYPE]: Drop ARG. Don't pass ARG to
4286 ubsan_instrument_float_cast. Fold EXPR. Use NULL_TREE instead of
4287 NULL.
4288
818ab71a
JJ
42892016-01-04 Jakub Jelinek <jakub@redhat.com>
4290
4291 Update copyright years.
4292
2fe0a208
MP
42932016-01-04 Marek Polacek <polacek@redhat.com>
4294
4295 PR c/68908
4296 * c-typeck.c (build_atomic_assign): Improve commentary. Add
4297 optimization to use __atomic_fetch_* built-in if possible.
4298
c7b48c8a
TS
42992015-12-23 Thomas Schwinge <thomas@codesourcery.com>
4300
4301 * c-parser.c (c_parser_oacc_clause_use_device): Merge function
4302 into...
4303 (c_parser_omp_clause_use_device_ptr): ... this function. Adjust
4304 all users.
4305
fda5652f
MP
43062015-12-22 Marek Polacek <polacek@redhat.com>
4307
4308 PR c/69002
4309 * c-typeck.c (build_component_ref): Warn when acessing elements of
4310 atomic structures or unions.
4311
745e411d
DM
43122015-12-21 David Malcolm <dmalcolm@redhat.com>
4313
4314 * c-typeck.c: Include "gcc-rich-location.h".
4315 (build_binary_op): In the two places that call binary_op_error,
4316 create a gcc_rich_location and populate it with the location of
4317 the binary op and its two operands.
4318
94c40e19
DM
43192015-12-16 David Malcolm <dmalcolm@redhat.com>
4320
4321 * c-parser.c (c_parser_statement_after_labels): When calling
4322 c_finish_return, Use the return expression's location if it has
4323 one, falling back to the location of the first token within it.
4324 * c-typeck.c (c_finish_return): When issuing warnings about
4325 the incorrect presence/absence of a return value, issue a note
4326 showing the declaration of the function.
4327
de67c4c3
DM
43282015-12-16 David Malcolm <dmalcolm@redhat.com>
4329
4330 * c-parser.c (struct c_parser): Expand array "tokens_buf" from 2
4331 to 4.
4332 (c_parser_peek_nth_token): New function.
4333 (c_parser_peek_conflict_marker): New function.
4334 (c_parser_error): Detect conflict markers and report them as such.
4335
a10704e1
DM
43362015-12-16 David Malcolm <dmalcolm@redhat.com>
4337
4338 * c-parser.c (c_parser_postfix_expression): Use EXPR_LOC_OR_LOC
4339 to preserve range information for the primary expression
4340 in the call to c_parser_postfix_expression_after_primary.
4341
8062bca6
DM
43422015-12-16 David Malcolm <dmalcolm@redhat.com>
4343
4344 * c-parser.c (c_parser_static_assert_declaration_no_semi): Use the
4345 expression location, falling back on the first token location,
4346 rather than always using the latter.
4347
d06f8b75
MP
43482015-12-16 Marek Polacek <polacek@redhat.com>
4349
4350 PR c/64637
4351 * c-typeck.c (c_process_expr_stmt): Use location of the expression if
4352 available.
4353
2994fb91
MP
43542015-12-15 Marek Polacek <polacek@redhat.com>
4355
4356 PR c/68907
4357 * c-typeck.c (build_atomic_assign): Set TREE_NO_WARNING on an
4358 artificial decl.
4359
a1b93f8d
DM
43602015-12-08 David Malcolm <dmalcolm@redhat.com>
4361
4362 * c-parser.c (c_parser_alignof_expression): Capture location of
4363 closing parenthesis (if any), or of end of unary expression, and
4364 use it to build a src_range for the expression.
4365
46c6e1e2
DM
43662015-12-08 David Malcolm <dmalcolm@redhat.com>
4367
4368 PR c/68757
4369 * c-parser.c (c_parser_get_builtin_args): Add
4370 "out_close_paren_loc" param, and write back to it.
4371 (c_parser_postfix_expression): Capture the closing
4372 parenthesis location for RID_CHOOSE_EXPR,
4373 RID_BUILTIN_CALL_WITH_STATIC_CHAIN, RID_BUILTIN_COMPLEX,
4374 RID_BUILTIN_SHUFFLE and use it to set the source range
4375 for such expressions; within RID_BUILTIN_COMPLEX set
4376 the underlying location.
4377
66189108
MP
43782015-12-07 Marek Polacek <polacek@redhat.com>
4379
4380 PR c/68668
4381 * c-decl.c (grokdeclarator): If ORIG_QUAL_INDIRECT is indirect, use
4382 TREE_TYPE of ORIG_QUAL_TYPE, otherwise decrement ORIG_QUAL_INDIRECT.
4383
f187980b
EB
43842015-12-04 Eric Botcazou <ebotcazou@adacore.com>
4385
4386 * c-tree.h (c_build_va_arg): Adjust prototype.
4387 * c-parser.c (c_parser_postfix_expression): Adjust call to above.
4388 * c-typeck.c (c_build_va_arg): Rename LOC parameter to LOC2, add LOC1
4389 parameter, adjust throughout and issue an error if EXPR is a component
4390 with reverse storage order.
4391
4250754e
JM
43922015-12-02 Jason Merrill <jason@redhat.com>
4393
4394 * c-fold.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
4395 (c_fully_fold_internal, decl_constant_value_for_optimization):
4396 Move from c-common.c.
4397 * c-tree.h: Declare decl_constant_value_for_optimization.
4398 * Make-lang.in (C_AND_OBJC_OBJS): Add c-fold.o.
4399
e9e32ee6
JM
44002015-12-02 Joseph Myers <joseph@codesourcery.com>
4401
4402 PR c/68162
4403 * c-decl.c (grokdeclarator): Set first_non_attr_kind before
4404 following link from declarator to next declarator. Track original
4405 qualified type and pass it to c_build_qualified_type.
4406 * c-typeck.c (c_build_qualified_type): Add arguments
4407 orig_qual_type and orig_qual_indirect.
4408
ff7a55bf
TS
44092015-12-02 Thomas Schwinge <thomas@codesourcery.com>
4410
4411 * c-parser.c (c_parser_omp_clause_name)
4412 (c_parser_oacc_all_clauses): Alphabetical sorting.
4413
657e4e47
JJ
44142015-12-02 Jakub Jelinek <jakub@redhat.com>
4415
4416 PR c/68533
4417 * c-decl.c (get_parm_info): Use b->locus instead of input_location
4418 for diagnostics.
4419
37d5ad46
JB
44202015-12-01 Julian Brown <julian@codesourcery.com>
4421 Cesar Philippidis <cesar@codesourcery.com>
4422 James Norris <James_Norris@mentor.com>
4423
4424 * c-parser.c (c_parser_omp_clause_name): Add use_device support.
4425 (c_parser_oacc_clause_use_device): New function.
4426 (c_parser_oacc_all_clauses): Add use_device support.
4427 (OACC_HOST_DATA_CLAUSE_MASK): New macro.
4428 (c_parser_oacc_host_data): New function.
4429 (c_parser_omp_construct): Add host_data support.
4430 * c-tree.h (c_finish_oacc_host_data): Add prototype.
4431 * c-typeck.c (c_finish_oacc_host_data): New function.
4432 (c_finish_omp_clauses): Add use_device support.
4433
a4850ce9
JH
44342015-11-29 Jan Hubicka <hubicka@ucw.cz>
4435
4436 PR c/67106
4437 * c-decl.c: Set TYPE_PACKED in variants.
4438
b58d3df2
ML
44392015-11-27 Martin Liska <mliska@suse.cz>
4440
4441 PR c++/68312
4442 * c-array-notation.c (fix_builtin_array_notation_fn):
4443 Use release_vec_vec instead of vec::release.
4444 (build_array_notation_expr): Likewise.
4445 (fix_conditional_array_notations_1): Likewise.
4446 (fix_array_notation_expr): Likewise.
4447 (fix_array_notation_call_expr): Likewise.
4448
aec17bfe
JJ
44492015-11-27 Jakub Jelinek <jakub@redhat.com>
4450
4451 PR c/63326
4452 * c-parser.c (c_parser_compound_statement_nostart): If
4453 last_label is true, use pragma_stmt instead of pragma_compound
4454 as second c_parser_pragma argument.
4455 (c_parser_omp_ordered, c_parser_omp_target_update,
4456 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Pass
4457 false as second argument to c_parser_skip_to_pragma_eol after
4458 diagnosing standalone directives used in pragma_stmt context.
4459
688c4de0
IV
44602015-11-24 Ilya Verbin <ilya.verbin@intel.com>
4461
4462 * c-parser.c (c_parser_oacc_declare): Replace "ifdef ENABLE_OFFLOADING"
4463 with "if (ENABLE_OFFLOADING)".
4464
cbd03aee
DM
44652015-11-23 David Malcolm <dmalcolm@redhat.com>
4466
4467 PR objc/68438
4468 * c-parser.c (c_parser_postfix_expression): Set up source ranges
4469 for various Objective-C constructs: Class.name syntax,
4470 @selector(), @protocol(), @encode(), and [] message syntax.
4471
a87a86e1
DM
44722015-11-20 David Malcolm <dmalcolm@redhat.com>
4473
4474 PR 62314
4475 * c-typeck.c (should_suggest_deref_p): New function.
4476 (build_component_ref): Special-case POINTER_TYPE when
4477 generating a "not a structure of union" error message, and
4478 suggest a "->" rather than a ".", providing a fix-it hint.
4479
8ece8dfb
DM
44802015-11-19 David Malcolm <dmalcolm@redhat.com>
4481
4482 * c-typeck.c (lookup_field_fuzzy): Move determination of closest
4483 candidate into a new function, find_closest_identifier.
4484
433068cc
MP
44852015-11-19 Marek Polacek <polacek@redhat.com>
4486
4487 PR c/68412
4488 * c-typeck.c (parser_build_binary_op): Properly handle
4489 C_MAYBE_CONST_EXPR before calling warn_tautological_cmp.
4490
bef08b71
DM
44912015-11-17 David Malcolm <dmalcolm@redhat.com>
4492
4493 * c-parser.c (set_c_expr_source_range): Bulletproof both
4494 overloaded implementations against NULL expr->value.
4495 (c_parser_braced_init): Set src_range for "ret" to a sane pair of
4496 values.
4497 (c_parser_unary_expression): Likewise when handling addresses of
4498 labels.
4499 (c_parser_postfix_expression): Likewise for statement expressions,
4500 for __FUNCTION__, __PRETTY_FUNCTION_ and __func__ keywords, for
4501 __builtin_va_arg, and for __builtin_offset_of.
4502 (c_parser_postfix_expression_after_paren_type): Initialize expr's
4503 src_range using the range of the braced initializer.
4504 (c_parser_transaction_expression): Set src_range for "ret" to a
4505 sane pair of values.
4506
fff77217
KY
45072015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
4508
4509 * c-parser.c (c_finish_omp_declare_simd): Look for
4510 "simd" attribute as well. Update error message.
4511
1d899da2
TS
45122015-11-14 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
4513
4514 * c-parser.c (c_parser_omp_declare_target): Adjust.
4515
e4606348
JJ
45162015-11-14 Jakub Jelinek <jakub@redhat.com>
4517
4518 * c-typeck.c (c_finish_omp_clauses): Don't mark
4519 GOMP_MAP_FIRSTPRIVATE_POINTER decls addressable.
4520
3e636daf
MP
45212015-11-14 Marek Polacek <polacek@redhat.com>
4522
4523 * c-decl.c: Use RECORD_OR_UNION_TYPE_P throughout.
4524 * c-typeck.c: Likewise.
4525
ebedc9a3
DM
45262015-11-13 David Malcolm <dmalcolm@redhat.com>
4527
4528 * c-decl.c (warn_defaults_to): Pass line_table to
4529 rich_location ctor.
4530 * c-errors.c (pedwarn_c99): Likewise.
4531 (pedwarn_c90): Likewise.
4532 * c-parser.c (set_c_expr_source_range): New functions.
4533 (c_token::get_range): New method.
4534 (c_token::get_finish): New method.
4535 (c_parser_expr_no_commas): Call set_c_expr_source_range on the ret
4536 based on the range from the start of the LHS to the end of the
4537 RHS.
4538 (c_parser_conditional_expression): Likewise, based on the range
4539 from the start of the cond.value to the end of exp2.value.
4540 (c_parser_binary_expression): Call set_c_expr_source_range on
4541 the stack values for TRUTH_ANDIF_EXPR and TRUTH_ORIF_EXPR.
4542 (c_parser_cast_expression): Call set_c_expr_source_range on ret
4543 based on the cast_loc through to the end of the expr.
4544 (c_parser_unary_expression): Likewise, based on the
4545 op_loc through to the end of op.
4546 (c_parser_sizeof_expression) Likewise, based on the start of the
4547 sizeof token through to either the closing paren or the end of
4548 expr.
4549 (c_parser_postfix_expression): Likewise, using the token range,
4550 or from the open paren through to the close paren for
4551 parenthesized expressions.
4552 (c_parser_postfix_expression_after_primary): Likewise, for
4553 various kinds of expression.
4554 * c-tree.h (struct c_expr): Add field "src_range".
4555 (c_expr::get_start): New method.
4556 (c_expr::get_finish): New method.
4557 (set_c_expr_source_range): New decls.
4558 * c-typeck.c (parser_build_unary_op): Call set_c_expr_source_range
4559 on ret for prefix unary ops.
4560 (parser_build_binary_op): Likewise, running from the start of
4561 arg1.value through to the end of arg2.value.
4562
ec8b536f
MP
45632015-11-13 Marek Polacek <polacek@redhat.com>
4564
4565 PR c/68320
4566 * c-parser.c (c_parser_for_statement): Treat unknown tokens as IDs.
4567
277fe616
DM
45682015-11-13 David Malcolm <dmalcolm@redhat.com>
4569
4570 * c-typeck.c: Include spellcheck.h.
4571 (lookup_field_fuzzy_find_candidates): New function.
4572 (lookup_field_fuzzy): New function.
4573 (build_component_ref): If the field was not found, try using
4574 lookup_field_fuzzy and potentially offer a suggestion.
4575
6e232ba4
JN
45762015-11-12 James Norris <jnorris@codesourcery.com>
4577 Joseph Myers <joseph@codesourcery.com>
4578
4579 * c-parser.c (c_parser_pragma): Handle PRAGMA_OACC_DECLARE.
4580 (c_parser_omp_clause_name): Handle 'device_resident' clause.
4581 (c_parser_oacc_data_clause): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
4582 and PRAGMA_OMP_CLAUSE_LINK.
4583 (c_parser_oacc_all_clauses): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
4584 and PRAGMA_OACC_CLAUSE_LINK.
4585 (OACC_DECLARE_CLAUSE_MASK): New definition.
4586 (c_parser_oacc_declare): New function.
4587
9be4f715
MP
45882015-11-12 Marek Polacek <polacek@redhat.com>
4589
4590 PR c/67784
4591 * c-parser.c (c_parser_for_statement): Reclassify the token in
4592 a correct scope.
4593
e78bede6
MP
45942015-11-11 Marek Polacek <polacek@redhat.com>
4595
4596 PR c/68107
4597 PR c++/68266
4598 * c-decl.c (grokdeclarator): Call valid_array_size_p. Remove code
4599 checking the size of an array.
4600
69f293c9
AM
46012015-11-11 Andrew MacLeod <amacleod@redhat.com>
4602
4603 * c-array-notation.c: Remove unused header files.
4604 * c-aux-info.c: Likewise.
4605 * c-convert.c: Likewise.
4606 * c-decl.c: Likewise.
4607 * c-errors.c: Likewise.
4608 * c-lang.c: Likewise.
4609 * c-objc-common.c: Likewise.
4610 * c-parser.c: Likewise.
4611 * c-typeck.c: Likewise.
4612 * gccspec.c: Likewise.
4613
3a40d81d
NS
46142015-11-09 Thomas Schwinge <thomas@codesourcery.com>
4615 Cesar Philippidis <cesar@codesourcery.com>
4616 James Norris <jnorris@codesourcery.com>
4617 Julian Brown <julian@codesourcery.com>
4618 Nathan Sidwell <nathan@codesourcery.com>
4619
3a40d81d
NS
4620 * c-parser.c (c_parser_declaration_or_fndef): Add OpenACC
4621 routine arg.
4622 (c_parser_declaration_or_fndef): Call c_finish_oacc_routine.
4623 (c_parser_pragma): Parse 'acc routine'.
4624 (OACC_ROUTINE_CLAUSE_MARK): Define.
4625 (c_parser_oacc_routine, (c_finish_oacc_routine): New.
4626
fc402eec
AA
46272015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
4628
4629 PR debug/67192
4630 * c-typeck.c (c_finish_loop): For unconditional loops, set the
4631 location of the backward-goto to the start of the loop body.
4632
f6b0b3db
AA
46332015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
4634
4635 PR debug/67192
4636 * c-parser.c (c_parser_while_statement): Finish the loop before
4637 parsing ahead for misleading indentation.
4638 (c_parser_for_statement): Likewise.
4639
ee45a32d
EB
46402015-11-08 Eric Botcazou <ebotcazou@adacore.com>
4641
4642 * c-decl.c (finish_struct): If the structure has reverse storage
4643 order, rewrite the type of array fields with scalar component. Call
4644 maybe_apply_pragma_scalar_storage_order on entry.
4645 * c-typeck.c (build_unary_op) <ADDR_EXPR>: Remove left-overs. Issue
4646 errors on bit-fields and reverse SSO here and not...
4647 (c_mark_addressable): ...here.
4648 (output_init_element): Adjust call to initializer_constant_valid_p.
4649 (c_build_qualified_type): Propagate TYPE_REVERSE_STORAGE_ORDER.
4650
8a645150
DM
46512015-11-06 David Malcolm <dmalcolm@redhat.com>
4652
4653 * c-decl.c (warn_defaults_to): Update for change in signature
4654 of diagnostic_set_info.
4655 * c-errors.c (pedwarn_c99): Likewise.
4656 (pedwarn_c90): Likewise.
4657 * c-objc-common.c (c_tree_printer): Update for new "caret_p" param
4658 for textinfo::set_location.
4659
7a5e4956
CP
46602015-11-05 Cesar Philippidis <cesar@codesourcery.com>
4661 Thomas Schwinge <thomas@codesourcery.com>
4662 James Norris <jnorris@codesourcery.com>
4663
4664 * c-parser.c (c_parser_omp_clause_name): Add support for
4665 PRAGMA_OACC_CLAUSE_INDEPENDENT and PRAGMA_OACC_CLAUSE_TILE.
4666 (c_parser_omp_clause_default): Add is_oacc argument. Handle
4667 default(none) in OpenACC.
4668 (c_parser_oacc_shape_clause): Allow pointer variables as gang static
4669 arguments.
4670 (c_parser_oacc_clause_tile): New function.
4671 (c_parser_oacc_all_clauses): Add support for OMP_CLAUSE_DEFAULT,
4672 OMP_CLAUSE_INDEPENDENT and OMP_CLAUSE_TILE.
4673 (OACC_LOOP_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_{PRIVATE,INDEPENDENT,
4674 TILE}.
4675 (OACC_KERNELS_MASK): Add PRAGMA_OACC_CLAUSE_DEFAULT.
4676 (OACC_PARALLEL_MASK): Add PRAGMA_OACC_CLAUSE_{DEFAULT,PRIVATE,
4677 FIRSTPRIVATE}.
4678 (c_parser_omp_all_clauses): Update call to c_parser_omp_clause_default.
4679 (c_parser_oacc_update): Update the error message for missing clauses.
4680 * c-typeck.c (c_finish_omp_clauses): Add support for OMP_CLAUSE_TILE
4681 and OMP_CLAUSE_INDEPENDENT.
4682
bfcfbfa0
MP
46832015-11-05 Marek Polacek <polacek@redhat.com>
4684
4685 PR c/68090
4686 * c-parser.c (c_parser_postfix_expression_after_paren_type): Don't
4687 deal with pre-evaluation on invalid types.
4688
e01d41e5
JJ
46892015-11-05 Jakub Jelinek <jakub@redhat.com>
4690 Ilya Verbin <ilya.verbin@intel.com>
4691
4692 * c-parser.c: Include context.h and gimple-expr.h.
4693 (c_parser_omp_clause_schedule): Parse schedule modifiers, diagnose
4694 monotonic together with nonmonotonic.
4695 (c_parser_omp_for_loop): Call c_omp_check_loop_iv. Call add_stmt here.
4696 (OMP_DISTRIBUTE_CLAUSE_MASK): Add lastprivate clause.
4697 (c_parser_omp_target_data, c_parser_omp_target_enter_data,
4698 c_parser_omp_target_exit_data): Allow GOMP_MAP_ALWAYS_POINTER.
4699 (c_parser_omp_target): Likewise. Evaluate num_teams and thread_limit
4700 expressions on combined target teams before the target.
4701 (c_parser_omp_declare_target): If decl has "omp declare target" or
4702 "omp declare target link" attribute, and cgraph or varpool node already
4703 exists, then set corresponding flags. Call c_finish_omp_clauses
4704 in the parenthesized extended-list syntax case.
4705 * c-decl.c (c_decl_attributes): Don't diagnose block scope vars inside
4706 declare target.
4707 * c-typeck.c (handle_omp_array_sections_1): Allow non-zero low-bound
4708 on OMP_CLAUSE_REDUCTION array sections.
4709 (handle_omp_array_sections): Encode low-bound into the MEM_REF, either
4710 into the constant offset, or for variable low-bound using
4711 POINTER_PLUS_EXPR. For structure element based array sections use
4712 GOMP_MAP_ALWAYS_POINTER instead of GOMP_MAP_FIRSTPRIVATE_POINTER.
4713 (c_finish_omp_clauses): Drop generic_field_head, structure
4714 elements are now always mapped even as array section bases,
4715 diagnose same var in data sharing and mapping clauses. Diagnose if
4716 linear step on declare simd is neither a constant nor a uniform
4717 parameter. Look through POINTER_PLUS_EXPR for array section
4718 reductions. Diagnose the same var or function appearing multiple
4719 times on the same directive. Fix up wording for the to clause if t
4720 is neither a FUNCTION_DECL nor a VAR_DECL. Diagnose nonmonotonic
4721 modifier on kinds other than dynamic or guided or nonmonotonic
4722 modifier together with ordered clause.
4723
4bf9e5a8
TS
47242015-11-03 Thomas Schwinge <thomas@codesourcery.com>
4725 Chung-Lin Tang <cltang@codesourcery.com>
4726
4727 * c-parser.c (c_parser_omp_construct): Handle PRAGMA_OACC_ATOMIC.
4728
2adfab87
AM
47292015-10-29 Andrew MacLeod <amacleod@redhat.com>
4730
4731 * c-array-notation.c: Reorder #include's and remove duplicates.
4732 * c-aux-info.c: Likewise.
4733 * c-convert.c: Likewise.
4734 * c-decl.c: Likewise.
4735 * c-errors.c: Likewise.
4736 * c-lang.c: Likewise.
4737 * c-objc-common.c: Likewise.
4738 * c-parser.c: Likewise.
4739 * c-typeck.c: Likewise.
4740
e922069e
JW
47412015-10-26 Jim Wilson <jim.wilson@linaro.org>
4742
4743 PR debug/66068
4744 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
4745 after calling build_qualified_type.
4746
765dd391
CP
47472015-10-27 Cesar Philippidis <cesar@codesourcery.com>
4748 Thomas Schwinge <thomas@codesourcery.com>
4749 James Norris <jnorris@codesourcery.com>
4750 Joseph Myers <joseph@codesourcery.com>
4751 Julian Brown <julian@codesourcery.com>
4752 Bernd Schmidt <bschmidt@redhat.com>
4753
4754 * c-parser.c (c_parser_oacc_shape_clause): New.
4755 (c_parser_oacc_simple_clause): New.
4756 (c_parser_oacc_all_clauses): Add auto, gang, seq, vector, worker.
4757 (OACC_LOOP_CLAUSE_MASK): Add gang, worker, vector, auto, seq.
4758
88bae6f4
TS
47592015-10-27 Thomas Schwinge <thomas@codesourcery.com>
4760 James Norris <jnorris@codesourcery.com>
4761 Cesar Philippidis <cesar@codesourcery.com>
4762
4763 PR c/64765
4764 PR c/64880
4765 * c-parser.c (c_parser_oacc_loop): Add mask, cclauses formal
4766 parameters, and handle these. Adjust all users.
4767 (c_parser_oacc_kernels, c_parser_oacc_parallel): Merge functions
4768 into...
4769 (c_parser_oacc_kernels_parallel): ... this new function. Adjust
4770 all users.
4771 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels): Don't
4772 declare functions.
4773 (c_finish_omp_construct): Declare function.
4774 * c-typeck.c (c_finish_oacc_parallel, c_finish_oacc_kernels):
4775 Merge functions into...
4776 (c_finish_omp_construct): ... this new function.
4777
a8fc2579
RB
47782015-10-22 Richard Biener <rguenther@suse.de>
4779
4780 * c-typeck.c (c_finish_omp_clauses): Properly convert operands
4781 before folding a MINUS_EXPR.
4782
e9122ef6
MP
47832015-10-21 Marek Polacek <polacek@redhat.com>
4784
4785 PR c/68024
4786 * c-decl.c (start_function): Warn about vararg functions without
4787 a prototype.
4788
9f47c7e5
IE
47892015-10-21 Ilya Enkovich <enkovich.gnu@gmail.com>
4790
4791 * c-typeck.c (build_conditional_expr): Use boolean vector
4792 type for vector comparison.
4793 (build_vec_cmp): New.
4794 (build_binary_op): Use build_vec_cmp for comparison.
4795
fa60eeb9
MP
47962015-10-20 Marek Polacek <polacek@redhat.com>
4797
4798 * c-parser.c (is_cilkplus_vector_p): Don't define here.
4799
2c7020eb
MP
48002015-10-20 Marek Polacek <polacek@redhat.com>
4801
4802 PR c/67964
4803 * c-parser.c (c_parser_attributes): Break out of the loop if the
4804 token after an attribute isn't a comma.
4805
d9a6bd32
JJ
48062015-10-13 Jakub Jelinek <jakub@redhat.com>
4807 Aldy Hernandez <aldyh@redhat.com>
4808
4809 * c-parser.c (c_parser_pragma): Handle PRAGMA_OMP_ORDERED here.
4810 (c_parser_omp_clause_name): Handle OpenMP 4.5 clauses.
4811 (c_parser_omp_variable_list): Handle structure elements for
4812 map, to and from clauses. Handle array sections in reduction
4813 clause. Formatting fixes.
4814 (c_parser_omp_clause_if): Add IS_OMP argument, handle parsing of
4815 if clause modifiers.
4816 (c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
4817 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
4818 c_parser_omp_clause_defaultmap, c_parser_omp_clause_use_device_ptr,
4819 c_parser_omp_clause_is_device_ptr): New functions.
4820 (c_parser_omp_clause_ordered): Parse optional parameter.
4821 (c_parser_omp_clause_reduction): Handle array reductions.
4822 (c_parser_omp_clause_schedule): Parse optional simd modifier.
4823 (c_parser_omp_clause_nogroup, c_parser_omp_clause_orderedkind): New
4824 functions.
4825 (c_parser_omp_clause_linear): Parse linear clause modifiers.
4826 (c_parser_omp_clause_depend_sink): New function.
4827 (c_parser_omp_clause_depend): Parse source/sink depend kinds.
4828 (c_parser_omp_clause_map): Parse release/delete map kinds and
4829 optional always modifier.
4830 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_if
4831 and c_finish_omp_clauses callers.
4832 (c_parser_omp_all_clauses): Likewise. Parse OpenMP 4.5 clauses.
4833 Parse "to" as OMP_CLAUSE_TO_DECLARE if on declare target directive.
4834 (c_parser_oacc_cache): Adjust c_finish_omp_clauses caller.
4835 (OMP_CRITICAL_CLAUSE_MASK): Define.
4836 (c_parser_omp_critical): Parse critical clauses.
4837 (c_parser_omp_for_loop): Handle doacross loops, adjust
4838 c_finish_omp_for and c_finish_omp_clauses callers.
4839 (OMP_SIMD_CLAUSE_MASK): Add simdlen clause.
4840 (c_parser_omp_simd): Allow ordered clause if it has no parameter.
4841 (OMP_FOR_CLAUSE_MASK): Add linear clause.
4842 (c_parser_omp_for): Disallow ordered clause when combined with
4843 distribute. Disallow linear clause when combined with distribute
4844 and not combined with simd.
4845 (OMP_ORDERED_CLAUSE_MASK, OMP_ORDERED_DEPEND_CLAUSE_MASK): Define.
4846 (c_parser_omp_ordered): Add CONTEXT argument, remove LOC argument,
4847 parse clauses and if depend clause is found, don't parse a body.
4848 (c_parser_omp_parallel): Disallow copyin clause on target parallel.
4849 Allow target parallel without for after it.
4850 (OMP_TASK_CLAUSE_MASK): Add priority clause.
4851 (OMP_TARGET_DATA_CLAUSE_MASK): Add use_device_ptr clause.
4852 (c_parser_omp_target_data): Diagnose no map clauses or clauses with
4853 invalid kinds.
4854 (OMP_TARGET_UPDATE_CLAUSE_MASK): Add depend and nowait clauses.
4855 (OMP_TARGET_ENTER_DATA_CLAUSE_MASK,
4856 OMP_TARGET_EXIT_DATA_CLAUSE_MASK): Define.
4857 (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): New
4858 functions.
4859 (OMP_TARGET_CLAUSE_MASK): Add depend, nowait, private, firstprivate,
4860 defaultmap and is_device_ptr clauses.
4861 (c_parser_omp_target): Parse target parallel and target simd. Set
4862 OMP_TARGET_COMBINED on combined constructs. Parse target enter data
4863 and target exit data. Diagnose invalid map kinds.
4864 (OMP_DECLARE_TARGET_CLAUSE_MASK): Define.
4865 (c_parser_omp_declare_target): Parse OpenMP 4.5 forms of this
4866 construct.
4867 (c_parser_omp_declare_reduction): Use STRIP_NOPS when checking for
4868 &omp_priv.
4869 (OMP_TASKLOOP_CLAUSE_MASK): Define.
4870 (c_parser_omp_taskloop): New function.
4871 (c_parser_omp_construct): Don't handle PRAGMA_OMP_ORDERED here,
4872 handle PRAGMA_OMP_TASKLOOP.
4873 (c_parser_cilk_for): Adjust c_finish_omp_clauses callers.
4874 * c-tree.h (c_finish_omp_clauses): Add two new arguments.
4875 * c-typeck.c (handle_omp_array_sections_1): Fix comment typo.
4876 Add IS_OMP argument, handle structure element bases, diagnose
4877 bitfields, pass IS_OMP recursively, diagnose known zero length
4878 array sections in depend clauses, handle array sections in reduction
4879 clause, diagnose negative length even for pointers.
4880 (handle_omp_array_sections): Add IS_OMP argument, use auto_vec for
4881 types, pass IS_OMP down to handle_omp_array_sections_1, handle
4882 array sections in reduction clause, set
4883 OMP_CLAUSE_MAP_MAYBE_ZERO_LENGTH_ARRAY_SECTION if map could be zero
4884 length array section, use GOMP_MAP_FIRSTPRIVATE_POINTER for IS_OMP.
4885 (c_finish_omp_clauses): Add IS_OMP and DECLARE_SIMD arguments.
4886 Handle new OpenMP 4.5 clauses and new restrictions for the old ones.
4887
21ba0cea
MP
48882015-10-06 Marek Polacek <polacek@redhat.com>
4889
4890 * c-parser.c (c_parser_statement_after_labels): Use
4891 protected_set_expr_location.
4892 (c_parser_omp_clause_num_gangs): Likewise.
4893 (c_parser_omp_clause_num_threads): Likewise.
4894 (c_parser_omp_clause_num_workers): Likewise.
4895 (c_parser_omp_clause_vector_length): Likewise.
4896 (c_parser_omp_clause_num_teams): Likewise.
4897 (c_parser_omp_clause_thread_limit): Likewise.
4898 * c-typeck.c (build_c_cast): Likewise.
4899 (c_cast_expr): Likewise.
4900
624d31fe
RS
49012015-10-05 Richard Sandiford <richard.sandiford@arm.com>
4902
4903 * c-typeck.c (c_tree_equal): Use real_equal instead of
4904 REAL_VALUES_EQUAL.
4905
b8fd7909
JM
49062015-10-04 Jason Merrill <jason@redhat.com>
4907
4908 * c-parser.c (c_lex_one_token): Handle @synchronized.
4909 * c-decl.c (match_builtin_function_types): A declaration of a built-in
4910 can change whether the function is transaction_safe.
4911
1c7485af
MP
49122015-10-02 Marek Polacek <polacek@redhat.com>
4913
4914 PR c/67730
4915 * c-typeck.c (convert_for_assignment): Use the expansion point
4916 location throughout.
4917
3e3b8d63
MP
49182015-10-02 Marek Polacek <polacek@redhat.com>
4919
4920 PR c/64249
4921 * c-parser.c (c_parser_statement_after_labels): Add CHAIN parameter
4922 and pass it down to c_parser_if_statement.
4923 (c_parser_else_body): Add CHAIN parameter and pass it down to
4924 c_parser_statement_after_labels.
4925 (c_parser_if_statement): Add CHAIN parameter. Add code to warn about
4926 duplicated if-else-if conditions.
4927
aabef2de
MP
49282015-10-01 Marek Polacek <polacek@redhat.com>
4929
4930 * c-typeck.c (convert_for_assignment): Improve commentary.
4931
de8ddd5f
MP
49322015-09-30 Marek Polacek <polacek@redhat.com>
4933
4934 PR c/67730
4935 * c-typeck.c (c_finish_return): Use the expansion point location for
4936 certain "return with value" warnings.
4937
c4914de6
MLI
49382015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
4939
4940 * c-parser.c (pragma_lex): Add loc argument.
4941
0e36f5c7
MP
49422015-09-15 Marek Polacek <polacek@redhat.com>
4943
4944 PR c/67580
4945 * c-decl.c (tag_exists_p): New function.
4946 * c-parser.c (c_parser_declaration_or_fndef): Give a hint when
4947 struct/union/enum keywords are missing.
4948 * c-tree.h (tag_exists_p): Declare.
4949
2f3bb934
MP
49502015-09-15 Marek Polacek <polacek@redhat.com>
4951
4952 * c-decl.c (lookup_label): Return NULL_TREE instead of 0.
4953 (lookup_tag): Change the type of THISLEVEL_ONLY to bool.
4954 Return NULL_TREE instead of 0.
4955 (lookup_name): Return NULL_TREE instead of 0.
4956 (lookup_name_in_scope): Likewise.
4957 (shadow_tag_warned): Use true instead of 1 and NULL_TREE instead of 0.
4958 (parser_xref_tag): Use false instead of 0.
4959 (start_struct): Use true instead of 1.
4960 (start_enum): Use true instead of 1 and NULL_TREE instead of 0.
4961
aa256c4a
MP
49622015-09-14 Marek Polacek <polacek@redhat.com>
4963
4964 * c-typeck.c (set_nonincremental_init_from_string): Use
4965 HOST_WIDE_INT_M1U when shifting a negative value.
4966
dbb68221
MW
49672015-09-09 Mark Wielaard <mjw@redhat.com>
4968
4969 * c-typeck.c (build_binary_op): Check and warn when nonnull arg
4970 parm against NULL.
4971
a8a098ac
JJ
49722015-09-10 Jakub Jelinek <jakub@redhat.com>
4973
4974 PR c/67502
4975 * c-parser.c (c_parser_omp_for_loop): Emit DECL_EXPR stmts
4976 into OMP_FOR_PRE_BODY rather than before the loop.
4977
f4b189d5
JJ
49782015-09-09 Jakub Jelinek <jakub@redhat.com>
4979
0bb99c11
JJ
4980 PR c/67501
4981 * c-parser.c (c_parser_oacc_all_clauses,
4982 c_parser_omp_all_clauses): Remove invalid clause from
4983 list of clauses even if parser->error is set.
4984
fce5e5e3
JJ
4985 PR c/67500
4986 * c-parser.c (c_parser_omp_clause_aligned,
4987 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen): Fix up
4988 test for errors.
4989 * c-decl.c (temp_pop_parm_decls): Allow b->decl equal to
4990 error_mark_node.
4991
f4b189d5
JJ
4992 PR c/67495
4993 * c-parser.c (c_parser_omp_atomic): Use c_parser_cast_expression
4994 instead of c_parser_unary_expression. If the result is !lvalue_p,
4995 wrap the result of c_fully_fold into NON_LVALUE_EXPR.
4996
b2aaf235
MP
49972015-09-04 Marek Polacek <polacek@redhat.com>
4998
4999 PR sanitizer/67279
5000 * c-typeck.c (build_binary_op): Don't instrument static initializers.
5001
1807ffc1
MS
50022015-09-03 Martin Sebor <msebor@redhat.com>
5003
5004 PR c/66516
8b652e65
JJ
5005 * c-typeck.c (convert_arguments, parser_build_unary_op,
5006 build_conditional_expr, c_cast_expr, convert_for_assignment,
5007 build_binary_op, _objc_common_truthvalue_conversion): Call
1807ffc1
MS
5008 reject_gcc_builtin.
5009 (c_decl_implicit): Define.
5010
d04ff417
MP
50112015-09-02 Marek Polacek <polacek@redhat.com>
5012
5013 PR c/67432
5014 * c-parser.c (c_parser_enum_specifier): Give a better error for
5015 an empty enum.
5016
a79683d5
TS
50172015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
5018
5019 * c-aux-info.c, c-parser.c, c-tree.h: Remove useless typedefs.
5020
191a6b94
MP
50212015-08-12 Marek Polacek <polacek@redhat.com>
5022
5023 * c-decl.c (grokdeclarator): Call error_at instead of error and pass
5024 LOC to it.
5025
420a9d9b
MP
50262015-08-03 Marek Polacek <polacek@redhat.com>
5027
5028 PR c/67088
5029 * c-decl.c (check_bitfield_type_and_width): Add location parameter.
5030 Use it.
5031 (grokdeclarator): Pass LOC down to check_bitfield_type_and_width.
5032
992118a1
PP
50332015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
5034
5035 * c-parser.c (c_parser_if_body): Take token_indent_info
5036 argument. Call warn_for_misleading_indentation even when the
5037 body is a semicolon. Extract token_indent_infos corresponding
5038 to the guard, body and next tokens. Adjust call to
5039 warn_for_misleading_indentation accordingly.
5040 (c_parser_else_body): Likewise.
5041 (c_parser_if_statement): Likewise.
5042 (c_parser_while_statement): Likewise.
5043 (c_parser_for_statement): Likewise.
5044
46308474
LFSM
50452015-07-28 Luis Felipe Strano Moraes <luis.strano@gmail.com>
5046 Manuel López-Ibáñez <manu@gcc.gnu.org>
5047
5048 * c-decl.c (get_parm_info): Remove static var. Update warning
5049 message.
5050
05b28fd6
MP
50512015-07-27 Marek Polacek <polacek@redhat.com>
5052
5053 PR c++/66555
5054 PR c/54979
5055 * c-typeck.c (parser_build_binary_op): Call warn_tautological_cmp.
5056
451b5e48
MP
50572015-07-20 Marek Polacek <polacek@redhat.com>
5058
5059 PR c++/55095
5060 * c-typeck.c (digest_init): Pass OPT_Wpedantic to pedwarn_init.
5061 (build_binary_op): Warn about left shift overflows.
5062
1916bcb5
AM
50632015-07-09 Andrew MacLeod <amacleod@redhat.com>
5064
5065 * c-array-notation.c: Adjust includes for flags.h changes.
5066 * c-objc-common.c: Likewise.
5067
c7131fb2
AM
50682015-07-07 Andrew MacLeod <amacleod@redhat.com>
5069
5070 * c-array-notation.c: Adjust includes.
5071 * c-aux-info.c: Likewise.
5072 * c-convert.c: Likewise.
5073 * c-decl.c: Likewise.
5074 * c-errors.c: Likewise.
5075 * c-lang.c: Likewise.
5076 * c-objc-common.c: Likewise.
5077 * c-parser.c: Likewise.
5078 * c-typeck.c: Likewise.
5079
da2e71c9
MLI
50802015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
5081
5082 PR fortran/66605
5083 * c-decl.c (finish_function): Call do_warn_unused_parameter.
5084
b155cfd9
MP
50852015-06-29 Marek Polacek <polacek@redhat.com>
5086
5087 PR c/66322
5088 * c-typeck.c (struct c_switch): Add BOOL_COND_P and OUTSIDE_RANGE_P.
5089 (c_start_case): Set BOOL_COND_P and OUTSIDE_RANGE_P. Don't warn
5090 about -Wswitch-bool here.
5091 (do_case): Update c_add_case_label call.
5092 (c_finish_case): Update c_do_switch_warnings call.
5093
31521951
MP
50942015-06-27 Marek Polacek <polacek@redhat.com>
5095
5096 * c-typeck.c: Use VECTOR_TYPE_P throughout.
5097
22d03525
MP
50982015-06-26 Marek Polacek <polacek@redhat.com>
5099
5100 * c-array-notation.c (fix_builtin_array_notation_fn): Use
5101 INDIRECT_REF_P.
5102 * c-typeck.c (array_to_pointer_conversion): Likewise.
5103 (build_unary_op): Likewise.
5104 (c_finish_return): Likewise.
5105
f0889939
AM
51062015-06-25 Andrew MacLeod <amacleod@redhat.com>
5107
5108 * c-decl.c: Remove ipa-ref.h and plugin-api.h from include list.
5109 * c-parser.c: Likewise.
5110
8d67ee55
RS
51112015-06-25 Richard Sandiford <richard.sandiford@arm.com>
5112
5113 * c-decl.c (detect_field_duplicates_hash): Use nofree_ptr_hash
5114 instead of pointer_hash.
5115 (detect_field_duplicates): Likewise.
5116
0ae9bd27
MP
51172015-06-25 Marek Polacek <polacek@redhat.com>
5118
5119 * c-array-notation.c: Use VAR_P throughout.
5120 * c-decl.c: Likewise.
5121 * c-objc-common.c: Likewise.
5122 * c-parser.c: Likewise.
5123 * c-typeck.c: Likewise.
5124
62f9079a
MP
51252015-06-25 Marek Polacek <polacek@redhat.com>
5126
5127 * c-decl.c: Use is_global_var throughout.
5128 * c-parser.c: Likewise.
5129 * c-typeck.c: Likewise.
5130
abb226c9
AM
51312015-06-17 Andrew MacLeod <amacleod@redhat.com>
5132
5133 * c-array-notation.c: Do not include input.h, line-map.h or is-a.h.
5134 * c-aux-info.c: Likewise.
5135 * c-convert.c: Likewise.
5136 * c-decl.c: Likewise.
5137 * c-errors.c: Likewise.
5138 * c-lang.c: Likewise.
5139 * c-objc-common.c: Likewise.
5140 * c-parser.c: Likewise.
5141 * c-typeck.c: Likewise.
5142
8cbababc
JH
51432015-06-11 Jan Hubicka <hubicka@ucw.cz>
5144
5145 PR middle-end/66325
5146 * c-decl.c (start_enum): Set TYPE_PACKED consistently among type
5147 variants.
5148
a0349665
PMR
51492015-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
5150
5151 * c-decl.c (pop_scope): Register the main translation unit
5152 through the new debug hook.
5153
13fdf2e2
AM
51542015-06-08 Andrew MacLeod <amacleod@redhat.com>
5155
5156 * c-array-notation.c : Adjust include files.
5157 * c-aux-info.c : Likewise.
5158 * c-convert.c : Likewise.
5159 * c-decl.c : Likewise.
5160 * c-errors.c : Likewise.
5161 * c-lang.c : Likewise.
5162 * c-lang.h : Likewise.
5163 * c-objc-common.c : Likewise.
5164 * c-parser.c : Likewise.
5165 * c-typeck.c : Likewise.
5166
d7438551
AH
51672015-06-05 Aldy Hernandez <aldyh@redhat.com>
5168
5169 * c-decl.c (finish_struct): Save C_TYPE_INCOMPLETE_VARS and
5170 immediately clobber it.
5171 (c_write_global_declarations_1): Remove call to
5172 check_global_declaration_1.
5173 (c_write_global_declarations_2): Remove.
5174 (c_write_final_cleanups): Rename from c_write_global_declarations.
5175 Remove call to finalize_compilation_unit.
5176 Remove calls to debugging hooks.
5177 * c-objc-common.c: Adjust comment for c_warn_unused_global_decl.
5178 * c-objc-common.h: Remove LANG_HOOKS_WRITE_GLOBALS.
5179 * c-tree.h: Remove c_write_global_declarations.
5180
ecb9f223
AM
51812015-06-04 Andrew MacLeod <amacleod@redhat.com>
5182
5183 * c-array-notation.c: Adjust includes for restructured coretypes.h.
5184 * c-aux-info.c: Likewise.
5185 * c-convert.c: Likewise.
5186 * c-decl.c: Likewise.
5187 * c-errors.c: Likewise.
5188 * c-lang.c: Likewise.
5189 * c-objc-common.c: Likewise.
5190 * c-parser.c: Likewise.
5191 * c-typeck.c: Likewise.
5192
9482b620
MP
51932015-06-04 Marek Polacek <polacek@redhat.com>
5194
5195 PR c/66341
5196 * c-typeck.c (build_c_cast): Wrap VALUE into NON_LVALUE_EXPR if
5197 it is a lvalue.
5198
bc51ace3
PK
51992015-06-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
5200
5201 * c-decl.c (warn_cxx_compat_finish_struct): New parameters code, record_loc.
5202 Warn for empty struct.
5203 (finish_struct): Pass TREE_CODE(t) and loc to warn_cxx_compat_finish_struct.
5204
ea5b45b6
AT
52052015-06-02 Andres Tiraboschi <andres.tiraboschi@tallertechnologies.com>
5206
5207 * c-decl.c (start_function): Call plugin before parsing.
5208 (finish_function): Call plugin after parsing.
5209
c2d47482
PK
52102015-06-02 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
5211
5212 PR c/49551
5213 * c-decl.c (merge_decls): Merge DECL_COMMON.
5214
a95492ab
JW
52152015-05-22 Jim Wilson <jim.wilson@linaro.org>
5216
5217 * Make-lang.in (check_gcc_pallelize): Define.
5218
fd5c817a
MP
52192015-05-22 Marek Polacek <polacek@redhat.com>
5220
5221 PR c/47043
5222 * c-parser.c (c_parser_enum_specifier): Parse and apply enumerator
5223 attributes.
5224
c7b70a3c
MP
52252015-05-21 Marek Polacek <polacek@redhat.com>
5226
5227 * c-typeck.c (inform_declaration): Use DECL_IS_BUILTIN instead of
5228 DECL_BUILT_IN.
5229
21b634ae
MP
52302015-05-20 Marek Polacek <polacek@redhat.com>
5231
5232 * c-decl.c: Use VAR_OR_FUNCTION_DECL_P throughout.
5233 * c-typeck.c: Likewise.
5234
296a8c2f
MP
52352015-05-19 Marek Polacek <polacek@redhat.com>
5236
5237 * c-typeck.c (start_init): Use AGGREGATE_TYPE_P.
5238
41b37d5e
JJ
52392015-05-19 Jakub Jelinek <jakub@redhat.com>
5240
5241 PR middle-end/66199
5242 * c-parser.c (c_parser_omp_for_loop): Don't add
5243 OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
5244 OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
5245 (c_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
5246 constructs.
5247
fab27f52
MM
52482015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
5249
5250 * c-typeck.c (build_array_ref): Use std::swap instead of explicit
296a8c2f 5251 swaps.
fab27f52 5252
40de31cf
MLI
52532015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
5254
5255 PR fortran/44054
5256 * c-objc-common.c (c_tree_printer): Replace locus pointer with
5257 accessor function.
5258
3aa3c9fc
MP
52592015-05-14 Marek Polacek <polacek@redhat.com>
5260
5261 PR c/66066
5262 PR c/66127
5263 * c-typeck.c (digest_init): Call pedwarn_init with OPT_Wpedantic
5264 rather than with 0.
5265
c3388e62
DM
52662015-05-12 David Malcolm <dmalcolm@redhat.com>
5267
5268 * c-parser.c (c_parser_if_body): Add param "if_loc", use it
5269 to add a call to warn_for_misleading_indentation.
5270 (c_parser_else_body): Likewise, adding param "else_loc".
5271 (c_parser_if_statement): Check for misleading indentation.
5272 (c_parser_while_statement): Likewise.
5273 (c_parser_for_statement): Likewise.
5274
755e528f
MP
52752015-05-08 Marek Polacek <polacek@redhat.com>
5276
5277 PR c/64918
5278 * c-typeck.c (add_pending_init): Use OPT_Woverride_init_side_effects.
5279 (output_init_element): Likewise.
5280
0173bd2a
MP
52812015-05-07 Marek Polacek <polacek@redhat.com>
5282
5283 PR c/65179
5284 * c-typeck.c (build_binary_op): Warn when left shifting a negative
5285 value.
5286
9babc352
MP
52872015-04-30 Marek Polacek <polacek@redhat.com>
5288
5289 * c-typeck.c (set_init_label): Call error_at instead of error and
5290 pass LOC to it.
5291
ac9f18db
MP
5292 * c-typeck.c (c_incomplete_type_error): Refactor to use %qT. Print
5293 the type of a decl.
5294
ec3fba51
MP
5295 * c-typeck.c (c_build_va_arg): Clarify the error message.
5296
b811915d
TS
52972015-04-29 Thomas Schwinge <thomas@codesourcery.com>
5298
5299 * c-parser.c (c_parser_oacc_enter_exit_data): Use
5300 OMP_STANDALONE_CLAUSES.
5301
f3075008
MP
53022015-04-28 Marek Polacek <polacek@redhat.com>
5303
5304 * c-parser.c (c_parser_binary_expression): Remove duplicate line.
5305
4e81b788
MP
53062015-04-28 Marek Polacek <polacek@redhat.com>
5307
5308 PR c/65901
5309 * c-typeck.c (c_build_va_arg): Require TYPE be a complete type.
5310
6c1db78e
MP
53112015-04-25 Marek Polacek <polacek@redhat.com>
5312
5313 PR c/52085
5314 * c-decl.c (finish_enum): Copy over TYPE_ALIGN. Also check for "mode"
5315 attribute.
5316
5c4abbb8
MP
53172015-04-23 Marek Polacek <polacek@redhat.com>
5318
5319 PR c/65345
5320 * c-decl.c (set_labels_context_r): New function.
5321 (store_parm_decls): Call it via walk_tree_without_duplicates.
5322 * c-typeck.c (convert_lvalue_to_rvalue): Use create_tmp_var_raw
5323 instead of create_tmp_var. Build TARGET_EXPR instead of
5324 COMPOUND_EXPR.
5325 (build_atomic_assign): Use create_tmp_var_raw instead of
5326 create_tmp_var. Build TARGET_EXPRs instead of MODIFY_EXPR.
5327
06aca1d5
IV
53282015-04-20 Ilya Verbin <ilya.verbin@intel.com>
5329
5330 * c-parser.c (c_parser_oacc_enter_exit_data): Remove excess semicolon.
5331 (c_parser_omp_target_update): Add missed %> to error_at ().
5332
8fba1830
BRF
53332015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
5334
5335 PR target/55143
5336 * c-decl.c (c_default_pointer_mode): Remove definition.
5337 * c-tree.h (c_default_pointer_mode): Remove declaration.
5338
62021f64
TB
53392015-03-27 Tobias Burnus <burnus@net-b.de>
5340
5341 PR c/65586
5342 * c-parser.c (c_parser_skip_to_pragma_eol): Optionally, don't
5343 error out.
5344 (c_parser_omp_for, c_parser_omp_parallel, c_parser_omp_distribute,
5345 c_parser_omp_teams, c_parser_omp_target, c_parser_omp_declare):
5346 Update calls to not error for skipped omp pragmas with -fopenmp-simd.
5347
9b65e171
JJ
53482015-03-19 Jakub Jelinek <jakub@redhat.com>
5349
5350 * c-decl.c (c_decl_attributes): Also add "omp declare target"
5351 attribute for DECL_EXTERNAL VAR_DECLs.
5352
17958621
JJ
53532015-03-11 Jakub Jelinek <jakub@redhat.com>
5354
5355 * c-parser.c (c_parse_init): Don't call xstrdup on get_identifier
5356 argument.
5357
7ccb1a11
JJ
53582015-03-10 Jakub Jelinek <jakub@redhat.com>
5359
5360 PR c/65120
5361 * c-typeck.c (parser_build_binary_op): Check for tcc_comparison
5362 before preparing arguments to warn_logical_not_parentheses.
5363
01177669
JJ
53642015-03-09 Jakub Jelinek <jakub@redhat.com>
5365
5366 PR c/65120
5367 * c-typeck.c (parser_build_binary_op): Don't warn for
5368 !!x == y or !b == y where b is _Bool.
5369
802ac282
MP
53702015-03-09 Marek Polacek <polacek@redhat.com>
5371
5372 * c-convert.c (convert): Make use of do_ubsan_in_current_function.
5373 * c-decl.c (grokdeclarator): Likewise.
5374 * c-typeck.c (build_binary_op): Likewise.
5375
e5165b60
MP
53762015-02-27 Marek Polacek <polacek@redhat.com>
5377
5378 PR c/65228
5379 * c-decl.c (start_decl): Return NULL_TREE if decl is an error node.
5380
065d214c
MP
53812015-02-14 Marek Polacek <polacek@redhat.com>
5382
5383 PR c/64768
5384 * c-decl.c (grokdeclarator): Set the range of a flexible array member
5385 declared through a typedef name.
5386
e5d9235b
MP
53872015-02-13 Marek Polacek <polacek@redhat.com>
5388
5389 PR c/65050
5390 * c-decl.c (grokdeclarator): Print also the type when giving
5391 the error message about array's incomplete element type.
5392
fa01ffcc
JJ
53932015-02-11 Jakub Jelinek <jakub@redhat.com>
5394
5395 PR c/64824
5396 * c-parser.c (c_parser_binary_expression): Fix OpenMP stack[sp].prec
5397 check in the POP macro.
5398
c3e38a03
MP
53992015-02-09 Marek Polacek <polacek@redhat.com>
5400
5401 PR c/64856
5402 * c-typeck.c (process_init_element): Don't always wrap
5403 COMPOUND_LITERAL_EXPR in a SAVE_EXPR in C99 mode when
5404 initializing a range of elements.
5405
4886ec8e
JJ
54062015-02-04 Jakub Jelinek <jakub@redhat.com>
5407
5408 PR c/64824
5409 PR c/64868
5410 * c-parser.c (c_parser_omp_atomic): Handle RDIV_EXPR.
5411
c3e38a03 54122015-02-02 Bruno Loff <bruno.loff@gmail.com>
a4bb6959
BL
5413
5414 * c-parser.c (c_parser_declspecs): Call invoke_plugin_callbacks after
5415 processing enum declaration.
5416
7b33f0c8
MP
54172015-01-29 Marek Polacek <polacek@redhat.com>
5418
5419 PR c/64709
5420 * c-typeck.c (pop_init_level): If constructor_elements has
5421 exactly one element with integer_zerop value, set constructor_zeroinit
5422 to 1. Remove braces around warning_init call.
5423
dea63e49
JJ
54242015-01-27 Jakub Jelinek <jakub@redhat.com>
5425
5426 PR c/64766
5427 * c-typeck.c (store_init_value): Don't overwrite DECL_INITIAL
5428 of FUNCTION_DECLs with error_mark_node.
5429
d38f7dce
JJ
54302015-01-26 Jakub Jelinek <jakub@redhat.com>
5431
5432 PR c/64778
5433 * c-typeck.c (convert_arguments): Return -1 if there are
5434 error_args, even if we've diagnosed too many arguments.
5435
cbf5d0e7
RB
54362015-01-21 Richard Biener <rguenther@suse.de>
5437
5438 PR middle-end/64313
5439 * c-decl.c (merge_decls): Call set_builtin_decl_declared_p
5440 for builtins the user declared correctly.
5441
41dbbb37
TS
54422015-01-15 Thomas Schwinge <thomas@codesourcery.com>
5443 Bernd Schmidt <bernds@codesourcery.com>
5444 Cesar Philippidis <cesar@codesourcery.com>
5445 James Norris <jnorris@codesourcery.com>
5446 Jakub Jelinek <jakub@redhat.com>
5447 Ilmir Usmanov <i.usmanov@samsung.com>
5448
5449 * c-parser.c: Include "gomp-constants.h".
5450 (c_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
5451 omp_clause_map_kind. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
5452 Use OMP_CLAUSE_SET_MAP_KIND.
5453 (c_parser_pragma): Handle PRAGMA_OACC_ENTER_DATA,
5454 PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_UPDATE.
5455 (c_parser_omp_construct): Handle PRAGMA_OACC_CACHE,
5456 PRAGMA_OACC_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP,
5457 PRAGMA_OACC_PARALLEL, PRAGMA_OACC_WAIT.
5458 (c_parser_omp_clause_name): Handle "auto", "async", "copy",
5459 "copyout", "create", "delete", "deviceptr", "gang", "host",
5460 "num_gangs", "num_workers", "present", "present_or_copy", "pcopy",
5461 "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
5462 "present_or_create", "pcreate", "seq", "self", "vector",
5463 "vector_length", "wait", "worker".
5464 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
5465 (OACC_ENTER_DATA_CLAUSE_MASK, OACC_EXIT_DATA_CLAUSE_MASK)
5466 (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
5467 (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
5468 (c_parser_omp_variable_list): Handle OMP_CLAUSE__CACHE_.
5469 (c_parser_oacc_wait_list, c_parser_oacc_data_clause)
5470 (c_parser_oacc_data_clause_deviceptr)
5471 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_workers)
5472 (c_parser_oacc_clause_async, c_parser_oacc_clause_wait)
5473 (c_parser_omp_clause_vector_length, c_parser_oacc_all_clauses)
5474 (c_parser_oacc_cache, c_parser_oacc_data, c_parser_oacc_kernels)
5475 (c_parser_oacc_enter_exit_data, c_parser_oacc_loop)
5476 (c_parser_oacc_parallel, c_parser_oacc_update)
5477 (c_parser_oacc_wait): New functions.
5478 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels)
5479 (c_finish_oacc_data): New prototypes.
5480 * c-typeck.c: Include "gomp-constants.h".
5481 (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR. Use
5482 GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use
5483 OMP_CLAUSE_SET_MAP_KIND.
5484 (c_finish_oacc_parallel, c_finish_oacc_kernels)
5485 (c_finish_oacc_data): New functions.
5486 (c_finish_omp_clauses): Handle OMP_CLAUSE__CACHE_,
5487 OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS,
5488 OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_ASYNC, OMP_CLAUSE_WAIT,
5489 OMP_CLAUSE_AUTO, OMP_CLAUSE_SEQ, OMP_CLAUSE_GANG,
5490 OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR, and OMP_CLAUSE_MAP's
5491 GOMP_MAP_FORCE_DEVICEPTR.
5492
adfac8df
JJ
54932015-01-09 Michael Collison <michael.collison@linaro.org>
5494
5495 * c-array-notation.c: Include hash-set.h, machmode.h,
5496 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
5497 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
5498 * c-aux-info.c: Ditto.
5499 * c-convert.c: Ditto.
5500 * c-decl.c: Ditto.
5501 * c-errors.c: Ditto.
5502 * c-lang.c: Dittoxs.
5503 * c-objc-common.c: Ditto.
5504 * c-parser.c: Ditto.
5505 * c-typeck.c: Include hash-set.h, machmode.h,
5506 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
5507 fold-const.h, wide-int.h, inchash.h, real.h and
5508 fixed-value.h due to flattening of tree.h.
5509
2cc901dc
MP
55102015-01-07 Marek Polacek <polacek@redhat.com>
5511
5512 PR c/64417
5513 * c-typeck.c (process_init_element): Disallow initialization of
5514 a flexible array member with a string constant if the structure
5515 is in an array.
5516
5624e564
JJ
55172015-01-05 Jakub Jelinek <jakub@redhat.com>
5518
e5341100
JJ
5519 PR sanitizer/64344
5520 * c-typeck.c (convert_for_assignment, c_finish_return): For
5521 -fsanitize=float-cast-overflow casts from REAL_TYPE to integer/enum
5522 types also set in_late_binary_op around convert call.
5523 * c-convert.c (convert): For -fsanitize=float-cast-overflow REAL_TYPE
5524 to integral type casts, if not in_late_binary_op, pass c_fully_fold
5525 result on expr as last argument to ubsan_instrument_float_cast,
5526 if in_late_binary_op, don't use c_save_expr but save_expr.
5527
5624e564
JJ
5528 Update copyright years.
5529
5bd012f8
MP
55302015-01-05 Marek Polacek <polacek@redhat.com>
5531
5532 PR c/64423
5533 * c-typeck.c (build_array_ref): Pass loc down to
5534 warn_array_subscript_with_type_char.
5535
3f8257db 55362014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
768952be
MU
5537
5538 * c-typeck.c: New behavious for pointers to arrays with qualifiers
8e745a17 5539 (common-pointer-type): For pointers to arrays take qualifiers from
768952be 5540 element type.
8e745a17 5541 (build_conditional_expr): Add warnings for lost qualifiers.
768952be 5542 (comp-target-types): Allow pointers to arrays with different qualifiers.
8e745a17 5543 (convert-for-assignment): Adapt warnings for discarded qualifiers. Add
768952be 5544 WARNING_FOR_QUALIFIERS macro and rename WARN_FOR_QUALIFIERS
8e745a17 5545 to PEDWARN_FOR_QUALIFIERS.
768952be 5546
8f94a8c4
JJ
55472014-12-17 Jakub Jelinek <jakub@redhat.com>
5548
5549 PR sanitizer/64289
5550 * c-convert.c: Include ubsan.h.
5551 (convert): For real -> integral casts and
5552 -fsanitize=float-cast-overflow don't call convert_to_integer, but
5553 instead instrument the float cast directly.
5554
b731b390
JJ
55552014-11-29 Jakub Jelinek <jakub@redhat.com>
5556
5557 * c-typeck.c (convert_lvalue_to_rvalue, build_atomic_assign,
5558 c_finish_stmt_expr): Remove NULL last argument from
5559 create_tmp_var_raw and create_tmp_var calls.
5560 * c-array-notation.c (fix_builtin_array_notation_fn,
5561 build_array_notation_expr, fix_conditional_array_notations_1,
5562 fix_array_notation_expr, fix_array_notation_call_expr): Likewise.
5563
541e35a6
MP
55642014-11-28 Marek Polacek <polacek@redhat.com>
5565
5566 PR c/63862
5567 * c-typeck.c (build_binary_op) <RSHIFT_EXPR, LSHIFT_EXPR>: Don't
5568 convert the right operand to integer type.
5569
b286be94
MP
55702014-11-25 Marek Polacek <polacek@redhat.com>
5571
5572 PR c/63877
5573 * c-decl.c (start_function): Disable -Wmissing-declarations warning
5574 for inline functions.
5575
aa7da51a
JJ
55762014-11-21 Jakub Jelinek <jakub@redhat.com>
5577
5578 PR target/63764
5579 * c-typeck.c (build_array_ref): Adjust
5580 convert_vector_to_pointer_for_subscript caller. If it returns true,
5581 call non_lvalue_loc on the result.
5582
d876207f
RB
55832014-11-11 Richard Biener <rguenther@suse.de>
5584
5585 * c-decl.c (c_init_decl_processing): Do not set pedantic_lvalues
5586 to true.
5587
e5e44252
AK
55882014-11-10 Andi Kleen <ak@linux.intel.com>
5589
5590 PR c/60804
5591 * c-parser.c (c_parser_statement_after_labels): Call
5592 check_no_cilk.
5593 (c_parser_if_statement): Dito.
5594 (c_parser_switch_statement): Dito.
5595 (c_parser_while_statement): Dito.
5596 (c_parser_do_statement): Dito.
5597 (c_parser_for_statement): Dito.
5598 * c-typeck.c (c_finish_loop): Dito.
5599
13c21655
PC
56002014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
5601
5602 * c-typeck.c (build_binary_op): Use OPT_Wshift_count_negative and
5603 OPT_Wshift_count_overflow in the warnings.
5604
2d51fcef
MP
56052014-10-30 Marek Polacek <polacek@redhat.com>
5606
5607 * c-objc-common.c (c_tree_printer) <case 'T'>: For a typedef name,
5608 print the stripped version as well, if they're not the same.
5609
ef4bddc2
RS
56102014-10-29 Richard Sandiford <richard.sandiford@arm.com>
5611
5612 * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from
5613 machine_mode.
5614
c582198b
AM
56152014-10-28 Andrew MacLeod <amacleod@redhat.com>
5616
5617 * c-decl.c: Adjust include files.
5618 * c-parser.c: Ditto.
5619
ddc8de03
PM
56202014-10-27 Phil Muldoon <pmuldoon@redhat.com>
5621 Tom Tromey <tromey@redhat.com>
5622
5623 * c-tree.h (enum c_oracle_request): New.
5624 (c_binding_oracle_function): New typedef.
5625 (c_binding_oracle, c_pushtag, c_bind): Declare.
5626 * c-decl.c (c_binding_oracle): New global.
5627 (I_SYMBOL_CHECKED): New macro.
5628 (i_symbol_binding): New function.
5629 (I_SYMBOL_BINDING, I_SYMBOL_DECL): Redefine.
5630 (I_TAG_CHECKED): New macro.
5631 (i_tag_binding): New function.
5632 (I_TAG_BINDING, I_TAG_DECL): Redefine.
5633 (I_LABEL_CHECKED): New macro.
5634 (i_label_binding): New function.
5635 (I_LABEL_BINDING, I_LABEL_DECL): Redefine.
5636 (c_print_identifier): Save and restore c_binding_oracle.
5637 (c_pushtag, c_bind): New functions.
5638
60393bbc
AM
56392014-10-27 Andrew MacLeod <amacleod@redhat.com>
5640
5641 * c-typeck.c: Adjust include files.
5642
d723bb7c
MLI
56432014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
5644
5645 PR c++/53061
5646 * c-objc-common.c (c_objc_common_init): Do not do diagnostics
5647 initialization here...
5648 (c_initialize_diagnostics): ... but here. Set defaults after
5649 building pretty-printer.
5650
1bc5a451
MP
56512014-10-23 Marek Polacek <polacek@redhat.com>
5652
5653 PR c/63626
5654 * c-decl.c (pop_scope): Don't print warning in external_scope.
5655
4435bb92
MP
56562014-10-19 Marek Polacek <polacek@redhat.com>
5657
5658 PR c/63567
5659 * c-typeck.c (output_init_element): Allow initializing objects with
5660 static storage duration with compound literals even in C99 and add
5661 pedwarn for it.
5662
7278465e
MP
56632014-10-17 Marek Polacek <polacek@redhat.com>
5664
5665 PR c/63567
5666 * c-typeck.c (digest_init): Allow initializing objects with static
5667 storage duration with compound literals even in C99 and add pedwarn
5668 for it.
5669
d9b7be2e
MP
56702014-10-17 Marek Polacek <polacek@redhat.com>
5671
5672 PR c/63543
5673 * c-tree.h (C_TYPE_ERROR_REPORTED): Define.
5674 * c-typeck.c (build_indirect_ref): Don't print the "dereferencing..."
5675 error multiple times. Print the type.
5676
f406ae1f
MP
56772014-10-17 Marek Polacek <polacek@redhat.com>
5678
5679 PR c/63549
5680 * c-typeck.c (build_array_ref): Bail if the index in an incomplete
5681 type.
5682
92574c7c
MP
56832014-10-17 Marek Polacek <polacek@redhat.com>
5684
5685 * c-decl.c (grokdeclarator): Use OPT_Wimplicit_int unconditionally.
5686 (start_function): Use OPT_Wimplicit_int instead of 0.
5687 (store_parm_decls_oldstyle): Likewise.
5688
1bc4a978
MT
56892014-10-17 Alan Modra <amodra@gmail.com>
5690
5691 PR middle-end/61848
5692 * c-decl.c (merge_decls): Don't merge section name or tls model
5693 to newdecl symtab node, instead merge to olddecl. Override
5694 existing olddecl section name. Set tls_model for all thread-local
5695 vars, not just OMP thread-private ones. Remove incorrect comment.
5696
83685514
AM
56972014-10-16 Andrew MacLeod <amacleod@redhat.com>
5698
5699 * c-decl.c: Adjust include files.
5700
78a7c317
DD
57012014-10-14 DJ Delorie <dj@redhat.com>
5702
5703 * c-parser.c (c_parse_init): Add RID entries for each __intN.
5704 (c_token_starts_typename): Check all __intN, not just __int128.
5705 (c_token_starts_declspecs): Likewise.
5706 (c_parser_declspecs): Likewise.
5707 (c_parser_attribute_any_word): Likewise.
5708 (c_parser_objc_selector): Likewise.
5709 * c-tree.h (c_typespec_keyword): cts_int128 -> cts_int_n.
5710 (struct c_declspecs): Add int_n_idx field to record *which* __intN
5711 is specified.
5712 * c-decl.c (declspecs_add_type): Check for all __intN, not just
5713 __int128.
5714 (finish_declspecs): Likewise.
5715
74d98c1e
AB
57162014-10-13 Anthony Brandon <anthony.brandon@gmail.com>
5717
8e745a17 5718 * c-parser.c (c_parser_all_labels): New function to replace
74d98c1e 5719 the duplicate code.
8e745a17 5720 (c_parser_statement): Call the new function.
74d98c1e 5721
84937de2
MP
57222014-10-09 Marek Polacek <polacek@redhat.com>
5723
5724 PR c/63480
5725 * c-typeck.c (pop_init_level): Don't warn about initializing
5726 with { }.
5727
0382aaa0
MP
57282014-10-07 Marek Polacek <polacek@redhat.com>
5729
5730 PR c/59717
5731 * c-decl.c (header_for_builtin_fn): New function.
5732 (implicitly_declare): Suggest which header to include.
5733
7a0ca710
MP
57342014-10-07 Marek Polacek <polacek@redhat.com>
5735
5736 * c-convert.c (convert): Use error_operand_p.
5737 * c-typeck.c (require_complete_type): Likewise.
5738 (really_atomic_lvalue): Likewise.
5739 (digest_init): Likewise.
5740 (handle_omp_array_sections_1): Likewise.
5741
6bc8a126
MP
57422014-10-03 Marek Polacek <polacek@redhat.com>
5743
5744 PR c/63453
5745 * c-decl.c (pop_scope): Don't warn about "inline function declared
5746 but never defined" for functions marked with gnu_inline attribute.
5747
d90c0a59
JJ
57482014-09-25 Jakub Jelinek <jakub@redhat.com>
5749
5750 PR c++/63249
5751 * c-parser.c (c_parser_omp_variable_list): Call mark_exp_read
5752 on low_bound and length.
5753
083e891e
MP
57542014-09-24 Marek Polacek <polacek@redhat.com>
5755
5756 PR c/61405
5757 PR c/53874
5758 * c-parser.c: Don't define CPP_KEYWORD.
5759 (c_parser_switch_statement): Pass original type to c_finish_case.
5760 * c-tree.h (c_finish_case): Update declaration.
5761 * c-typeck.c (c_finish_case): Add TYPE parameter. Pass it
5762 conditionally to c_do_switch_warnings.
5763
8d95fe25
MP
57642014-09-03 Marek Polacek <polacek@redhat.com>
5765
5766 PR c/62024
5767 * c-parser.c (c_parser_static_assert_declaration_no_semi): Strip no-op
5768 conversions.
5769
9a771876
JJ
57702014-09-02 Jakub Jelinek <jakub@redhat.com>
5771 Balaji V. Iyer <balaji.v.iyer@intel.com>
5772 Igor Zamyatin <igor.zamyatin@intel.com>
5773
5774 * c-parser.c (c_parser_cilk_for): New function.
5775 (c_parser_cilk_grainsize): Likewise.
5776 (c_get_temp_regvar): Likewise.
5777 (c_parser_statement_after_labels): Added RID_CILK_FOR case.
5778 (c_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
5779 (c_parser_omp_for_loop): Added CILK_FOR and CILK_SIMD checks.
5780 * c-typeck.c (c_finish_omp_clauses): Added OMP_CLAUSE__CILK_FOR_COUNT_
5781 case.
5782
b7679d96
CG
57832014-08-27 Chen Gang <gang.chen.5i5j@gmail.com>
5784
5785 * c-aux-info.c (gen_type): Resize 'buff' from 10 to 23 bytes,
5786 with using HOST_WIDE_INT without truncation to 'int'
5787
59ea0364
MP
57882014-08-22 Marek Polacek <polacek@redhat.com>
5789
5790 PR c++/62199
5791 * c-typeck.c (parser_build_binary_op): Adjust call to
5792 warn_logical_not_parentheses.
5793
671a475e
IZ
57942014-08-22 Igor Zamyatin <igor.zamyatin@intel.com>
5795
5796 PR other/62008
5797 * c-parser.c (c_parser_array_notation): Check for correct
5798 type of an array added.
5799
04159acf
MP
58002014-08-19 Marek Polacek <polacek@redhat.com>
5801
5802 PR c++/62153
5803 * c-typeck.c (build_binary_op): If either operand of a comparison
5804 is a boolean expression, call maybe_warn_bool_compare.
5805
c77935ee
PP
58062014-08-19 Patrick Palka <ppalka@gcc.gnu.org>
5807
5808 PR c/45584
5809 * c-typeck.c (build_c_cast): Do a conversion even when the
5810 TYPE_MAIN_VARIANTs are the same.
5811
35aff4fb
MP
58122014-08-19 Marek Polacek <polacek@redhat.com>
5813
5814 * c-decl.c (diagnose_mismatched_decls): Unconditionally call
5815 pedwarn_c99 instead of pedwarn.
5816 (grokfield): Likewise.
5817 (warn_defaults_to): New function.
5818 (grokdeclarator): Call warn_defaults_to instead of pedwarn_c99.
5819 Unconditionally call pedwarn_c99 instead of pedwarn.
5820 (start_function): Call warn_defaults_to instead of pedwarn_c99.
5821 (declspecs_add_scspec): Call pedwarn_c99 instead of pedwarn, don't
5822 check flag_isoc11 before.
5823 * c-errors.c (pedwarn_c99): Change the return type to bool.
5824 Handle -Wc99-c11-compat.
5825 * c-parser.c (disable_extension_diagnostics): Handle
5826 warn_c99_c11_compat.
5827 (restore_extension_diagnostics): Likewise.
5828 (c_parser_static_assert_declaration_no_semi): Call pedwarn_c99
5829 instead of pedwarn, don't check flag_isoc11 before.
5830 (c_parser_declspecs): Likewise.
5831 (c_parser_alignas_specifier): Likewise.
5832 (c_parser_alignof_expression): Likewise.
5833 (c_parser_generic_selection): Likewise.
5834 * c-tree.h (pedwarn_c99): Update declaration.
5835 * c-typeck.c (c_finish_return): Call pedwarn or warning_at instead
5836 of pedwarn_c99.
5837
177cce46
MP
58382014-08-19 Marek Polacek <polacek@redhat.com>
5839
5840 * c-decl.c (warn_variable_length_array): Pass OPT_Wvla unconditionally
5841 to pedwarn_c90.
5842 * c-errors.c: Include "opts.h".
5843 (pedwarn_c90): Rewrite to handle -Wno-c90-c99-compat better.
5844 * c-parser.c (disable_extension_diagnostics): Handle negative value
5845 of warn_c90_c99_compat, too.
5846 (restore_extension_diagnostics): Likewise.
5847 (c_parser_compound_statement_nostart): Pass
5848 OPT_Wdeclaration_after_statement unconditionally to pedwarn_c90.
5849
6dc99c33
MP
58502014-08-12 Marek Polacek <polacek@redhat.com>
5851
5852 * c-parser.c (c_parser_postfix_expression) <case RID_FUNCTION_NAME>:
5853 Add pedwarn.
5854 (c_parser_postfix_expression) <case RID_PRETTY_FUNCTION_NAME>:
5855 Likewise.
5856 (c_parser_postfix_expression) <case RID_C99_FUNCTION_NAME>: Likewise.
5857
3f8257db 58582014-08-10 Marek Polacek <polacek@redhat.com>
f3bede71
MP
5859
5860 PR c/51849
5861 * c-decl.c (build_array_declarator): Remove check for !flag_isoc99.
5862 Call pedwarn_c90 instead of pedwarn.
5863 (check_bitfield_type_and_width): Likewise.
5864 (declspecs_add_qual): Likewise.
5865 (declspecs_add_type): Likewise.
5866 (warn_variable_length_array): Unify function for -pedantic and -Wvla.
5867 Adjust to only call pedwarn_c90.
5868 (grokdeclarator): Remove pedantic && !flag_isoc99 check. Call
5869 pedwarn_c90 instead of pedwarn.
5870 * c-errors.c (pedwarn_c90): Handle -Wc90-c99-compat.
5871 * c-parser.c (disable_extension_diagnostics): Handle
5872 warn_c90_c99_compat.
5873 (restore_extension_diagnostics): Likewise.
5874 (c_parser_enum_specifier): Remove check for !flag_isoc99. Call
5875 pedwarn_c90 instead of pedwarn.
5876 (c_parser_initelt): Likewise.
5877 (c_parser_postfix_expression): Likewise.
5878 (c_parser_postfix_expression_after_paren_type): Likewise.
5879 (c_parser_compound_statement_nostart): Remove check for !flag_isoc99.
5880 * c-tree.h: Fix formatting.
5881 * c-typeck.c (build_array_ref): Remove check for !flag_isoc99. Call
5882 pedwarn_c90 instead of pedwarn.
5883
9f25a338
TS
58842014-08-07 Trevor Saunders <tsaunders@mozilla.com>
5885
5886 * c-typeck.c: Remove include of pointer-set.h.
5887
044331a8
MP
58882014-08-07 Marek Polacek <polacek@redhat.com>
5889
5890 * c-typeck.c (pointer_diff): Remove P - (P + CST) optimization.
5891
b787e7a2
TS
58922014-08-02 Trevor Saunders <tsaunders@mozilla.com>
5893
5894 * c-typeck.c: Use hash_map instead of pointer_map.
5895
6e2830c3
TS
58962014-08-02 Trevor Saunders <tsaunders@mozilla.com>
5897
5898 * c-decl.c: Use hash_set instead of pointer_set.
5899
a7ee52fb
IZ
59002014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
5901
5902 PR middle-end/61455
5903 * c-array-notation.c (expand_array_notations): Handling
5904 of DECL_EXPR added.
5905
b4dfdc11
MG
59062014-07-31 Marc Glisse <marc.glisse@inria.fr>
5907
5908 PR c++/60517
5909 * c-typeck.c (c_finish_return): Return 0 instead of the address of
5910 a local variable.
5911
976d5a22
TT
59122014-07-30 Tom Tromey <tromey@redhat.com>
5913
5914 * c-typeck.c (struct constructor_stack) <designator_depth>: New
5915 field.
5916 (really_start_incremental_init, push_init_level): Initialize
5917 designator_depth.
5918 (pop_init_level): Set global designator_depth.
5919 (process_init_element): Check for designated_init attribute.
5920
30281de2
MP
59212014-07-20 Marek Polacek <polacek@redhat.com>
5922
5923 PR c/61852
5924 * c-decl.c (implicit_decl_warning): Add location_t parameter. Use it.
5925 (implicitly_declare): Pass location to implicit_decl_warning.
5926
b108f48f
JJ
59272014-07-14 Jakub Jelinek <jakub@redhat.com>
5928
5929 PR middle-end/61294
5930 * c-parser.c (c_parser_expr_list): Add new argument literal_zero_mask.
5931 If non-NULL, call c_parser_check_literal_zero.
5932 (c_parser_check_literal_zero): New function.
5933 (c_parser_postfix_expression_after_primary): Adjust
5934 c_parser_expr_list caller, handle -Wmemset-transposed-args.
5935
773ec47f
MP
59362014-07-06 Marek Polacek <polacek@redhat.com>
5937
5938 PR c/6940
5939 * c-decl.c (grokdeclarator): Set C_ARRAY_PARAMETER.
5940 * c-tree.h (C_ARRAY_PARAMETER): Define.
5941 * c-typeck.c (c_expr_sizeof_expr): Warn when using sizeof on an array
5942 function parameter.
5943
22e1cf1c 59442014-07-02 Jan Hubicka <hubicka@ucw.cz>
3f8257db 5945 Chen Gang <gang.chen.5i5j@gmail.com>
22e1cf1c
JH
5946
5947 * c-decl.c (duplicate_decls): CLear DECL_STRUCT_FUNCTION before
5948 releasing symbol.
5949
52ec0ea3
MP
59502014-07-01 Marek Polacek <polacek@redhat.com>
5951
5952 * c-typeck.c (convert_for_assignment): Pass OPT_Wint_conversion
5953 instead of 0 to WARN_FOR_ASSIGNMENT.
5954
d5c3d343
MP
59552014-07-01 Marek Polacek <polacek@redhat.com>
5956
5957 PR c/58286
5958 * c-typeck.c (convert_for_assignment): Pass
5959 OPT_Wincompatible_pointer_types instead of 0 to WARN_FOR_ASSIGNMENT.
5960
6a7253a4
MP
59612014-06-30 Marek Polacek <polacek@redhat.com>
5962
5963 * c-decl.c (grokdeclarator): Don't instrument VLAs if the function
5964 has no_sanitize_undefined attribute.
5965
5e88a8f4
IZ
59662014-06-30 Igor Zamyatin <igor.zamyatin@intel.com>
5967
5968 PR middle-end/57541
5969 * c-array-notation.c (fix_builtin_array_notation_fn):
5970 Check for 0 arguments in builtin call. Check that bultin argument is
5971 correct.
5972 * c-parser.c (c_parser_array_notation): Check for incorrect initial
5973 index.
5974
9698b078
SH
59752014-06-27 Sebastian Huber <sebastian.huber@embedded-brains.de>
5976
5977 * c-parser.c (c_parser_declaration_or_fndef): Discard all type
5978 qualifiers in __auto_type for atomic types.
5979 (c_parser_typeof_specifier): Discard all type qualifiers in
5980 __typeof__ for atomic types.
5981
6e07c515
MP
59822014-06-25 Marek Polacek <polacek@redhat.com>
5983
5984 PR c/61162
5985 * c-parser.c (c_parser_statement_after_labels): Pass the location of
5986 the return expression to c_finish_return.
5987
da6f124d
JJ
59882014-06-25 Jakub Jelinek <jakub@redhat.com>
5989
5990 * c-typeck.c (c_finish_omp_clauses): Make sure
5991 OMP_CLAUSE_LINEAR_STEP has correct type.
5992
c203e8a7
TS
59932014-06-24 Trevor Saunders <tsaunders@mozilla.com>
5994
5995 * c-decl.c: Adjust.
5996
56ad0e38
JJ
59972014-06-24 Jakub Jelinek <jakub@redhat.com>
5998
5999 * c-parser.c (c_parser_omp_for_loop): For
6000 #pragma omp parallel for simd move lastprivate clause from parallel
6001 to for rather than simd.
6002
47c2554f
MP
60032014-06-23 Marek Polacek <polacek@redhat.com>
6004
6005 * c-typeck.c (parser_build_binary_op): Don't call
6006 warn_logical_not_parentheses if the RHS is TRUTH_NOT_EXPR.
6007
56363ffd
JH
60082014-06-15 Jan Hubicka <hubicka@ucw.cz>
6009
6010 * c-parser.c (c_parser_omp_threadprivate): Likewise.
6011 * c-decl.c (merge_decls): Likewise.
6012
d7ff7ae5
MP
60132014-06-09 Marek Polacek <polacek@redhat.com>
6014
6015 PR c/36446
6016 * c-typeck.c (error_init): Call inform instead of error_at.
6017 (pedwarn_init): Call inform instead of pedwarn.
6018 (warning_init): Call inform instead of warning_at.
6019
24d047a3
JH
60202014-06-07 Jan Hubicka <hubicka@ucw.cz>
6021
6022 * c-decl.c (merge_decls): Use set_decl_section_name.
6023 (duplicate_decls): Remove node if it exists.
6024
9bac5cbb
G
60252014-06-05 S. Gilles <sgilles@terpmail.umd.edu>
6026
6027 PR c/53119
6028 * c-typeck.c (push_init_level, process_init_element,
6029 pop_init_level): Correct check for zero initialization, move
6030 missing brace warning to respect zero initialization.
6031
8ffcdea8
MP
60322014-06-05 Marek Polacek <polacek@redhat.com>
6033
6034 PR c/56724
6035 * c-typeck.c (convert_for_assignment): Use expr_loc for ic_argpass.
6036
742938c9
MP
60372014-06-05 Marek Polacek <polacek@redhat.com>
6038
6039 PR c/49706
6040 * c-typeck.c (parser_build_binary_op): Warn when logical not is used
ab20d992 6041 on the left hand side operand of a comparison.
742938c9 6042
6447c55d
MP
60432014-06-05 Marek Polacek <polacek@redhat.com>
6044
6045 PR c/48062
6046 * c-decl.c (warn_if_shadowing): Call inform instead of warning_at.
6047 Print note only if the warning was printed.
6048
9dc7743c
IZ
60492014-06-04 Igor Zamyatin <igor.zamyatin@intel.com>
6050
6051 PR c/58942
6052 * c-array-notation.c (fix_builtin_array_notation_fn): Handle the case
6053 with a pointer.
6054
fedfecef
MP
60552014-06-03 Marek Polacek <polacek@redhat.com>
6056
6057 PR c/60439
6058 * c-parser.c (c_parser_switch_statement): Pass explicit_cast_p to
6059 c_start_case.
6060 * c-tree.h (c_start_case): Update.
6061 * c-typeck.c (c_start_case): Add new boolean parameter. Warn if
6062 switch condition has boolean value.
6063
9b2b7279
AM
60642014-06-02 Andrew MacLeod <amacleod@redhat.com>
6065
6066 * c-decl.c: Include builtins.h.
6067 * c-parser.c: Likewise.
6068
5c1bc275
MP
60692014-05-27 Marek Polacek <polacek@redhat.com>
6070
6071 PR c/56724
6072 * c-typeck.c (convert_arguments): Get location of a parameter. Change
6073 error and warning calls to error_at and warning_at. Pass location of
6074 a parameter to it. Call warning_at with OPT_Wtraditional_conversion.
6075 (convert_for_assignment): Add parameter to WARN_FOR_ASSIGNMENT and
6076 WARN_FOR_QUALIFIERS. Pass expr_loc to those.
6077
97563bc8
IZ
60782014-05-26 Igor Zamyatin <igor.zamyatin@intel.com>
6079
6080 PR c/61191
6081 * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid
6082 function parameters.
6083
aede2c10
JH
60842014-05-23 Jan Hubicka <hubicka@ucw.cz>
6085
6086 * c-decl.c (merge_decls): Preserve symtab node pointers.
6087 (duplicate_decls): Free new decl.
6088
edbba2ce
TS
60892014-05-23 Thomas Schwinge <thomas@codesourcery.com>
6090
f3316c6d
TS
6091 * c-typeck.c (c_finish_omp_clauses): Remove duplicated variable
6092 initialization.
6093
edbba2ce
TS
6094 * c-parser.c (c_parser_omp_target): Return bool values.
6095
68c81f24
TS
60962014-05-22 Thomas Schwinge <thomas@codesourcery.com>
6097
6098 * c-parser.c (c_parser_omp_clause_thread_limit): Rename
6099 num_teams_loc variable to num_thread_limit_loc.
6100
632f2871
RS
61012014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
6102
6103 * c-array-notation.c (expand_array_notations): Use void_node
6104 instead of void_zero_node.
6105
766090c2
TS
61062014-05-17 Trevor Saunders <tsaunders@mozilla.com>
6107
6108 * c-decl.c (finish_struct): Adjust.
6109 (finish_enum): Likewise.
6110 (bind): Adjust.
6111 (record_inline_static): Likewise.
6112 (push_scope): Likewise.
6113 (make_label): Likewise.
6114 (lookup_label_for_goto): Likewise.
6115 (finish_struct): Likewise.
6116 (finish_enum): Likewise.
6117 (store_parm_decls): Likewise.
6118 (c_push_function_context): Likewise.
6119 * c-lang.h: Remove usage of variable_size gty attribute.
6120 * c-parser.c (c_parse_init): Adjust.
6121 (c_parse_file): Likewise.
6122
2b107f6b
MP
61232014-05-13 Marek Polacek <polacek@redhat.com>
6124
6125 PR c/61162
6126 * c-typeck.c (convert_for_assignment): Pass location to
6127 WARN_FOR_ASSIGNMENT instead of input_location.
6128
d033409e
MP
61292014-05-10 Marek Polacek <polacek@redhat.com>
6130
6131 * c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
6132 maybe_warn_string_init.
6133 (c_parser_postfix_expression_after_paren_type): Pass type_loc to
6134 maybe_warn_string_init.
6135 * c-tree.h (maybe_warn_string_init): Update declaration.
6136 * c-typeck.c (maybe_warn_string_init): Add location parameter.
6137 Call pedwarn_init with loc instead of with input_location.
6138 (digest_init): Pass init_loc to maybe_warn_string_init.
6139 (pop_init_level): Call pedwarn_init with loc instead of with
6140 input_location.
6141 (set_init_index): Likewise.
6142 (process_init_element): Likewise.
6143
ea58ef42
MP
61442014-05-09 Marek Polacek <polacek@redhat.com>
6145
6146 PR c/61096
6147 * c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level.
6148 (c_parser_initelt): Pass location to set_init_label. Pass array index
6149 location to set_init_index.
6150 * c-tree.h (push_init_level): Update declaration.
6151 (pop_init_level): Likewise.
6152 (set_init_index): Likewise.
6153 (set_init_label): Likewise.
6154 * c-typeck.c (error_init): Add location parameter. Call error_at
6155 instead of error.
6156 (digest_init): Pass init_loc to error_init.
6157 (really_start_incremental_init):
6158 (push_init_level): Add location parameter. Pass loc to pop_init_level
6159 and error_init.
6160 (pop_init_level): Likewise.
6161 (set_designator): Add location parameter. Pass loc to pop_init_level,
6162 push_init_level, and error_init.
6163 (set_init_index): Add location parameter. Pass loc to error_init and
6164 set_designator.
6165 (set_init_label): Likewise.
6166 (output_init_element): Pass loc to error_init.
6167 (process_init_element): Pass loc to error_init, pop_init_level,
6168 pedwarn_init, and push_init_level.
6169
661a0813
MP
61702014-05-09 Marek Polacek <polacek@redhat.com>
6171
6172 PR c/50459
6173 * c-parser.c (c_parser_attributes): Parse the arguments as an
6174 expression-list if the attribute takes identifier.
6175
2793eeab
MP
61762014-05-08 Marek Polacek <polacek@redhat.com>
6177
6178 PR c/61053
6179 * c-decl.c (grokdeclarator): Use min_align_of_type instead of
6180 TYPE_ALIGN_UNIT.
6181
f827930a
MP
61822014-05-08 Marek Polacek <polacek@redhat.com>
6183
6184 PR c/61077
6185 * c-decl.c (start_function): Warn for _Atomic-qualified return type
6186 of main.
6187
1d60af08
KZ
61882014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
6189 Mike Stump <mikestump@comcast.net>
6190 Richard Sandiford <rdsandiford@googlemail.com>
6191
6192 * c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN.
6193 (finish_enum): Use wide-int interfaces.
6194 * c-parser.c (c_parser_cilk_clause_vectorlength): Likewise.
6195 * c-typeck.c (build_c_cast): Likewise.
6196 (set_nonincremental_init_from_string): Likewise.
6197 (c_tree_equal): Likewise.
6198
a0e24419
MP
61992014-05-02 Marek Polacek <polacek@redhat.com>
6200
6201 PR c/25801
6202 * c-typeck.c (c_size_in_bytes): Update comment. Don't call error.
6203 Return size_one_node when the type is not complete.
6204 (pointer_diff): Remove comment.
6205 (build_unary_op): Improve error messages.
6206
19fc9faa
MP
62072014-05-02 Marek Polacek <polacek@redhat.com>
6208
6209 * c-typeck.c (c_finish_return): Separate warning_at calls.
6210
63bc4e87
MP
62112014-05-02 Marek Polacek <polacek@redhat.com>
6212
6213 * c-tree.h (error_init): Remove declaration.
6214 (pedwarn_init): Likewise.
6215 * c-typeck.c (error_init): Make static and move above.
6216 (pedwarn_init): Likewise.
6217 (warning_init): Move above.
6218 (maybe_warn_string_init): Likewise.
6219
4bd2511b
JL
62202014-05-01 Jeff Law <law@redhat.com>
6221
6222 Revert:
6223
6224 2014-04-24 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
6225 * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
6226 avoid goto.
6227
6a358dcb
MP
62282014-05-02 Marek Polacek <polacek@redhat.com>
6229
6230 PR c/60784
6231 * c-typeck.c (push_init_level): Set constructor_designated to
6232 p->designated for structures.
6233
ae5ebda4
MP
62342014-05-01 Marek Polacek <polacek@redhat.com>
6235
6236 PR c/60915
6237 * c-parser.c (c_parser_declaration_or_fndef): Give better error if
6238 function-definition has an attribute after the declarator.
6239
96b40f8d
MP
62402014-05-01 Marek Polacek <polacek@redhat.com>
6241
6242 PR c/60257
6243 * c-typeck.c (warning_init): Add location_t parameter. Call
6244 warning_at instead of warning.
6245 (push_init_level): Pass input_location to warning_init.
6246 (add_pending_init): Add location_t parameter. Pass loc to
6247 warning_init.
6248 (set_nonincremental_init): Pass input_location to add_pending_init.
6249 (set_nonincremental_init_from_string): Likewise.
6250 (output_init_element): Pass loc to warning_init and to
6251 add_pending_init.
6252
32e00768
MP
62532014-05-01 Marek Polacek <polacek@redhat.com>
6254
6255 PR c/43395
6256 * c-typeck.c (c_finish_return): Distinguish between label and variable
6257 when warning about returning local address.
6258
c9379ce2
MP
62592014-05-01 Marek Polacek <polacek@redhat.com>
6260
6261 PR c/29467
6262 * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
6263 in C89 mode.
6264
d00887e8
MP
62652014-05-01 Marek Polacek <polacek@redhat.com>
6266
6267 PR c/43245
6268 * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
6269 instead of 0 to WARN_FOR_QUALIFIERS.
6270
5436fa2e
MP
62712014-05-01 Marek Polacek <polacek@redhat.com>
6272
6273 PR c/56989
6274 * c-typeck.c (default_conversion): Use better location for
6275 error call.
6276
f8ed5150
MP
62772014-04-30 Marek Polacek <polacek@redhat.com>
6278
6279 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
6280 also when SANITIZE_FLOAT_DIVIDE is on.
6281
8337d1db
MP
62822014-04-30 Marek Polacek <polacek@redhat.com>
6283
6284 PR c/60139
6285 * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
6286 and pedwarn_init. Use loc insted of input_location.
6287
c4bdc42f
MP
62882014-04-30 Marek Polacek <polacek@redhat.com>
6289
6290 PR c/60351
6291 * c-typeck.c (build_binary_op): Use location when warning about
6292 shift count.
6293
45484dcf
MP
62942014-04-25 Marek Polacek <polacek@redhat.com>
6295
6296 PR c/18079
6297 * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
6298 always_inline/noinline and hot/cold attributes.
6299
34cf811f
MP
63002014-04-25 Marek Polacek <polacek@redhat.com>
6301
6302 PR c/60114
6303 * c-parser.c (c_parser_initelt): Pass input_location to
6304 process_init_element.
6305 (c_parser_initval): Pass loc to process_init_element.
6306 * c-tree.h (process_init_element): Adjust declaration.
6307 * c-typeck.c (push_init_level): Pass input_location to
6308 process_init_element.
6309 (pop_init_level): Likewise.
6310 (set_designator): Likewise.
6311 (output_init_element): Add location_t parameter. Pass loc to
6312 digest_init.
6313 (output_pending_init_elements): Pass input_location to
6314 output_init_element.
6315 (process_init_element): Add location_t parameter. Pass loc to
6316 output_init_element.
6317
42056eac
JJ
63182014-04-24 Jakub Jelinek <jakub@redhat.com>
6319
6320 * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
6321 atomic-clause, allow comma in between atomic-clause and
6322 seq_cst.
6323
e162a134
JJ
63242014-04-22 Jakub Jelinek <jakub@redhat.com>
6325
6326 PR c/59073
6327 * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
6328 fails, don't set OM_PARALLEL_COMBINED and return NULL.
6329
2f6babac
IZ
63302014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
6331
6332 PR middle-end/60469
6333 * c-array-notation.c (fix_builtin_array_notation_fn): Use
6334 create_tmp_var instead build_decl for creating temps.
6335 (build_array_notation_expr): Likewise.
6336 (fix_conditional_array_notations_1): Likewise.
6337 (fix_array_notation_expr): Likewise.
6338 (fix_array_notation_call_expr): Likewise.
6339
8edbfaa6
JJ
63402014-03-28 Jakub Jelinek <jakub@redhat.com>
6341
6342 PR c++/60689
6343 * c-tree.h (c_build_function_call_vec): New prototype.
6344 * c-typeck.c (build_function_call_vec): Don't call
6345 resolve_overloaded_builtin here.
6346 (c_build_function_call_vec): New wrapper function around
6347 build_function_call_vec. Call resolve_overloaded_builtin here.
6348 (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
6349 Call c_build_function_call_vec instead of build_function_call_vec.
6350 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
6351 * c-decl.c (finish_decl): Likewise.
6352
7485aeea
MLI
63532014-03-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
6354
6355 PR c/55383
6356 * c-typeck.c: Use correct format string in cast-qual warning
6357
b17a8b07
TS
63582014-03-07 Thomas Schwinge <thomas@codesourcery.com>
6359
6360 * c-decl.c (c_decl_attributes): Use
6361 lang_hooks.types.omp_mappable_type.
6362 * c-typeck.c (c_finish_omp_clauses): Likewise.
6363
3af9c5e9
MP
63642014-03-06 Marek Polacek <polacek@redhat.com>
6365
6366 PR c/60197
6367 * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
6368 of checking tree code.
6369
1c9f5f33
PK
63702014-02-19 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
6371
6372 * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
6373 (c_parser_parameter_declaration): Likewise.
6374
cc28fc7f
MP
63752014-02-19 Marek Polacek <polacek@redhat.com>
6376
6377 PR c/60195
6378 * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
6379 Call mark_exp_read on exp.value.
6380 (build_atomic_assign): Set TREE_NO_WARNING on val and old. Set
6381 TREE_ADDRESSABLE on old instead of val.
6382 (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
6383
b581c05c
PK
63842014-02-07 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
6385
6386 * c-parser.c (c_parser_get_builtin_args): Replace calls to
6387 C_EXPR_APPEND by vec_safe_push.
6388 * c-tree.h (C_EXPR_APPEND): Remove.
6389
81e5eca8
MP
63902014-01-31 Marek Polacek <polacek@redhat.com>
6391
6392 PR c/59963
6393 * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
6394 build_function_call_vec.
6395 (build_function_call): Likewise.
6396 (build_atomic_assign): Likewise.
6397 (build_function_call_vec): Add arg_loc parameter. Use it.
6398 (convert_arguments): Likewise.
6399 (convert_for_assignment): Rename rhs_loc to expr_loc.
6400 * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
6401 (c_parser_objc_keywordexpr): Likewise.
6402 (c_parser_postfix_expression_after_primary): Call
6403 build_function_call_vec with expr_loc rather than op_loc.
6404 Call c_parser_expr_list to fill arg_loc. Pass arg_loc to
6405 build_function_call_vec.
6406 (c_parser_expr_list): Add locations parameter. Fill it with locations
6407 of function arguments.
6408 * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
6409
68fca595
MP
64102014-01-30 Marek Polacek <polacek@redhat.com>
6411
6412 PR c/59940
6413 * c-typeck.c (build_function_call_vec): Use loc parameter.
6414 (convert_arguments): Add location parameter. Use it.
6415 (ep_convert_and_check): Likewise.
6416 (build_atomic_assign): Adjust convert_for_assignment call.
6417 (build_modify_expr): Likewise.
6418 (digest_init): Likewise.
6419 (c_finish_return): Likewise.
6420 (build_conditional_expr): Adjust ep_convert_and_check calls.
6421 (convert_for_assignment): Add rhs_loc parameter. Use it.
6422 (build_binary_op): Adjust convert_and_check and ep_convert_and_check
6423 calls.
6424
fa337f3a
RB
64252014-01-30 Richard Biener <rguenther@suse.de>
6426
6427 PR c/59905
6428 * c-typeck.c (build_function_call_vec): Do not replace calls
6429 to a function via an incompatible type with a runtime abort.
6430
b72271b9
BI
64312014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
6432
6433 * c-parser.c (c_parser_declaration_or_fndef): Replaced
6434 flag_enable_cilkplus with flag_cilkplus.
6435 (c_parser_direct_declarator_inner): Likewise.
6436 (c_parser_attribute_any_word): Likewise.
6437 (c_parser_attributes): Likewise.
6438 (c_parser_compound_statement): Likewise.
6439 (c_parser_statement_after_labels): Likewise.
6440 (c_parser_if_statement): Likewise.
6441 (c_parser_switch_statement): Likewise.
6442 (c_parser_do_statement): Likewise.
6443 (c_parser_for_statement): Likewise.
6444 (c_parser_unary_expression): Likewise.
6445 (c_parser_postfix_expression): Likewise.
6446 (c_parser_postfix_expression_after_primary): Likewise.
6447 (c_parser_postfix_expression_after_primary): Likewise.
6448 (c_parser_omp_clause_name): Likewise.
6449 (c_finish_omp_declare_simd): Likewise.
6450 (c_parser_cilk_verify_simd): Likewise.
6451 * c-typeck.c (build_array_ref): Likewise.
6452 (build_function_call_vec): Likewise.
6453 (convert_arguments): Likewise.
6454 (build_compound_expr): Likewise.
6455 (c_finish_return): Likewise.
6456 (c_finish_if_stmt): Likewise.
6457 (c_finish_loop): Likewise.
6458 (build_binary_op): Likewise.
6459
393e8e8b
MP
64602014-01-23 Marek Polacek <polacek@redhat.com>
6461
6462 PR c/59846
6463 * c-typeck.c (parser_build_binary_op): Use location instead of
6464 input_location.
6465 (build_binary_op): Pass location to shorten_compare.
6466
f04dda30
MP
64672014-01-23 Marek Polacek <polacek@redhat.com>
6468
6469 PR c/58346
6470 * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
6471 an empty aggregate.
6472
789eadcd
MP
64732014-01-23 Marek Polacek <polacek@redhat.com>
6474
6475 PR c/59871
6476 * c-typeck.c (build_compound_expr): Warn even for right-hand operand
6477 of a comma expression.
6478 (emit_side_effect_warnings): Likewise.
6479
40f14e9f
BI
64802014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
6481
6482 PR c/59825
6483 * c-array-notation.c (expand_array_notation_exprs): Rewrote this
6484 function to use walk_tree and moved a lot of its functionality to
6485 expand_array_notations.
6486 (expand_array_notations): New function.
6487
74558dd9
BI
64882014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
6489
6490 * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
6491 attribute an attribute without value.
6492
652fea39
JJ
64932014-01-23 Jakub Jelinek <jakub@redhat.com>
6494
6495 PR middle-end/58809
6496 * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
6497 BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
6498
f34f1c87
MP
64992014-01-22 Marek Polacek <polacek@redhat.com>
6500
6501 PR c/59891
6502 * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
6503 of remove_c_maybe_const_expr on op1 and op2.
6504
241f845a
JJ
65052014-01-15 Jakub Jelinek <jakub@redhat.com>
6506
6507 PR c/58943
6508 * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
6509 effects, preevaluate rhs using SAVE_EXPR first.
6510
9a74f20c
BI
65112014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
6512
6513 PR c++/59631
6514 * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
6515 statements with if-elseif statements.
6516
96066ce1
MP
65172014-01-06 Marek Polacek <polacek@redhat.com>
6518
6519 PR c/57773
6520 * c-decl.c (check_bitfield_type_and_width): Warn for implementation
6521 defined bit-field types only in ISO C.
6522
23a5b65a
RS
65232014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
6524
6525 Update copyright years
6526
f9030485
RS
65272014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
6528
6529 * c-array-notation.c: Use the standard form for the copyright notice.
6530
41958c28
BI
65312013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
6532
6533 * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
6534 (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
6535 field in parser is not empty. If not-empty, call the function
6536 c_parser_finish_omp_declare_simd.
6537 (c_parser_cilk_clause_vectorlength): Modified function to be shared
6538 between SIMD-enabled functions and #pragma simd. Added new parameter.
6539 (c_parser_cilk_all_clauses): Modified the usage of the function
6540 c_parser_cilk_clause_vectorlength as mentioned above.
6541 (c_parser_cilk_simd_fn_vector_attrs): New function.
6542 (c_finish_cilk_simd_fn_tokens): Likewise.
6543 (is_cilkplus_vector_p): Likewise.
6544 (c_parser_omp_clause_name): Added checking for "vectorlength,"
6545 "nomask," and "mask" strings in clause name.
6546 (c_parser_omp_all_clauses): Added 3 new case statements:
6547 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
6548 PRAGMA_CILK_CLAUSE_NOMASK.
6549 (c_parser_attributes): Added a cilk_simd_fn_tokens parameter. Added a
6550 check for vector attribute and if so call the function
6551 c_parser_cilk_simd_fn_vector_attrs. Also, when Cilk plus is enabled,
6552 called the function c_finish_cilk_simd_fn_tokens.
6553 (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
6554 parser field is non-empty. If so, parse them as you would parse
6555 the omp declare simd pragma.
6556 (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
6557 Added a check when step is a parameter and flag it as error.
6558 (CILK_SIMD_FN_CLAUSE_MASK): New #define.
6559 (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
6560 pragma_omp_clause.
6561
cef0fd0e
TS
65622013-12-17 Thomas Schwinge <thomas@codesourcery.com>
6563
6564 * c-parser.c (c_parser_omp_parallel): Fix description.
6565
12893402
BI
65662013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
6567
6568 * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
6569 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
6570 (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
6571 * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
6572
296674db
JM
65732013-12-04 Joseph Myers <joseph@codesourcery.com>
6574
6575 PR c/52023
6576 * c-parser.c (c_parser_alignas_specifier): Use
6577 c_sizeof_or_alignof_type instead of c_alignof.
6578 (c_parser_alignof_expression): Likewise, with min_alignof
6579 parameter depending on alignof spelling used.
6580
edd28054
MP
65812013-12-04 Marek Polacek <polacek@redhat.com>
6582
6583 PR c/54113
6584 * c-decl.c (start_function): Don't warn for missing prototype for
6585 inline functions.
6586
da0fc454
MP
65872013-12-03 Marek Polacek <polacek@redhat.com>
6588
6589 PR c/59351
6590 * c-decl.c (build_compound_literal): Allow compound literals with
6591 empty initial value.
6592
4c2ecab0
JM
65932013-12-02 Joseph Myers <joseph@codesourcery.com>
6594
6595 PR c/58235
6596 * c-typeck.c (build_modify_expr): Diagnose assignment to
6597 expression with array type.
6598
340baef7
JM
65992013-11-29 Joseph Myers <joseph@codesourcery.com>
6600
6601 PR c/42262
6602 * c-typeck.c (process_init_element): Do not treat a string as
6603 initializing a whole array when used with a designator for an
6604 individual element.
6605
6763b9f7
JM
66062013-11-29 Joseph Myers <joseph@codesourcery.com>
6607
6608 PR c/57574
6609 * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
6610 an inline function following a static declaration.
6611
e7bd1de1
JJ
66122013-11-28 Jakub Jelinek <jakub@redhat.com>
6613
6614 PR c/59310
6615 * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
6616 to p_name before calling c_parser_omp_teams instead of after.
6617 (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
6618 argument. Remove unused p_name variable.
6619
0136f8f0
AH
66202013-11-27 Aldy Hernandez <aldyh@redhat.com>
6621 Jakub Jelinek <jakub@redhat.com>
6622
6623 * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
6624 external_scope is NULL.
6625
241b71bb
TV
66262013-11-27 Tom de Vries <tom@codesourcery.com>
6627 Marc Glisse <marc.glisse@inria.fr>
6628
6629 PR c++/59032
6630 * c-typeck.c (build_unary_op): Allow vector increment and decrement.
6631
2fb9a547
AM
66322013-11-22 Andrew MacLeod <amacleod@redhat.com>
6633
6634 * c-typeck.c: Add required include files from gimple.h.
6635
8400e75e
DM
66362013-11-22 David Malcolm <dmalcolm@redhat.com>
6637
6638 * c-decl.c (define_label, shadow_tag_warned)
6639 (check_bitfield_type_and_width, grokdeclarator, grokparms,
6640 store_parm_decls_newstyle, store_parm_decls_oldstyle)
6641 (declspecs_add_type): Remove use of in_system_header macro.
6642 * c-parser.c (c_parser_unary_expression): Likewise.
6643 * c-typeck.c (store_init_value, process_init_element)
6644 (c_start_case): Likewise.
6645
6646 * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
6647 macro.
6648
6649 * c-parser.c (c_parser_set_source_position_from_token): Remove
6650 reference to in_system_header from comment.
6651
386b1f1f
RS
66522013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
6653
6654 * c-decl.c (grokdeclarator): Update comment to refer to
6655 tree_to_[su]hwi rather than tree_low_cst.
6656
ae7e9ddd
RS
66572013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
6658
6659 * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
6660 tree_to_uhwi throughout.
6661
9439e9a1
RS
66622013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
6663
6664 * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
6665 throughout.
6666
9541ffee
RS
66672013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
6668
6669 * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
6670 throughout.
6671
c02065fc
AH
66722013-11-15 Aldy Hernandez <aldyh@redhat.com>
6673
6674 * c-parser.c (c_parser_cilk_simd): New.
6675 (c_parser_cilk_verify_simd): New.
6676 (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
6677 (c_parser_omp_for_loop): Add case for NE_EXPR.
6678 Set c_break_label for CILK_SIMD.
6679 (c_parser_cilk_clause_vectorlength): New.
6680 (c_parser_cilk_clause_linear): New.
6681 (c_parser_cilk_clause_name): New.
6682 (c_parser_cilk_all_clauses): New.
6683 * c-typeck.c (build_unary_op): Pass location argument to
6684 readonly_error.
6685 (build_modify_expr): Same.
6686 (build_asm_expr): Same.
6687 (c_finish_bc_stmt): Error on break/continue in loops.
6688
18f429e2
AM
66892013-11-14 Andrew MacLeod <amacleod@redhat.com>
6690
6691 * c-typeck.c: Include only gimplify.h and gimple.h as needed.
6692
d8a2d370
DN
66932013-11-14 Diego Novillo <dnovillo@google.com>
6694
6695 * c-decl.c: Include print-tree.h.
6696 Include stor-layout.h.
6697 Include varasm.h.
6698 Include attribs.h.
6699 Include stringpool.h.
6700 * c-lang.c: Include fold-const.h.
6701 * c-parser.c: Include stringpool.h.
6702 Include attribs.h.
6703 Include stor-layout.h.
6704 Include varasm.h.
6705 Include trans-mem.h.
6706 * c-typeck.c: Include stor-layout.h.
6707 Include trans-mem.h.
6708 Include varasm.h.
6709 Include stmt.h.
6710
38b7bc7f
JM
67112013-11-13 Joseph Myers <joseph@codesourcery.com>
6712
6713 * c-tree.h (c_typespec_keyword): Add cts_auto_type.
6714 * c-decl.c (declspecs_add_type, finish_declspecs): Handle
6715 __auto_type.
6716 * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
6717 (c_parser_attribute_any_word, c_parser_objc_selector): Handle
6718 RID_AUTO_TYPE.
6719 (c_parser_declspecs): Take argument AUTO_TYPE_OK.
6720 (c_parser_declaration_or_fndef, c_parser_struct_declaration)
6721 (c_parser_declarator, c_parser_direct_declarator_inner)
6722 (c_parser_parameter_declaration, c_parser_type_name): All callers
6723 changed.
6724 (c_parser_declaration_or_fndef): Handle declarations with type
6725 determined from the initializer.
6726
45b0be94
AM
67272013-11-12 Andrew MacLeod <amacleod@redhat.com>
6728
18f429e2 6729 * c-typeck.c: Include gimplify.h.
45b0be94 6730
582d9b50
JM
67312013-11-12 Joseph Myers <joseph@codesourcery.com>
6732
6733 * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
6734 * c-parser.c (c_parser_declspecs): Mention _Thread_local in
6735 comment.
6736 * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
6737 or _Thread_local as appropriate in diagnostics.
6738 (build_null_declspecs): Initialize ret->thread_gnu_p.
6739 (declspecs_add_scspec): Handle either __thread or _Thread_local
6740 for RID_THREAD. Diagnose _Thread_local for pre-C11 standards if
6741 pedantic. Do not disallow _Thread_local extern and _Thread_local
6742 static.
6743
267bac10
JM
67442013-11-07 Joseph Myers <joseph@codesourcery.com>
6745 Andrew MacLeod <amacleod@redhat.com>
6746
6747 * c-aux-info.c (gen_type): Handle atomic qualifier.
6748 * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
6749 qualifiers when compating types.
6750 (shadow_tag_warned): Handle atomic_p in declspecs.
6751 (quals_from_declspecs): Likewise.
6752 (start_decl): Use c_type_promotes_to when promoting argument
6753 types.
6754 (grokdeclarator): Handle _Atomic.
6755 (get_parm_info): Diagnose any qualifier on "void" as only
6756 parameter.
6757 (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
6758 comparing types. Use c_type_promotes_to when promoting argument
6759 types.
6760 (finish_function): Use c_type_promotes_to when promoting argument
6761 types.
6762 (build_null_declspecs): Handle atomic_p in declspecs.
6763 (declspecs_add_qual): Handle RID_ATOMIC.
6764 * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
6765 (c_token_starts_declspecs): Handle RID_ATOMIC.
6766 (c_parser_declspecs): Handle atomic type specifiers and
6767 qualifiers.
6768 (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
6769 from types of expressions with atomic type.
6770 (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
6771 (c_parser_attribute_any_word): Handle RID_ATOMIC.
6772 (c_parser_initializer, c_parser_initelt, c_parser_initval)
6773 (c_parser_statement_after_labels, c_parser_switch_statement)
6774 (c_parser_for_statement, c_parser_expr_no_commas)
6775 (c_parser_conditional_expression, c_parser_binary_expression)
6776 (c_parser_cast_expression, c_parser_unary_expression)
6777 (c_parser_postfix_expression)
6778 (c_parser_postfix_expression_after_primary, c_parser_expression):
6779 Use convert_lvalue_to_rvalue.
6780 (c_parser_expression_conv, c_parser_expr_list): Document
6781 conversion of lvalues to rvalues. Use convert_lvalue_to_rvalue.
6782 (c_parser_objc_synchronized_statement): Use
6783 convert_lvalue_to_rvalue.
6784 (c_parser_objc_selector): Handle RID_ATOMIC.
6785 (c_parser_objc_receiver, c_parser_array_notation): Use
6786 convert_lvalue_to_rvalue.
6787 * c-tree.h (ctsk_typeof): Adjust comment to mention use for
6788 _Atomic (type-name).
6789 (struct c_declspecs): Add atomic_p field.
6790 (convert_lvalue_to_rvalue): Declare.
6791 * c-typeck.c (c_type_promotes_to): Promote atomic types to
6792 corresponding atomic types.
6793 (qualify_type): Don't add _Atomic qualifiers from second argument.
6794 (comp_target_types): Do not allow _Atomic mismatches.
6795 (type_lists_compatible_p): Do not remove atomic qualifiers when
6796 comparing types.
6797 (really_atomic_lvalue, convert_lvalue_to_rvalue)
6798 (build_atomic_assign): New functions.
6799 (build_unary_op): Use build_atomic_assign for atomic increment and
6800 decrement.
6801 (build_conditional_expr): Do not treat _Atomic void as a qualified
6802 version of void.
6803 (build_modify_expr): Use build_atomic_assign for atomic LHS.
6804 (find_anonymous_field_with_type, convert_to_anonymous_field)
6805 (convert_for_assignment): Do not remove atomic qualifiers when
6806 comparing types.
6807 (digest_init): Do not accept initialization of arrays of atomic
6808 elements by string constants.
6809 (build_asm_expr): Use convert_lvalue_to_rvalue.
6810 (build_binary_op): Do not treat _Atomic void as a qualified
6811 version of void.
6812
0c249d4b
DD
68132013-11-06 DJ Delorie <dj@redhat.com>
6814
6815 * c-decl.c (locate_old_decl): If a previous conflicting decl is
6816 both explicit and builtin, print the location of the explicit one.
6817
6d7f7e0a
TB
68182013-11-05 Tobias Burnus <burnus@net-b.de>
6819
6820 * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
6821 c_parser_omp_distribute, c_parser_omp_teams,
6822 c_parser_omp_target, c_parser_omp_declare): Handle
6823 -fopenmp-simd.
6824
b906f4ca
MP
68252013-11-03 Marek Polacek <polacek@redhat.com>
6826
6827 * c-decl.c (grokdeclarator): Add VLA instrumentation.
6828
ee1d5a02
JJ
68292013-11-01 Jakub Jelinek <jakub@redhat.com>
6830
6831 * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
6832 check_dup_generic at the end, unless remove is true.
6833 (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
6834 remove = true;.
6835 (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
6836
5a9785fb
JJ
68372013-10-31 Jakub Jelinek <jakub@redhat.com>
6838
6839 * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
6840 with decl that is not pointer nor array.
6841
939b37da
BI
68422013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
6843
6844 * c-decl.c (finish_function): Added a call for insert_cilk_frame when
6845 a spawning function is found.
6846 * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
6847 (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
6848 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
6849 * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
6850 case.
6851 (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
6852 * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
6853 expr.
6854 (c_finish_return): Added a check to reject _Cilk_spawn in return
6855 expression.
6856 (build_cilk_spawn): New function.
6857 (build_cilk_sync): Likewise.
6858 * Makefile.in (c-decl.o): Added cilk.h in dependency list.
ab20d992 6859
d4af74d4
TB
68602013-10-27 Tobias Burnus <burnus@net-b.de>
6861
6862 PR other/33426
6863 * c-parser.c (c_parser_while_statement, c_parser_while_statement,
6864 c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
6865 (c_parser_statement_after_labels): Update calls.
6866
d73749df 68672013-10-24 Tobias Burnus <burnus@net-b.de>
8170608b
TB
6868
6869 PR other/33426
6870 * c-parser.c (c_parser_pragma, c_parser_for_statement):
6871 Handle PRAGMA_IVDEP.
6872 (c_parser_statement_after_labels): Update call.
6873
f28aa681
MP
68742013-10-24 Marek Polacek <polacek@redhat.com>
6875
6876 * c-parser.c (c_parser_struct_declaration): Add a comment.
6877 (c_parser_declarator): Don't allow _Alignas here.
6878
0645c1a2
AM
68792013-10-17 Andrew MacLeod <amacleod@redhat.com>
6880
6881 * c-parser.c: Include omp-low.h.
6882 * c-typeck.c: Likewise.
6883
568a31f2
MP
68842013-10-17 Marek Polacek <polacek@redhat.com>
6885
6886 PR c/58267
6887 * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
6888 Document syntax of the array-declarator.
6889 (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
6890 are not permitted.
6891 (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
6892 (c_parser_struct_declaration): Likewise.
6893 (c_parser_declarator): Likewise.
6894 (c_parser_direct_declarator_inner): Likewise.
6895 (c_parser_parameter_declaration): Likewise.
6896 (c_parser_type_name): Likewise.
6897
acf0174b
JJ
68982013-10-11 Jakub Jelinek <jakub@redhat.com>
6899
6900 * c-lang.h (current_omp_declare_target_attribute): New extern
6901 decl.
6902 * c-parser.c: Include c-lang.h.
6903 (struct c_parser): Change tokens to c_token *.
6904 Add tokens_buf field. Change tokens_avail type to unsigned int.
6905 (c_parser_consume_token): If parser->tokens isn't
6906 &parser->tokens_buf[0], increment parser->tokens.
6907 (c_parser_consume_pragma): Likewise.
6908 (enum pragma_context): Add pragma_struct and pragma_param.
6909 (c_parser_external_declaration): Adjust
6910 c_parser_declaration_or_fndef caller.
6911 (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
6912 argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
6913 Adjust recursive call.
6914 (c_parser_struct_or_union_specifier): Use pragma_struct instead
6915 of pragma_external.
6916 (c_parser_parameter_declaration): Use pragma_param instead of
6917 pragma_external.
6918 (c_parser_compound_statement_nostart, c_parser_label,
6919 c_parser_for_statement): Adjust
6920 c_parser_declaration_or_fndef callers.
6921 (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
6922 it through to c_parser_conditional_expression.
6923 (c_parser_conditional_expression): Add omp_atomic_lhs argument,
6924 pass it through to c_parser_binary_expression. Adjust recursive
6925 call.
6926 (c_parser_binary_expression): Remove prec argument, add
6927 omp_atomic_lhs argument instead. Always start from PREC_NONE, if
6928 omp_atomic_lhs is non-NULL and one of the arguments of toplevel
6929 binop matches it, use build2 instead of parser_build_binary_op.
6930 (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
6931 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
6932 PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
6933 Handle pragma_struct and pragma_param the same as pragma_external.
6934 (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
6935 (c_parser_omp_variable_list): Parse array sections for
6936 OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
6937 (c_parser_omp_clause_collapse): Fully fold collapse expression.
6938 (c_parser_omp_clause_reduction): Handle user defined reductions.
6939 (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
6940 c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
6941 c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
6942 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
6943 c_parser_omp_clause_depend, c_parser_omp_clause_map,
6944 c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
6945 c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
6946 c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
6947 (c_parser_omp_all_clauses): Add finish_p argument. Don't call
6948 c_finish_omp_clauses if it is false. Handle new OpenMP 4.0 clauses.
6949 (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
6950 present to c_finish_omp_atomic. Handle OpenMP 4.0 atomic forms.
6951 (c_parser_omp_for_loop): Add CODE argument, pass it through
6952 to c_finish_omp_for. Change last argument to cclauses,
6953 and adjust uses to grab parallel clauses from the array of all
6954 the split clauses. Adjust c_parser_binary_expression,
6955 c_parser_declaration_or_fndef and c_finish_omp_for callers.
6956 (omp_split_clauses): New function.
6957 (c_parser_omp_simd): New function.
6958 (c_parser_omp_for): Add p_name, mask and cclauses arguments.
6959 Allow the function to be called also when parsing combined constructs,
6960 and call c_parser_omp_simd when parsing for simd.
6961 (c_parser_omp_sections_scope): If section-sequence doesn't start with
6962 #pragma omp section, require exactly one structured-block instead of
6963 sequence of statements.
6964 (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
6965 Allow the function to be called also when parsing combined constructs.
6966 (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
6967 Allow the function to be called also when parsing combined
6968 constructs.
6969 (c_parser_omp_taskgroup, c_parser_omp_cancel,
6970 c_parser_omp_cancellation_point, c_parser_omp_distribute,
6971 c_parser_omp_teams, c_parser_omp_target_data,
6972 c_parser_omp_target_update, c_parser_omp_target,
6973 c_parser_omp_declare_simd, c_finish_omp_declare_simd,
6974 c_parser_omp_declare_target, c_parser_omp_end_declare_target,
6975 c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
6976 (c_parser_omp_construct): Add p_name and mask vars. Handle
6977 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
6978 PRAGMA_OMP_TEAMS. Adjust c_parser_omp_for, c_parser_omp_parallel
6979 and c_parser_omp_sections callers.
6980 (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
6981 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
6982 OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
6983 (OMP_PARALLEL_CLAUSE_MASK): Likewise. Add OMP_CLAUSE_PROC_BIND.
6984 (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. Add
6985 OMP_CLAUSE_DEPEND.
6986 (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
6987 OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
6988 OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
6989 OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
6990 OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
6991 * c-typeck.c: Include tree-inline.h.
6992 (c_finish_omp_cancel, c_finish_omp_cancellation_point,
6993 handle_omp_array_sections_1, handle_omp_array_sections,
6994 c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
6995 (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
6996 user defined reductions.
6997 (c_tree_equal): New function.
6998 * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
6999 c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
7000 c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
7001 c_check_omp_declare_reduction_r): New prototypes.
7002 * c-decl.c (current_omp_declare_target_attribute): New variable.
7003 (c_decl_attributes): New function.
7004 (start_decl, start_function): Use it instead of decl_attributes.
7005 (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
7006 c_omp_reduction_decl, c_omp_reduction_lookup,
7007 c_check_omp_declare_reduction_r): New functions.
7008
0a6c2227
TT
70092013-09-25 Tom Tromey <tromey@redhat.com>
7010
7011 * Make-lang.in (c/gccspec.o): Remove.
7012 (CFLAGS-c/gccspec.o): New variable.
7013 (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
7014 (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
7015 (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
7016
f3bc55f0
TT
70172013-09-25 Tom Tromey <tromey@redhat.com>
7018
7019 * Make-lang.in (c/gccspec.o): Don't use subshell.
7020
a24d975c
MP
70212013-09-18 Marek Polacek <polacek@redhat.com>
7022
7023 PR sanitize/58443
7024 * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
7025 Remove unnecessary check.
7026
ce6923c5
MP
70272013-09-18 Marek Polacek <polacek@redhat.com>
7028
7029 PR sanitizer/58411
7030 * c-typeck.c (build_binary_op): Don't sanitize function if it has the
7031 no_sanitize_undefined attribute.
7032
a1e51df9
KT
70332013-09-13 Kai Tietz <ktietz@redhat.com>
7034
7035 PR target/57848
7036 * c-decl.c (c_builtin_function_ext_scope): Remove
7037 wrong assumption that it is never called on prexisting
7038 symbol.
7039
0af94e6f
JR
70402013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
7041
7042 * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
7043
20059c8b
GDR
70442013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
7045
7046 * c-objc-common.c (c_tree_printer): Tidy.
7047
de5a5fa1
MP
70482013-08-30 Marek Polacek <polacek@redhat.com>
7049
7050 * c-typeck.c (build_binary_op): Add division by zero and shift
7051 instrumentation.
7052
2531a1d9 70532013-08-26 Joern Rennecke <joern.rennecke@embecosm.com>
0fdd4508 7054 Joseph Myers <joseph@codesourcery.com>
2531a1d9 7055
6e2bcc98 7056 PR c/35649
2531a1d9
JR
7057 * c-typeck.c (c_common_type): Prefer double_type_node over
7058 other REAL_TYPE types with the same precision.
7059 (convert_arguments): Likewise.
7060
025311c4
GDR
70612013-08-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
7062
7063 * c-objc-common.c (c_tree_printer): Document the nature of the cast.
7064 (c_initialize_diagnostics): Call a destructor for the early printer.
7065
da6ca2b5
GDR
70662013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
7067
7068 * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
7069 printer initialization.
7070
318cda85 70712013-08-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
da6ca2b5 7072
318cda85
BI
7073 PR c/57490
7074 * c-array-notation.c (fix_conditional_array_notations_1): Added a
7075 check for truth values.
7076 (expand_array_notation_exprs): Added truth values case. Removed an
7077 unwanted else. Added for-loop to walk through subtrees in default
7078 case.
7079
b066401f
GDR
70802013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
7081
7082 * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
7083
fb48aadc
JM
70842013-07-23 Joseph Myers <joseph@codesourcery.com>
7085
7086 * c-parser.c (struct c_generic_association): Fix typo.
7087
433cc7b0
TT
70882013-07-23 Tom Tromey <tromey@redhat.com>
7089 Joseph Myers <joseph@codesourcery.com>
7090
7091 * c-parser.c (struct c_generic_association): New.
7092 (c_generic_association_d): New typedef.
7093 (c_parser_generic_selection): New function.
7094 (c_parser_postfix_expression): Handle RID_GENERIC.
7095
26d40c3d
JM
70962013-07-13 Jason Merrill <jason@redhat.com>
7097
7098 PR c++/57793
7099 * c-decl.c (finish_struct): Check for too-large class.
7100
ecdbd01a 71012013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
40d3d530
JR
7102
7103 PR c/57821
7104 * c-typeck.c (set_init_index): When folding, check for index overflow.
7105
1141ed3f
BI
71062013-06-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
7107
7108 * c-parser.c (c_parser_array_notation): Removed rejection of array
7109 notations in an array of function pointers.
7110
713b46fa
BI
71112013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
7112
7113 * c-array-notation.c (make_triplet_val_inv): New function.
7114 (create_cmp_incr): Likewise.
7115 (create_array_refs): Likewise.
7116 (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
7117 Also modularized common parts between functions and called the function.
7118 (build_array_notation_expr): Likewise.
7119 (fix_conditional_array_notations_1): Likewise.
7120 (fix_array_notation_expr): Likewise.
7121 (fix_array_notation_call_expr): Likewise.
7122
92f20202
MP
71232013-06-18 Marek Polacek <polacek@redhat.com>
7124
7125 PR c/57630
7126 * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
7127
73a23b06
BI
71282013-06-12 Balaji V. Iyer <balaji.v.iyer@intel.com>
7129
7130 * c-array-notation.c (build_array_notation_expr): Reject array notation
7131 mismatch between LHS and RHS even inside a call_expr. Also, removed
7132 a couple while statements that were dead code.
7133
00b8517d
BI
71342013-06-10 Balaji V. Iyer <balaji.v.iyer@intel.com>
7135
7136 * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
7137 excessive precision expressions in function parameters. Also removed
7138 couple unwanted while statements.
7139
1509bdda
BI
71402013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
7141
7142 * c-array-notation.c (expand_array_notation_exprs): Added
7143 ARRAY_NOTATION_REF case.
ab20d992 7144
d60f1706
BI
71452013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
7146
7147 * c-array-notation.c (length_mismatch_in_expr_p): Moved this
7148 function to c-family/array-notation-common.c.
7149 (is_cilkplus_reduce_builtin): Likewise.
7150 (find_rank): Likewise.
7151 (extract_array_notation_exprs): Likewise.
7152 (replace_array_notations): Likewise.
7153 (find_inv_trees): Likewise.
7154 (replace_inv_trees): Likewise.
7155 (contains_array_notation_expr): Likewise.
7156 (find_correct_array_notation_type): Likewise.
7157 (replace_invariant_exprs): Initialized additional_tcodes to NULL.
7158 (struct inv_list): Moved this to c-family/array-notation-common.c.
7159 * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
ab20d992 7160
6d6efbb3
BI
71612013-06-05 Balaji V. Iyer <balaji.v.iyer@intel.com>
7162
7163 * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
7164 reduction functions outside the for-loop. Added a check if the fundecl
7165 is non-NULL. Finally, removed an unwanted if-statement, and made the
7166 body unconditional.
7167
25c22937
BI
71682013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
7169
7170 * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
7171 condition of the if-statement matches the rank of else-block and then-
7172 block when array notations are used.
7173 * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
7174 expression after the entire function body is parsed.
7175 (c_parser_expr_no_commas): Delayed creating array notation expressions
7176 to the end of function parsing.
7177 * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
7178 whole if-statement instead of just the condition.
ab20d992 7179 (expand_array_notation_exprs): Added MODIFY_EXPR case.
25c22937 7180
edd25645
BI
71812013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
7182
7183 PR c/57474
7184 * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
7185 array to NULL_TREE if they are unused. Also added a check for the
7186 field to be NULL before its fields are used in future.
ab20d992 7187
065ce7f1
RO
71882013-05-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
7189
7190 PR bootstrap/57450
7191 * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
7192 (build_array_notation_expr): Likewise.
7193
36536d79
BI
71942013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
7195
7196 * c-typeck.c (build_array_ref): Added a check to see if array's
7197 index is greater than one. If true, then emit an error.
7198 (build_function_call_vec): Exclude error reporting and checking
7199 for builtin array-notation functions.
7200 (convert_arguments): Likewise.
7201 (c_finish_return): Added a check for array notations as a return
7202 expression. If true, then emit an error.
7203 (c_finish_loop): Added a check for array notations in a loop
7204 condition. If true then emit an error.
7205 (lvalue_p): Added a ARRAY_NOTATION_REF case.
7206 (build_binary_op): Added a check for array notation expr inside
7207 op1 and op0. If present, we call another function to find correct
7208 type.
7209 * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
7210 * c-parser.c (c_parser_compound_statement): Check if array
7211 notation code is used in tree, if so, then transform them into
7212 appropriate C code.
7213 (c_parser_expr_no_commas): Check if array notation is used in LHS
7214 or RHS, if so, then build array notation expression instead of
7215 regular modify.
7216 (c_parser_postfix_expression_after_primary): Added a check for
7217 colon(s) after square braces, if so then handle it like an array
7218 notation. Also, break up array notations in unary op if found.
7219 (c_parser_direct_declarator_inner): Added a check for array
7220 notation.
7221 (c_parser_compound_statement): Added a check for array notation in
7222 a stmt. If one is present, then expand array notation expr.
7223 (c_parser_if_statement): Likewise.
7224 (c_parser_switch_statement): Added a check for array notations in
7225 a switch statement's condition. If true, then output an error.
7226 (c_parser_while_statement): Similarly, but for a while.
7227 (c_parser_do_statement): Similarly, but for a do-while.
7228 (c_parser_for_statement): Similarly, but for a for-loop.
7229 (c_parser_unary_expression): Check if array notation is used in a
7230 pre-increment or pre-decrement expression. If true, then expand
7231 them.
7232 (c_parser_array_notation): New function.
7233 * c-array-notation.c: New file.
7234 * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
ab20d992 7235
cd192ccc
MS
72362013-05-23 Mike Stump <mikestump@comcast.net>
7237
7238 * c-typeck.c (convert_for_assignment): Handle references to memory
7239 spaces better.
7240
427b248d
JM
72412013-05-16 Jason Merrill <jason@redhat.com>
7242
7243 * Make-lang.in (cc1$(exeext)): Use link mutex.
7244
44d90fe1
PC
72452013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
7246
7247 * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
7248 to simply use OPT_Wpointer_arith.
7249 (build_unary_op): Likewise.
7250
4e7d7b3d
JJ
72512013-04-03 Jakub Jelinek <jakub@redhat.com>
7252
7253 PR c/19449
7254 * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
7255 argument. If set, or it temporarily for parsing of the first
7256 argument into force_folding_builtin_constant_p.
7257 (c_parser_postfix_expression): Adjust callers.
7258
839b422f
RB
72592013-03-21 Richard Biener <rguenther@suse.de>
7260
7261 * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
7262 instead of DECL_DEBUG_EXPR_IS_FROM. Guard properly.
7263
2ee028f1
MP
72642013-02-12 Marek Polacek <polacek@redhat.com>
7265
7266 PR c/44938
7267 * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
7268 origtypes to NULL.
7269
8824edff
JJ
72702013-01-24 Jakub Jelinek <jakub@redhat.com>
7271
7272 PR c/56078
7273 * c-typeck.c (set_nonincremental_init_from_string): If
7274 constructor_max_index is NULL, treat it as if tree_int_cst_lt
7275 returned false.
7276 (process_init_element): Likewise.
7277
eadd3d0d
JJ
72782012-12-20 Jakub Jelinek <jakub@redhat.com>
7279
7280 PR c++/55619
7281 * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
7282 argument, don't call default_function_array_conversion
7283 nor c_fully_fold here.
7284 (c_parser_asm_statement): Adjust callers.
7285 * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
7286 and outputs here, and call default_function_array_conversion
7287 on inputs that don't need to be addressable.
7288
f8a93a2e
JJ
72892012-12-18 Jakub Jelinek <jakub@redhat.com>
7290
7291 PR c/39464
7292 * c-typeck.c (convert_for_assignment): For -Wpointer-sign
7293 warning require that both c_common_unsigned_type as well as
7294 c_common_signed_type is the same for both mvl and mvr types.
7295
9771b263
DN
72962012-11-16 Diego Novillo <dnovillo@google.com>
7297
7298 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
7299
7300 * c-common.c: Use new vec API in vec.h.
7301 * c-common.h: Likewise.
7302 * c-gimplify.c: Likewise.
7303 * c-pragma.c: Likewise.
7304 * c-pretty-print.c: Likewise.
7305 * c-pretty-print.h: Likewise.
7306 * c-semantics.c: Likewise.
7307 * c-decl.c: Likewise.
7308 * c-parser.c: Likewise.
7309 * c-tree.h: Likewise.
7310 * c-typeck.c: Likewise.
7311
880661a4
JW
73122012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
7313
7314 PR c++/54930
7315 * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
7316
077d1abe
MLI
73172012-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
7318
7319 PR c/53066
7320 * c-decl.c (warn_if_shadowing): Do not warn if a variable
7321 shadows a function, unless the variable is a function or a
7322 pointer-to-function.
7323
3a785c97
JJ
73242012-10-12 Jakub Jelinek <jakub@redhat.com>
7325
7326 PR c/54381
7327 * c-parser.c (struct c_tree_loc_pair): Removed.
7328 (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
7329 add location_t * and tree * arguments, fill in array of 3
7330 sizeof_arg trees and corresponding locs.
7331 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
7332 c_parser_expr_list callers.
7333 (c_parser_postfix_expression_after_primary): Likewise. Pass
7334 array of 3 sizeof_arg trees and locs (corresponding to first
7335 3 arguments) to sizeof_pointer_memaccess_warning.
7336
703c8606
LC
73372012-10-09 Lawrence Crowl <crowl@google.com>
7338
7339 * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
7340 * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
7341 hash table.
7342
5d9de0d0
PC
73432012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
7344
7345 PR c++/54194
7346 * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
7347 call.
7348
a212e43f
MG
73492012-10-09 Marc Glisse <marc.glisse@inria.fr>
7350
7351 PR c++/54427
7352 * c-typeck.c: Include c-common.h.
7353 (enum stv_conv): Moved to c-common.h.
7354 (scalar_to_vector): Moved to c-common.c.
7355 (build_binary_op): Adapt to scalar_to_vector's new prototype.
7356 * Make-lang.in: c-typeck.c depends on c-common.h.
7357
3b78de56
AC
73582012-10-04 Arnaud Charlet <charlet@adacore.com>
7359
7360 * c-decl.c (c_write_global_declarations): Fix handling of
7361 -fdump-ada-spec*.
7362
78c60e3d
SS
73632012-09-30 Sharad Singhai <singhai@google.com>
7364
7365 * c-decl.c (c_write_global_declarations): Use a different method
7366 to determine if the dump has ben initialized.
7367
9f33203d
JM
73682012-09-14 Joseph Myers <joseph@codesourcery.com>
7369
7370 PR c/54552
7371 * c-typeck.c (c_cast_expr): When casting to a type requiring
7372 C_MAYBE_CONST_EXPR to be created, pass the inner expression to
7373 c_fully_fold first.
7374
a27d595d
JM
73752012-09-14 Joseph Myers <joseph@codesourcery.com>
7376
7377 PR c/54103
7378 * c-typeck.c (build_unary_op): Pass original argument of
7379 TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
7380 any C_MAYBE_CONST_EXPR, if it has integer operands.
7381 (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
7382 TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
7383 to c_objc_common_truthvalue_conversion, then remove any
7384 C_MAYBE_CONST_EXPR, if they have integer operands. Use
7385 c_objc_common_truthvalue_conversion not
7386 c_common_truthvalue_conversion.
7387 (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
7388 call note_integer_operands for arguments with integer operands
7389 that are not integer constants.
7390
9feb29df
JJ
73912012-09-13 Jakub Jelinek <jakub@redhat.com>
7392
7393 PR c/54559
7394 * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
7395 COMPLEX_TYPE with in_late_binary_op set temporarily to true.
7396
d409320c
JJ
73972012-08-31 Jakub Jelinek <jakub@redhat.com>
7398
7399 PR c/54428
7400 * c-convert.c (convert): Don't call fold_convert_loc if
7401 TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
7402 is a COMPLEX_EXPR. Remove TYPE_MAIN_VARIANT check from
7403 COMPLEX_TYPE -> COMPLEX_TYPE conversion.
7404
6265d07c
JJ
74052012-08-24 Jakub Jelinek <jakub@redhat.com>
7406
7407 PR c/54355
7408 * c-decl.c (c_parser_label): Pass true as nested and fix up comments
7409 for nested and empty_ok arguments in the call to
7410 c_parser_declaration_or_fndef.
7411
1a4049e7
JJ
74122012-08-17 Jakub Jelinek <jakub@redhat.com>
7413
7414 * c-tree.h (c_last_sizeof_arg): Declare.
7415 * c-parser.c (struct c_tree_loc_pair): New type.
7416 (c_parser_expr_list): Add sizeof_arg argument. Fill it in if
7417 non-NULL.
7418 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
7419 (c_parser_postfix_expression_after_primary): Likewise. Call
7420 sizeof_pointer_memaccess_warning if needed.
7421 (sizeof_ptr_memacc_comptypes): New function.
7422 * c-typeck.c (c_last_sizeof_arg): New global variable.
7423 (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
7424
0229aee9
UB
74252012-07-24 Uros Bizjak <ubizjak@gmail.com>
7426
7427 * c-lang.h (lang_decl): Add variable_size GTY option.
7428
7ee2468b
SB
74292012-07-16 Steven Bosscher <steven@gcc.gnu.org>
7430
7431 * c-decl.c: Include dumpfile.h instead of tree-dump.h.
7432 * Make-lang.in: Fix dependencies.
7433
d4a10d0a
SB
74342012-06-29 Steven Bosscher <steven@gcc.gnu.org>
7435
7436 * Make-lang.in: New file, rules migrated from gcc/Makefile.in
7437 and add language Makefile hooks.
7438 * config-lang.in: New file.
7439 * c-config-lang.in: Moved from gcc/config-lang.in to here, and
7440 add the required "normal" config-lang.in rules.
7441 * c-lang.h: Moved from gcc/ to here.
7442 * c-tree.h: Likewise.
7443 * c-objc-common.c: Likewise.
7444 * c-objc-common.h: Likewise.
7445 * c-typeck.c: Likewise.
7446 * c-convert.c: Likewise.
7447 * c-lang.c: Likewise.
7448 * c-aux-info.c: Likewise.
7449 * c-errors.c: Likewise.
7450 * gccspec.c: Likewise.
7451 * c-decl.c: Likewise. Include gt-c-c-decl.h, not gt-c-decl.h.
7452 * c-parser.c: Likewise. Include gt-c-c-parser.h, not gt-c-parser.h.
7453\f
c48514be 7454Copyright (C) 2012-2021 Free Software Foundation, Inc.
d4a10d0a
SB
7455
7456Copying and distribution of this file, with or without modification,
7457are permitted in any medium without royalty provided the copyright
7458notice and this notice are preserved.