]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/c/ChangeLog
Propagate type attribute when merging extern declarations at local scope.
[thirdparty/gcc.git] / gcc / c / ChangeLog
CommitLineData
1d54b138
GA
12021-04-10 Jakub Jelinek <jakub@redhat.com>
2
3 PR c/99990
4 * c-decl.c (finish_decl): Don't overwrite TREE_TYPE of
5 error_mark_node.
6
4493b1c1
GA
72021-03-25 Jakub Jelinek <jakub@redhat.com>
8
9 PR c++/99565
10 * c-typeck.c (build_conditional_expr): Pass OEP_ADDRESS_OF_SAME_FIELD
11 to operand_equal_p.
12
5f256a70
GA
132021-03-19 Jakub Jelinek <jakub@redhat.com>
14
15 PR c/99588
16 * c-typeck.c (mark_exp_read): Recognize what build_atomic_assign
17 with modifycode NOP_EXPR produces and mark the _Atomic var as read
18 if found.
19 (build_atomic_assign): For modifycode of NOP_EXPR, use COMPOUND_EXPRs
20 rather than STATEMENT_LIST. Otherwise call mark_exp_read on lhs.
21 Set TREE_SIDE_EFFECTS on the TARGET_EXPR.
22
3c5b6d24
GA
232021-03-15 Tobias Burnus <tobias@codesourcery.com>
24
25 PR c++/99509
26 * c-decl.c (finish_decl): For 'omp declare target implicit' vars,
27 ensure that the varpool node is marked as offloadable.
28
ceae9533
GA
292021-03-05 Tobias Burnus <tobias@codesourcery.com>
30
31 PR c/99137
32 * c-parser.c (c_parser_oacc_clause_async): Reject comma expressions.
33
4028d01a
GA
342021-02-24 Martin Sebor <msebor@redhat.com>
35
36 PR middle-end/97172
37 * c-decl.c (free_attr_access_data): Clear attribute arg spec.
38
bf81237e
GA
392021-02-18 Jakub Jelinek <jakub@redhat.com>
40
41 PR c/99136
42 * c-typeck.c (c_finish_return): Don't wrap retval into
43 EXCESS_PRECISION_EXPR in functions that return void.
44
0c5cdb31
GA
452021-02-11 Marek Polacek <polacek@redhat.com>
46
47 * c-parser.c (c_parser_if_statement): Use vec_free.
48
a19dd5e6
GA
492021-02-04 Martin Sebor <msebor@redhat.com>
50
51 PR c/97882
52 * c-decl.c (locate_old_decl): Add type to diagnostic output.
53 (diagnose_mismatched_decls): Same.
54 (start_function): Introduce temporaries for better readability.
55 * c-typeck.c (comptypes_internal): Only consider complete enum
56 types in comparisons with integers.
57
f7884fb1
GA
582021-02-01 Martin Sebor <msebor@redhat.com>
59
60 PR middle-end/97172
61 * c-decl.c (free_attr_access_data): New function.
62 (c_parse_final_cleanups): Call free_attr_access_data.
63
59cf67d1
GA
642021-01-16 Kwok Cheung Yeung <kcy@codesourcery.com>
65
66 * c-parser.c (c_parser_omp_clause_detach): New.
67 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_DETACH clause.
68 (OMP_TASK_CLAUSE_MASK): Add mask for PRAGMA_OMP_CLAUSE_DETACH.
69 * c-typeck.c (c_finish_omp_clauses): Handle PRAGMA_OMP_CLAUSE_DETACH
70 clause. Prevent use of detach with mergeable and overriding the
71 data sharing mode of the event handle.
72
2f7f0d32
GA
732021-01-15 Jakub Jelinek <jakub@redhat.com>
74
75 * c-typeck.c (c_finish_omp_clauses): For reduction build array with
76 unqualified element type and then call c_build_qualified_type on the
77 ARRAY_TYPE.
78
7d187e4f
GA
792021-01-07 Richard Biener <rguenther@suse.de>
80
81 * gimple-parser.c (c_parser_gimple_compound_statement): Only
82 reallocate loop array if it is too small.
83
eefe499f
GA
842020-12-16 Martin Uecker <muecker@gwdg.de>
85
86 PR c/98047
87 * c-typeck.c (build_modify_expr): Drop qualifiers.
88
892020-12-16 Martin Uecker <muecker@gwdg.de>
90
91 PR c/98260
92 * c-parser.c (c_parser_expression): Look into
93 nop expression when marking expressions as read.
94
d52945ce
GA
952020-12-14 Martin Liska <mliska@suse.cz>
96
97 PR sanitizer/98204
98 * c-typeck.c (pointer_diff): Do not emit a top-level
99 sanitization.
100 (build_binary_op): Likewise.
101
ca2bd949
GA
1022020-12-09 Tobias Burnus <tobias@codesourcery.com>
103
104 * c-parser.c (c_parser_omp_allocate): New.
105 (c_parser_omp_construct): Call it.
106
1072020-12-09 Richard Biener <rguenther@suse.de>
108
109 PR c/98200
110 * gimple-parser.c (c_parser_gimple_postfix_expression): Return
111 early on error.
112
bc8a7013
GA
1132020-12-07 Martin Uecker <muecker@gwdg.de>
114
115 PR c/97981
116 * c-typeck.c (convert_lvalue_to_rvalue): Move the code
117 that drops qualifiers to the end of the function.
118
d48df6f2
GA
1192020-11-26 Martin Uecker <muecker@gwdg.de>
120
121 PR c/65455
122 PR c/92935
123 * c-parser.c (c_parser_declaration_or_fndef): Remove
124 redundant code to drop qualifiers of _Atomic types for __auto_type.
125 (c_parser_typeof_specifier): Do not drop qualifiers of _Atomic
126 types for __typeof__.
127
1e2c9a27
GA
1282020-11-24 Jakub Jelinek <jakub@redhat.com>
129
130 PR c/97958
131 * c-parser.c (c_parser_binary_expression): For omp atomic binary
132 expressions, use make_node instead of build2 to avoid checking build2
133 performs.
134
8e6198d0
GA
1352020-11-23 Joseph Myers <joseph@codesourcery.com>
136
137 PR c/95630
138 * c-typeck.c (build_binary_op): Use pedwarn_c99 with OPT_Wpedantic
139 for comparisons of complete and incomplete pointers.
140
7a97e2fc
GA
1412020-11-21 Aaron Sawdey <acsawdey@linux.ibm.com>
142
143 * c-aux-info.c (gen_type): Support opaque types.
144
82e5048e
GA
1452020-11-20 Martin Sebor <msebor@redhat.com>
146
147 PR middle-end/97879
148 * c-decl.c (start_function): Set ATTR_FLAG_INTERNAL in flags.
149
1502020-11-20 Jakub Jelinek <jakub@redhat.com>
151
152 PR other/97911
153 * Make-lang.in (c.serial): Change from goal to a variable.
154 (.PHONY): Drop c.serial.
155
1562020-11-20 Martin Uecker <muecker@gwdg.de>
157
158 * c-typeck.c (convert_lvalue_to_rvalue): Drop qualifiers.
159
d62586ee
GA
1602020-11-19 Jakub Jelinek <jakub@redhat.com>
161
162 PR c/97860
163 * c-decl.c (get_parm_array_spec): Bail out of nelts is
164 error_operand_p.
165
25bb75f8
GA
1662020-11-18 Jakub Jelinek <jakub@redhat.com>
167
168 * Make-lang.in (c.serial): New goal.
169 (.PHONY): Add c.serial c.prev.
170 (cc1$(exeext)): Call LINK_PROGRESS.
171
77f67db2
GA
1722020-11-13 Vladimir N. Makarov <vmakarov@redhat.com>
173
174 * c-parser.c (c_parser_asm_statement): Parse outputs for asm
175 goto too.
176 * c-typeck.c (build_asm_expr): Remove an assert checking output
177 absence for asm goto.
178
1792020-11-13 Jakub Jelinek <jakub@redhat.com>
180
181 * c-typeck.c (c_finish_omp_clauses): Don't clear
182 OMP_CLAUSE_REDUCTION_INSCAN unless reduction_seen == -2.
183
1842020-11-13 Iain Sandoe <iain@sandoe.co.uk>
185
186 PR objc/77404
187 * c-parser.c (c_parser_objc_class_definition): Pass the
188 location of the class name to the interface declaration.
189
bb622641
GA
1902020-11-10 Strager Neds <strager.nds@gmail.com>
191
192 * c-decl.c (merge_decls): Use new overload of
193 set_decl_section_name.
194
1952020-11-10 Chung-Lin Tang <cltang@codesourcery.com>
196
197 * c-parser.c (c_parser_omp_target_data): Add use of
198 new c_omp_adjust_map_clauses function. Add GOMP_MAP_ATTACH_DETACH as
199 handled map clause kind.
200 (c_parser_omp_target_enter_data): Likewise.
201 (c_parser_omp_target_exit_data): Likewise.
202 (c_parser_omp_target): Likewise.
203 * c-typeck.c (handle_omp_array_sections): Adjust COMPONENT_REF case to
204 use GOMP_MAP_ATTACH_DETACH map kind for C_ORT_OMP region type.
205 (c_finish_omp_clauses): Adjust bitmap checks to allow struct decl and
206 same struct field access to co-exist on OpenMP construct.
207
2da7ee05
GA
2082020-11-07 Martin Uecker <muecker@gwdg.de>
209
210 * c-parser.c (c_parser_label): Implement mixing of labels and code.
211 (c_parser_all_labels): Likewise.
212
44cab2d8
GA
2132020-11-06 Iain Sandoe <iain@sandoe.co.uk>
214
215 * c-parser.c (c_parser_objc_at_property_declaration):
216 Improve parsing fidelity. Associate better location info
217 with @property attributes. Clean up the interface to
218 objc_add_property_declaration ().
219
2202020-11-06 Nathan Sidwell <nathan@acm.org>
221
222 * c-decl.c (diagnose_mismatched_decls): Rename
223 DECL_IS_BUILTIN->DECL_IS_UNDECLARED_BUILTIN.
224 (warn_if_shadowing, implicitly_declare, names_builtin_p)
225 (collect_source_refs): Likewise.
226 * c-typeck.c (inform_declaration, inform_for_arg)
227 (convert_for_assignment): Likewise.
228
2292020-11-06 Tobias Burnus <tobias@codesourcery.com>
230
231 * c-parser.c (c_parser_omp_atomic): Add openacc parameter and update
232 OpenACC matching.
233 (c_parser_omp_construct): Update call.
234
35c125cb
GA
2352020-11-04 Jakub Jelinek <jakub@redhat.com>
236
237 PR c++/97670
238 * c-typeck.c (c_finish_omp_clauses): Look through array reductions to
239 find underlying decl to clear in the aligned_head bitmap.
240
2412020-11-04 Joseph Myers <joseph@codesourcery.com>
242
243 * c-decl.c (handle_nodiscard_attribute): New.
244 (std_attribute_table): Add nodiscard.
245 * c-parser.c (c_parser_std_attribute): Expect argument to
246 nodiscard attribute to be a string. Do not special-case ignoring
247 nodiscard.
248 * c-typeck.c (maybe_warn_nodiscard): New.
249 (build_compound_expr, emit_side_effect_warnings): Call
250 maybe_warn_nodiscard.
251 (c_process_expr_stmt, c_finish_stmt_expr): Also call
252 emit_side_effect_warnings if warn_unused_result.
253
4f0606fe
GA
2542020-10-29 Asher Gordon <AsDaGo@posteo.net>
255
256 * c-typeck.c (free_all_tagged_tu_seen_up_to): Replace free
257 with XDELETE.
258 (finish_init): Likewise.
259 (pop_init_level): Likewise.
260
e93aae4a
GA
2612020-10-28 Joseph Myers <joseph@codesourcery.com>
262
263 * c-decl.c (store_parm_decls_newstyle): Use pedwarn_c11 not
264 error_at for omitted parameter name.
265
2662020-10-28 Jakub Jelinek <jakub@redhat.com>
267
268 * c-parser.c (c_parser_omp_clause_name): Handle allocate.
269 (c_parser_omp_clause_allocate): New function.
270 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_ALLOCATE.
271 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
272 OMP_PARALLEL_CLAUSE_MASK, OMP_SINGLE_CLAUSE_MASK,
273 OMP_TASK_CLAUSE_MASK, OMP_TASKGROUP_CLAUSE_MASK,
274 OMP_DISTRIBUTE_CLAUSE_MASK, OMP_TEAMS_CLAUSE_MASK,
275 OMP_TARGET_CLAUSE_MASK, OMP_TASKLOOP_CLAUSE_MASK): Add
276 PRAGMA_OMP_CLAUSE_ALLOCATE.
277 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_ALLOCATE.
278
89bb01e7
GA
2792020-10-27 Joseph Myers <joseph@codesourcery.com>
280
281 * c-parser.c (c_parser_std_attribute_specifier): Allow duplicate
282 standard attributes.
283
efe71fcc
GA
2842020-10-23 Marek Polacek <polacek@redhat.com>
285
286 PR c++/91741
287 * c-parser.c (c_parser_binary_expression): Implement -Wsizeof-array-div.
288 (c_parser_postfix_expression): Set PAREN_SIZEOF_EXPR.
289 (c_parser_expr_list): Handle PAREN_SIZEOF_EXPR like SIZEOF_EXPR.
290 * c-tree.h (char_type_p): Declare.
291 * c-typeck.c (char_type_p): No longer static.
292
2932020-10-23 Martin Sebor <msebor@redhat.com>
294
295 PR middle-end/97552
296 * c-decl.c (get_parm_array_spec): Handle static VLA parameters.
297
2fe5b7d1
GA
2982020-09-19 Martin Sebor <msebor@redhat.com>
299
300 PR c/50584
301 * c-decl.c (lookup_last_decl): Define new function.
302 (c_decl_attributes): Call it.
303 (start_decl): Add argument and use it.
304 (finish_decl): Call build_attr_access_from_parms and decl_attributes.
305 (get_parm_array_spec): Define new function.
306 (push_parm_decl): Call get_parm_array_spec.
307 (start_function): Call warn_parm_array_mismatch. Build attribute
308 access and add it to current function.
309 * c-parser.c (c_parser_declaration_or_fndef): Diagnose mismatches
310 in forms of array parameters.
311 * c-tree.h (start_decl): Add argument.
312
3132020-09-19 Sandra Loosemore <sandra@codesourcery.com>
314
315 * c-decl.c (c_break_label, c_cont_label): Delete, and replace
316 with...
317 (in_statement): New.
318 (start_function): Adjust for above change.
319 (c_push_function_context, c_pop_function_context): Likewise.
320 * c-lang.h (struct language_function): Likewise.
321 * c-objc-common.h (LANG_HOOKS_BLOCK_MAY_FALLTHRU): Define.
322 * c-parser.c (objc_foreach_break_label, objc_foreach_continue_label):
323 New.
324 (c_parser_statement_after_labels): Adjust calls to c_finish_bc_stmt.
325 (c_parser_switch_statement): Adjust break/switch context handling
326 and calls to renamed functions.
327 (c_parser_while_statement): Adjust break/switch context handling and
328 build a WHILE_STMT.
329 (c_parser_do_statement): Ditto, with DO_STMT respectively.
330 (c_parser_for_statement): Ditto, with FOR_STMT respectively.
331 (c_parser_omp_for_loop): Adjust break/switch context handling.
332 * c-tree.h (c_break_label, c_cont_label): Delete.
333 (IN_SWITCH_STMT, IN_ITERATION_STMT): Define.
334 (IN_OMP_BLOCK, IN_OMP_FOR, IN_OBJC_FOREACH): Define.
335 (in_statement, switch_statement_break_seen_p): Declare.
336 (c_start_case, c_finish_case): Renamed to...
337 (c_start_switch, c_finish_switch).
338 (c_finish_bc_stmt): Adjust arguments.
339 * c-typeck.c (build_function_call_vec): Don't try to print
340 statements with %qE format.
341 (struct c_switch): Rename switch_expr field to switch_stmt.
342 Add break_stmt_seen_p field.
343 (c_start_case): Rename to c_start_switch. Build a SWITCH_STMT
344 instead of a SWITCH_EXPR. Update for changes to struct c_switch.
345 (do_case): Update for changes to struct c_switch.
346 (c_finish_case): Rename to c_finish_switch. Update for changes to
347 struct c_switch and change of representation from SWITCH_EXPR to
348 SWITCH_STMT.
349 (c_finish_loop): Delete.
350 (c_finish_bc_stmt): Update to reflect changes to break/continue
351 state representation. Build a BREAK_STMT or CONTINUE_STMT instead
352 of a GOTO_EXPR except for objc foreach loops.
353
e1a4a8a0
GA
3542020-09-01 Jakub Jelinek <jakub@redhat.com>
355
356 PR c++/96867
357 * c-typeck.c (handle_omp_array_sections_1): Test C_ARRAY_PARAMETER
358 only on PARM_DECLs.
359
8f7ea26a
GA
3602020-08-28 Martin Sebor <msebor@redhat.com>
361
362 PR c/96596
363 * c-decl.c (match_builtin_function_types): Avoid dealing with erroneous
364 argument type.
365
8b394f01
GA
3662020-08-27 Martin Liska <mliska@suse.cz>
367
368 * gimple-parser.c (c_parser_gimple_compound_statement): Set exact argument of a vector
369 growth function to true.
370
db0f6efe
GA
3712020-08-25 Tobias Burnus <tobias@codesourcery.com>
372
373 PR c/96678
374 * c-typeck.c (handle_omp_array_sections_1): Talk about
375 array function parameter in the error message.
376
5c265693
GA
3772020-08-18 Jakub Jelinek <jakub@redhat.com>
378
379 PR c/96571
380 * c-parser.c (c_parser_generic_selection): Change match_found from bool
381 to int, holding index of the match. Call mark_exp_read on the selector
382 expression and on expressions other than the selected one.
383
4967ca2f
GA
3842020-08-01 Richard Sandiford <richard.sandiford@arm.com>
385
386 PR c/96377
387 * c-typeck.c (process_init_element): Split test for whether to
388 recurse into a record, union or array into...
389 (initialize_elementwise_p): ...this new function. Don't recurse
390 into a vector type if the initialization value is also a vector.
391
48cc2e46
GA
3922020-07-31 Richard Biener <rguenther@suse.de>
393
394 PR debug/96383
395 * c-objc-common.h (LANG_HOOKS_FINALIZE_EARLY_DEBUG):
396 Define to c_common_finalize_early_debug.
397
3ea9abca
GA
3982020-07-22 Tobias Burnus <tobias@codesourcery.com>
399
400 * c-parser.c (c_parser_omp_clause_hint): Require nonnegative hint clause.
401 (c_parser_omp_critical): Permit hint(0) clause without named critical.
402 (c_parser_omp_construct): Don't assert if error_mark_node is returned.
403
30430061
GA
4042020-07-21 Sunil K Pandey <skpgkp2@gmail.com>
405
406 PR target/95237
407 * c-decl.c (finish_decl): Call target hook
408 lower_local_decl_alignment to lower local decl alignment.
409
3f8ca9cb
GA
4102020-07-09 Julian Brown <julian@codesourcery.com>
411 Thomas Schwinge <thomas@codesourcery.com>
412
413 PR middle-end/95270
414 * c-typeck.c (c_finish_omp_clauses): Set OMP_CLAUSE_SIZE (bias) to zero
415 for standalone attach/detach clauses.
416
a82c4c4c 4172020-07-08 Eric Botcazou <ebotcazou@adacore.com>
50873cc5
GA
418
419 * c-typeck.c (convert_for_assignment): If -Wscalar-storage-order is
420 set, warn for conversion between pointers that point to incompatible
421 scalar storage orders.
422
f60ee68d
GA
4232020-07-07 Kaipeng Zhou <zhoukaipeng3@huawei.com>
424
425 * c-parser.c (c_parser_statement_after_labels): Pass correct
426 parameters to c_parser_do_statement.
427
56638b9b
GA
4282020-06-16 Jakub Jelinek <jakub@redhat.com>
429
430 * c-parser.c (c_parser_expr_no_commas): Save, clear and restore
431 c_in_omp_for.
432 (c_parser_omp_for_loop): Set c_in_omp_for around some calls to avoid
433 premature c_fully_fold. Defer explicit c_fully_fold calls to after
434 c_finish_omp_for.
435 * c-tree.h (c_in_omp_for): Declare.
436 * c-typeck.c (c_in_omp_for): Define.
437 (build_modify_expr): Avoid c_fully_fold if c_in_omp_for.
438 (digest_init): Likewise.
439 (build_binary_op): Likewise.
440
4412020-06-16 Jakub Jelinek <jakub@redhat.com>
442
443 * c-parser.c (c_parser_omp_clause_schedule): Reject modifier separated
444 from kind by comma rather than colon.
445
1a59f3db
GA
4462020-06-05 Mark Wielaard <mark@klomp.org>
447
448 * c-decl.c (implicit_decl_warning): When warned and olddecl is
449 an undeclared builtin, then add a fixit header hint, if found.
450 (implicitly_declare): Add OPT_Wbuiltin_declaration_mismatch to
451 warning_at about implicit builtin declaration type mismatch.
452
9a5b7438
GA
4532020-06-03 Mark Wielaard <mark@klomp.org>
454
455 * c-parser.c (struct c_parser): Add seen_string_literal
456 bitfield.
457 (c_parser_consume_token): Reset seen_string_literal.
458 (c_parser_error_richloc): Add name_hint if seen_string_literal
459 and next token is a CPP_NAME and we have a missing header
460 suggestion for the name.
461 (c_parser_string_literal): Set seen_string_literal.
462
4632020-06-03 Mark Wielaard <mark@klomp.org>
464
465 * c-parser.c (c_parser_postfix_expression_after_primary): Add
466 scope with matching_parens after CPP_OPEN_PAREN.
467
4682020-06-03 Tobias Burnus <tobias@codesourcery.com>
469
470 * c-objc-common.h (LANG_HOOKS_OMP_PREDETERMINED_MAPPING): Redefine.
471
53ffb43a
GA
4722020-05-28 Nicolas Bértolo <nicolasbertolo@gmail.com>
473
474 * Make-lang.in: Remove extra slash.
475
8f66f175
ML
4762020-05-19 Martin Liska <mliska@suse.cz>
477
478 * c-parser.c: Fix typo.
479
49ddde69
JJ
4802020-05-14 Jakub Jelinek <jakub@redhat.com>
481
482 * c-parser.c (c_parser_omp_target): Set cfun->has_omp_target.
483
eb72dc66
RB
4842020-05-07 Richard Biener <rguenther@suse.de>
485
486 PR middle-end/94703
487 * gimple-parser.c (c_parser_parse_ssa_name): Do not set
488 DECL_GIMPLE_REG_P.
489
bf915591
JJ
4902020-04-30 Jakub Jelinek <jakub@redhat.com>
491
492 PR c/94842
493 * c-decl.c (set_labels_context_r): In addition to context-less
494 LABEL_DECLs adjust also LABEL_DECLs with context equal to
495 parent function if any.
496 (store_parm_decls): Adjust comment.
497
e1113ffb
JJ
4982020-04-19 Jakub Jelinek <jakub@redhat.com>
499
500 PR objc/94637
501 * c-parser.c (c_parser_objc_selector_arg): Handle CPP_SCOPE like
502 two CPP_COLON tokens.
503
2e389749
JJ
5042020-04-17 Jakub Jelinek <jakub@redhat.com>
505
506 PR other/94629
507 * c-parser.c (c_parser_oacc_routine): Remove redundant assignment
508 to data.clauses.
509
2dc9294c
JJ
5102020-04-15 Jakub Jelinek <jakub@redhat.com>
511
512 PR c/94593
513 * c-parser.c (c_parser_pragma) <case PRAGMA_OMP_REQUIRES>: Reject
514 requires directive when not at file scope.
515
13e41d8b
TB
5162020-04-08 Tobias Burnus <tobias@codesourcery.com>
517
518 PR middle-end/94120
519 * c-decl.c (c_check_in_current_scope): New function.
520 * c-tree.h (c_check_in_current_scope): Declare it.
521 * c-parser.c (c_parser_oacc_declare): Add check that variables
522 are declared in the same scope as the directive. Fix handling
523 of namespace vars.
524
4df50a05
JJ
5252020-04-07 Jakub Jelinek <jakub@redhat.com>
526
527 PR c++/94512
528 * c-parser.c (c_parser_omp_parallel): Set OMP_PARALLEL_COMBINED
529 if c_parser_omp_master succeeded.
530
5db9e893
JJ
5312020-03-23 Jakub Jelinek <jakub@redhat.com>
532
533 PR gcov-profile/94029
534 PR c/94239
535 * c-parser.c (c_parser_declaration_or_fndef): Initialize endloc to
536 the function_start_locus location. Don't do that afterwards for the
537 __GIMPLE body parsing.
538
9def91e9
JJ
5392020-03-19 Jakub Jelinek <jakub@redhat.com>
540
541 PR gcov-profile/94029
542 * c-tree.h (finish_function): Add location_t argument defaulted to
543 input_location.
544 * c-parser.c (c_parser_compound_statement): Add endlocp argument and
545 set it to the locus of closing } if non-NULL.
546 (c_parser_compound_statement_nostart): Return locus of closing }.
547 (c_parser_parse_rtl_body): Likewise.
548 (c_parser_declaration_or_fndef): Propagate locus of closing } to
549 finish_function.
550 * c-decl.c (finish_function): Add end_loc argument, use it instead of
551 input_location to set function_end_locus.
552
046c5890
JJ
5532020-03-17 Jakub Jelinek <jakub@redhat.com>
554
555 PR c/94172
556 * c-tree.h (C_TYPE_INCOMPLETE_VARS): Define to TYPE_LANG_SLOT_1
557 instead of TYPE_VFIELD, and support it on {RECORD,UNION,ENUMERAL}_TYPE.
558 (TYPE_ACTUAL_ARG_TYPES): Check that it is only used on FUNCTION_TYPEs.
559 * c-decl.c (pushdecl): Push C_TYPE_INCOMPLETE_VARS also to
560 ENUMERAL_TYPEs.
561 (finish_incomplete_vars): New function, moved from finish_struct. Use
562 relayout_decl instead of layout_decl.
563 (finish_struct): Remove obsolete comment about C_TYPE_INCOMPLETE_VARS
564 being TYPE_VFIELD. Use finish_incomplete_vars.
565 (finish_enum): Clear C_TYPE_INCOMPLETE_VARS. Call
566 finish_incomplete_vars.
567 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
568 also on ENUMERAL_TYPEs.
569
c015ff8c
JJ
5702020-03-16 Jakub Jelinek <jakub@redhat.com>
571
572 PR c/94179
573 * c-fold.c (c_fully_fold_internal): Handle MEM_REF.
574
f2e9fe5f
MS
5752020-03-13 Martin Sebor <msebor@redhat.com>
576
577 PR c/94040
578 * c-decl.c (builtin_structptr_type_count): New constant.
579 (match_builtin_function_types): Reject decls that are incompatible
580 in types pointed to by pointers.
581 (diagnose_mismatched_decls): Adjust comments.
582
c9d70946
JM
5832020-03-05 Joseph Myers <joseph@codesourcery.com>
584
585 PR c/93577
586 * c-typeck.c (pop_init_level): Do not diagnose initializers as
587 empty when initialized type is error_mark_node.
588 (set_designator, process_init_element): Ignore initializers for
589 elements of a variable-size type or of error_mark_node.
590
726e292d
MS
5912020-03-01 Martin Sebor <msebor@redhat.com>
592
593 PR middle-end/93926
594 * c-decl.c (types_close_enough_to_match): New function.
595 (match_builtin_function_types):
596 (diagnose_mismatched_decls): Add missing inform call to a warning.
597
a499c2f8
MS
5982020-03-01 Martin Sebor <msebor@redhat.com>
599
600 PR c/93812
601 * c-typeck.c (build_functype_attribute_variant): New function.
602 (composite_type): Call it.
603
9c3da8cc
JJ
6042020-02-25 Jakub Jelinek <jakub@redhat.com>
605
606 PR other/93912
607 * gimple-parser.c (c_parser_gimple_parse_bb_spec_edge_probability):
608 Rename last argument from probablity to probability.
609
bacdd5e9
JJ
6102020-02-13 Jakub Jelinek <jakub@redhat.com>
611
612 PR c/93576
613 * c-decl.c (grokdeclarator): If this_size_varies, only push size into
614 *expr if it has side effects.
615
f9eb0973
JL
6162020-01-30 Jeff Law <law@redhat.com>
617
618 PR c/88660
619 * c-parser.c (c_parser_switch_statement): Make sure to request
620 marking the switch expr as used.
621
ac68e287
JM
6222020-01-22 Joseph Myers <joseph@codesourcery.com>
623
624 PR c/93348
625 * c-typeck.c (build_c_cast): Call remove_c_maybe_const_expr on
626 argument with integer operands.
627
852f0ae8
KK
6282020-01-16 Kerem Kat <keremkat@gmail.com>
629
630 PR c/92833
631 * c-parser.c (c_parser_consume_token): Fix peeked token stack pop
632 to support 4 available tokens.
633
e2346a33
JM
6342020-01-15 Joseph Myers <joseph@codesourcery.com>
635
636 PR c/93072
637 * c-decl.c (pushdecl): Use TREE_PUBLIC, not DECL_EXTERNAL, to
638 determine whether to set DECL_CONTEXT.
639
3d77686d
JM
6402020-01-13 Joseph Myers <joseph@codesourcery.com>
641
642 PR c/93241
643 * c-typeck.c (build_c_cast): Check for expressions with integer
644 operands that can occur in an unevaluated part of an integer
645 constant expression and call note_integer_operands as needed.
646
f74c4b2c
RB
6472019-01-08 Richard Biener <rguenther@suse.de>
648
649 PR middle-end/93199
650 * gimple-parser.c (c_parser_parse_gimple_body): Remove __PHI IFN
651 permanently.
652
8d9254fc
JJ
6532020-01-01 Jakub Jelinek <jakub@redhat.com>
654
655 Update copyright years.
656
39292e25
EB
6572019-12-20 Eric Botcazou <ebotcazou@adacore.com>
658
659 * c-decl.c (collect_source_ref_cb): Delete.
660 (for_each_global_decl): Rename into...
661 (collect_source_refs): ...this. Call collect_source_ref directly.
662 (c_parse_final_cleanups): Always call collect_source_ref on the main
663 input filename.
664
519d7496
JB
6652019-12-19 Julian Brown <julian@codesourcery.com>
666 Cesar Philippidis <cesar@codesourcery.com>
667
668 * c-parser.c (c_parser_omp_clause_name): Add parsing of attach and
669 detach clauses.
670 (c_parser_omp_variable_list): Add ALLOW_DEREF optional parameter.
671 Allow deref (->) in variable lists if true.
672 (c_parser_omp_var_list_parens): Add ALLOW_DEREF optional parameter.
673 Pass to c_parser_omp_variable_list.
674 (c_parser_oacc_data_clause): Support attach and detach clauses. Update
675 call to c_parser_omp_variable_list.
676 (c_parser_oacc_all_clauses): Support attach and detach clauses.
677 (OACC_DATA_CLAUSE_MASK, OACC_ENTER_DATA_CLAUSE_MASK,
678 OACC_KERNELS_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK,
679 OACC_SERIAL_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_ATTACH.
680 (OACC_EXIT_DATA_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_DETACH.
681 * c-typeck.c (handle_omp_array_sections_1): Reject subarrays for attach
682 and detach. Support deref.
683 (handle_omp_array_sections): Use GOMP_MAP_ATTACH_DETACH instead of
684 GOMP_MAP_ALWAYS_POINTER for OpenACC.
685 (c_oacc_check_attachments): New function.
686 (c_finish_omp_clauses): Check attach/detach arguments for being
687 pointers using above. Support deref.
688
a6163563
JB
6892019-12-19 Julian Brown <julian@codesourcery.com>
690 Maciej W. Rozycki <macro@codesourcery.com>
691 Tobias Burnus <tobias@codesourcery.com>
692 Thomas Schwinge <thomas@codesourcery.com>
693
694 * c-parser.c (c_parser_omp_clause_name): Support no_create.
695 (c_parser_oacc_data_clause): Likewise.
696 (c_parser_oacc_all_clauses): Likewise.
697 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
698 (OACC_PARALLEL_CLAUSE_MASK, OACC_SERIAL_CLAUSE_MASK): Add
699 PRAGMA_OACC_CLAUSE_NO_CREATE.
700 * c-typeck.c (handle_omp_array_sections): Support
701 GOMP_MAP_NO_ALLOC.
702
d68f5d45
DM
7032019-12-09 David Malcolm <dmalcolm@redhat.com>
704
705 * c-objc-common.c (range_label_for_type_mismatch::get_text):
706 Replace label_text ctor calls.
707
4691bf46
JM
7082019-12-04 Joseph Myers <joseph@codesourcery.com>
709
710 PR c/36941
711 PR c/88827
712 * c-typeck.c (convert_lvalue_to_rvalue): Call
713 require_complete_type for arguments not of void types.
714 (build_indirect_ref): Do not diagnose dereferencing pointers to
715 incomplete types.
716 * c-tree.h (C_TYPE_ERROR_REPORTED): Remove.
717
85d11957
JM
7182019-12-03 Joseph Myers <joseph@codesourcery.com>
719
720 PR c/88704
721 * c-decl.c (store_parm_decls_oldstyle): Diagnose use of [*] in
722 old-style parameter definitions.
723
4569f8b3
SL
7242019-12-01 Sandra Loosemore <sandra@codesourcery.com>
725
726 PR target/92499
727
728 * c-decl.c (flexible_array_type_p): Move to common code.
729
65ef05d0
RS
7302019-11-30 Richard Sandiford <richard.sandiford@arm.com>
731
732 * c-decl.c (start_decl): Allow initialization of variables whose
733 size is a POLY_INT_CST.
734 (finish_decl): Use verify_type_context to check whether the target
735 allows variables with a particular type to have static or thread-local
736 storage duration. Don't raise a second error if such variables do
737 not have a constant size.
738 (grokdeclarator): Use verify_type_context to check whether the
739 target allows fields or array elements to have a particular type.
740 * c-typeck.c (pointer_diff): Use verify_type_context to test whether
741 the target allows pointer difference for the types involved.
742 (build_unary_op): Likewise for pointer increment and decrement.
743
34b43828
JM
7442019-11-29 Joseph Myers <joseph@codesourcery.com>
745
746 * c-parser.c (struct c_parser): Add members raw_tokens and
747 raw_tokens_used.
748 (c_lex_one_token): Add argument raw. Handle lexing raw tokens and
749 using previously-lexed raw tokens.
750 (c_parser_peek_nth_token_raw)
751 (c_parser_check_balanced_raw_token_sequence): New functions.
752 (c_parser_nth_token_starts_std_attributes): Use
753 c_parser_check_balanced_raw_token_sequence for Objective-C.
754
5b8d9367
JM
7552019-11-25 Joseph Myers <joseph@codesourcery.com>
756
757 PR c/91985
758 * c-decl.c (finish_declspecs): Use int instead of decimal
759 floating-point types if decimal floating-point not supported.
760
1723e1be
JM
7612019-11-25 Joseph Myers <joseph@codesourcery.com>
762
763 * c-tree.h (struct c_declarator): Use a structure for id member.
764 * c-decl.c (grokdeclarator): Extract attributes from cdk_id
765 declarators at the start, not when handling individual declarators
766 later. Use u.id.id instead of u.id.
767 (grokfield): Use u.id.id instead of u.id.
768 (build_id_declarator): Set u.id.id and u.id.attrs.
769 (finish_declspecs): Handle postfix attributes in case of typedef
770 name or typeof used.
771 * c-parser.c (c_parser_direct_declarator)
772 (c_parser_direct_declarator_inner): Place declarator for
773 attributes inside that for function or array, not outside. Set
774 u.id.attrs for identifiers.
775 (c_parser_parameter_declaration): Use u.id.id instead of u.id.
776 * gimple-parser.c (c_parser_gimple_declaration): Use u.id.id
777 instead of u.id.
778
bdaf8be1
JJ
7792019-11-22 Jakub Jelinek <jakub@redhat.com>
780
781 PR c/90677
782 * c-decl.c (identifier_global_tag): Define.
783
3e00ba47
RB
7842019-11-20 Richard Biener <rguenther@suse.de>
785
786 PR c/92088
787 * c-decl.c (grokdeclarator): Prevent inlining of nested
788 function with VLA arguments.
789
8c5b727a
JM
7902019-11-20 Joseph Myers <joseph@codesourcery.com>
791
792 * c-decl.c (c_warn_type_attributes): New function.
793 (groktypename, grokdeclarator, finish_declspecs): Call
794 c_warn_type_attributes before applying attributes to types.
795 * c-tree.h (c_warn_type_attributes): Declare.
796
192961ff
JM
7972019-11-19 Joseph Myers <joseph@codesourcery.com>
798
799 * c-decl.c (c_warn_unused_attributes): Use pedwarn not warning for
800 standard attributes.
801 * c-parser.c (c_parser_std_attribute): Take argument for_tm. Use
802 pedwarn for unknown standard attributes and return error_mark_node
803 for them.
804
20a38017
MM
8052019-11-18 Matthew Malcomson <matthew.malcomson@arm.com>
806
807 * c-parser.c (c_parser_parse_rtl_body): Always call
808 run_rtl_passes, even if startwith pass is not provided.
809
d5fbe5e0
JM
8102019-11-15 Joseph Myers <joseph@codesourcery.com>
811
812 * c-parser.c (c_parser_std_attribute_specifier): Diagnose
813 duplicate standard attributes.
814
97cc1187
JM
8152019-11-15 Joseph Myers <joseph@codesourcery.com>
816
817 * c-decl.c (std_attribute_table): Add maybe_unused.
818
f8aea5e3
JM
8192019-11-15 Joseph Myers <joseph@codesourcery.com>
820
821 * c-decl.c (std_attribute_table): Add fallthrough.
822 * c-parser.c (c_parser_declaration_or_fndef): Diagnose fallthrough
823 attribute at top level.
824
2cc94aa8
JM
8252019-11-15 Joseph Myers <joseph@codesourcery.com>
826
827 * c-decl.c (std_attribute_table): New.
828 (c_init_decl_processing): Register attributes from
829 std_attribute_table.
830 * c-parser.c (c_parser_attribute_arguments): Add arguments
831 require_string and allow_empty_args. All callers changed.
832 (c_parser_std_attribute): Set require_string argument for
833 "deprecated" attribute.
834
7c5890cc
JM
8352019-11-14 Joseph Myers <joseph@codesourcery.com>
836
837 * c-parser.c (c_parser_postfix_expression)
838 (c_parser_check_literal_zero): Handle CPP_UTF8CHAR.
839 * gimple-parser.c (c_parser_gimple_postfix_expression): Likewise.
840
e8738f4e
RS
8412019-11-14 Richard Sandiford <richard.sandiford@arm.com>
842
843 * c-typeck.c (build_conditional_expr): Use truth_type_for instead
844 of build_same_sized_truth_vector_type.
845 (build_vec_cmp): Likewise.
846
b2417b59
JJ
8472019-11-14 Jakub Jelinek <jakub@redhat.com>
848
bedb7f04
JJ
849 * c-parser.c (c_parser_omp_context_selector): Don't require score
850 argument to fit into shwi, just to be INTEGER_CST. Diagnose
851 negative score.
852
b2417b59
JJ
853 * c-parser.c (c_parser_omp_context_selector): Rename
854 CTX_PROPERTY_IDLIST to CTX_PROPERTY_NAME_LIST, add CTX_PROPERTY_ID.
855 Use CTX_PROPERTY_ID for atomic_default_mem_order, only allow a single
856 identifier in that. For CTX_PROPERTY_NAME_LIST, allow identifiers
857 and string literals.
858
4e03c3a7
JM
8592019-11-14 Joseph Myers <joseph@codesourcery.com>
860
861 * c-tree.h (enum c_typespec_kind): Add ctsk_tagref_attrs and
862 ctsk_tagfirstref_attrs.
863 (struct c_declspecs): Update description of attrs. Add
864 postfix_attrs and non_std_attrs_seen_p. Increase size of
865 typespec_kind bit-field.
866 (c_warn_unused_attributes): New declaration.
867 (parser_xref_tag): Update prototype.
868 * c-decl.c (c_warn_unused_attributes): New function.
869 (shadow_tag_warned): Handle ctsk_tagfirstref_attrs and
870 ctsk_tagref_attrs. Handle attribute declarations.
871 (check_compound_literal_type): Handle ctsk_tagfirstref_attrs.
872 (grokdeclarator): Handle standard attributes.
873 (parser_xref_tag): Add arguments have_std_attrs and attrs. Apply
874 attributes to incomplete type reference.
875 (xref_tag): Update call to parser_xref_tag.
876 (declspecs_add_addrspace, declspecs_add_type)
877 (declspecs_add_scspec, declspecs_add_attrs): Set
878 non_std_attrs_seen_p.
879 (finish_declspecs): Apply postfix standard attributes to type.
880 * c-parser.c (c_token_starts_declspecs)
881 (c_token_starts_declaration, c_parser_next_token_starts_declspecs)
882 (c_parser_next_tokens_start_declaration): Update comments.
883 (c_parser_consume_token, c_parser_consume_pragma): Handle moving
884 parser->tokens[2] to parser->tokens[1].
885 (c_parser_nth_token_starts_std_attributes)
886 (c_parser_std_attribute_specifier_sequence): New functions.
887 (c_parser_declaration_or_fndef): Add arguments have_attrs and
888 attrs. All callers changed. Handle standard attributes.
889 (c_parser_parms_declarator, c_parser_parms_list_declarator)
890 (c_parser_parameter_declaration): Add argument have_gnu_attrs.
891 All callers changed.
892 (c_parser_declspecs): Add arguments start_std_attr_ok and
893 end_std_attr_ok. All callers changed. Handle standard
894 attributes.
895 (c_parser_enum_specifier, c_parser_struct_or_union_specifier)
896 (c_parser_direct_declarator, c_parser_direct_declarator_inner)
897 (c_parser_compound_statement_nostart, c_parser_all_labels)
898 (c_parser_label, c_parser_statement, c_parser_for_statement):
899 Handle standard attributes.
900 * c-parser.h (c_parser_declspecs): Update prototype.
901 * gimple-parser.c (c_parser_gimple_declaration): Update call to
902 c_parser_declspecs.
903
0c29cac4
ML
9042019-11-12 Martin Liska <mliska@suse.cz>
905
906 * gimple-parser.c: Do not include params.h.
907
028d4092
ML
9082019-11-12 Martin Liska <mliska@suse.cz>
909
910 * gimple-parser.c (c_parser_parse_gimple_body): Replace old parameter syntax
911 with the new one, include opts.h if needed. Use SET_OPTION_IF_UNSET
912 macro.
913
62aee289
MR
9142019-11-12 Maciej W. Rozycki <macro@codesourcery.com>
915 Frederik Harwath <frederik@codesourcery.com>
916
917 gcc/c/
918 * c-parser.c (OACC_SERIAL_CLAUSE_MASK): New macro.
919 (c_parser_oacc_kernels_parallel): Rename function to...
920 (c_parser_oacc_compute): ... this. Handle PRAGMA_OACC_SERIAL.
921 (c_parser_omp_construct): Update accordingly.
922
923
7cec9588
JJ
9242019-11-11 Jakub Jelinek <jakub@redhat.com>
925
926 * c-parser.c (c_parser_translation_unit): Diagnose declare target
927 without corresponding end declare target.
928
f486280c
RS
9292019-11-08 Richard Sandiford <richard.sandiford@arm.com>
930
931 * c-convert.c (convert): Only handle vector conversions if one of
932 the types satisfies gnu_vector_type_p or if -flax-vector-conversions
933 allows it.
934 * c-typeck.c (build_array_ref): Only allow vector indexing if the
935 vectors satisfy gnu_vector_type_p.
936 (build_unary_op): Only allow unary operators to be applied to
937 vectors if they satisfy gnu_vector_type_p.
938 (digest_init): Only allow by-element initialization of vectors
939 if they satisfy gnu_vector_type_p.
940 (really_start_incremental_init): Likewise.
941 (push_init_level): Likewise.
942 (pop_init_level): Likewise.
943 (process_init_element): Likewise.
944 (build_binary_op): Only allow binary operators to be applied to
945 vectors if they satisfy gnu_vector_type_p.
946
017c6491
JM
9472019-11-08 Joseph Myers <joseph@codesourcery.com>
948
949 * c-decl.c (grokparms): Convert () in a function definition to
950 (void) for C2x.
951 (store_parm_decls_oldstyle): Pedwarn for C2x.
952 (store_parm_decls): Update comment about () not generating a
953 prototype.
954
c01bd174
JM
9552019-11-07 Joseph Myers <joseph@codesourcery.com>
956
957 * c-parser.c (c_parser_attribute_arguments): New function.
958 Factored out of c_parser_gnu_attribute.
959 (c_parser_gnu_attribute): Use c_parser_attribute_arguments.
960 (c_parser_balanced_token_sequence, c_parser_std_attribute)
961 (c_parser_std_attribute_specifier): New functions.
962 (c_parser_transaction_attributes): Use
963 c_parser_std_attribute_specifier.
964
471c5330
JM
9652019-11-07 Joseph Myers <joseph@codesourcery.com>
966
967 * c-parser.c (c_parser): Remove lex_untranslated_string. Add
968 lex_joined_string and translate_strings_p.
969 (c_lex_one_token): Pass 0 or C_LEX_STRING_NO_JOIN to
970 c_lex_with_flags.
971 (c_parser_string_literal): New function.
972 (c_parser_static_assert_declaration_no_semi): Use
973 c_parser_string_literal. Do not set lex_untranslated_string.
974 (c_parser_asm_string_literal): Use c_parser_string_literal.
975 (c_parser_simple_asm_expr): Do not set lex_untranslated_string.
976 (c_parser_gnu_attributes): Set and restore translate_strings_p
977 instead of lex_untranslated_string.
978 (c_parser_asm_statement): Do not set lex_untranslated_string.
979 (c_parser_asm_operands): Likewise.
980 (c_parser_has_attribute_expression): Set and restore
981 translate_strings_p instead of lex_untranslated_string.
982 (c_parser_postfix_expression): Use c_parser_string_literal.
983 (pragma_lex): Likewise.
984 (c_parser_pragma_pch_preprocess): Set lex_joined_string.
985 (c_parse_file): Set translate_strings_p.
986 * gimple-parser.c (c_parser_gimple_postfix_expression)
987 (c_parser_gimple_or_rtl_pass_list): Use c_parser_string_literal.
988 * c-parser.c (c_parser_string_literal): Declare function.
989
d0c464d2
JJ
9902019-11-02 Jakub Jelinek <jakub@redhat.com>
991
992 * c-parser.c (c_finish_omp_declare_variant): Use
993 omp_get_context_selector instead of c_omp_get_context_selector.
994
ac2cfa6c
RS
9952019-10-29 Richard Sandiford <richard.sandiford@arm.com>
996
997 * c-tree.h (c_simulate_enum_decl): Declare.
998 * c-decl.c (c_simulate_enum_decl): New function.
999 * c-objc-common.h (LANG_HOOKS_SIMULATE_ENUM_DECL): Define to the above.
1000
74078538
RS
10012019-10-29 Richard Sandiford <richard.sandiford@arm.com>
1002
1003 * c-tree.h (c_simulate_builtin_function_decl): Declare.
1004 * c-decl.c (c_simulate_builtin_function_decl): New function.
1005 * c-objc-common.h (LANG_HOOKS_SIMULATE_BUILTIN_FUNCTION_DECL): Define
1006 to the above.
1007
ad1539d5
MS
10082019-10-28 Martin Sebor <msebor@redhat.com>
1009
1010 PR c/66970
1011 * c-decl.c (names_builtin_p): Define a new function.
1012
cb73e4e7
RB
10132019-10-28 Richard Biener <rguenther@suse.de>
1014
1015 PR c/92249
1016 * gimple-parser.c (c_parser_parse_gimple_body): Make
1017 current_bb the entry block initially to easier recover
1018 from errors.
1019 (c_parser_gimple_compound_statement): Adjust.
1020
135df52c
JJ
10212019-10-24 Jakub Jelinek <jakub@redhat.com>
1022
1023 * c-parser.c (c_finish_omp_declare_variant): Use
1024 omp_context_selector_matches instead of
1025 c_omp_context_selector_matches.
1026 * c-decl.c (c_decl_attributes): Add "omp declare target block"
1027 attribute in between declare target and end declare target
1028 pragmas.
1029
783bfe5e
JM
10302019-10-15 Joseph Myers <joseph@codesourcery.com>
1031
1032 * c-parser.c (c_parser_attribute_any_word): Rename to
1033 c_parser_gnu_attribute_any_word. All callers changed.
1034 (c_parser_attribute): Rename to c_parser_gnu_attribute. All
1035 callers changed.
1036 (c_parser_attributes): Rename to c_parser_gnu_attributes. All
1037 callers changed.
1038 (c_parser_declaration_or_fndef, c_parser_declspecs)
1039 (c_parser_enum_specifier, c_parser_struct_or_union_specifier)
1040 (c_parser_struct_declaration, c_parser_declarator)
1041 (c_parser_gnu_attribute, c_parser_compound_statement)
1042 (c_parser_label, c_parser_statement, c_parser_objc_method_decl)
1043 (c_parser_transaction_attributes): Add "gnu-" prefix to names of
1044 attribute-related syntax productions.
1045
56898e43
RS
10462019-10-14 Richard Sandiford <richard.sandiford@arm.com>
1047
1048 * c-objc-common.c (useful_aka_type_p): Replace with...
1049 (get_aka_type): ...this new function. Given the original type,
1050 decide which aka type to print (if any). Only look through typedefs
1051 if user_facing_original_type_p.
1052 (print_type): Update accordingly.
1053
b9424661
JJ
10542019-10-14 Jakub Jelinek <jakub@redhat.com>
1055
1056 * c-parser.c (c_parser_omp_all_clauses): Change bool NESTED_P argument
1057 into int NESTED, if it is 2, diagnose missing commas in between
1058 clauses.
1059 (c_parser_omp_context_selector): Pass 2 as last argument to
1060 c_parser_omp_all_clauses.
1061
20de9568
JJ
10622019-10-12 Jakub Jelinek <jakub@redhat.com>
1063
1064 * c-parser.c (c_parser_omp_context_selector): Improve error recovery.
1065 For simd properties, put them directly into TREE_VALUE.
1066 (c_finish_omp_declare_variant): Call c_omp_mark_declare_variant.
1067 If c_omp_context_selector_matches is 0, don't add attribute, otherwise
1068 add "omp declare variant base" attribute rather than
1069 "omp declare variant".
1070
fe2bc27c
JM
10712019-10-11 Joseph Myers <joseph@codesourcery.com>
1072
1073 * c-decl.c (declspecs_add_type): Use pedwarn_c11 for DFP types.
1074
94e7f906
JJ
10752019-10-10 Jakub Jelinek <jakub@redhat.com>
1076
1077 * c-parser.c (c_parser_omp_all_clauses): Add NESTED_P argument, if
1078 true, terminate processing on closing paren and don't skip to end of
1079 pragma line.
1080 (c_parser_omp_declare_simd): Handle also declare variant.
1081 (omp_construct_selectors, omp_device_selectors,
1082 omp_implementation_selectors, omp_user_selectors): New variables.
1083 (c_parser_omp_context_selector,
1084 c_parser_omp_context_selector_specification,
1085 c_finish_omp_declare_variant): New functions.
1086 (c_finish_omp_declare_simd): Handle both declare simd and
1087 declare variant.
1088 (c_parser_omp_declare): Handle declare variant.
1089
93313b94
JM
10902019-10-02 Joseph Myers <joseph@codesourcery.com>
1091
1092 * c-parser.c (c_parser_asm_statement): Handle CPP_SCOPE like two
1093 CPP_COLON tokens.
1094
55879815
RS
10952019-10-01 Richard Sandiford <richard.sandiford@arm.com>
1096
1097 * c-objc-common.c (useful_aka_type_p): New function.
1098 (print_type): Use it to decide whether an aka type is worth printing.
1099
59bc434a
JJ
11002019-09-27 Jakub Jelinek <jakub@redhat.com>
1101
1102 PR c++/88203
1103 * c-parser.c (c_parser_predefined_identifier): New function.
1104 (c_parser_postfix_expression): Use it.
1105 (c_parser_omp_variable_list): Parse predefined identifiers.
1106 * c-typeck.c (c_finish_omp_clauses): Allow predefined variables
1107 in shared and firstprivate clauses, even when they are predetermined
1108 shared.
1109
c6447c20
RS
11102019-09-27 Richard Sandiford <richard.sandiford@arm.com>
1111
1112 * c-typeck.c (build_function_call_vec): Take the original function
1113 decl as an optional final parameter. Pass all built-in calls to
1114 check_builtin_function_arguments.
1115
522da4c2
EB
11162019-09-20 Eric Botcazou <ebotcazou@adacore.com>
1117
1118 PR c/91815
1119 * c-decl.c (pushdecl): In C detect duplicate declarations across scopes
1120 of identifiers in the external scope only for variables and functions.
1121
68e2c199
PK
11222019-09-04 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1123
1124 PR c/78736
1125 * c-typeck.c (convert_for_assignment): Handle Wenum-conversion.
1126
22f8849d
IS
11272019-08-23 Iain Sandoe <iain@sandoe.co.uk>
1128
1129 PR pch/61250
1130 * c-parser.c (c_parse_file): Call c_common_no_more_pch ()
1131 after determining that the first token is not
1132 PRAGMA_GCC_PCH_PREPROCESS.
1133
db376f45
EB
11342019-08-22 Eric Botcazou <ebotcazou@adacore.com>
1135
1136 * c-parser.c (c_parser_declaration_or_fndef): Set DECL_ARGUMENTS of a
1137 FUNCTION_DECL to the right value in the presence of nested declarators.
1138
4d732405
RS
11392019-08-13 Richard Sandiford <richard.sandiford@arm.com>
1140
1141 PR middle-end/91421
1142 * c-decl.c (merge_decls): Use copy_decl_built_in_function.
1143
cb1180d5
RS
11442019-08-13 Richard Sandiford <richard.sandiford@arm.com>
1145
1146 PR middle-end/91421
1147 * c-decl.c (header_for_builtin_fn): Take a FUNCTION_DECL instead
1148 of a built_in_function.
1149 (diagnose_mismatched_decls, implicitly_declare): Update accordingly.
1150
77eb117f
JJ
11512019-08-10 Jakub Jelinek <jakub@redhat.com>
1152
1153 * c-parser.c (c_parser_omp_clause_name): Parse device_type.
1154 (c_parser_omp_clause_device_type): New function.
1155 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_DEVICE_TYPE.
1156 (OMP_DECLARE_TARGET_CLAUSE_MASK): Add PRAGMA_OMP_CLAUSE_DEVICE_TYPE.
1157 (c_parser_omp_declare_target): Handle device_type clauses. Remove
1158 diagnostics for declare target with clauses nested in clause-less
1159 declare target declaration-definition-seq.
1160 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_DEVICE_TYPE.
1161
2c3b8bad
JJ
11622019-08-09 Jakub Jelinek <jakub@redhat.com>
1163
bb522e2e
JJ
1164 * c-parser.c (check_no_duplicate_clause): Simplify using
1165 omp_find_clause.
1166 (c_parser_omp_clause_if): Fix up printing of target {enter,exit} data
1167 directive name modifiers.
1168 (c_parser_omp_clause_proc_bind): Check for duplicate proc_bind clause.
1169
2c3b8bad
JJ
1170 PR c/91401
1171 * c-parser.c (c_parser_omp_clause_dist_schedule): Fix up typos in the
1172 check_no_duplicate_clause call. Comment it out, instead emit a
1173 warning for duplicate dist_schedule clauses.
1174
99769e7f
RS
11752019-08-08 Richard Sandiford <richard.sandiford@arm.com>
1176
1177 * c-decl.c (finish_enum): Clear C_TYPE_BEING_DEFINED.
1178
8860d270
JJ
11792019-08-08 Jakub Jelinek <jakub@redhat.com>
1180
1181 * c-typeck.c (c_finish_omp_clauses): For C_ORT_OMP
1182 OMP_CLAUSE_USE_DEVICE_* clauses use oacc_reduction_head bitmap
1183 instead of generic_head to track duplicates.
1184
398e3feb
JJ
11852019-08-07 Jakub Jelinek <jakub@redhat.com>
1186
1187 * c-parser.c (c_parser_omp_clause_name): Parse use_device_addr clause.
1188 (c_parser_omp_clause_use_device_addr): New function.
1189 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR.
1190 (OMP_TARGET_DATA_CLAUSE_MASK): Add PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR.
1191 (c_parser_omp_target_data): Handle PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR
1192 like PRAGMA_OMP_CLAUSE_USE_DEVICE_PTR, adjust diagnostics about no
1193 map or use_device_* clauses.
1194 * c-typeck.c (c_finish_omp_clauses): For OMP_CLAUSE_USE_DEVICE_PTR
1195 in OpenMP, require pointer type rather than pointer or array type.
1196 Handle OMP_CLAUSE_USE_DEVICE_ADDR.
1197
a28351e7
JJ
11982019-07-31 Jakub Jelinek <jakub@redhat.com>
1199
1200 PR c/91192
1201 * c-parser.c (c_parser_sizeof_expression): Call set_c_expr_source_range
1202 even if finish is UNKNOWN_LOCATION, just use start as finish in that
1203 case.
1204
6343b6bf
ML
12052019-07-25 Martin Liska <mliska@suse.cz>
1206 Dominik Infuhr <dominik.infuehr@theobroma-systems.com>
1207
1208 PR c++/23383
1209 * c-decl.c (merge_decls): Merge OPERATOR_DELETE flag.
1210
cb50701e
ML
12112019-07-25 Martin Liska <mliska@suse.cz>
1212
1213 * c-decl.c (merge_decls): Use new macros
1214 (e.g. DECL_SET_LAMBDA_FUNCTION and DECL_LAMBDA_FUNCTION_P).
1215
62e3e66f
RB
12162019-07-23 Richard Biener <rguenther@suse.de>
1217
1218 PR tree-optimization/83518
1219 * gimple-parser.c (c_parser_parse_gimple_body): When we have
1220 a CFG also rebuild cgraph edges.
1221
554a530f
JJ
12222019-07-20 Jakub Jelinek <jakub@redhat.com>
1223
1224 * c-parser.c (c_parser_omp_clause_name): Handle bind clause.
1225 (c_parser_omp_clause_bind): New function.
1226 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_BIND.
1227 (OMP_LOOP_CLAUSE_MASK): Define.
1228 (c_parser_omp_loop): New function.
1229 (c_parser_omp_parallel, c_parser_omp_teams): Handle parsing of
1230 loop combined with parallel or teams.
1231 (c_parser_omp_construct): Handle PRAGMA_OMP_LOOP.
1232 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_BIND.
1233
d119bf79
RS
12342019-07-18 Richard Sandiford <richard.sandiford@arm.com>
1235
1236 PR c/53633
1237 * c-decl.c (finish_function): Check targetm.warn_func_return
1238 before issuing a -Wreturn-type warning.
1239
ab20d992 12402019-07-12 Alexandre Oliva <oliva@adacore.com>
fdc1f343
AO
1241
1242 * gimple-parser.c (c_parser_gimple_try_stmt): New.
1243 (c_parser_compound_statement): Call it.
1244
1fdd6f04
JJ
12452019-07-12 Jakub Jelinek <jakub@redhat.com>
1246
1247 * c-parser.c (c_parser_omp_clause_name): Handle order clause.
1248 (c_parser_omp_clause_order): New function.
1249 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_ORDER.
1250 (OMP_SIMD_CLAUSE_MASK, OMP_FOR_CLAUSE_MASK): Add
1251 PRAGMA_OMP_CLAUSE_ORDER.
1252 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_ORDER.
1253
8389386c
RB
12542019-07-10 Richard Biener <rguenther@suse.de>
1255
1256 * gimple-parser.c (c_parser_gimple_postfix_expression): Support
1257 _Literal (int *) &x for address literals.
1258
99b1c316
MS
12592019-07-09 Martin Sebor <msebor@redhat.com>
1260
1261 PR c++/61339
1262 * c-decl.c (xref_tag): Change class-key of PODs to struct and others
1263 to class.
1264 (field_decl_cmp): Same.
1265 * c-parser.c (c_parser_struct_or_union_specifier): Same.
1266 * c-tree.h: Same.
1267 * gimple-parser.c (c_parser_gimple_compound_statement): Same.
1268
6c1dae73
MS
12692019-07-09 Martin Sebor <msebor@redhat.com>
1270
1271 PR c++/61339
1272 * c-decl.c: Change class-key from class to struct and vice versa
1273 to match convention and avoid -Wclass-is-pod and -Wstruct-no-pod.
1274 * gimple-parser.c: Same.
1275
69b5279e
RB
12762019-07-01 Richard Biener <rguenther@suse.de>
1277
1278 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
1279 _Literal (char *) &"foo" for address literals pointing to
1280 STRING_CSTs.
1281
ab20d992
JJ
12822019-06-25 Jozef Lawrynowicz <jozef.l@mittosystems.com>
1283
1284 * c-parser.c (c_parse_init): Create keyword for "__intN__" type.
1285 * c-decl.c (declspecs_add_type): Don't pedwarn about "__intN" ISO
1286 C incompatibility if alternate "__intN__" form is used.
1287
1e3d475e
MS
12882019-06-24 Martin Sebor <msebor@redhat.com>
1289
1290 * c-typeck.c (build_binary_op): Hyphenate floating-point.
1291
bf38f7e9
JJ
12922019-06-10 Jakub Jelinek <jakub@redhat.com>
1293
1294 * c-parser.c (c_parser_pragma): Reject PRAGMA_OMP_SCAN.
1295 (c_parser_omp_clause_reduction): Don't sorry_at on inscan reductions.
1296 (c_parser_omp_scan_loop_body): New function.
1297 (c_parser_omp_for_loop): Call c_parser_omp_scan_loop_body if there are
1298 inscan reduction clauses.
1299 * c-typeck.c (c_finish_omp_clauses): Reject mixing inscan with
1300 non-inscan reductions on the same construct, or inscan reductions with
1301 ordered or schedule clauses, or inscan array reductions.
1302
65985d78
MS
13032019-06-05 Martin Sebor <msebor@redhat.com>
1304
1305 PR c/90737
1306 * c-typeck.c (c_finish_return): Only consider functions returning
1307 pointers as candidates for -Wreturn-local-addr.
1308
0ecf545c
MS
13092019-06-05 Martin Sebor <msebor@redhat.com>
1310
1311 * c-decl.c (start_decl): Adjust quoting and hyphenation
1312 in diagnostics.
1313 (finish_decl): Same.
1314 (finish_enum): Same.
1315 (start_function): Same.
1316 (declspecs_add_type): Same.
1317 * c-parser.c (warn_for_abs): Same.
1318 * c-typeck.c (build_binary_op): Same.
1319
e03436e7
TS
13202019-05-17 Thomas Schwinge <thomas@codesourcery.com>
1321
b48f44bf
TS
1322 PR c/89433
1323 * c-parser.c (c_finish_oacc_routine): Rework checking if already
1324 marked with an OpenACC 'routine' directive.
1325
5bf04509
TS
1326 PR c/89433
1327 * c-parser.c (c_parser_oacc_routine): Normalize order of clauses.
1328 (c_finish_oacc_routine): Call oacc_verify_routine_clauses.
1329
e03436e7
TS
1330 PR c/89433
1331 * c-parser.c (c_finish_oacc_routine): Refer to OpenACC 'routine'
1332 clauses from "omp declare target" attribute.
1333
a9c697b8
MS
13342019-05-16 Martin Sebor <msebor@redhat.com>
1335
ab20d992
JJ
1336 * c-decl.c (start_decl): Quote keywords, operators, and
1337 types in diagnostics.
1338 (finish_decl): Same.
1339 * c-parser.c (c_parser_asm_statement): Same.
1340 (c_parser_conditional_expression): Same.
1341 (c_parser_transaction_cancel): Same.
1342 * c-typeck.c (c_common_type): Same.
1343 (build_conditional_expr): Same.
1344 (digest_init): Same.
1345 (process_init_element): Same.
1346 (build_binary_op): Same.
a9c697b8 1347
c4499192
RB
13482019-05-17 Richard Biener <rguenther@suse.de>
1349
1350 * gimple-parser.c (c_parser_gimple_statement): Handle __VEC_PERM.
1351 (c_parser_gimple_unary_expression): Likewise.
1352 (c_parser_gimple_parentized_ternary_expression): New function.
1353
adfe6e4b
RB
13542019-05-16 Richard Biener <rguenther@suse.de>
1355
1356 * gimple-parser.c (c_parser_gimple_statement): Handle __BIT_INSERT.
1357 (c_parser_gimple_unary_expression): Likewise.
1358
186dabf2
RB
13592019-05-15 Richard Biener <rguenther@suse.de>
1360
1361 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
1362 __BIT_FIELD_REF.
1363
1158c5b4
RB
13642019-05-14 Richard Biener <rguenther@suse.de>
1365
1366 * gimple-parser.c (c_parser_gimple_statement): Remove
1367 questionable auto-promotion to VIEW_CONVERT_EXPR.
1368 (c_parser_gimple_typespec): Split out from __MEM parsing.
1369 (c_parser_gimple_postfix_expression): Handle __VIEW_CONVERT.
1370 * tree-pretty-print.c (dump_generic_node): Dump VIEW_CONVERT_EXPR
1371 as __VIEW_CONVERT with -gimple.
1372
fd4485aa
ML
13732019-05-09 Martin Liska <mliska@suse.cz>
1374
1375 * gimple-parser.c (c_parser_gimple_statement): Support __MIN and
1376 __MAX.
1377 (c_parser_gimple_unary_expression): Parse also binary expression
1378 __MIN and __MAX.
1379 (c_parser_gimple_parentized_binary_expression): New function.
1380
d276406a
ML
13812019-05-09 Martin Liska <mliska@suse.cz>
1382
1383 * gimple-parser.c (struct gimple_parser): Add probability.
1384 for gimple_parser_edge.
1385 (gimple_parser::push_edge): Add new argument probability.
1386 (c_parser_gimple_parse_bb_spec): Parse also probability
1387 if present.
1388 (c_parser_parse_gimple_body): Set edge probability.
1389 (c_parser_gimple_compound_statement): Consume token
1390 before calling c_parser_gimple_goto_stmt.
1391 Parse BB counts.
1392 (c_parser_gimple_statement): Pass new argument.
1393 (c_parser_gimple_goto_stmt): Likewise.
1394 (c_parser_gimple_if_stmt): Likewise.
1395 (c_parser_gimple_or_rtl_pass_list): Parse hot_bb_threshold.
1396 * c-parser.c (c_parser_declaration_or_fndef): Pass
1397 hot_bb_threshold argument.
1398 * c-tree.h (struct c_declspecs): Add hot_bb_threshold
1399 field.
1400 (c_parser_gimple_parse_bb_spec_edge_probability): New.
1401
f179b64e
JJ
14022019-04-26 Jakub Jelinek <jakub@redhat.com>
1403
1404 PR debug/90197
1405 * c-tree.h (c_finish_loop): Add 2 further location_t arguments.
1406 * c-parser.c (c_parser_while_statement): Adjust c_finish_loop caller.
1407 (c_parser_do_statement): Likewise.
1408 (c_parser_for_statement): Likewise. Formatting fixes.
1409 * c-typeck.c (c_finish_loop): Add COND_LOCUS and INCR_LOCUS arguments,
1410 emit DEBUG_BEGIN_STMTs if needed.
1411
e7178413
JJ
14122019-04-19 Jakub Jelinek <jakub@redhat.com>
1413
c280b7ee
JJ
1414 PR c/89888
1415 * c-typeck.c (struct c_switch): Remove outside_range_p member.
1416 (c_start_case): Don't clear it.
1417 (do_case): Adjust c_add_case_label caller.
1418 (c_finish_case): Adjust c_do_switch_warnings caller.
1419
e7178413
JJ
1420 PR c++/90108
1421 * c-decl.c (merge_decls): If remove is main variant and
1422 DECL_ORIGINAL_TYPE is some other type, remove a DECL_ORIGINAL_TYPE
1423 variant that has newdecl as TYPE_NAME if any.
1424
60a2c645
JJ
14252019-04-12 Jakub Jelinek <jakub@redhat.com>
1426
1427 PR c/89933
1428 * c-decl.c (merge_decls): When newdecl's type is its main variant,
1429 don't try to remove it from the variant list, but instead assert
1430 it has no variants.
1431
2a82beaa
RB
14322019-04-01 Richard Biener <rguenther@suse.de>
1433
1434 PR c/71598
1435 * c-tree.h (c_get_alias_set): Declare.
1436 * c-objc-common.h (LANG_HOOKS_GET_ALIAS_SET): Use c_get_alias_set.
1437 * c-objc-common.c (c_get_alias_set): Treat enumeral types
1438 as the underlying integer type.
1439
bec1da64
MS
14402019-03-19 Martin Sebor <msebor@redhat.com>
1441
1442 PR tree-optimization/89688
1443 * c-decl.c (finish_decl): Call braced_lists_to_string for more
1444 kinds of initializers.
1445
855cd9b1
JJ
14462019-03-19 Jakub Jelinek <jakub@redhat.com>
1447
1448 PR c/89734
1449 * c-decl.c (grokdeclarator): Call c_build_qualified_type on function
1450 return type even if quals_used is 0. Formatting fixes.
1451
baa09dc5
RB
14522019-03-14 Richard Biener <rguenther@suse.de>
1453
1454 * c-tree.h (enum c_declspec_il): New.
1455 (struct c_declspecs): Merge gimple_p and rtl_p into declspec_il
1456 enum bitfield.
1457 * c-parser.c (c_parser_declaration_or_fndef): Adjust accordingly.
1458 Pass start pass and declspec_il to c_parser_parse_gimple_body.
1459 (c_parser_declspecs): Adjust.
1460 * gimple-parser.c: Include cfg.h, cfghooks.h, cfganal.h, tree-cfg.h,
1461 gimple-iterator.h, cfgloop.h, tree-phinodes.h, tree-into-ssa.h
1462 and bitmap.h.
1463 (struct gimple_parser): New.
1464 (gimple_parser::push_edge): New method.
1465 (c_parser_gimple_parse_bb_spec): New helper.
1466 (c_parser_parse_gimple_body): Get start pass and IL specification.
1467 Initialize SSA and CFG.
1468 (c_parser_gimple_compound_statement): Handle CFG and SSA build.
1469 Build a gimple_parser parsing state and pass it along.
1470 (c_parser_gimple_statement): Change intermittend __PHI internal
1471 function argument for the edge.
1472 (c_parser_gimple_or_rtl_pass_list): Handle ssa, cfg flags.
1473 (c_parser_gimple_goto_stmt): Record edges to build.
1474 (c_parser_gimple_if_stmt): Likewise.
1475 * gimple-parser.h (c_parser_parse_gimple_body): Adjust.
1476 (c_parser_gimple_or_rtl_pass_list): Likewise.
1477
a3f9f006
ML
14782019-03-11 Martin Liska <mliska@suse.cz>
1479
1480 * c-decl.c (check_for_loop_decls): Wrap an option name
1481 in a string format message and fix GNU coding style.
1482 * c-parser.c (c_parser_declspecs): Likewise.
1483
1db01ff9
JJ
14842019-03-08 Jakub Jelinek <jakub@redhat.com>
1485
1486 PR tree-optimization/89550
1487 * c-decl.c (finish_function): Only set TREE_NO_WARNING if warning_at
1488 returned true.
1489 (c_write_global_declarations_1): Only set TREE_NO_WARNING if pedwarn
1490 or warning returned true.
1491
66dcb747
JJ
14922019-02-28 Jakub Jelinek <jakub@redhat.com>
1493
1494 PR c/89525
1495 * c-typeck.c (convert_arguments): Call inform_declaration only if
1496 the previous warning_at call returned true.
1497
2263c9f2
TS
14982019-02-22 Thomas Schwinge <thomas@codesourcery.com>
1499
1500 * c-parser.c (c_parser_oacc_shape_clause): Add loc formal
1501 parameter. Adjust all users.
1502 (c_parser_oacc_simple_clause): Replace parser with loc formal
1503 parameter. Adjust all users.
1504
ab20d992 15052019-02-19 Chung-Lin Tang <cltang@codesourcery.com>
19695f4d
CLT
1506
1507 PR c/87924
1508 * c-parser.c (c_parser_oacc_clause_wait): Add representation of wait
1509 clause without argument as 'wait (GOMP_ASYNC_NOVAL)', adjust comments.
1510
5f88ba10
JJ
15112019-02-15 Jakub Jelinek <jakub@redhat.com>
1512
1513 PR c/89340
1514 * c-decl.c (start_function): Clear TREE_PUBLIC on nested functions
1515 before c_decl_attributes rather than after it.
1516
cfc30fd1
JJ
15172019-02-06 Jakub Jelinek <jakub@redhat.com>
1518
1519 PR c/89211
1520 * c-parser.c (c_parser_declaration_or_fndef): Don't update
1521 DECL_ARGUMENTS of d if it has been defined already. Use a single if
1522 instead of 3 nested ifs.
1523
fbe83e6b
JM
15242019-02-06 Joseph Myers <joseph@codesourcery.com>
1525
1526 PR c/88584
1527 * c-decl.c (finish_decl): Do not complete array types for arrays
1528 with external linkage not at file scope.
1529
f461f938
RB
15302019-02-05 Richard Biener <rguenther@suse.de>
1531
1532 PR c/88606
1533 * c-decl.c (finish_struct): Reset TYPE_TRANSPARENT_AGGR on
1534 all type variants when not supported.
1535
fe509359
JJ
15362019-01-30 Jakub Jelinek <jakub@redhat.com>
1537
1538 PR c/89061
1539 * c-tree.h (C_DECL_COMPOUND_LITERAL_P): Define.
1540 * c-decl.c (decl_jump_unsafe): Return false for
1541 C_DECL_COMPOUND_LITERAL_P decls.
1542 (build_compound_literal): Set C_DECL_COMPOUND_LITERAL_P.
1543
6a335b96
JJ
15442019-01-29 Jakub Jelinek <jakub@redhat.com>
1545
f4b7e754
JJ
1546 PR c/89045
1547 * c-decl.c (build_compound_literal): Don't pushdecl if in parameter
1548 scope.
1549
6a335b96
JJ
1550 PR c/86125
1551 * c-decl.c (last_fileptr_type): Remove.
1552 (last_structptr_types): New variable.
1553 (match_builtin_function_types): Compare TYPE_MAIN_VARIANT of
1554 {old,new}rettype instead of the types themselves. Assert
1555 last_structptr_types array has the same number of elements
1556 as builtin_structptr_types array. Use TYPE_MAIN_VARIANT for
1557 argument oldtype and newtype. Instead of handling
1558 just fileptr_type_node specially, handle all builtin_structptr_types
1559 pointer nodes. Formatting fix.
1560
d8b5a1a0
MS
15612019-01-24 Martin Sebor <msebor@redhat.com>
1562
1563 PR c/86125
1564 PR c/88886
1565 PR middle-end/86308
1566 * c-decl.c (match_builtin_function_types): Add arguments.
1567 (diagnose_mismatched_decls): Diagnose mismatched declarations
1568 of built-ins more strictly.
1569
e21c4491
JJ
15702019-01-24 Jakub Jelinek <jakub@redhat.com>
1571
1572 PR c++/88976
1573 * c-typeck.c (c_finish_omp_cancel): Diagnose more than one if
1574 on #pragma omp cancel with different modifiers.
1575
420183d9
L
15762019-01-18 H.J. Lu <hongjiu.lu@intel.com>
1577
1578 PR c/51628
1579 PR c/88664
1580 * c-typeck.c (convert_for_assignment): Upate the
1581 warn_for_address_or_pointer_of_packed_member call.
1582
17ad43dd
TH
15832019-01-16 Tom Honermann <tom@honermann.net>
1584 Jason Merrill <jason@redhat.com>
1585
1586 * c-typeck.c (digest_init): Revised the error message produced for
1587 ill-formed cases of array initialization with a string literal.
1588 (error_init): Make variadic.
1589
5f07d78a
JJ
15902019-01-12 Jakub Jelinek <jakub@redhat.com>
1591
1592 * c-typeck.c (convert_for_assignment): Fix a comment typo.
1593
c4581bbf
JJ
15942019-01-07 Jakub Jelinek <jakub@redhat.com>
1595
1596 PR c/88701
1597 * c-decl.c (build_compound_literal): If not TREE_STATIC, only pushdecl
1598 if current_function_decl is non-NULL.
1599
65c5b1eb
JM
16002019-01-07 Joseph Myers <joseph@codesourcery.com>
1601
1602 PR c/88720
1603 PR c/88726
1604 * c-decl.c (pop_scope): Use TREE_PUBLIC and b->nested to determine
1605 whether a function is nested, not DECL_EXTERNAL. Diagnose inline
1606 functions declared but never defined only for external scope, not
1607 for other scopes.
1608
d8fcab68
JJ
16092019-01-07 Jakub Jelinek <jakub@redhat.com>
1610
1611 PR c++/85052
1612 * c-parser.c (c_parser_postfix_expression): Parse
1613 __builtin_convertvector.
1614
a5544970
JJ
16152019-01-01 Jakub Jelinek <jakub@redhat.com>
1616
1617 Update copyright years.
1618
da77eace
L
16192018-12-20 H.J. Lu <hongjiu.lu@intel.com>
1620
1621 PR c/51628
1622 * c-typeck.c (convert_for_assignment): Call
1623 warn_for_address_or_pointer_of_packed_member.
1624
1edf8866
SB
16252018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
1626
1627 * c-parser.c (c_parser_asm_statement) <RID_CONST, RID_RESTRICT>: Give
1628 a more specific error message (instead of just falling through).
1629
db4fd626
SB
16302018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
1631
1632 * c-parser.c (c_parser_asm_statement): Keep track of the location each
1633 asm qualifier is first seen; use that to give nicer "duplicate asm
1634 qualifier" messages. Delete 'quals" variable, instead pass the
1635 "is_volatile_ flag to build_asm_stmt directly.
1636 * c-tree.h (build_asm_stmt): Make the first arg bool instead of tree.
1637 * c-typeck.c (build_asm_stmt): Ditto; adjust.
1638
9c9cfcbb
SB
16392018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
1640
1641 * c-parser.c (c_parser_asm_statement): Rewrite the loop to work without
1642 "done" boolean variable.
1643
a14feb3c
DM
16442018-12-19 David Malcolm <dmalcolm@redhat.com>
1645
1646 PR c++/87504
1647 * c-typeck.c (class maybe_range_label_for_tree_type_mismatch):
1648 Move from here to gcc-rich-location.h and gcc-rich-location.c.
1649 (build_binary_op): Use struct op_location_t and
1650 class binary_op_rich_location.
1651
6d939173
JJ
16522018-12-11 Jakub Jelinek <jakub@redhat.com>
1653
1654 PR sanitizer/88426
1655 * c-convert.c (convert): Call c_fully_fold before calling
1656 ubsan_instrument_float_cast.
1657
b7055028
SB
16582018-12-08 Segher Boessenkool <segher@kernel.crashing.org>
1659
1660 * c-parser (c_parser_asm_statement) [RID_INLINE]: Delete stray line
1661 setting "quals".
1662
5b76e75f
SB
16632018-12-06 Segher Boessenkool <segher@kernel.crashing.org>
1664
1665 * c-parser.c (c_parser_asm_statement): Detect the inline keyword
1666 after asm. Pass a flag for it to build_asm_expr.
1667 * c-tree.h (build_asm_expr): Update declaration.
1668 * c-typeck.c (build_asm_stmt): Add is_inline parameter. Use it to
1669 set ASM_INLINE_P.
1670
30bd42b9
SB
16712018-12-06 Segher Boessenkool <segher@kernel.crashing.org>
1672
1673 PR inline-asm/55681
1674 * c-parser.c (c_parser_asm_statement): Update grammar. Allow any
1675 combination of volatile and goto, in any order, without repetitions.
1676
9df6c0e4
JB
16772018-12-04 James Norris <jnorris@codesourcery.com>
1678 Cesar Philippidis <cesar@codesourcery.com>
1679 Julian Brown <julian@codesourcery.com>
1680
1681 * c-parser.c (c_parser_oacc_wait_list): Remove dead diagnostic
1682 code.
1683
f44697b7
RB
16842018-11-30 Richard Biener <rguenther@suse.de>
1685
1686 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
1687 _Literal (type) { ... } as empty aggregate or vector constructor.
1688
550dfbdc
MS
16892018-11-29 Martin Sebor <msebor@redhat.com>
1690
1691 PR c/88091
1692 * c-typeck.c (convert_argument): Add a parameter. Adjust indentation.
1693 (convert_arguments): Add comments. Pass additional argument to
1694 the function above.
1695
673670da
MS
16962018-11-29 Martin Sebor <msebor@redhat.com>
1697
1698 PR c/88172
1699 PR testsuite/88208
1700 * c-decl.c (declspec_add_alignas): Adjust call to check_user_alignment.
1701
db1d09b0
MS
17022018-11-23 Martin Sebor <msebor@redhat.com>
1703
1704 PR testsuite/88098
1705 * c-typeck.c (convert_arguments): Call builtin_decl_explicit instead.
1706 (maybe_warn_builtin_no_proto_arg): Handle short enum to int promotion.
1707
98f08eb8
MS
17082018-11-20 Martin Sebor <msebor@redhat.com>
1709
1710 * c-parser.c (c_parser_has_attribute_expression): New function.
1711 (c_parser_attribute): New function.
1712 (c_parser_attributes): Move code into c_parser_attribute.
1713 (c_parser_unary_expression): Handle RID_HAS_ATTRIBUTE_EXPRESSION.
1714
cd5da983
MS
17152018-11-15 Martin Sebor <msebor@redhat.com>
1716
1717 PR c/83656
1718 * c-decl.c (header_for_builtin_fn): Declare.
1719 (diagnose_mismatched_decls): Diagnose declarations of built-in
1720 functions without a prototype.
1721 * c-typeck.c (maybe_warn_builtin_no_proto_arg): New function.
1722 (convert_argument): Same.
1723 (convert_arguments): Factor code out into convert_argument.
1724 Detect mismatches between built-in formal arguments in calls
1725 to built-in without prototype.
1726 (build_conditional_expr): Same.
1727 (type_or_builtin_type): New function.
1728 (convert_for_assignment): Add argument. Conditionally issue
1729 warnings instead of errors for mismatches.
1730
620e594b
DM
17312018-11-13 David Malcolm <dmalcolm@redhat.com>
1732
1733 * c-decl.c: Replace "source_location" with "location_t".
1734 * c-tree.h: Likewise.
1735 * c-typeck.c: Likewise.
1736 * gimple-parser.c: Likewise.
1737
3179ebae
JJ
17382018-11-09 Jakub Jelinek <jakub@redhat.com>
1739
81a227c6
JJ
1740 * c-parser.c (c_parser_omp_clause_final): Use
1741 c_parser_expr_no_commas, convert_lvalue_to_rvalue,
1742 c_objc_common_truthvalue_conversion, c_fully_fold and parentheses
1743 parsing instead of c_parser_paren_condition.
1744 (c_parser_omp_clause_if): Use c_parser_expr_no_commas,
1745 convert_lvalue_to_rvalue, c_objc_common_truthvalue_conversion and
1746 c_fully_fold instead of c_parser_condition.
1747 (c_parser_omp_clause_num_threads, c_parser_omp_clause_num_tasks,
1748 c_parser_omp_clause_grainsize, c_parser_omp_clause_priority,
1749 c_parser_omp_clause_hint, c_parser_omp_clause_num_teams,
1750 c_parser_omp_clause_thread_limit, c_parser_omp_clause_linear): Use
1751 c_parser_expr_no_commas instead of c_parser_expression.
1752
98c91c56
JJ
1753 * c-parser.c (c_parser_omp_clause_reduction): Call sorry_at on
1754 reduction clause with inscan modifier.
1755
3179ebae
JJ
1756 * c-parser.c (c_parser_omp_requires): Call sorry_at on requires
1757 clauses other than atomic_default_mem_order.
1758
28567c40
JJ
17592018-11-08 Jakub Jelinek <jakub@redhat.com>
1760
1761 * c-parser.c: Include memmode.h.
1762 (c_parser_omp_depobj, c_parser_omp_requires): New functions.
1763 (c_parser_pragma): Handle PRAGMA_OMP_DEPOBJ and PRAGMA_OMP_REQUIRES.
1764 (c_parser_omp_clause_name): Handle nontemporal, in_reduction and
1765 task_reduction clauses.
1766 (c_parser_omp_variable_list): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION.
1767 For OMP_CLAUSE_DEPEND, parse clause operands as either an array
1768 section, or lvalue assignment expression.
1769 (c_parser_omp_clause_if): Handle cancel and simd modifiers.
1770 (c_parser_omp_clause_lastprivate): Parse optional
1771 conditional: modifier.
1772 (c_parser_omp_clause_hint): Require constant integer expression rather
1773 than just integer expression.
1774 (c_parser_omp_clause_defaultmap): Parse new kinds of defaultmap
1775 clause.
1776 (c_parser_omp_clause_reduction): Add IS_OMP and KIND arguments.
1777 Parse reduction modifiers. Pass KIND to c_parser_omp_variable_list.
1778 (c_parser_omp_clause_nontemporal, c_parser_omp_iterators): New
1779 functions.
1780 (c_parser_omp_clause_depend): Parse iterator modifier and handle
1781 iterators. Parse mutexinoutset and depobj kinds.
1782 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_reduction
1783 callers.
1784 (c_parser_omp_all_clauses): Likewise. Handle
1785 PRAGMA_OMP_CLAUSE_NONTEMPORAL and
1786 PRAGMA_OMP_CLAUSE_{IN,TASK}_REDUCTION.
1787 (c_parser_omp_atomic): Parse hint and memory order clauses. Handle
1788 default memory order from requires directive if any. Adjust
1789 c_finish_omp_atomic caller.
1790 (c_parser_omp_critical): Allow comma in between (name) and hint clause.
1791 (c_parser_omp_flush): Parse flush with memory-order-clause.
1792 (c_parser_omp_for_loop): Allow NE_EXPR even in
1793 OpenMP loops, adjust c_finish_omp_for caller.
1794 (OMP_SIMD_CLAUSE_MASK): Add if and nontemporal clauses.
1795 (c_parser_omp_master): Add p_name, mask and cclauses arguments.
1796 Allow to be called while parsing combined parallel master.
1797 Parse combined master taskloop{, simd}.
1798 (c_parser_omp_parallel): Parse combined
1799 parallel master{, taskloop{, simd}} constructs.
1800 (OMP_TASK_CLAUSE_MASK): Add in_reduction clause.
1801 (OMP_TASKGROUP_CLAUSE_MASK): Define.
1802 (c_parser_omp_taskgroup): Add LOC argument. Parse taskgroup clauses.
1803 (OMP_TASKWAIT_CLAUSE_MASK): Define.
1804 (c_parser_omp_taskwait): Handle taskwait with depend clauses.
1805 (c_parser_omp_teams): Force a BIND_EXPR with BLOCK
1806 around teams body. Use SET_EXPR_LOCATION.
1807 (c_parser_omp_target_data): Allow target data
1808 with only use_device_ptr clauses.
1809 (c_parser_omp_target): Use SET_EXPR_LOCATION. Set
1810 OMP_REQUIRES_TARGET_USED bit in omp_requires_mask.
1811 (c_parser_omp_requires): New function.
1812 (c_finish_taskloop_clauses): New function.
1813 (OMP_TASKLOOP_CLAUSE_MASK): Add reduction and in_reduction clauses.
1814 (c_parser_omp_taskloop): Use c_finish_taskloop_clauses. Add forward
1815 declaration. Disallow in_reduction clause when combined with parallel
1816 master.
1817 (c_parser_omp_construct): Adjust c_parser_omp_master and
1818 c_parser_omp_taskgroup callers.
1819 * c-typeck.c (c_finish_omp_cancel): Diagnose if clause with modifier
1820 other than cancel.
1821 (handle_omp_array_sections_1): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION
1822 like OMP_CLAUSE_REDUCTION.
1823 (handle_omp_array_sections): Likewise. Call save_expr on array
1824 reductions before calling build_index_type. Handle depend clauses
1825 with iterators.
1826 (struct c_find_omp_var_s): New type.
1827 (c_find_omp_var_r, c_omp_finish_iterators): New functions.
1828 (c_finish_omp_clauses): Don't diagnose nonmonotonic clause
1829 with static, runtime or auto schedule kinds. Call save_expr for whole
1830 array reduction sizes. Diagnose reductions with zero sized elements
1831 or variable length structures. Diagnose nogroup clause used with
1832 reduction clause(s). Handle depend clause with
1833 OMP_CLAUSE_DEPEND_DEPOBJ. Diagnose bit-fields. Require
1834 omp_depend_t type for OMP_CLAUSE_DEPEND_DEPOBJ kinds and
1835 some different type for other kinds. Use build_unary_op with
1836 ADDR_EXPR and build_indirect_ref instead of c_mark_addressable.
1837 Handle depend clauses with iterators. Remove no longer needed special
1838 case that predetermined const qualified vars may be specified in
1839 firstprivate clause. Complain if const qualified vars are mentioned
1840 in data-sharing clauses other than firstprivate or shared. Use
1841 error_at with OMP_CLAUSE_LOCATION (c) as first argument instead of
1842 error. Formatting fix. Handle OMP_CLAUSE_NONTEMPORAL and
1843 OMP_CLAUSE_{IN,TASK}_REDUCTION. Allow any lvalue as
1844 OMP_CLAUSE_DEPEND operand (besides array section), adjust diagnostics.
1845
7e2de6df
DM
18462018-10-29 David Malcolm <dmalcolm@redhat.com>
1847
1848 * c-decl.c (implicit_decl_warning): Update "is there a suggestion"
1849 logic for change to name_hint::operator bool.
1850 (undeclared_variable): Likewise.
1851 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
1852 (c_parser_parameter_declaration): Likewise.
1853
9f936c86
JM
18542018-10-17 Joseph Myers <joseph@codesourcery.com>
1855
1856 * c-errors.c (pedwarn_c11): New function.
1857 * c-parser.c (disable_extension_diagnostics): Save
1858 warn_c11_c2x_compat and set it to 0.
1859 (restore_extension_diagnostics): Restore warn_c11_c2x_compat.
1860 (c_parser_static_assert_declaration_no_semi): Handle
1861 _Static_assert without string constant.
1862 * c-tree.h (pedwarn_c11): New prototype.
1863
033eb567
DM
18642018-10-17 David Malcolm <dmalcolm@redhat.com>
1865
1866 * Make-lang.in (selftest-c): New.
1867 (C_SELFTEST_FLAGS, C_SELFTEST_DEPS, s-selftest-c, selftest-c-gdb)
1868 (selftest-gdb, selftest-c-valgrind, selftest-valgrind): Move here
1869 from gcc/Makefile.in.
1870
0edf3afe
RB
18712018-10-02 Richard Biener <rguenther@suse.de>
1872
1873 * c-decl.c (warn_if_shadowing): Do not test DECL_FROM_INLINE.
1874
8313a764
JM
18752018-09-26 Joseph Myers <joseph@codesourcery.com>
1876
1877 PR c/87390
1878 * c-typeck.c (build_binary_op): Use excess precision for
1879 comparisons of integers and floating-point for C11 and later.
1880
ce6f0888
MJ
18812018-09-26 Martin Jambor <mjambor@suse.cz>
1882
1883 PR c/87347
1884 * c-parser.c (warn_for_abs): Bail out if TYPE_ARG_TYPES is NULL. Fix
ab20d992 1885 comment.
ce6f0888 1886
9c4a4b3c
DM
18872018-09-17 David Malcolm <dmalcolm@redhat.com>
1888
1889 * c-objc-common.c (range_label_for_type_mismatch::get_text):
1890 Update for new param.
1891 * c-typeck.c (maybe_range_label_for_tree_type_mismatch::get_text):
1892 Likewise.
1893
80c6d1f4
MJ
18942018-09-17 Martin Jambor <mjambor@suse.cz>
1895
1896 PR c/63886
1897 * c-parser.c: (warn_for_abs): New function.
1898 (c_parser_postfix_expression_after_primary): Call it.
1899
4a426e36
BE
19002018-09-13 Bernd Edlinger <bernd.edlinger@hotmail.de>
1901
1902 * c-typeck.c (digest_init): Shorten overlength strings.
1903
6d900107
BE
19042018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
1905
1906 * c-decl.c (finish_decl): Call complete_flexible_array_elts.
1907
b5764229
BE
19082018-09-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
1909
1910 * c-decl.c (finish_decl): Call braced_list_to_string here ...
1911 * c-parser.c (c_parser_declaration_or_fndef): ... instead of here.
1912
22eea6b2
AM
19132018-08-30 Alexander Monakov <amonakov@ispras.ru>
1914
1915 * gimple-parser.c (c_parser_gimple_binary_expression): Accept infix
1916 "__MULT_HIGHPART" for MULT_HIGHPART_EXPR.
1917
85204e23
DM
19182018-08-27 David Malcolm <dmalcolm@redhat.com>
1919
1920 PR 87091
1921 * c-decl.c (implicitly_declare): Update call to
1922 maybe_add_include_fixit to suggest overriding the location, as it
1923 is for a note.
1924 * c-objc-common.c (c_tree_printer): Update for conversion of
1925 show_caret_p to a tri-state.
1926
3d78e008
ML
19272018-08-27 Martin Liska <mliska@suse.cz>
1928
1929 * c-decl.c (locate_old_decl): Use new function
92a285c1
ML
1930 fndecl_built_in_p and remove check for FUNCTION_DECL if
1931 possible.
3d78e008
ML
1932 (diagnose_mismatched_decls): Likewise.
1933 (merge_decls): Likewise.
1934 (warn_if_shadowing): Likewise.
1935 (pushdecl): Likewise.
1936 (implicitly_declare): Likewise.
1937 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
1938 * c-tree.h (C_DECL_ISNT_PROTOTYPE): Likewise.
1939 * c-typeck.c (build_function_call_vec): Likewise.
1940 (convert_arguments): Likewise.
1941
097f82ec
DM
19422018-08-20 David Malcolm <dmalcolm@redhat.com>
1943
1944 PR other/84889
1945 * c-decl.c (pushtag): Add auto_diagnostic_group instance.
1946 (diagnose_mismatched_decls): Likewise, in various places.
1947 (warn_if_shadowing): Likewise.
1948 (implicit_decl_warning): Likewise.
1949 (implicitly_declare): Likewise.
1950 (undeclared_variable): Likewise.
1951 (declare_label): Likewise.
1952 (grokdeclarator): Likewise.
1953 (start_function): Likewise.
1954 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
1955 (c_parser_parameter_declaration): Likewise.
1956 (c_parser_binary_expression): Likewise.
1957 * c-typeck.c (c_expr_sizeof_expr): Likewise.
1958 (parser_build_binary_op): Likewise.
1959 (build_unary_op): Likewise.
1960 (error_init): Likewise.
1961 (pedwarn_init): Likewise.
1962 (warning_init): Likewise.
1963 (convert_for_assignment): Likewise.
1964
96e6ae57
DM
19652018-08-15 David Malcolm <dmalcolm@redhat.com>
1966
1967 * c-objc-common.c: Include "gcc-rich-location.h".
1968 (c_tree_printer): Move implemenation of '%T' to...
1969 (print_type): ...this new function.
1970 (range_label_for_type_mismatch::get_text): New function.
1971 * c-typeck.c (convert_for_assignment): Add type labels to the rhs
1972 range for the various ic_argpass cases.
1973 (class maybe_range_label_for_tree_type_mismatch): New class.
1974 (build_binary_op): Use it when calling binary_op_error.
1975
0cd020ae 19762018-08-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
ab20d992 1977
0cd020ae
PK
1978 * c-decl.c (start_decl): Do not warn if variables is named as main
1979 and is a local variable.
1980
72733314
IS
19812018-08-15 Iain Sandoe <iain@sandoe.co.uk>
1982
1983 PR c/19315
1984 * c-decl.c (finish_decl): Don't add the 'extern' storage class to
1985 objects of unknown size.
1986
23aa9f7c
MS
19872018-08-13 Martin Sebor <msebor@redhat.com>
1988
1989 PR tree-optimization/71625
1990 * c-parser.c (c_parser_declaration_or_fndef): Call
1991 braced_list_to_string.
1992
e5e7e50d
BH
19932018-08-03 Bogdan Harjoc <harjoc@gmail.com>
1994
1995 PR c/86690
1996 * c-typeck.c (lookup_field): Do not use TYPE_LANG_SPECIFIC after
1997 errors.
1998
8a45b051
MS
19992018-08-01 Martin Sebor <msebor@redhat.com>
2000
2001 PR tree-optimization/86650
2002 * c-objc-common.c (c_tree_printer): Move usage of EXPR_LOCATION (t)
2003 and TREE_BLOCK (t) from within percent_K_format to this callsite.
2004
5922dcb5
JJ
20052018-08-01 Jakub Jelinek <jakub@redhat.com>
2006
2007 PR c/85704
2008 * c-typeck.c (init_field_decl_cmp): New function.
2009 (output_pending_init_elements): Use it for field comparisons
2010 instead of pure bit_position comparisons.
2011
9b452033
JJ
20122018-07-12 Jakub Jelinek <jakub@redhat.com>
2013
2014 * c-decl.c (c_decl_attributes): Don't diagnose vars without mappable
2015 type here, instead add "omp declare target implicit" attribute.
2016 (finish_decl): Diagnose vars without mappable type here.
2017
ab20d992
JJ
20182018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
2019 Thomas Schwinge <thomas@codesourcery.com>
829c6349
CLT
2020 Cesar Philippidis <cesar@codesourcery.com>
2021
2022 * c-parser.c (c_parser_omp_clause_name): Add support for finalize
2023 and if_present. Make present_or_{copy,copyin,copyout,create} aliases
2024 to their non-present_or_* counterparts. Make 'self' an alias to
2025 PRAGMA_OACC_CLAUSE_HOST.
2026 (c_parser_oacc_data_clause): Update GOMP mappings for
2027 PRAGMA_OACC_CLAUSE_{COPY,COPYIN,COPYOUT,CREATE,DELETE}. Remove
2028 PRAGMA_OACC_CLAUSE_{SELF,PRESENT_OR_*}.
2029 (c_parser_oacc_all_clauses): Handle finalize and if_present clauses.
2030 Remove support for present_or_* clauses.
2031 (OACC_KERNELS_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
2032 (OACC_PARALLEL_CLAUSE_MASK): Likewise.
2033 (OACC_DECLARE_CLAUSE_MASK): Likewise.
2034 (OACC_DATA_CLAUSE_MASK): Likewise.
2035 (OACC_ENTER_DATA_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
2036 (OACC_EXIT_DATA_CLAUSE_MASK): Add FINALIZE clause.
2037 (OACC_UPDATE_CLAUSE_MASK): Remove SELF, add IF_PRESENT.
2038 (c_parser_oacc_declare): Remove PRESENT_OR_* clauses.
2039 * c-typeck.c (c_finish_omp_clauses): Handle IF_PRESENT and FINALIZE.
2040
e197e64e
KV
20412018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
2042
2043 * c-typeck.c (build_unary_op): Handle ABSU_EXPR;
2044 * gimple-parser.c (c_parser_gimple_statement): Likewise.
2045 (c_parser_gimple_unary_expression): Likewise.
2046
487f2f61
JJ
20472018-06-15 Jakub Jelinek <jakub@redhat.com>
2048
2049 PR c/86093
2050 * c-typeck.c (pointer_diff): Cast both pointers to unqualified types
2051 before doing POINTER_DIFF_EXPR.
2052
e4d44a37
MP
20532018-06-07 Marek Polacek <polacek@redhat.com>
2054
2055 PR c/85318
2056 * c-decl.c (check_for_loop_decls): Add -Wc90-c99-compat warning about
2057 for loop initial declarations.
2058
b67b9225
DP
20592018-05-30 David Pagan <dave.pagan@oracle.com>
2060
2061 PR c/55976
2062 * c-decl.c (grokdeclarator): Update check for return type warnings.
2063 (start_function): Likewise.
2064 (finish_function): Likewise.
2065 * c-typeck.c (c_finish_return): Update check for return type warnings.
2066 Pass OPT_Wreturn_type to pedwarn when appropriate.
2067
c566cc9f
RS
20682018-05-18 Richard Sandiford <richard.sandiford@linaro.org>
2069
2070 * gimple-parser.c (c_parser_gimple_postfix_expression): Remove
2071 __FMA_EXPR handlng.
2072
e4f81565
RS
20732018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
2074
2075 * gimple-parser.c: Include internal-fn.h.
2076 (c_parser_gimple_statement): Treat a leading CPP_DOT as a call.
2077 (c_parser_gimple_call_internal): New function.
2078 (c_parser_gimple_postfix_expression): Use it to handle CPP_DOT.
2079 Fix typos in comment.
2080
79e7b1fe
JJ
20812018-05-10 Jakub Jelinek <jakub@redhat.com>
2082
2083 PR c++/85662
2084 * c-fold.c (c_fully_fold_internal): Use fold_offsetof rather than
2085 fold_offsetof_1, pass TREE_TYPE (expr) as TYPE to it and drop the
2086 fold_convert_loc.
2087 * c-typeck.c (build_unary_op): Use fold_offsetof rather than
2088 fold_offsetof_1, pass argtype as TYPE to it and drop the
2089 fold_convert_loc.
2090
f7584c81
DP
20912018-05-02 David Pagan <dave.pagan@oracle.com>
2092
2093 PR c/30552
2094 * c-decl.c (old_style_parameter_scope): New function.
2095 * c-parser.c (c_parser_postfix_expression): Check for statement
2096 expressions in old-style function parameter list declarations.
2097 * c-parser.h (old_style_parameter_scope): New extern declaration.
2098
b33a0cb3
JJ
20992018-04-25 Jakub Jelinek <jakub@redhat.com>
2100
2101 PR sanitizer/84307
2102 * c-decl.c (build_compound_literal): Call pushdecl (decl) even when
2103 it is not TREE_STATIC.
2104 * c-typeck.c (c_mark_addressable) <case COMPOUND_LITERAL_EXPR>: Mark
2105 not just the COMPOUND_LITERAL_EXPR node itself addressable, but also
2106 its COMPOUND_LITERAL_EXPR_DECL.
2107
c5c5822a
JM
21082018-03-21 Joseph Myers <joseph@codesourcery.com>
2109
2110 * c-parser.c (c_parser_postfix_expression): For __builtin_tgmath
2111 where all functions return the same _FloatN or _FloatNx type,
2112 treat integer types as _Float64 instead of double.
2113
aa1c9429
JJ
21142018-03-21 Jakub Jelinek <jakub@redhat.com>
2115
2116 PR c/84999
2117 * c-typeck.c (build_binary_op): If c_common_type_for_size fails when
2118 building vector comparison, diagnose it and return error_mark_node.
2119
9bb45a95
JJ
21202018-03-15 Jakub Jelinek <jakub@redhat.com>
2121
2122 PR c/84853
2123 * c-typeck.c (build_binary_op) <case RSHIFT_EXPR, case LSHIFT_EXPR>:
2124 If code1 is INTEGER_TYPE, only allow code0 VECTOR_TYPE if it has
2125 INTEGER_TYPE element type.
2126
ada6bad9
DP
21272018-03-13 David Pagan <dave.pagan@oracle.com>
2128
2129 PR c/46921
2130 * c-typeck.c (output_init_element): Ensure field initializer
2131 expression is always evaluated if there are side effects.
2132
849bbdb9
JJ
21332018-03-06 Jakub Jelinek <jakub@redhat.com>
2134
2135 PR c/84721
2136 * c-parser.c (add_debug_begin_stmt): Don't add DEBUG_BEGIN_STMT if
2137 !building_stmt_list_p ().
2138
d74641bd
RS
21392018-02-13 Richard Sandiford <richard.sandiford@linaro.org>
2140
2141 PR c/84305
2142 * c-decl.c (grokdeclarator): Create an anonymous TYPE_DECL
2143 in PARM and TYPENAME contexts too, but attach it to a BIND_EXPR
2144 and include the BIND_EXPR in the list of things that need to be
2145 pre-evaluated.
2146
0444aa9c
NS
21472018-02-09 Nathan Sidwell <nathan@acm.org>
2148
2149 PR c/84293
2150 * c-typeck.c (build_indirect_ref, build_c_cast): Pass expr location
2151 to strict_aliasing_warning.
2152
7c30b12a
PC
21532018-02-02 Paolo Carlini <paolo.carlini@oracle.com>
2154
2155 * c-typeck.c (really_start_incremental_init, push_init_level,
2156 set_nonincremental_init, output_init_element, process_init_element):
2157 Use DECL_UNNAMED_BIT_FIELD.
2158
2be4dfcb
MP
21592018-01-31 Marek Polacek <polacek@redhat.com>
2160
2161 PR c/81779
2162 * c-parser.c (c_parser_compound_statement_nostart): Call
2163 expansion_point_location_if_in_system_header.
2164
bb9869d5
DM
21652018-01-17 David Malcolm <dmalcolm@redhat.com>
2166
2167 PR c++/83814
2168 * c-fold.c (fold_for_warn): Move from c-common.c, reducing to just
2169 the C part.
2170
b4923738
JJ
21712018-01-13 Jakub Jelinek <jakub@redhat.com>
2172
2173 PR c/83801
2174 * c-tree.h (decl_constant_value_1): Add a bool argument.
2175 * c-typeck.c (decl_constant_value_1): Add IN_INIT argument, allow
2176 returning a CONSTRUCTOR if it is true. Use error_operand_p.
2177 (decl_constant_value): Adjust caller.
2178 * c-fold.c (c_fully_fold_internal): If in_init, pass true to
2179 decl_constant_value_1 as IN_INIT. Otherwise, punt if
2180 decl_constant_value returns initializer that has BLKmode or
2181 array type.
2182 (c_fully_fold_internal) <case COMPONENT_REF>: Fold if !lval.
2183
928686b1
RS
21842018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
2185 Alan Hayward <alan.hayward@arm.com>
2186 David Sherwood <david.sherwood@arm.com>
2187
2188 * c-typeck.c (comptypes_internal, build_binary_op): Handle polynomial
2189 TYPE_VECTOR_SUBPARTS.
2190
85ec4feb
JJ
21912018-01-03 Jakub Jelinek <jakub@redhat.com>
2192
2193 Update copyright years.
2194
913884f7
JJ
21952018-01-01 Jakub Jelinek <jakub@redhat.com>
2196
2197 PR c/83595
2198 * c-parser.c (c_parser_braced_init, c_parser_initelt,
2199 c_parser_conditional_expression, c_parser_cast_expression,
2200 c_parser_sizeof_expression, c_parser_alignof_expression,
2201 c_parser_postfix_expression, c_parser_omp_declare_reduction,
2202 c_parser_transaction_expression): Use set_error () method instead
2203 of setting value member to error_mark_node.
2204
c6cfa2bf
MM
22052017-12-28 Michael Meissner <meissner@linux.vnet.ibm.com>
2206
2207 * c-decl.c (header_for_builtin_fn): Add integer rounding _Float<N>
2208 and _Float<N>X built-in functions.
2209
11d29d63
JJ
22102017-12-22 Jakub Jelinek <jakub@redhat.com>
2211
14ec014e
JJ
2212 PR debug/83550
2213 * c-decl.c (finish_struct): Set DECL_SOURCE_LOCATION on
2214 TYPE_STUB_DECL and call rest_of_type_compilation before processing
2215 incomplete vars rather than after it.
2216
11d29d63
JJ
2217 PR debug/83547
2218 * c-typeck.c (c_finish_stmt_expr): Ignore !TREE_SIDE_EFFECTS as
2219 indicator of ({ }), instead skip all trailing DEBUG_BEGIN_STMTs first,
2220 and consider empty ones if there are no other stmts. For
2221 -Wunused-value walk all statements before the one only followed by
2222 DEBUG_BEGIN_STMTs.
2223
170a8bd6 22242017-12-22 Mike Stump <mikestump@comcast.net>
92a285c1 2225 Eric Botcazou <ebotcazou@adacore.com>
170a8bd6
EB
2226
2227 * c-parser.c (c_parser_while_statement): Add unroll parameter and
2228 build ANNOTATE_EXPR if present. Add 3rd operand to ANNOTATE_EXPR.
2229 (c_parser_do_statement): Likewise.
2230 (c_parser_for_statement): Likewise.
2231 (c_parser_statement_after_labels): Adjust calls to above.
2232 (c_parse_pragma_ivdep): New static function.
2233 (c_parser_pragma_unroll): Likewise.
2234 (c_parser_pragma) <PRAGMA_IVDEP>: Add support for pragma Unroll.
2235 <PRAGMA_UNROLL>: New case.
2236
01512446
JJ
22372017-12-19 Jakub Jelinek <jakub@redhat.com>
2238
2239 * c-typeck.c (comptypes_internal, function_types_compatible_p,
2240 perform_integral_promotions, digest_init): Replace Yoda conditions
2241 with typical order conditions.
2242 * c-decl.c (check_bitfield_type_and_width): Likewise.
2243
c65e18d3
BE
22442017-12-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
2245
2246 * c-typeck.c (c_safe_arg_type_equiv_p,
2247 c_safe_function_type_cast_p): New function.
2248 (build_c_cast): Implement -Wcast-function-type.
2249
b7280579
RB
22502017-12-14 Richard Biener <rguenther@suse.de>
2251
2252 PR c/83415
2253 * c-fold.c (c_fully_fold_internal): Treat VIEW_CONVERT_EXPR
2254 like REALPART_EXPR for the behavior of whether its operand
2255 is an lvalue.
2256
49e6a6c0
MP
22572017-12-12 Marek Polacek <polacek@redhat.com>
2258
2259 PR c/82679
2260 * c-decl.c (grokdeclarator): Check declspecs insted of atomicp.
2261
ab20d992 22622017-12-12 Alexandre Oliva <aoliva@redhat.com>
96a95ac1
AO
2263
2264 * c-objc-common.h (LANG_HOOKS_EMITS_BEGIN_STMT): Redefine as true.
2265 * c-parser.c (add_debug_begin_stmt): New.
2266 (c_parser_declaration_or_fndef): Call it.
2267 (c_parser_compound_statement_nostart): Likewise.
2268 (c_parser_statement_after_labels): Likewise.
2269 * c-typeck (c_finish_stmt_expr): Skip begin stmts markers.
2270
4b2b493f
JM
22712017-12-07 Joseph Myers <joseph@codesourcery.com>
2272
2273 * c-decl.c (build_compound_literal): Add parameter alignas_align
2274 and set alignment of decl if nonzero.
2275 * c-parser.c (c_keyword_starts_typename): Allow RID_ALIGNAS.
2276 (c_parser_declspecs): Allow RID_ALIGNAS to follow a type, like a
2277 qualifier.
2278 (c_parser_struct_declaration): Update syntax comment.
2279 (c_parser_type_name): Add alignas_ok argument and pass it to
2280 c_parser_declspecs.
2281 (c_parser_cast_expression): Pass true to c_parser_type_name and
2282 give error if a cast used an _Alignas specifier.
2283 (c_parser_sizeof_expression): Pass true to c_parser_type_name and
2284 give error if sizeof (type-name) used an _Alignas specifier.
2285 (c_parser_alignof_expression): Pass true to c_parser_type_name and
2286 give error if _Alignof (type-name) used an _Alignas specifier.
2287 (c_parser_postfix_expression_after_paren_type): Check specified
2288 alignment for a compound literal and pass it to
2289 build_compound_literal.
2290 * c-parser.h (c_parser_type_name): Update prototype.
2291 * c-tree.h (build_compound_literal): Update prototype.
2292
5d9ae53d
MS
22932017-12-07 Martin Sebor <msebor@redhat.com>
2294
2295 PR c/81544
2296 * c-decl.c (c_decl_attributes): Look up existing declaration and
2297 pass it to decl_attributes.
2298
c79144f8
DM
22992017-12-06 David Malcolm <dmalcolm@redhat.com>
2300
2301 PR c/83236
2302 * c-decl.c (lookup_name_fuzzy): Don't suggest names that are
2303 reserved for use by the implementation.
2304
613bc14f
DM
23052017-12-06 David Malcolm <dmalcolm@redhat.com>
2306
2307 * c-decl.c: Include "c-family/c-spellcheck.h".
2308
05abad4c
ML
23092017-12-05 Martin Liska <mliska@suse.cz>
2310 Jakub Jelinek <jakub@redhat.com>
2311
2312 * c-typeck.c (pointer_diff): Add new argument and instrument
2313 pointer subtraction.
2314 (build_binary_op): Similar for pointer comparison.
2315
cc6534d4
JJ
23162017-12-01 Jakub Jelinek <jakub@redhat.com>
2317
65791f42
JJ
2318 PR c/79153
2319 * c-parser.c: Include tree-iterator.h.
2320 (c_parser_switch_statement): Emit LABEL_EXPR for the break label
2321 into SWITCH_BODY instead of after it and set SWITCH_BREAK_LABEL_P
2322 on it.
2323
cc6534d4
JJ
2324 PR c/83222
2325 * c-tree.h (decl_constant_value_1): Declare.
2326 * c-typeck.c (decl_constant_value_1): New function.
2327 (decl_constant_value): Use it.
2328 * c-fold.c (c_fully_fold_internal): If in_init, use
2329 decl_constant_value_1 instead of decl_constant_value.
2330
5de73c05
JJ
23312017-11-30 Jakub Jelinek <jakub@redhat.com>
2332
2333 * c-parser.c (c_parser_postfix_expression): Use ; instead of ;;.
2334
058f0b9e
JJ
23352017-11-28 Jakub Jelinek <jakub@redhat.com>
2336
2337 PR sanitizer/81275
2338 * c-typeck.c (c_finish_case): Set SWITCH_ALL_CASES_P if
2339 c_switch_covers_all_cases_p returns true.
2340
5e9d6aa4 23412017-11-28 Julia Koval <julia.koval@intel.com>
92a285c1 2342 Sebastian Peryt <sebastian.peryt@intel.com>
5e9d6aa4
JK
2343
2344 * Make-lang.in (c/c-array-notation.o): Remove.
2345 * c-array-notation.c: Delete.
2346 * c-decl.c: Remove cilkplus condition.
2347 * c-parser.c (c_parser_cilk_simd, c_parser_cilk_for,
2348 c_parser_cilk_verify_simd, c_parser_array_notation,
2349 c_parser_cilk_clause_vectorlength, c_parser_cilk_grainsize,
2350 c_parser_cilk_simd_fn_vector_attrs,
2351 c_finish_cilk_simd_fn_tokens): Delete.
2352 (c_parser_declaration_or_fndef): Remove cilkplus condition.
2353 (c_parser_direct_declarator_inner): Ditto.
2354 (CILK_SIMD_FN_CLAUSE_MASK): Delete.
2355 (c_parser_attributes, c_parser_compound_statement,
2356 c_parser_statement_after_labels, c_parser_if_statement,
2357 c_parser_switch_statement, c_parser_while_statement,
2358 c_parser_do_statement, c_parser_for_statement,
2359 c_parser_unary_expression, c_parser_postfix_expression,
2360 c_parser_postfix_expression_after_primary,
2361 c_parser_pragma, c_parser_omp_clause_name, c_parser_omp_all_clauses,
2362 c_parser_omp_for_loop, c_finish_omp_declare_simd): Remove cilkplus
2363 support.
2364 * c-typeck.c (build_array_ref, build_function_call_vec,
2365 convert_arguments,
2366 lvalue_p, build_compound_expr, c_finish_return, c_finish_if_stmt,
2367 c_finish_loop, build_binary_op): Remove cilkplus support.
2368
9e851845
JJ
23692017-11-28 Jakub Jelinek <jakub@redhat.com>
2370
2371 * c-typeck.c (c_start_case): Build SWITCH_EXPR using build2 instead
2372 of build3.
2373
ab20d992 23742017-11-14 Boris Kolpackov <boris@codesynthesis.com>
8c7dbea9
BK
2375
2376 * Make-lang.in (c.install-plugin): Install backend import library.
2377
41521dee
JJ
23782017-11-23 Jakub Jelinek <jakub@redhat.com>
2379
2380 * c-parser.c (c_parser_omp_declare_simd): Reject declare simd in
2381 pragma_stmt context.
2382
ac9effed
EB
23832017-11-23 Mike Stump <mikestump@comcast.net>
2384 Eric Botcazou <ebotcazou@adacore.com>
2385
2386 * c-parser.c (c_parser_while_statement): Pass 3rd operand to
2387 ANNOTATE_EXPR.
2388 (c_parser_do_statement): Likewise.
2389 (c_parser_for_statement): Likewise.
2390
ce95abc4
DM
23912017-11-22 David Malcolm <dmalcolm@redhat.com>
2392
2393 PR c++/62170
2394 * c-objc-common.c (c_tree_printer): Convert penultimate param from
2395 bool to bool *. Within '%T' handling, if showing an "aka", use
2396 "quoted" param to add appropriate quoting.
2397
974aedcc
MP
23982017-11-22 Marek Polacek <polacek@redhat.com>
2399
2400 PR c++/60336
2401 PR middle-end/67239
2402 PR target/68355
2403 * c-decl.c (grokdeclarator): Set DECL_PADDING_P on unnamed bit-fields.
2404
d4300cc6
DM
24052017-11-21 David Malcolm <dmalcolm@redhat.com>
2406
2407 PR c/83056
2408 * c-decl.c (lookup_name_fuzzy): Don't suggest names that came from
2409 earlier failed lookups.
2410
1af4ebf5
MG
24112017-11-21 Marc Glisse <marc.glisse@inria.fr>
2412
2413 * c-fold.c (c_fully_fold_internal): Handle POINTER_DIFF_EXPR.
2414 * c-typeck.c (pointer_diff): Use POINTER_DIFF_EXPR.
2415
26edace6
DM
24162017-11-20 David Malcolm <dmalcolm@redhat.com>
2417
2418 PR c/81404
2419 * c-decl.c: Include "c-family/known-headers.h".
2420 (get_c_name_hint): Rename to get_stdlib_header_for_name and move
2421 to known-headers.cc.
2422 (class suggest_missing_header): Move to known-header.h.
2423 (lookup_name_fuzzy): Call get_c_stdlib_header_for_name rather
2424 than get_c_name_hint.
2425
b1212255
DM
24262017-11-20 David Malcolm <dmalcolm@redhat.com>
2427
2428 * c-decl.c (get_c_name_hint): New function.
2429 (class suggest_missing_header): New class.
2430 (lookup_name_fuzzy): Call get_c_name_hint and use it to
2431 suggest missing headers to the user.
2432
6c7a259b
DM
24332017-11-20 David Malcolm <dmalcolm@redhat.com>
2434
2435 * c-decl.c: Define INCLUDE_UNIQUE_PTR before including system.h.
2436 Include "c-family/name-hint.h"
2437 (implicit_decl_warning): Convert "hint" from
2438 const char * to name_hint. Pass location to
2439 lookup_name_fuzzy. Suppress any deferred diagnostic if the
2440 warning was not printed.
2441 (undeclared_variable): Likewise for "guessed_id".
2442 (lookup_name_fuzzy): Convert return type from const char *
2443 to name_hint. Add location_t param.
2444 * c-parser.c: Define INCLUDE_UNIQUE_PTR before including system.h.
2445 Include "c-family/name-hint.h"
2446 (c_parser_declaration_or_fndef): Convert "hint" from
2447 const char * to name_hint. Pass location to lookup_name_fuzzy.
2448 (c_parser_parameter_declaration): Likewise.
2449
f9c59f7e
JJ
24502017-11-19 Jakub Jelinek <jakub@redhat.com>
2451
2452 PR c/66618
2453 PR c/69960
2454 * c-parser.c (c_parser_omp_atomic): Pass true as LVAL to c_fully_fold
2455 where needed.
2456 * c-typeck.c (build_unary_op, build_modify_expr, build_asm_expr,
2457 handle_omp_array_sections): Likewise.
2458 (digest_init): Don't call decl_constant_value_for_optimization.
2459 * c-tree.h (decl_constant_value_for_optimization): Removed.
2460 * c-fold.c (c_fold_array_ref): New function.
2461 (c_fully_fold_internal): Add LVAL argument, propagate it through
2462 recursive calls. For VAR_P call decl_constant_value and
2463 unshare if not LVAL and either optimizing or IN_INIT. Remove
2464 decl_constant_value_for_optimization calls. If IN_INIT and not LVAL,
2465 fold ARRAY_REF with STRING_CST and INTEGER_CST operands.
2466 (c_fully_fold): Add LVAL argument, pass it through to
2467 c_fully_fold_internal.
2468 (decl_constant_value_for_optimization): Removed.
2469
3ca0dc60
JM
24702017-11-15 Joseph Myers <joseph@codesourcery.com>
2471
2472 PR c/81156
2473 * c-parser.c (check_tgmath_function): New function.
2474 (enum tgmath_parm_kind): New enum.
2475 (c_parser_postfix_expression): Handle __builtin_tgmath.
2476
64a5912c
DM
24772017-10-31 David Malcolm <dmalcolm@redhat.com>
2478
2479 * c-decl.c (implicit_decl_warning): Update for renaming of
2480 pedwarn_at_rich_loc and warning_at_rich_loc.
2481 (implicitly_declare): Likewise for renaming of inform_at_rich_loc.
2482 (undeclared_variable): Likewise for renaming of error_at_rich_loc.
2483 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
2484 (c_parser_struct_or_union_specifier): Likewise for renaming of
2485 pedwarn_at_rich_loc.
2486 (c_parser_parameter_declaration): Likewise for renaming of
2487 error_at_rich_loc.
2488 * c-typeck.c (build_component_ref): Likewise.
2489 (build_unary_op): Likewise for renaming of inform_at_rich_loc.
2490 (pop_init_level): Likewise for renaming of warning_at_rich_loc.
2491 (set_init_label): Likewise for renaming of error_at_rich_loc.
2492
c1136864
RB
24932017-10-30 Richard Biener <rguenther@suse.de>
2494
2495 * gimple-parser.c (c_parser_gimple_statement): Parse conditional
2496 stmts.
2497
ee5fd23a
MM
24982017-10-27 Michael Meissner <meissner@linux.vnet.ibm.com>
2499
2500 * c-decl.c (header_for_builtin_fn): Add support for copysign, fma,
2501 fmax, fmin, and sqrt _Float<N> and _Float<N>X variants.
2502
1a59ccf2
DM
25032017-10-25 David Malcolm <dmalcolm@redhat.com>
2504
2505 PR c/7356
2506 * c-parser.c (c_parser_declaration_or_fndef): Detect missing
2507 semicolons.
2508
bc1a75dd
JJ
25092017-10-25 Jakub Jelinek <jakub@redhat.com>
2510
2511 PR libstdc++/81706
2512 * c-decl.c (merge_decls): Copy "omp declare simd" attributes from
2513 newdecl to corresponding __builtin_ if any.
2514
ff1ff960
PC
25152017-10-24 Paolo Carlini <paolo.carlini@oracle.com>
2516
2517 PR c++/82466
2518 * c-decl.c (diagnose_mismatched_decls): Use
2519 OPT_Wbuiltin_declaration_mismatch.
2520
62e1c678
DM
25212017-10-12 David Malcolm <dmalcolm@redhat.com>
2522
2523 * c-parser.c (c_parser_require): Add "type_is_unique" param and
2524 use it to guard calls to maybe_suggest_missing_token_insertion.
2525 (c_parser_parms_list_declarator): Override default value of new
2526 "type_is_unique" param to c_parser_require.
2527 (c_parser_asm_statement): Likewise.
2528 * c-parser.h (c_parser_require): Add "type_is_unique" param,
2529 defaulting to true.
2530
a92f6726
NS
25312017-10-11 Nathan Sidwell <nathan@acm.org>
2532
2533 * c-decl.c (grokdeclarator): Check HAS_DECL_ASSEMBLER_NAME_P too.
2534
8e6cdc90
RS
25352017-10-10 Richard Sandiford <richard.sandiford@linaro.org>
2536
2537 * c-parser.c (c_parser_cilk_clause_vectorlength): Use wi::to_wide when
2538 operating on trees as wide_ints.
2539 * c-typeck.c (build_c_cast, c_finish_omp_clauses): Likewise.
2540 (c_tree_equal): Likewise.
2541
8139a48e
DM
25422017-10-04 David Malcolm <dmalcolm@redhat.com>
2543
2544 * c-decl.c (push_parm_decl): Store c_parm's location into the
2545 PARAM_DECL.
2546 (build_c_parm): Add "loc" param and store it within the c_parm.
2547 * c-parser.c (struct c_parser): Add "last_token_location" field.
2548 (c_parser_consume_token): Store location of the token into the
2549 new field.
2550 (c_parser_declaration_or_fndef): Store params into DECL_ARGUMENTS
2551 when handling a FUNCTION_DECL, if it doesn't already have them.
2552 (c_parser_parameter_declaration): Generate a location for the
2553 parameter, and pass it to the call to build_c_parm.
2554 * c-tree.h (struct c_parm): Add field "loc".
2555 (build_c_parm): Add location_t param.
2556 * c-typeck.c (get_fndecl_argument_location): New function.
2557 (inform_for_arg): New function.
2558 (convert_for_assignment): Use inform_for_arg when dealing with
2559 ic_argpass.
2560
2a389958
JJ
25612017-09-29 Jakub Jelinek <jakub@redhat.com>
2562
7d386d45
JJ
2563 * c-decl.c (grokfield): Use SET_DECL_C_BIT_FIELD here if
2564 width is non-NULL.
2565 (finish_struct): Test DECL_C_BIT_FIELD instead of DECL_INITIAL,
2566 don't SET_DECL_C_BIT_FIELD here.
2567
2a389958
JJ
2568 PR c/82340
2569 * c-decl.c (build_compound_literal): Use c_apply_type_quals_to_decl
2570 instead of trying to set just TREE_READONLY manually.
2571
ebc6a85e
TV
25722017-09-16 Tom de Vries <tom@codesourcery.com>
2573
2574 PR c/81875
2575 * c-parser.c (c_parser_omp_for_loop): Fold only operands of cond, not
2576 cond itself.
2577
bb75facd
JM
25782017-09-15 Joseph Myers <joseph@codesourcery.com>
2579
2580 PR c/82071
2581 * c-typeck.c (ep_convert_and_check): Just call convert_and_check
2582 for C11.
2583 (build_conditional_expr): For C11, generate result with excess
2584 precision when one argument is an integer and the other is of a
2585 type using excess precision.
2586
1d933576
BE
25872017-09-15 Bernd Edlinger <bernd.edlinger@hotmail.de>
2588
2589 * c-typeck.c (build_c_cast): Implement -Wcast-align=strict.
2590
267bbb6f
MP
25912017-09-13 Marek Polacek <polacek@redhat.com>
2592
2593 PR c/82167
2594 * c-typeck.c (c_expr_sizeof_expr): Use the type of expr.value rather
2595 than expr.original_type.
2596
6836632e
NS
25972017-09-12 Nathan Sidwell <nathan@acm.org>
2598
2599 * c-decl.c (field_decl_cmp, resort_data, resort_field_decl_cmp,
2600 resort_sorted_fields): Moved from c-family/c-common.c.
2601 * c-lang.h (struct sorted_fields_type): Moved from c-family/c-common.h.
2602
e035be33
JM
26032017-09-01 Joseph Myers <joseph@codesourcery.com>
2604
2605 PR c/82071
2606 * c-typeck.c (build_atomic_assign): Handle argument with excess
2607 precision. Ensure any EXCESS_PRECISION_EXPR is present in
2608 argument passed to build_binary_op and convert_for_assignment but
2609 not for call to c_fully_fold.
2610 (build_modify_expr): Do not remove EXCESS_PRECISION_EXPR early.
2611 Ensure build_binary_op is called with argument with original
2612 semantic type. Avoid calling c_fully_fold with an
2613 EXCESS_PRECISION_EXPR from build_binary_op.
2614
d2e05fcb
JJ
26152017-09-01 Jakub Jelinek <jakub@redhat.com>
2616
2617 PR c/81887
2618 * c-parser.c (c_parser_omp_ordered): Handle -fopenmp-simd.
2619
b397965c
RS
26202017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
2621 Alan Hayward <alan.hayward@arm.com>
2622 David Sherwood <david.sherwood@arm.com>
2623
2624 * c-typeck.c (build_binary_op): Use SCALAR_TYPE_MODE.
2625 (c_common_type): Likewise. Use as_a <scalar_mode> when setting
2626 m1 and m2 to the signed equivalent of a fixed-point
2627 SCALAR_TYPE_MODE.
2628
14e18d71
DM
26292017-08-24 David Malcolm <dmalcolm@redhat.com>
2630
2631 * c-tree.h (c_expr::get_location) Use EXPR_HAS_LOCATION rather
2632 than CAN_HAVE_LOCATION_P when determining whether to use the
2633 location_t value within "value".
2634
7f204c0f
DM
26352017-08-21 David Malcolm <dmalcolm@redhat.com>
2636
2637 * c-parser.c (c_parser_expr_list): Use c_expr::get_location ()
2638 rather than peeking the location of the first token.
2639 * c-tree.h (c_expr::get_location): New method.
2640
2f687306
DM
26412017-08-21 David Malcolm <dmalcolm@redhat.com>
2642
2643 * c-typeck.c (build_function_call_vec): Pass arg_loc to call
2644 to check_function_arguments.
2645
3e7b80d7
MP
26462017-08-18 Marek Polacek <polacek@redhat.com>
2647
2648 * c-parser.c (c_parser_postfix_expression): Remove unused code. Update
2649 commentary.
2650
00aa1fa2
L
26512017-08-18 H.J. Lu <hongjiu.lu@intel.com>
2652
2653 PR c/53037
2654 * c-decl.c (merge_decls): Also merge DECL_WARN_IF_NOT_ALIGN.
2655 (check_bitfield_type_and_width): Don't allow bit-field with
2656 warn_if_not_aligned type.
2657
da67acb9
MS
26582017-08-14 Martin Sebor <msebor@redhat.com>
2659
2660 PR c/81117
2661 * c-objc-common.c (c_objc_common_init): Handle 'G'.
2662
bb85aa74
MP
26632017-08-11 Marek Polacek <polacek@redhat.com>
2664
2665 PR c/81795
2666 * c-decl.c (pushtag): Only print inform if the warning was printed.
2667 (grokdeclarator): Likewise.
2668
32129a17
DM
26692017-08-10 David Malcolm <dmalcolm@redhat.com>
2670
2671 * c-parser.c (c_parser_error): Rename to...
2672 (c_parser_error_richloc): ...this, making static, and adding
2673 "richloc" parameter, passing it to the c_parse_error call,
2674 rather than calling c_parser_set_source_position_from_token.
2675 (c_parser_error): Reintroduce, reimplementing in terms of the
2676 above, converting return type from void to bool.
2677 (class token_pair): New class.
2678 (struct matching_paren_traits): New struct.
2679 (matching_parens): New typedef.
2680 (struct matching_brace_traits): New struct.
2681 (matching_braces): New typedef.
2682 (get_matching_symbol): New function.
2683 (c_parser_require): Add param MATCHING_LOCATION, using it to
2684 highlight matching "opening" tokens for missing "closing" tokens.
2685 (c_parser_skip_until_found): Likewise.
2686 (c_parser_static_assert_declaration_no_semi): Convert explicit
2687 parsing of CPP_OPEN_PAREN and CPP_CLOSE_PAREN to use of
2688 class matching_parens, so that the pertinent open parenthesis is
2689 highlighted when there are problems locating the close
2690 parenthesis.
2691 (c_parser_struct_or_union_specifier): Likewise.
2692 (c_parser_typeof_specifier): Likewise.
2693 (c_parser_alignas_specifier): Likewise.
2694 (c_parser_simple_asm_expr): Likewise.
2695 (c_parser_braced_init): Likewise, for matching_braces.
2696 (c_parser_paren_condition): Likewise, for matching_parens.
2697 (c_parser_switch_statement): Likewise.
2698 (c_parser_for_statement): Likewise.
2699 (c_parser_asm_statement): Likewise.
2700 (c_parser_asm_operands): Likewise.
2701 (c_parser_cast_expression): Likewise.
2702 (c_parser_sizeof_expression): Likewise.
2703 (c_parser_alignof_expression): Likewise.
2704 (c_parser_generic_selection): Likewise.
2705 (c_parser_postfix_expression): Likewise for cases RID_VA_ARG,
2706 RID_OFFSETOF, RID_TYPES_COMPATIBLE_P, RID_AT_SELECTOR,
2707 RID_AT_PROTOCOL, RID_AT_ENCODE, reindenting as necessary.
2708 In case CPP_OPEN_PAREN, pass loc_open_paren to the
2709 c_parser_skip_until_found call.
2710 (c_parser_objc_class_definition): Use class matching_parens as
2711 above.
2712 (c_parser_objc_method_decl): Likewise.
2713 (c_parser_objc_try_catch_finally_statement): Likewise.
2714 (c_parser_objc_synchronized_statement): Likewise.
2715 (c_parser_objc_at_property_declaration): Likewise.
2716 (c_parser_oacc_wait_list): Likewise.
2717 (c_parser_omp_var_list_parens): Likewise.
2718 (c_parser_omp_clause_collapse): Likewise.
2719 (c_parser_omp_clause_default): Likewise.
2720 (c_parser_omp_clause_if): Likewise.
2721 (c_parser_omp_clause_num_threads): Likewise.
2722 (c_parser_omp_clause_num_tasks): Likewise.
2723 (c_parser_omp_clause_grainsize): Likewise.
2724 (c_parser_omp_clause_priority): Likewise.
2725 (c_parser_omp_clause_hint): Likewise.
2726 (c_parser_omp_clause_defaultmap): Likewise.
2727 (c_parser_oacc_single_int_clause): Likewise.
2728 (c_parser_omp_clause_ordered): Likewise.
2729 (c_parser_omp_clause_reduction): Likewise.
2730 (c_parser_omp_clause_schedule): Likewise.
2731 (c_parser_omp_clause_num_teams): Likewise.
2732 (c_parser_omp_clause_thread_limit): Likewise.
2733 (c_parser_omp_clause_aligned): Likewise.
2734 (c_parser_omp_clause_linear): Likewise.
2735 (c_parser_omp_clause_safelen): Likewise.
2736 (c_parser_omp_clause_simdlen): Likewise.
2737 (c_parser_omp_clause_depend): Likewise.
2738 (c_parser_omp_clause_map): Likewise.
2739 (c_parser_omp_clause_device): Likewise.
2740 (c_parser_omp_clause_dist_schedule): Likewise.
2741 (c_parser_omp_clause_proc_bind): Likewise.
2742 (c_parser_omp_clause_uniform): Likewise.
2743 (c_parser_omp_for_loop): Likewise.
2744 (c_parser_cilk_clause_vectorlength): Likewise.
2745 (c_parser_cilk_clause_linear): Likewise.
2746 (c_parser_transaction_expression): Likewise.
2747 * c-parser.h (c_parser_require): Add param matching_location with
2748 default UNKNOWN_LOCATION.
2749 (c_parser_error): Convert return type from void to bool.
2750 (c_parser_skip_until_found): Add param matching_location with
2751 default UNKNOWN_LOCATION.
2752
30af3a2b
MP
27532017-08-09 Marek Polacek <polacek@redhat.com>
2754
2755 * c-decl.c (build_enumerator): Use true/false instead of 1/0.
2756 * c-tree.h (build_external_ref): Update declaration.
2757 * c-typeck.c (build_array_ref): Use true/false instead of 1/0.
2758 (build_external_ref): Change the type of a parameter to bool.
2759 (parser_build_binary_op): Use true/false instead of 1/0.
2760 (pointer_diff): Likewise.
2761 (build_modify_expr): Likewise.
2762 (set_designator): Change the type of a parameter to bool.
2763 (set_init_index): Use true/false instead of 1/0.
2764 (set_init_label): Likewise.
2765 (output_init_element): Change the type of a parameter to bool.
2766 (output_pending_init_elements): Use true/false instead of 1/0.
2767 (process_init_element): Likewise.
2768 (build_binary_op): Change the type of a parameter to bool.
2769
296c53ac
MP
27702017-08-09 Marek Polacek <polacek@redhat.com>
2771
2772 PR c/81233
2773 * c-typeck.c (pedwarn_init): Make the function take a variable list.
2774 Call emit_diagnostic_valist instead of pedwarn.
2775 (convert_for_assignment): Unroll the PEDWARN_FOR_ASSIGNMENT macro.
2776 Print the relevant types in diagnostics.
2777
a32c8316
MP
27782017-08-09 Marek Polacek <polacek@redhat.com>
2779
2780 PR c/81417
2781 * c-array-notation.c (fix_builtin_array_notation_fn): Update calls to
ab20d992 2782 build_conditional_expr.
a32c8316
MP
2783 * c-parser.c (c_parser_conditional_expression): Create locations for
2784 EXP1 and EXP2 from their source ranges. Pass the locations down to
2785 build_conditional_expr.
2786 * c-tree.h (build_conditional_expr): Update declaration.
2787 * c-typeck.c (build_conditional_expr): Add location_t parameters.
2788 For -Wsign-compare, also print the types.
2789
314e6352
ML
27902017-08-08 Martin Liska <mliska@suse.cz>
2791
2792 * c-convert.c: Include header files.
2793 * c-typeck.c: Likewise.
2794
577eec56
ML
27952017-08-07 Martin Liska <mliska@suse.cz>
2796
2797 * c-parser.c (c_parser_attributes): Canonicalize name of an
2798 attribute.
2799
f7b6353a
MP
28002017-08-02 Marek Polacek <polacek@redhat.com>
2801
2802 PR c/81289
2803 * c-parser.c (c_parser_unary_expression): Use set_error.
2804
8a6eab34
MP
2805 PR c/81448
2806 PR c/81306
2807 * c-warn.c (warn_for_multistatement_macros): Prevent bogus
2808 warnings. Avoid walking MACRO_MAP_LOCATIONS.
2809
ab20d992 28102017-07-31 Jan Hubicka <hubicka@ucw.cz>
7fef86d3
JH
2811 Martin Liska <mliska@suse.cz>
2812
2813 * c-typeck.c (c_finish_goto_label): Build gimple predict
f7b6353a 2814 statement.
7fef86d3 2815
f34ebeb2
ML
28162017-07-31 Martin Liska <mliska@suse.cz>
2817
2818 PR sanitize/81530
2819 * c-convert.c (convert): Guard condition with flag_sanitize_p
2820 also with current_function_decl non-null equality.
2821 * c-decl.c (grokdeclarator): Likewise.
2822 * c-typeck.c (build_binary_op): Likewise.
2823
8595f67b
MP
28242017-07-25 Marek Polacek <polacek@redhat.com>
2825
2826 * c-decl.c (grokfield): Remove local variable.
2827
d49718d6
MP
28282017-07-25 Marek Polacek <polacek@redhat.com>
2829
2830 PR c/81364
2831 * c-parser.c (c_parser_else_body): Don't warn about multistatement
2832 macro expansion if the body is in { }.
2833 (c_parser_while_statement): Likewise.
2834 (c_parser_for_statement): Likewise.
2835
ff22eb12
NS
28362017-07-18 Nathan Sidwell <nathan@acm.org>
2837
2838 * c-parser.c (c_parser_array_notation): Use TYPE_{MIN,MAX}_VALUE.
2839
eea77d1f
DM
28402017-07-14 David Malcolm <dmalcolm@redhat.com>
2841
2842 * c-decl.c (implicitly_declare): When suggesting a missing
2843 #include, provide a fix-it hint.
2844
b6f43128
DM
28452017-07-06 David Malcolm <dmalcolm@redhat.com>
2846
2847 * c-lang.c (selftest::run_c_tests): Move body to c_family_tests,
2848 and call that instead.
2849 * c-tree.h (selftest::run_c_tests): New decl.
2850
3e2becc4
MP
28512017-06-26 Marek Polacek <polacek@redhat.com>
2852
2853 PR c/80116
2854 * c-parser.c (c_parser_if_body): Set the location of the
2855 body of the conditional after parsing all the labels. Call
2856 warn_for_multistatement_macros.
2857 (c_parser_else_body): Likewise.
2858 (c_parser_switch_statement): Likewise.
2859 (c_parser_while_statement): Likewise.
2860 (c_parser_for_statement): Likewise.
2861 (c_parser_statement): Add a default argument. Save the location
2862 after labels have been parsed.
2863 (c_parser_c99_block_statement): Likewise.
2864
343ae898
RB
28652017-06-19 Richard Biener <rguenther@suse.de>
2866
2867 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
2868 negated _Literals to parse _Literal (int) -1.
2869
45b2222a
ML
28702017-06-13 Martin Liska <mliska@suse.cz>
2871
2872 PR sanitize/78204
2873 * c-convert.c (convert): Use sanitize_flags_p.
2874 * c-decl.c (grokdeclarator): Likewise.
2875 * c-typeck.c (convert_for_assignment): Likewise.
2876 (c_finish_return): Likewise.
2877 (build_binary_op): Likewise.
2878
8ab7005b
JJ
28792017-06-08 Jakub Jelinek <jakub@redhat.com>
2880
2881 PR c/81006
2882 * c-typeck.c (handle_omp_array_sections_1): Convert TYPE_MAX_VALUE
2883 to sizetype before size_binop.
2884
363dc72c
JJ
28852017-06-07 Jakub Jelinek <jakub@redhat.com>
2886
2887 * gimple-parser.c (c_parser_parse_gimple_body): Use TDI_gimple instead
2888 of TDI_generic.
2889
dc949728
MP
28902017-06-06 Marek Polacek <polacek@redhat.com>
2891
2892 PR c/79983
2893 * c-decl.c (start_struct): Use the location of TYPE_STUB_DECL of
2894 ref.
2895 (start_enum): Use the location of TYPE_STUB_DECL of enumtype.
2896
40ffd95f
BE
28972017-06-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
2898
2899 * c-parser.c (c_parser_binary_expression): Implement the
2900 -Wsizeof_pointer_div warning.
2901 (c_parser_postfix_expression): Allow SIZEOF_EXPR as expr.original_code
2902 from a parenthesized expression.
2903 (c_parser_expr_list): Use c_last_sizeof_loc.
2904 * c-tree.h (c_last_sizeof_loc): New external.
2905 * c-typeck.c (c_last_sizeof_loc): New variable.
2906 (c_expr_sizeof_expr, c_expr_sizeof_type): Assign c_last_sizeof_loc.
2907
9fc5e7a4
MM
29082017-05-31 Mikhail Maltsev <maltsevm@gmail.com>
2909
2910 PR testsuite/80580
2911 * gimple-parser.c (c_parser_gimple_if_stmt): Check for empty labels.
2912
f012c8ef
DM
29132017-05-30 David Malcolm <dmalcolm@redhat.com>
2914
2915 * c-objc-common.c (c_tree_printer): Gain bool and const char **
2916 parameters.
2917
3cd211af
MS
29182017-05-24 Martin Sebor <msebor@redhat.com>
2919
2920 PR c/80731
2921 * c-fold.c (c_fully_fold_internal): Adjust.
2922 * c-typeck.c (parser_build_unary_op): Adjust.
2923
fd71a9a2
TS
29242017-05-23 Thomas Schwinge <thomas@codesourcery.com>
2925
2926 * c-parser.c (OACC_KERNELS_CLAUSE_MASK): Add
2927 "PRAGMA_OACC_CLAUSE_NUM_GANGS", "PRAGMA_OACC_CLAUSE_NUM_WORKERS",
2928 "VECTOR_LENGTH".
2929
92fa0f9e
MP
29302017-05-23 Marek Polacek <polacek@redhat.com>
2931
2932 * c-parser.c (c_parser_compound_statement_nostart): Remove redundant
2933 quotes.
2934
d11c168a
JJ
29352017-05-22 Jakub Jelinek <jakub@redhat.com>
2936
2937 * c-fold.c (c_fully_fold_internal): Save the c_fully_fold_internal
2938 result for SAVE_EXPR operand and set SAVE_EXPR_FOLDED_P even if
2939 it returned invariant. Call tree_invariant_p unconditionally
2940 afterwards to decide whether to return expr or op0.
2941
58aca9d9
NS
29422017-05-22 Nathan Sidwell <nathan@acm.org>
2943
2944 * c-decl.c (c_parse_final_cleanups): Drop TDI_tu handling.
2945
7fd549d2
TS
29462017-05-19 Thomas Schwinge <thomas@codesourcery.com>
2947
2948 * c-parser.c (c_parser_omp_clause_default): Handle
2949 "OMP_CLAUSE_DEFAULT_PRESENT".
2950
6ecd2339
BE
29512017-05-18 Bernd Edlinger <bernd.edlinger@hotmail.de>
2952
2953 * config-lang.in (gtfiles): Add c-family/c-format.c.
2954
8a57ecff
NS
29552017-05-18 Nathan Sidwell <nathan@acm.org>
2956
2957 * c-decl.c (pushdecl_top_level): Delete unused function.
2958
6574d78e
MP
29592017-05-18 Marek Polacek <polacek@redhat.com>
2960
2961 * c-decl.c (match_builtin_function_types): Use NULL_TREE instead of 0.
2962 (check_earlier_gotos): Likewise.
2963 (define_label): Likewise.
2964 (pending_xref_error): Likewise.
2965 (smallest_type_quals_location): Likewise.
2966 (grokdeclarator): Likewise.
2967 (grokparms): Likewise.
2968 (identifier_global_value): Likewise.
2969 * c-typeck.c (set_nonincremental_init_from_string): Likewise.
2970 (find_init_member): Likewise.
2971
e3455240
MP
29722017-05-18 Marek Polacek <polacek@redhat.com>
2973
2974 * c-decl.c (start_decl): Use false/true instead of 0/1.
2975 (grokdeclarator): Likewise.
2976 (finish_struct): Likewise.
2977 (start_function): Change the return type to bool. Use false/true
2978 instead of 0/1.
2979 (declspecs_add_qual): Use UNKNOWN_LOCATION instead of 0.
2980 * c-tree.h (start_function): Update.
2981 * c-typeck.c (same_translation_unit_p): Change the return type to bool.
2982 (set_designator): Change the return type to bool. Use false/true
2983 instead of 0/1.
2984
3fa8871b
MP
29852017-05-17 Marek Polacek <polacek@redhat.com>
2986
2987 * c-decl.c: Use NULL_TREE instead of 0 where appropriate.
2988 * c-typeck.c: Likewise.
2989
142473df
MP
29902017-05-17 Marek Polacek <polacek@redhat.com>
2991
2992 PR sanitizer/80659
2993 * c-decl.c (build_compound_literal): Set DECL_ARTIFICIAL and
2994 DECL_IGNORED_P even for non-static compound literals.
2995
1a817418
ML
29962017-05-17 Martin Liska <mliska@suse.cz>
2997
2998 * c-decl.c (c_parse_final_cleanups): Introduce dump_flags_t type and
2999 use it instead of int type.
3000
b2fa0a8b
MP
30012017-05-17 Marek Polacek <polacek@redhat.com>
3002
3003 * c-convert.c (convert): Replace c_save_expr with save_expr. Don't
3004 call c_fully_fold.
3005 (convert) <case COMPLEX_TYPE>: Remove special handling of COMPLEX_TYPEs.
ab20d992 3006 * c-decl.c (grokdeclarator): Replace c_save_expr with save_expr.
b2fa0a8b
MP
3007 * c-fold.c (c_fully_fold_internal): Handle SAVE_EXPR.
3008 * c-parser.c (c_parser_declaration_or_fndef): Replace c_save_expr with
3009 save_expr.
3010 (c_parser_conditional_expression): Likewise.
3011 * c-tree.h (SAVE_EXPR_FOLDED_P): Define.
3012 * c-typeck.c (build_modify_expr): Replace c_save_expr with save_expr.
3013 (process_init_element): Likewise.
3014 (build_binary_op): Likewise.
3015 (handle_omp_array_sections_1): Likewise.
3016
1e47f02b
TS
30172017-05-12 Thomas Schwinge <thomas@codesourcery.com>
3018
3019 * c-parser.c (c_parser_omp_clause_num_gangs)
3020 (c_parser_omp_clause_num_workers)
3021 (c_parser_omp_clause_vector_length): Merge functions into...
3022 (c_parser_oacc_single_int_clause): ... this new function. Adjust
3023 all users.
3024
c24e924f
NS
30252017-05-11 Nathan Sidwell <nathan@acm.org>
3026
3027 * gimple-parser.c: Don't #include tree-dump.h.
3028
c587104e
MM
30292017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
3030
3031 PR testsuite/80580
3032 * gimple-parser.c (c_parser_parse_ssa_name): Validate SSA name base.
3033
67ac9a9d
MM
30342017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
3035
3036 PR testsuite/80580
3037 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
3038 incorrect __MEM syntax.
3039
ac4eb40f
MM
30402017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
3041
3042 PR testsuite/80580
3043 * gimple-parser.c (c_parser_gimple_unary_expression): Check argument
3044 type of unary '*'.
3045
641da50a
NS
30462017-05-09 Nathan Sidwell <nathan@acm.org>
3047
3048 * c-tree.h (pushdecl): Declare.
3049
56d35585
DM
30502017-05-05 David Malcolm <dmalcolm@redhat.com>
3051
3052 * c-decl.c (warn_defaults_to): Replace report_diagnostic
3053 with diagnostic_report_diagnostic.
3054 * c-errors.c (pedwarn_c99): Likewise.
3055 (pedwarn_c90): Likewise.
3056
815d9cc6
XR
30572017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn>
3058
92a285c1 3059 PR c++/80038
815d9cc6
XR
3060 * c-gimplify.c (c_gimplify_expr): Remove calls to
3061 cilk_gimplifY_call_params_in_spawned_fn.
3062
1c4ea66f
DM
30632017-04-25 David Malcolm <dmalcolm@redhat.com>
3064
3065 * c-parser.c (c_parser_struct_or_union_specifier): Add fix-it
3066 hint for removing extra semicolon.
3067
666f7903
JJ
30682017-04-21 Jakub Jelinek <jakub@redhat.com>
3069
3070 PR c/80468
3071 * c-decl.c (finish_declspecs) <case cts_int_n>: If int_n_idx is not
3072 enabled, set specs->type to integer_type_node.
3073
5764ee3c
JW
30742017-04-03 Jonathan Wakely <jwakely@redhat.com>
3075
3076 * c-array-notation.c: Fix typo in comment.
3077
10fa8dfb
MP
30782017-03-29 Marek Polacek <polacek@redhat.com>
3079
3080 PR c/79730
3081 * c-decl.c (finish_decl): Check VAR_P.
3082
a9e4a1a5
JJ
30832017-03-27 Jakub Jelinek <jakub@redhat.com>
3084
3085 PR middle-end/80162
3086 * c-tree.h (c_mark_addressable): Add array_ref_p argument.
3087 * c-typeck.c (c_mark_addressable): Likewise. Look through
3088 VIEW_CONVERT_EXPR unless array_ref_p and VCE is from VECTOR_TYPE
3089 to ARRAY_TYPE.
3090 (build_array_ref): Pass true as array_ref_p to c_mark_addressable.
3091
ee3ff394
MP
30922017-03-23 Marek Polacek <polacek@redhat.com>
3093
3094 * c-tree.h: Remove a C_RID_YYCODE reference.
3095
4d1b8e70
JJ
30962017-03-21 Jakub Jelinek <jakub@redhat.com>
3097
3098 PR c/80097
3099 * c-typeck.c (build_binary_op): Add EXCESS_PRECISION_EXPR only around
3100 optional COMPOUND_EXPR with ubsan instrumentation.
3101
31dc71a8
MP
31022017-03-17 Marek Polacek <polacek@redhat.com>
3103
3104 * c-parser.c: Add C11 references.
3105
d579c385
MP
31062017-03-15 Marek Polacek <polacek@redhat.com>
3107
3108 * c-parser.c (c_parser_enum_specifier): Remove redundant line.
3109
85059a38
MP
31102017-03-11 Marek Polacek <polacek@redhat.com>
3111
3112 * c-decl.c (implicit_decl_warning): Add a comment. Fix formatting.
3113
2f6f187a
DM
31142017-03-10 David Malcolm <dmalcolm@redhat.com>
3115
3116 PR translation/79848
3117 * c-decl.c (declspecs_add_type): Simplify uses of "%<%s%>" to
3118 "%qs".
3119 * c-parser.c (c_parser_oacc_shape_clause): Likewise.
3120
36618428
MP
31212017-03-09 Marek Polacek <polacek@redhat.com>
3122
3123 PR sanitizer/79757
3124 * c-parser.c (c_parser_declaration_or_fndef): Don't sanitize old-style
3125 parameter declarations with initializers.
3126
01e5af5a
JJ
31272017-03-09 Jakub Jelinek <jakub@redhat.com>
3128
3129 PR c/79969
3130 * c-decl.c (start_enum): Adjust DECL_SOURCE_LOCATION of
3131 TYPE_STUB_DECL.
3132
a71dbc63
JJ
31332017-03-07 Jakub Jelinek <jakub@redhat.com>
3134
3135 PR c/79834
3136 * c-parser.c (c_parser_pragma): Use error_at instead of c_parser_error
3137 for "may only be used in compound statements" diagnostics, change it
3138 such that the same translatable string is used for all pragmas. For
3139 PRAGMA_OACC_WAIT use "acc wait" rather than "acc enter data" in the
3140 diagnostics.
3141 (c_parser_omp_cancellation_point, c_parser_omp_target_update,
3142 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Change
3143 "may only be used in compound statements" diagnostics, such that the
3144 same translatable string is used for all pragmas.
3145
1ff4bae6
MP
31462017-03-04 Marek Polacek <polacek@redhat.com>
3147
3148 PR c/79847
3149 * c-decl.c (implicit_decl_warning): Add missing space.
3150
7f5a7d78
MP
31512017-03-03 Marek Polacek <polacek@redhat.com>
3152
3153 PR c/79758
3154 * c-decl.c (store_parm_decls_oldstyle): Check if the element of
3155 current_function_prototype_arg_types is error_mark_node. Fix
3156 formatting. Use TREE_VALUE instead of TREE_TYPE.
3157
883c8f06
JJ
31582017-03-03 Jakub Jelinek <jakub@redhat.com>
3159
79c9b7a8
JJ
3160 PR c/79837
3161 * c-parser.c (c_parser_omp_clause_reduction): Don't mention
3162 %<min%> or %<max%> in the diagnostics, instead mention identifier.
3163 (c_parser_omp_declare_reduction): Don't mention %<min%> in the
3164 diagnostics.
3165
883c8f06
JJ
3166 PR c/79836
3167 * c-parser.c (c_parser_generic_selection): Use %<_Generic%>
3168 instead of %<_Generic>.
3169 (c_parser_omp_ordered): Use %<depend%> instead of %<depend>.
3170 (c_parser_omp_target_exit_data): Use %<release%> instead of
3171 %<release>.
3172
324ff1a0
JJ
31732017-02-28 Jakub Jelinek <jakub@redhat.com>
3174
3175 * c-parser.c (c_parser_asm_statement): Use cond ? G_("...") : G_("...")
3176 instead of just cond ? "..." : "...".
3177 (c_parser_oacc_enter_exit_data): Use %s and ternary operator only
3178 for "enter"/"exit" keyword.
3179 (c_finish_oacc_routine): Don't use %s to supply portions of the
3180 message.
3181
4227c9ad
JJ
31822017-02-24 Jakub Jelinek <jakub@redhat.com>
3183
3184 PR c++/79588
3185 * c-parser.c (c_parser_postfix_expression_after_primary): Don't
3186 handle -Wrestrict here.
3187 * c-typeck.c (build_function_call_vec): Adjust
3188 check_function_arguments caller.
3189
5d972e66
RB
31902017-02-23 Richard Biener <rguenther@suse.de>
3191
3192 PR c/79684
3193 * gimple-parser.c (c_parser_gimple_statement): Use set_error
3194 to initialize c_exprs to return.
3195 (c_parser_gimple_binary_expression): Likewise.
3196 (c_parser_gimple_unary_expression): Likewise.
3197 (c_parser_gimple_postfix_expression): Likewise.
3198
61ac5ebe
MP
31992017-02-22 Marek Polacek <polacek@redhat.com>
3200
3201 PR c/79662
3202 * c-typeck.c (convert_arguments): Handle error_mark_node.
3203
41d1b0b1
PK
32042017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3205
3206 * gimple-parser.c (c_parser_gimple_postfix_expression): Check return
3207 value of c_parser_parse_ssa_name against error_mark_node and emit
3208 error if ssa name is anonymous and written as default definition.
3209
eab1f169
PK
32102017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3211
3212 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
3213 FMA_EXPR.
3214
bcac0b4d
JJ
32152017-02-16 Jakub Jelinek <jakub@redhat.com>
3216
3217 PR c++/79512
3218 * c-parser.c (c_parser_omp_target): For -fopenmp-simd
3219 ignore #pragma omp target even when not followed by identifier.
3220
1be33173
PK
32212017-02-14 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3222
3223 * gimpler-parser.c (c_parser_gimple_statement): Handle ABS_EXPR.
3224 (c_parser_gimple_unary_expression): Likewise.
3225
aa326bfb
JJ
32262017-02-13 Jakub Jelinek <jakub@redhat.com>
3227
3228 * c-parser.c (c_parser_oacc_declare): Add missing space in
3229 diagnostics.
3230
8a398bc5
PK
32312017-02-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3232
3233 PR c/79478
3234 * gimple-parser.c (c_parser_gimple_postfix_expression): Call
3235 set_c_expr_source_range when parsing ssa-name.
3236
3dcde5ef 32372017-02-10 Prasad Ghangal <prasad.ghangal@gmail.com>
ab20d992 3238 Richard Biener <rguenther@suse.de>
3dcde5ef
PG
3239
3240 * gimple-parser.c (c_parser_gimple_binary_expression): Avoid
3241 building IL when arguments are error_mark_node.
3242 (c_parser_gimple_unary_expression): Likewise.
3243 (c_parser_gimple_if_stmt): Likewise.
3244 (c_parser_gimple_switch_stmt): Likewise.
3245 (c_parser_gimple_return_stmt): Likewise.
3246 (c_parser_parse_ssa_name): When name lookup fails do not build
3247 an SSA name. Use undeclared rather than not declared in error
3248 reporting.
3249
192b048b
MP
32502017-02-09 Marek Polacek <polacek@redhat.com>
3251
3252 PR c/79428
3253 * c-parser.c (c_parser_omp_ordered): Call c_parser_skip_to_pragma_eol
3254 instead of c_parser_skip_until_found.
3255
56f71478
JJ
32562017-02-09 Jakub Jelinek <jakub@redhat.com>
3257
3258 PR c/79431
3259 * c-parser.c (c_parser_omp_declare_target): Don't invoke
3260 symtab_node::get on automatic variables.
3261
02889d23
CLT
32622016-02-09 Nathan Sidwell <nathan@codesourcery.com>
3263 Chung-Lin Tang <cltang@codesourcery.com>
3264
3265 * c-parser.c (c_parser_omp_clause_collapse): Disallow tile.
3266 (c_parser_oacc_clause_tile): Disallow collapse. Fix parsing and
3267 semantic checking.
3268 * c-parser.c (c_parser_omp_for_loop): Accept tiling constructs.
3269
7af4b20d
RB
32702017-02-07 Richard Biener <rguenther@suse.de>
3271
3272 * gimple-parser.c (c_parser_gimple_expr_list): Simplify.
3273 (c_parser_gimple_postfix_expression_after_primary):
3274 Do not use c_build_function_call_vec to avoid folding and promotion.
3275 Simplify.
3276
e5e391d6
MO
32772017-01-25 Maxim Ostapenko <m.ostapenko@samsung.com>
3278
3279 PR lto/79061
3280 * c-decl.c (pop_scope): Pass main_input_filename to
3281 build_translation_unit_decl.
3282
c2e84327
DM
32832017-01-24 David Malcolm <dmalcolm@redhat.com>
3284
3285 * c-parser.c: Include "read-rtl-function.h" and
3286 "run-rtl-passes.h".
3287 (c_parser_declaration_or_fndef): Rename "gimple-pass-list" in
3288 grammar to gimple-or-rtl-pass-list. Add rtl-function-definition
3289 production. Update for renaming of field "gimple_pass" to
3290 "gimple_or_rtl_pass". If __RTL was seen, call
3291 c_parser_parse_rtl_body. Convert a timevar_push/pop pair
3292 to an auto_timevar, to cope with early exit.
3293 (c_parser_declspecs): Update RID_GIMPLE handling for renaming of
3294 field "gimple_pass" to "gimple_or_rtl_pass", and for renaming of
3295 c_parser_gimple_pass_list to c_parser_gimple_or_rtl_pass_list.
3296 Handle RID_RTL.
3297 (c_parser_parse_rtl_body): New function.
3298 * c-tree.h (enum c_declspec_word): Add cdw_rtl.
3299 (struct c_declspecs): Rename field "gimple_pass" to
3300 "gimple_or_rtl_pass". Add field "rtl_p".
3301 * gimple-parser.c (c_parser_gimple_pass_list): Rename to...
3302 (c_parser_gimple_or_rtl_pass_list): ...this, updating accordingly.
3303 * gimple-parser.h (c_parser_gimple_pass_list): Rename to...
3304 (c_parser_gimple_or_rtl_pass_list): ...this.
3305
2ebd93e1
MP
33062017-01-20 Marek Polacek <polacek@redhat.com>
3307
3308 PR c/64279
3309 * c-typeck.c (build_conditional_expr): Warn about duplicated branches.
3310
b1c95bb5
RB
33112017-01-13 Richard Biener <rguenther@suse.de>
3312
3313 * gimple-parser.c (c_parser_gimple_compound_statement): Handle
3314 nops.
3315
25329913
RB
33162017-01-13 Richard Biener <rguenther@suse.de>
3317
3318 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
3319 _Literal ( type-name ) number.
3320
6bb4ea5c
RB
33212017-01-12 Richard Biener <rguenther@suse.de>
3322
3323 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
3324 __MEM.
3325
6b5b4e9c
JJ
33262017-01-11 Jakub Jelinek <jakub@redhat.com>
3327
3328 PR c++/72813
3329 * c-decl.c (pop_file_scope): Set flag_syntax_only to 1 after writing
3330 PCH file.
3331
e3252775
RB
33322017-01-11 Richard Biener <rguenther@suse.de>
3333
3334 PR bootstrap/79052
3335 * gimple-parser.c (c_parser_gimple_switch_stmt): Add missing
3336 returns on parse errors.
3337
a9342885
MP
33382017-01-04 Marek Polacek <polacek@redhat.com>
3339
3340 PR c++/64767
3341 * c-parser.c (c_parser_postfix_expression): Mark zero character
3342 constants by setting original_type in c_expr.
3343 * c-typeck.c (parser_build_binary_op): Warn when a pointer is compared
3344 with a zero character constant.
3345 (char_type_p): New function.
3346
5dd9a9d0
DM
33472017-01-04 David Malcolm <dmalcolm@redhat.com>
3348
3349 * c-parser.c (c_parser_declaration_or_fndef): Create a
3350 rich_location at init_loc and parse it to start_init.
3351 (last_init_list_comma): New global.
3352 (c_parser_braced_init): Update last_init_list_comma when parsing
3353 commas. Pass it to pop_init_level. Pass location of closing
3354 brace to pop_init_level.
3355 (c_parser_postfix_expression_after_paren_type): Create a
3356 rich_location at type_loc and parse it to start_init.
3357 (c_parser_omp_declare_reduction): Likewise for loc.
3358 * c-tree.h (start_init): Add rich_location * param.
3359 (pop_init_level): Add location_t param.
3360 * c-typeck.c (struct initializer_stack): Add field
3361 "missing_brace_richloc".
3362 (start_init): Add richloc param, use it to initialize
3363 the stack node's missing_brace_richloc.
3364 (last_init_list_comma): New decl.
3365 (finish_implicit_inits): Pass last_init_list_comma to
3366 pop_init_level.
3367 (push_init_level): When finding missing open braces, add fix-it
3368 hints to the richloc.
3369 (pop_init_level): Add "insert_before" param and pass it
3370 when calling pop_init_level. Add fixits about missing
3371 close braces to any richloc. Use the richloc for the
3372 -Wmissing-braces warning.
3373 (set_designator): Pass last_init_list_comma to pop_init_level.
3374 (process_init_element): Likewise.
3375
cbe34bb5
JJ
33762017-01-01 Jakub Jelinek <jakub@redhat.com>
3377
3378 Update copyright years.
3379
d17680f3
JJ
33802016-12-21 Jakub Jelinek <jakub@redhat.com>
3381
0dba7960
JJ
3382 PR bootstrap/78817
3383 * c-typeck.c (build_function_call_vec): If check_function_arguments
3384 returns true, set TREE_NO_WARNING on CALL_EXPR.
3385
d17680f3
JJ
3386 PR c/77767
3387 * c-decl.c (grokdeclarator): If *expr is non-NULL, append expression
3388 to *expr instead of overwriting it.
3389
aa90531e
RB
33902016-12-20 Richard Biener <rguenther@suse.de>
3391
3392 * gimple-parser.c (c_parser_gimple_compound_statement): Improve
3393 error recovery.
3394 (c_parser_gimple_statement): Only build assigns for non-error
3395 stmts.
3396 (c_parser_gimple_postfix_expression_after): Improve error recovery.
3397
629b3d75
MJ
33982016-12-14 Martin Jambor <mjambor@suse.cz>
3399
3400 * c-parser.c: Include omp-general.h and omp-offload.h instead of
3401 omp-low.h.
3402 (c_finish_oacc_routine): Adjusted call to
3403 get_oacc_fn_attrib, build_oacc_routine_dims and replace_oacc_fn_attrib
3404 to use their new names.
3405 (c_parser_oacc_enter_exit_data): Adjusted call to find_omp_clause to
3406 use its new name.
3407 (c_parser_oacc_update): Likewise.
3408 (c_parser_omp_simd): Likewise.
3409 (c_parser_omp_target_update): Likewise.
3410 * c-typeck.c: Include omp-general.h instead of omp-low.h.
3411 (c_finish_omp_cancel): Adjusted call to find_omp_clause to use its new
3412 name.
3413 (c_finish_omp_cancellation_point): Likewise.
3414 * gimple-parser.c: Do not include omp-low.h
3415
c5af52eb
CP
34162016-12-02 Cesar Philippidis <cesar@codesourcery.com>
3417 James Norris <jnorris@codesourcery.com>
3418
3419 * c-parser.c (c_parser_pragma): Error when PRAGMA_OACC_{ENTER_DATA,
3420 EXIT_DATA,WAIT} are not used in compound statements.
3421 (c_parser_oacc_enter_exit_data): Update diagnostics.
3422
48330c93
BE
34232016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
3424
3425 PR c++/71973
3426 * c-decl.c (diagnose_mismatched_decls): Use
3427 OPT_Wbuiltin_declaration_mismatch here too.
3428
899ca90e 34292016-11-18 Richard Sandiford <richard.sandiford@arm.com>
48330c93
BE
3430 Alan Hayward <alan.hayward@arm.com>
3431 David Sherwood <david.sherwood@arm.com>
899ca90e
RS
3432
3433 * c-decl.c (merge_decls): Use SET_DECL_MODE.
3434 (make_label, finish_struct): Likewise.
3435
1ee62b92 34362016-11-14 Prasad Ghangal <prasad.ghangal@gmail.com>
8e745a17 3437 Richard Biener <rguenther@suse.de>
22b15758 3438
8e745a17
JJ
3439 * Make-lang.in (C_AND_OBJC_OBJS): Add gimple-parser.o.
3440 * config-lang.in (gtfiles): Add c/c-parser.h.
3441 * c-tree.h (enum c_declspec_word): Add cdw_gimple.
3442 (struct c_declspecs): Add gimple_pass member and gimple_p flag.
3443 * c-parser.c (enum c_id_kind, struct c_token,
3444 c_parser_next_token_is, c_parser_next_token_is_not,
3445 c_parser_next_token_is_keyword,
3446 enum c_lookahead_kind, enum c_dtr_syn, enum c_parser_prec):
3447 Split out to ...
3448 * c-parser.h: ... new header.
3449 * c-parser.c: Include c-parser.h and gimple-parser.h.
1ee62b92 3450 (c_parser_peek_token, c_parser_peek_2nd_token,
8e745a17
JJ
3451 c_token_starts_typename, c_parser_next_token_starts_declspecs,
3452 c_parser_next_tokens_start_declaration, c_parser_consume_token,
3453 c_parser_error, c_parser_require, c_parser_skip_until_found,
3454 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
3455 c_parser_type_name): Export.
3456 (c_parser_tokens_buf): New function.
3457 (c_parser_error): Likewise.
3458 (c_parser_set_error): Likewise.
3459 (c_parser_declspecs): Handle RID_GIMPLE.
1ee62b92
PG
3460 (c_parser_declaration_or_fndef): Parse __GIMPLE marked body
3461 via c_parser_parse_gimple_body.
8e745a17
JJ
3462 * c-parser.h (c_parser_peek_token, c_parser_peek_2nd_token,
3463 c_token_starts_typename, c_parser_next_token_starts_declspecs,
3464 c_parser_next_tokens_start_declaration, c_parser_consume_token,
3465 c_parser_error, c_parser_require, c_parser_skip_until_found,
3466 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
3467 c_parser_type_name): Declare.
1ee62b92
PG
3468 (struct c_parser): Declare forward.
3469 (c_parser_tokens_buf): Declare.
8e745a17
JJ
3470 (c_parser_error): Likewise.
3471 (c_parser_set_error): Likewise.
3472 * gimple-parser.c: New file.
3473 * gimple-parser.h: Likewise.
1ee62b92 3474
22b15758
UB
34752016-11-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3476
3477 PR c/35503
3478 * c-parser.c (c_parser_postfix_expression_after_primary): Call
3479 warn_for_restrict.
3480
84ff4775
LCW
34812016-09-11 Le-Chun Wu <lcwu@google.com>
3482 Mark Wielaard <mjw@redhat.com>
3483
3484 * c-decl.c (warn_if_shadowing): Use the warning code corresponding
3485 to the given -Wshadow= variant.
3486
4d0cdd0c
TP
34872016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
3488
3489 * c-typeck.c: Include memmodel.h.
3490
1202f33e
JJ
34912016-10-13 Jakub Jelinek <jakub@redhat.com>
3492
3493 PR target/77957
3494 * c-objc-common.h (LANG_HOOKS_GETDECLS): Use hook_tree_void_null
3495 instead of lhd_return_null_tree_v.
3496
8a14afd0
BS
34972016-10-07 Bernd Schmidt <bschmidt@redhat.com>
3498
3499 PR c++/69733
3500 * c-decl.c (smallest_type_quals_location): New static function.
3501 (grokdeclarator): Try to find the correct location for an ignored
3502 qualifier.
3503
81fea426
MP
35042016-09-26 Marek Polacek <polacek@redhat.com>
3505
3506 PR c/7652
3507 * c-decl.c (pop_scope): Add gcc_fallthrough.
3508
35092016-09-26 Marek Polacek <polacek@redhat.com>
3510
3511 PR c/7652
3512 * c-parser.c (struct c_token): Add flags field.
3513 (c_lex_one_token): Pass it to c_lex_with_flags.
3514 (c_parser_declaration_or_fndef): Turn __attribute__((fallthrough));
3515 into IFN_FALLTHROUGH.
3516 (c_parser_label): Set FALLTHROUGH_LABEL_P on labels. Handle
3517 attribute fallthrough after a case label or default label.
3518 (c_parser_statement_after_labels): Handle RID_ATTRIBUTE.
3519
9a2300e9
MP
35202016-09-24 Marek Polacek <polacek@redhat.com>
3521
3522 PR c/77490
3523 * c-typeck.c (build_unary_op): Warn about bit not on expressions that
3524 have boolean value. Warn about ++/-- on booleans.
3525
7de76362
JJ
35262016-09-23 Jakub Jelinek <jakub@redhat.com>
3527
3528 * c-parser.c (incomplete_record_decls): Remove unnecessary
3529 = vNULL initialization of file scope vec.
3530
5b73d2ab
MP
35312016-09-16 Marek Polacek <polacek@redhat.com>
3532
3533 * c-typeck.c (lvalue_p): Use true and false instead of 1 and 0.
3534
e51fbec3
MP
35352016-09-14 Marek Polacek <polacek@redhat.com>
3536
3537 * c-array-notation.c (create_cmp_incr): Use false instead of 0.
3538 (fix_array_notation_expr): Likewise.
3539 * c-decl.c (finish_decl): Likewise.
3540 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
3541 * c-typeck.c (array_to_pointer_conversion): Use true instead of 1.
3542 (function_to_pointer_conversion): Use false instead of 0.
3543 (convert_lvalue_to_rvalue): Likewise.
3544 (parser_build_unary_op): Likewise.
3545 (build_atomic_assign): Likewise.
3546 (build_unary_op): Change nonconvert parameter type to bool, use
3547 true/false instead of 1/0.
3548 (build_binary_op): Use true instead of 1.
3549
254830ba
DM
35502016-09-13 David Malcolm <dmalcolm@redhat.com>
3551
3552 * c-parser.c (c_parser_declaration_or_fndef): Update for renaming
3553 of add_fixit_insert to add_fixit_insert_before.
3554
4c13ba17
MP
35552016-09-13 Marek Polacek <polacek@redhat.com>
3556
3557 * c-typeck.c (build_unary_op): Rename FLAG parameter to NOCONVERT. Use
3558 it.
3559
54dcdb88
BE
35602016-09-12 Bernd Edlinger <bernd.edlinger@hotmail.de>
3561
3562 PR c++/77496
3563 * c-parser.c (c_parser_conditional_expression): Pass the rightmost
3564 COMPOUND_EXPR to warn_for_omitted_condop.
3565
e5106e27
DM
35662016-09-07 David Malcolm <dmalcolm@redhat.com>
3567
3568 * c-lang.c (LANG_HOOKS_GET_SUBSTRING_LOCATION): Use
3569 c_get_substring_location for this new langhook.
3570
9dc5773f
JJ
35712016-09-02 Jakub Jelinek <jakub@redhat.com>
3572
3573 PR c/65467
3574 * c-parser.c (c_parser_declspecs): Don't sorry about _Atomic if
3575 flag_openmp.
3576 (c_parser_omp_variable_list): Use convert_lvalue_to_rvalue
3577 instead of mark_exp_read on low_bound/length expression.
3578 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_threads,
3579 c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
3580 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
3581 c_parser_omp_clause_num_workers, c_parser_oacc_shape_clause,
3582 c_parser_oacc_clause_tile, c_parser_omp_clause_schedule,
3583 c_parser_omp_clause_vector_length, c_parser_omp_clause_num_teams,
3584 c_parser_omp_clause_thread_limit, c_parser_omp_clause_aligned,
3585 c_parser_omp_clause_linear, c_parser_omp_clause_safelen,
3586 c_parser_omp_clause_simdlen, c_parser_omp_clause_device,
3587 c_parser_omp_clause_dist_schedule): Use convert_lvalue_to_rvalue
3588 instead of mark_expr_read.
3589 (c_parser_omp_declare_reduction): Reject _Atomic qualified types.
3590 * c-objc-common.h (LANG_HOOKS_OMP_CLAUSE_COPY_CTOR,
3591 LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP): Redefine.
3592 * c-tree.h (c_omp_clause_copy_ctor): New prototype.
3593 * c-typeck.c (handle_omp_array_sections_1): Diagnose _Atomic qualified
3594 array section bases outside of depend clause, for depend clause
3595 use convert_lvalue_to_rvalue on the base.
3596 (c_finish_omp_clauses): Reject _Atomic qualified vars in reduction,
3597 linear, aligned, map, to and from clauses.
3598 (c_omp_clause_copy_ctor): New function.
3599
295844f6
MP
36002016-09-01 Marek Polacek <polacek@redhat.com>
3601
3602 PR c/7652
3603 * c-typeck.c (composite_type): Add FALLTHRU comment.
3604
089af25c
DM
36052016-08-31 David Malcolm <dmalcolm@redhat.com>
3606
3607 * c-parser.c (c_parser_declaration_or_fndef): Add trailing space
3608 to the insertion fixits for "struct", "union", and "enum".
3609
f9087798
DM
36102016-08-30 David Malcolm <dmalcolm@redhat.com>
3611
3612 * c-decl.c (implicit_decl_warning): Use add_fixit_replace
3613 rather than add_fixit_misspelled_id.
3614 (undeclared_variable): Likewise.
3615 * c-parser.c (c_parser_declaration_or_fndef): Likewise. Remove
3616 now-redundant "here" params from add_fixit_insert method calls.
3617 (c_parser_parameter_declaration): Likewise.
3618 * c-typeck.c (build_component_ref): Remove now-redundant range
3619 param from add_fixit_replace method calls.
3620
ebef225f
MP
36212016-08-25 Marek Polacek <polacek@redhat.com>
3622
3623 * c-typeck.c (parser_build_binary_op): Pass LHS to
3624 warn_logical_not_parentheses.
3625
fe377a48
MP
36262016-08-25 Marek Polacek <polacek@redhat.com>
3627
3628 PR c/77323
3629 * c-decl.c (declspecs_add_type): Set typespec_word even when __intN
3630 or _FloatN or _FloatNx is not supported.
3631 (finish_declspecs): Set type to integer_type_node when _FloatN or
3632 _FloatNx is not supported.
3633
c65699ef
JM
36342016-08-19 Joseph Myers <joseph@codesourcery.com>
3635
3636 PR c/32187
3637 * c-tree.h (cts_floatn_nx): New enum c_typespec_keyword value.
3638 (struct c_declspecs): Add field floatn_nx_idx.
3639 * c-decl.c (declspecs_add_type, finish_declspecs): Handle _FloatN
3640 and _FloatNx type specifiers.
3641 * c-parser.c (c_keyword_starts_typename, c_token_starts_declspecs)
3642 (c_parser_declspecs, c_parser_attribute_any_word)
3643 (c_parser_objc_selector): Use CASE_RID_FLOATN_NX.
3644 * c-typeck.c (c_common_type): Handle _FloatN and _FloatNx types.
3645 (convert_arguments): Avoid promoting _FloatN and _FloatNx types
3646 narrower than double.
3647
2f1364c2
JJ
36482016-08-12 Jakub Jelinek <jakub@redhat.com>
3649 Martin Liska <mliska@suse.cz>
3650
3651 PR c/67410
3652 * c-typeck.c (set_nonincremental_init_from_string): Use / instead of
3653 % to determine val element to change. Assert that
3654 wchar_bytes * charwidth fits into val array.
3655
191816a3
MP
36562016-08-12 Marek Polacek <polacek@redhat.com>
3657
3658 PR c/7652
3659 * c-parser.c (c_parser_external_declaration): Add FALLTHRU.
3660 (c_parser_postfix_expression): Likewise.
3661 * c-typeck.c (build_unary_op): Adjust fall through comment.
3662 (c_mark_addressable): Likewise.
3663
b95a64bb
JJ
36642016-08-11 Jakub Jelinek <jakub@redhat.com>
3665
3666 PR c/72816
3667 * c-decl.c (grokdeclarator): When adding TYPE_DOMAIN for flexible
3668 array member through typedef, for orig_qual_indirect == 0 clear
3669 orig_qual_type.
3670
895aa8e1
DM
36712016-08-08 David Malcolm <dmalcolm@redhat.com>
3672
3673 PR c/64955
3674 * c-lang.c (LANG_HOOKS_RUN_LANG_SELFTESTS): If CHECKING_P, wire
3675 this up to selftest::run_c_tests.
3676 (selftest::run_c_tests): New function.
3677
0b212d8c
TS
36782016-08-04 Thomas Schwinge <thomas@codesourcery.com>
3679
ae9281fc
TS
3680 * c-parser.c (struct oacc_routine_data): Add error_seen and
3681 fndecl_seen members.
3682 (c_finish_oacc_routine): Use these.
3683 (c_parser_declaration_or_fndef): Adjust.
3684 (c_parser_oacc_routine): Likewise. Support more C language
3685 constructs, and improve diagnostics. Move pragma context
3686 checking...
3687 (c_parser_pragma): ... here.
3688
0b212d8c
TS
3689 * c-parser.c (struct oacc_routine_data): New.
3690 (c_parser_declaration_or_fndef, c_parser_oacc_routine): Use it.
3691 Simplify code.
3692 (c_finish_oacc_routine): Likewise. Don't attach clauses to "omp
3693 declare target" attribute.
3694
76e2c821
JB
36952016-08-01 Jan Beulich <jbeulich@suse.com>
3696
3697 * c-fold.c (c_fully_fold_internal): Also emit shift count
3698 warnings for vector types.
3699 * c-typeck.c (build_binary_op): Likewise.
3700
f618a472
MP
37012016-07-29 Marek Polacek <polacek@redhat.com>
3702
3703 PR c/71742
3704 * c-decl.c (finish_struct): Rephrase an error message.
3705
efd0786f
MP
3706 PR c/71853
3707 * c-parser.c (c_parser_switch_statement): Initialize ce.original_type
3708 to error node for invalid code.
3709
e00dceaf
MP
3710 PR c/71573
3711 * c-decl.c (implicitly_declare): Return decl early not only for
3712 error_mark_nodes, but for anything that is not a FUNCTION_DECL.
3713
673a107a
JJ
37142016-07-29 Jakub Jelinek <jakub@redhat.com>
3715
3716 PR c/71969
3717 * c-decl.c (finish_function): Only set DECL_DISREGARD_INLINE_LIMITS
3718 on GNU extern inline functions.
3719
a5b5c8b6
MP
37202016-07-29 Marek Polacek <polacek@redhat.com>
3721
3722 PR c/71583
3723 * c-parser.c (c_parser_postfix_expression_after_paren_type): Also
3724 check expr.value.
3725
e3fe09c1
UB
37262016-07-22 Uros Bizjak <ubizjak@gmail.com>
3727
3728 * c-typeck.c: Use HOST_WIDE_INT_1 instead of (HOST_WIDE_INT) 1,
3729
7c8f7eaa
DM
37302016-07-20 David Malcolm <dmalcolm@redhat.com>
3731
3732 * c-decl.c (struct edit_distance_traits<cpp_hashnode *>): Move to
3733 spellcheck-tree.h
3734 (best_macro_match): Likewise, converting from a typedef to a
3735 subclass.
3736 (find_closest_macro_cpp_cb): Move to spellcheck-tree.c.
3737 (lookup_name_fuzzy): Update for change of best_macro_match to a
3738 subclass with a ctor that calls cpp_forall_identifiers.
3739
de6a69ee
DM
37402016-07-20 David Malcolm <dmalcolm@redhat.com>
3741
3742 * c-decl.c (implicit_decl_warning): Update for conversion of
3743 return type of lookup_name_fuzzy to const char *.
3744 (undeclared_variable): Likewise.
3745 (lookup_name_fuzzy): Convert return type from tree to
3746 const char *.
3747 * c-parser.c (c_parser_declaration_or_fndef): Update for
3748 conversion of return type of lookup_name_fuzzy to const char *.
3749 (c_parser_parameter_declaration): Likewise.
3750
b1c9c068
CP
37512016-07-15 Cesar Philippidis <cesar@codesourcery.com>
3752
3753 * c-parser.c (c_parser_oacc_declare): Don't scan for
3754 GOMP_MAP_POINTER.
3755 * c-typeck.c (handle_omp_array_sections): Mark data clauses with
3756 GOMP_MAP_FORCE_{PRESENT,TO,FROM,TOFROM} as potentially having
3757 zero-length subarrays.
3758
ddbbcb19
JJ
37592016-07-15 Jakub Jelinek <jakub@redhat.com>
3760
3761 PR c/71858
3762 * c-decl.c (implicit_decl_warning): Use FUZZY_LOOKUP_FUNCTION_NAME
3763 instead of FUZZY_LOOKUP_NAME.
3764 (lookup_name_fuzzy): For FUZZY_LOOKUP_FUNCTION_NAME consider
3765 FUNCTION_DECLs, {VAR,PARM}_DECLs function pointers and macros.
3766
dd36b877
JJ
37672016-07-14 Jakub Jelinek <jakub@redhat.com>
3768
3769 PR c/71858
3770 * c-decl.c (lookup_name_fuzzy): Ignore binding->invisible.
3771
8c681247
TS
37722016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
3773
3774 * c-parser.c (c_parser_generic_selection): Make type of variable
3775 auto_vec.
3776 (c_parser_omp_declare_simd): Likewise.
3777
bf4fa671
TS
37782016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
3779
3780 * c-decl.c (struct c_struct_parse_info): Change member types
3781 from vec to auto_vec.
3782 (start_struct): Adjust.
3783 (finish_struct): Likewise.
3784
557e8c49
JJ
37852016-07-02 Jakub Jelinek <jakub@redhat.com>
3786
3787 PR c/71719
3788 * c-typeck.c (mark_exp_read): Handle VIEW_CONVERT_EXPR.
3789
54d19c3b
TS
37902016-06-29 Thomas Schwinge <thomas@codesourcery.com>
3791
3792 * c-parser.c (c_parser_pragma) <PRAGMA_OMP_CANCELLATION_POINT>:
3793 Move pragma context checking into...
3794 (c_parser_omp_cancellation_point): ... here, and improve
3795 diagnostic messages.
3796 * c-typeck.c (c_finish_omp_cancel)
3797 (c_finish_omp_cancellation_point): Improve diagnostic messages.
3798
152ef731
JJ
37992016-06-29 Jakub Jelinek <jakub@redhat.com>
3800
3801 PR c/71685
3802 * c-typeck.c (c_build_qualified_type): Don't clear
3803 C_TYPE_INCOMPLETE_VARS for the main variant.
3804
38052016-06-28 Martin Sebor <msebor@redhat.com>
4378d117
MS
3806
3807 PR c/71552
3808 * c-typeck.c (output_init_element): Diagnose incompatible types
3809 before non-constant initializers.
3810
e9ac1f86
JJ
38112016-06-28 Jakub Jelinek <jakub@redhat.com>
3812
3813 * Make-lang.in: Don't cat ../stage_current if it does not exist.
3814
277d7ee0
AK
38152016-06-23 Andi Kleen <ak@linux.intel.com>
3816
3817 * Make-lang.in: Add support for autofdo.
3818
1a4f11c8
DM
38192016-06-22 David Malcolm <dmalcolm@redhat.com>
3820
3821 PR c/70339
3822 * c-decl.c: Include spellcheck-tree.h and gcc-rich-location.h.
3823 (implicit_decl_warning): When issuing warnings for implicit
3824 declarations, attempt to provide a suggestion via
3825 lookup_name_fuzzy.
3826 (undeclared_variable): Likewise when issuing errors.
3827 (lookup_name_in_scope): Likewise.
3828 (struct edit_distance_traits<cpp_hashnode *>): New struct.
3829 (best_macro_match): New typedef.
3830 (find_closest_macro_cpp_cb): New function.
3831 (lookup_name_fuzzy): New function.
3832 * c-parser.c: Include gcc-rich-location.h.
3833 (c_token_starts_typename): Split out case CPP_KEYWORD into...
3834 (c_keyword_starts_typename): ...this new function.
3835 (c_parser_declaration_or_fndef): When issuing errors about
3836 missing "struct" etc, add a fixit. For other kinds of errors,
3837 attempt to provide a suggestion via lookup_name_fuzzy.
3838 (c_parser_parms_declarator): When looking ahead to detect typos in
3839 type names, also reject CPP_KEYWORD.
3840 (c_parser_parameter_declaration): When issuing errors about
3841 unknown type names, attempt to provide a suggestion via
3842 lookup_name_fuzzy.
3843 * c-tree.h (c_keyword_starts_typename): New prototype.
3844
5a578671
JM
38452016-06-20 Joseph Myers <joseph@codesourcery.com>
3846
3847 PR c/71601
3848 * c-typeck.c (build_conditional_expr): Return error_mark_node if
3849 c_common_type returns error_mark_node.
3850
3f8257db 38512016-06-19 Martin Sebor <msebor@redhat.com>
aa0db437
MS
3852
3853 PR c/69507
3854 * c-parser.c (c_parser_alignof_expression): Avoid diagnosing
3855 __alignof__ (expression).
3856
6a3f203c
DM
38572016-06-14 David Malcolm <dmalcolm@redhat.com>
3858
3859 * c-typeck.c: Include spellcheck-tree.h rather than spellcheck.h.
3860
264757fb
DM
38612016-06-14 David Malcolm <dmalcolm@redhat.com>
3862
3863 * c-typeck.c (build_component_ref): Simplify fixit code by
3864 using gcc_rich_location::add_fixit_misspelled_id.
3865 (set_init_label): Likewise.
3866
f7e4f2e3
DM
38672016-06-13 David Malcolm <dmalcolm@redhat.com>
3868
3869 * c-parser.c (c_parser_initelt): Provide location of name for new
3870 location_t param of set_init_label.
3871 * c-tree.h (set_init_label): Add location_t param.
3872 * c-typeck.c (set_init_index): Add "fieldname_loc" location_t
3873 param and use it when issuing error messages about unrecognized
3874 field names. Attempt to provide a fixit hint if appropriate,
3875 otherwise update the error message to provide the type name.
3876
4b1ffdb1
TS
38772016-06-10 Thomas Schwinge <thomas@codesourcery.com>
3878
3879 PR c/71381
3880 * c-parser.c (c_parser_omp_variable_list) <OMP_CLAUSE__CACHE_>:
3881 Loosen checking.
3882
44a845ca
MS
38832016-06-08 Martin Sebor <msebor@redhat.com>
3884 Jakub Jelinek <jakub@redhat.com>
3885
3886 PR c++/70507
3887 PR c/68120
3888 * c-typeck.c (convert_arguments): Don't promote last argument
3889 of BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
3890
92a5f2ba
MP
38912016-06-08 Marek Polacek <polacek@redhat.com>
3892
3893 PR c/71418
3894 * c-decl.c (grokdeclarator): Check TYPE_P.
3895
08203f73
MP
3896 PR c/71426
3897 * c-decl.c (get_parm_info): Don't crash on an assert on invalid
3898 code.
3899
6ffd47b7
DM
39002016-06-07 David Malcolm <dmalcolm@redhat.com>
3901
3902 * c-parser.c (c_parser_postfix_expression): In __builtin_offsetof
3903 and structure element reference, capture the location of the
3904 element name token and pass it to build_component_ref.
3905 (c_parser_postfix_expression_after_primary): Likewise for
3906 structure element dereference.
3907 (c_parser_omp_variable_list): Likewise for
3908 OMP_CLAUSE_{_CACHE, MAP, FROM, TO},
3909 * c-tree.h (build_component_ref): Add location_t param.
3910 * c-typeck.c (build_component_ref): Add location_t param
3911 COMPONENT_LOC. Use it, if available, when issuing hints about
3912 mispelled member names to provide a fixit replacement hint.
3913
1f40cff3
MP
39142016-06-06 Marek Polacek <polacek@redhat.com>
3915
3916 PR c/71362
3917 * c-parser.c (c_parser_direct_declarator): Set location.
3918
5545a907
MP
39192016-06-06 Marek Polacek <polacek@redhat.com>
3920
3921 * c-typeck.c (comptypes_internal): Handle comparisons of
3922 INTEGER_TYPE, FIXED_POINT_TYPE, and REAL_TYPE nodes. Don't check
3923 TYPE_REF_CAN_ALIAS_ALL.
3924
b605f663
CLT
39252016-06-03 Chung-Lin Tang <cltang@codesourcery.com>
3926
3927 * c-typeck.c (c_finish_omp_clauses): Mark OpenACC reduction
3928 arguments as addressable when async clause exists.
3929
00631022
JJ
39302016-05-30 Jakub Jelinek <jakub@redhat.com>
3931
3932 PR c++/71349
3933 * c-parser.c (c_parser_omp_for): Don't disallow nowait clause
3934 when combined with target construct.
3935
7211a097
JJ
39362016-05-26 Jakub Jelinek <jakub@redhat.com>
3937
3938 * c-parser.c (c_parser_omp_clause_schedule): Warn if
3939 OMP_CLAUSE_SCHEDULE_CHUNK_EXPR is known not to be positive.
3940
95efe6b6
MP
39412016-05-25 Marek Polacek <polacek@redhat.com>
3942
3943 PR c/71265
3944 * c-decl.c (c_make_fname_decl): Don't check seen_error.
3945
a23faf7a
MP
3946 PR c/71266
3947 * c-decl.c (store_parm_decls_oldstyle): Skip non-PARM_DECLs.
3948
e46c7770
CP
39492016-05-24 Cesar Philippidis <cesar@codesourcery.com>
3950
3951 * c-parser.c (c_parser_oacc_declare): Add support for
3952 GOMP_MAP_FIRSTPRIVATE_POINTER.
3953 * c-typeck.c (handle_omp_array_sections_1): Replace bool is_omp
3954 argument with enum c_omp_region_type ort.
3955 (handle_omp_array_sections): Likewise. Update call to
3956 handle_omp_array_sections_1.
3957 (c_finish_omp_clauses): Add specific errors and warning messages for
3958 OpenACC. Use firsrtprivate pointers for OpenACC subarrays. Update
3959 call to handle_omp_array_sections.
3960
a04e69c0
TS
39612016-05-24 Thomas Schwinge <thomas@codesourcery.com>
3962
3963 * c-parser.c (c_parser_oacc_routine): Tighten syntax checks.
3964
f17a223d
RB
39652016-05-24 Richard Biener <rguenther@suse.de>
3966
3967 PR middle-end/70434
3968 PR c/69504
3969 * c-typeck.c (build_array_ref): Do not complain about indexing
3970 non-lvalue vectors. Adjust for function name change.
3971
79063edd
MS
39722016-05-20 Martin Sebor <msebor@redhat.com>
3973
3974 PR c/71115
3975 * c-typeck.c (error_init): Use
3976 expansion_point_location_if_in_system_header.
3977 (warning_init): Same.
3978
8a40fef3
DM
39792016-05-19 David Malcolm <dmalcolm@redhat.com>
3980
3981 PR c/71171
3982 * c-parser.c (c_parser_generic_selection): Use c_expr::set_error
3983 in error-handling.
3984 (c_parser_postfix_expression): Likewise.
3985 * c-tree.h (c_expr::set_error): New method.
3986 * c-typeck.c (parser_build_binary_op): In error-handling, ensure
3987 that result's range is initialized.
3988
e9892350
JG
39892016-05-17 James Greenhalgh <james.greenhalgh@arm.com>
3990
3991 * c-typeck.c (parser_build_unary_op): Fix formatting.
3992
8fad45f5
MW
39932016-05-16 Matthew Wahab <matthew.wahab@arm.com>
3994
3995 * c-decl.c (grokdeclarator): Remove errmsg and use of
3996 targetm.invalid_return_type.
3997 (grokparms): Remove errmsg and use of
3998 targetm.invalid_parameter_type.
3999
aa4b467b
JM
40002016-05-13 Joseph Myers <joseph@codesourcery.com>
4001
4002 * c-decl.c (grokdeclarator): For C11, discard qualifiers on
4003 function return type.
4004
4f2e1536
MP
40052016-05-12 Marek Polacek <polacek@redhat.com>
4006
4007 PR c/70756
4008 * c-decl.c (build_compound_literal): Pass LOC down to
4009 c_incomplete_type_error.
4010 * c-tree.h (require_complete_type): Adjust declaration.
4011 (c_incomplete_type_error): Likewise.
4012 * c-typeck.c (require_complete_type): Add location parameter, pass it
4013 down to c_incomplete_type_error.
4014 (c_incomplete_type_error): Add location parameter, pass it down to
4015 error_at.
4016 (build_component_ref): Pass location down to c_incomplete_type_error.
4017 (default_conversion): Pass location down to require_complete_type.
4018 (build_array_ref): Likewise.
4019 (build_function_call_vec): Likewise.
4020 (convert_arguments): Likewise.
4021 (build_unary_op): Likewise.
4022 (build_c_cast): Likewise.
4023 (build_modify_expr): Likewise.
4024 (convert_for_assignment): Likewise.
4025 (c_finish_omp_clauses): Likewise.
4026
d6e83a8d
MM
40272016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
4028
4029 PR c/43651
4030 * c-decl.c (declspecs_add_qual): Warn when -Wduplicate-decl-specifier
4031 is enabled.
4032 * c-errors.c (pedwarn_c90): Return true if warned.
4033 * c-tree.h (pedwarn_c90): Change return type to bool.
4034 (enum c_declspec_word): Add new enumerator cdw_atomic.
4035
5c3a10fb
MP
40362016-05-11 Marek Polacek <polacek@redhat.com>
4037
4038 PR c++/71024
4039 * c-decl.c (diagnose_mismatched_decls): Factor out code to
4040 diagnose_mismatched_attributes and call it.
4041
cf68d92c
MP
40422016-05-10 Marek Polacek <polacek@redhat.com>
4043
4044 PR c/70255
4045 * c-decl.c (diagnose_mismatched_decls): Warn for optimize attribute
4046 on a declaration following the definition.
4047
351f85c5
JJ
40482016-05-05 Jakub Jelinek <jakub@redhat.com>
4049
4050 * c-parser.c (c_parser_switch_statement): Add IF_P argument,
4051 parse it through to c_parser_c99_block_statement.
4052 (c_parser_statement_after_labels): Adjust c_parser_switch_statement
4053 caller.
4054
deef7113
MP
40552016-05-04 Marek Polacek <polacek@redhat.com>
4056
4057 * c-parser.c (c_parser_if_statement): Replace OPT_Wparentheses with
4058 OPT_Wdangling_else.
4059
de55efd5
MP
40602016-05-04 Marek Polacek <polacek@redhat.com>
4061
4062 PR c/48778
4063 * c-typeck.c (build_binary_op): Don't issue -Waddress warnings
4064 for macro expansions.
4065
79ce98bc
MP
40662016-05-03 Marek Polacek <polacek@redhat.com>
4067
4068 PR c/70859
4069 * c-typeck.c (build_function_call_vec): Pass LOC and ARG_LOC down to
4070 check_builtin_function_arguments.
4071
fb2647aa
RB
40722016-05-03 Richard Biener <rguenther@suse.de>
4073
4074 * Make-lang.in (cc1-checksum.c): For stage-final re-use
4075 the checksum from the previous stage.
4076
77886428
CP
40772016-05-02 Cesar Philippidis <cesar@codesourcery.com>
4078
4079 * c-parser.c (c_parser_oacc_all_clauses): Update call to
4080 c_finish_omp_clauses.
4081 (c_parser_omp_all_clauses): Likewise.
4082 (c_parser_oacc_cache): Likewise.
4083 (c_parser_oacc_loop): Likewise.
4084 (omp_split_clauses): Likewise.
4085 (c_parser_omp_declare_target): Likewise.
4086 (c_parser_cilk_all_clauses): Likewise.
4087 (c_parser_cilk_for): Likewise.
4088 * c-typeck.c (c_finish_omp_clauses): Replace bool arguments
4089 is_omp, declare_simd, and is_cilk with enum c_omp_region_type ort.
4090
7176a4a0
MP
40912016-05-02 Marek Polacek <polacek@redhat.com>
4092
4093 PR c/70851
4094 * c-decl.c (grokdeclarator): Diagnose when array's size has an
4095 incomplete type.
4096
e7ff0319
CP
40972016-04-29 Cesar Philippidis <cesar@codesourcery.com>
4098
4099 PR middle-end/70626
4100 * c-parser.c (c_parser_oacc_loop): Don't augment mask with
4101 OACC_LOOP_CLAUSE_MASK.
4102 (c_parser_oacc_kernels_parallel): Update call to
4103 c_oacc_split_loop_clauses.
4104
9f405ce1
AM
41052016-04-28 Andrew MacLeod <amacleod@redhat.com>
4106
4107 * c-array-notation.c (fix_builtin_array_notation_fn): Fix final
4108 argument to build_modify_expr in two cases.
4109
c1e1f433
BS
41102016-04-27 Bernd Schmidt <bschmidt@redhat.com>
4111
4112 * c-parser.c (c_parser_postfix_expression_after_primary): Call
4113 warn_for_memset instead of warning directly here.
4114
2448a956
MP
41152016-04-26 Marek Polacek <polacek@redhat.com>
4116
4117 PR c/67784
4118 * c-parser.c (c_parser_maybe_reclassify_token): New function factored
4119 out of ...
4120 (c_parser_for_statement): ... here.
4121 (c_parser_if_statement): Use it.
4122 (c_parser_switch_statement): Use it.
4123 (c_parser_while_statement): Use it.
4124
b02a5e26
MP
4125 PR c/70791
4126 * c-decl.c (pushdecl): Pass LOCUS down to warning.
4127
477d4906
IV
41282016-04-20 Ilya Verbin <ilya.verbin@intel.com>
4129
4130 PR c++/69363
4131 * c-parser.c (c_parser_cilk_all_clauses): Use c_finish_omp_clauses
4132 instead of c_finish_cilk_clauses.
4133 * c-tree.h (c_finish_omp_clauses): Add new default argument.
4134 * c-typeck.c (c_finish_omp_clauses): Add new argument. Allow
4135 floating-point variables in the linear clause for Cilk Plus.
4136
fe37c7af
MM
41372016-04-18 Michael Matz <matz@suse.de>
4138
4139 * c-decl.c (merge_decls): Use SET_DECL_ALIGN and SET_TYPE_ALIGN.
4140 (grokdeclarator, parser_xref_tag, finish_enum): Use SET_TYPE_ALIGN.
4141
949505a9
MP
41422016-04-15 Marek Polacek <polacek@redhat.com>
4143
4144 PR c/70671
4145 * c-typeck.c (build_unary_op): Pass location down to error and
4146 warning call.
4147
dda1bf61
JJ
41482016-04-15 Jakub Jelinek <jakub@redhat.com>
4149
4150 PR c/70436
4151 * c-parser.c (c_parser_pragma): Add IF_P argument, pass it down
4152 where needed.
4153 (c_parser_external_declaration, c_parser_struct_or_union_specifier,
4154 c_parser_parameter_declaration, c_parser_compound_statement_nostart,
4155 c_parser_objc_class_instance_variables, c_parser_objc_methodprotolist):
4156 Adjust c_parser_pragma callers.
4157 (c_parser_statement_after_labels): Likewise. Adjust c_parser_cilk_for
4158 caller.
4159 (c_parser_omp_structured_block): Add IF_P argument, pass it down to
4160 c_parser_statement.
4161 (c_parser_oacc_data, c_parser_oacc_host_data, c_parser_oacc_loop,
4162 c_parser_oacc_kernels_parallel, c_parser_omp_critical,
4163 c_parser_omp_simd, c_parser_omp_for, c_parser_omp_master,
4164 c_parser_omp_ordered, c_parser_omp_parallel, c_parser_omp_single,
4165 c_parser_omp_task, c_parser_omp_taskgroup, c_parser_omp_distribute,
4166 c_parser_omp_teams, c_parser_omp_target_data, c_parser_omp_target,
4167 c_parser_omp_taskloop, c_parser_omp_construct, c_parser_cilk_grainsize,
4168 c_parser_cilk_simd, c_parser_cilk_for): Add IF_P argument, pass it
4169 down where needed.
4170 (c_parser_omp_for_loop): Likewise. Clear IF_P if nbraces.
4171 (c_parser_omp_sections_scope): Adjust c_parser_omp_structured_block
4172 calls.
4173
99cd9857
MP
41742016-04-13 Marek Polacek <polacek@redhat.com>
4175
4176 PR c/70436
4177 * c-parser.c (c_parser_statement_after_labels): Add IF_P argument and
4178 adjust callers.
4179 (c_parser_statement): Likewise.
4180 (c_parser_c99_block_statement): Likewise.
4181 (c_parser_while_statement): Likewise.
4182 (c_parser_for_statement): Likewise.
4183 (c_parser_if_body): Don't set IF_P here.
4184 (c_parser_if_statement): Add IF_P argument. Set IF_P here. Warn
4185 about dangling else here.
4186 * c-tree.h (c_finish_if_stmt): Adjust declaration.
4187 * c-typeck.c (c_finish_if_stmt): Remove NESTED_IF parameter. Don't
4188 warn about dangling else here.
4189
f13355da
MP
41902016-04-04 Marek Polacek <polacek@redhat.com>
4191
4192 PR c/70307
4193 * c-fold.c (c_fully_fold_internal): Handle VEC_COND_EXPR.
4194
5fde6a45
MP
41952016-03-31 Marek Polacek <polacek@redhat.com>
4196
4197 PR c/70297
4198 * c-decl.c (merge_decls): Also set TYPE_ALIGN and TYPE_USER_ALIGN.
4199
4bbf545b
DM
42002016-03-18 David Malcolm <dmalcolm@redhat.com>
4201
4202 PR c/70281
4203 * c-parser.c (c_parser_postfix_expression): Set the source range
4204 for uses of "__builtin_types_compatible_p".
4205
fcc2b74f
JJ
42062016-03-17 Jakub Jelinek <jakub@redhat.com>
4207
4208 PR c/70280
4209 * c-typeck.c (composite_type): Don't count void_list_node
4210 into len, if the list is terminated by void_list_node, start
4211 with void_list_node instead of NULL for newargs. Stop
4212 at void_list_node.
4213
ab4c578f
MP
42142016-03-16 Marek Polacek <polacek@redhat.com>
4215
4216 PR c/70093
4217 * c-typeck.c (build_function_call_vec): Create a TARGET_EXPR for
4218 nested functions returning VM types.
4219
96b3c82d
CP
42202016-03-09 Cesar Philippidis <cesar@codesourcery.com>
4221
4222 * c-parser.c (c_parser_oacc_loop): Update cclauses and clauses
4223 when calling c_finish_omp_clauses.
4224
29b9828f
BS
42252016-03-04 Bernd Schmidt <bschmidt@redhat.com>
4226
4227 PR c/69824
4228 * c-decl.c (get_parm_info): Don't queue implicit function declarations
4229 for later.
4230
7ff6ca38
MP
42312016-03-04 Marek Polacek <polacek@redhat.com>
4232
4233 PR c/69798
4234 * c-parser.c (c_parser_postfix_expression): Call
4235 c_parser_cast_expression rather than c_parser_postfix_expression.
4236
686e2237
JJ
42372016-03-01 Jakub Jelinek <jakub@redhat.com>
4238
4239 PR c/69796
4240 PR c/69974
4241 * c-parser.c (c_parser_translation_unit): Don't change TREE_TYPE
4242 of incomplete decls to error_mark_node.
4243
0b05329b
MP
42442016-02-24 Marek Polacek <polacek@redhat.com>
4245
4246 PR c/69819
4247 * c-decl.c (finish_decl): Don't update the copy of the type of a
4248 different decl type.
4249
067fbd8b
JJ
42502016-02-23 Jakub Jelinek <jakub@redhat.com>
4251
4252 PR objc/69844
4253 * c-parser.c (c_parser_for_statement): Properly handle ObjC classes
4254 in id_kind reclassification.
4255
bf14eba2
JJ
42562016-02-16 Jakub Jelinek <jakub@redhat.com>
4257
4258 PR c/69835
4259 * c-typeck.c (build_binary_op): Revert 2015-09-09 change.
4260
ba539195
JN
42612016-02-16 James Norris <jnorris@codesourcery.com>
4262
4263 PR c/64748
4264 * c-parser.c (c_parser_oacc_data_clause_deviceptr): Allow parms.
4265
16595a1f
BS
42662016-02-12 Bernd Schmidt <bschmidt@redhat.com>
4267
f48dfe98
BS
4268 * c-decl.c (build_null_declspecs): Zero the entire struct.
4269
16595a1f
BS
4270 PR c/69522
4271 * c-parser.c (c_parser_braced_init): New arg outer_obstack. All
4272 callers changed. If nested_p is true, use it to call
4273 finish_implicit_inits.
4274 * c-tree.h (finish_implicit_inits): Declare.
4275 * c-typeck.c (finish_implicit_inits): New function. Move code
4276 from ...
4277 (push_init_level): ... here.
4278 (set_designator, process_init_element): Call finish_implicit_inits.
4279
66756373
JJ
42802016-02-11 Jakub Jelinek <jakub@redhat.com>
4281
4282 PR c/69768
4283 * c-typeck.c (parser_build_binary_op): Strip nops from integer_zerop
4284 arguments for -Waddress warning.
4285
1066e9b5
JJ
42862016-02-04 Jakub Jelinek <jakub@redhat.com>
4287
4288 PR c/69669
4289 * c-decl.c (finish_enum): When honoring mode attribute,
4290 make sure to use proper TYPE_MIN_VALUE and TYPE_MAX_VALUE.
4291
3a5d2ba4
JJ
42922016-01-29 Jakub Jelinek <jakub@redhat.com>
4293
4294 PR debug/69518
4295 * c-decl.c (finish_struct): Clear C_TYPE_INCOMPLETE_VARS in
4296 all type variants, not just TYPE_MAIN_VARIANT.
4297
cbdd8ae0
JJ
42982016-01-27 Jakub Jelinek <jakub@redhat.com>
4299
4300 PR debug/66869
4301 * c-decl.c (c_write_global_declarations_1): Warn with
4302 warn_unused_function if static prototype without definition
4303 is not C_DECL_USED.
4304
fa74a4bc
MP
43052016-01-27 Marek Polacek <polacek@redhat.com>
4306
4307 PR c/68062
4308 * c-typeck.c (build_binary_op) [EQ_EXPR, GE_EXPR]: Promote operand
4309 to unsigned, if needed. Add -Wsign-compare warning.
4310
13f92e8d
JJ
43112016-01-26 Jakub Jelinek <jakub@redhat.com>
4312
4313 PR tree-optimization/69483
4314 * c-parser.c (c_parser_translation_unit): Use FOR_EACH_VEC_ELT.
4315
cd8e73dc 43162016-01-20 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
d25c7690
PK
4317
4318 PR c/24293
4319 * c-tree.h (incomplete_record_decls): Declare.
4320 * c-parser.c (incomplete_record_decls): Define.
4321 (c_parser_translation_unit): Iterate through incomplete_record_decls and
4322 report error if any decl has zero size.
4323 * c-decl.c (finish_decl): Append static decl with incomplete struct/union
4324 or enum type to incomplete_record_decls.
4325
e6d6ec9e
TV
43262016-01-14 Tom de Vries <tom@codesourcery.com>
4327
4328 PR tree-optimization/68773
4329 * c-parser.c (c_parser_oacc_declare, c_parser_omp_declare_target): Don't
4330 set force_output.
4331
00083992
MP
43322016-01-14 Marek Polacek <polacek@redhat.com>
4333
4334 PR c/69262
4335 * c-decl.c (grokdeclarator): Provide more information for invalid
4336 array declarations.
4337
7443cf13
DM
43382016-01-06 David Malcolm <dmalcolm@redhat.com>
4339
4340 * c-parser.c (c_parser_unary_expression): For dereferences, build
4341 a combined location before calling build_indirect_ref, so that
4342 error reports cover the full range, manually updating the c_expr
4343 src_range.
4344
6b131d5b
MP
43452016-01-06 Marek Polacek <polacek@redhat.com>
4346
4347 PR sanitizer/69099
4348 * c-convert.c (convert) [INTEGER_TYPE]: Drop ARG. Don't pass ARG to
4349 ubsan_instrument_float_cast. Fold EXPR. Use NULL_TREE instead of
4350 NULL.
4351
818ab71a
JJ
43522016-01-04 Jakub Jelinek <jakub@redhat.com>
4353
4354 Update copyright years.
4355
2fe0a208
MP
43562016-01-04 Marek Polacek <polacek@redhat.com>
4357
4358 PR c/68908
4359 * c-typeck.c (build_atomic_assign): Improve commentary. Add
4360 optimization to use __atomic_fetch_* built-in if possible.
4361
c7b48c8a
TS
43622015-12-23 Thomas Schwinge <thomas@codesourcery.com>
4363
4364 * c-parser.c (c_parser_oacc_clause_use_device): Merge function
4365 into...
4366 (c_parser_omp_clause_use_device_ptr): ... this function. Adjust
4367 all users.
4368
fda5652f
MP
43692015-12-22 Marek Polacek <polacek@redhat.com>
4370
4371 PR c/69002
4372 * c-typeck.c (build_component_ref): Warn when acessing elements of
4373 atomic structures or unions.
4374
745e411d
DM
43752015-12-21 David Malcolm <dmalcolm@redhat.com>
4376
4377 * c-typeck.c: Include "gcc-rich-location.h".
4378 (build_binary_op): In the two places that call binary_op_error,
4379 create a gcc_rich_location and populate it with the location of
4380 the binary op and its two operands.
4381
94c40e19
DM
43822015-12-16 David Malcolm <dmalcolm@redhat.com>
4383
4384 * c-parser.c (c_parser_statement_after_labels): When calling
4385 c_finish_return, Use the return expression's location if it has
4386 one, falling back to the location of the first token within it.
4387 * c-typeck.c (c_finish_return): When issuing warnings about
4388 the incorrect presence/absence of a return value, issue a note
4389 showing the declaration of the function.
4390
de67c4c3
DM
43912015-12-16 David Malcolm <dmalcolm@redhat.com>
4392
4393 * c-parser.c (struct c_parser): Expand array "tokens_buf" from 2
4394 to 4.
4395 (c_parser_peek_nth_token): New function.
4396 (c_parser_peek_conflict_marker): New function.
4397 (c_parser_error): Detect conflict markers and report them as such.
4398
a10704e1
DM
43992015-12-16 David Malcolm <dmalcolm@redhat.com>
4400
4401 * c-parser.c (c_parser_postfix_expression): Use EXPR_LOC_OR_LOC
4402 to preserve range information for the primary expression
4403 in the call to c_parser_postfix_expression_after_primary.
4404
8062bca6
DM
44052015-12-16 David Malcolm <dmalcolm@redhat.com>
4406
4407 * c-parser.c (c_parser_static_assert_declaration_no_semi): Use the
4408 expression location, falling back on the first token location,
4409 rather than always using the latter.
4410
d06f8b75
MP
44112015-12-16 Marek Polacek <polacek@redhat.com>
4412
4413 PR c/64637
4414 * c-typeck.c (c_process_expr_stmt): Use location of the expression if
4415 available.
4416
2994fb91
MP
44172015-12-15 Marek Polacek <polacek@redhat.com>
4418
4419 PR c/68907
4420 * c-typeck.c (build_atomic_assign): Set TREE_NO_WARNING on an
4421 artificial decl.
4422
a1b93f8d
DM
44232015-12-08 David Malcolm <dmalcolm@redhat.com>
4424
4425 * c-parser.c (c_parser_alignof_expression): Capture location of
4426 closing parenthesis (if any), or of end of unary expression, and
4427 use it to build a src_range for the expression.
4428
46c6e1e2
DM
44292015-12-08 David Malcolm <dmalcolm@redhat.com>
4430
4431 PR c/68757
4432 * c-parser.c (c_parser_get_builtin_args): Add
4433 "out_close_paren_loc" param, and write back to it.
4434 (c_parser_postfix_expression): Capture the closing
4435 parenthesis location for RID_CHOOSE_EXPR,
4436 RID_BUILTIN_CALL_WITH_STATIC_CHAIN, RID_BUILTIN_COMPLEX,
4437 RID_BUILTIN_SHUFFLE and use it to set the source range
4438 for such expressions; within RID_BUILTIN_COMPLEX set
4439 the underlying location.
4440
66189108
MP
44412015-12-07 Marek Polacek <polacek@redhat.com>
4442
4443 PR c/68668
4444 * c-decl.c (grokdeclarator): If ORIG_QUAL_INDIRECT is indirect, use
4445 TREE_TYPE of ORIG_QUAL_TYPE, otherwise decrement ORIG_QUAL_INDIRECT.
4446
f187980b
EB
44472015-12-04 Eric Botcazou <ebotcazou@adacore.com>
4448
4449 * c-tree.h (c_build_va_arg): Adjust prototype.
4450 * c-parser.c (c_parser_postfix_expression): Adjust call to above.
4451 * c-typeck.c (c_build_va_arg): Rename LOC parameter to LOC2, add LOC1
4452 parameter, adjust throughout and issue an error if EXPR is a component
4453 with reverse storage order.
4454
4250754e
JM
44552015-12-02 Jason Merrill <jason@redhat.com>
4456
4457 * c-fold.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
4458 (c_fully_fold_internal, decl_constant_value_for_optimization):
4459 Move from c-common.c.
4460 * c-tree.h: Declare decl_constant_value_for_optimization.
4461 * Make-lang.in (C_AND_OBJC_OBJS): Add c-fold.o.
4462
e9e32ee6
JM
44632015-12-02 Joseph Myers <joseph@codesourcery.com>
4464
4465 PR c/68162
4466 * c-decl.c (grokdeclarator): Set first_non_attr_kind before
4467 following link from declarator to next declarator. Track original
4468 qualified type and pass it to c_build_qualified_type.
4469 * c-typeck.c (c_build_qualified_type): Add arguments
4470 orig_qual_type and orig_qual_indirect.
4471
ff7a55bf
TS
44722015-12-02 Thomas Schwinge <thomas@codesourcery.com>
4473
4474 * c-parser.c (c_parser_omp_clause_name)
4475 (c_parser_oacc_all_clauses): Alphabetical sorting.
4476
657e4e47
JJ
44772015-12-02 Jakub Jelinek <jakub@redhat.com>
4478
4479 PR c/68533
4480 * c-decl.c (get_parm_info): Use b->locus instead of input_location
4481 for diagnostics.
4482
37d5ad46
JB
44832015-12-01 Julian Brown <julian@codesourcery.com>
4484 Cesar Philippidis <cesar@codesourcery.com>
4485 James Norris <James_Norris@mentor.com>
4486
4487 * c-parser.c (c_parser_omp_clause_name): Add use_device support.
4488 (c_parser_oacc_clause_use_device): New function.
4489 (c_parser_oacc_all_clauses): Add use_device support.
4490 (OACC_HOST_DATA_CLAUSE_MASK): New macro.
4491 (c_parser_oacc_host_data): New function.
4492 (c_parser_omp_construct): Add host_data support.
4493 * c-tree.h (c_finish_oacc_host_data): Add prototype.
4494 * c-typeck.c (c_finish_oacc_host_data): New function.
4495 (c_finish_omp_clauses): Add use_device support.
4496
a4850ce9
JH
44972015-11-29 Jan Hubicka <hubicka@ucw.cz>
4498
4499 PR c/67106
4500 * c-decl.c: Set TYPE_PACKED in variants.
4501
b58d3df2
ML
45022015-11-27 Martin Liska <mliska@suse.cz>
4503
4504 PR c++/68312
4505 * c-array-notation.c (fix_builtin_array_notation_fn):
4506 Use release_vec_vec instead of vec::release.
4507 (build_array_notation_expr): Likewise.
4508 (fix_conditional_array_notations_1): Likewise.
4509 (fix_array_notation_expr): Likewise.
4510 (fix_array_notation_call_expr): Likewise.
4511
aec17bfe
JJ
45122015-11-27 Jakub Jelinek <jakub@redhat.com>
4513
4514 PR c/63326
4515 * c-parser.c (c_parser_compound_statement_nostart): If
4516 last_label is true, use pragma_stmt instead of pragma_compound
4517 as second c_parser_pragma argument.
4518 (c_parser_omp_ordered, c_parser_omp_target_update,
4519 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Pass
4520 false as second argument to c_parser_skip_to_pragma_eol after
4521 diagnosing standalone directives used in pragma_stmt context.
4522
688c4de0
IV
45232015-11-24 Ilya Verbin <ilya.verbin@intel.com>
4524
4525 * c-parser.c (c_parser_oacc_declare): Replace "ifdef ENABLE_OFFLOADING"
4526 with "if (ENABLE_OFFLOADING)".
4527
cbd03aee
DM
45282015-11-23 David Malcolm <dmalcolm@redhat.com>
4529
4530 PR objc/68438
4531 * c-parser.c (c_parser_postfix_expression): Set up source ranges
4532 for various Objective-C constructs: Class.name syntax,
4533 @selector(), @protocol(), @encode(), and [] message syntax.
4534
a87a86e1
DM
45352015-11-20 David Malcolm <dmalcolm@redhat.com>
4536
4537 PR 62314
4538 * c-typeck.c (should_suggest_deref_p): New function.
4539 (build_component_ref): Special-case POINTER_TYPE when
4540 generating a "not a structure of union" error message, and
4541 suggest a "->" rather than a ".", providing a fix-it hint.
4542
8ece8dfb
DM
45432015-11-19 David Malcolm <dmalcolm@redhat.com>
4544
4545 * c-typeck.c (lookup_field_fuzzy): Move determination of closest
4546 candidate into a new function, find_closest_identifier.
4547
433068cc
MP
45482015-11-19 Marek Polacek <polacek@redhat.com>
4549
4550 PR c/68412
4551 * c-typeck.c (parser_build_binary_op): Properly handle
4552 C_MAYBE_CONST_EXPR before calling warn_tautological_cmp.
4553
bef08b71
DM
45542015-11-17 David Malcolm <dmalcolm@redhat.com>
4555
4556 * c-parser.c (set_c_expr_source_range): Bulletproof both
4557 overloaded implementations against NULL expr->value.
4558 (c_parser_braced_init): Set src_range for "ret" to a sane pair of
4559 values.
4560 (c_parser_unary_expression): Likewise when handling addresses of
4561 labels.
4562 (c_parser_postfix_expression): Likewise for statement expressions,
4563 for __FUNCTION__, __PRETTY_FUNCTION_ and __func__ keywords, for
4564 __builtin_va_arg, and for __builtin_offset_of.
4565 (c_parser_postfix_expression_after_paren_type): Initialize expr's
4566 src_range using the range of the braced initializer.
4567 (c_parser_transaction_expression): Set src_range for "ret" to a
4568 sane pair of values.
4569
fff77217
KY
45702015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
4571
4572 * c-parser.c (c_finish_omp_declare_simd): Look for
4573 "simd" attribute as well. Update error message.
4574
1d899da2
TS
45752015-11-14 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
4576
4577 * c-parser.c (c_parser_omp_declare_target): Adjust.
4578
e4606348
JJ
45792015-11-14 Jakub Jelinek <jakub@redhat.com>
4580
4581 * c-typeck.c (c_finish_omp_clauses): Don't mark
4582 GOMP_MAP_FIRSTPRIVATE_POINTER decls addressable.
4583
3e636daf
MP
45842015-11-14 Marek Polacek <polacek@redhat.com>
4585
4586 * c-decl.c: Use RECORD_OR_UNION_TYPE_P throughout.
4587 * c-typeck.c: Likewise.
4588
ebedc9a3
DM
45892015-11-13 David Malcolm <dmalcolm@redhat.com>
4590
4591 * c-decl.c (warn_defaults_to): Pass line_table to
4592 rich_location ctor.
4593 * c-errors.c (pedwarn_c99): Likewise.
4594 (pedwarn_c90): Likewise.
4595 * c-parser.c (set_c_expr_source_range): New functions.
4596 (c_token::get_range): New method.
4597 (c_token::get_finish): New method.
4598 (c_parser_expr_no_commas): Call set_c_expr_source_range on the ret
4599 based on the range from the start of the LHS to the end of the
4600 RHS.
4601 (c_parser_conditional_expression): Likewise, based on the range
4602 from the start of the cond.value to the end of exp2.value.
4603 (c_parser_binary_expression): Call set_c_expr_source_range on
4604 the stack values for TRUTH_ANDIF_EXPR and TRUTH_ORIF_EXPR.
4605 (c_parser_cast_expression): Call set_c_expr_source_range on ret
4606 based on the cast_loc through to the end of the expr.
4607 (c_parser_unary_expression): Likewise, based on the
4608 op_loc through to the end of op.
4609 (c_parser_sizeof_expression) Likewise, based on the start of the
4610 sizeof token through to either the closing paren or the end of
4611 expr.
4612 (c_parser_postfix_expression): Likewise, using the token range,
4613 or from the open paren through to the close paren for
4614 parenthesized expressions.
4615 (c_parser_postfix_expression_after_primary): Likewise, for
4616 various kinds of expression.
4617 * c-tree.h (struct c_expr): Add field "src_range".
4618 (c_expr::get_start): New method.
4619 (c_expr::get_finish): New method.
4620 (set_c_expr_source_range): New decls.
4621 * c-typeck.c (parser_build_unary_op): Call set_c_expr_source_range
4622 on ret for prefix unary ops.
4623 (parser_build_binary_op): Likewise, running from the start of
4624 arg1.value through to the end of arg2.value.
4625
ec8b536f
MP
46262015-11-13 Marek Polacek <polacek@redhat.com>
4627
4628 PR c/68320
4629 * c-parser.c (c_parser_for_statement): Treat unknown tokens as IDs.
4630
277fe616
DM
46312015-11-13 David Malcolm <dmalcolm@redhat.com>
4632
4633 * c-typeck.c: Include spellcheck.h.
4634 (lookup_field_fuzzy_find_candidates): New function.
4635 (lookup_field_fuzzy): New function.
4636 (build_component_ref): If the field was not found, try using
4637 lookup_field_fuzzy and potentially offer a suggestion.
4638
6e232ba4
JN
46392015-11-12 James Norris <jnorris@codesourcery.com>
4640 Joseph Myers <joseph@codesourcery.com>
4641
4642 * c-parser.c (c_parser_pragma): Handle PRAGMA_OACC_DECLARE.
4643 (c_parser_omp_clause_name): Handle 'device_resident' clause.
4644 (c_parser_oacc_data_clause): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
4645 and PRAGMA_OMP_CLAUSE_LINK.
4646 (c_parser_oacc_all_clauses): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
4647 and PRAGMA_OACC_CLAUSE_LINK.
4648 (OACC_DECLARE_CLAUSE_MASK): New definition.
4649 (c_parser_oacc_declare): New function.
4650
9be4f715
MP
46512015-11-12 Marek Polacek <polacek@redhat.com>
4652
4653 PR c/67784
4654 * c-parser.c (c_parser_for_statement): Reclassify the token in
4655 a correct scope.
4656
e78bede6
MP
46572015-11-11 Marek Polacek <polacek@redhat.com>
4658
4659 PR c/68107
4660 PR c++/68266
4661 * c-decl.c (grokdeclarator): Call valid_array_size_p. Remove code
4662 checking the size of an array.
4663
69f293c9
AM
46642015-11-11 Andrew MacLeod <amacleod@redhat.com>
4665
4666 * c-array-notation.c: Remove unused header files.
4667 * c-aux-info.c: Likewise.
4668 * c-convert.c: Likewise.
4669 * c-decl.c: Likewise.
4670 * c-errors.c: Likewise.
4671 * c-lang.c: Likewise.
4672 * c-objc-common.c: Likewise.
4673 * c-parser.c: Likewise.
4674 * c-typeck.c: Likewise.
4675 * gccspec.c: Likewise.
4676
3a40d81d
NS
46772015-11-09 Thomas Schwinge <thomas@codesourcery.com>
4678 Cesar Philippidis <cesar@codesourcery.com>
4679 James Norris <jnorris@codesourcery.com>
4680 Julian Brown <julian@codesourcery.com>
4681 Nathan Sidwell <nathan@codesourcery.com>
4682
3a40d81d
NS
4683 * c-parser.c (c_parser_declaration_or_fndef): Add OpenACC
4684 routine arg.
4685 (c_parser_declaration_or_fndef): Call c_finish_oacc_routine.
4686 (c_parser_pragma): Parse 'acc routine'.
4687 (OACC_ROUTINE_CLAUSE_MARK): Define.
4688 (c_parser_oacc_routine, (c_finish_oacc_routine): New.
4689
fc402eec
AA
46902015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
4691
4692 PR debug/67192
4693 * c-typeck.c (c_finish_loop): For unconditional loops, set the
4694 location of the backward-goto to the start of the loop body.
4695
f6b0b3db
AA
46962015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
4697
4698 PR debug/67192
4699 * c-parser.c (c_parser_while_statement): Finish the loop before
4700 parsing ahead for misleading indentation.
4701 (c_parser_for_statement): Likewise.
4702
ee45a32d
EB
47032015-11-08 Eric Botcazou <ebotcazou@adacore.com>
4704
4705 * c-decl.c (finish_struct): If the structure has reverse storage
4706 order, rewrite the type of array fields with scalar component. Call
4707 maybe_apply_pragma_scalar_storage_order on entry.
4708 * c-typeck.c (build_unary_op) <ADDR_EXPR>: Remove left-overs. Issue
4709 errors on bit-fields and reverse SSO here and not...
4710 (c_mark_addressable): ...here.
4711 (output_init_element): Adjust call to initializer_constant_valid_p.
4712 (c_build_qualified_type): Propagate TYPE_REVERSE_STORAGE_ORDER.
4713
8a645150
DM
47142015-11-06 David Malcolm <dmalcolm@redhat.com>
4715
4716 * c-decl.c (warn_defaults_to): Update for change in signature
4717 of diagnostic_set_info.
4718 * c-errors.c (pedwarn_c99): Likewise.
4719 (pedwarn_c90): Likewise.
4720 * c-objc-common.c (c_tree_printer): Update for new "caret_p" param
4721 for textinfo::set_location.
4722
7a5e4956
CP
47232015-11-05 Cesar Philippidis <cesar@codesourcery.com>
4724 Thomas Schwinge <thomas@codesourcery.com>
4725 James Norris <jnorris@codesourcery.com>
4726
4727 * c-parser.c (c_parser_omp_clause_name): Add support for
4728 PRAGMA_OACC_CLAUSE_INDEPENDENT and PRAGMA_OACC_CLAUSE_TILE.
4729 (c_parser_omp_clause_default): Add is_oacc argument. Handle
4730 default(none) in OpenACC.
4731 (c_parser_oacc_shape_clause): Allow pointer variables as gang static
4732 arguments.
4733 (c_parser_oacc_clause_tile): New function.
4734 (c_parser_oacc_all_clauses): Add support for OMP_CLAUSE_DEFAULT,
4735 OMP_CLAUSE_INDEPENDENT and OMP_CLAUSE_TILE.
4736 (OACC_LOOP_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_{PRIVATE,INDEPENDENT,
4737 TILE}.
4738 (OACC_KERNELS_MASK): Add PRAGMA_OACC_CLAUSE_DEFAULT.
4739 (OACC_PARALLEL_MASK): Add PRAGMA_OACC_CLAUSE_{DEFAULT,PRIVATE,
4740 FIRSTPRIVATE}.
4741 (c_parser_omp_all_clauses): Update call to c_parser_omp_clause_default.
4742 (c_parser_oacc_update): Update the error message for missing clauses.
4743 * c-typeck.c (c_finish_omp_clauses): Add support for OMP_CLAUSE_TILE
4744 and OMP_CLAUSE_INDEPENDENT.
4745
bfcfbfa0
MP
47462015-11-05 Marek Polacek <polacek@redhat.com>
4747
4748 PR c/68090
4749 * c-parser.c (c_parser_postfix_expression_after_paren_type): Don't
4750 deal with pre-evaluation on invalid types.
4751
e01d41e5
JJ
47522015-11-05 Jakub Jelinek <jakub@redhat.com>
4753 Ilya Verbin <ilya.verbin@intel.com>
4754
4755 * c-parser.c: Include context.h and gimple-expr.h.
4756 (c_parser_omp_clause_schedule): Parse schedule modifiers, diagnose
4757 monotonic together with nonmonotonic.
4758 (c_parser_omp_for_loop): Call c_omp_check_loop_iv. Call add_stmt here.
4759 (OMP_DISTRIBUTE_CLAUSE_MASK): Add lastprivate clause.
4760 (c_parser_omp_target_data, c_parser_omp_target_enter_data,
4761 c_parser_omp_target_exit_data): Allow GOMP_MAP_ALWAYS_POINTER.
4762 (c_parser_omp_target): Likewise. Evaluate num_teams and thread_limit
4763 expressions on combined target teams before the target.
4764 (c_parser_omp_declare_target): If decl has "omp declare target" or
4765 "omp declare target link" attribute, and cgraph or varpool node already
4766 exists, then set corresponding flags. Call c_finish_omp_clauses
4767 in the parenthesized extended-list syntax case.
4768 * c-decl.c (c_decl_attributes): Don't diagnose block scope vars inside
4769 declare target.
4770 * c-typeck.c (handle_omp_array_sections_1): Allow non-zero low-bound
4771 on OMP_CLAUSE_REDUCTION array sections.
4772 (handle_omp_array_sections): Encode low-bound into the MEM_REF, either
4773 into the constant offset, or for variable low-bound using
4774 POINTER_PLUS_EXPR. For structure element based array sections use
4775 GOMP_MAP_ALWAYS_POINTER instead of GOMP_MAP_FIRSTPRIVATE_POINTER.
4776 (c_finish_omp_clauses): Drop generic_field_head, structure
4777 elements are now always mapped even as array section bases,
4778 diagnose same var in data sharing and mapping clauses. Diagnose if
4779 linear step on declare simd is neither a constant nor a uniform
4780 parameter. Look through POINTER_PLUS_EXPR for array section
4781 reductions. Diagnose the same var or function appearing multiple
4782 times on the same directive. Fix up wording for the to clause if t
4783 is neither a FUNCTION_DECL nor a VAR_DECL. Diagnose nonmonotonic
4784 modifier on kinds other than dynamic or guided or nonmonotonic
4785 modifier together with ordered clause.
4786
4bf9e5a8
TS
47872015-11-03 Thomas Schwinge <thomas@codesourcery.com>
4788 Chung-Lin Tang <cltang@codesourcery.com>
4789
4790 * c-parser.c (c_parser_omp_construct): Handle PRAGMA_OACC_ATOMIC.
4791
2adfab87
AM
47922015-10-29 Andrew MacLeod <amacleod@redhat.com>
4793
4794 * c-array-notation.c: Reorder #include's and remove duplicates.
4795 * c-aux-info.c: Likewise.
4796 * c-convert.c: Likewise.
4797 * c-decl.c: Likewise.
4798 * c-errors.c: Likewise.
4799 * c-lang.c: Likewise.
4800 * c-objc-common.c: Likewise.
4801 * c-parser.c: Likewise.
4802 * c-typeck.c: Likewise.
4803
e922069e
JW
48042015-10-26 Jim Wilson <jim.wilson@linaro.org>
4805
4806 PR debug/66068
4807 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
4808 after calling build_qualified_type.
4809
765dd391
CP
48102015-10-27 Cesar Philippidis <cesar@codesourcery.com>
4811 Thomas Schwinge <thomas@codesourcery.com>
4812 James Norris <jnorris@codesourcery.com>
4813 Joseph Myers <joseph@codesourcery.com>
4814 Julian Brown <julian@codesourcery.com>
4815 Bernd Schmidt <bschmidt@redhat.com>
4816
4817 * c-parser.c (c_parser_oacc_shape_clause): New.
4818 (c_parser_oacc_simple_clause): New.
4819 (c_parser_oacc_all_clauses): Add auto, gang, seq, vector, worker.
4820 (OACC_LOOP_CLAUSE_MASK): Add gang, worker, vector, auto, seq.
4821
88bae6f4
TS
48222015-10-27 Thomas Schwinge <thomas@codesourcery.com>
4823 James Norris <jnorris@codesourcery.com>
4824 Cesar Philippidis <cesar@codesourcery.com>
4825
4826 PR c/64765
4827 PR c/64880
4828 * c-parser.c (c_parser_oacc_loop): Add mask, cclauses formal
4829 parameters, and handle these. Adjust all users.
4830 (c_parser_oacc_kernels, c_parser_oacc_parallel): Merge functions
4831 into...
4832 (c_parser_oacc_kernels_parallel): ... this new function. Adjust
4833 all users.
4834 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels): Don't
4835 declare functions.
4836 (c_finish_omp_construct): Declare function.
4837 * c-typeck.c (c_finish_oacc_parallel, c_finish_oacc_kernels):
4838 Merge functions into...
4839 (c_finish_omp_construct): ... this new function.
4840
a8fc2579
RB
48412015-10-22 Richard Biener <rguenther@suse.de>
4842
4843 * c-typeck.c (c_finish_omp_clauses): Properly convert operands
4844 before folding a MINUS_EXPR.
4845
e9122ef6
MP
48462015-10-21 Marek Polacek <polacek@redhat.com>
4847
4848 PR c/68024
4849 * c-decl.c (start_function): Warn about vararg functions without
4850 a prototype.
4851
9f47c7e5
IE
48522015-10-21 Ilya Enkovich <enkovich.gnu@gmail.com>
4853
4854 * c-typeck.c (build_conditional_expr): Use boolean vector
4855 type for vector comparison.
4856 (build_vec_cmp): New.
4857 (build_binary_op): Use build_vec_cmp for comparison.
4858
fa60eeb9
MP
48592015-10-20 Marek Polacek <polacek@redhat.com>
4860
4861 * c-parser.c (is_cilkplus_vector_p): Don't define here.
4862
2c7020eb
MP
48632015-10-20 Marek Polacek <polacek@redhat.com>
4864
4865 PR c/67964
4866 * c-parser.c (c_parser_attributes): Break out of the loop if the
4867 token after an attribute isn't a comma.
4868
d9a6bd32
JJ
48692015-10-13 Jakub Jelinek <jakub@redhat.com>
4870 Aldy Hernandez <aldyh@redhat.com>
4871
4872 * c-parser.c (c_parser_pragma): Handle PRAGMA_OMP_ORDERED here.
4873 (c_parser_omp_clause_name): Handle OpenMP 4.5 clauses.
4874 (c_parser_omp_variable_list): Handle structure elements for
4875 map, to and from clauses. Handle array sections in reduction
4876 clause. Formatting fixes.
4877 (c_parser_omp_clause_if): Add IS_OMP argument, handle parsing of
4878 if clause modifiers.
4879 (c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
4880 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
4881 c_parser_omp_clause_defaultmap, c_parser_omp_clause_use_device_ptr,
4882 c_parser_omp_clause_is_device_ptr): New functions.
4883 (c_parser_omp_clause_ordered): Parse optional parameter.
4884 (c_parser_omp_clause_reduction): Handle array reductions.
4885 (c_parser_omp_clause_schedule): Parse optional simd modifier.
4886 (c_parser_omp_clause_nogroup, c_parser_omp_clause_orderedkind): New
4887 functions.
4888 (c_parser_omp_clause_linear): Parse linear clause modifiers.
4889 (c_parser_omp_clause_depend_sink): New function.
4890 (c_parser_omp_clause_depend): Parse source/sink depend kinds.
4891 (c_parser_omp_clause_map): Parse release/delete map kinds and
4892 optional always modifier.
4893 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_if
4894 and c_finish_omp_clauses callers.
4895 (c_parser_omp_all_clauses): Likewise. Parse OpenMP 4.5 clauses.
4896 Parse "to" as OMP_CLAUSE_TO_DECLARE if on declare target directive.
4897 (c_parser_oacc_cache): Adjust c_finish_omp_clauses caller.
4898 (OMP_CRITICAL_CLAUSE_MASK): Define.
4899 (c_parser_omp_critical): Parse critical clauses.
4900 (c_parser_omp_for_loop): Handle doacross loops, adjust
4901 c_finish_omp_for and c_finish_omp_clauses callers.
4902 (OMP_SIMD_CLAUSE_MASK): Add simdlen clause.
4903 (c_parser_omp_simd): Allow ordered clause if it has no parameter.
4904 (OMP_FOR_CLAUSE_MASK): Add linear clause.
4905 (c_parser_omp_for): Disallow ordered clause when combined with
4906 distribute. Disallow linear clause when combined with distribute
4907 and not combined with simd.
4908 (OMP_ORDERED_CLAUSE_MASK, OMP_ORDERED_DEPEND_CLAUSE_MASK): Define.
4909 (c_parser_omp_ordered): Add CONTEXT argument, remove LOC argument,
4910 parse clauses and if depend clause is found, don't parse a body.
4911 (c_parser_omp_parallel): Disallow copyin clause on target parallel.
4912 Allow target parallel without for after it.
4913 (OMP_TASK_CLAUSE_MASK): Add priority clause.
4914 (OMP_TARGET_DATA_CLAUSE_MASK): Add use_device_ptr clause.
4915 (c_parser_omp_target_data): Diagnose no map clauses or clauses with
4916 invalid kinds.
4917 (OMP_TARGET_UPDATE_CLAUSE_MASK): Add depend and nowait clauses.
4918 (OMP_TARGET_ENTER_DATA_CLAUSE_MASK,
4919 OMP_TARGET_EXIT_DATA_CLAUSE_MASK): Define.
4920 (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): New
4921 functions.
4922 (OMP_TARGET_CLAUSE_MASK): Add depend, nowait, private, firstprivate,
4923 defaultmap and is_device_ptr clauses.
4924 (c_parser_omp_target): Parse target parallel and target simd. Set
4925 OMP_TARGET_COMBINED on combined constructs. Parse target enter data
4926 and target exit data. Diagnose invalid map kinds.
4927 (OMP_DECLARE_TARGET_CLAUSE_MASK): Define.
4928 (c_parser_omp_declare_target): Parse OpenMP 4.5 forms of this
4929 construct.
4930 (c_parser_omp_declare_reduction): Use STRIP_NOPS when checking for
4931 &omp_priv.
4932 (OMP_TASKLOOP_CLAUSE_MASK): Define.
4933 (c_parser_omp_taskloop): New function.
4934 (c_parser_omp_construct): Don't handle PRAGMA_OMP_ORDERED here,
4935 handle PRAGMA_OMP_TASKLOOP.
4936 (c_parser_cilk_for): Adjust c_finish_omp_clauses callers.
4937 * c-tree.h (c_finish_omp_clauses): Add two new arguments.
4938 * c-typeck.c (handle_omp_array_sections_1): Fix comment typo.
4939 Add IS_OMP argument, handle structure element bases, diagnose
4940 bitfields, pass IS_OMP recursively, diagnose known zero length
4941 array sections in depend clauses, handle array sections in reduction
4942 clause, diagnose negative length even for pointers.
4943 (handle_omp_array_sections): Add IS_OMP argument, use auto_vec for
4944 types, pass IS_OMP down to handle_omp_array_sections_1, handle
4945 array sections in reduction clause, set
4946 OMP_CLAUSE_MAP_MAYBE_ZERO_LENGTH_ARRAY_SECTION if map could be zero
4947 length array section, use GOMP_MAP_FIRSTPRIVATE_POINTER for IS_OMP.
4948 (c_finish_omp_clauses): Add IS_OMP and DECLARE_SIMD arguments.
4949 Handle new OpenMP 4.5 clauses and new restrictions for the old ones.
4950
21ba0cea
MP
49512015-10-06 Marek Polacek <polacek@redhat.com>
4952
4953 * c-parser.c (c_parser_statement_after_labels): Use
4954 protected_set_expr_location.
4955 (c_parser_omp_clause_num_gangs): Likewise.
4956 (c_parser_omp_clause_num_threads): Likewise.
4957 (c_parser_omp_clause_num_workers): Likewise.
4958 (c_parser_omp_clause_vector_length): Likewise.
4959 (c_parser_omp_clause_num_teams): Likewise.
4960 (c_parser_omp_clause_thread_limit): Likewise.
4961 * c-typeck.c (build_c_cast): Likewise.
4962 (c_cast_expr): Likewise.
4963
624d31fe
RS
49642015-10-05 Richard Sandiford <richard.sandiford@arm.com>
4965
4966 * c-typeck.c (c_tree_equal): Use real_equal instead of
4967 REAL_VALUES_EQUAL.
4968
b8fd7909
JM
49692015-10-04 Jason Merrill <jason@redhat.com>
4970
4971 * c-parser.c (c_lex_one_token): Handle @synchronized.
4972 * c-decl.c (match_builtin_function_types): A declaration of a built-in
4973 can change whether the function is transaction_safe.
4974
1c7485af
MP
49752015-10-02 Marek Polacek <polacek@redhat.com>
4976
4977 PR c/67730
4978 * c-typeck.c (convert_for_assignment): Use the expansion point
4979 location throughout.
4980
3e3b8d63
MP
49812015-10-02 Marek Polacek <polacek@redhat.com>
4982
4983 PR c/64249
4984 * c-parser.c (c_parser_statement_after_labels): Add CHAIN parameter
4985 and pass it down to c_parser_if_statement.
4986 (c_parser_else_body): Add CHAIN parameter and pass it down to
4987 c_parser_statement_after_labels.
4988 (c_parser_if_statement): Add CHAIN parameter. Add code to warn about
4989 duplicated if-else-if conditions.
4990
aabef2de
MP
49912015-10-01 Marek Polacek <polacek@redhat.com>
4992
4993 * c-typeck.c (convert_for_assignment): Improve commentary.
4994
de8ddd5f
MP
49952015-09-30 Marek Polacek <polacek@redhat.com>
4996
4997 PR c/67730
4998 * c-typeck.c (c_finish_return): Use the expansion point location for
4999 certain "return with value" warnings.
5000
c4914de6
MLI
50012015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
5002
5003 * c-parser.c (pragma_lex): Add loc argument.
5004
0e36f5c7
MP
50052015-09-15 Marek Polacek <polacek@redhat.com>
5006
5007 PR c/67580
5008 * c-decl.c (tag_exists_p): New function.
5009 * c-parser.c (c_parser_declaration_or_fndef): Give a hint when
5010 struct/union/enum keywords are missing.
5011 * c-tree.h (tag_exists_p): Declare.
5012
2f3bb934
MP
50132015-09-15 Marek Polacek <polacek@redhat.com>
5014
5015 * c-decl.c (lookup_label): Return NULL_TREE instead of 0.
5016 (lookup_tag): Change the type of THISLEVEL_ONLY to bool.
5017 Return NULL_TREE instead of 0.
5018 (lookup_name): Return NULL_TREE instead of 0.
5019 (lookup_name_in_scope): Likewise.
5020 (shadow_tag_warned): Use true instead of 1 and NULL_TREE instead of 0.
5021 (parser_xref_tag): Use false instead of 0.
5022 (start_struct): Use true instead of 1.
5023 (start_enum): Use true instead of 1 and NULL_TREE instead of 0.
5024
aa256c4a
MP
50252015-09-14 Marek Polacek <polacek@redhat.com>
5026
5027 * c-typeck.c (set_nonincremental_init_from_string): Use
5028 HOST_WIDE_INT_M1U when shifting a negative value.
5029
dbb68221
MW
50302015-09-09 Mark Wielaard <mjw@redhat.com>
5031
5032 * c-typeck.c (build_binary_op): Check and warn when nonnull arg
5033 parm against NULL.
5034
a8a098ac
JJ
50352015-09-10 Jakub Jelinek <jakub@redhat.com>
5036
5037 PR c/67502
5038 * c-parser.c (c_parser_omp_for_loop): Emit DECL_EXPR stmts
5039 into OMP_FOR_PRE_BODY rather than before the loop.
5040
f4b189d5
JJ
50412015-09-09 Jakub Jelinek <jakub@redhat.com>
5042
0bb99c11
JJ
5043 PR c/67501
5044 * c-parser.c (c_parser_oacc_all_clauses,
5045 c_parser_omp_all_clauses): Remove invalid clause from
5046 list of clauses even if parser->error is set.
5047
fce5e5e3
JJ
5048 PR c/67500
5049 * c-parser.c (c_parser_omp_clause_aligned,
5050 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen): Fix up
5051 test for errors.
5052 * c-decl.c (temp_pop_parm_decls): Allow b->decl equal to
5053 error_mark_node.
5054
f4b189d5
JJ
5055 PR c/67495
5056 * c-parser.c (c_parser_omp_atomic): Use c_parser_cast_expression
5057 instead of c_parser_unary_expression. If the result is !lvalue_p,
5058 wrap the result of c_fully_fold into NON_LVALUE_EXPR.
5059
b2aaf235
MP
50602015-09-04 Marek Polacek <polacek@redhat.com>
5061
5062 PR sanitizer/67279
5063 * c-typeck.c (build_binary_op): Don't instrument static initializers.
5064
1807ffc1
MS
50652015-09-03 Martin Sebor <msebor@redhat.com>
5066
5067 PR c/66516
8b652e65
JJ
5068 * c-typeck.c (convert_arguments, parser_build_unary_op,
5069 build_conditional_expr, c_cast_expr, convert_for_assignment,
5070 build_binary_op, _objc_common_truthvalue_conversion): Call
1807ffc1
MS
5071 reject_gcc_builtin.
5072 (c_decl_implicit): Define.
5073
d04ff417
MP
50742015-09-02 Marek Polacek <polacek@redhat.com>
5075
5076 PR c/67432
5077 * c-parser.c (c_parser_enum_specifier): Give a better error for
5078 an empty enum.
5079
a79683d5
TS
50802015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
5081
5082 * c-aux-info.c, c-parser.c, c-tree.h: Remove useless typedefs.
5083
191a6b94
MP
50842015-08-12 Marek Polacek <polacek@redhat.com>
5085
5086 * c-decl.c (grokdeclarator): Call error_at instead of error and pass
5087 LOC to it.
5088
420a9d9b
MP
50892015-08-03 Marek Polacek <polacek@redhat.com>
5090
5091 PR c/67088
5092 * c-decl.c (check_bitfield_type_and_width): Add location parameter.
5093 Use it.
5094 (grokdeclarator): Pass LOC down to check_bitfield_type_and_width.
5095
992118a1
PP
50962015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
5097
5098 * c-parser.c (c_parser_if_body): Take token_indent_info
5099 argument. Call warn_for_misleading_indentation even when the
5100 body is a semicolon. Extract token_indent_infos corresponding
5101 to the guard, body and next tokens. Adjust call to
5102 warn_for_misleading_indentation accordingly.
5103 (c_parser_else_body): Likewise.
5104 (c_parser_if_statement): Likewise.
5105 (c_parser_while_statement): Likewise.
5106 (c_parser_for_statement): Likewise.
5107
46308474
LFSM
51082015-07-28 Luis Felipe Strano Moraes <luis.strano@gmail.com>
5109 Manuel López-Ibáñez <manu@gcc.gnu.org>
5110
5111 * c-decl.c (get_parm_info): Remove static var. Update warning
5112 message.
5113
05b28fd6
MP
51142015-07-27 Marek Polacek <polacek@redhat.com>
5115
5116 PR c++/66555
5117 PR c/54979
5118 * c-typeck.c (parser_build_binary_op): Call warn_tautological_cmp.
5119
451b5e48
MP
51202015-07-20 Marek Polacek <polacek@redhat.com>
5121
5122 PR c++/55095
5123 * c-typeck.c (digest_init): Pass OPT_Wpedantic to pedwarn_init.
5124 (build_binary_op): Warn about left shift overflows.
5125
1916bcb5
AM
51262015-07-09 Andrew MacLeod <amacleod@redhat.com>
5127
5128 * c-array-notation.c: Adjust includes for flags.h changes.
5129 * c-objc-common.c: Likewise.
5130
c7131fb2
AM
51312015-07-07 Andrew MacLeod <amacleod@redhat.com>
5132
5133 * c-array-notation.c: Adjust includes.
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
da2e71c9
MLI
51432015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
5144
5145 PR fortran/66605
5146 * c-decl.c (finish_function): Call do_warn_unused_parameter.
5147
b155cfd9
MP
51482015-06-29 Marek Polacek <polacek@redhat.com>
5149
5150 PR c/66322
5151 * c-typeck.c (struct c_switch): Add BOOL_COND_P and OUTSIDE_RANGE_P.
5152 (c_start_case): Set BOOL_COND_P and OUTSIDE_RANGE_P. Don't warn
5153 about -Wswitch-bool here.
5154 (do_case): Update c_add_case_label call.
5155 (c_finish_case): Update c_do_switch_warnings call.
5156
31521951
MP
51572015-06-27 Marek Polacek <polacek@redhat.com>
5158
5159 * c-typeck.c: Use VECTOR_TYPE_P throughout.
5160
22d03525
MP
51612015-06-26 Marek Polacek <polacek@redhat.com>
5162
5163 * c-array-notation.c (fix_builtin_array_notation_fn): Use
5164 INDIRECT_REF_P.
5165 * c-typeck.c (array_to_pointer_conversion): Likewise.
5166 (build_unary_op): Likewise.
5167 (c_finish_return): Likewise.
5168
f0889939
AM
51692015-06-25 Andrew MacLeod <amacleod@redhat.com>
5170
5171 * c-decl.c: Remove ipa-ref.h and plugin-api.h from include list.
5172 * c-parser.c: Likewise.
5173
8d67ee55
RS
51742015-06-25 Richard Sandiford <richard.sandiford@arm.com>
5175
5176 * c-decl.c (detect_field_duplicates_hash): Use nofree_ptr_hash
5177 instead of pointer_hash.
5178 (detect_field_duplicates): Likewise.
5179
0ae9bd27
MP
51802015-06-25 Marek Polacek <polacek@redhat.com>
5181
5182 * c-array-notation.c: Use VAR_P throughout.
5183 * c-decl.c: Likewise.
5184 * c-objc-common.c: Likewise.
5185 * c-parser.c: Likewise.
5186 * c-typeck.c: Likewise.
5187
62f9079a
MP
51882015-06-25 Marek Polacek <polacek@redhat.com>
5189
5190 * c-decl.c: Use is_global_var throughout.
5191 * c-parser.c: Likewise.
5192 * c-typeck.c: Likewise.
5193
abb226c9
AM
51942015-06-17 Andrew MacLeod <amacleod@redhat.com>
5195
5196 * c-array-notation.c: Do not include input.h, line-map.h or is-a.h.
5197 * c-aux-info.c: Likewise.
5198 * c-convert.c: Likewise.
5199 * c-decl.c: Likewise.
5200 * c-errors.c: Likewise.
5201 * c-lang.c: Likewise.
5202 * c-objc-common.c: Likewise.
5203 * c-parser.c: Likewise.
5204 * c-typeck.c: Likewise.
5205
8cbababc
JH
52062015-06-11 Jan Hubicka <hubicka@ucw.cz>
5207
5208 PR middle-end/66325
5209 * c-decl.c (start_enum): Set TYPE_PACKED consistently among type
5210 variants.
5211
a0349665
PMR
52122015-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
5213
5214 * c-decl.c (pop_scope): Register the main translation unit
5215 through the new debug hook.
5216
13fdf2e2
AM
52172015-06-08 Andrew MacLeod <amacleod@redhat.com>
5218
5219 * c-array-notation.c : Adjust include files.
5220 * c-aux-info.c : Likewise.
5221 * c-convert.c : Likewise.
5222 * c-decl.c : Likewise.
5223 * c-errors.c : Likewise.
5224 * c-lang.c : Likewise.
5225 * c-lang.h : Likewise.
5226 * c-objc-common.c : Likewise.
5227 * c-parser.c : Likewise.
5228 * c-typeck.c : Likewise.
5229
d7438551
AH
52302015-06-05 Aldy Hernandez <aldyh@redhat.com>
5231
5232 * c-decl.c (finish_struct): Save C_TYPE_INCOMPLETE_VARS and
5233 immediately clobber it.
5234 (c_write_global_declarations_1): Remove call to
5235 check_global_declaration_1.
5236 (c_write_global_declarations_2): Remove.
5237 (c_write_final_cleanups): Rename from c_write_global_declarations.
5238 Remove call to finalize_compilation_unit.
5239 Remove calls to debugging hooks.
5240 * c-objc-common.c: Adjust comment for c_warn_unused_global_decl.
5241 * c-objc-common.h: Remove LANG_HOOKS_WRITE_GLOBALS.
5242 * c-tree.h: Remove c_write_global_declarations.
5243
ecb9f223
AM
52442015-06-04 Andrew MacLeod <amacleod@redhat.com>
5245
5246 * c-array-notation.c: Adjust includes for restructured coretypes.h.
5247 * c-aux-info.c: Likewise.
5248 * c-convert.c: Likewise.
5249 * c-decl.c: Likewise.
5250 * c-errors.c: Likewise.
5251 * c-lang.c: Likewise.
5252 * c-objc-common.c: Likewise.
5253 * c-parser.c: Likewise.
5254 * c-typeck.c: Likewise.
5255
9482b620
MP
52562015-06-04 Marek Polacek <polacek@redhat.com>
5257
5258 PR c/66341
5259 * c-typeck.c (build_c_cast): Wrap VALUE into NON_LVALUE_EXPR if
5260 it is a lvalue.
5261
bc51ace3
PK
52622015-06-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
5263
5264 * c-decl.c (warn_cxx_compat_finish_struct): New parameters code, record_loc.
5265 Warn for empty struct.
5266 (finish_struct): Pass TREE_CODE(t) and loc to warn_cxx_compat_finish_struct.
5267
ea5b45b6
AT
52682015-06-02 Andres Tiraboschi <andres.tiraboschi@tallertechnologies.com>
5269
5270 * c-decl.c (start_function): Call plugin before parsing.
5271 (finish_function): Call plugin after parsing.
5272
c2d47482
PK
52732015-06-02 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
5274
5275 PR c/49551
5276 * c-decl.c (merge_decls): Merge DECL_COMMON.
5277
a95492ab
JW
52782015-05-22 Jim Wilson <jim.wilson@linaro.org>
5279
5280 * Make-lang.in (check_gcc_pallelize): Define.
5281
fd5c817a
MP
52822015-05-22 Marek Polacek <polacek@redhat.com>
5283
5284 PR c/47043
5285 * c-parser.c (c_parser_enum_specifier): Parse and apply enumerator
5286 attributes.
5287
c7b70a3c
MP
52882015-05-21 Marek Polacek <polacek@redhat.com>
5289
5290 * c-typeck.c (inform_declaration): Use DECL_IS_BUILTIN instead of
5291 DECL_BUILT_IN.
5292
21b634ae
MP
52932015-05-20 Marek Polacek <polacek@redhat.com>
5294
5295 * c-decl.c: Use VAR_OR_FUNCTION_DECL_P throughout.
5296 * c-typeck.c: Likewise.
5297
296a8c2f
MP
52982015-05-19 Marek Polacek <polacek@redhat.com>
5299
5300 * c-typeck.c (start_init): Use AGGREGATE_TYPE_P.
5301
41b37d5e
JJ
53022015-05-19 Jakub Jelinek <jakub@redhat.com>
5303
5304 PR middle-end/66199
5305 * c-parser.c (c_parser_omp_for_loop): Don't add
5306 OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
5307 OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
5308 (c_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
5309 constructs.
5310
fab27f52
MM
53112015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
5312
5313 * c-typeck.c (build_array_ref): Use std::swap instead of explicit
296a8c2f 5314 swaps.
fab27f52 5315
40de31cf
MLI
53162015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
5317
5318 PR fortran/44054
5319 * c-objc-common.c (c_tree_printer): Replace locus pointer with
5320 accessor function.
5321
3aa3c9fc
MP
53222015-05-14 Marek Polacek <polacek@redhat.com>
5323
5324 PR c/66066
5325 PR c/66127
5326 * c-typeck.c (digest_init): Call pedwarn_init with OPT_Wpedantic
5327 rather than with 0.
5328
c3388e62
DM
53292015-05-12 David Malcolm <dmalcolm@redhat.com>
5330
5331 * c-parser.c (c_parser_if_body): Add param "if_loc", use it
5332 to add a call to warn_for_misleading_indentation.
5333 (c_parser_else_body): Likewise, adding param "else_loc".
5334 (c_parser_if_statement): Check for misleading indentation.
5335 (c_parser_while_statement): Likewise.
5336 (c_parser_for_statement): Likewise.
5337
755e528f
MP
53382015-05-08 Marek Polacek <polacek@redhat.com>
5339
5340 PR c/64918
5341 * c-typeck.c (add_pending_init): Use OPT_Woverride_init_side_effects.
5342 (output_init_element): Likewise.
5343
0173bd2a
MP
53442015-05-07 Marek Polacek <polacek@redhat.com>
5345
5346 PR c/65179
5347 * c-typeck.c (build_binary_op): Warn when left shifting a negative
5348 value.
5349
9babc352
MP
53502015-04-30 Marek Polacek <polacek@redhat.com>
5351
5352 * c-typeck.c (set_init_label): Call error_at instead of error and
5353 pass LOC to it.
5354
ac9f18db
MP
5355 * c-typeck.c (c_incomplete_type_error): Refactor to use %qT. Print
5356 the type of a decl.
5357
ec3fba51
MP
5358 * c-typeck.c (c_build_va_arg): Clarify the error message.
5359
b811915d
TS
53602015-04-29 Thomas Schwinge <thomas@codesourcery.com>
5361
5362 * c-parser.c (c_parser_oacc_enter_exit_data): Use
5363 OMP_STANDALONE_CLAUSES.
5364
f3075008
MP
53652015-04-28 Marek Polacek <polacek@redhat.com>
5366
5367 * c-parser.c (c_parser_binary_expression): Remove duplicate line.
5368
4e81b788
MP
53692015-04-28 Marek Polacek <polacek@redhat.com>
5370
5371 PR c/65901
5372 * c-typeck.c (c_build_va_arg): Require TYPE be a complete type.
5373
6c1db78e
MP
53742015-04-25 Marek Polacek <polacek@redhat.com>
5375
5376 PR c/52085
5377 * c-decl.c (finish_enum): Copy over TYPE_ALIGN. Also check for "mode"
5378 attribute.
5379
5c4abbb8
MP
53802015-04-23 Marek Polacek <polacek@redhat.com>
5381
5382 PR c/65345
5383 * c-decl.c (set_labels_context_r): New function.
5384 (store_parm_decls): Call it via walk_tree_without_duplicates.
5385 * c-typeck.c (convert_lvalue_to_rvalue): Use create_tmp_var_raw
5386 instead of create_tmp_var. Build TARGET_EXPR instead of
5387 COMPOUND_EXPR.
5388 (build_atomic_assign): Use create_tmp_var_raw instead of
5389 create_tmp_var. Build TARGET_EXPRs instead of MODIFY_EXPR.
5390
06aca1d5
IV
53912015-04-20 Ilya Verbin <ilya.verbin@intel.com>
5392
5393 * c-parser.c (c_parser_oacc_enter_exit_data): Remove excess semicolon.
5394 (c_parser_omp_target_update): Add missed %> to error_at ().
5395
8fba1830
BRF
53962015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
5397
5398 PR target/55143
5399 * c-decl.c (c_default_pointer_mode): Remove definition.
5400 * c-tree.h (c_default_pointer_mode): Remove declaration.
5401
62021f64
TB
54022015-03-27 Tobias Burnus <burnus@net-b.de>
5403
5404 PR c/65586
5405 * c-parser.c (c_parser_skip_to_pragma_eol): Optionally, don't
5406 error out.
5407 (c_parser_omp_for, c_parser_omp_parallel, c_parser_omp_distribute,
5408 c_parser_omp_teams, c_parser_omp_target, c_parser_omp_declare):
5409 Update calls to not error for skipped omp pragmas with -fopenmp-simd.
5410
9b65e171
JJ
54112015-03-19 Jakub Jelinek <jakub@redhat.com>
5412
5413 * c-decl.c (c_decl_attributes): Also add "omp declare target"
5414 attribute for DECL_EXTERNAL VAR_DECLs.
5415
17958621
JJ
54162015-03-11 Jakub Jelinek <jakub@redhat.com>
5417
5418 * c-parser.c (c_parse_init): Don't call xstrdup on get_identifier
5419 argument.
5420
7ccb1a11
JJ
54212015-03-10 Jakub Jelinek <jakub@redhat.com>
5422
5423 PR c/65120
5424 * c-typeck.c (parser_build_binary_op): Check for tcc_comparison
5425 before preparing arguments to warn_logical_not_parentheses.
5426
01177669
JJ
54272015-03-09 Jakub Jelinek <jakub@redhat.com>
5428
5429 PR c/65120
5430 * c-typeck.c (parser_build_binary_op): Don't warn for
5431 !!x == y or !b == y where b is _Bool.
5432
802ac282
MP
54332015-03-09 Marek Polacek <polacek@redhat.com>
5434
5435 * c-convert.c (convert): Make use of do_ubsan_in_current_function.
5436 * c-decl.c (grokdeclarator): Likewise.
5437 * c-typeck.c (build_binary_op): Likewise.
5438
e5165b60
MP
54392015-02-27 Marek Polacek <polacek@redhat.com>
5440
5441 PR c/65228
5442 * c-decl.c (start_decl): Return NULL_TREE if decl is an error node.
5443
065d214c
MP
54442015-02-14 Marek Polacek <polacek@redhat.com>
5445
5446 PR c/64768
5447 * c-decl.c (grokdeclarator): Set the range of a flexible array member
5448 declared through a typedef name.
5449
e5d9235b
MP
54502015-02-13 Marek Polacek <polacek@redhat.com>
5451
5452 PR c/65050
5453 * c-decl.c (grokdeclarator): Print also the type when giving
5454 the error message about array's incomplete element type.
5455
fa01ffcc
JJ
54562015-02-11 Jakub Jelinek <jakub@redhat.com>
5457
5458 PR c/64824
5459 * c-parser.c (c_parser_binary_expression): Fix OpenMP stack[sp].prec
5460 check in the POP macro.
5461
c3e38a03
MP
54622015-02-09 Marek Polacek <polacek@redhat.com>
5463
5464 PR c/64856
5465 * c-typeck.c (process_init_element): Don't always wrap
5466 COMPOUND_LITERAL_EXPR in a SAVE_EXPR in C99 mode when
5467 initializing a range of elements.
5468
4886ec8e
JJ
54692015-02-04 Jakub Jelinek <jakub@redhat.com>
5470
5471 PR c/64824
5472 PR c/64868
5473 * c-parser.c (c_parser_omp_atomic): Handle RDIV_EXPR.
5474
c3e38a03 54752015-02-02 Bruno Loff <bruno.loff@gmail.com>
a4bb6959
BL
5476
5477 * c-parser.c (c_parser_declspecs): Call invoke_plugin_callbacks after
5478 processing enum declaration.
5479
7b33f0c8
MP
54802015-01-29 Marek Polacek <polacek@redhat.com>
5481
5482 PR c/64709
5483 * c-typeck.c (pop_init_level): If constructor_elements has
5484 exactly one element with integer_zerop value, set constructor_zeroinit
5485 to 1. Remove braces around warning_init call.
5486
dea63e49
JJ
54872015-01-27 Jakub Jelinek <jakub@redhat.com>
5488
5489 PR c/64766
5490 * c-typeck.c (store_init_value): Don't overwrite DECL_INITIAL
5491 of FUNCTION_DECLs with error_mark_node.
5492
d38f7dce
JJ
54932015-01-26 Jakub Jelinek <jakub@redhat.com>
5494
5495 PR c/64778
5496 * c-typeck.c (convert_arguments): Return -1 if there are
5497 error_args, even if we've diagnosed too many arguments.
5498
cbf5d0e7
RB
54992015-01-21 Richard Biener <rguenther@suse.de>
5500
5501 PR middle-end/64313
5502 * c-decl.c (merge_decls): Call set_builtin_decl_declared_p
5503 for builtins the user declared correctly.
5504
41dbbb37
TS
55052015-01-15 Thomas Schwinge <thomas@codesourcery.com>
5506 Bernd Schmidt <bernds@codesourcery.com>
5507 Cesar Philippidis <cesar@codesourcery.com>
5508 James Norris <jnorris@codesourcery.com>
5509 Jakub Jelinek <jakub@redhat.com>
5510 Ilmir Usmanov <i.usmanov@samsung.com>
5511
5512 * c-parser.c: Include "gomp-constants.h".
5513 (c_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
5514 omp_clause_map_kind. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
5515 Use OMP_CLAUSE_SET_MAP_KIND.
5516 (c_parser_pragma): Handle PRAGMA_OACC_ENTER_DATA,
5517 PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_UPDATE.
5518 (c_parser_omp_construct): Handle PRAGMA_OACC_CACHE,
5519 PRAGMA_OACC_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP,
5520 PRAGMA_OACC_PARALLEL, PRAGMA_OACC_WAIT.
5521 (c_parser_omp_clause_name): Handle "auto", "async", "copy",
5522 "copyout", "create", "delete", "deviceptr", "gang", "host",
5523 "num_gangs", "num_workers", "present", "present_or_copy", "pcopy",
5524 "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
5525 "present_or_create", "pcreate", "seq", "self", "vector",
5526 "vector_length", "wait", "worker".
5527 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
5528 (OACC_ENTER_DATA_CLAUSE_MASK, OACC_EXIT_DATA_CLAUSE_MASK)
5529 (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
5530 (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
5531 (c_parser_omp_variable_list): Handle OMP_CLAUSE__CACHE_.
5532 (c_parser_oacc_wait_list, c_parser_oacc_data_clause)
5533 (c_parser_oacc_data_clause_deviceptr)
5534 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_workers)
5535 (c_parser_oacc_clause_async, c_parser_oacc_clause_wait)
5536 (c_parser_omp_clause_vector_length, c_parser_oacc_all_clauses)
5537 (c_parser_oacc_cache, c_parser_oacc_data, c_parser_oacc_kernels)
5538 (c_parser_oacc_enter_exit_data, c_parser_oacc_loop)
5539 (c_parser_oacc_parallel, c_parser_oacc_update)
5540 (c_parser_oacc_wait): New functions.
5541 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels)
5542 (c_finish_oacc_data): New prototypes.
5543 * c-typeck.c: Include "gomp-constants.h".
5544 (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR. Use
5545 GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use
5546 OMP_CLAUSE_SET_MAP_KIND.
5547 (c_finish_oacc_parallel, c_finish_oacc_kernels)
5548 (c_finish_oacc_data): New functions.
5549 (c_finish_omp_clauses): Handle OMP_CLAUSE__CACHE_,
5550 OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS,
5551 OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_ASYNC, OMP_CLAUSE_WAIT,
5552 OMP_CLAUSE_AUTO, OMP_CLAUSE_SEQ, OMP_CLAUSE_GANG,
5553 OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR, and OMP_CLAUSE_MAP's
5554 GOMP_MAP_FORCE_DEVICEPTR.
5555
adfac8df
JJ
55562015-01-09 Michael Collison <michael.collison@linaro.org>
5557
5558 * c-array-notation.c: Include hash-set.h, machmode.h,
5559 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
5560 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
5561 * c-aux-info.c: Ditto.
5562 * c-convert.c: Ditto.
5563 * c-decl.c: Ditto.
5564 * c-errors.c: Ditto.
5565 * c-lang.c: Dittoxs.
5566 * c-objc-common.c: Ditto.
5567 * c-parser.c: Ditto.
5568 * c-typeck.c: Include hash-set.h, machmode.h,
5569 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
5570 fold-const.h, wide-int.h, inchash.h, real.h and
5571 fixed-value.h due to flattening of tree.h.
5572
2cc901dc
MP
55732015-01-07 Marek Polacek <polacek@redhat.com>
5574
5575 PR c/64417
5576 * c-typeck.c (process_init_element): Disallow initialization of
5577 a flexible array member with a string constant if the structure
5578 is in an array.
5579
5624e564
JJ
55802015-01-05 Jakub Jelinek <jakub@redhat.com>
5581
e5341100
JJ
5582 PR sanitizer/64344
5583 * c-typeck.c (convert_for_assignment, c_finish_return): For
5584 -fsanitize=float-cast-overflow casts from REAL_TYPE to integer/enum
5585 types also set in_late_binary_op around convert call.
5586 * c-convert.c (convert): For -fsanitize=float-cast-overflow REAL_TYPE
5587 to integral type casts, if not in_late_binary_op, pass c_fully_fold
5588 result on expr as last argument to ubsan_instrument_float_cast,
5589 if in_late_binary_op, don't use c_save_expr but save_expr.
5590
5624e564
JJ
5591 Update copyright years.
5592
5bd012f8
MP
55932015-01-05 Marek Polacek <polacek@redhat.com>
5594
5595 PR c/64423
5596 * c-typeck.c (build_array_ref): Pass loc down to
5597 warn_array_subscript_with_type_char.
5598
3f8257db 55992014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
768952be
MU
5600
5601 * c-typeck.c: New behavious for pointers to arrays with qualifiers
8e745a17 5602 (common-pointer-type): For pointers to arrays take qualifiers from
768952be 5603 element type.
8e745a17 5604 (build_conditional_expr): Add warnings for lost qualifiers.
768952be 5605 (comp-target-types): Allow pointers to arrays with different qualifiers.
8e745a17 5606 (convert-for-assignment): Adapt warnings for discarded qualifiers. Add
768952be 5607 WARNING_FOR_QUALIFIERS macro and rename WARN_FOR_QUALIFIERS
8e745a17 5608 to PEDWARN_FOR_QUALIFIERS.
768952be 5609
8f94a8c4
JJ
56102014-12-17 Jakub Jelinek <jakub@redhat.com>
5611
5612 PR sanitizer/64289
5613 * c-convert.c: Include ubsan.h.
5614 (convert): For real -> integral casts and
5615 -fsanitize=float-cast-overflow don't call convert_to_integer, but
5616 instead instrument the float cast directly.
5617
b731b390
JJ
56182014-11-29 Jakub Jelinek <jakub@redhat.com>
5619
5620 * c-typeck.c (convert_lvalue_to_rvalue, build_atomic_assign,
5621 c_finish_stmt_expr): Remove NULL last argument from
5622 create_tmp_var_raw and create_tmp_var calls.
5623 * c-array-notation.c (fix_builtin_array_notation_fn,
5624 build_array_notation_expr, fix_conditional_array_notations_1,
5625 fix_array_notation_expr, fix_array_notation_call_expr): Likewise.
5626
541e35a6
MP
56272014-11-28 Marek Polacek <polacek@redhat.com>
5628
5629 PR c/63862
5630 * c-typeck.c (build_binary_op) <RSHIFT_EXPR, LSHIFT_EXPR>: Don't
5631 convert the right operand to integer type.
5632
b286be94
MP
56332014-11-25 Marek Polacek <polacek@redhat.com>
5634
5635 PR c/63877
5636 * c-decl.c (start_function): Disable -Wmissing-declarations warning
5637 for inline functions.
5638
aa7da51a
JJ
56392014-11-21 Jakub Jelinek <jakub@redhat.com>
5640
5641 PR target/63764
5642 * c-typeck.c (build_array_ref): Adjust
5643 convert_vector_to_pointer_for_subscript caller. If it returns true,
5644 call non_lvalue_loc on the result.
5645
d876207f
RB
56462014-11-11 Richard Biener <rguenther@suse.de>
5647
5648 * c-decl.c (c_init_decl_processing): Do not set pedantic_lvalues
5649 to true.
5650
e5e44252
AK
56512014-11-10 Andi Kleen <ak@linux.intel.com>
5652
5653 PR c/60804
5654 * c-parser.c (c_parser_statement_after_labels): Call
5655 check_no_cilk.
5656 (c_parser_if_statement): Dito.
5657 (c_parser_switch_statement): Dito.
5658 (c_parser_while_statement): Dito.
5659 (c_parser_do_statement): Dito.
5660 (c_parser_for_statement): Dito.
5661 * c-typeck.c (c_finish_loop): Dito.
5662
13c21655
PC
56632014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
5664
5665 * c-typeck.c (build_binary_op): Use OPT_Wshift_count_negative and
5666 OPT_Wshift_count_overflow in the warnings.
5667
2d51fcef
MP
56682014-10-30 Marek Polacek <polacek@redhat.com>
5669
5670 * c-objc-common.c (c_tree_printer) <case 'T'>: For a typedef name,
5671 print the stripped version as well, if they're not the same.
5672
ef4bddc2
RS
56732014-10-29 Richard Sandiford <richard.sandiford@arm.com>
5674
5675 * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from
5676 machine_mode.
5677
c582198b
AM
56782014-10-28 Andrew MacLeod <amacleod@redhat.com>
5679
5680 * c-decl.c: Adjust include files.
5681 * c-parser.c: Ditto.
5682
ddc8de03
PM
56832014-10-27 Phil Muldoon <pmuldoon@redhat.com>
5684 Tom Tromey <tromey@redhat.com>
5685
5686 * c-tree.h (enum c_oracle_request): New.
5687 (c_binding_oracle_function): New typedef.
5688 (c_binding_oracle, c_pushtag, c_bind): Declare.
5689 * c-decl.c (c_binding_oracle): New global.
5690 (I_SYMBOL_CHECKED): New macro.
5691 (i_symbol_binding): New function.
5692 (I_SYMBOL_BINDING, I_SYMBOL_DECL): Redefine.
5693 (I_TAG_CHECKED): New macro.
5694 (i_tag_binding): New function.
5695 (I_TAG_BINDING, I_TAG_DECL): Redefine.
5696 (I_LABEL_CHECKED): New macro.
5697 (i_label_binding): New function.
5698 (I_LABEL_BINDING, I_LABEL_DECL): Redefine.
5699 (c_print_identifier): Save and restore c_binding_oracle.
5700 (c_pushtag, c_bind): New functions.
5701
60393bbc
AM
57022014-10-27 Andrew MacLeod <amacleod@redhat.com>
5703
5704 * c-typeck.c: Adjust include files.
5705
d723bb7c
MLI
57062014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
5707
5708 PR c++/53061
5709 * c-objc-common.c (c_objc_common_init): Do not do diagnostics
5710 initialization here...
5711 (c_initialize_diagnostics): ... but here. Set defaults after
5712 building pretty-printer.
5713
1bc5a451
MP
57142014-10-23 Marek Polacek <polacek@redhat.com>
5715
5716 PR c/63626
5717 * c-decl.c (pop_scope): Don't print warning in external_scope.
5718
4435bb92
MP
57192014-10-19 Marek Polacek <polacek@redhat.com>
5720
5721 PR c/63567
5722 * c-typeck.c (output_init_element): Allow initializing objects with
5723 static storage duration with compound literals even in C99 and add
5724 pedwarn for it.
5725
7278465e
MP
57262014-10-17 Marek Polacek <polacek@redhat.com>
5727
5728 PR c/63567
5729 * c-typeck.c (digest_init): Allow initializing objects with static
5730 storage duration with compound literals even in C99 and add pedwarn
5731 for it.
5732
d9b7be2e
MP
57332014-10-17 Marek Polacek <polacek@redhat.com>
5734
5735 PR c/63543
5736 * c-tree.h (C_TYPE_ERROR_REPORTED): Define.
5737 * c-typeck.c (build_indirect_ref): Don't print the "dereferencing..."
5738 error multiple times. Print the type.
5739
f406ae1f
MP
57402014-10-17 Marek Polacek <polacek@redhat.com>
5741
5742 PR c/63549
5743 * c-typeck.c (build_array_ref): Bail if the index in an incomplete
5744 type.
5745
92574c7c
MP
57462014-10-17 Marek Polacek <polacek@redhat.com>
5747
5748 * c-decl.c (grokdeclarator): Use OPT_Wimplicit_int unconditionally.
5749 (start_function): Use OPT_Wimplicit_int instead of 0.
5750 (store_parm_decls_oldstyle): Likewise.
5751
1bc4a978
MT
57522014-10-17 Alan Modra <amodra@gmail.com>
5753
5754 PR middle-end/61848
5755 * c-decl.c (merge_decls): Don't merge section name or tls model
5756 to newdecl symtab node, instead merge to olddecl. Override
5757 existing olddecl section name. Set tls_model for all thread-local
5758 vars, not just OMP thread-private ones. Remove incorrect comment.
5759
83685514
AM
57602014-10-16 Andrew MacLeod <amacleod@redhat.com>
5761
5762 * c-decl.c: Adjust include files.
5763
78a7c317
DD
57642014-10-14 DJ Delorie <dj@redhat.com>
5765
5766 * c-parser.c (c_parse_init): Add RID entries for each __intN.
5767 (c_token_starts_typename): Check all __intN, not just __int128.
5768 (c_token_starts_declspecs): Likewise.
5769 (c_parser_declspecs): Likewise.
5770 (c_parser_attribute_any_word): Likewise.
5771 (c_parser_objc_selector): Likewise.
5772 * c-tree.h (c_typespec_keyword): cts_int128 -> cts_int_n.
5773 (struct c_declspecs): Add int_n_idx field to record *which* __intN
5774 is specified.
5775 * c-decl.c (declspecs_add_type): Check for all __intN, not just
5776 __int128.
5777 (finish_declspecs): Likewise.
5778
74d98c1e
AB
57792014-10-13 Anthony Brandon <anthony.brandon@gmail.com>
5780
8e745a17 5781 * c-parser.c (c_parser_all_labels): New function to replace
74d98c1e 5782 the duplicate code.
8e745a17 5783 (c_parser_statement): Call the new function.
74d98c1e 5784
84937de2
MP
57852014-10-09 Marek Polacek <polacek@redhat.com>
5786
5787 PR c/63480
5788 * c-typeck.c (pop_init_level): Don't warn about initializing
5789 with { }.
5790
0382aaa0
MP
57912014-10-07 Marek Polacek <polacek@redhat.com>
5792
5793 PR c/59717
5794 * c-decl.c (header_for_builtin_fn): New function.
5795 (implicitly_declare): Suggest which header to include.
5796
7a0ca710
MP
57972014-10-07 Marek Polacek <polacek@redhat.com>
5798
5799 * c-convert.c (convert): Use error_operand_p.
5800 * c-typeck.c (require_complete_type): Likewise.
5801 (really_atomic_lvalue): Likewise.
5802 (digest_init): Likewise.
5803 (handle_omp_array_sections_1): Likewise.
5804
6bc8a126
MP
58052014-10-03 Marek Polacek <polacek@redhat.com>
5806
5807 PR c/63453
5808 * c-decl.c (pop_scope): Don't warn about "inline function declared
5809 but never defined" for functions marked with gnu_inline attribute.
5810
d90c0a59
JJ
58112014-09-25 Jakub Jelinek <jakub@redhat.com>
5812
5813 PR c++/63249
5814 * c-parser.c (c_parser_omp_variable_list): Call mark_exp_read
5815 on low_bound and length.
5816
083e891e
MP
58172014-09-24 Marek Polacek <polacek@redhat.com>
5818
5819 PR c/61405
5820 PR c/53874
5821 * c-parser.c: Don't define CPP_KEYWORD.
5822 (c_parser_switch_statement): Pass original type to c_finish_case.
5823 * c-tree.h (c_finish_case): Update declaration.
5824 * c-typeck.c (c_finish_case): Add TYPE parameter. Pass it
5825 conditionally to c_do_switch_warnings.
5826
8d95fe25
MP
58272014-09-03 Marek Polacek <polacek@redhat.com>
5828
5829 PR c/62024
5830 * c-parser.c (c_parser_static_assert_declaration_no_semi): Strip no-op
5831 conversions.
5832
9a771876
JJ
58332014-09-02 Jakub Jelinek <jakub@redhat.com>
5834 Balaji V. Iyer <balaji.v.iyer@intel.com>
5835 Igor Zamyatin <igor.zamyatin@intel.com>
5836
5837 * c-parser.c (c_parser_cilk_for): New function.
5838 (c_parser_cilk_grainsize): Likewise.
5839 (c_get_temp_regvar): Likewise.
5840 (c_parser_statement_after_labels): Added RID_CILK_FOR case.
5841 (c_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
5842 (c_parser_omp_for_loop): Added CILK_FOR and CILK_SIMD checks.
5843 * c-typeck.c (c_finish_omp_clauses): Added OMP_CLAUSE__CILK_FOR_COUNT_
5844 case.
5845
b7679d96
CG
58462014-08-27 Chen Gang <gang.chen.5i5j@gmail.com>
5847
5848 * c-aux-info.c (gen_type): Resize 'buff' from 10 to 23 bytes,
5849 with using HOST_WIDE_INT without truncation to 'int'
5850
59ea0364
MP
58512014-08-22 Marek Polacek <polacek@redhat.com>
5852
5853 PR c++/62199
5854 * c-typeck.c (parser_build_binary_op): Adjust call to
5855 warn_logical_not_parentheses.
5856
671a475e
IZ
58572014-08-22 Igor Zamyatin <igor.zamyatin@intel.com>
5858
5859 PR other/62008
5860 * c-parser.c (c_parser_array_notation): Check for correct
5861 type of an array added.
5862
04159acf
MP
58632014-08-19 Marek Polacek <polacek@redhat.com>
5864
5865 PR c++/62153
5866 * c-typeck.c (build_binary_op): If either operand of a comparison
5867 is a boolean expression, call maybe_warn_bool_compare.
5868
c77935ee
PP
58692014-08-19 Patrick Palka <ppalka@gcc.gnu.org>
5870
5871 PR c/45584
5872 * c-typeck.c (build_c_cast): Do a conversion even when the
5873 TYPE_MAIN_VARIANTs are the same.
5874
35aff4fb
MP
58752014-08-19 Marek Polacek <polacek@redhat.com>
5876
5877 * c-decl.c (diagnose_mismatched_decls): Unconditionally call
5878 pedwarn_c99 instead of pedwarn.
5879 (grokfield): Likewise.
5880 (warn_defaults_to): New function.
5881 (grokdeclarator): Call warn_defaults_to instead of pedwarn_c99.
5882 Unconditionally call pedwarn_c99 instead of pedwarn.
5883 (start_function): Call warn_defaults_to instead of pedwarn_c99.
5884 (declspecs_add_scspec): Call pedwarn_c99 instead of pedwarn, don't
5885 check flag_isoc11 before.
5886 * c-errors.c (pedwarn_c99): Change the return type to bool.
5887 Handle -Wc99-c11-compat.
5888 * c-parser.c (disable_extension_diagnostics): Handle
5889 warn_c99_c11_compat.
5890 (restore_extension_diagnostics): Likewise.
5891 (c_parser_static_assert_declaration_no_semi): Call pedwarn_c99
5892 instead of pedwarn, don't check flag_isoc11 before.
5893 (c_parser_declspecs): Likewise.
5894 (c_parser_alignas_specifier): Likewise.
5895 (c_parser_alignof_expression): Likewise.
5896 (c_parser_generic_selection): Likewise.
5897 * c-tree.h (pedwarn_c99): Update declaration.
5898 * c-typeck.c (c_finish_return): Call pedwarn or warning_at instead
5899 of pedwarn_c99.
5900
177cce46
MP
59012014-08-19 Marek Polacek <polacek@redhat.com>
5902
5903 * c-decl.c (warn_variable_length_array): Pass OPT_Wvla unconditionally
5904 to pedwarn_c90.
5905 * c-errors.c: Include "opts.h".
5906 (pedwarn_c90): Rewrite to handle -Wno-c90-c99-compat better.
5907 * c-parser.c (disable_extension_diagnostics): Handle negative value
5908 of warn_c90_c99_compat, too.
5909 (restore_extension_diagnostics): Likewise.
5910 (c_parser_compound_statement_nostart): Pass
5911 OPT_Wdeclaration_after_statement unconditionally to pedwarn_c90.
5912
6dc99c33
MP
59132014-08-12 Marek Polacek <polacek@redhat.com>
5914
5915 * c-parser.c (c_parser_postfix_expression) <case RID_FUNCTION_NAME>:
5916 Add pedwarn.
5917 (c_parser_postfix_expression) <case RID_PRETTY_FUNCTION_NAME>:
5918 Likewise.
5919 (c_parser_postfix_expression) <case RID_C99_FUNCTION_NAME>: Likewise.
5920
3f8257db 59212014-08-10 Marek Polacek <polacek@redhat.com>
f3bede71
MP
5922
5923 PR c/51849
5924 * c-decl.c (build_array_declarator): Remove check for !flag_isoc99.
5925 Call pedwarn_c90 instead of pedwarn.
5926 (check_bitfield_type_and_width): Likewise.
5927 (declspecs_add_qual): Likewise.
5928 (declspecs_add_type): Likewise.
5929 (warn_variable_length_array): Unify function for -pedantic and -Wvla.
5930 Adjust to only call pedwarn_c90.
5931 (grokdeclarator): Remove pedantic && !flag_isoc99 check. Call
5932 pedwarn_c90 instead of pedwarn.
5933 * c-errors.c (pedwarn_c90): Handle -Wc90-c99-compat.
5934 * c-parser.c (disable_extension_diagnostics): Handle
5935 warn_c90_c99_compat.
5936 (restore_extension_diagnostics): Likewise.
5937 (c_parser_enum_specifier): Remove check for !flag_isoc99. Call
5938 pedwarn_c90 instead of pedwarn.
5939 (c_parser_initelt): Likewise.
5940 (c_parser_postfix_expression): Likewise.
5941 (c_parser_postfix_expression_after_paren_type): Likewise.
5942 (c_parser_compound_statement_nostart): Remove check for !flag_isoc99.
5943 * c-tree.h: Fix formatting.
5944 * c-typeck.c (build_array_ref): Remove check for !flag_isoc99. Call
5945 pedwarn_c90 instead of pedwarn.
5946
9f25a338
TS
59472014-08-07 Trevor Saunders <tsaunders@mozilla.com>
5948
5949 * c-typeck.c: Remove include of pointer-set.h.
5950
044331a8
MP
59512014-08-07 Marek Polacek <polacek@redhat.com>
5952
5953 * c-typeck.c (pointer_diff): Remove P - (P + CST) optimization.
5954
b787e7a2
TS
59552014-08-02 Trevor Saunders <tsaunders@mozilla.com>
5956
5957 * c-typeck.c: Use hash_map instead of pointer_map.
5958
6e2830c3
TS
59592014-08-02 Trevor Saunders <tsaunders@mozilla.com>
5960
5961 * c-decl.c: Use hash_set instead of pointer_set.
5962
a7ee52fb
IZ
59632014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
5964
5965 PR middle-end/61455
5966 * c-array-notation.c (expand_array_notations): Handling
5967 of DECL_EXPR added.
5968
b4dfdc11
MG
59692014-07-31 Marc Glisse <marc.glisse@inria.fr>
5970
5971 PR c++/60517
5972 * c-typeck.c (c_finish_return): Return 0 instead of the address of
5973 a local variable.
5974
976d5a22
TT
59752014-07-30 Tom Tromey <tromey@redhat.com>
5976
5977 * c-typeck.c (struct constructor_stack) <designator_depth>: New
5978 field.
5979 (really_start_incremental_init, push_init_level): Initialize
5980 designator_depth.
5981 (pop_init_level): Set global designator_depth.
5982 (process_init_element): Check for designated_init attribute.
5983
30281de2
MP
59842014-07-20 Marek Polacek <polacek@redhat.com>
5985
5986 PR c/61852
5987 * c-decl.c (implicit_decl_warning): Add location_t parameter. Use it.
5988 (implicitly_declare): Pass location to implicit_decl_warning.
5989
b108f48f
JJ
59902014-07-14 Jakub Jelinek <jakub@redhat.com>
5991
5992 PR middle-end/61294
5993 * c-parser.c (c_parser_expr_list): Add new argument literal_zero_mask.
5994 If non-NULL, call c_parser_check_literal_zero.
5995 (c_parser_check_literal_zero): New function.
5996 (c_parser_postfix_expression_after_primary): Adjust
5997 c_parser_expr_list caller, handle -Wmemset-transposed-args.
5998
773ec47f
MP
59992014-07-06 Marek Polacek <polacek@redhat.com>
6000
6001 PR c/6940
6002 * c-decl.c (grokdeclarator): Set C_ARRAY_PARAMETER.
6003 * c-tree.h (C_ARRAY_PARAMETER): Define.
6004 * c-typeck.c (c_expr_sizeof_expr): Warn when using sizeof on an array
6005 function parameter.
6006
22e1cf1c 60072014-07-02 Jan Hubicka <hubicka@ucw.cz>
3f8257db 6008 Chen Gang <gang.chen.5i5j@gmail.com>
22e1cf1c
JH
6009
6010 * c-decl.c (duplicate_decls): CLear DECL_STRUCT_FUNCTION before
6011 releasing symbol.
6012
52ec0ea3
MP
60132014-07-01 Marek Polacek <polacek@redhat.com>
6014
6015 * c-typeck.c (convert_for_assignment): Pass OPT_Wint_conversion
6016 instead of 0 to WARN_FOR_ASSIGNMENT.
6017
d5c3d343
MP
60182014-07-01 Marek Polacek <polacek@redhat.com>
6019
6020 PR c/58286
6021 * c-typeck.c (convert_for_assignment): Pass
6022 OPT_Wincompatible_pointer_types instead of 0 to WARN_FOR_ASSIGNMENT.
6023
6a7253a4
MP
60242014-06-30 Marek Polacek <polacek@redhat.com>
6025
6026 * c-decl.c (grokdeclarator): Don't instrument VLAs if the function
6027 has no_sanitize_undefined attribute.
6028
5e88a8f4
IZ
60292014-06-30 Igor Zamyatin <igor.zamyatin@intel.com>
6030
6031 PR middle-end/57541
6032 * c-array-notation.c (fix_builtin_array_notation_fn):
6033 Check for 0 arguments in builtin call. Check that bultin argument is
6034 correct.
6035 * c-parser.c (c_parser_array_notation): Check for incorrect initial
6036 index.
6037
9698b078
SH
60382014-06-27 Sebastian Huber <sebastian.huber@embedded-brains.de>
6039
6040 * c-parser.c (c_parser_declaration_or_fndef): Discard all type
6041 qualifiers in __auto_type for atomic types.
6042 (c_parser_typeof_specifier): Discard all type qualifiers in
6043 __typeof__ for atomic types.
6044
6e07c515
MP
60452014-06-25 Marek Polacek <polacek@redhat.com>
6046
6047 PR c/61162
6048 * c-parser.c (c_parser_statement_after_labels): Pass the location of
6049 the return expression to c_finish_return.
6050
da6f124d
JJ
60512014-06-25 Jakub Jelinek <jakub@redhat.com>
6052
6053 * c-typeck.c (c_finish_omp_clauses): Make sure
6054 OMP_CLAUSE_LINEAR_STEP has correct type.
6055
c203e8a7
TS
60562014-06-24 Trevor Saunders <tsaunders@mozilla.com>
6057
6058 * c-decl.c: Adjust.
6059
56ad0e38
JJ
60602014-06-24 Jakub Jelinek <jakub@redhat.com>
6061
6062 * c-parser.c (c_parser_omp_for_loop): For
6063 #pragma omp parallel for simd move lastprivate clause from parallel
6064 to for rather than simd.
6065
47c2554f
MP
60662014-06-23 Marek Polacek <polacek@redhat.com>
6067
6068 * c-typeck.c (parser_build_binary_op): Don't call
6069 warn_logical_not_parentheses if the RHS is TRUTH_NOT_EXPR.
6070
56363ffd
JH
60712014-06-15 Jan Hubicka <hubicka@ucw.cz>
6072
6073 * c-parser.c (c_parser_omp_threadprivate): Likewise.
6074 * c-decl.c (merge_decls): Likewise.
6075
d7ff7ae5
MP
60762014-06-09 Marek Polacek <polacek@redhat.com>
6077
6078 PR c/36446
6079 * c-typeck.c (error_init): Call inform instead of error_at.
6080 (pedwarn_init): Call inform instead of pedwarn.
6081 (warning_init): Call inform instead of warning_at.
6082
24d047a3
JH
60832014-06-07 Jan Hubicka <hubicka@ucw.cz>
6084
6085 * c-decl.c (merge_decls): Use set_decl_section_name.
6086 (duplicate_decls): Remove node if it exists.
6087
9bac5cbb
G
60882014-06-05 S. Gilles <sgilles@terpmail.umd.edu>
6089
6090 PR c/53119
6091 * c-typeck.c (push_init_level, process_init_element,
6092 pop_init_level): Correct check for zero initialization, move
6093 missing brace warning to respect zero initialization.
6094
8ffcdea8
MP
60952014-06-05 Marek Polacek <polacek@redhat.com>
6096
6097 PR c/56724
6098 * c-typeck.c (convert_for_assignment): Use expr_loc for ic_argpass.
6099
742938c9
MP
61002014-06-05 Marek Polacek <polacek@redhat.com>
6101
6102 PR c/49706
6103 * c-typeck.c (parser_build_binary_op): Warn when logical not is used
ab20d992 6104 on the left hand side operand of a comparison.
742938c9 6105
6447c55d
MP
61062014-06-05 Marek Polacek <polacek@redhat.com>
6107
6108 PR c/48062
6109 * c-decl.c (warn_if_shadowing): Call inform instead of warning_at.
6110 Print note only if the warning was printed.
6111
9dc7743c
IZ
61122014-06-04 Igor Zamyatin <igor.zamyatin@intel.com>
6113
6114 PR c/58942
6115 * c-array-notation.c (fix_builtin_array_notation_fn): Handle the case
6116 with a pointer.
6117
fedfecef
MP
61182014-06-03 Marek Polacek <polacek@redhat.com>
6119
6120 PR c/60439
6121 * c-parser.c (c_parser_switch_statement): Pass explicit_cast_p to
6122 c_start_case.
6123 * c-tree.h (c_start_case): Update.
6124 * c-typeck.c (c_start_case): Add new boolean parameter. Warn if
6125 switch condition has boolean value.
6126
9b2b7279
AM
61272014-06-02 Andrew MacLeod <amacleod@redhat.com>
6128
6129 * c-decl.c: Include builtins.h.
6130 * c-parser.c: Likewise.
6131
5c1bc275
MP
61322014-05-27 Marek Polacek <polacek@redhat.com>
6133
6134 PR c/56724
6135 * c-typeck.c (convert_arguments): Get location of a parameter. Change
6136 error and warning calls to error_at and warning_at. Pass location of
6137 a parameter to it. Call warning_at with OPT_Wtraditional_conversion.
6138 (convert_for_assignment): Add parameter to WARN_FOR_ASSIGNMENT and
6139 WARN_FOR_QUALIFIERS. Pass expr_loc to those.
6140
97563bc8
IZ
61412014-05-26 Igor Zamyatin <igor.zamyatin@intel.com>
6142
6143 PR c/61191
6144 * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid
6145 function parameters.
6146
aede2c10
JH
61472014-05-23 Jan Hubicka <hubicka@ucw.cz>
6148
6149 * c-decl.c (merge_decls): Preserve symtab node pointers.
6150 (duplicate_decls): Free new decl.
6151
edbba2ce
TS
61522014-05-23 Thomas Schwinge <thomas@codesourcery.com>
6153
f3316c6d
TS
6154 * c-typeck.c (c_finish_omp_clauses): Remove duplicated variable
6155 initialization.
6156
edbba2ce
TS
6157 * c-parser.c (c_parser_omp_target): Return bool values.
6158
68c81f24
TS
61592014-05-22 Thomas Schwinge <thomas@codesourcery.com>
6160
6161 * c-parser.c (c_parser_omp_clause_thread_limit): Rename
6162 num_teams_loc variable to num_thread_limit_loc.
6163
632f2871
RS
61642014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
6165
6166 * c-array-notation.c (expand_array_notations): Use void_node
6167 instead of void_zero_node.
6168
766090c2
TS
61692014-05-17 Trevor Saunders <tsaunders@mozilla.com>
6170
6171 * c-decl.c (finish_struct): Adjust.
6172 (finish_enum): Likewise.
6173 (bind): Adjust.
6174 (record_inline_static): Likewise.
6175 (push_scope): Likewise.
6176 (make_label): Likewise.
6177 (lookup_label_for_goto): Likewise.
6178 (finish_struct): Likewise.
6179 (finish_enum): Likewise.
6180 (store_parm_decls): Likewise.
6181 (c_push_function_context): Likewise.
6182 * c-lang.h: Remove usage of variable_size gty attribute.
6183 * c-parser.c (c_parse_init): Adjust.
6184 (c_parse_file): Likewise.
6185
2b107f6b
MP
61862014-05-13 Marek Polacek <polacek@redhat.com>
6187
6188 PR c/61162
6189 * c-typeck.c (convert_for_assignment): Pass location to
6190 WARN_FOR_ASSIGNMENT instead of input_location.
6191
d033409e
MP
61922014-05-10 Marek Polacek <polacek@redhat.com>
6193
6194 * c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
6195 maybe_warn_string_init.
6196 (c_parser_postfix_expression_after_paren_type): Pass type_loc to
6197 maybe_warn_string_init.
6198 * c-tree.h (maybe_warn_string_init): Update declaration.
6199 * c-typeck.c (maybe_warn_string_init): Add location parameter.
6200 Call pedwarn_init with loc instead of with input_location.
6201 (digest_init): Pass init_loc to maybe_warn_string_init.
6202 (pop_init_level): Call pedwarn_init with loc instead of with
6203 input_location.
6204 (set_init_index): Likewise.
6205 (process_init_element): Likewise.
6206
ea58ef42
MP
62072014-05-09 Marek Polacek <polacek@redhat.com>
6208
6209 PR c/61096
6210 * c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level.
6211 (c_parser_initelt): Pass location to set_init_label. Pass array index
6212 location to set_init_index.
6213 * c-tree.h (push_init_level): Update declaration.
6214 (pop_init_level): Likewise.
6215 (set_init_index): Likewise.
6216 (set_init_label): Likewise.
6217 * c-typeck.c (error_init): Add location parameter. Call error_at
6218 instead of error.
6219 (digest_init): Pass init_loc to error_init.
6220 (really_start_incremental_init):
6221 (push_init_level): Add location parameter. Pass loc to pop_init_level
6222 and error_init.
6223 (pop_init_level): Likewise.
6224 (set_designator): Add location parameter. Pass loc to pop_init_level,
6225 push_init_level, and error_init.
6226 (set_init_index): Add location parameter. Pass loc to error_init and
6227 set_designator.
6228 (set_init_label): Likewise.
6229 (output_init_element): Pass loc to error_init.
6230 (process_init_element): Pass loc to error_init, pop_init_level,
6231 pedwarn_init, and push_init_level.
6232
661a0813
MP
62332014-05-09 Marek Polacek <polacek@redhat.com>
6234
6235 PR c/50459
6236 * c-parser.c (c_parser_attributes): Parse the arguments as an
6237 expression-list if the attribute takes identifier.
6238
2793eeab
MP
62392014-05-08 Marek Polacek <polacek@redhat.com>
6240
6241 PR c/61053
6242 * c-decl.c (grokdeclarator): Use min_align_of_type instead of
6243 TYPE_ALIGN_UNIT.
6244
f827930a
MP
62452014-05-08 Marek Polacek <polacek@redhat.com>
6246
6247 PR c/61077
6248 * c-decl.c (start_function): Warn for _Atomic-qualified return type
6249 of main.
6250
1d60af08
KZ
62512014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
6252 Mike Stump <mikestump@comcast.net>
6253 Richard Sandiford <rdsandiford@googlemail.com>
6254
6255 * c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN.
6256 (finish_enum): Use wide-int interfaces.
6257 * c-parser.c (c_parser_cilk_clause_vectorlength): Likewise.
6258 * c-typeck.c (build_c_cast): Likewise.
6259 (set_nonincremental_init_from_string): Likewise.
6260 (c_tree_equal): Likewise.
6261
a0e24419
MP
62622014-05-02 Marek Polacek <polacek@redhat.com>
6263
6264 PR c/25801
6265 * c-typeck.c (c_size_in_bytes): Update comment. Don't call error.
6266 Return size_one_node when the type is not complete.
6267 (pointer_diff): Remove comment.
6268 (build_unary_op): Improve error messages.
6269
19fc9faa
MP
62702014-05-02 Marek Polacek <polacek@redhat.com>
6271
6272 * c-typeck.c (c_finish_return): Separate warning_at calls.
6273
63bc4e87
MP
62742014-05-02 Marek Polacek <polacek@redhat.com>
6275
6276 * c-tree.h (error_init): Remove declaration.
6277 (pedwarn_init): Likewise.
6278 * c-typeck.c (error_init): Make static and move above.
6279 (pedwarn_init): Likewise.
6280 (warning_init): Move above.
6281 (maybe_warn_string_init): Likewise.
6282
4bd2511b
JL
62832014-05-01 Jeff Law <law@redhat.com>
6284
6285 Revert:
6286
6287 2014-04-24 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
6288 * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
6289 avoid goto.
6290
6a358dcb
MP
62912014-05-02 Marek Polacek <polacek@redhat.com>
6292
6293 PR c/60784
6294 * c-typeck.c (push_init_level): Set constructor_designated to
6295 p->designated for structures.
6296
ae5ebda4
MP
62972014-05-01 Marek Polacek <polacek@redhat.com>
6298
6299 PR c/60915
6300 * c-parser.c (c_parser_declaration_or_fndef): Give better error if
6301 function-definition has an attribute after the declarator.
6302
96b40f8d
MP
63032014-05-01 Marek Polacek <polacek@redhat.com>
6304
6305 PR c/60257
6306 * c-typeck.c (warning_init): Add location_t parameter. Call
6307 warning_at instead of warning.
6308 (push_init_level): Pass input_location to warning_init.
6309 (add_pending_init): Add location_t parameter. Pass loc to
6310 warning_init.
6311 (set_nonincremental_init): Pass input_location to add_pending_init.
6312 (set_nonincremental_init_from_string): Likewise.
6313 (output_init_element): Pass loc to warning_init and to
6314 add_pending_init.
6315
32e00768
MP
63162014-05-01 Marek Polacek <polacek@redhat.com>
6317
6318 PR c/43395
6319 * c-typeck.c (c_finish_return): Distinguish between label and variable
6320 when warning about returning local address.
6321
c9379ce2
MP
63222014-05-01 Marek Polacek <polacek@redhat.com>
6323
6324 PR c/29467
6325 * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
6326 in C89 mode.
6327
d00887e8
MP
63282014-05-01 Marek Polacek <polacek@redhat.com>
6329
6330 PR c/43245
6331 * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
6332 instead of 0 to WARN_FOR_QUALIFIERS.
6333
5436fa2e
MP
63342014-05-01 Marek Polacek <polacek@redhat.com>
6335
6336 PR c/56989
6337 * c-typeck.c (default_conversion): Use better location for
6338 error call.
6339
f8ed5150
MP
63402014-04-30 Marek Polacek <polacek@redhat.com>
6341
6342 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
6343 also when SANITIZE_FLOAT_DIVIDE is on.
6344
8337d1db
MP
63452014-04-30 Marek Polacek <polacek@redhat.com>
6346
6347 PR c/60139
6348 * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
6349 and pedwarn_init. Use loc insted of input_location.
6350
c4bdc42f
MP
63512014-04-30 Marek Polacek <polacek@redhat.com>
6352
6353 PR c/60351
6354 * c-typeck.c (build_binary_op): Use location when warning about
6355 shift count.
6356
45484dcf
MP
63572014-04-25 Marek Polacek <polacek@redhat.com>
6358
6359 PR c/18079
6360 * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
6361 always_inline/noinline and hot/cold attributes.
6362
34cf811f
MP
63632014-04-25 Marek Polacek <polacek@redhat.com>
6364
6365 PR c/60114
6366 * c-parser.c (c_parser_initelt): Pass input_location to
6367 process_init_element.
6368 (c_parser_initval): Pass loc to process_init_element.
6369 * c-tree.h (process_init_element): Adjust declaration.
6370 * c-typeck.c (push_init_level): Pass input_location to
6371 process_init_element.
6372 (pop_init_level): Likewise.
6373 (set_designator): Likewise.
6374 (output_init_element): Add location_t parameter. Pass loc to
6375 digest_init.
6376 (output_pending_init_elements): Pass input_location to
6377 output_init_element.
6378 (process_init_element): Add location_t parameter. Pass loc to
6379 output_init_element.
6380
42056eac
JJ
63812014-04-24 Jakub Jelinek <jakub@redhat.com>
6382
6383 * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
6384 atomic-clause, allow comma in between atomic-clause and
6385 seq_cst.
6386
e162a134
JJ
63872014-04-22 Jakub Jelinek <jakub@redhat.com>
6388
6389 PR c/59073
6390 * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
6391 fails, don't set OM_PARALLEL_COMBINED and return NULL.
6392
2f6babac
IZ
63932014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
6394
6395 PR middle-end/60469
6396 * c-array-notation.c (fix_builtin_array_notation_fn): Use
6397 create_tmp_var instead build_decl for creating temps.
6398 (build_array_notation_expr): Likewise.
6399 (fix_conditional_array_notations_1): Likewise.
6400 (fix_array_notation_expr): Likewise.
6401 (fix_array_notation_call_expr): Likewise.
6402
8edbfaa6
JJ
64032014-03-28 Jakub Jelinek <jakub@redhat.com>
6404
6405 PR c++/60689
6406 * c-tree.h (c_build_function_call_vec): New prototype.
6407 * c-typeck.c (build_function_call_vec): Don't call
6408 resolve_overloaded_builtin here.
6409 (c_build_function_call_vec): New wrapper function around
6410 build_function_call_vec. Call resolve_overloaded_builtin here.
6411 (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
6412 Call c_build_function_call_vec instead of build_function_call_vec.
6413 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
6414 * c-decl.c (finish_decl): Likewise.
6415
7485aeea
MLI
64162014-03-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
6417
6418 PR c/55383
6419 * c-typeck.c: Use correct format string in cast-qual warning
6420
b17a8b07
TS
64212014-03-07 Thomas Schwinge <thomas@codesourcery.com>
6422
6423 * c-decl.c (c_decl_attributes): Use
6424 lang_hooks.types.omp_mappable_type.
6425 * c-typeck.c (c_finish_omp_clauses): Likewise.
6426
3af9c5e9
MP
64272014-03-06 Marek Polacek <polacek@redhat.com>
6428
6429 PR c/60197
6430 * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
6431 of checking tree code.
6432
1c9f5f33
PK
64332014-02-19 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
6434
6435 * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
6436 (c_parser_parameter_declaration): Likewise.
6437
cc28fc7f
MP
64382014-02-19 Marek Polacek <polacek@redhat.com>
6439
6440 PR c/60195
6441 * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
6442 Call mark_exp_read on exp.value.
6443 (build_atomic_assign): Set TREE_NO_WARNING on val and old. Set
6444 TREE_ADDRESSABLE on old instead of val.
6445 (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
6446
b581c05c
PK
64472014-02-07 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
6448
6449 * c-parser.c (c_parser_get_builtin_args): Replace calls to
6450 C_EXPR_APPEND by vec_safe_push.
6451 * c-tree.h (C_EXPR_APPEND): Remove.
6452
81e5eca8
MP
64532014-01-31 Marek Polacek <polacek@redhat.com>
6454
6455 PR c/59963
6456 * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
6457 build_function_call_vec.
6458 (build_function_call): Likewise.
6459 (build_atomic_assign): Likewise.
6460 (build_function_call_vec): Add arg_loc parameter. Use it.
6461 (convert_arguments): Likewise.
6462 (convert_for_assignment): Rename rhs_loc to expr_loc.
6463 * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
6464 (c_parser_objc_keywordexpr): Likewise.
6465 (c_parser_postfix_expression_after_primary): Call
6466 build_function_call_vec with expr_loc rather than op_loc.
6467 Call c_parser_expr_list to fill arg_loc. Pass arg_loc to
6468 build_function_call_vec.
6469 (c_parser_expr_list): Add locations parameter. Fill it with locations
6470 of function arguments.
6471 * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
6472
68fca595
MP
64732014-01-30 Marek Polacek <polacek@redhat.com>
6474
6475 PR c/59940
6476 * c-typeck.c (build_function_call_vec): Use loc parameter.
6477 (convert_arguments): Add location parameter. Use it.
6478 (ep_convert_and_check): Likewise.
6479 (build_atomic_assign): Adjust convert_for_assignment call.
6480 (build_modify_expr): Likewise.
6481 (digest_init): Likewise.
6482 (c_finish_return): Likewise.
6483 (build_conditional_expr): Adjust ep_convert_and_check calls.
6484 (convert_for_assignment): Add rhs_loc parameter. Use it.
6485 (build_binary_op): Adjust convert_and_check and ep_convert_and_check
6486 calls.
6487
fa337f3a
RB
64882014-01-30 Richard Biener <rguenther@suse.de>
6489
6490 PR c/59905
6491 * c-typeck.c (build_function_call_vec): Do not replace calls
6492 to a function via an incompatible type with a runtime abort.
6493
b72271b9
BI
64942014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
6495
6496 * c-parser.c (c_parser_declaration_or_fndef): Replaced
6497 flag_enable_cilkplus with flag_cilkplus.
6498 (c_parser_direct_declarator_inner): Likewise.
6499 (c_parser_attribute_any_word): Likewise.
6500 (c_parser_attributes): Likewise.
6501 (c_parser_compound_statement): Likewise.
6502 (c_parser_statement_after_labels): Likewise.
6503 (c_parser_if_statement): Likewise.
6504 (c_parser_switch_statement): Likewise.
6505 (c_parser_do_statement): Likewise.
6506 (c_parser_for_statement): Likewise.
6507 (c_parser_unary_expression): Likewise.
6508 (c_parser_postfix_expression): Likewise.
6509 (c_parser_postfix_expression_after_primary): Likewise.
6510 (c_parser_postfix_expression_after_primary): Likewise.
6511 (c_parser_omp_clause_name): Likewise.
6512 (c_finish_omp_declare_simd): Likewise.
6513 (c_parser_cilk_verify_simd): Likewise.
6514 * c-typeck.c (build_array_ref): Likewise.
6515 (build_function_call_vec): Likewise.
6516 (convert_arguments): Likewise.
6517 (build_compound_expr): Likewise.
6518 (c_finish_return): Likewise.
6519 (c_finish_if_stmt): Likewise.
6520 (c_finish_loop): Likewise.
6521 (build_binary_op): Likewise.
6522
393e8e8b
MP
65232014-01-23 Marek Polacek <polacek@redhat.com>
6524
6525 PR c/59846
6526 * c-typeck.c (parser_build_binary_op): Use location instead of
6527 input_location.
6528 (build_binary_op): Pass location to shorten_compare.
6529
f04dda30
MP
65302014-01-23 Marek Polacek <polacek@redhat.com>
6531
6532 PR c/58346
6533 * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
6534 an empty aggregate.
6535
789eadcd
MP
65362014-01-23 Marek Polacek <polacek@redhat.com>
6537
6538 PR c/59871
6539 * c-typeck.c (build_compound_expr): Warn even for right-hand operand
6540 of a comma expression.
6541 (emit_side_effect_warnings): Likewise.
6542
40f14e9f
BI
65432014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
6544
6545 PR c/59825
6546 * c-array-notation.c (expand_array_notation_exprs): Rewrote this
6547 function to use walk_tree and moved a lot of its functionality to
6548 expand_array_notations.
6549 (expand_array_notations): New function.
6550
74558dd9
BI
65512014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
6552
6553 * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
6554 attribute an attribute without value.
6555
652fea39
JJ
65562014-01-23 Jakub Jelinek <jakub@redhat.com>
6557
6558 PR middle-end/58809
6559 * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
6560 BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
6561
f34f1c87
MP
65622014-01-22 Marek Polacek <polacek@redhat.com>
6563
6564 PR c/59891
6565 * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
6566 of remove_c_maybe_const_expr on op1 and op2.
6567
241f845a
JJ
65682014-01-15 Jakub Jelinek <jakub@redhat.com>
6569
6570 PR c/58943
6571 * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
6572 effects, preevaluate rhs using SAVE_EXPR first.
6573
9a74f20c
BI
65742014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
6575
6576 PR c++/59631
6577 * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
6578 statements with if-elseif statements.
6579
96066ce1
MP
65802014-01-06 Marek Polacek <polacek@redhat.com>
6581
6582 PR c/57773
6583 * c-decl.c (check_bitfield_type_and_width): Warn for implementation
6584 defined bit-field types only in ISO C.
6585
23a5b65a
RS
65862014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
6587
6588 Update copyright years
6589
f9030485
RS
65902014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
6591
6592 * c-array-notation.c: Use the standard form for the copyright notice.
6593
41958c28
BI
65942013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
6595
6596 * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
6597 (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
6598 field in parser is not empty. If not-empty, call the function
6599 c_parser_finish_omp_declare_simd.
6600 (c_parser_cilk_clause_vectorlength): Modified function to be shared
6601 between SIMD-enabled functions and #pragma simd. Added new parameter.
6602 (c_parser_cilk_all_clauses): Modified the usage of the function
6603 c_parser_cilk_clause_vectorlength as mentioned above.
6604 (c_parser_cilk_simd_fn_vector_attrs): New function.
6605 (c_finish_cilk_simd_fn_tokens): Likewise.
6606 (is_cilkplus_vector_p): Likewise.
6607 (c_parser_omp_clause_name): Added checking for "vectorlength,"
6608 "nomask," and "mask" strings in clause name.
6609 (c_parser_omp_all_clauses): Added 3 new case statements:
6610 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
6611 PRAGMA_CILK_CLAUSE_NOMASK.
6612 (c_parser_attributes): Added a cilk_simd_fn_tokens parameter. Added a
6613 check for vector attribute and if so call the function
6614 c_parser_cilk_simd_fn_vector_attrs. Also, when Cilk plus is enabled,
6615 called the function c_finish_cilk_simd_fn_tokens.
6616 (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
6617 parser field is non-empty. If so, parse them as you would parse
6618 the omp declare simd pragma.
6619 (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
6620 Added a check when step is a parameter and flag it as error.
6621 (CILK_SIMD_FN_CLAUSE_MASK): New #define.
6622 (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
6623 pragma_omp_clause.
6624
cef0fd0e
TS
66252013-12-17 Thomas Schwinge <thomas@codesourcery.com>
6626
6627 * c-parser.c (c_parser_omp_parallel): Fix description.
6628
12893402
BI
66292013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
6630
6631 * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
6632 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
6633 (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
6634 * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
6635
296674db
JM
66362013-12-04 Joseph Myers <joseph@codesourcery.com>
6637
6638 PR c/52023
6639 * c-parser.c (c_parser_alignas_specifier): Use
6640 c_sizeof_or_alignof_type instead of c_alignof.
6641 (c_parser_alignof_expression): Likewise, with min_alignof
6642 parameter depending on alignof spelling used.
6643
edd28054
MP
66442013-12-04 Marek Polacek <polacek@redhat.com>
6645
6646 PR c/54113
6647 * c-decl.c (start_function): Don't warn for missing prototype for
6648 inline functions.
6649
da0fc454
MP
66502013-12-03 Marek Polacek <polacek@redhat.com>
6651
6652 PR c/59351
6653 * c-decl.c (build_compound_literal): Allow compound literals with
6654 empty initial value.
6655
4c2ecab0
JM
66562013-12-02 Joseph Myers <joseph@codesourcery.com>
6657
6658 PR c/58235
6659 * c-typeck.c (build_modify_expr): Diagnose assignment to
6660 expression with array type.
6661
340baef7
JM
66622013-11-29 Joseph Myers <joseph@codesourcery.com>
6663
6664 PR c/42262
6665 * c-typeck.c (process_init_element): Do not treat a string as
6666 initializing a whole array when used with a designator for an
6667 individual element.
6668
6763b9f7
JM
66692013-11-29 Joseph Myers <joseph@codesourcery.com>
6670
6671 PR c/57574
6672 * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
6673 an inline function following a static declaration.
6674
e7bd1de1
JJ
66752013-11-28 Jakub Jelinek <jakub@redhat.com>
6676
6677 PR c/59310
6678 * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
6679 to p_name before calling c_parser_omp_teams instead of after.
6680 (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
6681 argument. Remove unused p_name variable.
6682
0136f8f0
AH
66832013-11-27 Aldy Hernandez <aldyh@redhat.com>
6684 Jakub Jelinek <jakub@redhat.com>
6685
6686 * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
6687 external_scope is NULL.
6688
241b71bb
TV
66892013-11-27 Tom de Vries <tom@codesourcery.com>
6690 Marc Glisse <marc.glisse@inria.fr>
6691
6692 PR c++/59032
6693 * c-typeck.c (build_unary_op): Allow vector increment and decrement.
6694
2fb9a547
AM
66952013-11-22 Andrew MacLeod <amacleod@redhat.com>
6696
6697 * c-typeck.c: Add required include files from gimple.h.
6698
8400e75e
DM
66992013-11-22 David Malcolm <dmalcolm@redhat.com>
6700
6701 * c-decl.c (define_label, shadow_tag_warned)
6702 (check_bitfield_type_and_width, grokdeclarator, grokparms,
6703 store_parm_decls_newstyle, store_parm_decls_oldstyle)
6704 (declspecs_add_type): Remove use of in_system_header macro.
6705 * c-parser.c (c_parser_unary_expression): Likewise.
6706 * c-typeck.c (store_init_value, process_init_element)
6707 (c_start_case): Likewise.
6708
6709 * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
6710 macro.
6711
6712 * c-parser.c (c_parser_set_source_position_from_token): Remove
6713 reference to in_system_header from comment.
6714
386b1f1f
RS
67152013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
6716
6717 * c-decl.c (grokdeclarator): Update comment to refer to
6718 tree_to_[su]hwi rather than tree_low_cst.
6719
ae7e9ddd
RS
67202013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
6721
6722 * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
6723 tree_to_uhwi throughout.
6724
9439e9a1
RS
67252013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
6726
6727 * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
6728 throughout.
6729
9541ffee
RS
67302013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
6731
6732 * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
6733 throughout.
6734
c02065fc
AH
67352013-11-15 Aldy Hernandez <aldyh@redhat.com>
6736
6737 * c-parser.c (c_parser_cilk_simd): New.
6738 (c_parser_cilk_verify_simd): New.
6739 (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
6740 (c_parser_omp_for_loop): Add case for NE_EXPR.
6741 Set c_break_label for CILK_SIMD.
6742 (c_parser_cilk_clause_vectorlength): New.
6743 (c_parser_cilk_clause_linear): New.
6744 (c_parser_cilk_clause_name): New.
6745 (c_parser_cilk_all_clauses): New.
6746 * c-typeck.c (build_unary_op): Pass location argument to
6747 readonly_error.
6748 (build_modify_expr): Same.
6749 (build_asm_expr): Same.
6750 (c_finish_bc_stmt): Error on break/continue in loops.
6751
18f429e2
AM
67522013-11-14 Andrew MacLeod <amacleod@redhat.com>
6753
6754 * c-typeck.c: Include only gimplify.h and gimple.h as needed.
6755
d8a2d370
DN
67562013-11-14 Diego Novillo <dnovillo@google.com>
6757
6758 * c-decl.c: Include print-tree.h.
6759 Include stor-layout.h.
6760 Include varasm.h.
6761 Include attribs.h.
6762 Include stringpool.h.
6763 * c-lang.c: Include fold-const.h.
6764 * c-parser.c: Include stringpool.h.
6765 Include attribs.h.
6766 Include stor-layout.h.
6767 Include varasm.h.
6768 Include trans-mem.h.
6769 * c-typeck.c: Include stor-layout.h.
6770 Include trans-mem.h.
6771 Include varasm.h.
6772 Include stmt.h.
6773
38b7bc7f
JM
67742013-11-13 Joseph Myers <joseph@codesourcery.com>
6775
6776 * c-tree.h (c_typespec_keyword): Add cts_auto_type.
6777 * c-decl.c (declspecs_add_type, finish_declspecs): Handle
6778 __auto_type.
6779 * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
6780 (c_parser_attribute_any_word, c_parser_objc_selector): Handle
6781 RID_AUTO_TYPE.
6782 (c_parser_declspecs): Take argument AUTO_TYPE_OK.
6783 (c_parser_declaration_or_fndef, c_parser_struct_declaration)
6784 (c_parser_declarator, c_parser_direct_declarator_inner)
6785 (c_parser_parameter_declaration, c_parser_type_name): All callers
6786 changed.
6787 (c_parser_declaration_or_fndef): Handle declarations with type
6788 determined from the initializer.
6789
45b0be94
AM
67902013-11-12 Andrew MacLeod <amacleod@redhat.com>
6791
18f429e2 6792 * c-typeck.c: Include gimplify.h.
45b0be94 6793
582d9b50
JM
67942013-11-12 Joseph Myers <joseph@codesourcery.com>
6795
6796 * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
6797 * c-parser.c (c_parser_declspecs): Mention _Thread_local in
6798 comment.
6799 * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
6800 or _Thread_local as appropriate in diagnostics.
6801 (build_null_declspecs): Initialize ret->thread_gnu_p.
6802 (declspecs_add_scspec): Handle either __thread or _Thread_local
6803 for RID_THREAD. Diagnose _Thread_local for pre-C11 standards if
6804 pedantic. Do not disallow _Thread_local extern and _Thread_local
6805 static.
6806
267bac10
JM
68072013-11-07 Joseph Myers <joseph@codesourcery.com>
6808 Andrew MacLeod <amacleod@redhat.com>
6809
6810 * c-aux-info.c (gen_type): Handle atomic qualifier.
6811 * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
6812 qualifiers when compating types.
6813 (shadow_tag_warned): Handle atomic_p in declspecs.
6814 (quals_from_declspecs): Likewise.
6815 (start_decl): Use c_type_promotes_to when promoting argument
6816 types.
6817 (grokdeclarator): Handle _Atomic.
6818 (get_parm_info): Diagnose any qualifier on "void" as only
6819 parameter.
6820 (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
6821 comparing types. Use c_type_promotes_to when promoting argument
6822 types.
6823 (finish_function): Use c_type_promotes_to when promoting argument
6824 types.
6825 (build_null_declspecs): Handle atomic_p in declspecs.
6826 (declspecs_add_qual): Handle RID_ATOMIC.
6827 * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
6828 (c_token_starts_declspecs): Handle RID_ATOMIC.
6829 (c_parser_declspecs): Handle atomic type specifiers and
6830 qualifiers.
6831 (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
6832 from types of expressions with atomic type.
6833 (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
6834 (c_parser_attribute_any_word): Handle RID_ATOMIC.
6835 (c_parser_initializer, c_parser_initelt, c_parser_initval)
6836 (c_parser_statement_after_labels, c_parser_switch_statement)
6837 (c_parser_for_statement, c_parser_expr_no_commas)
6838 (c_parser_conditional_expression, c_parser_binary_expression)
6839 (c_parser_cast_expression, c_parser_unary_expression)
6840 (c_parser_postfix_expression)
6841 (c_parser_postfix_expression_after_primary, c_parser_expression):
6842 Use convert_lvalue_to_rvalue.
6843 (c_parser_expression_conv, c_parser_expr_list): Document
6844 conversion of lvalues to rvalues. Use convert_lvalue_to_rvalue.
6845 (c_parser_objc_synchronized_statement): Use
6846 convert_lvalue_to_rvalue.
6847 (c_parser_objc_selector): Handle RID_ATOMIC.
6848 (c_parser_objc_receiver, c_parser_array_notation): Use
6849 convert_lvalue_to_rvalue.
6850 * c-tree.h (ctsk_typeof): Adjust comment to mention use for
6851 _Atomic (type-name).
6852 (struct c_declspecs): Add atomic_p field.
6853 (convert_lvalue_to_rvalue): Declare.
6854 * c-typeck.c (c_type_promotes_to): Promote atomic types to
6855 corresponding atomic types.
6856 (qualify_type): Don't add _Atomic qualifiers from second argument.
6857 (comp_target_types): Do not allow _Atomic mismatches.
6858 (type_lists_compatible_p): Do not remove atomic qualifiers when
6859 comparing types.
6860 (really_atomic_lvalue, convert_lvalue_to_rvalue)
6861 (build_atomic_assign): New functions.
6862 (build_unary_op): Use build_atomic_assign for atomic increment and
6863 decrement.
6864 (build_conditional_expr): Do not treat _Atomic void as a qualified
6865 version of void.
6866 (build_modify_expr): Use build_atomic_assign for atomic LHS.
6867 (find_anonymous_field_with_type, convert_to_anonymous_field)
6868 (convert_for_assignment): Do not remove atomic qualifiers when
6869 comparing types.
6870 (digest_init): Do not accept initialization of arrays of atomic
6871 elements by string constants.
6872 (build_asm_expr): Use convert_lvalue_to_rvalue.
6873 (build_binary_op): Do not treat _Atomic void as a qualified
6874 version of void.
6875
0c249d4b
DD
68762013-11-06 DJ Delorie <dj@redhat.com>
6877
6878 * c-decl.c (locate_old_decl): If a previous conflicting decl is
6879 both explicit and builtin, print the location of the explicit one.
6880
6d7f7e0a
TB
68812013-11-05 Tobias Burnus <burnus@net-b.de>
6882
6883 * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
6884 c_parser_omp_distribute, c_parser_omp_teams,
6885 c_parser_omp_target, c_parser_omp_declare): Handle
6886 -fopenmp-simd.
6887
b906f4ca
MP
68882013-11-03 Marek Polacek <polacek@redhat.com>
6889
6890 * c-decl.c (grokdeclarator): Add VLA instrumentation.
6891
ee1d5a02
JJ
68922013-11-01 Jakub Jelinek <jakub@redhat.com>
6893
6894 * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
6895 check_dup_generic at the end, unless remove is true.
6896 (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
6897 remove = true;.
6898 (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
6899
5a9785fb
JJ
69002013-10-31 Jakub Jelinek <jakub@redhat.com>
6901
6902 * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
6903 with decl that is not pointer nor array.
6904
939b37da
BI
69052013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
6906
6907 * c-decl.c (finish_function): Added a call for insert_cilk_frame when
6908 a spawning function is found.
6909 * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
6910 (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
6911 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
6912 * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
6913 case.
6914 (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
6915 * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
6916 expr.
6917 (c_finish_return): Added a check to reject _Cilk_spawn in return
6918 expression.
6919 (build_cilk_spawn): New function.
6920 (build_cilk_sync): Likewise.
6921 * Makefile.in (c-decl.o): Added cilk.h in dependency list.
ab20d992 6922
d4af74d4
TB
69232013-10-27 Tobias Burnus <burnus@net-b.de>
6924
6925 PR other/33426
6926 * c-parser.c (c_parser_while_statement, c_parser_while_statement,
6927 c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
6928 (c_parser_statement_after_labels): Update calls.
6929
d73749df 69302013-10-24 Tobias Burnus <burnus@net-b.de>
8170608b
TB
6931
6932 PR other/33426
6933 * c-parser.c (c_parser_pragma, c_parser_for_statement):
6934 Handle PRAGMA_IVDEP.
6935 (c_parser_statement_after_labels): Update call.
6936
f28aa681
MP
69372013-10-24 Marek Polacek <polacek@redhat.com>
6938
6939 * c-parser.c (c_parser_struct_declaration): Add a comment.
6940 (c_parser_declarator): Don't allow _Alignas here.
6941
0645c1a2
AM
69422013-10-17 Andrew MacLeod <amacleod@redhat.com>
6943
6944 * c-parser.c: Include omp-low.h.
6945 * c-typeck.c: Likewise.
6946
568a31f2
MP
69472013-10-17 Marek Polacek <polacek@redhat.com>
6948
6949 PR c/58267
6950 * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
6951 Document syntax of the array-declarator.
6952 (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
6953 are not permitted.
6954 (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
6955 (c_parser_struct_declaration): Likewise.
6956 (c_parser_declarator): Likewise.
6957 (c_parser_direct_declarator_inner): Likewise.
6958 (c_parser_parameter_declaration): Likewise.
6959 (c_parser_type_name): Likewise.
6960
acf0174b
JJ
69612013-10-11 Jakub Jelinek <jakub@redhat.com>
6962
6963 * c-lang.h (current_omp_declare_target_attribute): New extern
6964 decl.
6965 * c-parser.c: Include c-lang.h.
6966 (struct c_parser): Change tokens to c_token *.
6967 Add tokens_buf field. Change tokens_avail type to unsigned int.
6968 (c_parser_consume_token): If parser->tokens isn't
6969 &parser->tokens_buf[0], increment parser->tokens.
6970 (c_parser_consume_pragma): Likewise.
6971 (enum pragma_context): Add pragma_struct and pragma_param.
6972 (c_parser_external_declaration): Adjust
6973 c_parser_declaration_or_fndef caller.
6974 (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
6975 argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
6976 Adjust recursive call.
6977 (c_parser_struct_or_union_specifier): Use pragma_struct instead
6978 of pragma_external.
6979 (c_parser_parameter_declaration): Use pragma_param instead of
6980 pragma_external.
6981 (c_parser_compound_statement_nostart, c_parser_label,
6982 c_parser_for_statement): Adjust
6983 c_parser_declaration_or_fndef callers.
6984 (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
6985 it through to c_parser_conditional_expression.
6986 (c_parser_conditional_expression): Add omp_atomic_lhs argument,
6987 pass it through to c_parser_binary_expression. Adjust recursive
6988 call.
6989 (c_parser_binary_expression): Remove prec argument, add
6990 omp_atomic_lhs argument instead. Always start from PREC_NONE, if
6991 omp_atomic_lhs is non-NULL and one of the arguments of toplevel
6992 binop matches it, use build2 instead of parser_build_binary_op.
6993 (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
6994 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
6995 PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
6996 Handle pragma_struct and pragma_param the same as pragma_external.
6997 (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
6998 (c_parser_omp_variable_list): Parse array sections for
6999 OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
7000 (c_parser_omp_clause_collapse): Fully fold collapse expression.
7001 (c_parser_omp_clause_reduction): Handle user defined reductions.
7002 (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
7003 c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
7004 c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
7005 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
7006 c_parser_omp_clause_depend, c_parser_omp_clause_map,
7007 c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
7008 c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
7009 c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
7010 (c_parser_omp_all_clauses): Add finish_p argument. Don't call
7011 c_finish_omp_clauses if it is false. Handle new OpenMP 4.0 clauses.
7012 (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
7013 present to c_finish_omp_atomic. Handle OpenMP 4.0 atomic forms.
7014 (c_parser_omp_for_loop): Add CODE argument, pass it through
7015 to c_finish_omp_for. Change last argument to cclauses,
7016 and adjust uses to grab parallel clauses from the array of all
7017 the split clauses. Adjust c_parser_binary_expression,
7018 c_parser_declaration_or_fndef and c_finish_omp_for callers.
7019 (omp_split_clauses): New function.
7020 (c_parser_omp_simd): New function.
7021 (c_parser_omp_for): Add p_name, mask and cclauses arguments.
7022 Allow the function to be called also when parsing combined constructs,
7023 and call c_parser_omp_simd when parsing for simd.
7024 (c_parser_omp_sections_scope): If section-sequence doesn't start with
7025 #pragma omp section, require exactly one structured-block instead of
7026 sequence of statements.
7027 (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
7028 Allow the function to be called also when parsing combined constructs.
7029 (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
7030 Allow the function to be called also when parsing combined
7031 constructs.
7032 (c_parser_omp_taskgroup, c_parser_omp_cancel,
7033 c_parser_omp_cancellation_point, c_parser_omp_distribute,
7034 c_parser_omp_teams, c_parser_omp_target_data,
7035 c_parser_omp_target_update, c_parser_omp_target,
7036 c_parser_omp_declare_simd, c_finish_omp_declare_simd,
7037 c_parser_omp_declare_target, c_parser_omp_end_declare_target,
7038 c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
7039 (c_parser_omp_construct): Add p_name and mask vars. Handle
7040 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
7041 PRAGMA_OMP_TEAMS. Adjust c_parser_omp_for, c_parser_omp_parallel
7042 and c_parser_omp_sections callers.
7043 (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
7044 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
7045 OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
7046 (OMP_PARALLEL_CLAUSE_MASK): Likewise. Add OMP_CLAUSE_PROC_BIND.
7047 (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. Add
7048 OMP_CLAUSE_DEPEND.
7049 (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
7050 OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
7051 OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
7052 OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
7053 OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
7054 * c-typeck.c: Include tree-inline.h.
7055 (c_finish_omp_cancel, c_finish_omp_cancellation_point,
7056 handle_omp_array_sections_1, handle_omp_array_sections,
7057 c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
7058 (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
7059 user defined reductions.
7060 (c_tree_equal): New function.
7061 * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
7062 c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
7063 c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
7064 c_check_omp_declare_reduction_r): New prototypes.
7065 * c-decl.c (current_omp_declare_target_attribute): New variable.
7066 (c_decl_attributes): New function.
7067 (start_decl, start_function): Use it instead of decl_attributes.
7068 (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
7069 c_omp_reduction_decl, c_omp_reduction_lookup,
7070 c_check_omp_declare_reduction_r): New functions.
7071
0a6c2227
TT
70722013-09-25 Tom Tromey <tromey@redhat.com>
7073
7074 * Make-lang.in (c/gccspec.o): Remove.
7075 (CFLAGS-c/gccspec.o): New variable.
7076 (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
7077 (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
7078 (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
7079
f3bc55f0
TT
70802013-09-25 Tom Tromey <tromey@redhat.com>
7081
7082 * Make-lang.in (c/gccspec.o): Don't use subshell.
7083
a24d975c
MP
70842013-09-18 Marek Polacek <polacek@redhat.com>
7085
7086 PR sanitize/58443
7087 * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
7088 Remove unnecessary check.
7089
ce6923c5
MP
70902013-09-18 Marek Polacek <polacek@redhat.com>
7091
7092 PR sanitizer/58411
7093 * c-typeck.c (build_binary_op): Don't sanitize function if it has the
7094 no_sanitize_undefined attribute.
7095
a1e51df9
KT
70962013-09-13 Kai Tietz <ktietz@redhat.com>
7097
7098 PR target/57848
7099 * c-decl.c (c_builtin_function_ext_scope): Remove
7100 wrong assumption that it is never called on prexisting
7101 symbol.
7102
0af94e6f
JR
71032013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
7104
7105 * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
7106
20059c8b
GDR
71072013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
7108
7109 * c-objc-common.c (c_tree_printer): Tidy.
7110
de5a5fa1
MP
71112013-08-30 Marek Polacek <polacek@redhat.com>
7112
7113 * c-typeck.c (build_binary_op): Add division by zero and shift
7114 instrumentation.
7115
2531a1d9 71162013-08-26 Joern Rennecke <joern.rennecke@embecosm.com>
0fdd4508 7117 Joseph Myers <joseph@codesourcery.com>
2531a1d9 7118
6e2bcc98 7119 PR c/35649
2531a1d9
JR
7120 * c-typeck.c (c_common_type): Prefer double_type_node over
7121 other REAL_TYPE types with the same precision.
7122 (convert_arguments): Likewise.
7123
025311c4
GDR
71242013-08-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
7125
7126 * c-objc-common.c (c_tree_printer): Document the nature of the cast.
7127 (c_initialize_diagnostics): Call a destructor for the early printer.
7128
da6ca2b5
GDR
71292013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
7130
7131 * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
7132 printer initialization.
7133
318cda85 71342013-08-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
da6ca2b5 7135
318cda85
BI
7136 PR c/57490
7137 * c-array-notation.c (fix_conditional_array_notations_1): Added a
7138 check for truth values.
7139 (expand_array_notation_exprs): Added truth values case. Removed an
7140 unwanted else. Added for-loop to walk through subtrees in default
7141 case.
7142
b066401f
GDR
71432013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
7144
7145 * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
7146
fb48aadc
JM
71472013-07-23 Joseph Myers <joseph@codesourcery.com>
7148
7149 * c-parser.c (struct c_generic_association): Fix typo.
7150
433cc7b0
TT
71512013-07-23 Tom Tromey <tromey@redhat.com>
7152 Joseph Myers <joseph@codesourcery.com>
7153
7154 * c-parser.c (struct c_generic_association): New.
7155 (c_generic_association_d): New typedef.
7156 (c_parser_generic_selection): New function.
7157 (c_parser_postfix_expression): Handle RID_GENERIC.
7158
26d40c3d
JM
71592013-07-13 Jason Merrill <jason@redhat.com>
7160
7161 PR c++/57793
7162 * c-decl.c (finish_struct): Check for too-large class.
7163
ecdbd01a 71642013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
40d3d530
JR
7165
7166 PR c/57821
7167 * c-typeck.c (set_init_index): When folding, check for index overflow.
7168
1141ed3f
BI
71692013-06-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
7170
7171 * c-parser.c (c_parser_array_notation): Removed rejection of array
7172 notations in an array of function pointers.
7173
713b46fa
BI
71742013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
7175
7176 * c-array-notation.c (make_triplet_val_inv): New function.
7177 (create_cmp_incr): Likewise.
7178 (create_array_refs): Likewise.
7179 (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
7180 Also modularized common parts between functions and called the function.
7181 (build_array_notation_expr): Likewise.
7182 (fix_conditional_array_notations_1): Likewise.
7183 (fix_array_notation_expr): Likewise.
7184 (fix_array_notation_call_expr): Likewise.
7185
92f20202
MP
71862013-06-18 Marek Polacek <polacek@redhat.com>
7187
7188 PR c/57630
7189 * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
7190
73a23b06
BI
71912013-06-12 Balaji V. Iyer <balaji.v.iyer@intel.com>
7192
7193 * c-array-notation.c (build_array_notation_expr): Reject array notation
7194 mismatch between LHS and RHS even inside a call_expr. Also, removed
7195 a couple while statements that were dead code.
7196
00b8517d
BI
71972013-06-10 Balaji V. Iyer <balaji.v.iyer@intel.com>
7198
7199 * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
7200 excessive precision expressions in function parameters. Also removed
7201 couple unwanted while statements.
7202
1509bdda
BI
72032013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
7204
7205 * c-array-notation.c (expand_array_notation_exprs): Added
7206 ARRAY_NOTATION_REF case.
ab20d992 7207
d60f1706
BI
72082013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
7209
7210 * c-array-notation.c (length_mismatch_in_expr_p): Moved this
7211 function to c-family/array-notation-common.c.
7212 (is_cilkplus_reduce_builtin): Likewise.
7213 (find_rank): Likewise.
7214 (extract_array_notation_exprs): Likewise.
7215 (replace_array_notations): Likewise.
7216 (find_inv_trees): Likewise.
7217 (replace_inv_trees): Likewise.
7218 (contains_array_notation_expr): Likewise.
7219 (find_correct_array_notation_type): Likewise.
7220 (replace_invariant_exprs): Initialized additional_tcodes to NULL.
7221 (struct inv_list): Moved this to c-family/array-notation-common.c.
7222 * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
ab20d992 7223
6d6efbb3
BI
72242013-06-05 Balaji V. Iyer <balaji.v.iyer@intel.com>
7225
7226 * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
7227 reduction functions outside the for-loop. Added a check if the fundecl
7228 is non-NULL. Finally, removed an unwanted if-statement, and made the
7229 body unconditional.
7230
25c22937
BI
72312013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
7232
7233 * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
7234 condition of the if-statement matches the rank of else-block and then-
7235 block when array notations are used.
7236 * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
7237 expression after the entire function body is parsed.
7238 (c_parser_expr_no_commas): Delayed creating array notation expressions
7239 to the end of function parsing.
7240 * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
7241 whole if-statement instead of just the condition.
ab20d992 7242 (expand_array_notation_exprs): Added MODIFY_EXPR case.
25c22937 7243
edd25645
BI
72442013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
7245
7246 PR c/57474
7247 * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
7248 array to NULL_TREE if they are unused. Also added a check for the
7249 field to be NULL before its fields are used in future.
ab20d992 7250
065ce7f1
RO
72512013-05-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
7252
7253 PR bootstrap/57450
7254 * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
7255 (build_array_notation_expr): Likewise.
7256
36536d79
BI
72572013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
7258
7259 * c-typeck.c (build_array_ref): Added a check to see if array's
7260 index is greater than one. If true, then emit an error.
7261 (build_function_call_vec): Exclude error reporting and checking
7262 for builtin array-notation functions.
7263 (convert_arguments): Likewise.
7264 (c_finish_return): Added a check for array notations as a return
7265 expression. If true, then emit an error.
7266 (c_finish_loop): Added a check for array notations in a loop
7267 condition. If true then emit an error.
7268 (lvalue_p): Added a ARRAY_NOTATION_REF case.
7269 (build_binary_op): Added a check for array notation expr inside
7270 op1 and op0. If present, we call another function to find correct
7271 type.
7272 * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
7273 * c-parser.c (c_parser_compound_statement): Check if array
7274 notation code is used in tree, if so, then transform them into
7275 appropriate C code.
7276 (c_parser_expr_no_commas): Check if array notation is used in LHS
7277 or RHS, if so, then build array notation expression instead of
7278 regular modify.
7279 (c_parser_postfix_expression_after_primary): Added a check for
7280 colon(s) after square braces, if so then handle it like an array
7281 notation. Also, break up array notations in unary op if found.
7282 (c_parser_direct_declarator_inner): Added a check for array
7283 notation.
7284 (c_parser_compound_statement): Added a check for array notation in
7285 a stmt. If one is present, then expand array notation expr.
7286 (c_parser_if_statement): Likewise.
7287 (c_parser_switch_statement): Added a check for array notations in
7288 a switch statement's condition. If true, then output an error.
7289 (c_parser_while_statement): Similarly, but for a while.
7290 (c_parser_do_statement): Similarly, but for a do-while.
7291 (c_parser_for_statement): Similarly, but for a for-loop.
7292 (c_parser_unary_expression): Check if array notation is used in a
7293 pre-increment or pre-decrement expression. If true, then expand
7294 them.
7295 (c_parser_array_notation): New function.
7296 * c-array-notation.c: New file.
7297 * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
ab20d992 7298
cd192ccc
MS
72992013-05-23 Mike Stump <mikestump@comcast.net>
7300
7301 * c-typeck.c (convert_for_assignment): Handle references to memory
7302 spaces better.
7303
427b248d
JM
73042013-05-16 Jason Merrill <jason@redhat.com>
7305
7306 * Make-lang.in (cc1$(exeext)): Use link mutex.
7307
44d90fe1
PC
73082013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
7309
7310 * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
7311 to simply use OPT_Wpointer_arith.
7312 (build_unary_op): Likewise.
7313
4e7d7b3d
JJ
73142013-04-03 Jakub Jelinek <jakub@redhat.com>
7315
7316 PR c/19449
7317 * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
7318 argument. If set, or it temporarily for parsing of the first
7319 argument into force_folding_builtin_constant_p.
7320 (c_parser_postfix_expression): Adjust callers.
7321
839b422f
RB
73222013-03-21 Richard Biener <rguenther@suse.de>
7323
7324 * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
7325 instead of DECL_DEBUG_EXPR_IS_FROM. Guard properly.
7326
2ee028f1
MP
73272013-02-12 Marek Polacek <polacek@redhat.com>
7328
7329 PR c/44938
7330 * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
7331 origtypes to NULL.
7332
8824edff
JJ
73332013-01-24 Jakub Jelinek <jakub@redhat.com>
7334
7335 PR c/56078
7336 * c-typeck.c (set_nonincremental_init_from_string): If
7337 constructor_max_index is NULL, treat it as if tree_int_cst_lt
7338 returned false.
7339 (process_init_element): Likewise.
7340
eadd3d0d
JJ
73412012-12-20 Jakub Jelinek <jakub@redhat.com>
7342
7343 PR c++/55619
7344 * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
7345 argument, don't call default_function_array_conversion
7346 nor c_fully_fold here.
7347 (c_parser_asm_statement): Adjust callers.
7348 * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
7349 and outputs here, and call default_function_array_conversion
7350 on inputs that don't need to be addressable.
7351
f8a93a2e
JJ
73522012-12-18 Jakub Jelinek <jakub@redhat.com>
7353
7354 PR c/39464
7355 * c-typeck.c (convert_for_assignment): For -Wpointer-sign
7356 warning require that both c_common_unsigned_type as well as
7357 c_common_signed_type is the same for both mvl and mvr types.
7358
9771b263
DN
73592012-11-16 Diego Novillo <dnovillo@google.com>
7360
7361 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
7362
7363 * c-common.c: Use new vec API in vec.h.
7364 * c-common.h: Likewise.
7365 * c-gimplify.c: Likewise.
7366 * c-pragma.c: Likewise.
7367 * c-pretty-print.c: Likewise.
7368 * c-pretty-print.h: Likewise.
7369 * c-semantics.c: Likewise.
7370 * c-decl.c: Likewise.
7371 * c-parser.c: Likewise.
7372 * c-tree.h: Likewise.
7373 * c-typeck.c: Likewise.
7374
880661a4
JW
73752012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
7376
7377 PR c++/54930
7378 * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
7379
077d1abe
MLI
73802012-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
7381
7382 PR c/53066
7383 * c-decl.c (warn_if_shadowing): Do not warn if a variable
7384 shadows a function, unless the variable is a function or a
7385 pointer-to-function.
7386
3a785c97
JJ
73872012-10-12 Jakub Jelinek <jakub@redhat.com>
7388
7389 PR c/54381
7390 * c-parser.c (struct c_tree_loc_pair): Removed.
7391 (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
7392 add location_t * and tree * arguments, fill in array of 3
7393 sizeof_arg trees and corresponding locs.
7394 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
7395 c_parser_expr_list callers.
7396 (c_parser_postfix_expression_after_primary): Likewise. Pass
7397 array of 3 sizeof_arg trees and locs (corresponding to first
7398 3 arguments) to sizeof_pointer_memaccess_warning.
7399
703c8606
LC
74002012-10-09 Lawrence Crowl <crowl@google.com>
7401
7402 * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
7403 * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
7404 hash table.
7405
5d9de0d0
PC
74062012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
7407
7408 PR c++/54194
7409 * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
7410 call.
7411
a212e43f
MG
74122012-10-09 Marc Glisse <marc.glisse@inria.fr>
7413
7414 PR c++/54427
7415 * c-typeck.c: Include c-common.h.
7416 (enum stv_conv): Moved to c-common.h.
7417 (scalar_to_vector): Moved to c-common.c.
7418 (build_binary_op): Adapt to scalar_to_vector's new prototype.
7419 * Make-lang.in: c-typeck.c depends on c-common.h.
7420
3b78de56
AC
74212012-10-04 Arnaud Charlet <charlet@adacore.com>
7422
7423 * c-decl.c (c_write_global_declarations): Fix handling of
7424 -fdump-ada-spec*.
7425
78c60e3d
SS
74262012-09-30 Sharad Singhai <singhai@google.com>
7427
7428 * c-decl.c (c_write_global_declarations): Use a different method
7429 to determine if the dump has ben initialized.
7430
9f33203d
JM
74312012-09-14 Joseph Myers <joseph@codesourcery.com>
7432
7433 PR c/54552
7434 * c-typeck.c (c_cast_expr): When casting to a type requiring
7435 C_MAYBE_CONST_EXPR to be created, pass the inner expression to
7436 c_fully_fold first.
7437
a27d595d
JM
74382012-09-14 Joseph Myers <joseph@codesourcery.com>
7439
7440 PR c/54103
7441 * c-typeck.c (build_unary_op): Pass original argument of
7442 TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
7443 any C_MAYBE_CONST_EXPR, if it has integer operands.
7444 (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
7445 TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
7446 to c_objc_common_truthvalue_conversion, then remove any
7447 C_MAYBE_CONST_EXPR, if they have integer operands. Use
7448 c_objc_common_truthvalue_conversion not
7449 c_common_truthvalue_conversion.
7450 (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
7451 call note_integer_operands for arguments with integer operands
7452 that are not integer constants.
7453
9feb29df
JJ
74542012-09-13 Jakub Jelinek <jakub@redhat.com>
7455
7456 PR c/54559
7457 * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
7458 COMPLEX_TYPE with in_late_binary_op set temporarily to true.
7459
d409320c
JJ
74602012-08-31 Jakub Jelinek <jakub@redhat.com>
7461
7462 PR c/54428
7463 * c-convert.c (convert): Don't call fold_convert_loc if
7464 TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
7465 is a COMPLEX_EXPR. Remove TYPE_MAIN_VARIANT check from
7466 COMPLEX_TYPE -> COMPLEX_TYPE conversion.
7467
6265d07c
JJ
74682012-08-24 Jakub Jelinek <jakub@redhat.com>
7469
7470 PR c/54355
7471 * c-decl.c (c_parser_label): Pass true as nested and fix up comments
7472 for nested and empty_ok arguments in the call to
7473 c_parser_declaration_or_fndef.
7474
1a4049e7
JJ
74752012-08-17 Jakub Jelinek <jakub@redhat.com>
7476
7477 * c-tree.h (c_last_sizeof_arg): Declare.
7478 * c-parser.c (struct c_tree_loc_pair): New type.
7479 (c_parser_expr_list): Add sizeof_arg argument. Fill it in if
7480 non-NULL.
7481 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
7482 (c_parser_postfix_expression_after_primary): Likewise. Call
7483 sizeof_pointer_memaccess_warning if needed.
7484 (sizeof_ptr_memacc_comptypes): New function.
7485 * c-typeck.c (c_last_sizeof_arg): New global variable.
7486 (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
7487
0229aee9
UB
74882012-07-24 Uros Bizjak <ubizjak@gmail.com>
7489
7490 * c-lang.h (lang_decl): Add variable_size GTY option.
7491
7ee2468b
SB
74922012-07-16 Steven Bosscher <steven@gcc.gnu.org>
7493
7494 * c-decl.c: Include dumpfile.h instead of tree-dump.h.
7495 * Make-lang.in: Fix dependencies.
7496
d4a10d0a
SB
74972012-06-29 Steven Bosscher <steven@gcc.gnu.org>
7498
7499 * Make-lang.in: New file, rules migrated from gcc/Makefile.in
7500 and add language Makefile hooks.
7501 * config-lang.in: New file.
7502 * c-config-lang.in: Moved from gcc/config-lang.in to here, and
7503 add the required "normal" config-lang.in rules.
7504 * c-lang.h: Moved from gcc/ to here.
7505 * c-tree.h: Likewise.
7506 * c-objc-common.c: Likewise.
7507 * c-objc-common.h: Likewise.
7508 * c-typeck.c: Likewise.
7509 * c-convert.c: Likewise.
7510 * c-lang.c: Likewise.
7511 * c-aux-info.c: Likewise.
7512 * c-errors.c: Likewise.
7513 * gccspec.c: Likewise.
7514 * c-decl.c: Likewise. Include gt-c-c-decl.h, not gt-c-decl.h.
7515 * c-parser.c: Likewise. Include gt-c-c-parser.h, not gt-c-parser.h.
7516\f
c48514be 7517Copyright (C) 2012-2021 Free Software Foundation, Inc.
d4a10d0a
SB
7518
7519Copying and distribution of this file, with or without modification,
7520are permitted in any medium without royalty provided the copyright
7521notice and this notice are preserved.