]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/c/ChangeLog
rs6000: Update the processor defaults for FreeBSD
[thirdparty/gcc.git] / gcc / c / ChangeLog
CommitLineData
ca2bd949
GA
12020-12-09 Tobias Burnus <tobias@codesourcery.com>
2
3 * c-parser.c (c_parser_omp_allocate): New.
4 (c_parser_omp_construct): Call it.
5
62020-12-09 Richard Biener <rguenther@suse.de>
7
8 PR c/98200
9 * gimple-parser.c (c_parser_gimple_postfix_expression): Return
10 early on error.
11
bc8a7013
GA
122020-12-07 Martin Uecker <muecker@gwdg.de>
13
14 PR c/97981
15 * c-typeck.c (convert_lvalue_to_rvalue): Move the code
16 that drops qualifiers to the end of the function.
17
d48df6f2
GA
182020-11-26 Martin Uecker <muecker@gwdg.de>
19
20 PR c/65455
21 PR c/92935
22 * c-parser.c (c_parser_declaration_or_fndef): Remove
23 redundant code to drop qualifiers of _Atomic types for __auto_type.
24 (c_parser_typeof_specifier): Do not drop qualifiers of _Atomic
25 types for __typeof__.
26
1e2c9a27
GA
272020-11-24 Jakub Jelinek <jakub@redhat.com>
28
29 PR c/97958
30 * c-parser.c (c_parser_binary_expression): For omp atomic binary
31 expressions, use make_node instead of build2 to avoid checking build2
32 performs.
33
8e6198d0
GA
342020-11-23 Joseph Myers <joseph@codesourcery.com>
35
36 PR c/95630
37 * c-typeck.c (build_binary_op): Use pedwarn_c99 with OPT_Wpedantic
38 for comparisons of complete and incomplete pointers.
39
7a97e2fc
GA
402020-11-21 Aaron Sawdey <acsawdey@linux.ibm.com>
41
42 * c-aux-info.c (gen_type): Support opaque types.
43
82e5048e
GA
442020-11-20 Martin Sebor <msebor@redhat.com>
45
46 PR middle-end/97879
47 * c-decl.c (start_function): Set ATTR_FLAG_INTERNAL in flags.
48
492020-11-20 Jakub Jelinek <jakub@redhat.com>
50
51 PR other/97911
52 * Make-lang.in (c.serial): Change from goal to a variable.
53 (.PHONY): Drop c.serial.
54
552020-11-20 Martin Uecker <muecker@gwdg.de>
56
57 * c-typeck.c (convert_lvalue_to_rvalue): Drop qualifiers.
58
d62586ee
GA
592020-11-19 Jakub Jelinek <jakub@redhat.com>
60
61 PR c/97860
62 * c-decl.c (get_parm_array_spec): Bail out of nelts is
63 error_operand_p.
64
25bb75f8
GA
652020-11-18 Jakub Jelinek <jakub@redhat.com>
66
67 * Make-lang.in (c.serial): New goal.
68 (.PHONY): Add c.serial c.prev.
69 (cc1$(exeext)): Call LINK_PROGRESS.
70
77f67db2
GA
712020-11-13 Vladimir N. Makarov <vmakarov@redhat.com>
72
73 * c-parser.c (c_parser_asm_statement): Parse outputs for asm
74 goto too.
75 * c-typeck.c (build_asm_expr): Remove an assert checking output
76 absence for asm goto.
77
782020-11-13 Jakub Jelinek <jakub@redhat.com>
79
80 * c-typeck.c (c_finish_omp_clauses): Don't clear
81 OMP_CLAUSE_REDUCTION_INSCAN unless reduction_seen == -2.
82
832020-11-13 Iain Sandoe <iain@sandoe.co.uk>
84
85 PR objc/77404
86 * c-parser.c (c_parser_objc_class_definition): Pass the
87 location of the class name to the interface declaration.
88
bb622641
GA
892020-11-10 Strager Neds <strager.nds@gmail.com>
90
91 * c-decl.c (merge_decls): Use new overload of
92 set_decl_section_name.
93
942020-11-10 Chung-Lin Tang <cltang@codesourcery.com>
95
96 * c-parser.c (c_parser_omp_target_data): Add use of
97 new c_omp_adjust_map_clauses function. Add GOMP_MAP_ATTACH_DETACH as
98 handled map clause kind.
99 (c_parser_omp_target_enter_data): Likewise.
100 (c_parser_omp_target_exit_data): Likewise.
101 (c_parser_omp_target): Likewise.
102 * c-typeck.c (handle_omp_array_sections): Adjust COMPONENT_REF case to
103 use GOMP_MAP_ATTACH_DETACH map kind for C_ORT_OMP region type.
104 (c_finish_omp_clauses): Adjust bitmap checks to allow struct decl and
105 same struct field access to co-exist on OpenMP construct.
106
2da7ee05
GA
1072020-11-07 Martin Uecker <muecker@gwdg.de>
108
109 * c-parser.c (c_parser_label): Implement mixing of labels and code.
110 (c_parser_all_labels): Likewise.
111
44cab2d8
GA
1122020-11-06 Iain Sandoe <iain@sandoe.co.uk>
113
114 * c-parser.c (c_parser_objc_at_property_declaration):
115 Improve parsing fidelity. Associate better location info
116 with @property attributes. Clean up the interface to
117 objc_add_property_declaration ().
118
1192020-11-06 Nathan Sidwell <nathan@acm.org>
120
121 * c-decl.c (diagnose_mismatched_decls): Rename
122 DECL_IS_BUILTIN->DECL_IS_UNDECLARED_BUILTIN.
123 (warn_if_shadowing, implicitly_declare, names_builtin_p)
124 (collect_source_refs): Likewise.
125 * c-typeck.c (inform_declaration, inform_for_arg)
126 (convert_for_assignment): Likewise.
127
1282020-11-06 Tobias Burnus <tobias@codesourcery.com>
129
130 * c-parser.c (c_parser_omp_atomic): Add openacc parameter and update
131 OpenACC matching.
132 (c_parser_omp_construct): Update call.
133
35c125cb
GA
1342020-11-04 Jakub Jelinek <jakub@redhat.com>
135
136 PR c++/97670
137 * c-typeck.c (c_finish_omp_clauses): Look through array reductions to
138 find underlying decl to clear in the aligned_head bitmap.
139
1402020-11-04 Joseph Myers <joseph@codesourcery.com>
141
142 * c-decl.c (handle_nodiscard_attribute): New.
143 (std_attribute_table): Add nodiscard.
144 * c-parser.c (c_parser_std_attribute): Expect argument to
145 nodiscard attribute to be a string. Do not special-case ignoring
146 nodiscard.
147 * c-typeck.c (maybe_warn_nodiscard): New.
148 (build_compound_expr, emit_side_effect_warnings): Call
149 maybe_warn_nodiscard.
150 (c_process_expr_stmt, c_finish_stmt_expr): Also call
151 emit_side_effect_warnings if warn_unused_result.
152
4f0606fe
GA
1532020-10-29 Asher Gordon <AsDaGo@posteo.net>
154
155 * c-typeck.c (free_all_tagged_tu_seen_up_to): Replace free
156 with XDELETE.
157 (finish_init): Likewise.
158 (pop_init_level): Likewise.
159
e93aae4a
GA
1602020-10-28 Joseph Myers <joseph@codesourcery.com>
161
162 * c-decl.c (store_parm_decls_newstyle): Use pedwarn_c11 not
163 error_at for omitted parameter name.
164
1652020-10-28 Jakub Jelinek <jakub@redhat.com>
166
167 * c-parser.c (c_parser_omp_clause_name): Handle allocate.
168 (c_parser_omp_clause_allocate): New function.
169 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_ALLOCATE.
170 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
171 OMP_PARALLEL_CLAUSE_MASK, OMP_SINGLE_CLAUSE_MASK,
172 OMP_TASK_CLAUSE_MASK, OMP_TASKGROUP_CLAUSE_MASK,
173 OMP_DISTRIBUTE_CLAUSE_MASK, OMP_TEAMS_CLAUSE_MASK,
174 OMP_TARGET_CLAUSE_MASK, OMP_TASKLOOP_CLAUSE_MASK): Add
175 PRAGMA_OMP_CLAUSE_ALLOCATE.
176 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_ALLOCATE.
177
89bb01e7
GA
1782020-10-27 Joseph Myers <joseph@codesourcery.com>
179
180 * c-parser.c (c_parser_std_attribute_specifier): Allow duplicate
181 standard attributes.
182
efe71fcc
GA
1832020-10-23 Marek Polacek <polacek@redhat.com>
184
185 PR c++/91741
186 * c-parser.c (c_parser_binary_expression): Implement -Wsizeof-array-div.
187 (c_parser_postfix_expression): Set PAREN_SIZEOF_EXPR.
188 (c_parser_expr_list): Handle PAREN_SIZEOF_EXPR like SIZEOF_EXPR.
189 * c-tree.h (char_type_p): Declare.
190 * c-typeck.c (char_type_p): No longer static.
191
1922020-10-23 Martin Sebor <msebor@redhat.com>
193
194 PR middle-end/97552
195 * c-decl.c (get_parm_array_spec): Handle static VLA parameters.
196
2fe5b7d1
GA
1972020-09-19 Martin Sebor <msebor@redhat.com>
198
199 PR c/50584
200 * c-decl.c (lookup_last_decl): Define new function.
201 (c_decl_attributes): Call it.
202 (start_decl): Add argument and use it.
203 (finish_decl): Call build_attr_access_from_parms and decl_attributes.
204 (get_parm_array_spec): Define new function.
205 (push_parm_decl): Call get_parm_array_spec.
206 (start_function): Call warn_parm_array_mismatch. Build attribute
207 access and add it to current function.
208 * c-parser.c (c_parser_declaration_or_fndef): Diagnose mismatches
209 in forms of array parameters.
210 * c-tree.h (start_decl): Add argument.
211
2122020-09-19 Sandra Loosemore <sandra@codesourcery.com>
213
214 * c-decl.c (c_break_label, c_cont_label): Delete, and replace
215 with...
216 (in_statement): New.
217 (start_function): Adjust for above change.
218 (c_push_function_context, c_pop_function_context): Likewise.
219 * c-lang.h (struct language_function): Likewise.
220 * c-objc-common.h (LANG_HOOKS_BLOCK_MAY_FALLTHRU): Define.
221 * c-parser.c (objc_foreach_break_label, objc_foreach_continue_label):
222 New.
223 (c_parser_statement_after_labels): Adjust calls to c_finish_bc_stmt.
224 (c_parser_switch_statement): Adjust break/switch context handling
225 and calls to renamed functions.
226 (c_parser_while_statement): Adjust break/switch context handling and
227 build a WHILE_STMT.
228 (c_parser_do_statement): Ditto, with DO_STMT respectively.
229 (c_parser_for_statement): Ditto, with FOR_STMT respectively.
230 (c_parser_omp_for_loop): Adjust break/switch context handling.
231 * c-tree.h (c_break_label, c_cont_label): Delete.
232 (IN_SWITCH_STMT, IN_ITERATION_STMT): Define.
233 (IN_OMP_BLOCK, IN_OMP_FOR, IN_OBJC_FOREACH): Define.
234 (in_statement, switch_statement_break_seen_p): Declare.
235 (c_start_case, c_finish_case): Renamed to...
236 (c_start_switch, c_finish_switch).
237 (c_finish_bc_stmt): Adjust arguments.
238 * c-typeck.c (build_function_call_vec): Don't try to print
239 statements with %qE format.
240 (struct c_switch): Rename switch_expr field to switch_stmt.
241 Add break_stmt_seen_p field.
242 (c_start_case): Rename to c_start_switch. Build a SWITCH_STMT
243 instead of a SWITCH_EXPR. Update for changes to struct c_switch.
244 (do_case): Update for changes to struct c_switch.
245 (c_finish_case): Rename to c_finish_switch. Update for changes to
246 struct c_switch and change of representation from SWITCH_EXPR to
247 SWITCH_STMT.
248 (c_finish_loop): Delete.
249 (c_finish_bc_stmt): Update to reflect changes to break/continue
250 state representation. Build a BREAK_STMT or CONTINUE_STMT instead
251 of a GOTO_EXPR except for objc foreach loops.
252
e1a4a8a0
GA
2532020-09-01 Jakub Jelinek <jakub@redhat.com>
254
255 PR c++/96867
256 * c-typeck.c (handle_omp_array_sections_1): Test C_ARRAY_PARAMETER
257 only on PARM_DECLs.
258
8f7ea26a
GA
2592020-08-28 Martin Sebor <msebor@redhat.com>
260
261 PR c/96596
262 * c-decl.c (match_builtin_function_types): Avoid dealing with erroneous
263 argument type.
264
8b394f01
GA
2652020-08-27 Martin Liska <mliska@suse.cz>
266
267 * gimple-parser.c (c_parser_gimple_compound_statement): Set exact argument of a vector
268 growth function to true.
269
db0f6efe
GA
2702020-08-25 Tobias Burnus <tobias@codesourcery.com>
271
272 PR c/96678
273 * c-typeck.c (handle_omp_array_sections_1): Talk about
274 array function parameter in the error message.
275
5c265693
GA
2762020-08-18 Jakub Jelinek <jakub@redhat.com>
277
278 PR c/96571
279 * c-parser.c (c_parser_generic_selection): Change match_found from bool
280 to int, holding index of the match. Call mark_exp_read on the selector
281 expression and on expressions other than the selected one.
282
4967ca2f
GA
2832020-08-01 Richard Sandiford <richard.sandiford@arm.com>
284
285 PR c/96377
286 * c-typeck.c (process_init_element): Split test for whether to
287 recurse into a record, union or array into...
288 (initialize_elementwise_p): ...this new function. Don't recurse
289 into a vector type if the initialization value is also a vector.
290
48cc2e46
GA
2912020-07-31 Richard Biener <rguenther@suse.de>
292
293 PR debug/96383
294 * c-objc-common.h (LANG_HOOKS_FINALIZE_EARLY_DEBUG):
295 Define to c_common_finalize_early_debug.
296
3ea9abca
GA
2972020-07-22 Tobias Burnus <tobias@codesourcery.com>
298
299 * c-parser.c (c_parser_omp_clause_hint): Require nonnegative hint clause.
300 (c_parser_omp_critical): Permit hint(0) clause without named critical.
301 (c_parser_omp_construct): Don't assert if error_mark_node is returned.
302
30430061
GA
3032020-07-21 Sunil K Pandey <skpgkp2@gmail.com>
304
305 PR target/95237
306 * c-decl.c (finish_decl): Call target hook
307 lower_local_decl_alignment to lower local decl alignment.
308
3f8ca9cb
GA
3092020-07-09 Julian Brown <julian@codesourcery.com>
310 Thomas Schwinge <thomas@codesourcery.com>
311
312 PR middle-end/95270
313 * c-typeck.c (c_finish_omp_clauses): Set OMP_CLAUSE_SIZE (bias) to zero
314 for standalone attach/detach clauses.
315
a82c4c4c 3162020-07-08 Eric Botcazou <ebotcazou@adacore.com>
50873cc5
GA
317
318 * c-typeck.c (convert_for_assignment): If -Wscalar-storage-order is
319 set, warn for conversion between pointers that point to incompatible
320 scalar storage orders.
321
f60ee68d
GA
3222020-07-07 Kaipeng Zhou <zhoukaipeng3@huawei.com>
323
324 * c-parser.c (c_parser_statement_after_labels): Pass correct
325 parameters to c_parser_do_statement.
326
56638b9b
GA
3272020-06-16 Jakub Jelinek <jakub@redhat.com>
328
329 * c-parser.c (c_parser_expr_no_commas): Save, clear and restore
330 c_in_omp_for.
331 (c_parser_omp_for_loop): Set c_in_omp_for around some calls to avoid
332 premature c_fully_fold. Defer explicit c_fully_fold calls to after
333 c_finish_omp_for.
334 * c-tree.h (c_in_omp_for): Declare.
335 * c-typeck.c (c_in_omp_for): Define.
336 (build_modify_expr): Avoid c_fully_fold if c_in_omp_for.
337 (digest_init): Likewise.
338 (build_binary_op): Likewise.
339
3402020-06-16 Jakub Jelinek <jakub@redhat.com>
341
342 * c-parser.c (c_parser_omp_clause_schedule): Reject modifier separated
343 from kind by comma rather than colon.
344
1a59f3db
GA
3452020-06-05 Mark Wielaard <mark@klomp.org>
346
347 * c-decl.c (implicit_decl_warning): When warned and olddecl is
348 an undeclared builtin, then add a fixit header hint, if found.
349 (implicitly_declare): Add OPT_Wbuiltin_declaration_mismatch to
350 warning_at about implicit builtin declaration type mismatch.
351
9a5b7438
GA
3522020-06-03 Mark Wielaard <mark@klomp.org>
353
354 * c-parser.c (struct c_parser): Add seen_string_literal
355 bitfield.
356 (c_parser_consume_token): Reset seen_string_literal.
357 (c_parser_error_richloc): Add name_hint if seen_string_literal
358 and next token is a CPP_NAME and we have a missing header
359 suggestion for the name.
360 (c_parser_string_literal): Set seen_string_literal.
361
3622020-06-03 Mark Wielaard <mark@klomp.org>
363
364 * c-parser.c (c_parser_postfix_expression_after_primary): Add
365 scope with matching_parens after CPP_OPEN_PAREN.
366
3672020-06-03 Tobias Burnus <tobias@codesourcery.com>
368
369 * c-objc-common.h (LANG_HOOKS_OMP_PREDETERMINED_MAPPING): Redefine.
370
53ffb43a
GA
3712020-05-28 Nicolas Bértolo <nicolasbertolo@gmail.com>
372
373 * Make-lang.in: Remove extra slash.
374
8f66f175
ML
3752020-05-19 Martin Liska <mliska@suse.cz>
376
377 * c-parser.c: Fix typo.
378
49ddde69
JJ
3792020-05-14 Jakub Jelinek <jakub@redhat.com>
380
381 * c-parser.c (c_parser_omp_target): Set cfun->has_omp_target.
382
eb72dc66
RB
3832020-05-07 Richard Biener <rguenther@suse.de>
384
385 PR middle-end/94703
386 * gimple-parser.c (c_parser_parse_ssa_name): Do not set
387 DECL_GIMPLE_REG_P.
388
bf915591
JJ
3892020-04-30 Jakub Jelinek <jakub@redhat.com>
390
391 PR c/94842
392 * c-decl.c (set_labels_context_r): In addition to context-less
393 LABEL_DECLs adjust also LABEL_DECLs with context equal to
394 parent function if any.
395 (store_parm_decls): Adjust comment.
396
e1113ffb
JJ
3972020-04-19 Jakub Jelinek <jakub@redhat.com>
398
399 PR objc/94637
400 * c-parser.c (c_parser_objc_selector_arg): Handle CPP_SCOPE like
401 two CPP_COLON tokens.
402
2e389749
JJ
4032020-04-17 Jakub Jelinek <jakub@redhat.com>
404
405 PR other/94629
406 * c-parser.c (c_parser_oacc_routine): Remove redundant assignment
407 to data.clauses.
408
2dc9294c
JJ
4092020-04-15 Jakub Jelinek <jakub@redhat.com>
410
411 PR c/94593
412 * c-parser.c (c_parser_pragma) <case PRAGMA_OMP_REQUIRES>: Reject
413 requires directive when not at file scope.
414
13e41d8b
TB
4152020-04-08 Tobias Burnus <tobias@codesourcery.com>
416
417 PR middle-end/94120
418 * c-decl.c (c_check_in_current_scope): New function.
419 * c-tree.h (c_check_in_current_scope): Declare it.
420 * c-parser.c (c_parser_oacc_declare): Add check that variables
421 are declared in the same scope as the directive. Fix handling
422 of namespace vars.
423
4df50a05
JJ
4242020-04-07 Jakub Jelinek <jakub@redhat.com>
425
426 PR c++/94512
427 * c-parser.c (c_parser_omp_parallel): Set OMP_PARALLEL_COMBINED
428 if c_parser_omp_master succeeded.
429
5db9e893
JJ
4302020-03-23 Jakub Jelinek <jakub@redhat.com>
431
432 PR gcov-profile/94029
433 PR c/94239
434 * c-parser.c (c_parser_declaration_or_fndef): Initialize endloc to
435 the function_start_locus location. Don't do that afterwards for the
436 __GIMPLE body parsing.
437
9def91e9
JJ
4382020-03-19 Jakub Jelinek <jakub@redhat.com>
439
440 PR gcov-profile/94029
441 * c-tree.h (finish_function): Add location_t argument defaulted to
442 input_location.
443 * c-parser.c (c_parser_compound_statement): Add endlocp argument and
444 set it to the locus of closing } if non-NULL.
445 (c_parser_compound_statement_nostart): Return locus of closing }.
446 (c_parser_parse_rtl_body): Likewise.
447 (c_parser_declaration_or_fndef): Propagate locus of closing } to
448 finish_function.
449 * c-decl.c (finish_function): Add end_loc argument, use it instead of
450 input_location to set function_end_locus.
451
046c5890
JJ
4522020-03-17 Jakub Jelinek <jakub@redhat.com>
453
454 PR c/94172
455 * c-tree.h (C_TYPE_INCOMPLETE_VARS): Define to TYPE_LANG_SLOT_1
456 instead of TYPE_VFIELD, and support it on {RECORD,UNION,ENUMERAL}_TYPE.
457 (TYPE_ACTUAL_ARG_TYPES): Check that it is only used on FUNCTION_TYPEs.
458 * c-decl.c (pushdecl): Push C_TYPE_INCOMPLETE_VARS also to
459 ENUMERAL_TYPEs.
460 (finish_incomplete_vars): New function, moved from finish_struct. Use
461 relayout_decl instead of layout_decl.
462 (finish_struct): Remove obsolete comment about C_TYPE_INCOMPLETE_VARS
463 being TYPE_VFIELD. Use finish_incomplete_vars.
464 (finish_enum): Clear C_TYPE_INCOMPLETE_VARS. Call
465 finish_incomplete_vars.
466 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
467 also on ENUMERAL_TYPEs.
468
c015ff8c
JJ
4692020-03-16 Jakub Jelinek <jakub@redhat.com>
470
471 PR c/94179
472 * c-fold.c (c_fully_fold_internal): Handle MEM_REF.
473
f2e9fe5f
MS
4742020-03-13 Martin Sebor <msebor@redhat.com>
475
476 PR c/94040
477 * c-decl.c (builtin_structptr_type_count): New constant.
478 (match_builtin_function_types): Reject decls that are incompatible
479 in types pointed to by pointers.
480 (diagnose_mismatched_decls): Adjust comments.
481
c9d70946
JM
4822020-03-05 Joseph Myers <joseph@codesourcery.com>
483
484 PR c/93577
485 * c-typeck.c (pop_init_level): Do not diagnose initializers as
486 empty when initialized type is error_mark_node.
487 (set_designator, process_init_element): Ignore initializers for
488 elements of a variable-size type or of error_mark_node.
489
726e292d
MS
4902020-03-01 Martin Sebor <msebor@redhat.com>
491
492 PR middle-end/93926
493 * c-decl.c (types_close_enough_to_match): New function.
494 (match_builtin_function_types):
495 (diagnose_mismatched_decls): Add missing inform call to a warning.
496
a499c2f8
MS
4972020-03-01 Martin Sebor <msebor@redhat.com>
498
499 PR c/93812
500 * c-typeck.c (build_functype_attribute_variant): New function.
501 (composite_type): Call it.
502
9c3da8cc
JJ
5032020-02-25 Jakub Jelinek <jakub@redhat.com>
504
505 PR other/93912
506 * gimple-parser.c (c_parser_gimple_parse_bb_spec_edge_probability):
507 Rename last argument from probablity to probability.
508
bacdd5e9
JJ
5092020-02-13 Jakub Jelinek <jakub@redhat.com>
510
511 PR c/93576
512 * c-decl.c (grokdeclarator): If this_size_varies, only push size into
513 *expr if it has side effects.
514
f9eb0973
JL
5152020-01-30 Jeff Law <law@redhat.com>
516
517 PR c/88660
518 * c-parser.c (c_parser_switch_statement): Make sure to request
519 marking the switch expr as used.
520
ac68e287
JM
5212020-01-22 Joseph Myers <joseph@codesourcery.com>
522
523 PR c/93348
524 * c-typeck.c (build_c_cast): Call remove_c_maybe_const_expr on
525 argument with integer operands.
526
852f0ae8
KK
5272020-01-16 Kerem Kat <keremkat@gmail.com>
528
529 PR c/92833
530 * c-parser.c (c_parser_consume_token): Fix peeked token stack pop
531 to support 4 available tokens.
532
e2346a33
JM
5332020-01-15 Joseph Myers <joseph@codesourcery.com>
534
535 PR c/93072
536 * c-decl.c (pushdecl): Use TREE_PUBLIC, not DECL_EXTERNAL, to
537 determine whether to set DECL_CONTEXT.
538
3d77686d
JM
5392020-01-13 Joseph Myers <joseph@codesourcery.com>
540
541 PR c/93241
542 * c-typeck.c (build_c_cast): Check for expressions with integer
543 operands that can occur in an unevaluated part of an integer
544 constant expression and call note_integer_operands as needed.
545
f74c4b2c
RB
5462019-01-08 Richard Biener <rguenther@suse.de>
547
548 PR middle-end/93199
549 * gimple-parser.c (c_parser_parse_gimple_body): Remove __PHI IFN
550 permanently.
551
8d9254fc
JJ
5522020-01-01 Jakub Jelinek <jakub@redhat.com>
553
554 Update copyright years.
555
39292e25
EB
5562019-12-20 Eric Botcazou <ebotcazou@adacore.com>
557
558 * c-decl.c (collect_source_ref_cb): Delete.
559 (for_each_global_decl): Rename into...
560 (collect_source_refs): ...this. Call collect_source_ref directly.
561 (c_parse_final_cleanups): Always call collect_source_ref on the main
562 input filename.
563
519d7496
JB
5642019-12-19 Julian Brown <julian@codesourcery.com>
565 Cesar Philippidis <cesar@codesourcery.com>
566
567 * c-parser.c (c_parser_omp_clause_name): Add parsing of attach and
568 detach clauses.
569 (c_parser_omp_variable_list): Add ALLOW_DEREF optional parameter.
570 Allow deref (->) in variable lists if true.
571 (c_parser_omp_var_list_parens): Add ALLOW_DEREF optional parameter.
572 Pass to c_parser_omp_variable_list.
573 (c_parser_oacc_data_clause): Support attach and detach clauses. Update
574 call to c_parser_omp_variable_list.
575 (c_parser_oacc_all_clauses): Support attach and detach clauses.
576 (OACC_DATA_CLAUSE_MASK, OACC_ENTER_DATA_CLAUSE_MASK,
577 OACC_KERNELS_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK,
578 OACC_SERIAL_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_ATTACH.
579 (OACC_EXIT_DATA_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_DETACH.
580 * c-typeck.c (handle_omp_array_sections_1): Reject subarrays for attach
581 and detach. Support deref.
582 (handle_omp_array_sections): Use GOMP_MAP_ATTACH_DETACH instead of
583 GOMP_MAP_ALWAYS_POINTER for OpenACC.
584 (c_oacc_check_attachments): New function.
585 (c_finish_omp_clauses): Check attach/detach arguments for being
586 pointers using above. Support deref.
587
a6163563
JB
5882019-12-19 Julian Brown <julian@codesourcery.com>
589 Maciej W. Rozycki <macro@codesourcery.com>
590 Tobias Burnus <tobias@codesourcery.com>
591 Thomas Schwinge <thomas@codesourcery.com>
592
593 * c-parser.c (c_parser_omp_clause_name): Support no_create.
594 (c_parser_oacc_data_clause): Likewise.
595 (c_parser_oacc_all_clauses): Likewise.
596 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
597 (OACC_PARALLEL_CLAUSE_MASK, OACC_SERIAL_CLAUSE_MASK): Add
598 PRAGMA_OACC_CLAUSE_NO_CREATE.
599 * c-typeck.c (handle_omp_array_sections): Support
600 GOMP_MAP_NO_ALLOC.
601
d68f5d45
DM
6022019-12-09 David Malcolm <dmalcolm@redhat.com>
603
604 * c-objc-common.c (range_label_for_type_mismatch::get_text):
605 Replace label_text ctor calls.
606
4691bf46
JM
6072019-12-04 Joseph Myers <joseph@codesourcery.com>
608
609 PR c/36941
610 PR c/88827
611 * c-typeck.c (convert_lvalue_to_rvalue): Call
612 require_complete_type for arguments not of void types.
613 (build_indirect_ref): Do not diagnose dereferencing pointers to
614 incomplete types.
615 * c-tree.h (C_TYPE_ERROR_REPORTED): Remove.
616
85d11957
JM
6172019-12-03 Joseph Myers <joseph@codesourcery.com>
618
619 PR c/88704
620 * c-decl.c (store_parm_decls_oldstyle): Diagnose use of [*] in
621 old-style parameter definitions.
622
4569f8b3
SL
6232019-12-01 Sandra Loosemore <sandra@codesourcery.com>
624
625 PR target/92499
626
627 * c-decl.c (flexible_array_type_p): Move to common code.
628
65ef05d0
RS
6292019-11-30 Richard Sandiford <richard.sandiford@arm.com>
630
631 * c-decl.c (start_decl): Allow initialization of variables whose
632 size is a POLY_INT_CST.
633 (finish_decl): Use verify_type_context to check whether the target
634 allows variables with a particular type to have static or thread-local
635 storage duration. Don't raise a second error if such variables do
636 not have a constant size.
637 (grokdeclarator): Use verify_type_context to check whether the
638 target allows fields or array elements to have a particular type.
639 * c-typeck.c (pointer_diff): Use verify_type_context to test whether
640 the target allows pointer difference for the types involved.
641 (build_unary_op): Likewise for pointer increment and decrement.
642
34b43828
JM
6432019-11-29 Joseph Myers <joseph@codesourcery.com>
644
645 * c-parser.c (struct c_parser): Add members raw_tokens and
646 raw_tokens_used.
647 (c_lex_one_token): Add argument raw. Handle lexing raw tokens and
648 using previously-lexed raw tokens.
649 (c_parser_peek_nth_token_raw)
650 (c_parser_check_balanced_raw_token_sequence): New functions.
651 (c_parser_nth_token_starts_std_attributes): Use
652 c_parser_check_balanced_raw_token_sequence for Objective-C.
653
5b8d9367
JM
6542019-11-25 Joseph Myers <joseph@codesourcery.com>
655
656 PR c/91985
657 * c-decl.c (finish_declspecs): Use int instead of decimal
658 floating-point types if decimal floating-point not supported.
659
1723e1be
JM
6602019-11-25 Joseph Myers <joseph@codesourcery.com>
661
662 * c-tree.h (struct c_declarator): Use a structure for id member.
663 * c-decl.c (grokdeclarator): Extract attributes from cdk_id
664 declarators at the start, not when handling individual declarators
665 later. Use u.id.id instead of u.id.
666 (grokfield): Use u.id.id instead of u.id.
667 (build_id_declarator): Set u.id.id and u.id.attrs.
668 (finish_declspecs): Handle postfix attributes in case of typedef
669 name or typeof used.
670 * c-parser.c (c_parser_direct_declarator)
671 (c_parser_direct_declarator_inner): Place declarator for
672 attributes inside that for function or array, not outside. Set
673 u.id.attrs for identifiers.
674 (c_parser_parameter_declaration): Use u.id.id instead of u.id.
675 * gimple-parser.c (c_parser_gimple_declaration): Use u.id.id
676 instead of u.id.
677
bdaf8be1
JJ
6782019-11-22 Jakub Jelinek <jakub@redhat.com>
679
680 PR c/90677
681 * c-decl.c (identifier_global_tag): Define.
682
3e00ba47
RB
6832019-11-20 Richard Biener <rguenther@suse.de>
684
685 PR c/92088
686 * c-decl.c (grokdeclarator): Prevent inlining of nested
687 function with VLA arguments.
688
8c5b727a
JM
6892019-11-20 Joseph Myers <joseph@codesourcery.com>
690
691 * c-decl.c (c_warn_type_attributes): New function.
692 (groktypename, grokdeclarator, finish_declspecs): Call
693 c_warn_type_attributes before applying attributes to types.
694 * c-tree.h (c_warn_type_attributes): Declare.
695
192961ff
JM
6962019-11-19 Joseph Myers <joseph@codesourcery.com>
697
698 * c-decl.c (c_warn_unused_attributes): Use pedwarn not warning for
699 standard attributes.
700 * c-parser.c (c_parser_std_attribute): Take argument for_tm. Use
701 pedwarn for unknown standard attributes and return error_mark_node
702 for them.
703
20a38017
MM
7042019-11-18 Matthew Malcomson <matthew.malcomson@arm.com>
705
706 * c-parser.c (c_parser_parse_rtl_body): Always call
707 run_rtl_passes, even if startwith pass is not provided.
708
d5fbe5e0
JM
7092019-11-15 Joseph Myers <joseph@codesourcery.com>
710
711 * c-parser.c (c_parser_std_attribute_specifier): Diagnose
712 duplicate standard attributes.
713
97cc1187
JM
7142019-11-15 Joseph Myers <joseph@codesourcery.com>
715
716 * c-decl.c (std_attribute_table): Add maybe_unused.
717
f8aea5e3
JM
7182019-11-15 Joseph Myers <joseph@codesourcery.com>
719
720 * c-decl.c (std_attribute_table): Add fallthrough.
721 * c-parser.c (c_parser_declaration_or_fndef): Diagnose fallthrough
722 attribute at top level.
723
2cc94aa8
JM
7242019-11-15 Joseph Myers <joseph@codesourcery.com>
725
726 * c-decl.c (std_attribute_table): New.
727 (c_init_decl_processing): Register attributes from
728 std_attribute_table.
729 * c-parser.c (c_parser_attribute_arguments): Add arguments
730 require_string and allow_empty_args. All callers changed.
731 (c_parser_std_attribute): Set require_string argument for
732 "deprecated" attribute.
733
7c5890cc
JM
7342019-11-14 Joseph Myers <joseph@codesourcery.com>
735
736 * c-parser.c (c_parser_postfix_expression)
737 (c_parser_check_literal_zero): Handle CPP_UTF8CHAR.
738 * gimple-parser.c (c_parser_gimple_postfix_expression): Likewise.
739
e8738f4e
RS
7402019-11-14 Richard Sandiford <richard.sandiford@arm.com>
741
742 * c-typeck.c (build_conditional_expr): Use truth_type_for instead
743 of build_same_sized_truth_vector_type.
744 (build_vec_cmp): Likewise.
745
b2417b59
JJ
7462019-11-14 Jakub Jelinek <jakub@redhat.com>
747
bedb7f04
JJ
748 * c-parser.c (c_parser_omp_context_selector): Don't require score
749 argument to fit into shwi, just to be INTEGER_CST. Diagnose
750 negative score.
751
b2417b59
JJ
752 * c-parser.c (c_parser_omp_context_selector): Rename
753 CTX_PROPERTY_IDLIST to CTX_PROPERTY_NAME_LIST, add CTX_PROPERTY_ID.
754 Use CTX_PROPERTY_ID for atomic_default_mem_order, only allow a single
755 identifier in that. For CTX_PROPERTY_NAME_LIST, allow identifiers
756 and string literals.
757
4e03c3a7
JM
7582019-11-14 Joseph Myers <joseph@codesourcery.com>
759
760 * c-tree.h (enum c_typespec_kind): Add ctsk_tagref_attrs and
761 ctsk_tagfirstref_attrs.
762 (struct c_declspecs): Update description of attrs. Add
763 postfix_attrs and non_std_attrs_seen_p. Increase size of
764 typespec_kind bit-field.
765 (c_warn_unused_attributes): New declaration.
766 (parser_xref_tag): Update prototype.
767 * c-decl.c (c_warn_unused_attributes): New function.
768 (shadow_tag_warned): Handle ctsk_tagfirstref_attrs and
769 ctsk_tagref_attrs. Handle attribute declarations.
770 (check_compound_literal_type): Handle ctsk_tagfirstref_attrs.
771 (grokdeclarator): Handle standard attributes.
772 (parser_xref_tag): Add arguments have_std_attrs and attrs. Apply
773 attributes to incomplete type reference.
774 (xref_tag): Update call to parser_xref_tag.
775 (declspecs_add_addrspace, declspecs_add_type)
776 (declspecs_add_scspec, declspecs_add_attrs): Set
777 non_std_attrs_seen_p.
778 (finish_declspecs): Apply postfix standard attributes to type.
779 * c-parser.c (c_token_starts_declspecs)
780 (c_token_starts_declaration, c_parser_next_token_starts_declspecs)
781 (c_parser_next_tokens_start_declaration): Update comments.
782 (c_parser_consume_token, c_parser_consume_pragma): Handle moving
783 parser->tokens[2] to parser->tokens[1].
784 (c_parser_nth_token_starts_std_attributes)
785 (c_parser_std_attribute_specifier_sequence): New functions.
786 (c_parser_declaration_or_fndef): Add arguments have_attrs and
787 attrs. All callers changed. Handle standard attributes.
788 (c_parser_parms_declarator, c_parser_parms_list_declarator)
789 (c_parser_parameter_declaration): Add argument have_gnu_attrs.
790 All callers changed.
791 (c_parser_declspecs): Add arguments start_std_attr_ok and
792 end_std_attr_ok. All callers changed. Handle standard
793 attributes.
794 (c_parser_enum_specifier, c_parser_struct_or_union_specifier)
795 (c_parser_direct_declarator, c_parser_direct_declarator_inner)
796 (c_parser_compound_statement_nostart, c_parser_all_labels)
797 (c_parser_label, c_parser_statement, c_parser_for_statement):
798 Handle standard attributes.
799 * c-parser.h (c_parser_declspecs): Update prototype.
800 * gimple-parser.c (c_parser_gimple_declaration): Update call to
801 c_parser_declspecs.
802
0c29cac4
ML
8032019-11-12 Martin Liska <mliska@suse.cz>
804
805 * gimple-parser.c: Do not include params.h.
806
028d4092
ML
8072019-11-12 Martin Liska <mliska@suse.cz>
808
809 * gimple-parser.c (c_parser_parse_gimple_body): Replace old parameter syntax
810 with the new one, include opts.h if needed. Use SET_OPTION_IF_UNSET
811 macro.
812
62aee289
MR
8132019-11-12 Maciej W. Rozycki <macro@codesourcery.com>
814 Frederik Harwath <frederik@codesourcery.com>
815
816 gcc/c/
817 * c-parser.c (OACC_SERIAL_CLAUSE_MASK): New macro.
818 (c_parser_oacc_kernels_parallel): Rename function to...
819 (c_parser_oacc_compute): ... this. Handle PRAGMA_OACC_SERIAL.
820 (c_parser_omp_construct): Update accordingly.
821
822
7cec9588
JJ
8232019-11-11 Jakub Jelinek <jakub@redhat.com>
824
825 * c-parser.c (c_parser_translation_unit): Diagnose declare target
826 without corresponding end declare target.
827
f486280c
RS
8282019-11-08 Richard Sandiford <richard.sandiford@arm.com>
829
830 * c-convert.c (convert): Only handle vector conversions if one of
831 the types satisfies gnu_vector_type_p or if -flax-vector-conversions
832 allows it.
833 * c-typeck.c (build_array_ref): Only allow vector indexing if the
834 vectors satisfy gnu_vector_type_p.
835 (build_unary_op): Only allow unary operators to be applied to
836 vectors if they satisfy gnu_vector_type_p.
837 (digest_init): Only allow by-element initialization of vectors
838 if they satisfy gnu_vector_type_p.
839 (really_start_incremental_init): Likewise.
840 (push_init_level): Likewise.
841 (pop_init_level): Likewise.
842 (process_init_element): Likewise.
843 (build_binary_op): Only allow binary operators to be applied to
844 vectors if they satisfy gnu_vector_type_p.
845
017c6491
JM
8462019-11-08 Joseph Myers <joseph@codesourcery.com>
847
848 * c-decl.c (grokparms): Convert () in a function definition to
849 (void) for C2x.
850 (store_parm_decls_oldstyle): Pedwarn for C2x.
851 (store_parm_decls): Update comment about () not generating a
852 prototype.
853
c01bd174
JM
8542019-11-07 Joseph Myers <joseph@codesourcery.com>
855
856 * c-parser.c (c_parser_attribute_arguments): New function.
857 Factored out of c_parser_gnu_attribute.
858 (c_parser_gnu_attribute): Use c_parser_attribute_arguments.
859 (c_parser_balanced_token_sequence, c_parser_std_attribute)
860 (c_parser_std_attribute_specifier): New functions.
861 (c_parser_transaction_attributes): Use
862 c_parser_std_attribute_specifier.
863
471c5330
JM
8642019-11-07 Joseph Myers <joseph@codesourcery.com>
865
866 * c-parser.c (c_parser): Remove lex_untranslated_string. Add
867 lex_joined_string and translate_strings_p.
868 (c_lex_one_token): Pass 0 or C_LEX_STRING_NO_JOIN to
869 c_lex_with_flags.
870 (c_parser_string_literal): New function.
871 (c_parser_static_assert_declaration_no_semi): Use
872 c_parser_string_literal. Do not set lex_untranslated_string.
873 (c_parser_asm_string_literal): Use c_parser_string_literal.
874 (c_parser_simple_asm_expr): Do not set lex_untranslated_string.
875 (c_parser_gnu_attributes): Set and restore translate_strings_p
876 instead of lex_untranslated_string.
877 (c_parser_asm_statement): Do not set lex_untranslated_string.
878 (c_parser_asm_operands): Likewise.
879 (c_parser_has_attribute_expression): Set and restore
880 translate_strings_p instead of lex_untranslated_string.
881 (c_parser_postfix_expression): Use c_parser_string_literal.
882 (pragma_lex): Likewise.
883 (c_parser_pragma_pch_preprocess): Set lex_joined_string.
884 (c_parse_file): Set translate_strings_p.
885 * gimple-parser.c (c_parser_gimple_postfix_expression)
886 (c_parser_gimple_or_rtl_pass_list): Use c_parser_string_literal.
887 * c-parser.c (c_parser_string_literal): Declare function.
888
d0c464d2
JJ
8892019-11-02 Jakub Jelinek <jakub@redhat.com>
890
891 * c-parser.c (c_finish_omp_declare_variant): Use
892 omp_get_context_selector instead of c_omp_get_context_selector.
893
ac2cfa6c
RS
8942019-10-29 Richard Sandiford <richard.sandiford@arm.com>
895
896 * c-tree.h (c_simulate_enum_decl): Declare.
897 * c-decl.c (c_simulate_enum_decl): New function.
898 * c-objc-common.h (LANG_HOOKS_SIMULATE_ENUM_DECL): Define to the above.
899
74078538
RS
9002019-10-29 Richard Sandiford <richard.sandiford@arm.com>
901
902 * c-tree.h (c_simulate_builtin_function_decl): Declare.
903 * c-decl.c (c_simulate_builtin_function_decl): New function.
904 * c-objc-common.h (LANG_HOOKS_SIMULATE_BUILTIN_FUNCTION_DECL): Define
905 to the above.
906
ad1539d5
MS
9072019-10-28 Martin Sebor <msebor@redhat.com>
908
909 PR c/66970
910 * c-decl.c (names_builtin_p): Define a new function.
911
cb73e4e7
RB
9122019-10-28 Richard Biener <rguenther@suse.de>
913
914 PR c/92249
915 * gimple-parser.c (c_parser_parse_gimple_body): Make
916 current_bb the entry block initially to easier recover
917 from errors.
918 (c_parser_gimple_compound_statement): Adjust.
919
135df52c
JJ
9202019-10-24 Jakub Jelinek <jakub@redhat.com>
921
922 * c-parser.c (c_finish_omp_declare_variant): Use
923 omp_context_selector_matches instead of
924 c_omp_context_selector_matches.
925 * c-decl.c (c_decl_attributes): Add "omp declare target block"
926 attribute in between declare target and end declare target
927 pragmas.
928
783bfe5e
JM
9292019-10-15 Joseph Myers <joseph@codesourcery.com>
930
931 * c-parser.c (c_parser_attribute_any_word): Rename to
932 c_parser_gnu_attribute_any_word. All callers changed.
933 (c_parser_attribute): Rename to c_parser_gnu_attribute. All
934 callers changed.
935 (c_parser_attributes): Rename to c_parser_gnu_attributes. All
936 callers changed.
937 (c_parser_declaration_or_fndef, c_parser_declspecs)
938 (c_parser_enum_specifier, c_parser_struct_or_union_specifier)
939 (c_parser_struct_declaration, c_parser_declarator)
940 (c_parser_gnu_attribute, c_parser_compound_statement)
941 (c_parser_label, c_parser_statement, c_parser_objc_method_decl)
942 (c_parser_transaction_attributes): Add "gnu-" prefix to names of
943 attribute-related syntax productions.
944
56898e43
RS
9452019-10-14 Richard Sandiford <richard.sandiford@arm.com>
946
947 * c-objc-common.c (useful_aka_type_p): Replace with...
948 (get_aka_type): ...this new function. Given the original type,
949 decide which aka type to print (if any). Only look through typedefs
950 if user_facing_original_type_p.
951 (print_type): Update accordingly.
952
b9424661
JJ
9532019-10-14 Jakub Jelinek <jakub@redhat.com>
954
955 * c-parser.c (c_parser_omp_all_clauses): Change bool NESTED_P argument
956 into int NESTED, if it is 2, diagnose missing commas in between
957 clauses.
958 (c_parser_omp_context_selector): Pass 2 as last argument to
959 c_parser_omp_all_clauses.
960
20de9568
JJ
9612019-10-12 Jakub Jelinek <jakub@redhat.com>
962
963 * c-parser.c (c_parser_omp_context_selector): Improve error recovery.
964 For simd properties, put them directly into TREE_VALUE.
965 (c_finish_omp_declare_variant): Call c_omp_mark_declare_variant.
966 If c_omp_context_selector_matches is 0, don't add attribute, otherwise
967 add "omp declare variant base" attribute rather than
968 "omp declare variant".
969
fe2bc27c
JM
9702019-10-11 Joseph Myers <joseph@codesourcery.com>
971
972 * c-decl.c (declspecs_add_type): Use pedwarn_c11 for DFP types.
973
94e7f906
JJ
9742019-10-10 Jakub Jelinek <jakub@redhat.com>
975
976 * c-parser.c (c_parser_omp_all_clauses): Add NESTED_P argument, if
977 true, terminate processing on closing paren and don't skip to end of
978 pragma line.
979 (c_parser_omp_declare_simd): Handle also declare variant.
980 (omp_construct_selectors, omp_device_selectors,
981 omp_implementation_selectors, omp_user_selectors): New variables.
982 (c_parser_omp_context_selector,
983 c_parser_omp_context_selector_specification,
984 c_finish_omp_declare_variant): New functions.
985 (c_finish_omp_declare_simd): Handle both declare simd and
986 declare variant.
987 (c_parser_omp_declare): Handle declare variant.
988
93313b94
JM
9892019-10-02 Joseph Myers <joseph@codesourcery.com>
990
991 * c-parser.c (c_parser_asm_statement): Handle CPP_SCOPE like two
992 CPP_COLON tokens.
993
55879815
RS
9942019-10-01 Richard Sandiford <richard.sandiford@arm.com>
995
996 * c-objc-common.c (useful_aka_type_p): New function.
997 (print_type): Use it to decide whether an aka type is worth printing.
998
59bc434a
JJ
9992019-09-27 Jakub Jelinek <jakub@redhat.com>
1000
1001 PR c++/88203
1002 * c-parser.c (c_parser_predefined_identifier): New function.
1003 (c_parser_postfix_expression): Use it.
1004 (c_parser_omp_variable_list): Parse predefined identifiers.
1005 * c-typeck.c (c_finish_omp_clauses): Allow predefined variables
1006 in shared and firstprivate clauses, even when they are predetermined
1007 shared.
1008
c6447c20
RS
10092019-09-27 Richard Sandiford <richard.sandiford@arm.com>
1010
1011 * c-typeck.c (build_function_call_vec): Take the original function
1012 decl as an optional final parameter. Pass all built-in calls to
1013 check_builtin_function_arguments.
1014
522da4c2
EB
10152019-09-20 Eric Botcazou <ebotcazou@adacore.com>
1016
1017 PR c/91815
1018 * c-decl.c (pushdecl): In C detect duplicate declarations across scopes
1019 of identifiers in the external scope only for variables and functions.
1020
68e2c199
PK
10212019-09-04 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1022
1023 PR c/78736
1024 * c-typeck.c (convert_for_assignment): Handle Wenum-conversion.
1025
22f8849d
IS
10262019-08-23 Iain Sandoe <iain@sandoe.co.uk>
1027
1028 PR pch/61250
1029 * c-parser.c (c_parse_file): Call c_common_no_more_pch ()
1030 after determining that the first token is not
1031 PRAGMA_GCC_PCH_PREPROCESS.
1032
db376f45
EB
10332019-08-22 Eric Botcazou <ebotcazou@adacore.com>
1034
1035 * c-parser.c (c_parser_declaration_or_fndef): Set DECL_ARGUMENTS of a
1036 FUNCTION_DECL to the right value in the presence of nested declarators.
1037
4d732405
RS
10382019-08-13 Richard Sandiford <richard.sandiford@arm.com>
1039
1040 PR middle-end/91421
1041 * c-decl.c (merge_decls): Use copy_decl_built_in_function.
1042
cb1180d5
RS
10432019-08-13 Richard Sandiford <richard.sandiford@arm.com>
1044
1045 PR middle-end/91421
1046 * c-decl.c (header_for_builtin_fn): Take a FUNCTION_DECL instead
1047 of a built_in_function.
1048 (diagnose_mismatched_decls, implicitly_declare): Update accordingly.
1049
77eb117f
JJ
10502019-08-10 Jakub Jelinek <jakub@redhat.com>
1051
1052 * c-parser.c (c_parser_omp_clause_name): Parse device_type.
1053 (c_parser_omp_clause_device_type): New function.
1054 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_DEVICE_TYPE.
1055 (OMP_DECLARE_TARGET_CLAUSE_MASK): Add PRAGMA_OMP_CLAUSE_DEVICE_TYPE.
1056 (c_parser_omp_declare_target): Handle device_type clauses. Remove
1057 diagnostics for declare target with clauses nested in clause-less
1058 declare target declaration-definition-seq.
1059 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_DEVICE_TYPE.
1060
2c3b8bad
JJ
10612019-08-09 Jakub Jelinek <jakub@redhat.com>
1062
bb522e2e
JJ
1063 * c-parser.c (check_no_duplicate_clause): Simplify using
1064 omp_find_clause.
1065 (c_parser_omp_clause_if): Fix up printing of target {enter,exit} data
1066 directive name modifiers.
1067 (c_parser_omp_clause_proc_bind): Check for duplicate proc_bind clause.
1068
2c3b8bad
JJ
1069 PR c/91401
1070 * c-parser.c (c_parser_omp_clause_dist_schedule): Fix up typos in the
1071 check_no_duplicate_clause call. Comment it out, instead emit a
1072 warning for duplicate dist_schedule clauses.
1073
99769e7f
RS
10742019-08-08 Richard Sandiford <richard.sandiford@arm.com>
1075
1076 * c-decl.c (finish_enum): Clear C_TYPE_BEING_DEFINED.
1077
8860d270
JJ
10782019-08-08 Jakub Jelinek <jakub@redhat.com>
1079
1080 * c-typeck.c (c_finish_omp_clauses): For C_ORT_OMP
1081 OMP_CLAUSE_USE_DEVICE_* clauses use oacc_reduction_head bitmap
1082 instead of generic_head to track duplicates.
1083
398e3feb
JJ
10842019-08-07 Jakub Jelinek <jakub@redhat.com>
1085
1086 * c-parser.c (c_parser_omp_clause_name): Parse use_device_addr clause.
1087 (c_parser_omp_clause_use_device_addr): New function.
1088 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR.
1089 (OMP_TARGET_DATA_CLAUSE_MASK): Add PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR.
1090 (c_parser_omp_target_data): Handle PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR
1091 like PRAGMA_OMP_CLAUSE_USE_DEVICE_PTR, adjust diagnostics about no
1092 map or use_device_* clauses.
1093 * c-typeck.c (c_finish_omp_clauses): For OMP_CLAUSE_USE_DEVICE_PTR
1094 in OpenMP, require pointer type rather than pointer or array type.
1095 Handle OMP_CLAUSE_USE_DEVICE_ADDR.
1096
a28351e7
JJ
10972019-07-31 Jakub Jelinek <jakub@redhat.com>
1098
1099 PR c/91192
1100 * c-parser.c (c_parser_sizeof_expression): Call set_c_expr_source_range
1101 even if finish is UNKNOWN_LOCATION, just use start as finish in that
1102 case.
1103
6343b6bf
ML
11042019-07-25 Martin Liska <mliska@suse.cz>
1105 Dominik Infuhr <dominik.infuehr@theobroma-systems.com>
1106
1107 PR c++/23383
1108 * c-decl.c (merge_decls): Merge OPERATOR_DELETE flag.
1109
cb50701e
ML
11102019-07-25 Martin Liska <mliska@suse.cz>
1111
1112 * c-decl.c (merge_decls): Use new macros
1113 (e.g. DECL_SET_LAMBDA_FUNCTION and DECL_LAMBDA_FUNCTION_P).
1114
62e3e66f
RB
11152019-07-23 Richard Biener <rguenther@suse.de>
1116
1117 PR tree-optimization/83518
1118 * gimple-parser.c (c_parser_parse_gimple_body): When we have
1119 a CFG also rebuild cgraph edges.
1120
554a530f
JJ
11212019-07-20 Jakub Jelinek <jakub@redhat.com>
1122
1123 * c-parser.c (c_parser_omp_clause_name): Handle bind clause.
1124 (c_parser_omp_clause_bind): New function.
1125 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_BIND.
1126 (OMP_LOOP_CLAUSE_MASK): Define.
1127 (c_parser_omp_loop): New function.
1128 (c_parser_omp_parallel, c_parser_omp_teams): Handle parsing of
1129 loop combined with parallel or teams.
1130 (c_parser_omp_construct): Handle PRAGMA_OMP_LOOP.
1131 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_BIND.
1132
d119bf79
RS
11332019-07-18 Richard Sandiford <richard.sandiford@arm.com>
1134
1135 PR c/53633
1136 * c-decl.c (finish_function): Check targetm.warn_func_return
1137 before issuing a -Wreturn-type warning.
1138
ab20d992 11392019-07-12 Alexandre Oliva <oliva@adacore.com>
fdc1f343
AO
1140
1141 * gimple-parser.c (c_parser_gimple_try_stmt): New.
1142 (c_parser_compound_statement): Call it.
1143
1fdd6f04
JJ
11442019-07-12 Jakub Jelinek <jakub@redhat.com>
1145
1146 * c-parser.c (c_parser_omp_clause_name): Handle order clause.
1147 (c_parser_omp_clause_order): New function.
1148 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_ORDER.
1149 (OMP_SIMD_CLAUSE_MASK, OMP_FOR_CLAUSE_MASK): Add
1150 PRAGMA_OMP_CLAUSE_ORDER.
1151 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_ORDER.
1152
8389386c
RB
11532019-07-10 Richard Biener <rguenther@suse.de>
1154
1155 * gimple-parser.c (c_parser_gimple_postfix_expression): Support
1156 _Literal (int *) &x for address literals.
1157
99b1c316
MS
11582019-07-09 Martin Sebor <msebor@redhat.com>
1159
1160 PR c++/61339
1161 * c-decl.c (xref_tag): Change class-key of PODs to struct and others
1162 to class.
1163 (field_decl_cmp): Same.
1164 * c-parser.c (c_parser_struct_or_union_specifier): Same.
1165 * c-tree.h: Same.
1166 * gimple-parser.c (c_parser_gimple_compound_statement): Same.
1167
6c1dae73
MS
11682019-07-09 Martin Sebor <msebor@redhat.com>
1169
1170 PR c++/61339
1171 * c-decl.c: Change class-key from class to struct and vice versa
1172 to match convention and avoid -Wclass-is-pod and -Wstruct-no-pod.
1173 * gimple-parser.c: Same.
1174
69b5279e
RB
11752019-07-01 Richard Biener <rguenther@suse.de>
1176
1177 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
1178 _Literal (char *) &"foo" for address literals pointing to
1179 STRING_CSTs.
1180
ab20d992
JJ
11812019-06-25 Jozef Lawrynowicz <jozef.l@mittosystems.com>
1182
1183 * c-parser.c (c_parse_init): Create keyword for "__intN__" type.
1184 * c-decl.c (declspecs_add_type): Don't pedwarn about "__intN" ISO
1185 C incompatibility if alternate "__intN__" form is used.
1186
1e3d475e
MS
11872019-06-24 Martin Sebor <msebor@redhat.com>
1188
1189 * c-typeck.c (build_binary_op): Hyphenate floating-point.
1190
bf38f7e9
JJ
11912019-06-10 Jakub Jelinek <jakub@redhat.com>
1192
1193 * c-parser.c (c_parser_pragma): Reject PRAGMA_OMP_SCAN.
1194 (c_parser_omp_clause_reduction): Don't sorry_at on inscan reductions.
1195 (c_parser_omp_scan_loop_body): New function.
1196 (c_parser_omp_for_loop): Call c_parser_omp_scan_loop_body if there are
1197 inscan reduction clauses.
1198 * c-typeck.c (c_finish_omp_clauses): Reject mixing inscan with
1199 non-inscan reductions on the same construct, or inscan reductions with
1200 ordered or schedule clauses, or inscan array reductions.
1201
65985d78
MS
12022019-06-05 Martin Sebor <msebor@redhat.com>
1203
1204 PR c/90737
1205 * c-typeck.c (c_finish_return): Only consider functions returning
1206 pointers as candidates for -Wreturn-local-addr.
1207
0ecf545c
MS
12082019-06-05 Martin Sebor <msebor@redhat.com>
1209
1210 * c-decl.c (start_decl): Adjust quoting and hyphenation
1211 in diagnostics.
1212 (finish_decl): Same.
1213 (finish_enum): Same.
1214 (start_function): Same.
1215 (declspecs_add_type): Same.
1216 * c-parser.c (warn_for_abs): Same.
1217 * c-typeck.c (build_binary_op): Same.
1218
e03436e7
TS
12192019-05-17 Thomas Schwinge <thomas@codesourcery.com>
1220
b48f44bf
TS
1221 PR c/89433
1222 * c-parser.c (c_finish_oacc_routine): Rework checking if already
1223 marked with an OpenACC 'routine' directive.
1224
5bf04509
TS
1225 PR c/89433
1226 * c-parser.c (c_parser_oacc_routine): Normalize order of clauses.
1227 (c_finish_oacc_routine): Call oacc_verify_routine_clauses.
1228
e03436e7
TS
1229 PR c/89433
1230 * c-parser.c (c_finish_oacc_routine): Refer to OpenACC 'routine'
1231 clauses from "omp declare target" attribute.
1232
a9c697b8
MS
12332019-05-16 Martin Sebor <msebor@redhat.com>
1234
ab20d992
JJ
1235 * c-decl.c (start_decl): Quote keywords, operators, and
1236 types in diagnostics.
1237 (finish_decl): Same.
1238 * c-parser.c (c_parser_asm_statement): Same.
1239 (c_parser_conditional_expression): Same.
1240 (c_parser_transaction_cancel): Same.
1241 * c-typeck.c (c_common_type): Same.
1242 (build_conditional_expr): Same.
1243 (digest_init): Same.
1244 (process_init_element): Same.
1245 (build_binary_op): Same.
a9c697b8 1246
c4499192
RB
12472019-05-17 Richard Biener <rguenther@suse.de>
1248
1249 * gimple-parser.c (c_parser_gimple_statement): Handle __VEC_PERM.
1250 (c_parser_gimple_unary_expression): Likewise.
1251 (c_parser_gimple_parentized_ternary_expression): New function.
1252
adfe6e4b
RB
12532019-05-16 Richard Biener <rguenther@suse.de>
1254
1255 * gimple-parser.c (c_parser_gimple_statement): Handle __BIT_INSERT.
1256 (c_parser_gimple_unary_expression): Likewise.
1257
186dabf2
RB
12582019-05-15 Richard Biener <rguenther@suse.de>
1259
1260 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
1261 __BIT_FIELD_REF.
1262
1158c5b4
RB
12632019-05-14 Richard Biener <rguenther@suse.de>
1264
1265 * gimple-parser.c (c_parser_gimple_statement): Remove
1266 questionable auto-promotion to VIEW_CONVERT_EXPR.
1267 (c_parser_gimple_typespec): Split out from __MEM parsing.
1268 (c_parser_gimple_postfix_expression): Handle __VIEW_CONVERT.
1269 * tree-pretty-print.c (dump_generic_node): Dump VIEW_CONVERT_EXPR
1270 as __VIEW_CONVERT with -gimple.
1271
fd4485aa
ML
12722019-05-09 Martin Liska <mliska@suse.cz>
1273
1274 * gimple-parser.c (c_parser_gimple_statement): Support __MIN and
1275 __MAX.
1276 (c_parser_gimple_unary_expression): Parse also binary expression
1277 __MIN and __MAX.
1278 (c_parser_gimple_parentized_binary_expression): New function.
1279
d276406a
ML
12802019-05-09 Martin Liska <mliska@suse.cz>
1281
1282 * gimple-parser.c (struct gimple_parser): Add probability.
1283 for gimple_parser_edge.
1284 (gimple_parser::push_edge): Add new argument probability.
1285 (c_parser_gimple_parse_bb_spec): Parse also probability
1286 if present.
1287 (c_parser_parse_gimple_body): Set edge probability.
1288 (c_parser_gimple_compound_statement): Consume token
1289 before calling c_parser_gimple_goto_stmt.
1290 Parse BB counts.
1291 (c_parser_gimple_statement): Pass new argument.
1292 (c_parser_gimple_goto_stmt): Likewise.
1293 (c_parser_gimple_if_stmt): Likewise.
1294 (c_parser_gimple_or_rtl_pass_list): Parse hot_bb_threshold.
1295 * c-parser.c (c_parser_declaration_or_fndef): Pass
1296 hot_bb_threshold argument.
1297 * c-tree.h (struct c_declspecs): Add hot_bb_threshold
1298 field.
1299 (c_parser_gimple_parse_bb_spec_edge_probability): New.
1300
f179b64e
JJ
13012019-04-26 Jakub Jelinek <jakub@redhat.com>
1302
1303 PR debug/90197
1304 * c-tree.h (c_finish_loop): Add 2 further location_t arguments.
1305 * c-parser.c (c_parser_while_statement): Adjust c_finish_loop caller.
1306 (c_parser_do_statement): Likewise.
1307 (c_parser_for_statement): Likewise. Formatting fixes.
1308 * c-typeck.c (c_finish_loop): Add COND_LOCUS and INCR_LOCUS arguments,
1309 emit DEBUG_BEGIN_STMTs if needed.
1310
e7178413
JJ
13112019-04-19 Jakub Jelinek <jakub@redhat.com>
1312
c280b7ee
JJ
1313 PR c/89888
1314 * c-typeck.c (struct c_switch): Remove outside_range_p member.
1315 (c_start_case): Don't clear it.
1316 (do_case): Adjust c_add_case_label caller.
1317 (c_finish_case): Adjust c_do_switch_warnings caller.
1318
e7178413
JJ
1319 PR c++/90108
1320 * c-decl.c (merge_decls): If remove is main variant and
1321 DECL_ORIGINAL_TYPE is some other type, remove a DECL_ORIGINAL_TYPE
1322 variant that has newdecl as TYPE_NAME if any.
1323
60a2c645
JJ
13242019-04-12 Jakub Jelinek <jakub@redhat.com>
1325
1326 PR c/89933
1327 * c-decl.c (merge_decls): When newdecl's type is its main variant,
1328 don't try to remove it from the variant list, but instead assert
1329 it has no variants.
1330
2a82beaa
RB
13312019-04-01 Richard Biener <rguenther@suse.de>
1332
1333 PR c/71598
1334 * c-tree.h (c_get_alias_set): Declare.
1335 * c-objc-common.h (LANG_HOOKS_GET_ALIAS_SET): Use c_get_alias_set.
1336 * c-objc-common.c (c_get_alias_set): Treat enumeral types
1337 as the underlying integer type.
1338
bec1da64
MS
13392019-03-19 Martin Sebor <msebor@redhat.com>
1340
1341 PR tree-optimization/89688
1342 * c-decl.c (finish_decl): Call braced_lists_to_string for more
1343 kinds of initializers.
1344
855cd9b1
JJ
13452019-03-19 Jakub Jelinek <jakub@redhat.com>
1346
1347 PR c/89734
1348 * c-decl.c (grokdeclarator): Call c_build_qualified_type on function
1349 return type even if quals_used is 0. Formatting fixes.
1350
baa09dc5
RB
13512019-03-14 Richard Biener <rguenther@suse.de>
1352
1353 * c-tree.h (enum c_declspec_il): New.
1354 (struct c_declspecs): Merge gimple_p and rtl_p into declspec_il
1355 enum bitfield.
1356 * c-parser.c (c_parser_declaration_or_fndef): Adjust accordingly.
1357 Pass start pass and declspec_il to c_parser_parse_gimple_body.
1358 (c_parser_declspecs): Adjust.
1359 * gimple-parser.c: Include cfg.h, cfghooks.h, cfganal.h, tree-cfg.h,
1360 gimple-iterator.h, cfgloop.h, tree-phinodes.h, tree-into-ssa.h
1361 and bitmap.h.
1362 (struct gimple_parser): New.
1363 (gimple_parser::push_edge): New method.
1364 (c_parser_gimple_parse_bb_spec): New helper.
1365 (c_parser_parse_gimple_body): Get start pass and IL specification.
1366 Initialize SSA and CFG.
1367 (c_parser_gimple_compound_statement): Handle CFG and SSA build.
1368 Build a gimple_parser parsing state and pass it along.
1369 (c_parser_gimple_statement): Change intermittend __PHI internal
1370 function argument for the edge.
1371 (c_parser_gimple_or_rtl_pass_list): Handle ssa, cfg flags.
1372 (c_parser_gimple_goto_stmt): Record edges to build.
1373 (c_parser_gimple_if_stmt): Likewise.
1374 * gimple-parser.h (c_parser_parse_gimple_body): Adjust.
1375 (c_parser_gimple_or_rtl_pass_list): Likewise.
1376
a3f9f006
ML
13772019-03-11 Martin Liska <mliska@suse.cz>
1378
1379 * c-decl.c (check_for_loop_decls): Wrap an option name
1380 in a string format message and fix GNU coding style.
1381 * c-parser.c (c_parser_declspecs): Likewise.
1382
1db01ff9
JJ
13832019-03-08 Jakub Jelinek <jakub@redhat.com>
1384
1385 PR tree-optimization/89550
1386 * c-decl.c (finish_function): Only set TREE_NO_WARNING if warning_at
1387 returned true.
1388 (c_write_global_declarations_1): Only set TREE_NO_WARNING if pedwarn
1389 or warning returned true.
1390
66dcb747
JJ
13912019-02-28 Jakub Jelinek <jakub@redhat.com>
1392
1393 PR c/89525
1394 * c-typeck.c (convert_arguments): Call inform_declaration only if
1395 the previous warning_at call returned true.
1396
2263c9f2
TS
13972019-02-22 Thomas Schwinge <thomas@codesourcery.com>
1398
1399 * c-parser.c (c_parser_oacc_shape_clause): Add loc formal
1400 parameter. Adjust all users.
1401 (c_parser_oacc_simple_clause): Replace parser with loc formal
1402 parameter. Adjust all users.
1403
ab20d992 14042019-02-19 Chung-Lin Tang <cltang@codesourcery.com>
19695f4d
CLT
1405
1406 PR c/87924
1407 * c-parser.c (c_parser_oacc_clause_wait): Add representation of wait
1408 clause without argument as 'wait (GOMP_ASYNC_NOVAL)', adjust comments.
1409
5f88ba10
JJ
14102019-02-15 Jakub Jelinek <jakub@redhat.com>
1411
1412 PR c/89340
1413 * c-decl.c (start_function): Clear TREE_PUBLIC on nested functions
1414 before c_decl_attributes rather than after it.
1415
cfc30fd1
JJ
14162019-02-06 Jakub Jelinek <jakub@redhat.com>
1417
1418 PR c/89211
1419 * c-parser.c (c_parser_declaration_or_fndef): Don't update
1420 DECL_ARGUMENTS of d if it has been defined already. Use a single if
1421 instead of 3 nested ifs.
1422
fbe83e6b
JM
14232019-02-06 Joseph Myers <joseph@codesourcery.com>
1424
1425 PR c/88584
1426 * c-decl.c (finish_decl): Do not complete array types for arrays
1427 with external linkage not at file scope.
1428
f461f938
RB
14292019-02-05 Richard Biener <rguenther@suse.de>
1430
1431 PR c/88606
1432 * c-decl.c (finish_struct): Reset TYPE_TRANSPARENT_AGGR on
1433 all type variants when not supported.
1434
fe509359
JJ
14352019-01-30 Jakub Jelinek <jakub@redhat.com>
1436
1437 PR c/89061
1438 * c-tree.h (C_DECL_COMPOUND_LITERAL_P): Define.
1439 * c-decl.c (decl_jump_unsafe): Return false for
1440 C_DECL_COMPOUND_LITERAL_P decls.
1441 (build_compound_literal): Set C_DECL_COMPOUND_LITERAL_P.
1442
6a335b96
JJ
14432019-01-29 Jakub Jelinek <jakub@redhat.com>
1444
f4b7e754
JJ
1445 PR c/89045
1446 * c-decl.c (build_compound_literal): Don't pushdecl if in parameter
1447 scope.
1448
6a335b96
JJ
1449 PR c/86125
1450 * c-decl.c (last_fileptr_type): Remove.
1451 (last_structptr_types): New variable.
1452 (match_builtin_function_types): Compare TYPE_MAIN_VARIANT of
1453 {old,new}rettype instead of the types themselves. Assert
1454 last_structptr_types array has the same number of elements
1455 as builtin_structptr_types array. Use TYPE_MAIN_VARIANT for
1456 argument oldtype and newtype. Instead of handling
1457 just fileptr_type_node specially, handle all builtin_structptr_types
1458 pointer nodes. Formatting fix.
1459
d8b5a1a0
MS
14602019-01-24 Martin Sebor <msebor@redhat.com>
1461
1462 PR c/86125
1463 PR c/88886
1464 PR middle-end/86308
1465 * c-decl.c (match_builtin_function_types): Add arguments.
1466 (diagnose_mismatched_decls): Diagnose mismatched declarations
1467 of built-ins more strictly.
1468
e21c4491
JJ
14692019-01-24 Jakub Jelinek <jakub@redhat.com>
1470
1471 PR c++/88976
1472 * c-typeck.c (c_finish_omp_cancel): Diagnose more than one if
1473 on #pragma omp cancel with different modifiers.
1474
420183d9
L
14752019-01-18 H.J. Lu <hongjiu.lu@intel.com>
1476
1477 PR c/51628
1478 PR c/88664
1479 * c-typeck.c (convert_for_assignment): Upate the
1480 warn_for_address_or_pointer_of_packed_member call.
1481
17ad43dd
TH
14822019-01-16 Tom Honermann <tom@honermann.net>
1483 Jason Merrill <jason@redhat.com>
1484
1485 * c-typeck.c (digest_init): Revised the error message produced for
1486 ill-formed cases of array initialization with a string literal.
1487 (error_init): Make variadic.
1488
5f07d78a
JJ
14892019-01-12 Jakub Jelinek <jakub@redhat.com>
1490
1491 * c-typeck.c (convert_for_assignment): Fix a comment typo.
1492
c4581bbf
JJ
14932019-01-07 Jakub Jelinek <jakub@redhat.com>
1494
1495 PR c/88701
1496 * c-decl.c (build_compound_literal): If not TREE_STATIC, only pushdecl
1497 if current_function_decl is non-NULL.
1498
65c5b1eb
JM
14992019-01-07 Joseph Myers <joseph@codesourcery.com>
1500
1501 PR c/88720
1502 PR c/88726
1503 * c-decl.c (pop_scope): Use TREE_PUBLIC and b->nested to determine
1504 whether a function is nested, not DECL_EXTERNAL. Diagnose inline
1505 functions declared but never defined only for external scope, not
1506 for other scopes.
1507
d8fcab68
JJ
15082019-01-07 Jakub Jelinek <jakub@redhat.com>
1509
1510 PR c++/85052
1511 * c-parser.c (c_parser_postfix_expression): Parse
1512 __builtin_convertvector.
1513
a5544970
JJ
15142019-01-01 Jakub Jelinek <jakub@redhat.com>
1515
1516 Update copyright years.
1517
da77eace
L
15182018-12-20 H.J. Lu <hongjiu.lu@intel.com>
1519
1520 PR c/51628
1521 * c-typeck.c (convert_for_assignment): Call
1522 warn_for_address_or_pointer_of_packed_member.
1523
1edf8866
SB
15242018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
1525
1526 * c-parser.c (c_parser_asm_statement) <RID_CONST, RID_RESTRICT>: Give
1527 a more specific error message (instead of just falling through).
1528
db4fd626
SB
15292018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
1530
1531 * c-parser.c (c_parser_asm_statement): Keep track of the location each
1532 asm qualifier is first seen; use that to give nicer "duplicate asm
1533 qualifier" messages. Delete 'quals" variable, instead pass the
1534 "is_volatile_ flag to build_asm_stmt directly.
1535 * c-tree.h (build_asm_stmt): Make the first arg bool instead of tree.
1536 * c-typeck.c (build_asm_stmt): Ditto; adjust.
1537
9c9cfcbb
SB
15382018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
1539
1540 * c-parser.c (c_parser_asm_statement): Rewrite the loop to work without
1541 "done" boolean variable.
1542
a14feb3c
DM
15432018-12-19 David Malcolm <dmalcolm@redhat.com>
1544
1545 PR c++/87504
1546 * c-typeck.c (class maybe_range_label_for_tree_type_mismatch):
1547 Move from here to gcc-rich-location.h and gcc-rich-location.c.
1548 (build_binary_op): Use struct op_location_t and
1549 class binary_op_rich_location.
1550
6d939173
JJ
15512018-12-11 Jakub Jelinek <jakub@redhat.com>
1552
1553 PR sanitizer/88426
1554 * c-convert.c (convert): Call c_fully_fold before calling
1555 ubsan_instrument_float_cast.
1556
b7055028
SB
15572018-12-08 Segher Boessenkool <segher@kernel.crashing.org>
1558
1559 * c-parser (c_parser_asm_statement) [RID_INLINE]: Delete stray line
1560 setting "quals".
1561
5b76e75f
SB
15622018-12-06 Segher Boessenkool <segher@kernel.crashing.org>
1563
1564 * c-parser.c (c_parser_asm_statement): Detect the inline keyword
1565 after asm. Pass a flag for it to build_asm_expr.
1566 * c-tree.h (build_asm_expr): Update declaration.
1567 * c-typeck.c (build_asm_stmt): Add is_inline parameter. Use it to
1568 set ASM_INLINE_P.
1569
30bd42b9
SB
15702018-12-06 Segher Boessenkool <segher@kernel.crashing.org>
1571
1572 PR inline-asm/55681
1573 * c-parser.c (c_parser_asm_statement): Update grammar. Allow any
1574 combination of volatile and goto, in any order, without repetitions.
1575
9df6c0e4
JB
15762018-12-04 James Norris <jnorris@codesourcery.com>
1577 Cesar Philippidis <cesar@codesourcery.com>
1578 Julian Brown <julian@codesourcery.com>
1579
1580 * c-parser.c (c_parser_oacc_wait_list): Remove dead diagnostic
1581 code.
1582
f44697b7
RB
15832018-11-30 Richard Biener <rguenther@suse.de>
1584
1585 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
1586 _Literal (type) { ... } as empty aggregate or vector constructor.
1587
550dfbdc
MS
15882018-11-29 Martin Sebor <msebor@redhat.com>
1589
1590 PR c/88091
1591 * c-typeck.c (convert_argument): Add a parameter. Adjust indentation.
1592 (convert_arguments): Add comments. Pass additional argument to
1593 the function above.
1594
673670da
MS
15952018-11-29 Martin Sebor <msebor@redhat.com>
1596
1597 PR c/88172
1598 PR testsuite/88208
1599 * c-decl.c (declspec_add_alignas): Adjust call to check_user_alignment.
1600
db1d09b0
MS
16012018-11-23 Martin Sebor <msebor@redhat.com>
1602
1603 PR testsuite/88098
1604 * c-typeck.c (convert_arguments): Call builtin_decl_explicit instead.
1605 (maybe_warn_builtin_no_proto_arg): Handle short enum to int promotion.
1606
98f08eb8
MS
16072018-11-20 Martin Sebor <msebor@redhat.com>
1608
1609 * c-parser.c (c_parser_has_attribute_expression): New function.
1610 (c_parser_attribute): New function.
1611 (c_parser_attributes): Move code into c_parser_attribute.
1612 (c_parser_unary_expression): Handle RID_HAS_ATTRIBUTE_EXPRESSION.
1613
cd5da983
MS
16142018-11-15 Martin Sebor <msebor@redhat.com>
1615
1616 PR c/83656
1617 * c-decl.c (header_for_builtin_fn): Declare.
1618 (diagnose_mismatched_decls): Diagnose declarations of built-in
1619 functions without a prototype.
1620 * c-typeck.c (maybe_warn_builtin_no_proto_arg): New function.
1621 (convert_argument): Same.
1622 (convert_arguments): Factor code out into convert_argument.
1623 Detect mismatches between built-in formal arguments in calls
1624 to built-in without prototype.
1625 (build_conditional_expr): Same.
1626 (type_or_builtin_type): New function.
1627 (convert_for_assignment): Add argument. Conditionally issue
1628 warnings instead of errors for mismatches.
1629
620e594b
DM
16302018-11-13 David Malcolm <dmalcolm@redhat.com>
1631
1632 * c-decl.c: Replace "source_location" with "location_t".
1633 * c-tree.h: Likewise.
1634 * c-typeck.c: Likewise.
1635 * gimple-parser.c: Likewise.
1636
3179ebae
JJ
16372018-11-09 Jakub Jelinek <jakub@redhat.com>
1638
81a227c6
JJ
1639 * c-parser.c (c_parser_omp_clause_final): Use
1640 c_parser_expr_no_commas, convert_lvalue_to_rvalue,
1641 c_objc_common_truthvalue_conversion, c_fully_fold and parentheses
1642 parsing instead of c_parser_paren_condition.
1643 (c_parser_omp_clause_if): Use c_parser_expr_no_commas,
1644 convert_lvalue_to_rvalue, c_objc_common_truthvalue_conversion and
1645 c_fully_fold instead of c_parser_condition.
1646 (c_parser_omp_clause_num_threads, c_parser_omp_clause_num_tasks,
1647 c_parser_omp_clause_grainsize, c_parser_omp_clause_priority,
1648 c_parser_omp_clause_hint, c_parser_omp_clause_num_teams,
1649 c_parser_omp_clause_thread_limit, c_parser_omp_clause_linear): Use
1650 c_parser_expr_no_commas instead of c_parser_expression.
1651
98c91c56
JJ
1652 * c-parser.c (c_parser_omp_clause_reduction): Call sorry_at on
1653 reduction clause with inscan modifier.
1654
3179ebae
JJ
1655 * c-parser.c (c_parser_omp_requires): Call sorry_at on requires
1656 clauses other than atomic_default_mem_order.
1657
28567c40
JJ
16582018-11-08 Jakub Jelinek <jakub@redhat.com>
1659
1660 * c-parser.c: Include memmode.h.
1661 (c_parser_omp_depobj, c_parser_omp_requires): New functions.
1662 (c_parser_pragma): Handle PRAGMA_OMP_DEPOBJ and PRAGMA_OMP_REQUIRES.
1663 (c_parser_omp_clause_name): Handle nontemporal, in_reduction and
1664 task_reduction clauses.
1665 (c_parser_omp_variable_list): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION.
1666 For OMP_CLAUSE_DEPEND, parse clause operands as either an array
1667 section, or lvalue assignment expression.
1668 (c_parser_omp_clause_if): Handle cancel and simd modifiers.
1669 (c_parser_omp_clause_lastprivate): Parse optional
1670 conditional: modifier.
1671 (c_parser_omp_clause_hint): Require constant integer expression rather
1672 than just integer expression.
1673 (c_parser_omp_clause_defaultmap): Parse new kinds of defaultmap
1674 clause.
1675 (c_parser_omp_clause_reduction): Add IS_OMP and KIND arguments.
1676 Parse reduction modifiers. Pass KIND to c_parser_omp_variable_list.
1677 (c_parser_omp_clause_nontemporal, c_parser_omp_iterators): New
1678 functions.
1679 (c_parser_omp_clause_depend): Parse iterator modifier and handle
1680 iterators. Parse mutexinoutset and depobj kinds.
1681 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_reduction
1682 callers.
1683 (c_parser_omp_all_clauses): Likewise. Handle
1684 PRAGMA_OMP_CLAUSE_NONTEMPORAL and
1685 PRAGMA_OMP_CLAUSE_{IN,TASK}_REDUCTION.
1686 (c_parser_omp_atomic): Parse hint and memory order clauses. Handle
1687 default memory order from requires directive if any. Adjust
1688 c_finish_omp_atomic caller.
1689 (c_parser_omp_critical): Allow comma in between (name) and hint clause.
1690 (c_parser_omp_flush): Parse flush with memory-order-clause.
1691 (c_parser_omp_for_loop): Allow NE_EXPR even in
1692 OpenMP loops, adjust c_finish_omp_for caller.
1693 (OMP_SIMD_CLAUSE_MASK): Add if and nontemporal clauses.
1694 (c_parser_omp_master): Add p_name, mask and cclauses arguments.
1695 Allow to be called while parsing combined parallel master.
1696 Parse combined master taskloop{, simd}.
1697 (c_parser_omp_parallel): Parse combined
1698 parallel master{, taskloop{, simd}} constructs.
1699 (OMP_TASK_CLAUSE_MASK): Add in_reduction clause.
1700 (OMP_TASKGROUP_CLAUSE_MASK): Define.
1701 (c_parser_omp_taskgroup): Add LOC argument. Parse taskgroup clauses.
1702 (OMP_TASKWAIT_CLAUSE_MASK): Define.
1703 (c_parser_omp_taskwait): Handle taskwait with depend clauses.
1704 (c_parser_omp_teams): Force a BIND_EXPR with BLOCK
1705 around teams body. Use SET_EXPR_LOCATION.
1706 (c_parser_omp_target_data): Allow target data
1707 with only use_device_ptr clauses.
1708 (c_parser_omp_target): Use SET_EXPR_LOCATION. Set
1709 OMP_REQUIRES_TARGET_USED bit in omp_requires_mask.
1710 (c_parser_omp_requires): New function.
1711 (c_finish_taskloop_clauses): New function.
1712 (OMP_TASKLOOP_CLAUSE_MASK): Add reduction and in_reduction clauses.
1713 (c_parser_omp_taskloop): Use c_finish_taskloop_clauses. Add forward
1714 declaration. Disallow in_reduction clause when combined with parallel
1715 master.
1716 (c_parser_omp_construct): Adjust c_parser_omp_master and
1717 c_parser_omp_taskgroup callers.
1718 * c-typeck.c (c_finish_omp_cancel): Diagnose if clause with modifier
1719 other than cancel.
1720 (handle_omp_array_sections_1): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION
1721 like OMP_CLAUSE_REDUCTION.
1722 (handle_omp_array_sections): Likewise. Call save_expr on array
1723 reductions before calling build_index_type. Handle depend clauses
1724 with iterators.
1725 (struct c_find_omp_var_s): New type.
1726 (c_find_omp_var_r, c_omp_finish_iterators): New functions.
1727 (c_finish_omp_clauses): Don't diagnose nonmonotonic clause
1728 with static, runtime or auto schedule kinds. Call save_expr for whole
1729 array reduction sizes. Diagnose reductions with zero sized elements
1730 or variable length structures. Diagnose nogroup clause used with
1731 reduction clause(s). Handle depend clause with
1732 OMP_CLAUSE_DEPEND_DEPOBJ. Diagnose bit-fields. Require
1733 omp_depend_t type for OMP_CLAUSE_DEPEND_DEPOBJ kinds and
1734 some different type for other kinds. Use build_unary_op with
1735 ADDR_EXPR and build_indirect_ref instead of c_mark_addressable.
1736 Handle depend clauses with iterators. Remove no longer needed special
1737 case that predetermined const qualified vars may be specified in
1738 firstprivate clause. Complain if const qualified vars are mentioned
1739 in data-sharing clauses other than firstprivate or shared. Use
1740 error_at with OMP_CLAUSE_LOCATION (c) as first argument instead of
1741 error. Formatting fix. Handle OMP_CLAUSE_NONTEMPORAL and
1742 OMP_CLAUSE_{IN,TASK}_REDUCTION. Allow any lvalue as
1743 OMP_CLAUSE_DEPEND operand (besides array section), adjust diagnostics.
1744
7e2de6df
DM
17452018-10-29 David Malcolm <dmalcolm@redhat.com>
1746
1747 * c-decl.c (implicit_decl_warning): Update "is there a suggestion"
1748 logic for change to name_hint::operator bool.
1749 (undeclared_variable): Likewise.
1750 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
1751 (c_parser_parameter_declaration): Likewise.
1752
9f936c86
JM
17532018-10-17 Joseph Myers <joseph@codesourcery.com>
1754
1755 * c-errors.c (pedwarn_c11): New function.
1756 * c-parser.c (disable_extension_diagnostics): Save
1757 warn_c11_c2x_compat and set it to 0.
1758 (restore_extension_diagnostics): Restore warn_c11_c2x_compat.
1759 (c_parser_static_assert_declaration_no_semi): Handle
1760 _Static_assert without string constant.
1761 * c-tree.h (pedwarn_c11): New prototype.
1762
033eb567
DM
17632018-10-17 David Malcolm <dmalcolm@redhat.com>
1764
1765 * Make-lang.in (selftest-c): New.
1766 (C_SELFTEST_FLAGS, C_SELFTEST_DEPS, s-selftest-c, selftest-c-gdb)
1767 (selftest-gdb, selftest-c-valgrind, selftest-valgrind): Move here
1768 from gcc/Makefile.in.
1769
0edf3afe
RB
17702018-10-02 Richard Biener <rguenther@suse.de>
1771
1772 * c-decl.c (warn_if_shadowing): Do not test DECL_FROM_INLINE.
1773
8313a764
JM
17742018-09-26 Joseph Myers <joseph@codesourcery.com>
1775
1776 PR c/87390
1777 * c-typeck.c (build_binary_op): Use excess precision for
1778 comparisons of integers and floating-point for C11 and later.
1779
ce6f0888
MJ
17802018-09-26 Martin Jambor <mjambor@suse.cz>
1781
1782 PR c/87347
1783 * c-parser.c (warn_for_abs): Bail out if TYPE_ARG_TYPES is NULL. Fix
ab20d992 1784 comment.
ce6f0888 1785
9c4a4b3c
DM
17862018-09-17 David Malcolm <dmalcolm@redhat.com>
1787
1788 * c-objc-common.c (range_label_for_type_mismatch::get_text):
1789 Update for new param.
1790 * c-typeck.c (maybe_range_label_for_tree_type_mismatch::get_text):
1791 Likewise.
1792
80c6d1f4
MJ
17932018-09-17 Martin Jambor <mjambor@suse.cz>
1794
1795 PR c/63886
1796 * c-parser.c: (warn_for_abs): New function.
1797 (c_parser_postfix_expression_after_primary): Call it.
1798
4a426e36
BE
17992018-09-13 Bernd Edlinger <bernd.edlinger@hotmail.de>
1800
1801 * c-typeck.c (digest_init): Shorten overlength strings.
1802
6d900107
BE
18032018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
1804
1805 * c-decl.c (finish_decl): Call complete_flexible_array_elts.
1806
b5764229
BE
18072018-09-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
1808
1809 * c-decl.c (finish_decl): Call braced_list_to_string here ...
1810 * c-parser.c (c_parser_declaration_or_fndef): ... instead of here.
1811
22eea6b2
AM
18122018-08-30 Alexander Monakov <amonakov@ispras.ru>
1813
1814 * gimple-parser.c (c_parser_gimple_binary_expression): Accept infix
1815 "__MULT_HIGHPART" for MULT_HIGHPART_EXPR.
1816
85204e23
DM
18172018-08-27 David Malcolm <dmalcolm@redhat.com>
1818
1819 PR 87091
1820 * c-decl.c (implicitly_declare): Update call to
1821 maybe_add_include_fixit to suggest overriding the location, as it
1822 is for a note.
1823 * c-objc-common.c (c_tree_printer): Update for conversion of
1824 show_caret_p to a tri-state.
1825
3d78e008
ML
18262018-08-27 Martin Liska <mliska@suse.cz>
1827
1828 * c-decl.c (locate_old_decl): Use new function
92a285c1
ML
1829 fndecl_built_in_p and remove check for FUNCTION_DECL if
1830 possible.
3d78e008
ML
1831 (diagnose_mismatched_decls): Likewise.
1832 (merge_decls): Likewise.
1833 (warn_if_shadowing): Likewise.
1834 (pushdecl): Likewise.
1835 (implicitly_declare): Likewise.
1836 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
1837 * c-tree.h (C_DECL_ISNT_PROTOTYPE): Likewise.
1838 * c-typeck.c (build_function_call_vec): Likewise.
1839 (convert_arguments): Likewise.
1840
097f82ec
DM
18412018-08-20 David Malcolm <dmalcolm@redhat.com>
1842
1843 PR other/84889
1844 * c-decl.c (pushtag): Add auto_diagnostic_group instance.
1845 (diagnose_mismatched_decls): Likewise, in various places.
1846 (warn_if_shadowing): Likewise.
1847 (implicit_decl_warning): Likewise.
1848 (implicitly_declare): Likewise.
1849 (undeclared_variable): Likewise.
1850 (declare_label): Likewise.
1851 (grokdeclarator): Likewise.
1852 (start_function): Likewise.
1853 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
1854 (c_parser_parameter_declaration): Likewise.
1855 (c_parser_binary_expression): Likewise.
1856 * c-typeck.c (c_expr_sizeof_expr): Likewise.
1857 (parser_build_binary_op): Likewise.
1858 (build_unary_op): Likewise.
1859 (error_init): Likewise.
1860 (pedwarn_init): Likewise.
1861 (warning_init): Likewise.
1862 (convert_for_assignment): Likewise.
1863
96e6ae57
DM
18642018-08-15 David Malcolm <dmalcolm@redhat.com>
1865
1866 * c-objc-common.c: Include "gcc-rich-location.h".
1867 (c_tree_printer): Move implemenation of '%T' to...
1868 (print_type): ...this new function.
1869 (range_label_for_type_mismatch::get_text): New function.
1870 * c-typeck.c (convert_for_assignment): Add type labels to the rhs
1871 range for the various ic_argpass cases.
1872 (class maybe_range_label_for_tree_type_mismatch): New class.
1873 (build_binary_op): Use it when calling binary_op_error.
1874
0cd020ae 18752018-08-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
ab20d992 1876
0cd020ae
PK
1877 * c-decl.c (start_decl): Do not warn if variables is named as main
1878 and is a local variable.
1879
72733314
IS
18802018-08-15 Iain Sandoe <iain@sandoe.co.uk>
1881
1882 PR c/19315
1883 * c-decl.c (finish_decl): Don't add the 'extern' storage class to
1884 objects of unknown size.
1885
23aa9f7c
MS
18862018-08-13 Martin Sebor <msebor@redhat.com>
1887
1888 PR tree-optimization/71625
1889 * c-parser.c (c_parser_declaration_or_fndef): Call
1890 braced_list_to_string.
1891
e5e7e50d
BH
18922018-08-03 Bogdan Harjoc <harjoc@gmail.com>
1893
1894 PR c/86690
1895 * c-typeck.c (lookup_field): Do not use TYPE_LANG_SPECIFIC after
1896 errors.
1897
8a45b051
MS
18982018-08-01 Martin Sebor <msebor@redhat.com>
1899
1900 PR tree-optimization/86650
1901 * c-objc-common.c (c_tree_printer): Move usage of EXPR_LOCATION (t)
1902 and TREE_BLOCK (t) from within percent_K_format to this callsite.
1903
5922dcb5
JJ
19042018-08-01 Jakub Jelinek <jakub@redhat.com>
1905
1906 PR c/85704
1907 * c-typeck.c (init_field_decl_cmp): New function.
1908 (output_pending_init_elements): Use it for field comparisons
1909 instead of pure bit_position comparisons.
1910
9b452033
JJ
19112018-07-12 Jakub Jelinek <jakub@redhat.com>
1912
1913 * c-decl.c (c_decl_attributes): Don't diagnose vars without mappable
1914 type here, instead add "omp declare target implicit" attribute.
1915 (finish_decl): Diagnose vars without mappable type here.
1916
ab20d992
JJ
19172018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
1918 Thomas Schwinge <thomas@codesourcery.com>
829c6349
CLT
1919 Cesar Philippidis <cesar@codesourcery.com>
1920
1921 * c-parser.c (c_parser_omp_clause_name): Add support for finalize
1922 and if_present. Make present_or_{copy,copyin,copyout,create} aliases
1923 to their non-present_or_* counterparts. Make 'self' an alias to
1924 PRAGMA_OACC_CLAUSE_HOST.
1925 (c_parser_oacc_data_clause): Update GOMP mappings for
1926 PRAGMA_OACC_CLAUSE_{COPY,COPYIN,COPYOUT,CREATE,DELETE}. Remove
1927 PRAGMA_OACC_CLAUSE_{SELF,PRESENT_OR_*}.
1928 (c_parser_oacc_all_clauses): Handle finalize and if_present clauses.
1929 Remove support for present_or_* clauses.
1930 (OACC_KERNELS_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
1931 (OACC_PARALLEL_CLAUSE_MASK): Likewise.
1932 (OACC_DECLARE_CLAUSE_MASK): Likewise.
1933 (OACC_DATA_CLAUSE_MASK): Likewise.
1934 (OACC_ENTER_DATA_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
1935 (OACC_EXIT_DATA_CLAUSE_MASK): Add FINALIZE clause.
1936 (OACC_UPDATE_CLAUSE_MASK): Remove SELF, add IF_PRESENT.
1937 (c_parser_oacc_declare): Remove PRESENT_OR_* clauses.
1938 * c-typeck.c (c_finish_omp_clauses): Handle IF_PRESENT and FINALIZE.
1939
e197e64e
KV
19402018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
1941
1942 * c-typeck.c (build_unary_op): Handle ABSU_EXPR;
1943 * gimple-parser.c (c_parser_gimple_statement): Likewise.
1944 (c_parser_gimple_unary_expression): Likewise.
1945
487f2f61
JJ
19462018-06-15 Jakub Jelinek <jakub@redhat.com>
1947
1948 PR c/86093
1949 * c-typeck.c (pointer_diff): Cast both pointers to unqualified types
1950 before doing POINTER_DIFF_EXPR.
1951
e4d44a37
MP
19522018-06-07 Marek Polacek <polacek@redhat.com>
1953
1954 PR c/85318
1955 * c-decl.c (check_for_loop_decls): Add -Wc90-c99-compat warning about
1956 for loop initial declarations.
1957
b67b9225
DP
19582018-05-30 David Pagan <dave.pagan@oracle.com>
1959
1960 PR c/55976
1961 * c-decl.c (grokdeclarator): Update check for return type warnings.
1962 (start_function): Likewise.
1963 (finish_function): Likewise.
1964 * c-typeck.c (c_finish_return): Update check for return type warnings.
1965 Pass OPT_Wreturn_type to pedwarn when appropriate.
1966
c566cc9f
RS
19672018-05-18 Richard Sandiford <richard.sandiford@linaro.org>
1968
1969 * gimple-parser.c (c_parser_gimple_postfix_expression): Remove
1970 __FMA_EXPR handlng.
1971
e4f81565
RS
19722018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
1973
1974 * gimple-parser.c: Include internal-fn.h.
1975 (c_parser_gimple_statement): Treat a leading CPP_DOT as a call.
1976 (c_parser_gimple_call_internal): New function.
1977 (c_parser_gimple_postfix_expression): Use it to handle CPP_DOT.
1978 Fix typos in comment.
1979
79e7b1fe
JJ
19802018-05-10 Jakub Jelinek <jakub@redhat.com>
1981
1982 PR c++/85662
1983 * c-fold.c (c_fully_fold_internal): Use fold_offsetof rather than
1984 fold_offsetof_1, pass TREE_TYPE (expr) as TYPE to it and drop the
1985 fold_convert_loc.
1986 * c-typeck.c (build_unary_op): Use fold_offsetof rather than
1987 fold_offsetof_1, pass argtype as TYPE to it and drop the
1988 fold_convert_loc.
1989
f7584c81
DP
19902018-05-02 David Pagan <dave.pagan@oracle.com>
1991
1992 PR c/30552
1993 * c-decl.c (old_style_parameter_scope): New function.
1994 * c-parser.c (c_parser_postfix_expression): Check for statement
1995 expressions in old-style function parameter list declarations.
1996 * c-parser.h (old_style_parameter_scope): New extern declaration.
1997
b33a0cb3
JJ
19982018-04-25 Jakub Jelinek <jakub@redhat.com>
1999
2000 PR sanitizer/84307
2001 * c-decl.c (build_compound_literal): Call pushdecl (decl) even when
2002 it is not TREE_STATIC.
2003 * c-typeck.c (c_mark_addressable) <case COMPOUND_LITERAL_EXPR>: Mark
2004 not just the COMPOUND_LITERAL_EXPR node itself addressable, but also
2005 its COMPOUND_LITERAL_EXPR_DECL.
2006
c5c5822a
JM
20072018-03-21 Joseph Myers <joseph@codesourcery.com>
2008
2009 * c-parser.c (c_parser_postfix_expression): For __builtin_tgmath
2010 where all functions return the same _FloatN or _FloatNx type,
2011 treat integer types as _Float64 instead of double.
2012
aa1c9429
JJ
20132018-03-21 Jakub Jelinek <jakub@redhat.com>
2014
2015 PR c/84999
2016 * c-typeck.c (build_binary_op): If c_common_type_for_size fails when
2017 building vector comparison, diagnose it and return error_mark_node.
2018
9bb45a95
JJ
20192018-03-15 Jakub Jelinek <jakub@redhat.com>
2020
2021 PR c/84853
2022 * c-typeck.c (build_binary_op) <case RSHIFT_EXPR, case LSHIFT_EXPR>:
2023 If code1 is INTEGER_TYPE, only allow code0 VECTOR_TYPE if it has
2024 INTEGER_TYPE element type.
2025
ada6bad9
DP
20262018-03-13 David Pagan <dave.pagan@oracle.com>
2027
2028 PR c/46921
2029 * c-typeck.c (output_init_element): Ensure field initializer
2030 expression is always evaluated if there are side effects.
2031
849bbdb9
JJ
20322018-03-06 Jakub Jelinek <jakub@redhat.com>
2033
2034 PR c/84721
2035 * c-parser.c (add_debug_begin_stmt): Don't add DEBUG_BEGIN_STMT if
2036 !building_stmt_list_p ().
2037
d74641bd
RS
20382018-02-13 Richard Sandiford <richard.sandiford@linaro.org>
2039
2040 PR c/84305
2041 * c-decl.c (grokdeclarator): Create an anonymous TYPE_DECL
2042 in PARM and TYPENAME contexts too, but attach it to a BIND_EXPR
2043 and include the BIND_EXPR in the list of things that need to be
2044 pre-evaluated.
2045
0444aa9c
NS
20462018-02-09 Nathan Sidwell <nathan@acm.org>
2047
2048 PR c/84293
2049 * c-typeck.c (build_indirect_ref, build_c_cast): Pass expr location
2050 to strict_aliasing_warning.
2051
7c30b12a
PC
20522018-02-02 Paolo Carlini <paolo.carlini@oracle.com>
2053
2054 * c-typeck.c (really_start_incremental_init, push_init_level,
2055 set_nonincremental_init, output_init_element, process_init_element):
2056 Use DECL_UNNAMED_BIT_FIELD.
2057
2be4dfcb
MP
20582018-01-31 Marek Polacek <polacek@redhat.com>
2059
2060 PR c/81779
2061 * c-parser.c (c_parser_compound_statement_nostart): Call
2062 expansion_point_location_if_in_system_header.
2063
bb9869d5
DM
20642018-01-17 David Malcolm <dmalcolm@redhat.com>
2065
2066 PR c++/83814
2067 * c-fold.c (fold_for_warn): Move from c-common.c, reducing to just
2068 the C part.
2069
b4923738
JJ
20702018-01-13 Jakub Jelinek <jakub@redhat.com>
2071
2072 PR c/83801
2073 * c-tree.h (decl_constant_value_1): Add a bool argument.
2074 * c-typeck.c (decl_constant_value_1): Add IN_INIT argument, allow
2075 returning a CONSTRUCTOR if it is true. Use error_operand_p.
2076 (decl_constant_value): Adjust caller.
2077 * c-fold.c (c_fully_fold_internal): If in_init, pass true to
2078 decl_constant_value_1 as IN_INIT. Otherwise, punt if
2079 decl_constant_value returns initializer that has BLKmode or
2080 array type.
2081 (c_fully_fold_internal) <case COMPONENT_REF>: Fold if !lval.
2082
928686b1
RS
20832018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
2084 Alan Hayward <alan.hayward@arm.com>
2085 David Sherwood <david.sherwood@arm.com>
2086
2087 * c-typeck.c (comptypes_internal, build_binary_op): Handle polynomial
2088 TYPE_VECTOR_SUBPARTS.
2089
85ec4feb
JJ
20902018-01-03 Jakub Jelinek <jakub@redhat.com>
2091
2092 Update copyright years.
2093
913884f7
JJ
20942018-01-01 Jakub Jelinek <jakub@redhat.com>
2095
2096 PR c/83595
2097 * c-parser.c (c_parser_braced_init, c_parser_initelt,
2098 c_parser_conditional_expression, c_parser_cast_expression,
2099 c_parser_sizeof_expression, c_parser_alignof_expression,
2100 c_parser_postfix_expression, c_parser_omp_declare_reduction,
2101 c_parser_transaction_expression): Use set_error () method instead
2102 of setting value member to error_mark_node.
2103
c6cfa2bf
MM
21042017-12-28 Michael Meissner <meissner@linux.vnet.ibm.com>
2105
2106 * c-decl.c (header_for_builtin_fn): Add integer rounding _Float<N>
2107 and _Float<N>X built-in functions.
2108
11d29d63
JJ
21092017-12-22 Jakub Jelinek <jakub@redhat.com>
2110
14ec014e
JJ
2111 PR debug/83550
2112 * c-decl.c (finish_struct): Set DECL_SOURCE_LOCATION on
2113 TYPE_STUB_DECL and call rest_of_type_compilation before processing
2114 incomplete vars rather than after it.
2115
11d29d63
JJ
2116 PR debug/83547
2117 * c-typeck.c (c_finish_stmt_expr): Ignore !TREE_SIDE_EFFECTS as
2118 indicator of ({ }), instead skip all trailing DEBUG_BEGIN_STMTs first,
2119 and consider empty ones if there are no other stmts. For
2120 -Wunused-value walk all statements before the one only followed by
2121 DEBUG_BEGIN_STMTs.
2122
170a8bd6 21232017-12-22 Mike Stump <mikestump@comcast.net>
92a285c1 2124 Eric Botcazou <ebotcazou@adacore.com>
170a8bd6
EB
2125
2126 * c-parser.c (c_parser_while_statement): Add unroll parameter and
2127 build ANNOTATE_EXPR if present. Add 3rd operand to ANNOTATE_EXPR.
2128 (c_parser_do_statement): Likewise.
2129 (c_parser_for_statement): Likewise.
2130 (c_parser_statement_after_labels): Adjust calls to above.
2131 (c_parse_pragma_ivdep): New static function.
2132 (c_parser_pragma_unroll): Likewise.
2133 (c_parser_pragma) <PRAGMA_IVDEP>: Add support for pragma Unroll.
2134 <PRAGMA_UNROLL>: New case.
2135
01512446
JJ
21362017-12-19 Jakub Jelinek <jakub@redhat.com>
2137
2138 * c-typeck.c (comptypes_internal, function_types_compatible_p,
2139 perform_integral_promotions, digest_init): Replace Yoda conditions
2140 with typical order conditions.
2141 * c-decl.c (check_bitfield_type_and_width): Likewise.
2142
c65e18d3
BE
21432017-12-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
2144
2145 * c-typeck.c (c_safe_arg_type_equiv_p,
2146 c_safe_function_type_cast_p): New function.
2147 (build_c_cast): Implement -Wcast-function-type.
2148
b7280579
RB
21492017-12-14 Richard Biener <rguenther@suse.de>
2150
2151 PR c/83415
2152 * c-fold.c (c_fully_fold_internal): Treat VIEW_CONVERT_EXPR
2153 like REALPART_EXPR for the behavior of whether its operand
2154 is an lvalue.
2155
49e6a6c0
MP
21562017-12-12 Marek Polacek <polacek@redhat.com>
2157
2158 PR c/82679
2159 * c-decl.c (grokdeclarator): Check declspecs insted of atomicp.
2160
ab20d992 21612017-12-12 Alexandre Oliva <aoliva@redhat.com>
96a95ac1
AO
2162
2163 * c-objc-common.h (LANG_HOOKS_EMITS_BEGIN_STMT): Redefine as true.
2164 * c-parser.c (add_debug_begin_stmt): New.
2165 (c_parser_declaration_or_fndef): Call it.
2166 (c_parser_compound_statement_nostart): Likewise.
2167 (c_parser_statement_after_labels): Likewise.
2168 * c-typeck (c_finish_stmt_expr): Skip begin stmts markers.
2169
4b2b493f
JM
21702017-12-07 Joseph Myers <joseph@codesourcery.com>
2171
2172 * c-decl.c (build_compound_literal): Add parameter alignas_align
2173 and set alignment of decl if nonzero.
2174 * c-parser.c (c_keyword_starts_typename): Allow RID_ALIGNAS.
2175 (c_parser_declspecs): Allow RID_ALIGNAS to follow a type, like a
2176 qualifier.
2177 (c_parser_struct_declaration): Update syntax comment.
2178 (c_parser_type_name): Add alignas_ok argument and pass it to
2179 c_parser_declspecs.
2180 (c_parser_cast_expression): Pass true to c_parser_type_name and
2181 give error if a cast used an _Alignas specifier.
2182 (c_parser_sizeof_expression): Pass true to c_parser_type_name and
2183 give error if sizeof (type-name) used an _Alignas specifier.
2184 (c_parser_alignof_expression): Pass true to c_parser_type_name and
2185 give error if _Alignof (type-name) used an _Alignas specifier.
2186 (c_parser_postfix_expression_after_paren_type): Check specified
2187 alignment for a compound literal and pass it to
2188 build_compound_literal.
2189 * c-parser.h (c_parser_type_name): Update prototype.
2190 * c-tree.h (build_compound_literal): Update prototype.
2191
5d9ae53d
MS
21922017-12-07 Martin Sebor <msebor@redhat.com>
2193
2194 PR c/81544
2195 * c-decl.c (c_decl_attributes): Look up existing declaration and
2196 pass it to decl_attributes.
2197
c79144f8
DM
21982017-12-06 David Malcolm <dmalcolm@redhat.com>
2199
2200 PR c/83236
2201 * c-decl.c (lookup_name_fuzzy): Don't suggest names that are
2202 reserved for use by the implementation.
2203
613bc14f
DM
22042017-12-06 David Malcolm <dmalcolm@redhat.com>
2205
2206 * c-decl.c: Include "c-family/c-spellcheck.h".
2207
05abad4c
ML
22082017-12-05 Martin Liska <mliska@suse.cz>
2209 Jakub Jelinek <jakub@redhat.com>
2210
2211 * c-typeck.c (pointer_diff): Add new argument and instrument
2212 pointer subtraction.
2213 (build_binary_op): Similar for pointer comparison.
2214
cc6534d4
JJ
22152017-12-01 Jakub Jelinek <jakub@redhat.com>
2216
65791f42
JJ
2217 PR c/79153
2218 * c-parser.c: Include tree-iterator.h.
2219 (c_parser_switch_statement): Emit LABEL_EXPR for the break label
2220 into SWITCH_BODY instead of after it and set SWITCH_BREAK_LABEL_P
2221 on it.
2222
cc6534d4
JJ
2223 PR c/83222
2224 * c-tree.h (decl_constant_value_1): Declare.
2225 * c-typeck.c (decl_constant_value_1): New function.
2226 (decl_constant_value): Use it.
2227 * c-fold.c (c_fully_fold_internal): If in_init, use
2228 decl_constant_value_1 instead of decl_constant_value.
2229
5de73c05
JJ
22302017-11-30 Jakub Jelinek <jakub@redhat.com>
2231
2232 * c-parser.c (c_parser_postfix_expression): Use ; instead of ;;.
2233
058f0b9e
JJ
22342017-11-28 Jakub Jelinek <jakub@redhat.com>
2235
2236 PR sanitizer/81275
2237 * c-typeck.c (c_finish_case): Set SWITCH_ALL_CASES_P if
2238 c_switch_covers_all_cases_p returns true.
2239
5e9d6aa4 22402017-11-28 Julia Koval <julia.koval@intel.com>
92a285c1 2241 Sebastian Peryt <sebastian.peryt@intel.com>
5e9d6aa4
JK
2242
2243 * Make-lang.in (c/c-array-notation.o): Remove.
2244 * c-array-notation.c: Delete.
2245 * c-decl.c: Remove cilkplus condition.
2246 * c-parser.c (c_parser_cilk_simd, c_parser_cilk_for,
2247 c_parser_cilk_verify_simd, c_parser_array_notation,
2248 c_parser_cilk_clause_vectorlength, c_parser_cilk_grainsize,
2249 c_parser_cilk_simd_fn_vector_attrs,
2250 c_finish_cilk_simd_fn_tokens): Delete.
2251 (c_parser_declaration_or_fndef): Remove cilkplus condition.
2252 (c_parser_direct_declarator_inner): Ditto.
2253 (CILK_SIMD_FN_CLAUSE_MASK): Delete.
2254 (c_parser_attributes, c_parser_compound_statement,
2255 c_parser_statement_after_labels, c_parser_if_statement,
2256 c_parser_switch_statement, c_parser_while_statement,
2257 c_parser_do_statement, c_parser_for_statement,
2258 c_parser_unary_expression, c_parser_postfix_expression,
2259 c_parser_postfix_expression_after_primary,
2260 c_parser_pragma, c_parser_omp_clause_name, c_parser_omp_all_clauses,
2261 c_parser_omp_for_loop, c_finish_omp_declare_simd): Remove cilkplus
2262 support.
2263 * c-typeck.c (build_array_ref, build_function_call_vec,
2264 convert_arguments,
2265 lvalue_p, build_compound_expr, c_finish_return, c_finish_if_stmt,
2266 c_finish_loop, build_binary_op): Remove cilkplus support.
2267
9e851845
JJ
22682017-11-28 Jakub Jelinek <jakub@redhat.com>
2269
2270 * c-typeck.c (c_start_case): Build SWITCH_EXPR using build2 instead
2271 of build3.
2272
ab20d992 22732017-11-14 Boris Kolpackov <boris@codesynthesis.com>
8c7dbea9
BK
2274
2275 * Make-lang.in (c.install-plugin): Install backend import library.
2276
41521dee
JJ
22772017-11-23 Jakub Jelinek <jakub@redhat.com>
2278
2279 * c-parser.c (c_parser_omp_declare_simd): Reject declare simd in
2280 pragma_stmt context.
2281
ac9effed
EB
22822017-11-23 Mike Stump <mikestump@comcast.net>
2283 Eric Botcazou <ebotcazou@adacore.com>
2284
2285 * c-parser.c (c_parser_while_statement): Pass 3rd operand to
2286 ANNOTATE_EXPR.
2287 (c_parser_do_statement): Likewise.
2288 (c_parser_for_statement): Likewise.
2289
ce95abc4
DM
22902017-11-22 David Malcolm <dmalcolm@redhat.com>
2291
2292 PR c++/62170
2293 * c-objc-common.c (c_tree_printer): Convert penultimate param from
2294 bool to bool *. Within '%T' handling, if showing an "aka", use
2295 "quoted" param to add appropriate quoting.
2296
974aedcc
MP
22972017-11-22 Marek Polacek <polacek@redhat.com>
2298
2299 PR c++/60336
2300 PR middle-end/67239
2301 PR target/68355
2302 * c-decl.c (grokdeclarator): Set DECL_PADDING_P on unnamed bit-fields.
2303
d4300cc6
DM
23042017-11-21 David Malcolm <dmalcolm@redhat.com>
2305
2306 PR c/83056
2307 * c-decl.c (lookup_name_fuzzy): Don't suggest names that came from
2308 earlier failed lookups.
2309
1af4ebf5
MG
23102017-11-21 Marc Glisse <marc.glisse@inria.fr>
2311
2312 * c-fold.c (c_fully_fold_internal): Handle POINTER_DIFF_EXPR.
2313 * c-typeck.c (pointer_diff): Use POINTER_DIFF_EXPR.
2314
26edace6
DM
23152017-11-20 David Malcolm <dmalcolm@redhat.com>
2316
2317 PR c/81404
2318 * c-decl.c: Include "c-family/known-headers.h".
2319 (get_c_name_hint): Rename to get_stdlib_header_for_name and move
2320 to known-headers.cc.
2321 (class suggest_missing_header): Move to known-header.h.
2322 (lookup_name_fuzzy): Call get_c_stdlib_header_for_name rather
2323 than get_c_name_hint.
2324
b1212255
DM
23252017-11-20 David Malcolm <dmalcolm@redhat.com>
2326
2327 * c-decl.c (get_c_name_hint): New function.
2328 (class suggest_missing_header): New class.
2329 (lookup_name_fuzzy): Call get_c_name_hint and use it to
2330 suggest missing headers to the user.
2331
6c7a259b
DM
23322017-11-20 David Malcolm <dmalcolm@redhat.com>
2333
2334 * c-decl.c: Define INCLUDE_UNIQUE_PTR before including system.h.
2335 Include "c-family/name-hint.h"
2336 (implicit_decl_warning): Convert "hint" from
2337 const char * to name_hint. Pass location to
2338 lookup_name_fuzzy. Suppress any deferred diagnostic if the
2339 warning was not printed.
2340 (undeclared_variable): Likewise for "guessed_id".
2341 (lookup_name_fuzzy): Convert return type from const char *
2342 to name_hint. Add location_t param.
2343 * c-parser.c: Define INCLUDE_UNIQUE_PTR before including system.h.
2344 Include "c-family/name-hint.h"
2345 (c_parser_declaration_or_fndef): Convert "hint" from
2346 const char * to name_hint. Pass location to lookup_name_fuzzy.
2347 (c_parser_parameter_declaration): Likewise.
2348
f9c59f7e
JJ
23492017-11-19 Jakub Jelinek <jakub@redhat.com>
2350
2351 PR c/66618
2352 PR c/69960
2353 * c-parser.c (c_parser_omp_atomic): Pass true as LVAL to c_fully_fold
2354 where needed.
2355 * c-typeck.c (build_unary_op, build_modify_expr, build_asm_expr,
2356 handle_omp_array_sections): Likewise.
2357 (digest_init): Don't call decl_constant_value_for_optimization.
2358 * c-tree.h (decl_constant_value_for_optimization): Removed.
2359 * c-fold.c (c_fold_array_ref): New function.
2360 (c_fully_fold_internal): Add LVAL argument, propagate it through
2361 recursive calls. For VAR_P call decl_constant_value and
2362 unshare if not LVAL and either optimizing or IN_INIT. Remove
2363 decl_constant_value_for_optimization calls. If IN_INIT and not LVAL,
2364 fold ARRAY_REF with STRING_CST and INTEGER_CST operands.
2365 (c_fully_fold): Add LVAL argument, pass it through to
2366 c_fully_fold_internal.
2367 (decl_constant_value_for_optimization): Removed.
2368
3ca0dc60
JM
23692017-11-15 Joseph Myers <joseph@codesourcery.com>
2370
2371 PR c/81156
2372 * c-parser.c (check_tgmath_function): New function.
2373 (enum tgmath_parm_kind): New enum.
2374 (c_parser_postfix_expression): Handle __builtin_tgmath.
2375
64a5912c
DM
23762017-10-31 David Malcolm <dmalcolm@redhat.com>
2377
2378 * c-decl.c (implicit_decl_warning): Update for renaming of
2379 pedwarn_at_rich_loc and warning_at_rich_loc.
2380 (implicitly_declare): Likewise for renaming of inform_at_rich_loc.
2381 (undeclared_variable): Likewise for renaming of error_at_rich_loc.
2382 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
2383 (c_parser_struct_or_union_specifier): Likewise for renaming of
2384 pedwarn_at_rich_loc.
2385 (c_parser_parameter_declaration): Likewise for renaming of
2386 error_at_rich_loc.
2387 * c-typeck.c (build_component_ref): Likewise.
2388 (build_unary_op): Likewise for renaming of inform_at_rich_loc.
2389 (pop_init_level): Likewise for renaming of warning_at_rich_loc.
2390 (set_init_label): Likewise for renaming of error_at_rich_loc.
2391
c1136864
RB
23922017-10-30 Richard Biener <rguenther@suse.de>
2393
2394 * gimple-parser.c (c_parser_gimple_statement): Parse conditional
2395 stmts.
2396
ee5fd23a
MM
23972017-10-27 Michael Meissner <meissner@linux.vnet.ibm.com>
2398
2399 * c-decl.c (header_for_builtin_fn): Add support for copysign, fma,
2400 fmax, fmin, and sqrt _Float<N> and _Float<N>X variants.
2401
1a59ccf2
DM
24022017-10-25 David Malcolm <dmalcolm@redhat.com>
2403
2404 PR c/7356
2405 * c-parser.c (c_parser_declaration_or_fndef): Detect missing
2406 semicolons.
2407
bc1a75dd
JJ
24082017-10-25 Jakub Jelinek <jakub@redhat.com>
2409
2410 PR libstdc++/81706
2411 * c-decl.c (merge_decls): Copy "omp declare simd" attributes from
2412 newdecl to corresponding __builtin_ if any.
2413
ff1ff960
PC
24142017-10-24 Paolo Carlini <paolo.carlini@oracle.com>
2415
2416 PR c++/82466
2417 * c-decl.c (diagnose_mismatched_decls): Use
2418 OPT_Wbuiltin_declaration_mismatch.
2419
62e1c678
DM
24202017-10-12 David Malcolm <dmalcolm@redhat.com>
2421
2422 * c-parser.c (c_parser_require): Add "type_is_unique" param and
2423 use it to guard calls to maybe_suggest_missing_token_insertion.
2424 (c_parser_parms_list_declarator): Override default value of new
2425 "type_is_unique" param to c_parser_require.
2426 (c_parser_asm_statement): Likewise.
2427 * c-parser.h (c_parser_require): Add "type_is_unique" param,
2428 defaulting to true.
2429
a92f6726
NS
24302017-10-11 Nathan Sidwell <nathan@acm.org>
2431
2432 * c-decl.c (grokdeclarator): Check HAS_DECL_ASSEMBLER_NAME_P too.
2433
8e6cdc90
RS
24342017-10-10 Richard Sandiford <richard.sandiford@linaro.org>
2435
2436 * c-parser.c (c_parser_cilk_clause_vectorlength): Use wi::to_wide when
2437 operating on trees as wide_ints.
2438 * c-typeck.c (build_c_cast, c_finish_omp_clauses): Likewise.
2439 (c_tree_equal): Likewise.
2440
8139a48e
DM
24412017-10-04 David Malcolm <dmalcolm@redhat.com>
2442
2443 * c-decl.c (push_parm_decl): Store c_parm's location into the
2444 PARAM_DECL.
2445 (build_c_parm): Add "loc" param and store it within the c_parm.
2446 * c-parser.c (struct c_parser): Add "last_token_location" field.
2447 (c_parser_consume_token): Store location of the token into the
2448 new field.
2449 (c_parser_declaration_or_fndef): Store params into DECL_ARGUMENTS
2450 when handling a FUNCTION_DECL, if it doesn't already have them.
2451 (c_parser_parameter_declaration): Generate a location for the
2452 parameter, and pass it to the call to build_c_parm.
2453 * c-tree.h (struct c_parm): Add field "loc".
2454 (build_c_parm): Add location_t param.
2455 * c-typeck.c (get_fndecl_argument_location): New function.
2456 (inform_for_arg): New function.
2457 (convert_for_assignment): Use inform_for_arg when dealing with
2458 ic_argpass.
2459
2a389958
JJ
24602017-09-29 Jakub Jelinek <jakub@redhat.com>
2461
7d386d45
JJ
2462 * c-decl.c (grokfield): Use SET_DECL_C_BIT_FIELD here if
2463 width is non-NULL.
2464 (finish_struct): Test DECL_C_BIT_FIELD instead of DECL_INITIAL,
2465 don't SET_DECL_C_BIT_FIELD here.
2466
2a389958
JJ
2467 PR c/82340
2468 * c-decl.c (build_compound_literal): Use c_apply_type_quals_to_decl
2469 instead of trying to set just TREE_READONLY manually.
2470
ebc6a85e
TV
24712017-09-16 Tom de Vries <tom@codesourcery.com>
2472
2473 PR c/81875
2474 * c-parser.c (c_parser_omp_for_loop): Fold only operands of cond, not
2475 cond itself.
2476
bb75facd
JM
24772017-09-15 Joseph Myers <joseph@codesourcery.com>
2478
2479 PR c/82071
2480 * c-typeck.c (ep_convert_and_check): Just call convert_and_check
2481 for C11.
2482 (build_conditional_expr): For C11, generate result with excess
2483 precision when one argument is an integer and the other is of a
2484 type using excess precision.
2485
1d933576
BE
24862017-09-15 Bernd Edlinger <bernd.edlinger@hotmail.de>
2487
2488 * c-typeck.c (build_c_cast): Implement -Wcast-align=strict.
2489
267bbb6f
MP
24902017-09-13 Marek Polacek <polacek@redhat.com>
2491
2492 PR c/82167
2493 * c-typeck.c (c_expr_sizeof_expr): Use the type of expr.value rather
2494 than expr.original_type.
2495
6836632e
NS
24962017-09-12 Nathan Sidwell <nathan@acm.org>
2497
2498 * c-decl.c (field_decl_cmp, resort_data, resort_field_decl_cmp,
2499 resort_sorted_fields): Moved from c-family/c-common.c.
2500 * c-lang.h (struct sorted_fields_type): Moved from c-family/c-common.h.
2501
e035be33
JM
25022017-09-01 Joseph Myers <joseph@codesourcery.com>
2503
2504 PR c/82071
2505 * c-typeck.c (build_atomic_assign): Handle argument with excess
2506 precision. Ensure any EXCESS_PRECISION_EXPR is present in
2507 argument passed to build_binary_op and convert_for_assignment but
2508 not for call to c_fully_fold.
2509 (build_modify_expr): Do not remove EXCESS_PRECISION_EXPR early.
2510 Ensure build_binary_op is called with argument with original
2511 semantic type. Avoid calling c_fully_fold with an
2512 EXCESS_PRECISION_EXPR from build_binary_op.
2513
d2e05fcb
JJ
25142017-09-01 Jakub Jelinek <jakub@redhat.com>
2515
2516 PR c/81887
2517 * c-parser.c (c_parser_omp_ordered): Handle -fopenmp-simd.
2518
b397965c
RS
25192017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
2520 Alan Hayward <alan.hayward@arm.com>
2521 David Sherwood <david.sherwood@arm.com>
2522
2523 * c-typeck.c (build_binary_op): Use SCALAR_TYPE_MODE.
2524 (c_common_type): Likewise. Use as_a <scalar_mode> when setting
2525 m1 and m2 to the signed equivalent of a fixed-point
2526 SCALAR_TYPE_MODE.
2527
14e18d71
DM
25282017-08-24 David Malcolm <dmalcolm@redhat.com>
2529
2530 * c-tree.h (c_expr::get_location) Use EXPR_HAS_LOCATION rather
2531 than CAN_HAVE_LOCATION_P when determining whether to use the
2532 location_t value within "value".
2533
7f204c0f
DM
25342017-08-21 David Malcolm <dmalcolm@redhat.com>
2535
2536 * c-parser.c (c_parser_expr_list): Use c_expr::get_location ()
2537 rather than peeking the location of the first token.
2538 * c-tree.h (c_expr::get_location): New method.
2539
2f687306
DM
25402017-08-21 David Malcolm <dmalcolm@redhat.com>
2541
2542 * c-typeck.c (build_function_call_vec): Pass arg_loc to call
2543 to check_function_arguments.
2544
3e7b80d7
MP
25452017-08-18 Marek Polacek <polacek@redhat.com>
2546
2547 * c-parser.c (c_parser_postfix_expression): Remove unused code. Update
2548 commentary.
2549
00aa1fa2
L
25502017-08-18 H.J. Lu <hongjiu.lu@intel.com>
2551
2552 PR c/53037
2553 * c-decl.c (merge_decls): Also merge DECL_WARN_IF_NOT_ALIGN.
2554 (check_bitfield_type_and_width): Don't allow bit-field with
2555 warn_if_not_aligned type.
2556
da67acb9
MS
25572017-08-14 Martin Sebor <msebor@redhat.com>
2558
2559 PR c/81117
2560 * c-objc-common.c (c_objc_common_init): Handle 'G'.
2561
bb85aa74
MP
25622017-08-11 Marek Polacek <polacek@redhat.com>
2563
2564 PR c/81795
2565 * c-decl.c (pushtag): Only print inform if the warning was printed.
2566 (grokdeclarator): Likewise.
2567
32129a17
DM
25682017-08-10 David Malcolm <dmalcolm@redhat.com>
2569
2570 * c-parser.c (c_parser_error): Rename to...
2571 (c_parser_error_richloc): ...this, making static, and adding
2572 "richloc" parameter, passing it to the c_parse_error call,
2573 rather than calling c_parser_set_source_position_from_token.
2574 (c_parser_error): Reintroduce, reimplementing in terms of the
2575 above, converting return type from void to bool.
2576 (class token_pair): New class.
2577 (struct matching_paren_traits): New struct.
2578 (matching_parens): New typedef.
2579 (struct matching_brace_traits): New struct.
2580 (matching_braces): New typedef.
2581 (get_matching_symbol): New function.
2582 (c_parser_require): Add param MATCHING_LOCATION, using it to
2583 highlight matching "opening" tokens for missing "closing" tokens.
2584 (c_parser_skip_until_found): Likewise.
2585 (c_parser_static_assert_declaration_no_semi): Convert explicit
2586 parsing of CPP_OPEN_PAREN and CPP_CLOSE_PAREN to use of
2587 class matching_parens, so that the pertinent open parenthesis is
2588 highlighted when there are problems locating the close
2589 parenthesis.
2590 (c_parser_struct_or_union_specifier): Likewise.
2591 (c_parser_typeof_specifier): Likewise.
2592 (c_parser_alignas_specifier): Likewise.
2593 (c_parser_simple_asm_expr): Likewise.
2594 (c_parser_braced_init): Likewise, for matching_braces.
2595 (c_parser_paren_condition): Likewise, for matching_parens.
2596 (c_parser_switch_statement): Likewise.
2597 (c_parser_for_statement): Likewise.
2598 (c_parser_asm_statement): Likewise.
2599 (c_parser_asm_operands): Likewise.
2600 (c_parser_cast_expression): Likewise.
2601 (c_parser_sizeof_expression): Likewise.
2602 (c_parser_alignof_expression): Likewise.
2603 (c_parser_generic_selection): Likewise.
2604 (c_parser_postfix_expression): Likewise for cases RID_VA_ARG,
2605 RID_OFFSETOF, RID_TYPES_COMPATIBLE_P, RID_AT_SELECTOR,
2606 RID_AT_PROTOCOL, RID_AT_ENCODE, reindenting as necessary.
2607 In case CPP_OPEN_PAREN, pass loc_open_paren to the
2608 c_parser_skip_until_found call.
2609 (c_parser_objc_class_definition): Use class matching_parens as
2610 above.
2611 (c_parser_objc_method_decl): Likewise.
2612 (c_parser_objc_try_catch_finally_statement): Likewise.
2613 (c_parser_objc_synchronized_statement): Likewise.
2614 (c_parser_objc_at_property_declaration): Likewise.
2615 (c_parser_oacc_wait_list): Likewise.
2616 (c_parser_omp_var_list_parens): Likewise.
2617 (c_parser_omp_clause_collapse): Likewise.
2618 (c_parser_omp_clause_default): Likewise.
2619 (c_parser_omp_clause_if): Likewise.
2620 (c_parser_omp_clause_num_threads): Likewise.
2621 (c_parser_omp_clause_num_tasks): Likewise.
2622 (c_parser_omp_clause_grainsize): Likewise.
2623 (c_parser_omp_clause_priority): Likewise.
2624 (c_parser_omp_clause_hint): Likewise.
2625 (c_parser_omp_clause_defaultmap): Likewise.
2626 (c_parser_oacc_single_int_clause): Likewise.
2627 (c_parser_omp_clause_ordered): Likewise.
2628 (c_parser_omp_clause_reduction): Likewise.
2629 (c_parser_omp_clause_schedule): Likewise.
2630 (c_parser_omp_clause_num_teams): Likewise.
2631 (c_parser_omp_clause_thread_limit): Likewise.
2632 (c_parser_omp_clause_aligned): Likewise.
2633 (c_parser_omp_clause_linear): Likewise.
2634 (c_parser_omp_clause_safelen): Likewise.
2635 (c_parser_omp_clause_simdlen): Likewise.
2636 (c_parser_omp_clause_depend): Likewise.
2637 (c_parser_omp_clause_map): Likewise.
2638 (c_parser_omp_clause_device): Likewise.
2639 (c_parser_omp_clause_dist_schedule): Likewise.
2640 (c_parser_omp_clause_proc_bind): Likewise.
2641 (c_parser_omp_clause_uniform): Likewise.
2642 (c_parser_omp_for_loop): Likewise.
2643 (c_parser_cilk_clause_vectorlength): Likewise.
2644 (c_parser_cilk_clause_linear): Likewise.
2645 (c_parser_transaction_expression): Likewise.
2646 * c-parser.h (c_parser_require): Add param matching_location with
2647 default UNKNOWN_LOCATION.
2648 (c_parser_error): Convert return type from void to bool.
2649 (c_parser_skip_until_found): Add param matching_location with
2650 default UNKNOWN_LOCATION.
2651
30af3a2b
MP
26522017-08-09 Marek Polacek <polacek@redhat.com>
2653
2654 * c-decl.c (build_enumerator): Use true/false instead of 1/0.
2655 * c-tree.h (build_external_ref): Update declaration.
2656 * c-typeck.c (build_array_ref): Use true/false instead of 1/0.
2657 (build_external_ref): Change the type of a parameter to bool.
2658 (parser_build_binary_op): Use true/false instead of 1/0.
2659 (pointer_diff): Likewise.
2660 (build_modify_expr): Likewise.
2661 (set_designator): Change the type of a parameter to bool.
2662 (set_init_index): Use true/false instead of 1/0.
2663 (set_init_label): Likewise.
2664 (output_init_element): Change the type of a parameter to bool.
2665 (output_pending_init_elements): Use true/false instead of 1/0.
2666 (process_init_element): Likewise.
2667 (build_binary_op): Change the type of a parameter to bool.
2668
296c53ac
MP
26692017-08-09 Marek Polacek <polacek@redhat.com>
2670
2671 PR c/81233
2672 * c-typeck.c (pedwarn_init): Make the function take a variable list.
2673 Call emit_diagnostic_valist instead of pedwarn.
2674 (convert_for_assignment): Unroll the PEDWARN_FOR_ASSIGNMENT macro.
2675 Print the relevant types in diagnostics.
2676
a32c8316
MP
26772017-08-09 Marek Polacek <polacek@redhat.com>
2678
2679 PR c/81417
2680 * c-array-notation.c (fix_builtin_array_notation_fn): Update calls to
ab20d992 2681 build_conditional_expr.
a32c8316
MP
2682 * c-parser.c (c_parser_conditional_expression): Create locations for
2683 EXP1 and EXP2 from their source ranges. Pass the locations down to
2684 build_conditional_expr.
2685 * c-tree.h (build_conditional_expr): Update declaration.
2686 * c-typeck.c (build_conditional_expr): Add location_t parameters.
2687 For -Wsign-compare, also print the types.
2688
314e6352
ML
26892017-08-08 Martin Liska <mliska@suse.cz>
2690
2691 * c-convert.c: Include header files.
2692 * c-typeck.c: Likewise.
2693
577eec56
ML
26942017-08-07 Martin Liska <mliska@suse.cz>
2695
2696 * c-parser.c (c_parser_attributes): Canonicalize name of an
2697 attribute.
2698
f7b6353a
MP
26992017-08-02 Marek Polacek <polacek@redhat.com>
2700
2701 PR c/81289
2702 * c-parser.c (c_parser_unary_expression): Use set_error.
2703
8a6eab34
MP
2704 PR c/81448
2705 PR c/81306
2706 * c-warn.c (warn_for_multistatement_macros): Prevent bogus
2707 warnings. Avoid walking MACRO_MAP_LOCATIONS.
2708
ab20d992 27092017-07-31 Jan Hubicka <hubicka@ucw.cz>
7fef86d3
JH
2710 Martin Liska <mliska@suse.cz>
2711
2712 * c-typeck.c (c_finish_goto_label): Build gimple predict
f7b6353a 2713 statement.
7fef86d3 2714
f34ebeb2
ML
27152017-07-31 Martin Liska <mliska@suse.cz>
2716
2717 PR sanitize/81530
2718 * c-convert.c (convert): Guard condition with flag_sanitize_p
2719 also with current_function_decl non-null equality.
2720 * c-decl.c (grokdeclarator): Likewise.
2721 * c-typeck.c (build_binary_op): Likewise.
2722
8595f67b
MP
27232017-07-25 Marek Polacek <polacek@redhat.com>
2724
2725 * c-decl.c (grokfield): Remove local variable.
2726
d49718d6
MP
27272017-07-25 Marek Polacek <polacek@redhat.com>
2728
2729 PR c/81364
2730 * c-parser.c (c_parser_else_body): Don't warn about multistatement
2731 macro expansion if the body is in { }.
2732 (c_parser_while_statement): Likewise.
2733 (c_parser_for_statement): Likewise.
2734
ff22eb12
NS
27352017-07-18 Nathan Sidwell <nathan@acm.org>
2736
2737 * c-parser.c (c_parser_array_notation): Use TYPE_{MIN,MAX}_VALUE.
2738
eea77d1f
DM
27392017-07-14 David Malcolm <dmalcolm@redhat.com>
2740
2741 * c-decl.c (implicitly_declare): When suggesting a missing
2742 #include, provide a fix-it hint.
2743
b6f43128
DM
27442017-07-06 David Malcolm <dmalcolm@redhat.com>
2745
2746 * c-lang.c (selftest::run_c_tests): Move body to c_family_tests,
2747 and call that instead.
2748 * c-tree.h (selftest::run_c_tests): New decl.
2749
3e2becc4
MP
27502017-06-26 Marek Polacek <polacek@redhat.com>
2751
2752 PR c/80116
2753 * c-parser.c (c_parser_if_body): Set the location of the
2754 body of the conditional after parsing all the labels. Call
2755 warn_for_multistatement_macros.
2756 (c_parser_else_body): Likewise.
2757 (c_parser_switch_statement): Likewise.
2758 (c_parser_while_statement): Likewise.
2759 (c_parser_for_statement): Likewise.
2760 (c_parser_statement): Add a default argument. Save the location
2761 after labels have been parsed.
2762 (c_parser_c99_block_statement): Likewise.
2763
343ae898
RB
27642017-06-19 Richard Biener <rguenther@suse.de>
2765
2766 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
2767 negated _Literals to parse _Literal (int) -1.
2768
45b2222a
ML
27692017-06-13 Martin Liska <mliska@suse.cz>
2770
2771 PR sanitize/78204
2772 * c-convert.c (convert): Use sanitize_flags_p.
2773 * c-decl.c (grokdeclarator): Likewise.
2774 * c-typeck.c (convert_for_assignment): Likewise.
2775 (c_finish_return): Likewise.
2776 (build_binary_op): Likewise.
2777
8ab7005b
JJ
27782017-06-08 Jakub Jelinek <jakub@redhat.com>
2779
2780 PR c/81006
2781 * c-typeck.c (handle_omp_array_sections_1): Convert TYPE_MAX_VALUE
2782 to sizetype before size_binop.
2783
363dc72c
JJ
27842017-06-07 Jakub Jelinek <jakub@redhat.com>
2785
2786 * gimple-parser.c (c_parser_parse_gimple_body): Use TDI_gimple instead
2787 of TDI_generic.
2788
dc949728
MP
27892017-06-06 Marek Polacek <polacek@redhat.com>
2790
2791 PR c/79983
2792 * c-decl.c (start_struct): Use the location of TYPE_STUB_DECL of
2793 ref.
2794 (start_enum): Use the location of TYPE_STUB_DECL of enumtype.
2795
40ffd95f
BE
27962017-06-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
2797
2798 * c-parser.c (c_parser_binary_expression): Implement the
2799 -Wsizeof_pointer_div warning.
2800 (c_parser_postfix_expression): Allow SIZEOF_EXPR as expr.original_code
2801 from a parenthesized expression.
2802 (c_parser_expr_list): Use c_last_sizeof_loc.
2803 * c-tree.h (c_last_sizeof_loc): New external.
2804 * c-typeck.c (c_last_sizeof_loc): New variable.
2805 (c_expr_sizeof_expr, c_expr_sizeof_type): Assign c_last_sizeof_loc.
2806
9fc5e7a4
MM
28072017-05-31 Mikhail Maltsev <maltsevm@gmail.com>
2808
2809 PR testsuite/80580
2810 * gimple-parser.c (c_parser_gimple_if_stmt): Check for empty labels.
2811
f012c8ef
DM
28122017-05-30 David Malcolm <dmalcolm@redhat.com>
2813
2814 * c-objc-common.c (c_tree_printer): Gain bool and const char **
2815 parameters.
2816
3cd211af
MS
28172017-05-24 Martin Sebor <msebor@redhat.com>
2818
2819 PR c/80731
2820 * c-fold.c (c_fully_fold_internal): Adjust.
2821 * c-typeck.c (parser_build_unary_op): Adjust.
2822
fd71a9a2
TS
28232017-05-23 Thomas Schwinge <thomas@codesourcery.com>
2824
2825 * c-parser.c (OACC_KERNELS_CLAUSE_MASK): Add
2826 "PRAGMA_OACC_CLAUSE_NUM_GANGS", "PRAGMA_OACC_CLAUSE_NUM_WORKERS",
2827 "VECTOR_LENGTH".
2828
92fa0f9e
MP
28292017-05-23 Marek Polacek <polacek@redhat.com>
2830
2831 * c-parser.c (c_parser_compound_statement_nostart): Remove redundant
2832 quotes.
2833
d11c168a
JJ
28342017-05-22 Jakub Jelinek <jakub@redhat.com>
2835
2836 * c-fold.c (c_fully_fold_internal): Save the c_fully_fold_internal
2837 result for SAVE_EXPR operand and set SAVE_EXPR_FOLDED_P even if
2838 it returned invariant. Call tree_invariant_p unconditionally
2839 afterwards to decide whether to return expr or op0.
2840
58aca9d9
NS
28412017-05-22 Nathan Sidwell <nathan@acm.org>
2842
2843 * c-decl.c (c_parse_final_cleanups): Drop TDI_tu handling.
2844
7fd549d2
TS
28452017-05-19 Thomas Schwinge <thomas@codesourcery.com>
2846
2847 * c-parser.c (c_parser_omp_clause_default): Handle
2848 "OMP_CLAUSE_DEFAULT_PRESENT".
2849
6ecd2339
BE
28502017-05-18 Bernd Edlinger <bernd.edlinger@hotmail.de>
2851
2852 * config-lang.in (gtfiles): Add c-family/c-format.c.
2853
8a57ecff
NS
28542017-05-18 Nathan Sidwell <nathan@acm.org>
2855
2856 * c-decl.c (pushdecl_top_level): Delete unused function.
2857
6574d78e
MP
28582017-05-18 Marek Polacek <polacek@redhat.com>
2859
2860 * c-decl.c (match_builtin_function_types): Use NULL_TREE instead of 0.
2861 (check_earlier_gotos): Likewise.
2862 (define_label): Likewise.
2863 (pending_xref_error): Likewise.
2864 (smallest_type_quals_location): Likewise.
2865 (grokdeclarator): Likewise.
2866 (grokparms): Likewise.
2867 (identifier_global_value): Likewise.
2868 * c-typeck.c (set_nonincremental_init_from_string): Likewise.
2869 (find_init_member): Likewise.
2870
e3455240
MP
28712017-05-18 Marek Polacek <polacek@redhat.com>
2872
2873 * c-decl.c (start_decl): Use false/true instead of 0/1.
2874 (grokdeclarator): Likewise.
2875 (finish_struct): Likewise.
2876 (start_function): Change the return type to bool. Use false/true
2877 instead of 0/1.
2878 (declspecs_add_qual): Use UNKNOWN_LOCATION instead of 0.
2879 * c-tree.h (start_function): Update.
2880 * c-typeck.c (same_translation_unit_p): Change the return type to bool.
2881 (set_designator): Change the return type to bool. Use false/true
2882 instead of 0/1.
2883
3fa8871b
MP
28842017-05-17 Marek Polacek <polacek@redhat.com>
2885
2886 * c-decl.c: Use NULL_TREE instead of 0 where appropriate.
2887 * c-typeck.c: Likewise.
2888
142473df
MP
28892017-05-17 Marek Polacek <polacek@redhat.com>
2890
2891 PR sanitizer/80659
2892 * c-decl.c (build_compound_literal): Set DECL_ARTIFICIAL and
2893 DECL_IGNORED_P even for non-static compound literals.
2894
1a817418
ML
28952017-05-17 Martin Liska <mliska@suse.cz>
2896
2897 * c-decl.c (c_parse_final_cleanups): Introduce dump_flags_t type and
2898 use it instead of int type.
2899
b2fa0a8b
MP
29002017-05-17 Marek Polacek <polacek@redhat.com>
2901
2902 * c-convert.c (convert): Replace c_save_expr with save_expr. Don't
2903 call c_fully_fold.
2904 (convert) <case COMPLEX_TYPE>: Remove special handling of COMPLEX_TYPEs.
ab20d992 2905 * c-decl.c (grokdeclarator): Replace c_save_expr with save_expr.
b2fa0a8b
MP
2906 * c-fold.c (c_fully_fold_internal): Handle SAVE_EXPR.
2907 * c-parser.c (c_parser_declaration_or_fndef): Replace c_save_expr with
2908 save_expr.
2909 (c_parser_conditional_expression): Likewise.
2910 * c-tree.h (SAVE_EXPR_FOLDED_P): Define.
2911 * c-typeck.c (build_modify_expr): Replace c_save_expr with save_expr.
2912 (process_init_element): Likewise.
2913 (build_binary_op): Likewise.
2914 (handle_omp_array_sections_1): Likewise.
2915
1e47f02b
TS
29162017-05-12 Thomas Schwinge <thomas@codesourcery.com>
2917
2918 * c-parser.c (c_parser_omp_clause_num_gangs)
2919 (c_parser_omp_clause_num_workers)
2920 (c_parser_omp_clause_vector_length): Merge functions into...
2921 (c_parser_oacc_single_int_clause): ... this new function. Adjust
2922 all users.
2923
c24e924f
NS
29242017-05-11 Nathan Sidwell <nathan@acm.org>
2925
2926 * gimple-parser.c: Don't #include tree-dump.h.
2927
c587104e
MM
29282017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
2929
2930 PR testsuite/80580
2931 * gimple-parser.c (c_parser_parse_ssa_name): Validate SSA name base.
2932
67ac9a9d
MM
29332017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
2934
2935 PR testsuite/80580
2936 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
2937 incorrect __MEM syntax.
2938
ac4eb40f
MM
29392017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
2940
2941 PR testsuite/80580
2942 * gimple-parser.c (c_parser_gimple_unary_expression): Check argument
2943 type of unary '*'.
2944
641da50a
NS
29452017-05-09 Nathan Sidwell <nathan@acm.org>
2946
2947 * c-tree.h (pushdecl): Declare.
2948
56d35585
DM
29492017-05-05 David Malcolm <dmalcolm@redhat.com>
2950
2951 * c-decl.c (warn_defaults_to): Replace report_diagnostic
2952 with diagnostic_report_diagnostic.
2953 * c-errors.c (pedwarn_c99): Likewise.
2954 (pedwarn_c90): Likewise.
2955
815d9cc6
XR
29562017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn>
2957
92a285c1 2958 PR c++/80038
815d9cc6
XR
2959 * c-gimplify.c (c_gimplify_expr): Remove calls to
2960 cilk_gimplifY_call_params_in_spawned_fn.
2961
1c4ea66f
DM
29622017-04-25 David Malcolm <dmalcolm@redhat.com>
2963
2964 * c-parser.c (c_parser_struct_or_union_specifier): Add fix-it
2965 hint for removing extra semicolon.
2966
666f7903
JJ
29672017-04-21 Jakub Jelinek <jakub@redhat.com>
2968
2969 PR c/80468
2970 * c-decl.c (finish_declspecs) <case cts_int_n>: If int_n_idx is not
2971 enabled, set specs->type to integer_type_node.
2972
5764ee3c
JW
29732017-04-03 Jonathan Wakely <jwakely@redhat.com>
2974
2975 * c-array-notation.c: Fix typo in comment.
2976
10fa8dfb
MP
29772017-03-29 Marek Polacek <polacek@redhat.com>
2978
2979 PR c/79730
2980 * c-decl.c (finish_decl): Check VAR_P.
2981
a9e4a1a5
JJ
29822017-03-27 Jakub Jelinek <jakub@redhat.com>
2983
2984 PR middle-end/80162
2985 * c-tree.h (c_mark_addressable): Add array_ref_p argument.
2986 * c-typeck.c (c_mark_addressable): Likewise. Look through
2987 VIEW_CONVERT_EXPR unless array_ref_p and VCE is from VECTOR_TYPE
2988 to ARRAY_TYPE.
2989 (build_array_ref): Pass true as array_ref_p to c_mark_addressable.
2990
ee3ff394
MP
29912017-03-23 Marek Polacek <polacek@redhat.com>
2992
2993 * c-tree.h: Remove a C_RID_YYCODE reference.
2994
4d1b8e70
JJ
29952017-03-21 Jakub Jelinek <jakub@redhat.com>
2996
2997 PR c/80097
2998 * c-typeck.c (build_binary_op): Add EXCESS_PRECISION_EXPR only around
2999 optional COMPOUND_EXPR with ubsan instrumentation.
3000
31dc71a8
MP
30012017-03-17 Marek Polacek <polacek@redhat.com>
3002
3003 * c-parser.c: Add C11 references.
3004
d579c385
MP
30052017-03-15 Marek Polacek <polacek@redhat.com>
3006
3007 * c-parser.c (c_parser_enum_specifier): Remove redundant line.
3008
85059a38
MP
30092017-03-11 Marek Polacek <polacek@redhat.com>
3010
3011 * c-decl.c (implicit_decl_warning): Add a comment. Fix formatting.
3012
2f6f187a
DM
30132017-03-10 David Malcolm <dmalcolm@redhat.com>
3014
3015 PR translation/79848
3016 * c-decl.c (declspecs_add_type): Simplify uses of "%<%s%>" to
3017 "%qs".
3018 * c-parser.c (c_parser_oacc_shape_clause): Likewise.
3019
36618428
MP
30202017-03-09 Marek Polacek <polacek@redhat.com>
3021
3022 PR sanitizer/79757
3023 * c-parser.c (c_parser_declaration_or_fndef): Don't sanitize old-style
3024 parameter declarations with initializers.
3025
01e5af5a
JJ
30262017-03-09 Jakub Jelinek <jakub@redhat.com>
3027
3028 PR c/79969
3029 * c-decl.c (start_enum): Adjust DECL_SOURCE_LOCATION of
3030 TYPE_STUB_DECL.
3031
a71dbc63
JJ
30322017-03-07 Jakub Jelinek <jakub@redhat.com>
3033
3034 PR c/79834
3035 * c-parser.c (c_parser_pragma): Use error_at instead of c_parser_error
3036 for "may only be used in compound statements" diagnostics, change it
3037 such that the same translatable string is used for all pragmas. For
3038 PRAGMA_OACC_WAIT use "acc wait" rather than "acc enter data" in the
3039 diagnostics.
3040 (c_parser_omp_cancellation_point, c_parser_omp_target_update,
3041 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Change
3042 "may only be used in compound statements" diagnostics, such that the
3043 same translatable string is used for all pragmas.
3044
1ff4bae6
MP
30452017-03-04 Marek Polacek <polacek@redhat.com>
3046
3047 PR c/79847
3048 * c-decl.c (implicit_decl_warning): Add missing space.
3049
7f5a7d78
MP
30502017-03-03 Marek Polacek <polacek@redhat.com>
3051
3052 PR c/79758
3053 * c-decl.c (store_parm_decls_oldstyle): Check if the element of
3054 current_function_prototype_arg_types is error_mark_node. Fix
3055 formatting. Use TREE_VALUE instead of TREE_TYPE.
3056
883c8f06
JJ
30572017-03-03 Jakub Jelinek <jakub@redhat.com>
3058
79c9b7a8
JJ
3059 PR c/79837
3060 * c-parser.c (c_parser_omp_clause_reduction): Don't mention
3061 %<min%> or %<max%> in the diagnostics, instead mention identifier.
3062 (c_parser_omp_declare_reduction): Don't mention %<min%> in the
3063 diagnostics.
3064
883c8f06
JJ
3065 PR c/79836
3066 * c-parser.c (c_parser_generic_selection): Use %<_Generic%>
3067 instead of %<_Generic>.
3068 (c_parser_omp_ordered): Use %<depend%> instead of %<depend>.
3069 (c_parser_omp_target_exit_data): Use %<release%> instead of
3070 %<release>.
3071
324ff1a0
JJ
30722017-02-28 Jakub Jelinek <jakub@redhat.com>
3073
3074 * c-parser.c (c_parser_asm_statement): Use cond ? G_("...") : G_("...")
3075 instead of just cond ? "..." : "...".
3076 (c_parser_oacc_enter_exit_data): Use %s and ternary operator only
3077 for "enter"/"exit" keyword.
3078 (c_finish_oacc_routine): Don't use %s to supply portions of the
3079 message.
3080
4227c9ad
JJ
30812017-02-24 Jakub Jelinek <jakub@redhat.com>
3082
3083 PR c++/79588
3084 * c-parser.c (c_parser_postfix_expression_after_primary): Don't
3085 handle -Wrestrict here.
3086 * c-typeck.c (build_function_call_vec): Adjust
3087 check_function_arguments caller.
3088
5d972e66
RB
30892017-02-23 Richard Biener <rguenther@suse.de>
3090
3091 PR c/79684
3092 * gimple-parser.c (c_parser_gimple_statement): Use set_error
3093 to initialize c_exprs to return.
3094 (c_parser_gimple_binary_expression): Likewise.
3095 (c_parser_gimple_unary_expression): Likewise.
3096 (c_parser_gimple_postfix_expression): Likewise.
3097
61ac5ebe
MP
30982017-02-22 Marek Polacek <polacek@redhat.com>
3099
3100 PR c/79662
3101 * c-typeck.c (convert_arguments): Handle error_mark_node.
3102
41d1b0b1
PK
31032017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3104
3105 * gimple-parser.c (c_parser_gimple_postfix_expression): Check return
3106 value of c_parser_parse_ssa_name against error_mark_node and emit
3107 error if ssa name is anonymous and written as default definition.
3108
eab1f169
PK
31092017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3110
3111 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
3112 FMA_EXPR.
3113
bcac0b4d
JJ
31142017-02-16 Jakub Jelinek <jakub@redhat.com>
3115
3116 PR c++/79512
3117 * c-parser.c (c_parser_omp_target): For -fopenmp-simd
3118 ignore #pragma omp target even when not followed by identifier.
3119
1be33173
PK
31202017-02-14 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3121
3122 * gimpler-parser.c (c_parser_gimple_statement): Handle ABS_EXPR.
3123 (c_parser_gimple_unary_expression): Likewise.
3124
aa326bfb
JJ
31252017-02-13 Jakub Jelinek <jakub@redhat.com>
3126
3127 * c-parser.c (c_parser_oacc_declare): Add missing space in
3128 diagnostics.
3129
8a398bc5
PK
31302017-02-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3131
3132 PR c/79478
3133 * gimple-parser.c (c_parser_gimple_postfix_expression): Call
3134 set_c_expr_source_range when parsing ssa-name.
3135
3dcde5ef 31362017-02-10 Prasad Ghangal <prasad.ghangal@gmail.com>
ab20d992 3137 Richard Biener <rguenther@suse.de>
3dcde5ef
PG
3138
3139 * gimple-parser.c (c_parser_gimple_binary_expression): Avoid
3140 building IL when arguments are error_mark_node.
3141 (c_parser_gimple_unary_expression): Likewise.
3142 (c_parser_gimple_if_stmt): Likewise.
3143 (c_parser_gimple_switch_stmt): Likewise.
3144 (c_parser_gimple_return_stmt): Likewise.
3145 (c_parser_parse_ssa_name): When name lookup fails do not build
3146 an SSA name. Use undeclared rather than not declared in error
3147 reporting.
3148
192b048b
MP
31492017-02-09 Marek Polacek <polacek@redhat.com>
3150
3151 PR c/79428
3152 * c-parser.c (c_parser_omp_ordered): Call c_parser_skip_to_pragma_eol
3153 instead of c_parser_skip_until_found.
3154
56f71478
JJ
31552017-02-09 Jakub Jelinek <jakub@redhat.com>
3156
3157 PR c/79431
3158 * c-parser.c (c_parser_omp_declare_target): Don't invoke
3159 symtab_node::get on automatic variables.
3160
02889d23
CLT
31612016-02-09 Nathan Sidwell <nathan@codesourcery.com>
3162 Chung-Lin Tang <cltang@codesourcery.com>
3163
3164 * c-parser.c (c_parser_omp_clause_collapse): Disallow tile.
3165 (c_parser_oacc_clause_tile): Disallow collapse. Fix parsing and
3166 semantic checking.
3167 * c-parser.c (c_parser_omp_for_loop): Accept tiling constructs.
3168
7af4b20d
RB
31692017-02-07 Richard Biener <rguenther@suse.de>
3170
3171 * gimple-parser.c (c_parser_gimple_expr_list): Simplify.
3172 (c_parser_gimple_postfix_expression_after_primary):
3173 Do not use c_build_function_call_vec to avoid folding and promotion.
3174 Simplify.
3175
e5e391d6
MO
31762017-01-25 Maxim Ostapenko <m.ostapenko@samsung.com>
3177
3178 PR lto/79061
3179 * c-decl.c (pop_scope): Pass main_input_filename to
3180 build_translation_unit_decl.
3181
c2e84327
DM
31822017-01-24 David Malcolm <dmalcolm@redhat.com>
3183
3184 * c-parser.c: Include "read-rtl-function.h" and
3185 "run-rtl-passes.h".
3186 (c_parser_declaration_or_fndef): Rename "gimple-pass-list" in
3187 grammar to gimple-or-rtl-pass-list. Add rtl-function-definition
3188 production. Update for renaming of field "gimple_pass" to
3189 "gimple_or_rtl_pass". If __RTL was seen, call
3190 c_parser_parse_rtl_body. Convert a timevar_push/pop pair
3191 to an auto_timevar, to cope with early exit.
3192 (c_parser_declspecs): Update RID_GIMPLE handling for renaming of
3193 field "gimple_pass" to "gimple_or_rtl_pass", and for renaming of
3194 c_parser_gimple_pass_list to c_parser_gimple_or_rtl_pass_list.
3195 Handle RID_RTL.
3196 (c_parser_parse_rtl_body): New function.
3197 * c-tree.h (enum c_declspec_word): Add cdw_rtl.
3198 (struct c_declspecs): Rename field "gimple_pass" to
3199 "gimple_or_rtl_pass". Add field "rtl_p".
3200 * gimple-parser.c (c_parser_gimple_pass_list): Rename to...
3201 (c_parser_gimple_or_rtl_pass_list): ...this, updating accordingly.
3202 * gimple-parser.h (c_parser_gimple_pass_list): Rename to...
3203 (c_parser_gimple_or_rtl_pass_list): ...this.
3204
2ebd93e1
MP
32052017-01-20 Marek Polacek <polacek@redhat.com>
3206
3207 PR c/64279
3208 * c-typeck.c (build_conditional_expr): Warn about duplicated branches.
3209
b1c95bb5
RB
32102017-01-13 Richard Biener <rguenther@suse.de>
3211
3212 * gimple-parser.c (c_parser_gimple_compound_statement): Handle
3213 nops.
3214
25329913
RB
32152017-01-13 Richard Biener <rguenther@suse.de>
3216
3217 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
3218 _Literal ( type-name ) number.
3219
6bb4ea5c
RB
32202017-01-12 Richard Biener <rguenther@suse.de>
3221
3222 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
3223 __MEM.
3224
6b5b4e9c
JJ
32252017-01-11 Jakub Jelinek <jakub@redhat.com>
3226
3227 PR c++/72813
3228 * c-decl.c (pop_file_scope): Set flag_syntax_only to 1 after writing
3229 PCH file.
3230
e3252775
RB
32312017-01-11 Richard Biener <rguenther@suse.de>
3232
3233 PR bootstrap/79052
3234 * gimple-parser.c (c_parser_gimple_switch_stmt): Add missing
3235 returns on parse errors.
3236
a9342885
MP
32372017-01-04 Marek Polacek <polacek@redhat.com>
3238
3239 PR c++/64767
3240 * c-parser.c (c_parser_postfix_expression): Mark zero character
3241 constants by setting original_type in c_expr.
3242 * c-typeck.c (parser_build_binary_op): Warn when a pointer is compared
3243 with a zero character constant.
3244 (char_type_p): New function.
3245
5dd9a9d0
DM
32462017-01-04 David Malcolm <dmalcolm@redhat.com>
3247
3248 * c-parser.c (c_parser_declaration_or_fndef): Create a
3249 rich_location at init_loc and parse it to start_init.
3250 (last_init_list_comma): New global.
3251 (c_parser_braced_init): Update last_init_list_comma when parsing
3252 commas. Pass it to pop_init_level. Pass location of closing
3253 brace to pop_init_level.
3254 (c_parser_postfix_expression_after_paren_type): Create a
3255 rich_location at type_loc and parse it to start_init.
3256 (c_parser_omp_declare_reduction): Likewise for loc.
3257 * c-tree.h (start_init): Add rich_location * param.
3258 (pop_init_level): Add location_t param.
3259 * c-typeck.c (struct initializer_stack): Add field
3260 "missing_brace_richloc".
3261 (start_init): Add richloc param, use it to initialize
3262 the stack node's missing_brace_richloc.
3263 (last_init_list_comma): New decl.
3264 (finish_implicit_inits): Pass last_init_list_comma to
3265 pop_init_level.
3266 (push_init_level): When finding missing open braces, add fix-it
3267 hints to the richloc.
3268 (pop_init_level): Add "insert_before" param and pass it
3269 when calling pop_init_level. Add fixits about missing
3270 close braces to any richloc. Use the richloc for the
3271 -Wmissing-braces warning.
3272 (set_designator): Pass last_init_list_comma to pop_init_level.
3273 (process_init_element): Likewise.
3274
cbe34bb5
JJ
32752017-01-01 Jakub Jelinek <jakub@redhat.com>
3276
3277 Update copyright years.
3278
d17680f3
JJ
32792016-12-21 Jakub Jelinek <jakub@redhat.com>
3280
0dba7960
JJ
3281 PR bootstrap/78817
3282 * c-typeck.c (build_function_call_vec): If check_function_arguments
3283 returns true, set TREE_NO_WARNING on CALL_EXPR.
3284
d17680f3
JJ
3285 PR c/77767
3286 * c-decl.c (grokdeclarator): If *expr is non-NULL, append expression
3287 to *expr instead of overwriting it.
3288
aa90531e
RB
32892016-12-20 Richard Biener <rguenther@suse.de>
3290
3291 * gimple-parser.c (c_parser_gimple_compound_statement): Improve
3292 error recovery.
3293 (c_parser_gimple_statement): Only build assigns for non-error
3294 stmts.
3295 (c_parser_gimple_postfix_expression_after): Improve error recovery.
3296
629b3d75
MJ
32972016-12-14 Martin Jambor <mjambor@suse.cz>
3298
3299 * c-parser.c: Include omp-general.h and omp-offload.h instead of
3300 omp-low.h.
3301 (c_finish_oacc_routine): Adjusted call to
3302 get_oacc_fn_attrib, build_oacc_routine_dims and replace_oacc_fn_attrib
3303 to use their new names.
3304 (c_parser_oacc_enter_exit_data): Adjusted call to find_omp_clause to
3305 use its new name.
3306 (c_parser_oacc_update): Likewise.
3307 (c_parser_omp_simd): Likewise.
3308 (c_parser_omp_target_update): Likewise.
3309 * c-typeck.c: Include omp-general.h instead of omp-low.h.
3310 (c_finish_omp_cancel): Adjusted call to find_omp_clause to use its new
3311 name.
3312 (c_finish_omp_cancellation_point): Likewise.
3313 * gimple-parser.c: Do not include omp-low.h
3314
c5af52eb
CP
33152016-12-02 Cesar Philippidis <cesar@codesourcery.com>
3316 James Norris <jnorris@codesourcery.com>
3317
3318 * c-parser.c (c_parser_pragma): Error when PRAGMA_OACC_{ENTER_DATA,
3319 EXIT_DATA,WAIT} are not used in compound statements.
3320 (c_parser_oacc_enter_exit_data): Update diagnostics.
3321
48330c93
BE
33222016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
3323
3324 PR c++/71973
3325 * c-decl.c (diagnose_mismatched_decls): Use
3326 OPT_Wbuiltin_declaration_mismatch here too.
3327
899ca90e 33282016-11-18 Richard Sandiford <richard.sandiford@arm.com>
48330c93
BE
3329 Alan Hayward <alan.hayward@arm.com>
3330 David Sherwood <david.sherwood@arm.com>
899ca90e
RS
3331
3332 * c-decl.c (merge_decls): Use SET_DECL_MODE.
3333 (make_label, finish_struct): Likewise.
3334
1ee62b92 33352016-11-14 Prasad Ghangal <prasad.ghangal@gmail.com>
8e745a17 3336 Richard Biener <rguenther@suse.de>
22b15758 3337
8e745a17
JJ
3338 * Make-lang.in (C_AND_OBJC_OBJS): Add gimple-parser.o.
3339 * config-lang.in (gtfiles): Add c/c-parser.h.
3340 * c-tree.h (enum c_declspec_word): Add cdw_gimple.
3341 (struct c_declspecs): Add gimple_pass member and gimple_p flag.
3342 * c-parser.c (enum c_id_kind, struct c_token,
3343 c_parser_next_token_is, c_parser_next_token_is_not,
3344 c_parser_next_token_is_keyword,
3345 enum c_lookahead_kind, enum c_dtr_syn, enum c_parser_prec):
3346 Split out to ...
3347 * c-parser.h: ... new header.
3348 * c-parser.c: Include c-parser.h and gimple-parser.h.
1ee62b92 3349 (c_parser_peek_token, c_parser_peek_2nd_token,
8e745a17
JJ
3350 c_token_starts_typename, c_parser_next_token_starts_declspecs,
3351 c_parser_next_tokens_start_declaration, c_parser_consume_token,
3352 c_parser_error, c_parser_require, c_parser_skip_until_found,
3353 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
3354 c_parser_type_name): Export.
3355 (c_parser_tokens_buf): New function.
3356 (c_parser_error): Likewise.
3357 (c_parser_set_error): Likewise.
3358 (c_parser_declspecs): Handle RID_GIMPLE.
1ee62b92
PG
3359 (c_parser_declaration_or_fndef): Parse __GIMPLE marked body
3360 via c_parser_parse_gimple_body.
8e745a17
JJ
3361 * c-parser.h (c_parser_peek_token, c_parser_peek_2nd_token,
3362 c_token_starts_typename, c_parser_next_token_starts_declspecs,
3363 c_parser_next_tokens_start_declaration, c_parser_consume_token,
3364 c_parser_error, c_parser_require, c_parser_skip_until_found,
3365 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
3366 c_parser_type_name): Declare.
1ee62b92
PG
3367 (struct c_parser): Declare forward.
3368 (c_parser_tokens_buf): Declare.
8e745a17
JJ
3369 (c_parser_error): Likewise.
3370 (c_parser_set_error): Likewise.
3371 * gimple-parser.c: New file.
3372 * gimple-parser.h: Likewise.
1ee62b92 3373
22b15758
UB
33742016-11-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3375
3376 PR c/35503
3377 * c-parser.c (c_parser_postfix_expression_after_primary): Call
3378 warn_for_restrict.
3379
84ff4775
LCW
33802016-09-11 Le-Chun Wu <lcwu@google.com>
3381 Mark Wielaard <mjw@redhat.com>
3382
3383 * c-decl.c (warn_if_shadowing): Use the warning code corresponding
3384 to the given -Wshadow= variant.
3385
4d0cdd0c
TP
33862016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
3387
3388 * c-typeck.c: Include memmodel.h.
3389
1202f33e
JJ
33902016-10-13 Jakub Jelinek <jakub@redhat.com>
3391
3392 PR target/77957
3393 * c-objc-common.h (LANG_HOOKS_GETDECLS): Use hook_tree_void_null
3394 instead of lhd_return_null_tree_v.
3395
8a14afd0
BS
33962016-10-07 Bernd Schmidt <bschmidt@redhat.com>
3397
3398 PR c++/69733
3399 * c-decl.c (smallest_type_quals_location): New static function.
3400 (grokdeclarator): Try to find the correct location for an ignored
3401 qualifier.
3402
81fea426
MP
34032016-09-26 Marek Polacek <polacek@redhat.com>
3404
3405 PR c/7652
3406 * c-decl.c (pop_scope): Add gcc_fallthrough.
3407
34082016-09-26 Marek Polacek <polacek@redhat.com>
3409
3410 PR c/7652
3411 * c-parser.c (struct c_token): Add flags field.
3412 (c_lex_one_token): Pass it to c_lex_with_flags.
3413 (c_parser_declaration_or_fndef): Turn __attribute__((fallthrough));
3414 into IFN_FALLTHROUGH.
3415 (c_parser_label): Set FALLTHROUGH_LABEL_P on labels. Handle
3416 attribute fallthrough after a case label or default label.
3417 (c_parser_statement_after_labels): Handle RID_ATTRIBUTE.
3418
9a2300e9
MP
34192016-09-24 Marek Polacek <polacek@redhat.com>
3420
3421 PR c/77490
3422 * c-typeck.c (build_unary_op): Warn about bit not on expressions that
3423 have boolean value. Warn about ++/-- on booleans.
3424
7de76362
JJ
34252016-09-23 Jakub Jelinek <jakub@redhat.com>
3426
3427 * c-parser.c (incomplete_record_decls): Remove unnecessary
3428 = vNULL initialization of file scope vec.
3429
5b73d2ab
MP
34302016-09-16 Marek Polacek <polacek@redhat.com>
3431
3432 * c-typeck.c (lvalue_p): Use true and false instead of 1 and 0.
3433
e51fbec3
MP
34342016-09-14 Marek Polacek <polacek@redhat.com>
3435
3436 * c-array-notation.c (create_cmp_incr): Use false instead of 0.
3437 (fix_array_notation_expr): Likewise.
3438 * c-decl.c (finish_decl): Likewise.
3439 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
3440 * c-typeck.c (array_to_pointer_conversion): Use true instead of 1.
3441 (function_to_pointer_conversion): Use false instead of 0.
3442 (convert_lvalue_to_rvalue): Likewise.
3443 (parser_build_unary_op): Likewise.
3444 (build_atomic_assign): Likewise.
3445 (build_unary_op): Change nonconvert parameter type to bool, use
3446 true/false instead of 1/0.
3447 (build_binary_op): Use true instead of 1.
3448
254830ba
DM
34492016-09-13 David Malcolm <dmalcolm@redhat.com>
3450
3451 * c-parser.c (c_parser_declaration_or_fndef): Update for renaming
3452 of add_fixit_insert to add_fixit_insert_before.
3453
4c13ba17
MP
34542016-09-13 Marek Polacek <polacek@redhat.com>
3455
3456 * c-typeck.c (build_unary_op): Rename FLAG parameter to NOCONVERT. Use
3457 it.
3458
54dcdb88
BE
34592016-09-12 Bernd Edlinger <bernd.edlinger@hotmail.de>
3460
3461 PR c++/77496
3462 * c-parser.c (c_parser_conditional_expression): Pass the rightmost
3463 COMPOUND_EXPR to warn_for_omitted_condop.
3464
e5106e27
DM
34652016-09-07 David Malcolm <dmalcolm@redhat.com>
3466
3467 * c-lang.c (LANG_HOOKS_GET_SUBSTRING_LOCATION): Use
3468 c_get_substring_location for this new langhook.
3469
9dc5773f
JJ
34702016-09-02 Jakub Jelinek <jakub@redhat.com>
3471
3472 PR c/65467
3473 * c-parser.c (c_parser_declspecs): Don't sorry about _Atomic if
3474 flag_openmp.
3475 (c_parser_omp_variable_list): Use convert_lvalue_to_rvalue
3476 instead of mark_exp_read on low_bound/length expression.
3477 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_threads,
3478 c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
3479 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
3480 c_parser_omp_clause_num_workers, c_parser_oacc_shape_clause,
3481 c_parser_oacc_clause_tile, c_parser_omp_clause_schedule,
3482 c_parser_omp_clause_vector_length, c_parser_omp_clause_num_teams,
3483 c_parser_omp_clause_thread_limit, c_parser_omp_clause_aligned,
3484 c_parser_omp_clause_linear, c_parser_omp_clause_safelen,
3485 c_parser_omp_clause_simdlen, c_parser_omp_clause_device,
3486 c_parser_omp_clause_dist_schedule): Use convert_lvalue_to_rvalue
3487 instead of mark_expr_read.
3488 (c_parser_omp_declare_reduction): Reject _Atomic qualified types.
3489 * c-objc-common.h (LANG_HOOKS_OMP_CLAUSE_COPY_CTOR,
3490 LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP): Redefine.
3491 * c-tree.h (c_omp_clause_copy_ctor): New prototype.
3492 * c-typeck.c (handle_omp_array_sections_1): Diagnose _Atomic qualified
3493 array section bases outside of depend clause, for depend clause
3494 use convert_lvalue_to_rvalue on the base.
3495 (c_finish_omp_clauses): Reject _Atomic qualified vars in reduction,
3496 linear, aligned, map, to and from clauses.
3497 (c_omp_clause_copy_ctor): New function.
3498
295844f6
MP
34992016-09-01 Marek Polacek <polacek@redhat.com>
3500
3501 PR c/7652
3502 * c-typeck.c (composite_type): Add FALLTHRU comment.
3503
089af25c
DM
35042016-08-31 David Malcolm <dmalcolm@redhat.com>
3505
3506 * c-parser.c (c_parser_declaration_or_fndef): Add trailing space
3507 to the insertion fixits for "struct", "union", and "enum".
3508
f9087798
DM
35092016-08-30 David Malcolm <dmalcolm@redhat.com>
3510
3511 * c-decl.c (implicit_decl_warning): Use add_fixit_replace
3512 rather than add_fixit_misspelled_id.
3513 (undeclared_variable): Likewise.
3514 * c-parser.c (c_parser_declaration_or_fndef): Likewise. Remove
3515 now-redundant "here" params from add_fixit_insert method calls.
3516 (c_parser_parameter_declaration): Likewise.
3517 * c-typeck.c (build_component_ref): Remove now-redundant range
3518 param from add_fixit_replace method calls.
3519
ebef225f
MP
35202016-08-25 Marek Polacek <polacek@redhat.com>
3521
3522 * c-typeck.c (parser_build_binary_op): Pass LHS to
3523 warn_logical_not_parentheses.
3524
fe377a48
MP
35252016-08-25 Marek Polacek <polacek@redhat.com>
3526
3527 PR c/77323
3528 * c-decl.c (declspecs_add_type): Set typespec_word even when __intN
3529 or _FloatN or _FloatNx is not supported.
3530 (finish_declspecs): Set type to integer_type_node when _FloatN or
3531 _FloatNx is not supported.
3532
c65699ef
JM
35332016-08-19 Joseph Myers <joseph@codesourcery.com>
3534
3535 PR c/32187
3536 * c-tree.h (cts_floatn_nx): New enum c_typespec_keyword value.
3537 (struct c_declspecs): Add field floatn_nx_idx.
3538 * c-decl.c (declspecs_add_type, finish_declspecs): Handle _FloatN
3539 and _FloatNx type specifiers.
3540 * c-parser.c (c_keyword_starts_typename, c_token_starts_declspecs)
3541 (c_parser_declspecs, c_parser_attribute_any_word)
3542 (c_parser_objc_selector): Use CASE_RID_FLOATN_NX.
3543 * c-typeck.c (c_common_type): Handle _FloatN and _FloatNx types.
3544 (convert_arguments): Avoid promoting _FloatN and _FloatNx types
3545 narrower than double.
3546
2f1364c2
JJ
35472016-08-12 Jakub Jelinek <jakub@redhat.com>
3548 Martin Liska <mliska@suse.cz>
3549
3550 PR c/67410
3551 * c-typeck.c (set_nonincremental_init_from_string): Use / instead of
3552 % to determine val element to change. Assert that
3553 wchar_bytes * charwidth fits into val array.
3554
191816a3
MP
35552016-08-12 Marek Polacek <polacek@redhat.com>
3556
3557 PR c/7652
3558 * c-parser.c (c_parser_external_declaration): Add FALLTHRU.
3559 (c_parser_postfix_expression): Likewise.
3560 * c-typeck.c (build_unary_op): Adjust fall through comment.
3561 (c_mark_addressable): Likewise.
3562
b95a64bb
JJ
35632016-08-11 Jakub Jelinek <jakub@redhat.com>
3564
3565 PR c/72816
3566 * c-decl.c (grokdeclarator): When adding TYPE_DOMAIN for flexible
3567 array member through typedef, for orig_qual_indirect == 0 clear
3568 orig_qual_type.
3569
895aa8e1
DM
35702016-08-08 David Malcolm <dmalcolm@redhat.com>
3571
3572 PR c/64955
3573 * c-lang.c (LANG_HOOKS_RUN_LANG_SELFTESTS): If CHECKING_P, wire
3574 this up to selftest::run_c_tests.
3575 (selftest::run_c_tests): New function.
3576
0b212d8c
TS
35772016-08-04 Thomas Schwinge <thomas@codesourcery.com>
3578
ae9281fc
TS
3579 * c-parser.c (struct oacc_routine_data): Add error_seen and
3580 fndecl_seen members.
3581 (c_finish_oacc_routine): Use these.
3582 (c_parser_declaration_or_fndef): Adjust.
3583 (c_parser_oacc_routine): Likewise. Support more C language
3584 constructs, and improve diagnostics. Move pragma context
3585 checking...
3586 (c_parser_pragma): ... here.
3587
0b212d8c
TS
3588 * c-parser.c (struct oacc_routine_data): New.
3589 (c_parser_declaration_or_fndef, c_parser_oacc_routine): Use it.
3590 Simplify code.
3591 (c_finish_oacc_routine): Likewise. Don't attach clauses to "omp
3592 declare target" attribute.
3593
76e2c821
JB
35942016-08-01 Jan Beulich <jbeulich@suse.com>
3595
3596 * c-fold.c (c_fully_fold_internal): Also emit shift count
3597 warnings for vector types.
3598 * c-typeck.c (build_binary_op): Likewise.
3599
f618a472
MP
36002016-07-29 Marek Polacek <polacek@redhat.com>
3601
3602 PR c/71742
3603 * c-decl.c (finish_struct): Rephrase an error message.
3604
efd0786f
MP
3605 PR c/71853
3606 * c-parser.c (c_parser_switch_statement): Initialize ce.original_type
3607 to error node for invalid code.
3608
e00dceaf
MP
3609 PR c/71573
3610 * c-decl.c (implicitly_declare): Return decl early not only for
3611 error_mark_nodes, but for anything that is not a FUNCTION_DECL.
3612
673a107a
JJ
36132016-07-29 Jakub Jelinek <jakub@redhat.com>
3614
3615 PR c/71969
3616 * c-decl.c (finish_function): Only set DECL_DISREGARD_INLINE_LIMITS
3617 on GNU extern inline functions.
3618
a5b5c8b6
MP
36192016-07-29 Marek Polacek <polacek@redhat.com>
3620
3621 PR c/71583
3622 * c-parser.c (c_parser_postfix_expression_after_paren_type): Also
3623 check expr.value.
3624
e3fe09c1
UB
36252016-07-22 Uros Bizjak <ubizjak@gmail.com>
3626
3627 * c-typeck.c: Use HOST_WIDE_INT_1 instead of (HOST_WIDE_INT) 1,
3628
7c8f7eaa
DM
36292016-07-20 David Malcolm <dmalcolm@redhat.com>
3630
3631 * c-decl.c (struct edit_distance_traits<cpp_hashnode *>): Move to
3632 spellcheck-tree.h
3633 (best_macro_match): Likewise, converting from a typedef to a
3634 subclass.
3635 (find_closest_macro_cpp_cb): Move to spellcheck-tree.c.
3636 (lookup_name_fuzzy): Update for change of best_macro_match to a
3637 subclass with a ctor that calls cpp_forall_identifiers.
3638
de6a69ee
DM
36392016-07-20 David Malcolm <dmalcolm@redhat.com>
3640
3641 * c-decl.c (implicit_decl_warning): Update for conversion of
3642 return type of lookup_name_fuzzy to const char *.
3643 (undeclared_variable): Likewise.
3644 (lookup_name_fuzzy): Convert return type from tree to
3645 const char *.
3646 * c-parser.c (c_parser_declaration_or_fndef): Update for
3647 conversion of return type of lookup_name_fuzzy to const char *.
3648 (c_parser_parameter_declaration): Likewise.
3649
b1c9c068
CP
36502016-07-15 Cesar Philippidis <cesar@codesourcery.com>
3651
3652 * c-parser.c (c_parser_oacc_declare): Don't scan for
3653 GOMP_MAP_POINTER.
3654 * c-typeck.c (handle_omp_array_sections): Mark data clauses with
3655 GOMP_MAP_FORCE_{PRESENT,TO,FROM,TOFROM} as potentially having
3656 zero-length subarrays.
3657
ddbbcb19
JJ
36582016-07-15 Jakub Jelinek <jakub@redhat.com>
3659
3660 PR c/71858
3661 * c-decl.c (implicit_decl_warning): Use FUZZY_LOOKUP_FUNCTION_NAME
3662 instead of FUZZY_LOOKUP_NAME.
3663 (lookup_name_fuzzy): For FUZZY_LOOKUP_FUNCTION_NAME consider
3664 FUNCTION_DECLs, {VAR,PARM}_DECLs function pointers and macros.
3665
dd36b877
JJ
36662016-07-14 Jakub Jelinek <jakub@redhat.com>
3667
3668 PR c/71858
3669 * c-decl.c (lookup_name_fuzzy): Ignore binding->invisible.
3670
8c681247
TS
36712016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
3672
3673 * c-parser.c (c_parser_generic_selection): Make type of variable
3674 auto_vec.
3675 (c_parser_omp_declare_simd): Likewise.
3676
bf4fa671
TS
36772016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
3678
3679 * c-decl.c (struct c_struct_parse_info): Change member types
3680 from vec to auto_vec.
3681 (start_struct): Adjust.
3682 (finish_struct): Likewise.
3683
557e8c49
JJ
36842016-07-02 Jakub Jelinek <jakub@redhat.com>
3685
3686 PR c/71719
3687 * c-typeck.c (mark_exp_read): Handle VIEW_CONVERT_EXPR.
3688
54d19c3b
TS
36892016-06-29 Thomas Schwinge <thomas@codesourcery.com>
3690
3691 * c-parser.c (c_parser_pragma) <PRAGMA_OMP_CANCELLATION_POINT>:
3692 Move pragma context checking into...
3693 (c_parser_omp_cancellation_point): ... here, and improve
3694 diagnostic messages.
3695 * c-typeck.c (c_finish_omp_cancel)
3696 (c_finish_omp_cancellation_point): Improve diagnostic messages.
3697
152ef731
JJ
36982016-06-29 Jakub Jelinek <jakub@redhat.com>
3699
3700 PR c/71685
3701 * c-typeck.c (c_build_qualified_type): Don't clear
3702 C_TYPE_INCOMPLETE_VARS for the main variant.
3703
37042016-06-28 Martin Sebor <msebor@redhat.com>
4378d117
MS
3705
3706 PR c/71552
3707 * c-typeck.c (output_init_element): Diagnose incompatible types
3708 before non-constant initializers.
3709
e9ac1f86
JJ
37102016-06-28 Jakub Jelinek <jakub@redhat.com>
3711
3712 * Make-lang.in: Don't cat ../stage_current if it does not exist.
3713
277d7ee0
AK
37142016-06-23 Andi Kleen <ak@linux.intel.com>
3715
3716 * Make-lang.in: Add support for autofdo.
3717
1a4f11c8
DM
37182016-06-22 David Malcolm <dmalcolm@redhat.com>
3719
3720 PR c/70339
3721 * c-decl.c: Include spellcheck-tree.h and gcc-rich-location.h.
3722 (implicit_decl_warning): When issuing warnings for implicit
3723 declarations, attempt to provide a suggestion via
3724 lookup_name_fuzzy.
3725 (undeclared_variable): Likewise when issuing errors.
3726 (lookup_name_in_scope): Likewise.
3727 (struct edit_distance_traits<cpp_hashnode *>): New struct.
3728 (best_macro_match): New typedef.
3729 (find_closest_macro_cpp_cb): New function.
3730 (lookup_name_fuzzy): New function.
3731 * c-parser.c: Include gcc-rich-location.h.
3732 (c_token_starts_typename): Split out case CPP_KEYWORD into...
3733 (c_keyword_starts_typename): ...this new function.
3734 (c_parser_declaration_or_fndef): When issuing errors about
3735 missing "struct" etc, add a fixit. For other kinds of errors,
3736 attempt to provide a suggestion via lookup_name_fuzzy.
3737 (c_parser_parms_declarator): When looking ahead to detect typos in
3738 type names, also reject CPP_KEYWORD.
3739 (c_parser_parameter_declaration): When issuing errors about
3740 unknown type names, attempt to provide a suggestion via
3741 lookup_name_fuzzy.
3742 * c-tree.h (c_keyword_starts_typename): New prototype.
3743
5a578671
JM
37442016-06-20 Joseph Myers <joseph@codesourcery.com>
3745
3746 PR c/71601
3747 * c-typeck.c (build_conditional_expr): Return error_mark_node if
3748 c_common_type returns error_mark_node.
3749
3f8257db 37502016-06-19 Martin Sebor <msebor@redhat.com>
aa0db437
MS
3751
3752 PR c/69507
3753 * c-parser.c (c_parser_alignof_expression): Avoid diagnosing
3754 __alignof__ (expression).
3755
6a3f203c
DM
37562016-06-14 David Malcolm <dmalcolm@redhat.com>
3757
3758 * c-typeck.c: Include spellcheck-tree.h rather than spellcheck.h.
3759
264757fb
DM
37602016-06-14 David Malcolm <dmalcolm@redhat.com>
3761
3762 * c-typeck.c (build_component_ref): Simplify fixit code by
3763 using gcc_rich_location::add_fixit_misspelled_id.
3764 (set_init_label): Likewise.
3765
f7e4f2e3
DM
37662016-06-13 David Malcolm <dmalcolm@redhat.com>
3767
3768 * c-parser.c (c_parser_initelt): Provide location of name for new
3769 location_t param of set_init_label.
3770 * c-tree.h (set_init_label): Add location_t param.
3771 * c-typeck.c (set_init_index): Add "fieldname_loc" location_t
3772 param and use it when issuing error messages about unrecognized
3773 field names. Attempt to provide a fixit hint if appropriate,
3774 otherwise update the error message to provide the type name.
3775
4b1ffdb1
TS
37762016-06-10 Thomas Schwinge <thomas@codesourcery.com>
3777
3778 PR c/71381
3779 * c-parser.c (c_parser_omp_variable_list) <OMP_CLAUSE__CACHE_>:
3780 Loosen checking.
3781
44a845ca
MS
37822016-06-08 Martin Sebor <msebor@redhat.com>
3783 Jakub Jelinek <jakub@redhat.com>
3784
3785 PR c++/70507
3786 PR c/68120
3787 * c-typeck.c (convert_arguments): Don't promote last argument
3788 of BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
3789
92a5f2ba
MP
37902016-06-08 Marek Polacek <polacek@redhat.com>
3791
3792 PR c/71418
3793 * c-decl.c (grokdeclarator): Check TYPE_P.
3794
08203f73
MP
3795 PR c/71426
3796 * c-decl.c (get_parm_info): Don't crash on an assert on invalid
3797 code.
3798
6ffd47b7
DM
37992016-06-07 David Malcolm <dmalcolm@redhat.com>
3800
3801 * c-parser.c (c_parser_postfix_expression): In __builtin_offsetof
3802 and structure element reference, capture the location of the
3803 element name token and pass it to build_component_ref.
3804 (c_parser_postfix_expression_after_primary): Likewise for
3805 structure element dereference.
3806 (c_parser_omp_variable_list): Likewise for
3807 OMP_CLAUSE_{_CACHE, MAP, FROM, TO},
3808 * c-tree.h (build_component_ref): Add location_t param.
3809 * c-typeck.c (build_component_ref): Add location_t param
3810 COMPONENT_LOC. Use it, if available, when issuing hints about
3811 mispelled member names to provide a fixit replacement hint.
3812
1f40cff3
MP
38132016-06-06 Marek Polacek <polacek@redhat.com>
3814
3815 PR c/71362
3816 * c-parser.c (c_parser_direct_declarator): Set location.
3817
5545a907
MP
38182016-06-06 Marek Polacek <polacek@redhat.com>
3819
3820 * c-typeck.c (comptypes_internal): Handle comparisons of
3821 INTEGER_TYPE, FIXED_POINT_TYPE, and REAL_TYPE nodes. Don't check
3822 TYPE_REF_CAN_ALIAS_ALL.
3823
b605f663
CLT
38242016-06-03 Chung-Lin Tang <cltang@codesourcery.com>
3825
3826 * c-typeck.c (c_finish_omp_clauses): Mark OpenACC reduction
3827 arguments as addressable when async clause exists.
3828
00631022
JJ
38292016-05-30 Jakub Jelinek <jakub@redhat.com>
3830
3831 PR c++/71349
3832 * c-parser.c (c_parser_omp_for): Don't disallow nowait clause
3833 when combined with target construct.
3834
7211a097
JJ
38352016-05-26 Jakub Jelinek <jakub@redhat.com>
3836
3837 * c-parser.c (c_parser_omp_clause_schedule): Warn if
3838 OMP_CLAUSE_SCHEDULE_CHUNK_EXPR is known not to be positive.
3839
95efe6b6
MP
38402016-05-25 Marek Polacek <polacek@redhat.com>
3841
3842 PR c/71265
3843 * c-decl.c (c_make_fname_decl): Don't check seen_error.
3844
a23faf7a
MP
3845 PR c/71266
3846 * c-decl.c (store_parm_decls_oldstyle): Skip non-PARM_DECLs.
3847
e46c7770
CP
38482016-05-24 Cesar Philippidis <cesar@codesourcery.com>
3849
3850 * c-parser.c (c_parser_oacc_declare): Add support for
3851 GOMP_MAP_FIRSTPRIVATE_POINTER.
3852 * c-typeck.c (handle_omp_array_sections_1): Replace bool is_omp
3853 argument with enum c_omp_region_type ort.
3854 (handle_omp_array_sections): Likewise. Update call to
3855 handle_omp_array_sections_1.
3856 (c_finish_omp_clauses): Add specific errors and warning messages for
3857 OpenACC. Use firsrtprivate pointers for OpenACC subarrays. Update
3858 call to handle_omp_array_sections.
3859
a04e69c0
TS
38602016-05-24 Thomas Schwinge <thomas@codesourcery.com>
3861
3862 * c-parser.c (c_parser_oacc_routine): Tighten syntax checks.
3863
f17a223d
RB
38642016-05-24 Richard Biener <rguenther@suse.de>
3865
3866 PR middle-end/70434
3867 PR c/69504
3868 * c-typeck.c (build_array_ref): Do not complain about indexing
3869 non-lvalue vectors. Adjust for function name change.
3870
79063edd
MS
38712016-05-20 Martin Sebor <msebor@redhat.com>
3872
3873 PR c/71115
3874 * c-typeck.c (error_init): Use
3875 expansion_point_location_if_in_system_header.
3876 (warning_init): Same.
3877
8a40fef3
DM
38782016-05-19 David Malcolm <dmalcolm@redhat.com>
3879
3880 PR c/71171
3881 * c-parser.c (c_parser_generic_selection): Use c_expr::set_error
3882 in error-handling.
3883 (c_parser_postfix_expression): Likewise.
3884 * c-tree.h (c_expr::set_error): New method.
3885 * c-typeck.c (parser_build_binary_op): In error-handling, ensure
3886 that result's range is initialized.
3887
e9892350
JG
38882016-05-17 James Greenhalgh <james.greenhalgh@arm.com>
3889
3890 * c-typeck.c (parser_build_unary_op): Fix formatting.
3891
8fad45f5
MW
38922016-05-16 Matthew Wahab <matthew.wahab@arm.com>
3893
3894 * c-decl.c (grokdeclarator): Remove errmsg and use of
3895 targetm.invalid_return_type.
3896 (grokparms): Remove errmsg and use of
3897 targetm.invalid_parameter_type.
3898
aa4b467b
JM
38992016-05-13 Joseph Myers <joseph@codesourcery.com>
3900
3901 * c-decl.c (grokdeclarator): For C11, discard qualifiers on
3902 function return type.
3903
4f2e1536
MP
39042016-05-12 Marek Polacek <polacek@redhat.com>
3905
3906 PR c/70756
3907 * c-decl.c (build_compound_literal): Pass LOC down to
3908 c_incomplete_type_error.
3909 * c-tree.h (require_complete_type): Adjust declaration.
3910 (c_incomplete_type_error): Likewise.
3911 * c-typeck.c (require_complete_type): Add location parameter, pass it
3912 down to c_incomplete_type_error.
3913 (c_incomplete_type_error): Add location parameter, pass it down to
3914 error_at.
3915 (build_component_ref): Pass location down to c_incomplete_type_error.
3916 (default_conversion): Pass location down to require_complete_type.
3917 (build_array_ref): Likewise.
3918 (build_function_call_vec): Likewise.
3919 (convert_arguments): Likewise.
3920 (build_unary_op): Likewise.
3921 (build_c_cast): Likewise.
3922 (build_modify_expr): Likewise.
3923 (convert_for_assignment): Likewise.
3924 (c_finish_omp_clauses): Likewise.
3925
d6e83a8d
MM
39262016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
3927
3928 PR c/43651
3929 * c-decl.c (declspecs_add_qual): Warn when -Wduplicate-decl-specifier
3930 is enabled.
3931 * c-errors.c (pedwarn_c90): Return true if warned.
3932 * c-tree.h (pedwarn_c90): Change return type to bool.
3933 (enum c_declspec_word): Add new enumerator cdw_atomic.
3934
5c3a10fb
MP
39352016-05-11 Marek Polacek <polacek@redhat.com>
3936
3937 PR c++/71024
3938 * c-decl.c (diagnose_mismatched_decls): Factor out code to
3939 diagnose_mismatched_attributes and call it.
3940
cf68d92c
MP
39412016-05-10 Marek Polacek <polacek@redhat.com>
3942
3943 PR c/70255
3944 * c-decl.c (diagnose_mismatched_decls): Warn for optimize attribute
3945 on a declaration following the definition.
3946
351f85c5
JJ
39472016-05-05 Jakub Jelinek <jakub@redhat.com>
3948
3949 * c-parser.c (c_parser_switch_statement): Add IF_P argument,
3950 parse it through to c_parser_c99_block_statement.
3951 (c_parser_statement_after_labels): Adjust c_parser_switch_statement
3952 caller.
3953
deef7113
MP
39542016-05-04 Marek Polacek <polacek@redhat.com>
3955
3956 * c-parser.c (c_parser_if_statement): Replace OPT_Wparentheses with
3957 OPT_Wdangling_else.
3958
de55efd5
MP
39592016-05-04 Marek Polacek <polacek@redhat.com>
3960
3961 PR c/48778
3962 * c-typeck.c (build_binary_op): Don't issue -Waddress warnings
3963 for macro expansions.
3964
79ce98bc
MP
39652016-05-03 Marek Polacek <polacek@redhat.com>
3966
3967 PR c/70859
3968 * c-typeck.c (build_function_call_vec): Pass LOC and ARG_LOC down to
3969 check_builtin_function_arguments.
3970
fb2647aa
RB
39712016-05-03 Richard Biener <rguenther@suse.de>
3972
3973 * Make-lang.in (cc1-checksum.c): For stage-final re-use
3974 the checksum from the previous stage.
3975
77886428
CP
39762016-05-02 Cesar Philippidis <cesar@codesourcery.com>
3977
3978 * c-parser.c (c_parser_oacc_all_clauses): Update call to
3979 c_finish_omp_clauses.
3980 (c_parser_omp_all_clauses): Likewise.
3981 (c_parser_oacc_cache): Likewise.
3982 (c_parser_oacc_loop): Likewise.
3983 (omp_split_clauses): Likewise.
3984 (c_parser_omp_declare_target): Likewise.
3985 (c_parser_cilk_all_clauses): Likewise.
3986 (c_parser_cilk_for): Likewise.
3987 * c-typeck.c (c_finish_omp_clauses): Replace bool arguments
3988 is_omp, declare_simd, and is_cilk with enum c_omp_region_type ort.
3989
7176a4a0
MP
39902016-05-02 Marek Polacek <polacek@redhat.com>
3991
3992 PR c/70851
3993 * c-decl.c (grokdeclarator): Diagnose when array's size has an
3994 incomplete type.
3995
e7ff0319
CP
39962016-04-29 Cesar Philippidis <cesar@codesourcery.com>
3997
3998 PR middle-end/70626
3999 * c-parser.c (c_parser_oacc_loop): Don't augment mask with
4000 OACC_LOOP_CLAUSE_MASK.
4001 (c_parser_oacc_kernels_parallel): Update call to
4002 c_oacc_split_loop_clauses.
4003
9f405ce1
AM
40042016-04-28 Andrew MacLeod <amacleod@redhat.com>
4005
4006 * c-array-notation.c (fix_builtin_array_notation_fn): Fix final
4007 argument to build_modify_expr in two cases.
4008
c1e1f433
BS
40092016-04-27 Bernd Schmidt <bschmidt@redhat.com>
4010
4011 * c-parser.c (c_parser_postfix_expression_after_primary): Call
4012 warn_for_memset instead of warning directly here.
4013
2448a956
MP
40142016-04-26 Marek Polacek <polacek@redhat.com>
4015
4016 PR c/67784
4017 * c-parser.c (c_parser_maybe_reclassify_token): New function factored
4018 out of ...
4019 (c_parser_for_statement): ... here.
4020 (c_parser_if_statement): Use it.
4021 (c_parser_switch_statement): Use it.
4022 (c_parser_while_statement): Use it.
4023
b02a5e26
MP
4024 PR c/70791
4025 * c-decl.c (pushdecl): Pass LOCUS down to warning.
4026
477d4906
IV
40272016-04-20 Ilya Verbin <ilya.verbin@intel.com>
4028
4029 PR c++/69363
4030 * c-parser.c (c_parser_cilk_all_clauses): Use c_finish_omp_clauses
4031 instead of c_finish_cilk_clauses.
4032 * c-tree.h (c_finish_omp_clauses): Add new default argument.
4033 * c-typeck.c (c_finish_omp_clauses): Add new argument. Allow
4034 floating-point variables in the linear clause for Cilk Plus.
4035
fe37c7af
MM
40362016-04-18 Michael Matz <matz@suse.de>
4037
4038 * c-decl.c (merge_decls): Use SET_DECL_ALIGN and SET_TYPE_ALIGN.
4039 (grokdeclarator, parser_xref_tag, finish_enum): Use SET_TYPE_ALIGN.
4040
949505a9
MP
40412016-04-15 Marek Polacek <polacek@redhat.com>
4042
4043 PR c/70671
4044 * c-typeck.c (build_unary_op): Pass location down to error and
4045 warning call.
4046
dda1bf61
JJ
40472016-04-15 Jakub Jelinek <jakub@redhat.com>
4048
4049 PR c/70436
4050 * c-parser.c (c_parser_pragma): Add IF_P argument, pass it down
4051 where needed.
4052 (c_parser_external_declaration, c_parser_struct_or_union_specifier,
4053 c_parser_parameter_declaration, c_parser_compound_statement_nostart,
4054 c_parser_objc_class_instance_variables, c_parser_objc_methodprotolist):
4055 Adjust c_parser_pragma callers.
4056 (c_parser_statement_after_labels): Likewise. Adjust c_parser_cilk_for
4057 caller.
4058 (c_parser_omp_structured_block): Add IF_P argument, pass it down to
4059 c_parser_statement.
4060 (c_parser_oacc_data, c_parser_oacc_host_data, c_parser_oacc_loop,
4061 c_parser_oacc_kernels_parallel, c_parser_omp_critical,
4062 c_parser_omp_simd, c_parser_omp_for, c_parser_omp_master,
4063 c_parser_omp_ordered, c_parser_omp_parallel, c_parser_omp_single,
4064 c_parser_omp_task, c_parser_omp_taskgroup, c_parser_omp_distribute,
4065 c_parser_omp_teams, c_parser_omp_target_data, c_parser_omp_target,
4066 c_parser_omp_taskloop, c_parser_omp_construct, c_parser_cilk_grainsize,
4067 c_parser_cilk_simd, c_parser_cilk_for): Add IF_P argument, pass it
4068 down where needed.
4069 (c_parser_omp_for_loop): Likewise. Clear IF_P if nbraces.
4070 (c_parser_omp_sections_scope): Adjust c_parser_omp_structured_block
4071 calls.
4072
99cd9857
MP
40732016-04-13 Marek Polacek <polacek@redhat.com>
4074
4075 PR c/70436
4076 * c-parser.c (c_parser_statement_after_labels): Add IF_P argument and
4077 adjust callers.
4078 (c_parser_statement): Likewise.
4079 (c_parser_c99_block_statement): Likewise.
4080 (c_parser_while_statement): Likewise.
4081 (c_parser_for_statement): Likewise.
4082 (c_parser_if_body): Don't set IF_P here.
4083 (c_parser_if_statement): Add IF_P argument. Set IF_P here. Warn
4084 about dangling else here.
4085 * c-tree.h (c_finish_if_stmt): Adjust declaration.
4086 * c-typeck.c (c_finish_if_stmt): Remove NESTED_IF parameter. Don't
4087 warn about dangling else here.
4088
f13355da
MP
40892016-04-04 Marek Polacek <polacek@redhat.com>
4090
4091 PR c/70307
4092 * c-fold.c (c_fully_fold_internal): Handle VEC_COND_EXPR.
4093
5fde6a45
MP
40942016-03-31 Marek Polacek <polacek@redhat.com>
4095
4096 PR c/70297
4097 * c-decl.c (merge_decls): Also set TYPE_ALIGN and TYPE_USER_ALIGN.
4098
4bbf545b
DM
40992016-03-18 David Malcolm <dmalcolm@redhat.com>
4100
4101 PR c/70281
4102 * c-parser.c (c_parser_postfix_expression): Set the source range
4103 for uses of "__builtin_types_compatible_p".
4104
fcc2b74f
JJ
41052016-03-17 Jakub Jelinek <jakub@redhat.com>
4106
4107 PR c/70280
4108 * c-typeck.c (composite_type): Don't count void_list_node
4109 into len, if the list is terminated by void_list_node, start
4110 with void_list_node instead of NULL for newargs. Stop
4111 at void_list_node.
4112
ab4c578f
MP
41132016-03-16 Marek Polacek <polacek@redhat.com>
4114
4115 PR c/70093
4116 * c-typeck.c (build_function_call_vec): Create a TARGET_EXPR for
4117 nested functions returning VM types.
4118
96b3c82d
CP
41192016-03-09 Cesar Philippidis <cesar@codesourcery.com>
4120
4121 * c-parser.c (c_parser_oacc_loop): Update cclauses and clauses
4122 when calling c_finish_omp_clauses.
4123
29b9828f
BS
41242016-03-04 Bernd Schmidt <bschmidt@redhat.com>
4125
4126 PR c/69824
4127 * c-decl.c (get_parm_info): Don't queue implicit function declarations
4128 for later.
4129
7ff6ca38
MP
41302016-03-04 Marek Polacek <polacek@redhat.com>
4131
4132 PR c/69798
4133 * c-parser.c (c_parser_postfix_expression): Call
4134 c_parser_cast_expression rather than c_parser_postfix_expression.
4135
686e2237
JJ
41362016-03-01 Jakub Jelinek <jakub@redhat.com>
4137
4138 PR c/69796
4139 PR c/69974
4140 * c-parser.c (c_parser_translation_unit): Don't change TREE_TYPE
4141 of incomplete decls to error_mark_node.
4142
0b05329b
MP
41432016-02-24 Marek Polacek <polacek@redhat.com>
4144
4145 PR c/69819
4146 * c-decl.c (finish_decl): Don't update the copy of the type of a
4147 different decl type.
4148
067fbd8b
JJ
41492016-02-23 Jakub Jelinek <jakub@redhat.com>
4150
4151 PR objc/69844
4152 * c-parser.c (c_parser_for_statement): Properly handle ObjC classes
4153 in id_kind reclassification.
4154
bf14eba2
JJ
41552016-02-16 Jakub Jelinek <jakub@redhat.com>
4156
4157 PR c/69835
4158 * c-typeck.c (build_binary_op): Revert 2015-09-09 change.
4159
ba539195
JN
41602016-02-16 James Norris <jnorris@codesourcery.com>
4161
4162 PR c/64748
4163 * c-parser.c (c_parser_oacc_data_clause_deviceptr): Allow parms.
4164
16595a1f
BS
41652016-02-12 Bernd Schmidt <bschmidt@redhat.com>
4166
f48dfe98
BS
4167 * c-decl.c (build_null_declspecs): Zero the entire struct.
4168
16595a1f
BS
4169 PR c/69522
4170 * c-parser.c (c_parser_braced_init): New arg outer_obstack. All
4171 callers changed. If nested_p is true, use it to call
4172 finish_implicit_inits.
4173 * c-tree.h (finish_implicit_inits): Declare.
4174 * c-typeck.c (finish_implicit_inits): New function. Move code
4175 from ...
4176 (push_init_level): ... here.
4177 (set_designator, process_init_element): Call finish_implicit_inits.
4178
66756373
JJ
41792016-02-11 Jakub Jelinek <jakub@redhat.com>
4180
4181 PR c/69768
4182 * c-typeck.c (parser_build_binary_op): Strip nops from integer_zerop
4183 arguments for -Waddress warning.
4184
1066e9b5
JJ
41852016-02-04 Jakub Jelinek <jakub@redhat.com>
4186
4187 PR c/69669
4188 * c-decl.c (finish_enum): When honoring mode attribute,
4189 make sure to use proper TYPE_MIN_VALUE and TYPE_MAX_VALUE.
4190
3a5d2ba4
JJ
41912016-01-29 Jakub Jelinek <jakub@redhat.com>
4192
4193 PR debug/69518
4194 * c-decl.c (finish_struct): Clear C_TYPE_INCOMPLETE_VARS in
4195 all type variants, not just TYPE_MAIN_VARIANT.
4196
cbdd8ae0
JJ
41972016-01-27 Jakub Jelinek <jakub@redhat.com>
4198
4199 PR debug/66869
4200 * c-decl.c (c_write_global_declarations_1): Warn with
4201 warn_unused_function if static prototype without definition
4202 is not C_DECL_USED.
4203
fa74a4bc
MP
42042016-01-27 Marek Polacek <polacek@redhat.com>
4205
4206 PR c/68062
4207 * c-typeck.c (build_binary_op) [EQ_EXPR, GE_EXPR]: Promote operand
4208 to unsigned, if needed. Add -Wsign-compare warning.
4209
13f92e8d
JJ
42102016-01-26 Jakub Jelinek <jakub@redhat.com>
4211
4212 PR tree-optimization/69483
4213 * c-parser.c (c_parser_translation_unit): Use FOR_EACH_VEC_ELT.
4214
cd8e73dc 42152016-01-20 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
d25c7690
PK
4216
4217 PR c/24293
4218 * c-tree.h (incomplete_record_decls): Declare.
4219 * c-parser.c (incomplete_record_decls): Define.
4220 (c_parser_translation_unit): Iterate through incomplete_record_decls and
4221 report error if any decl has zero size.
4222 * c-decl.c (finish_decl): Append static decl with incomplete struct/union
4223 or enum type to incomplete_record_decls.
4224
e6d6ec9e
TV
42252016-01-14 Tom de Vries <tom@codesourcery.com>
4226
4227 PR tree-optimization/68773
4228 * c-parser.c (c_parser_oacc_declare, c_parser_omp_declare_target): Don't
4229 set force_output.
4230
00083992
MP
42312016-01-14 Marek Polacek <polacek@redhat.com>
4232
4233 PR c/69262
4234 * c-decl.c (grokdeclarator): Provide more information for invalid
4235 array declarations.
4236
7443cf13
DM
42372016-01-06 David Malcolm <dmalcolm@redhat.com>
4238
4239 * c-parser.c (c_parser_unary_expression): For dereferences, build
4240 a combined location before calling build_indirect_ref, so that
4241 error reports cover the full range, manually updating the c_expr
4242 src_range.
4243
6b131d5b
MP
42442016-01-06 Marek Polacek <polacek@redhat.com>
4245
4246 PR sanitizer/69099
4247 * c-convert.c (convert) [INTEGER_TYPE]: Drop ARG. Don't pass ARG to
4248 ubsan_instrument_float_cast. Fold EXPR. Use NULL_TREE instead of
4249 NULL.
4250
818ab71a
JJ
42512016-01-04 Jakub Jelinek <jakub@redhat.com>
4252
4253 Update copyright years.
4254
2fe0a208
MP
42552016-01-04 Marek Polacek <polacek@redhat.com>
4256
4257 PR c/68908
4258 * c-typeck.c (build_atomic_assign): Improve commentary. Add
4259 optimization to use __atomic_fetch_* built-in if possible.
4260
c7b48c8a
TS
42612015-12-23 Thomas Schwinge <thomas@codesourcery.com>
4262
4263 * c-parser.c (c_parser_oacc_clause_use_device): Merge function
4264 into...
4265 (c_parser_omp_clause_use_device_ptr): ... this function. Adjust
4266 all users.
4267
fda5652f
MP
42682015-12-22 Marek Polacek <polacek@redhat.com>
4269
4270 PR c/69002
4271 * c-typeck.c (build_component_ref): Warn when acessing elements of
4272 atomic structures or unions.
4273
745e411d
DM
42742015-12-21 David Malcolm <dmalcolm@redhat.com>
4275
4276 * c-typeck.c: Include "gcc-rich-location.h".
4277 (build_binary_op): In the two places that call binary_op_error,
4278 create a gcc_rich_location and populate it with the location of
4279 the binary op and its two operands.
4280
94c40e19
DM
42812015-12-16 David Malcolm <dmalcolm@redhat.com>
4282
4283 * c-parser.c (c_parser_statement_after_labels): When calling
4284 c_finish_return, Use the return expression's location if it has
4285 one, falling back to the location of the first token within it.
4286 * c-typeck.c (c_finish_return): When issuing warnings about
4287 the incorrect presence/absence of a return value, issue a note
4288 showing the declaration of the function.
4289
de67c4c3
DM
42902015-12-16 David Malcolm <dmalcolm@redhat.com>
4291
4292 * c-parser.c (struct c_parser): Expand array "tokens_buf" from 2
4293 to 4.
4294 (c_parser_peek_nth_token): New function.
4295 (c_parser_peek_conflict_marker): New function.
4296 (c_parser_error): Detect conflict markers and report them as such.
4297
a10704e1
DM
42982015-12-16 David Malcolm <dmalcolm@redhat.com>
4299
4300 * c-parser.c (c_parser_postfix_expression): Use EXPR_LOC_OR_LOC
4301 to preserve range information for the primary expression
4302 in the call to c_parser_postfix_expression_after_primary.
4303
8062bca6
DM
43042015-12-16 David Malcolm <dmalcolm@redhat.com>
4305
4306 * c-parser.c (c_parser_static_assert_declaration_no_semi): Use the
4307 expression location, falling back on the first token location,
4308 rather than always using the latter.
4309
d06f8b75
MP
43102015-12-16 Marek Polacek <polacek@redhat.com>
4311
4312 PR c/64637
4313 * c-typeck.c (c_process_expr_stmt): Use location of the expression if
4314 available.
4315
2994fb91
MP
43162015-12-15 Marek Polacek <polacek@redhat.com>
4317
4318 PR c/68907
4319 * c-typeck.c (build_atomic_assign): Set TREE_NO_WARNING on an
4320 artificial decl.
4321
a1b93f8d
DM
43222015-12-08 David Malcolm <dmalcolm@redhat.com>
4323
4324 * c-parser.c (c_parser_alignof_expression): Capture location of
4325 closing parenthesis (if any), or of end of unary expression, and
4326 use it to build a src_range for the expression.
4327
46c6e1e2
DM
43282015-12-08 David Malcolm <dmalcolm@redhat.com>
4329
4330 PR c/68757
4331 * c-parser.c (c_parser_get_builtin_args): Add
4332 "out_close_paren_loc" param, and write back to it.
4333 (c_parser_postfix_expression): Capture the closing
4334 parenthesis location for RID_CHOOSE_EXPR,
4335 RID_BUILTIN_CALL_WITH_STATIC_CHAIN, RID_BUILTIN_COMPLEX,
4336 RID_BUILTIN_SHUFFLE and use it to set the source range
4337 for such expressions; within RID_BUILTIN_COMPLEX set
4338 the underlying location.
4339
66189108
MP
43402015-12-07 Marek Polacek <polacek@redhat.com>
4341
4342 PR c/68668
4343 * c-decl.c (grokdeclarator): If ORIG_QUAL_INDIRECT is indirect, use
4344 TREE_TYPE of ORIG_QUAL_TYPE, otherwise decrement ORIG_QUAL_INDIRECT.
4345
f187980b
EB
43462015-12-04 Eric Botcazou <ebotcazou@adacore.com>
4347
4348 * c-tree.h (c_build_va_arg): Adjust prototype.
4349 * c-parser.c (c_parser_postfix_expression): Adjust call to above.
4350 * c-typeck.c (c_build_va_arg): Rename LOC parameter to LOC2, add LOC1
4351 parameter, adjust throughout and issue an error if EXPR is a component
4352 with reverse storage order.
4353
4250754e
JM
43542015-12-02 Jason Merrill <jason@redhat.com>
4355
4356 * c-fold.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
4357 (c_fully_fold_internal, decl_constant_value_for_optimization):
4358 Move from c-common.c.
4359 * c-tree.h: Declare decl_constant_value_for_optimization.
4360 * Make-lang.in (C_AND_OBJC_OBJS): Add c-fold.o.
4361
e9e32ee6
JM
43622015-12-02 Joseph Myers <joseph@codesourcery.com>
4363
4364 PR c/68162
4365 * c-decl.c (grokdeclarator): Set first_non_attr_kind before
4366 following link from declarator to next declarator. Track original
4367 qualified type and pass it to c_build_qualified_type.
4368 * c-typeck.c (c_build_qualified_type): Add arguments
4369 orig_qual_type and orig_qual_indirect.
4370
ff7a55bf
TS
43712015-12-02 Thomas Schwinge <thomas@codesourcery.com>
4372
4373 * c-parser.c (c_parser_omp_clause_name)
4374 (c_parser_oacc_all_clauses): Alphabetical sorting.
4375
657e4e47
JJ
43762015-12-02 Jakub Jelinek <jakub@redhat.com>
4377
4378 PR c/68533
4379 * c-decl.c (get_parm_info): Use b->locus instead of input_location
4380 for diagnostics.
4381
37d5ad46
JB
43822015-12-01 Julian Brown <julian@codesourcery.com>
4383 Cesar Philippidis <cesar@codesourcery.com>
4384 James Norris <James_Norris@mentor.com>
4385
4386 * c-parser.c (c_parser_omp_clause_name): Add use_device support.
4387 (c_parser_oacc_clause_use_device): New function.
4388 (c_parser_oacc_all_clauses): Add use_device support.
4389 (OACC_HOST_DATA_CLAUSE_MASK): New macro.
4390 (c_parser_oacc_host_data): New function.
4391 (c_parser_omp_construct): Add host_data support.
4392 * c-tree.h (c_finish_oacc_host_data): Add prototype.
4393 * c-typeck.c (c_finish_oacc_host_data): New function.
4394 (c_finish_omp_clauses): Add use_device support.
4395
a4850ce9
JH
43962015-11-29 Jan Hubicka <hubicka@ucw.cz>
4397
4398 PR c/67106
4399 * c-decl.c: Set TYPE_PACKED in variants.
4400
b58d3df2
ML
44012015-11-27 Martin Liska <mliska@suse.cz>
4402
4403 PR c++/68312
4404 * c-array-notation.c (fix_builtin_array_notation_fn):
4405 Use release_vec_vec instead of vec::release.
4406 (build_array_notation_expr): Likewise.
4407 (fix_conditional_array_notations_1): Likewise.
4408 (fix_array_notation_expr): Likewise.
4409 (fix_array_notation_call_expr): Likewise.
4410
aec17bfe
JJ
44112015-11-27 Jakub Jelinek <jakub@redhat.com>
4412
4413 PR c/63326
4414 * c-parser.c (c_parser_compound_statement_nostart): If
4415 last_label is true, use pragma_stmt instead of pragma_compound
4416 as second c_parser_pragma argument.
4417 (c_parser_omp_ordered, c_parser_omp_target_update,
4418 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Pass
4419 false as second argument to c_parser_skip_to_pragma_eol after
4420 diagnosing standalone directives used in pragma_stmt context.
4421
688c4de0
IV
44222015-11-24 Ilya Verbin <ilya.verbin@intel.com>
4423
4424 * c-parser.c (c_parser_oacc_declare): Replace "ifdef ENABLE_OFFLOADING"
4425 with "if (ENABLE_OFFLOADING)".
4426
cbd03aee
DM
44272015-11-23 David Malcolm <dmalcolm@redhat.com>
4428
4429 PR objc/68438
4430 * c-parser.c (c_parser_postfix_expression): Set up source ranges
4431 for various Objective-C constructs: Class.name syntax,
4432 @selector(), @protocol(), @encode(), and [] message syntax.
4433
a87a86e1
DM
44342015-11-20 David Malcolm <dmalcolm@redhat.com>
4435
4436 PR 62314
4437 * c-typeck.c (should_suggest_deref_p): New function.
4438 (build_component_ref): Special-case POINTER_TYPE when
4439 generating a "not a structure of union" error message, and
4440 suggest a "->" rather than a ".", providing a fix-it hint.
4441
8ece8dfb
DM
44422015-11-19 David Malcolm <dmalcolm@redhat.com>
4443
4444 * c-typeck.c (lookup_field_fuzzy): Move determination of closest
4445 candidate into a new function, find_closest_identifier.
4446
433068cc
MP
44472015-11-19 Marek Polacek <polacek@redhat.com>
4448
4449 PR c/68412
4450 * c-typeck.c (parser_build_binary_op): Properly handle
4451 C_MAYBE_CONST_EXPR before calling warn_tautological_cmp.
4452
bef08b71
DM
44532015-11-17 David Malcolm <dmalcolm@redhat.com>
4454
4455 * c-parser.c (set_c_expr_source_range): Bulletproof both
4456 overloaded implementations against NULL expr->value.
4457 (c_parser_braced_init): Set src_range for "ret" to a sane pair of
4458 values.
4459 (c_parser_unary_expression): Likewise when handling addresses of
4460 labels.
4461 (c_parser_postfix_expression): Likewise for statement expressions,
4462 for __FUNCTION__, __PRETTY_FUNCTION_ and __func__ keywords, for
4463 __builtin_va_arg, and for __builtin_offset_of.
4464 (c_parser_postfix_expression_after_paren_type): Initialize expr's
4465 src_range using the range of the braced initializer.
4466 (c_parser_transaction_expression): Set src_range for "ret" to a
4467 sane pair of values.
4468
fff77217
KY
44692015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
4470
4471 * c-parser.c (c_finish_omp_declare_simd): Look for
4472 "simd" attribute as well. Update error message.
4473
1d899da2
TS
44742015-11-14 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
4475
4476 * c-parser.c (c_parser_omp_declare_target): Adjust.
4477
e4606348
JJ
44782015-11-14 Jakub Jelinek <jakub@redhat.com>
4479
4480 * c-typeck.c (c_finish_omp_clauses): Don't mark
4481 GOMP_MAP_FIRSTPRIVATE_POINTER decls addressable.
4482
3e636daf
MP
44832015-11-14 Marek Polacek <polacek@redhat.com>
4484
4485 * c-decl.c: Use RECORD_OR_UNION_TYPE_P throughout.
4486 * c-typeck.c: Likewise.
4487
ebedc9a3
DM
44882015-11-13 David Malcolm <dmalcolm@redhat.com>
4489
4490 * c-decl.c (warn_defaults_to): Pass line_table to
4491 rich_location ctor.
4492 * c-errors.c (pedwarn_c99): Likewise.
4493 (pedwarn_c90): Likewise.
4494 * c-parser.c (set_c_expr_source_range): New functions.
4495 (c_token::get_range): New method.
4496 (c_token::get_finish): New method.
4497 (c_parser_expr_no_commas): Call set_c_expr_source_range on the ret
4498 based on the range from the start of the LHS to the end of the
4499 RHS.
4500 (c_parser_conditional_expression): Likewise, based on the range
4501 from the start of the cond.value to the end of exp2.value.
4502 (c_parser_binary_expression): Call set_c_expr_source_range on
4503 the stack values for TRUTH_ANDIF_EXPR and TRUTH_ORIF_EXPR.
4504 (c_parser_cast_expression): Call set_c_expr_source_range on ret
4505 based on the cast_loc through to the end of the expr.
4506 (c_parser_unary_expression): Likewise, based on the
4507 op_loc through to the end of op.
4508 (c_parser_sizeof_expression) Likewise, based on the start of the
4509 sizeof token through to either the closing paren or the end of
4510 expr.
4511 (c_parser_postfix_expression): Likewise, using the token range,
4512 or from the open paren through to the close paren for
4513 parenthesized expressions.
4514 (c_parser_postfix_expression_after_primary): Likewise, for
4515 various kinds of expression.
4516 * c-tree.h (struct c_expr): Add field "src_range".
4517 (c_expr::get_start): New method.
4518 (c_expr::get_finish): New method.
4519 (set_c_expr_source_range): New decls.
4520 * c-typeck.c (parser_build_unary_op): Call set_c_expr_source_range
4521 on ret for prefix unary ops.
4522 (parser_build_binary_op): Likewise, running from the start of
4523 arg1.value through to the end of arg2.value.
4524
ec8b536f
MP
45252015-11-13 Marek Polacek <polacek@redhat.com>
4526
4527 PR c/68320
4528 * c-parser.c (c_parser_for_statement): Treat unknown tokens as IDs.
4529
277fe616
DM
45302015-11-13 David Malcolm <dmalcolm@redhat.com>
4531
4532 * c-typeck.c: Include spellcheck.h.
4533 (lookup_field_fuzzy_find_candidates): New function.
4534 (lookup_field_fuzzy): New function.
4535 (build_component_ref): If the field was not found, try using
4536 lookup_field_fuzzy and potentially offer a suggestion.
4537
6e232ba4
JN
45382015-11-12 James Norris <jnorris@codesourcery.com>
4539 Joseph Myers <joseph@codesourcery.com>
4540
4541 * c-parser.c (c_parser_pragma): Handle PRAGMA_OACC_DECLARE.
4542 (c_parser_omp_clause_name): Handle 'device_resident' clause.
4543 (c_parser_oacc_data_clause): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
4544 and PRAGMA_OMP_CLAUSE_LINK.
4545 (c_parser_oacc_all_clauses): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
4546 and PRAGMA_OACC_CLAUSE_LINK.
4547 (OACC_DECLARE_CLAUSE_MASK): New definition.
4548 (c_parser_oacc_declare): New function.
4549
9be4f715
MP
45502015-11-12 Marek Polacek <polacek@redhat.com>
4551
4552 PR c/67784
4553 * c-parser.c (c_parser_for_statement): Reclassify the token in
4554 a correct scope.
4555
e78bede6
MP
45562015-11-11 Marek Polacek <polacek@redhat.com>
4557
4558 PR c/68107
4559 PR c++/68266
4560 * c-decl.c (grokdeclarator): Call valid_array_size_p. Remove code
4561 checking the size of an array.
4562
69f293c9
AM
45632015-11-11 Andrew MacLeod <amacleod@redhat.com>
4564
4565 * c-array-notation.c: Remove unused header files.
4566 * c-aux-info.c: Likewise.
4567 * c-convert.c: Likewise.
4568 * c-decl.c: Likewise.
4569 * c-errors.c: Likewise.
4570 * c-lang.c: Likewise.
4571 * c-objc-common.c: Likewise.
4572 * c-parser.c: Likewise.
4573 * c-typeck.c: Likewise.
4574 * gccspec.c: Likewise.
4575
3a40d81d
NS
45762015-11-09 Thomas Schwinge <thomas@codesourcery.com>
4577 Cesar Philippidis <cesar@codesourcery.com>
4578 James Norris <jnorris@codesourcery.com>
4579 Julian Brown <julian@codesourcery.com>
4580 Nathan Sidwell <nathan@codesourcery.com>
4581
3a40d81d
NS
4582 * c-parser.c (c_parser_declaration_or_fndef): Add OpenACC
4583 routine arg.
4584 (c_parser_declaration_or_fndef): Call c_finish_oacc_routine.
4585 (c_parser_pragma): Parse 'acc routine'.
4586 (OACC_ROUTINE_CLAUSE_MARK): Define.
4587 (c_parser_oacc_routine, (c_finish_oacc_routine): New.
4588
fc402eec
AA
45892015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
4590
4591 PR debug/67192
4592 * c-typeck.c (c_finish_loop): For unconditional loops, set the
4593 location of the backward-goto to the start of the loop body.
4594
f6b0b3db
AA
45952015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
4596
4597 PR debug/67192
4598 * c-parser.c (c_parser_while_statement): Finish the loop before
4599 parsing ahead for misleading indentation.
4600 (c_parser_for_statement): Likewise.
4601
ee45a32d
EB
46022015-11-08 Eric Botcazou <ebotcazou@adacore.com>
4603
4604 * c-decl.c (finish_struct): If the structure has reverse storage
4605 order, rewrite the type of array fields with scalar component. Call
4606 maybe_apply_pragma_scalar_storage_order on entry.
4607 * c-typeck.c (build_unary_op) <ADDR_EXPR>: Remove left-overs. Issue
4608 errors on bit-fields and reverse SSO here and not...
4609 (c_mark_addressable): ...here.
4610 (output_init_element): Adjust call to initializer_constant_valid_p.
4611 (c_build_qualified_type): Propagate TYPE_REVERSE_STORAGE_ORDER.
4612
8a645150
DM
46132015-11-06 David Malcolm <dmalcolm@redhat.com>
4614
4615 * c-decl.c (warn_defaults_to): Update for change in signature
4616 of diagnostic_set_info.
4617 * c-errors.c (pedwarn_c99): Likewise.
4618 (pedwarn_c90): Likewise.
4619 * c-objc-common.c (c_tree_printer): Update for new "caret_p" param
4620 for textinfo::set_location.
4621
7a5e4956
CP
46222015-11-05 Cesar Philippidis <cesar@codesourcery.com>
4623 Thomas Schwinge <thomas@codesourcery.com>
4624 James Norris <jnorris@codesourcery.com>
4625
4626 * c-parser.c (c_parser_omp_clause_name): Add support for
4627 PRAGMA_OACC_CLAUSE_INDEPENDENT and PRAGMA_OACC_CLAUSE_TILE.
4628 (c_parser_omp_clause_default): Add is_oacc argument. Handle
4629 default(none) in OpenACC.
4630 (c_parser_oacc_shape_clause): Allow pointer variables as gang static
4631 arguments.
4632 (c_parser_oacc_clause_tile): New function.
4633 (c_parser_oacc_all_clauses): Add support for OMP_CLAUSE_DEFAULT,
4634 OMP_CLAUSE_INDEPENDENT and OMP_CLAUSE_TILE.
4635 (OACC_LOOP_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_{PRIVATE,INDEPENDENT,
4636 TILE}.
4637 (OACC_KERNELS_MASK): Add PRAGMA_OACC_CLAUSE_DEFAULT.
4638 (OACC_PARALLEL_MASK): Add PRAGMA_OACC_CLAUSE_{DEFAULT,PRIVATE,
4639 FIRSTPRIVATE}.
4640 (c_parser_omp_all_clauses): Update call to c_parser_omp_clause_default.
4641 (c_parser_oacc_update): Update the error message for missing clauses.
4642 * c-typeck.c (c_finish_omp_clauses): Add support for OMP_CLAUSE_TILE
4643 and OMP_CLAUSE_INDEPENDENT.
4644
bfcfbfa0
MP
46452015-11-05 Marek Polacek <polacek@redhat.com>
4646
4647 PR c/68090
4648 * c-parser.c (c_parser_postfix_expression_after_paren_type): Don't
4649 deal with pre-evaluation on invalid types.
4650
e01d41e5
JJ
46512015-11-05 Jakub Jelinek <jakub@redhat.com>
4652 Ilya Verbin <ilya.verbin@intel.com>
4653
4654 * c-parser.c: Include context.h and gimple-expr.h.
4655 (c_parser_omp_clause_schedule): Parse schedule modifiers, diagnose
4656 monotonic together with nonmonotonic.
4657 (c_parser_omp_for_loop): Call c_omp_check_loop_iv. Call add_stmt here.
4658 (OMP_DISTRIBUTE_CLAUSE_MASK): Add lastprivate clause.
4659 (c_parser_omp_target_data, c_parser_omp_target_enter_data,
4660 c_parser_omp_target_exit_data): Allow GOMP_MAP_ALWAYS_POINTER.
4661 (c_parser_omp_target): Likewise. Evaluate num_teams and thread_limit
4662 expressions on combined target teams before the target.
4663 (c_parser_omp_declare_target): If decl has "omp declare target" or
4664 "omp declare target link" attribute, and cgraph or varpool node already
4665 exists, then set corresponding flags. Call c_finish_omp_clauses
4666 in the parenthesized extended-list syntax case.
4667 * c-decl.c (c_decl_attributes): Don't diagnose block scope vars inside
4668 declare target.
4669 * c-typeck.c (handle_omp_array_sections_1): Allow non-zero low-bound
4670 on OMP_CLAUSE_REDUCTION array sections.
4671 (handle_omp_array_sections): Encode low-bound into the MEM_REF, either
4672 into the constant offset, or for variable low-bound using
4673 POINTER_PLUS_EXPR. For structure element based array sections use
4674 GOMP_MAP_ALWAYS_POINTER instead of GOMP_MAP_FIRSTPRIVATE_POINTER.
4675 (c_finish_omp_clauses): Drop generic_field_head, structure
4676 elements are now always mapped even as array section bases,
4677 diagnose same var in data sharing and mapping clauses. Diagnose if
4678 linear step on declare simd is neither a constant nor a uniform
4679 parameter. Look through POINTER_PLUS_EXPR for array section
4680 reductions. Diagnose the same var or function appearing multiple
4681 times on the same directive. Fix up wording for the to clause if t
4682 is neither a FUNCTION_DECL nor a VAR_DECL. Diagnose nonmonotonic
4683 modifier on kinds other than dynamic or guided or nonmonotonic
4684 modifier together with ordered clause.
4685
4bf9e5a8
TS
46862015-11-03 Thomas Schwinge <thomas@codesourcery.com>
4687 Chung-Lin Tang <cltang@codesourcery.com>
4688
4689 * c-parser.c (c_parser_omp_construct): Handle PRAGMA_OACC_ATOMIC.
4690
2adfab87
AM
46912015-10-29 Andrew MacLeod <amacleod@redhat.com>
4692
4693 * c-array-notation.c: Reorder #include's and remove duplicates.
4694 * c-aux-info.c: Likewise.
4695 * c-convert.c: Likewise.
4696 * c-decl.c: Likewise.
4697 * c-errors.c: Likewise.
4698 * c-lang.c: Likewise.
4699 * c-objc-common.c: Likewise.
4700 * c-parser.c: Likewise.
4701 * c-typeck.c: Likewise.
4702
e922069e
JW
47032015-10-26 Jim Wilson <jim.wilson@linaro.org>
4704
4705 PR debug/66068
4706 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
4707 after calling build_qualified_type.
4708
765dd391
CP
47092015-10-27 Cesar Philippidis <cesar@codesourcery.com>
4710 Thomas Schwinge <thomas@codesourcery.com>
4711 James Norris <jnorris@codesourcery.com>
4712 Joseph Myers <joseph@codesourcery.com>
4713 Julian Brown <julian@codesourcery.com>
4714 Bernd Schmidt <bschmidt@redhat.com>
4715
4716 * c-parser.c (c_parser_oacc_shape_clause): New.
4717 (c_parser_oacc_simple_clause): New.
4718 (c_parser_oacc_all_clauses): Add auto, gang, seq, vector, worker.
4719 (OACC_LOOP_CLAUSE_MASK): Add gang, worker, vector, auto, seq.
4720
88bae6f4
TS
47212015-10-27 Thomas Schwinge <thomas@codesourcery.com>
4722 James Norris <jnorris@codesourcery.com>
4723 Cesar Philippidis <cesar@codesourcery.com>
4724
4725 PR c/64765
4726 PR c/64880
4727 * c-parser.c (c_parser_oacc_loop): Add mask, cclauses formal
4728 parameters, and handle these. Adjust all users.
4729 (c_parser_oacc_kernels, c_parser_oacc_parallel): Merge functions
4730 into...
4731 (c_parser_oacc_kernels_parallel): ... this new function. Adjust
4732 all users.
4733 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels): Don't
4734 declare functions.
4735 (c_finish_omp_construct): Declare function.
4736 * c-typeck.c (c_finish_oacc_parallel, c_finish_oacc_kernels):
4737 Merge functions into...
4738 (c_finish_omp_construct): ... this new function.
4739
a8fc2579
RB
47402015-10-22 Richard Biener <rguenther@suse.de>
4741
4742 * c-typeck.c (c_finish_omp_clauses): Properly convert operands
4743 before folding a MINUS_EXPR.
4744
e9122ef6
MP
47452015-10-21 Marek Polacek <polacek@redhat.com>
4746
4747 PR c/68024
4748 * c-decl.c (start_function): Warn about vararg functions without
4749 a prototype.
4750
9f47c7e5
IE
47512015-10-21 Ilya Enkovich <enkovich.gnu@gmail.com>
4752
4753 * c-typeck.c (build_conditional_expr): Use boolean vector
4754 type for vector comparison.
4755 (build_vec_cmp): New.
4756 (build_binary_op): Use build_vec_cmp for comparison.
4757
fa60eeb9
MP
47582015-10-20 Marek Polacek <polacek@redhat.com>
4759
4760 * c-parser.c (is_cilkplus_vector_p): Don't define here.
4761
2c7020eb
MP
47622015-10-20 Marek Polacek <polacek@redhat.com>
4763
4764 PR c/67964
4765 * c-parser.c (c_parser_attributes): Break out of the loop if the
4766 token after an attribute isn't a comma.
4767
d9a6bd32
JJ
47682015-10-13 Jakub Jelinek <jakub@redhat.com>
4769 Aldy Hernandez <aldyh@redhat.com>
4770
4771 * c-parser.c (c_parser_pragma): Handle PRAGMA_OMP_ORDERED here.
4772 (c_parser_omp_clause_name): Handle OpenMP 4.5 clauses.
4773 (c_parser_omp_variable_list): Handle structure elements for
4774 map, to and from clauses. Handle array sections in reduction
4775 clause. Formatting fixes.
4776 (c_parser_omp_clause_if): Add IS_OMP argument, handle parsing of
4777 if clause modifiers.
4778 (c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
4779 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
4780 c_parser_omp_clause_defaultmap, c_parser_omp_clause_use_device_ptr,
4781 c_parser_omp_clause_is_device_ptr): New functions.
4782 (c_parser_omp_clause_ordered): Parse optional parameter.
4783 (c_parser_omp_clause_reduction): Handle array reductions.
4784 (c_parser_omp_clause_schedule): Parse optional simd modifier.
4785 (c_parser_omp_clause_nogroup, c_parser_omp_clause_orderedkind): New
4786 functions.
4787 (c_parser_omp_clause_linear): Parse linear clause modifiers.
4788 (c_parser_omp_clause_depend_sink): New function.
4789 (c_parser_omp_clause_depend): Parse source/sink depend kinds.
4790 (c_parser_omp_clause_map): Parse release/delete map kinds and
4791 optional always modifier.
4792 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_if
4793 and c_finish_omp_clauses callers.
4794 (c_parser_omp_all_clauses): Likewise. Parse OpenMP 4.5 clauses.
4795 Parse "to" as OMP_CLAUSE_TO_DECLARE if on declare target directive.
4796 (c_parser_oacc_cache): Adjust c_finish_omp_clauses caller.
4797 (OMP_CRITICAL_CLAUSE_MASK): Define.
4798 (c_parser_omp_critical): Parse critical clauses.
4799 (c_parser_omp_for_loop): Handle doacross loops, adjust
4800 c_finish_omp_for and c_finish_omp_clauses callers.
4801 (OMP_SIMD_CLAUSE_MASK): Add simdlen clause.
4802 (c_parser_omp_simd): Allow ordered clause if it has no parameter.
4803 (OMP_FOR_CLAUSE_MASK): Add linear clause.
4804 (c_parser_omp_for): Disallow ordered clause when combined with
4805 distribute. Disallow linear clause when combined with distribute
4806 and not combined with simd.
4807 (OMP_ORDERED_CLAUSE_MASK, OMP_ORDERED_DEPEND_CLAUSE_MASK): Define.
4808 (c_parser_omp_ordered): Add CONTEXT argument, remove LOC argument,
4809 parse clauses and if depend clause is found, don't parse a body.
4810 (c_parser_omp_parallel): Disallow copyin clause on target parallel.
4811 Allow target parallel without for after it.
4812 (OMP_TASK_CLAUSE_MASK): Add priority clause.
4813 (OMP_TARGET_DATA_CLAUSE_MASK): Add use_device_ptr clause.
4814 (c_parser_omp_target_data): Diagnose no map clauses or clauses with
4815 invalid kinds.
4816 (OMP_TARGET_UPDATE_CLAUSE_MASK): Add depend and nowait clauses.
4817 (OMP_TARGET_ENTER_DATA_CLAUSE_MASK,
4818 OMP_TARGET_EXIT_DATA_CLAUSE_MASK): Define.
4819 (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): New
4820 functions.
4821 (OMP_TARGET_CLAUSE_MASK): Add depend, nowait, private, firstprivate,
4822 defaultmap and is_device_ptr clauses.
4823 (c_parser_omp_target): Parse target parallel and target simd. Set
4824 OMP_TARGET_COMBINED on combined constructs. Parse target enter data
4825 and target exit data. Diagnose invalid map kinds.
4826 (OMP_DECLARE_TARGET_CLAUSE_MASK): Define.
4827 (c_parser_omp_declare_target): Parse OpenMP 4.5 forms of this
4828 construct.
4829 (c_parser_omp_declare_reduction): Use STRIP_NOPS when checking for
4830 &omp_priv.
4831 (OMP_TASKLOOP_CLAUSE_MASK): Define.
4832 (c_parser_omp_taskloop): New function.
4833 (c_parser_omp_construct): Don't handle PRAGMA_OMP_ORDERED here,
4834 handle PRAGMA_OMP_TASKLOOP.
4835 (c_parser_cilk_for): Adjust c_finish_omp_clauses callers.
4836 * c-tree.h (c_finish_omp_clauses): Add two new arguments.
4837 * c-typeck.c (handle_omp_array_sections_1): Fix comment typo.
4838 Add IS_OMP argument, handle structure element bases, diagnose
4839 bitfields, pass IS_OMP recursively, diagnose known zero length
4840 array sections in depend clauses, handle array sections in reduction
4841 clause, diagnose negative length even for pointers.
4842 (handle_omp_array_sections): Add IS_OMP argument, use auto_vec for
4843 types, pass IS_OMP down to handle_omp_array_sections_1, handle
4844 array sections in reduction clause, set
4845 OMP_CLAUSE_MAP_MAYBE_ZERO_LENGTH_ARRAY_SECTION if map could be zero
4846 length array section, use GOMP_MAP_FIRSTPRIVATE_POINTER for IS_OMP.
4847 (c_finish_omp_clauses): Add IS_OMP and DECLARE_SIMD arguments.
4848 Handle new OpenMP 4.5 clauses and new restrictions for the old ones.
4849
21ba0cea
MP
48502015-10-06 Marek Polacek <polacek@redhat.com>
4851
4852 * c-parser.c (c_parser_statement_after_labels): Use
4853 protected_set_expr_location.
4854 (c_parser_omp_clause_num_gangs): Likewise.
4855 (c_parser_omp_clause_num_threads): Likewise.
4856 (c_parser_omp_clause_num_workers): Likewise.
4857 (c_parser_omp_clause_vector_length): Likewise.
4858 (c_parser_omp_clause_num_teams): Likewise.
4859 (c_parser_omp_clause_thread_limit): Likewise.
4860 * c-typeck.c (build_c_cast): Likewise.
4861 (c_cast_expr): Likewise.
4862
624d31fe
RS
48632015-10-05 Richard Sandiford <richard.sandiford@arm.com>
4864
4865 * c-typeck.c (c_tree_equal): Use real_equal instead of
4866 REAL_VALUES_EQUAL.
4867
b8fd7909
JM
48682015-10-04 Jason Merrill <jason@redhat.com>
4869
4870 * c-parser.c (c_lex_one_token): Handle @synchronized.
4871 * c-decl.c (match_builtin_function_types): A declaration of a built-in
4872 can change whether the function is transaction_safe.
4873
1c7485af
MP
48742015-10-02 Marek Polacek <polacek@redhat.com>
4875
4876 PR c/67730
4877 * c-typeck.c (convert_for_assignment): Use the expansion point
4878 location throughout.
4879
3e3b8d63
MP
48802015-10-02 Marek Polacek <polacek@redhat.com>
4881
4882 PR c/64249
4883 * c-parser.c (c_parser_statement_after_labels): Add CHAIN parameter
4884 and pass it down to c_parser_if_statement.
4885 (c_parser_else_body): Add CHAIN parameter and pass it down to
4886 c_parser_statement_after_labels.
4887 (c_parser_if_statement): Add CHAIN parameter. Add code to warn about
4888 duplicated if-else-if conditions.
4889
aabef2de
MP
48902015-10-01 Marek Polacek <polacek@redhat.com>
4891
4892 * c-typeck.c (convert_for_assignment): Improve commentary.
4893
de8ddd5f
MP
48942015-09-30 Marek Polacek <polacek@redhat.com>
4895
4896 PR c/67730
4897 * c-typeck.c (c_finish_return): Use the expansion point location for
4898 certain "return with value" warnings.
4899
c4914de6
MLI
49002015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
4901
4902 * c-parser.c (pragma_lex): Add loc argument.
4903
0e36f5c7
MP
49042015-09-15 Marek Polacek <polacek@redhat.com>
4905
4906 PR c/67580
4907 * c-decl.c (tag_exists_p): New function.
4908 * c-parser.c (c_parser_declaration_or_fndef): Give a hint when
4909 struct/union/enum keywords are missing.
4910 * c-tree.h (tag_exists_p): Declare.
4911
2f3bb934
MP
49122015-09-15 Marek Polacek <polacek@redhat.com>
4913
4914 * c-decl.c (lookup_label): Return NULL_TREE instead of 0.
4915 (lookup_tag): Change the type of THISLEVEL_ONLY to bool.
4916 Return NULL_TREE instead of 0.
4917 (lookup_name): Return NULL_TREE instead of 0.
4918 (lookup_name_in_scope): Likewise.
4919 (shadow_tag_warned): Use true instead of 1 and NULL_TREE instead of 0.
4920 (parser_xref_tag): Use false instead of 0.
4921 (start_struct): Use true instead of 1.
4922 (start_enum): Use true instead of 1 and NULL_TREE instead of 0.
4923
aa256c4a
MP
49242015-09-14 Marek Polacek <polacek@redhat.com>
4925
4926 * c-typeck.c (set_nonincremental_init_from_string): Use
4927 HOST_WIDE_INT_M1U when shifting a negative value.
4928
dbb68221
MW
49292015-09-09 Mark Wielaard <mjw@redhat.com>
4930
4931 * c-typeck.c (build_binary_op): Check and warn when nonnull arg
4932 parm against NULL.
4933
a8a098ac
JJ
49342015-09-10 Jakub Jelinek <jakub@redhat.com>
4935
4936 PR c/67502
4937 * c-parser.c (c_parser_omp_for_loop): Emit DECL_EXPR stmts
4938 into OMP_FOR_PRE_BODY rather than before the loop.
4939
f4b189d5
JJ
49402015-09-09 Jakub Jelinek <jakub@redhat.com>
4941
0bb99c11
JJ
4942 PR c/67501
4943 * c-parser.c (c_parser_oacc_all_clauses,
4944 c_parser_omp_all_clauses): Remove invalid clause from
4945 list of clauses even if parser->error is set.
4946
fce5e5e3
JJ
4947 PR c/67500
4948 * c-parser.c (c_parser_omp_clause_aligned,
4949 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen): Fix up
4950 test for errors.
4951 * c-decl.c (temp_pop_parm_decls): Allow b->decl equal to
4952 error_mark_node.
4953
f4b189d5
JJ
4954 PR c/67495
4955 * c-parser.c (c_parser_omp_atomic): Use c_parser_cast_expression
4956 instead of c_parser_unary_expression. If the result is !lvalue_p,
4957 wrap the result of c_fully_fold into NON_LVALUE_EXPR.
4958
b2aaf235
MP
49592015-09-04 Marek Polacek <polacek@redhat.com>
4960
4961 PR sanitizer/67279
4962 * c-typeck.c (build_binary_op): Don't instrument static initializers.
4963
1807ffc1
MS
49642015-09-03 Martin Sebor <msebor@redhat.com>
4965
4966 PR c/66516
8b652e65
JJ
4967 * c-typeck.c (convert_arguments, parser_build_unary_op,
4968 build_conditional_expr, c_cast_expr, convert_for_assignment,
4969 build_binary_op, _objc_common_truthvalue_conversion): Call
1807ffc1
MS
4970 reject_gcc_builtin.
4971 (c_decl_implicit): Define.
4972
d04ff417
MP
49732015-09-02 Marek Polacek <polacek@redhat.com>
4974
4975 PR c/67432
4976 * c-parser.c (c_parser_enum_specifier): Give a better error for
4977 an empty enum.
4978
a79683d5
TS
49792015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
4980
4981 * c-aux-info.c, c-parser.c, c-tree.h: Remove useless typedefs.
4982
191a6b94
MP
49832015-08-12 Marek Polacek <polacek@redhat.com>
4984
4985 * c-decl.c (grokdeclarator): Call error_at instead of error and pass
4986 LOC to it.
4987
420a9d9b
MP
49882015-08-03 Marek Polacek <polacek@redhat.com>
4989
4990 PR c/67088
4991 * c-decl.c (check_bitfield_type_and_width): Add location parameter.
4992 Use it.
4993 (grokdeclarator): Pass LOC down to check_bitfield_type_and_width.
4994
992118a1
PP
49952015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
4996
4997 * c-parser.c (c_parser_if_body): Take token_indent_info
4998 argument. Call warn_for_misleading_indentation even when the
4999 body is a semicolon. Extract token_indent_infos corresponding
5000 to the guard, body and next tokens. Adjust call to
5001 warn_for_misleading_indentation accordingly.
5002 (c_parser_else_body): Likewise.
5003 (c_parser_if_statement): Likewise.
5004 (c_parser_while_statement): Likewise.
5005 (c_parser_for_statement): Likewise.
5006
46308474
LFSM
50072015-07-28 Luis Felipe Strano Moraes <luis.strano@gmail.com>
5008 Manuel López-Ibáñez <manu@gcc.gnu.org>
5009
5010 * c-decl.c (get_parm_info): Remove static var. Update warning
5011 message.
5012
05b28fd6
MP
50132015-07-27 Marek Polacek <polacek@redhat.com>
5014
5015 PR c++/66555
5016 PR c/54979
5017 * c-typeck.c (parser_build_binary_op): Call warn_tautological_cmp.
5018
451b5e48
MP
50192015-07-20 Marek Polacek <polacek@redhat.com>
5020
5021 PR c++/55095
5022 * c-typeck.c (digest_init): Pass OPT_Wpedantic to pedwarn_init.
5023 (build_binary_op): Warn about left shift overflows.
5024
1916bcb5
AM
50252015-07-09 Andrew MacLeod <amacleod@redhat.com>
5026
5027 * c-array-notation.c: Adjust includes for flags.h changes.
5028 * c-objc-common.c: Likewise.
5029
c7131fb2
AM
50302015-07-07 Andrew MacLeod <amacleod@redhat.com>
5031
5032 * c-array-notation.c: Adjust includes.
5033 * c-aux-info.c: Likewise.
5034 * c-convert.c: Likewise.
5035 * c-decl.c: Likewise.
5036 * c-errors.c: Likewise.
5037 * c-lang.c: Likewise.
5038 * c-objc-common.c: Likewise.
5039 * c-parser.c: Likewise.
5040 * c-typeck.c: Likewise.
5041
da2e71c9
MLI
50422015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
5043
5044 PR fortran/66605
5045 * c-decl.c (finish_function): Call do_warn_unused_parameter.
5046
b155cfd9
MP
50472015-06-29 Marek Polacek <polacek@redhat.com>
5048
5049 PR c/66322
5050 * c-typeck.c (struct c_switch): Add BOOL_COND_P and OUTSIDE_RANGE_P.
5051 (c_start_case): Set BOOL_COND_P and OUTSIDE_RANGE_P. Don't warn
5052 about -Wswitch-bool here.
5053 (do_case): Update c_add_case_label call.
5054 (c_finish_case): Update c_do_switch_warnings call.
5055
31521951
MP
50562015-06-27 Marek Polacek <polacek@redhat.com>
5057
5058 * c-typeck.c: Use VECTOR_TYPE_P throughout.
5059
22d03525
MP
50602015-06-26 Marek Polacek <polacek@redhat.com>
5061
5062 * c-array-notation.c (fix_builtin_array_notation_fn): Use
5063 INDIRECT_REF_P.
5064 * c-typeck.c (array_to_pointer_conversion): Likewise.
5065 (build_unary_op): Likewise.
5066 (c_finish_return): Likewise.
5067
f0889939
AM
50682015-06-25 Andrew MacLeod <amacleod@redhat.com>
5069
5070 * c-decl.c: Remove ipa-ref.h and plugin-api.h from include list.
5071 * c-parser.c: Likewise.
5072
8d67ee55
RS
50732015-06-25 Richard Sandiford <richard.sandiford@arm.com>
5074
5075 * c-decl.c (detect_field_duplicates_hash): Use nofree_ptr_hash
5076 instead of pointer_hash.
5077 (detect_field_duplicates): Likewise.
5078
0ae9bd27
MP
50792015-06-25 Marek Polacek <polacek@redhat.com>
5080
5081 * c-array-notation.c: Use VAR_P throughout.
5082 * c-decl.c: Likewise.
5083 * c-objc-common.c: Likewise.
5084 * c-parser.c: Likewise.
5085 * c-typeck.c: Likewise.
5086
62f9079a
MP
50872015-06-25 Marek Polacek <polacek@redhat.com>
5088
5089 * c-decl.c: Use is_global_var throughout.
5090 * c-parser.c: Likewise.
5091 * c-typeck.c: Likewise.
5092
abb226c9
AM
50932015-06-17 Andrew MacLeod <amacleod@redhat.com>
5094
5095 * c-array-notation.c: Do not include input.h, line-map.h or is-a.h.
5096 * c-aux-info.c: Likewise.
5097 * c-convert.c: Likewise.
5098 * c-decl.c: Likewise.
5099 * c-errors.c: Likewise.
5100 * c-lang.c: Likewise.
5101 * c-objc-common.c: Likewise.
5102 * c-parser.c: Likewise.
5103 * c-typeck.c: Likewise.
5104
8cbababc
JH
51052015-06-11 Jan Hubicka <hubicka@ucw.cz>
5106
5107 PR middle-end/66325
5108 * c-decl.c (start_enum): Set TYPE_PACKED consistently among type
5109 variants.
5110
a0349665
PMR
51112015-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
5112
5113 * c-decl.c (pop_scope): Register the main translation unit
5114 through the new debug hook.
5115
13fdf2e2
AM
51162015-06-08 Andrew MacLeod <amacleod@redhat.com>
5117
5118 * c-array-notation.c : Adjust include files.
5119 * c-aux-info.c : Likewise.
5120 * c-convert.c : Likewise.
5121 * c-decl.c : Likewise.
5122 * c-errors.c : Likewise.
5123 * c-lang.c : Likewise.
5124 * c-lang.h : Likewise.
5125 * c-objc-common.c : Likewise.
5126 * c-parser.c : Likewise.
5127 * c-typeck.c : Likewise.
5128
d7438551
AH
51292015-06-05 Aldy Hernandez <aldyh@redhat.com>
5130
5131 * c-decl.c (finish_struct): Save C_TYPE_INCOMPLETE_VARS and
5132 immediately clobber it.
5133 (c_write_global_declarations_1): Remove call to
5134 check_global_declaration_1.
5135 (c_write_global_declarations_2): Remove.
5136 (c_write_final_cleanups): Rename from c_write_global_declarations.
5137 Remove call to finalize_compilation_unit.
5138 Remove calls to debugging hooks.
5139 * c-objc-common.c: Adjust comment for c_warn_unused_global_decl.
5140 * c-objc-common.h: Remove LANG_HOOKS_WRITE_GLOBALS.
5141 * c-tree.h: Remove c_write_global_declarations.
5142
ecb9f223
AM
51432015-06-04 Andrew MacLeod <amacleod@redhat.com>
5144
5145 * c-array-notation.c: Adjust includes for restructured coretypes.h.
5146 * c-aux-info.c: Likewise.
5147 * c-convert.c: Likewise.
5148 * c-decl.c: Likewise.
5149 * c-errors.c: Likewise.
5150 * c-lang.c: Likewise.
5151 * c-objc-common.c: Likewise.
5152 * c-parser.c: Likewise.
5153 * c-typeck.c: Likewise.
5154
9482b620
MP
51552015-06-04 Marek Polacek <polacek@redhat.com>
5156
5157 PR c/66341
5158 * c-typeck.c (build_c_cast): Wrap VALUE into NON_LVALUE_EXPR if
5159 it is a lvalue.
5160
bc51ace3
PK
51612015-06-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
5162
5163 * c-decl.c (warn_cxx_compat_finish_struct): New parameters code, record_loc.
5164 Warn for empty struct.
5165 (finish_struct): Pass TREE_CODE(t) and loc to warn_cxx_compat_finish_struct.
5166
ea5b45b6
AT
51672015-06-02 Andres Tiraboschi <andres.tiraboschi@tallertechnologies.com>
5168
5169 * c-decl.c (start_function): Call plugin before parsing.
5170 (finish_function): Call plugin after parsing.
5171
c2d47482
PK
51722015-06-02 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
5173
5174 PR c/49551
5175 * c-decl.c (merge_decls): Merge DECL_COMMON.
5176
a95492ab
JW
51772015-05-22 Jim Wilson <jim.wilson@linaro.org>
5178
5179 * Make-lang.in (check_gcc_pallelize): Define.
5180
fd5c817a
MP
51812015-05-22 Marek Polacek <polacek@redhat.com>
5182
5183 PR c/47043
5184 * c-parser.c (c_parser_enum_specifier): Parse and apply enumerator
5185 attributes.
5186
c7b70a3c
MP
51872015-05-21 Marek Polacek <polacek@redhat.com>
5188
5189 * c-typeck.c (inform_declaration): Use DECL_IS_BUILTIN instead of
5190 DECL_BUILT_IN.
5191
21b634ae
MP
51922015-05-20 Marek Polacek <polacek@redhat.com>
5193
5194 * c-decl.c: Use VAR_OR_FUNCTION_DECL_P throughout.
5195 * c-typeck.c: Likewise.
5196
296a8c2f
MP
51972015-05-19 Marek Polacek <polacek@redhat.com>
5198
5199 * c-typeck.c (start_init): Use AGGREGATE_TYPE_P.
5200
41b37d5e
JJ
52012015-05-19 Jakub Jelinek <jakub@redhat.com>
5202
5203 PR middle-end/66199
5204 * c-parser.c (c_parser_omp_for_loop): Don't add
5205 OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
5206 OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
5207 (c_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
5208 constructs.
5209
fab27f52
MM
52102015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
5211
5212 * c-typeck.c (build_array_ref): Use std::swap instead of explicit
296a8c2f 5213 swaps.
fab27f52 5214
40de31cf
MLI
52152015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
5216
5217 PR fortran/44054
5218 * c-objc-common.c (c_tree_printer): Replace locus pointer with
5219 accessor function.
5220
3aa3c9fc
MP
52212015-05-14 Marek Polacek <polacek@redhat.com>
5222
5223 PR c/66066
5224 PR c/66127
5225 * c-typeck.c (digest_init): Call pedwarn_init with OPT_Wpedantic
5226 rather than with 0.
5227
c3388e62
DM
52282015-05-12 David Malcolm <dmalcolm@redhat.com>
5229
5230 * c-parser.c (c_parser_if_body): Add param "if_loc", use it
5231 to add a call to warn_for_misleading_indentation.
5232 (c_parser_else_body): Likewise, adding param "else_loc".
5233 (c_parser_if_statement): Check for misleading indentation.
5234 (c_parser_while_statement): Likewise.
5235 (c_parser_for_statement): Likewise.
5236
755e528f
MP
52372015-05-08 Marek Polacek <polacek@redhat.com>
5238
5239 PR c/64918
5240 * c-typeck.c (add_pending_init): Use OPT_Woverride_init_side_effects.
5241 (output_init_element): Likewise.
5242
0173bd2a
MP
52432015-05-07 Marek Polacek <polacek@redhat.com>
5244
5245 PR c/65179
5246 * c-typeck.c (build_binary_op): Warn when left shifting a negative
5247 value.
5248
9babc352
MP
52492015-04-30 Marek Polacek <polacek@redhat.com>
5250
5251 * c-typeck.c (set_init_label): Call error_at instead of error and
5252 pass LOC to it.
5253
ac9f18db
MP
5254 * c-typeck.c (c_incomplete_type_error): Refactor to use %qT. Print
5255 the type of a decl.
5256
ec3fba51
MP
5257 * c-typeck.c (c_build_va_arg): Clarify the error message.
5258
b811915d
TS
52592015-04-29 Thomas Schwinge <thomas@codesourcery.com>
5260
5261 * c-parser.c (c_parser_oacc_enter_exit_data): Use
5262 OMP_STANDALONE_CLAUSES.
5263
f3075008
MP
52642015-04-28 Marek Polacek <polacek@redhat.com>
5265
5266 * c-parser.c (c_parser_binary_expression): Remove duplicate line.
5267
4e81b788
MP
52682015-04-28 Marek Polacek <polacek@redhat.com>
5269
5270 PR c/65901
5271 * c-typeck.c (c_build_va_arg): Require TYPE be a complete type.
5272
6c1db78e
MP
52732015-04-25 Marek Polacek <polacek@redhat.com>
5274
5275 PR c/52085
5276 * c-decl.c (finish_enum): Copy over TYPE_ALIGN. Also check for "mode"
5277 attribute.
5278
5c4abbb8
MP
52792015-04-23 Marek Polacek <polacek@redhat.com>
5280
5281 PR c/65345
5282 * c-decl.c (set_labels_context_r): New function.
5283 (store_parm_decls): Call it via walk_tree_without_duplicates.
5284 * c-typeck.c (convert_lvalue_to_rvalue): Use create_tmp_var_raw
5285 instead of create_tmp_var. Build TARGET_EXPR instead of
5286 COMPOUND_EXPR.
5287 (build_atomic_assign): Use create_tmp_var_raw instead of
5288 create_tmp_var. Build TARGET_EXPRs instead of MODIFY_EXPR.
5289
06aca1d5
IV
52902015-04-20 Ilya Verbin <ilya.verbin@intel.com>
5291
5292 * c-parser.c (c_parser_oacc_enter_exit_data): Remove excess semicolon.
5293 (c_parser_omp_target_update): Add missed %> to error_at ().
5294
8fba1830
BRF
52952015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
5296
5297 PR target/55143
5298 * c-decl.c (c_default_pointer_mode): Remove definition.
5299 * c-tree.h (c_default_pointer_mode): Remove declaration.
5300
62021f64
TB
53012015-03-27 Tobias Burnus <burnus@net-b.de>
5302
5303 PR c/65586
5304 * c-parser.c (c_parser_skip_to_pragma_eol): Optionally, don't
5305 error out.
5306 (c_parser_omp_for, c_parser_omp_parallel, c_parser_omp_distribute,
5307 c_parser_omp_teams, c_parser_omp_target, c_parser_omp_declare):
5308 Update calls to not error for skipped omp pragmas with -fopenmp-simd.
5309
9b65e171
JJ
53102015-03-19 Jakub Jelinek <jakub@redhat.com>
5311
5312 * c-decl.c (c_decl_attributes): Also add "omp declare target"
5313 attribute for DECL_EXTERNAL VAR_DECLs.
5314
17958621
JJ
53152015-03-11 Jakub Jelinek <jakub@redhat.com>
5316
5317 * c-parser.c (c_parse_init): Don't call xstrdup on get_identifier
5318 argument.
5319
7ccb1a11
JJ
53202015-03-10 Jakub Jelinek <jakub@redhat.com>
5321
5322 PR c/65120
5323 * c-typeck.c (parser_build_binary_op): Check for tcc_comparison
5324 before preparing arguments to warn_logical_not_parentheses.
5325
01177669
JJ
53262015-03-09 Jakub Jelinek <jakub@redhat.com>
5327
5328 PR c/65120
5329 * c-typeck.c (parser_build_binary_op): Don't warn for
5330 !!x == y or !b == y where b is _Bool.
5331
802ac282
MP
53322015-03-09 Marek Polacek <polacek@redhat.com>
5333
5334 * c-convert.c (convert): Make use of do_ubsan_in_current_function.
5335 * c-decl.c (grokdeclarator): Likewise.
5336 * c-typeck.c (build_binary_op): Likewise.
5337
e5165b60
MP
53382015-02-27 Marek Polacek <polacek@redhat.com>
5339
5340 PR c/65228
5341 * c-decl.c (start_decl): Return NULL_TREE if decl is an error node.
5342
065d214c
MP
53432015-02-14 Marek Polacek <polacek@redhat.com>
5344
5345 PR c/64768
5346 * c-decl.c (grokdeclarator): Set the range of a flexible array member
5347 declared through a typedef name.
5348
e5d9235b
MP
53492015-02-13 Marek Polacek <polacek@redhat.com>
5350
5351 PR c/65050
5352 * c-decl.c (grokdeclarator): Print also the type when giving
5353 the error message about array's incomplete element type.
5354
fa01ffcc
JJ
53552015-02-11 Jakub Jelinek <jakub@redhat.com>
5356
5357 PR c/64824
5358 * c-parser.c (c_parser_binary_expression): Fix OpenMP stack[sp].prec
5359 check in the POP macro.
5360
c3e38a03
MP
53612015-02-09 Marek Polacek <polacek@redhat.com>
5362
5363 PR c/64856
5364 * c-typeck.c (process_init_element): Don't always wrap
5365 COMPOUND_LITERAL_EXPR in a SAVE_EXPR in C99 mode when
5366 initializing a range of elements.
5367
4886ec8e
JJ
53682015-02-04 Jakub Jelinek <jakub@redhat.com>
5369
5370 PR c/64824
5371 PR c/64868
5372 * c-parser.c (c_parser_omp_atomic): Handle RDIV_EXPR.
5373
c3e38a03 53742015-02-02 Bruno Loff <bruno.loff@gmail.com>
a4bb6959
BL
5375
5376 * c-parser.c (c_parser_declspecs): Call invoke_plugin_callbacks after
5377 processing enum declaration.
5378
7b33f0c8
MP
53792015-01-29 Marek Polacek <polacek@redhat.com>
5380
5381 PR c/64709
5382 * c-typeck.c (pop_init_level): If constructor_elements has
5383 exactly one element with integer_zerop value, set constructor_zeroinit
5384 to 1. Remove braces around warning_init call.
5385
dea63e49
JJ
53862015-01-27 Jakub Jelinek <jakub@redhat.com>
5387
5388 PR c/64766
5389 * c-typeck.c (store_init_value): Don't overwrite DECL_INITIAL
5390 of FUNCTION_DECLs with error_mark_node.
5391
d38f7dce
JJ
53922015-01-26 Jakub Jelinek <jakub@redhat.com>
5393
5394 PR c/64778
5395 * c-typeck.c (convert_arguments): Return -1 if there are
5396 error_args, even if we've diagnosed too many arguments.
5397
cbf5d0e7
RB
53982015-01-21 Richard Biener <rguenther@suse.de>
5399
5400 PR middle-end/64313
5401 * c-decl.c (merge_decls): Call set_builtin_decl_declared_p
5402 for builtins the user declared correctly.
5403
41dbbb37
TS
54042015-01-15 Thomas Schwinge <thomas@codesourcery.com>
5405 Bernd Schmidt <bernds@codesourcery.com>
5406 Cesar Philippidis <cesar@codesourcery.com>
5407 James Norris <jnorris@codesourcery.com>
5408 Jakub Jelinek <jakub@redhat.com>
5409 Ilmir Usmanov <i.usmanov@samsung.com>
5410
5411 * c-parser.c: Include "gomp-constants.h".
5412 (c_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
5413 omp_clause_map_kind. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
5414 Use OMP_CLAUSE_SET_MAP_KIND.
5415 (c_parser_pragma): Handle PRAGMA_OACC_ENTER_DATA,
5416 PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_UPDATE.
5417 (c_parser_omp_construct): Handle PRAGMA_OACC_CACHE,
5418 PRAGMA_OACC_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP,
5419 PRAGMA_OACC_PARALLEL, PRAGMA_OACC_WAIT.
5420 (c_parser_omp_clause_name): Handle "auto", "async", "copy",
5421 "copyout", "create", "delete", "deviceptr", "gang", "host",
5422 "num_gangs", "num_workers", "present", "present_or_copy", "pcopy",
5423 "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
5424 "present_or_create", "pcreate", "seq", "self", "vector",
5425 "vector_length", "wait", "worker".
5426 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
5427 (OACC_ENTER_DATA_CLAUSE_MASK, OACC_EXIT_DATA_CLAUSE_MASK)
5428 (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
5429 (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
5430 (c_parser_omp_variable_list): Handle OMP_CLAUSE__CACHE_.
5431 (c_parser_oacc_wait_list, c_parser_oacc_data_clause)
5432 (c_parser_oacc_data_clause_deviceptr)
5433 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_workers)
5434 (c_parser_oacc_clause_async, c_parser_oacc_clause_wait)
5435 (c_parser_omp_clause_vector_length, c_parser_oacc_all_clauses)
5436 (c_parser_oacc_cache, c_parser_oacc_data, c_parser_oacc_kernels)
5437 (c_parser_oacc_enter_exit_data, c_parser_oacc_loop)
5438 (c_parser_oacc_parallel, c_parser_oacc_update)
5439 (c_parser_oacc_wait): New functions.
5440 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels)
5441 (c_finish_oacc_data): New prototypes.
5442 * c-typeck.c: Include "gomp-constants.h".
5443 (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR. Use
5444 GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use
5445 OMP_CLAUSE_SET_MAP_KIND.
5446 (c_finish_oacc_parallel, c_finish_oacc_kernels)
5447 (c_finish_oacc_data): New functions.
5448 (c_finish_omp_clauses): Handle OMP_CLAUSE__CACHE_,
5449 OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS,
5450 OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_ASYNC, OMP_CLAUSE_WAIT,
5451 OMP_CLAUSE_AUTO, OMP_CLAUSE_SEQ, OMP_CLAUSE_GANG,
5452 OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR, and OMP_CLAUSE_MAP's
5453 GOMP_MAP_FORCE_DEVICEPTR.
5454
adfac8df
JJ
54552015-01-09 Michael Collison <michael.collison@linaro.org>
5456
5457 * c-array-notation.c: Include hash-set.h, machmode.h,
5458 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
5459 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
5460 * c-aux-info.c: Ditto.
5461 * c-convert.c: Ditto.
5462 * c-decl.c: Ditto.
5463 * c-errors.c: Ditto.
5464 * c-lang.c: Dittoxs.
5465 * c-objc-common.c: Ditto.
5466 * c-parser.c: Ditto.
5467 * c-typeck.c: Include hash-set.h, machmode.h,
5468 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
5469 fold-const.h, wide-int.h, inchash.h, real.h and
5470 fixed-value.h due to flattening of tree.h.
5471
2cc901dc
MP
54722015-01-07 Marek Polacek <polacek@redhat.com>
5473
5474 PR c/64417
5475 * c-typeck.c (process_init_element): Disallow initialization of
5476 a flexible array member with a string constant if the structure
5477 is in an array.
5478
5624e564
JJ
54792015-01-05 Jakub Jelinek <jakub@redhat.com>
5480
e5341100
JJ
5481 PR sanitizer/64344
5482 * c-typeck.c (convert_for_assignment, c_finish_return): For
5483 -fsanitize=float-cast-overflow casts from REAL_TYPE to integer/enum
5484 types also set in_late_binary_op around convert call.
5485 * c-convert.c (convert): For -fsanitize=float-cast-overflow REAL_TYPE
5486 to integral type casts, if not in_late_binary_op, pass c_fully_fold
5487 result on expr as last argument to ubsan_instrument_float_cast,
5488 if in_late_binary_op, don't use c_save_expr but save_expr.
5489
5624e564
JJ
5490 Update copyright years.
5491
5bd012f8
MP
54922015-01-05 Marek Polacek <polacek@redhat.com>
5493
5494 PR c/64423
5495 * c-typeck.c (build_array_ref): Pass loc down to
5496 warn_array_subscript_with_type_char.
5497
3f8257db 54982014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
768952be
MU
5499
5500 * c-typeck.c: New behavious for pointers to arrays with qualifiers
8e745a17 5501 (common-pointer-type): For pointers to arrays take qualifiers from
768952be 5502 element type.
8e745a17 5503 (build_conditional_expr): Add warnings for lost qualifiers.
768952be 5504 (comp-target-types): Allow pointers to arrays with different qualifiers.
8e745a17 5505 (convert-for-assignment): Adapt warnings for discarded qualifiers. Add
768952be 5506 WARNING_FOR_QUALIFIERS macro and rename WARN_FOR_QUALIFIERS
8e745a17 5507 to PEDWARN_FOR_QUALIFIERS.
768952be 5508
8f94a8c4
JJ
55092014-12-17 Jakub Jelinek <jakub@redhat.com>
5510
5511 PR sanitizer/64289
5512 * c-convert.c: Include ubsan.h.
5513 (convert): For real -> integral casts and
5514 -fsanitize=float-cast-overflow don't call convert_to_integer, but
5515 instead instrument the float cast directly.
5516
b731b390
JJ
55172014-11-29 Jakub Jelinek <jakub@redhat.com>
5518
5519 * c-typeck.c (convert_lvalue_to_rvalue, build_atomic_assign,
5520 c_finish_stmt_expr): Remove NULL last argument from
5521 create_tmp_var_raw and create_tmp_var calls.
5522 * c-array-notation.c (fix_builtin_array_notation_fn,
5523 build_array_notation_expr, fix_conditional_array_notations_1,
5524 fix_array_notation_expr, fix_array_notation_call_expr): Likewise.
5525
541e35a6
MP
55262014-11-28 Marek Polacek <polacek@redhat.com>
5527
5528 PR c/63862
5529 * c-typeck.c (build_binary_op) <RSHIFT_EXPR, LSHIFT_EXPR>: Don't
5530 convert the right operand to integer type.
5531
b286be94
MP
55322014-11-25 Marek Polacek <polacek@redhat.com>
5533
5534 PR c/63877
5535 * c-decl.c (start_function): Disable -Wmissing-declarations warning
5536 for inline functions.
5537
aa7da51a
JJ
55382014-11-21 Jakub Jelinek <jakub@redhat.com>
5539
5540 PR target/63764
5541 * c-typeck.c (build_array_ref): Adjust
5542 convert_vector_to_pointer_for_subscript caller. If it returns true,
5543 call non_lvalue_loc on the result.
5544
d876207f
RB
55452014-11-11 Richard Biener <rguenther@suse.de>
5546
5547 * c-decl.c (c_init_decl_processing): Do not set pedantic_lvalues
5548 to true.
5549
e5e44252
AK
55502014-11-10 Andi Kleen <ak@linux.intel.com>
5551
5552 PR c/60804
5553 * c-parser.c (c_parser_statement_after_labels): Call
5554 check_no_cilk.
5555 (c_parser_if_statement): Dito.
5556 (c_parser_switch_statement): Dito.
5557 (c_parser_while_statement): Dito.
5558 (c_parser_do_statement): Dito.
5559 (c_parser_for_statement): Dito.
5560 * c-typeck.c (c_finish_loop): Dito.
5561
13c21655
PC
55622014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
5563
5564 * c-typeck.c (build_binary_op): Use OPT_Wshift_count_negative and
5565 OPT_Wshift_count_overflow in the warnings.
5566
2d51fcef
MP
55672014-10-30 Marek Polacek <polacek@redhat.com>
5568
5569 * c-objc-common.c (c_tree_printer) <case 'T'>: For a typedef name,
5570 print the stripped version as well, if they're not the same.
5571
ef4bddc2
RS
55722014-10-29 Richard Sandiford <richard.sandiford@arm.com>
5573
5574 * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from
5575 machine_mode.
5576
c582198b
AM
55772014-10-28 Andrew MacLeod <amacleod@redhat.com>
5578
5579 * c-decl.c: Adjust include files.
5580 * c-parser.c: Ditto.
5581
ddc8de03
PM
55822014-10-27 Phil Muldoon <pmuldoon@redhat.com>
5583 Tom Tromey <tromey@redhat.com>
5584
5585 * c-tree.h (enum c_oracle_request): New.
5586 (c_binding_oracle_function): New typedef.
5587 (c_binding_oracle, c_pushtag, c_bind): Declare.
5588 * c-decl.c (c_binding_oracle): New global.
5589 (I_SYMBOL_CHECKED): New macro.
5590 (i_symbol_binding): New function.
5591 (I_SYMBOL_BINDING, I_SYMBOL_DECL): Redefine.
5592 (I_TAG_CHECKED): New macro.
5593 (i_tag_binding): New function.
5594 (I_TAG_BINDING, I_TAG_DECL): Redefine.
5595 (I_LABEL_CHECKED): New macro.
5596 (i_label_binding): New function.
5597 (I_LABEL_BINDING, I_LABEL_DECL): Redefine.
5598 (c_print_identifier): Save and restore c_binding_oracle.
5599 (c_pushtag, c_bind): New functions.
5600
60393bbc
AM
56012014-10-27 Andrew MacLeod <amacleod@redhat.com>
5602
5603 * c-typeck.c: Adjust include files.
5604
d723bb7c
MLI
56052014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
5606
5607 PR c++/53061
5608 * c-objc-common.c (c_objc_common_init): Do not do diagnostics
5609 initialization here...
5610 (c_initialize_diagnostics): ... but here. Set defaults after
5611 building pretty-printer.
5612
1bc5a451
MP
56132014-10-23 Marek Polacek <polacek@redhat.com>
5614
5615 PR c/63626
5616 * c-decl.c (pop_scope): Don't print warning in external_scope.
5617
4435bb92
MP
56182014-10-19 Marek Polacek <polacek@redhat.com>
5619
5620 PR c/63567
5621 * c-typeck.c (output_init_element): Allow initializing objects with
5622 static storage duration with compound literals even in C99 and add
5623 pedwarn for it.
5624
7278465e
MP
56252014-10-17 Marek Polacek <polacek@redhat.com>
5626
5627 PR c/63567
5628 * c-typeck.c (digest_init): Allow initializing objects with static
5629 storage duration with compound literals even in C99 and add pedwarn
5630 for it.
5631
d9b7be2e
MP
56322014-10-17 Marek Polacek <polacek@redhat.com>
5633
5634 PR c/63543
5635 * c-tree.h (C_TYPE_ERROR_REPORTED): Define.
5636 * c-typeck.c (build_indirect_ref): Don't print the "dereferencing..."
5637 error multiple times. Print the type.
5638
f406ae1f
MP
56392014-10-17 Marek Polacek <polacek@redhat.com>
5640
5641 PR c/63549
5642 * c-typeck.c (build_array_ref): Bail if the index in an incomplete
5643 type.
5644
92574c7c
MP
56452014-10-17 Marek Polacek <polacek@redhat.com>
5646
5647 * c-decl.c (grokdeclarator): Use OPT_Wimplicit_int unconditionally.
5648 (start_function): Use OPT_Wimplicit_int instead of 0.
5649 (store_parm_decls_oldstyle): Likewise.
5650
1bc4a978
MT
56512014-10-17 Alan Modra <amodra@gmail.com>
5652
5653 PR middle-end/61848
5654 * c-decl.c (merge_decls): Don't merge section name or tls model
5655 to newdecl symtab node, instead merge to olddecl. Override
5656 existing olddecl section name. Set tls_model for all thread-local
5657 vars, not just OMP thread-private ones. Remove incorrect comment.
5658
83685514
AM
56592014-10-16 Andrew MacLeod <amacleod@redhat.com>
5660
5661 * c-decl.c: Adjust include files.
5662
78a7c317
DD
56632014-10-14 DJ Delorie <dj@redhat.com>
5664
5665 * c-parser.c (c_parse_init): Add RID entries for each __intN.
5666 (c_token_starts_typename): Check all __intN, not just __int128.
5667 (c_token_starts_declspecs): Likewise.
5668 (c_parser_declspecs): Likewise.
5669 (c_parser_attribute_any_word): Likewise.
5670 (c_parser_objc_selector): Likewise.
5671 * c-tree.h (c_typespec_keyword): cts_int128 -> cts_int_n.
5672 (struct c_declspecs): Add int_n_idx field to record *which* __intN
5673 is specified.
5674 * c-decl.c (declspecs_add_type): Check for all __intN, not just
5675 __int128.
5676 (finish_declspecs): Likewise.
5677
74d98c1e
AB
56782014-10-13 Anthony Brandon <anthony.brandon@gmail.com>
5679
8e745a17 5680 * c-parser.c (c_parser_all_labels): New function to replace
74d98c1e 5681 the duplicate code.
8e745a17 5682 (c_parser_statement): Call the new function.
74d98c1e 5683
84937de2
MP
56842014-10-09 Marek Polacek <polacek@redhat.com>
5685
5686 PR c/63480
5687 * c-typeck.c (pop_init_level): Don't warn about initializing
5688 with { }.
5689
0382aaa0
MP
56902014-10-07 Marek Polacek <polacek@redhat.com>
5691
5692 PR c/59717
5693 * c-decl.c (header_for_builtin_fn): New function.
5694 (implicitly_declare): Suggest which header to include.
5695
7a0ca710
MP
56962014-10-07 Marek Polacek <polacek@redhat.com>
5697
5698 * c-convert.c (convert): Use error_operand_p.
5699 * c-typeck.c (require_complete_type): Likewise.
5700 (really_atomic_lvalue): Likewise.
5701 (digest_init): Likewise.
5702 (handle_omp_array_sections_1): Likewise.
5703
6bc8a126
MP
57042014-10-03 Marek Polacek <polacek@redhat.com>
5705
5706 PR c/63453
5707 * c-decl.c (pop_scope): Don't warn about "inline function declared
5708 but never defined" for functions marked with gnu_inline attribute.
5709
d90c0a59
JJ
57102014-09-25 Jakub Jelinek <jakub@redhat.com>
5711
5712 PR c++/63249
5713 * c-parser.c (c_parser_omp_variable_list): Call mark_exp_read
5714 on low_bound and length.
5715
083e891e
MP
57162014-09-24 Marek Polacek <polacek@redhat.com>
5717
5718 PR c/61405
5719 PR c/53874
5720 * c-parser.c: Don't define CPP_KEYWORD.
5721 (c_parser_switch_statement): Pass original type to c_finish_case.
5722 * c-tree.h (c_finish_case): Update declaration.
5723 * c-typeck.c (c_finish_case): Add TYPE parameter. Pass it
5724 conditionally to c_do_switch_warnings.
5725
8d95fe25
MP
57262014-09-03 Marek Polacek <polacek@redhat.com>
5727
5728 PR c/62024
5729 * c-parser.c (c_parser_static_assert_declaration_no_semi): Strip no-op
5730 conversions.
5731
9a771876
JJ
57322014-09-02 Jakub Jelinek <jakub@redhat.com>
5733 Balaji V. Iyer <balaji.v.iyer@intel.com>
5734 Igor Zamyatin <igor.zamyatin@intel.com>
5735
5736 * c-parser.c (c_parser_cilk_for): New function.
5737 (c_parser_cilk_grainsize): Likewise.
5738 (c_get_temp_regvar): Likewise.
5739 (c_parser_statement_after_labels): Added RID_CILK_FOR case.
5740 (c_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
5741 (c_parser_omp_for_loop): Added CILK_FOR and CILK_SIMD checks.
5742 * c-typeck.c (c_finish_omp_clauses): Added OMP_CLAUSE__CILK_FOR_COUNT_
5743 case.
5744
b7679d96
CG
57452014-08-27 Chen Gang <gang.chen.5i5j@gmail.com>
5746
5747 * c-aux-info.c (gen_type): Resize 'buff' from 10 to 23 bytes,
5748 with using HOST_WIDE_INT without truncation to 'int'
5749
59ea0364
MP
57502014-08-22 Marek Polacek <polacek@redhat.com>
5751
5752 PR c++/62199
5753 * c-typeck.c (parser_build_binary_op): Adjust call to
5754 warn_logical_not_parentheses.
5755
671a475e
IZ
57562014-08-22 Igor Zamyatin <igor.zamyatin@intel.com>
5757
5758 PR other/62008
5759 * c-parser.c (c_parser_array_notation): Check for correct
5760 type of an array added.
5761
04159acf
MP
57622014-08-19 Marek Polacek <polacek@redhat.com>
5763
5764 PR c++/62153
5765 * c-typeck.c (build_binary_op): If either operand of a comparison
5766 is a boolean expression, call maybe_warn_bool_compare.
5767
c77935ee
PP
57682014-08-19 Patrick Palka <ppalka@gcc.gnu.org>
5769
5770 PR c/45584
5771 * c-typeck.c (build_c_cast): Do a conversion even when the
5772 TYPE_MAIN_VARIANTs are the same.
5773
35aff4fb
MP
57742014-08-19 Marek Polacek <polacek@redhat.com>
5775
5776 * c-decl.c (diagnose_mismatched_decls): Unconditionally call
5777 pedwarn_c99 instead of pedwarn.
5778 (grokfield): Likewise.
5779 (warn_defaults_to): New function.
5780 (grokdeclarator): Call warn_defaults_to instead of pedwarn_c99.
5781 Unconditionally call pedwarn_c99 instead of pedwarn.
5782 (start_function): Call warn_defaults_to instead of pedwarn_c99.
5783 (declspecs_add_scspec): Call pedwarn_c99 instead of pedwarn, don't
5784 check flag_isoc11 before.
5785 * c-errors.c (pedwarn_c99): Change the return type to bool.
5786 Handle -Wc99-c11-compat.
5787 * c-parser.c (disable_extension_diagnostics): Handle
5788 warn_c99_c11_compat.
5789 (restore_extension_diagnostics): Likewise.
5790 (c_parser_static_assert_declaration_no_semi): Call pedwarn_c99
5791 instead of pedwarn, don't check flag_isoc11 before.
5792 (c_parser_declspecs): Likewise.
5793 (c_parser_alignas_specifier): Likewise.
5794 (c_parser_alignof_expression): Likewise.
5795 (c_parser_generic_selection): Likewise.
5796 * c-tree.h (pedwarn_c99): Update declaration.
5797 * c-typeck.c (c_finish_return): Call pedwarn or warning_at instead
5798 of pedwarn_c99.
5799
177cce46
MP
58002014-08-19 Marek Polacek <polacek@redhat.com>
5801
5802 * c-decl.c (warn_variable_length_array): Pass OPT_Wvla unconditionally
5803 to pedwarn_c90.
5804 * c-errors.c: Include "opts.h".
5805 (pedwarn_c90): Rewrite to handle -Wno-c90-c99-compat better.
5806 * c-parser.c (disable_extension_diagnostics): Handle negative value
5807 of warn_c90_c99_compat, too.
5808 (restore_extension_diagnostics): Likewise.
5809 (c_parser_compound_statement_nostart): Pass
5810 OPT_Wdeclaration_after_statement unconditionally to pedwarn_c90.
5811
6dc99c33
MP
58122014-08-12 Marek Polacek <polacek@redhat.com>
5813
5814 * c-parser.c (c_parser_postfix_expression) <case RID_FUNCTION_NAME>:
5815 Add pedwarn.
5816 (c_parser_postfix_expression) <case RID_PRETTY_FUNCTION_NAME>:
5817 Likewise.
5818 (c_parser_postfix_expression) <case RID_C99_FUNCTION_NAME>: Likewise.
5819
3f8257db 58202014-08-10 Marek Polacek <polacek@redhat.com>
f3bede71
MP
5821
5822 PR c/51849
5823 * c-decl.c (build_array_declarator): Remove check for !flag_isoc99.
5824 Call pedwarn_c90 instead of pedwarn.
5825 (check_bitfield_type_and_width): Likewise.
5826 (declspecs_add_qual): Likewise.
5827 (declspecs_add_type): Likewise.
5828 (warn_variable_length_array): Unify function for -pedantic and -Wvla.
5829 Adjust to only call pedwarn_c90.
5830 (grokdeclarator): Remove pedantic && !flag_isoc99 check. Call
5831 pedwarn_c90 instead of pedwarn.
5832 * c-errors.c (pedwarn_c90): Handle -Wc90-c99-compat.
5833 * c-parser.c (disable_extension_diagnostics): Handle
5834 warn_c90_c99_compat.
5835 (restore_extension_diagnostics): Likewise.
5836 (c_parser_enum_specifier): Remove check for !flag_isoc99. Call
5837 pedwarn_c90 instead of pedwarn.
5838 (c_parser_initelt): Likewise.
5839 (c_parser_postfix_expression): Likewise.
5840 (c_parser_postfix_expression_after_paren_type): Likewise.
5841 (c_parser_compound_statement_nostart): Remove check for !flag_isoc99.
5842 * c-tree.h: Fix formatting.
5843 * c-typeck.c (build_array_ref): Remove check for !flag_isoc99. Call
5844 pedwarn_c90 instead of pedwarn.
5845
9f25a338
TS
58462014-08-07 Trevor Saunders <tsaunders@mozilla.com>
5847
5848 * c-typeck.c: Remove include of pointer-set.h.
5849
044331a8
MP
58502014-08-07 Marek Polacek <polacek@redhat.com>
5851
5852 * c-typeck.c (pointer_diff): Remove P - (P + CST) optimization.
5853
b787e7a2
TS
58542014-08-02 Trevor Saunders <tsaunders@mozilla.com>
5855
5856 * c-typeck.c: Use hash_map instead of pointer_map.
5857
6e2830c3
TS
58582014-08-02 Trevor Saunders <tsaunders@mozilla.com>
5859
5860 * c-decl.c: Use hash_set instead of pointer_set.
5861
a7ee52fb
IZ
58622014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
5863
5864 PR middle-end/61455
5865 * c-array-notation.c (expand_array_notations): Handling
5866 of DECL_EXPR added.
5867
b4dfdc11
MG
58682014-07-31 Marc Glisse <marc.glisse@inria.fr>
5869
5870 PR c++/60517
5871 * c-typeck.c (c_finish_return): Return 0 instead of the address of
5872 a local variable.
5873
976d5a22
TT
58742014-07-30 Tom Tromey <tromey@redhat.com>
5875
5876 * c-typeck.c (struct constructor_stack) <designator_depth>: New
5877 field.
5878 (really_start_incremental_init, push_init_level): Initialize
5879 designator_depth.
5880 (pop_init_level): Set global designator_depth.
5881 (process_init_element): Check for designated_init attribute.
5882
30281de2
MP
58832014-07-20 Marek Polacek <polacek@redhat.com>
5884
5885 PR c/61852
5886 * c-decl.c (implicit_decl_warning): Add location_t parameter. Use it.
5887 (implicitly_declare): Pass location to implicit_decl_warning.
5888
b108f48f
JJ
58892014-07-14 Jakub Jelinek <jakub@redhat.com>
5890
5891 PR middle-end/61294
5892 * c-parser.c (c_parser_expr_list): Add new argument literal_zero_mask.
5893 If non-NULL, call c_parser_check_literal_zero.
5894 (c_parser_check_literal_zero): New function.
5895 (c_parser_postfix_expression_after_primary): Adjust
5896 c_parser_expr_list caller, handle -Wmemset-transposed-args.
5897
773ec47f
MP
58982014-07-06 Marek Polacek <polacek@redhat.com>
5899
5900 PR c/6940
5901 * c-decl.c (grokdeclarator): Set C_ARRAY_PARAMETER.
5902 * c-tree.h (C_ARRAY_PARAMETER): Define.
5903 * c-typeck.c (c_expr_sizeof_expr): Warn when using sizeof on an array
5904 function parameter.
5905
22e1cf1c 59062014-07-02 Jan Hubicka <hubicka@ucw.cz>
3f8257db 5907 Chen Gang <gang.chen.5i5j@gmail.com>
22e1cf1c
JH
5908
5909 * c-decl.c (duplicate_decls): CLear DECL_STRUCT_FUNCTION before
5910 releasing symbol.
5911
52ec0ea3
MP
59122014-07-01 Marek Polacek <polacek@redhat.com>
5913
5914 * c-typeck.c (convert_for_assignment): Pass OPT_Wint_conversion
5915 instead of 0 to WARN_FOR_ASSIGNMENT.
5916
d5c3d343
MP
59172014-07-01 Marek Polacek <polacek@redhat.com>
5918
5919 PR c/58286
5920 * c-typeck.c (convert_for_assignment): Pass
5921 OPT_Wincompatible_pointer_types instead of 0 to WARN_FOR_ASSIGNMENT.
5922
6a7253a4
MP
59232014-06-30 Marek Polacek <polacek@redhat.com>
5924
5925 * c-decl.c (grokdeclarator): Don't instrument VLAs if the function
5926 has no_sanitize_undefined attribute.
5927
5e88a8f4
IZ
59282014-06-30 Igor Zamyatin <igor.zamyatin@intel.com>
5929
5930 PR middle-end/57541
5931 * c-array-notation.c (fix_builtin_array_notation_fn):
5932 Check for 0 arguments in builtin call. Check that bultin argument is
5933 correct.
5934 * c-parser.c (c_parser_array_notation): Check for incorrect initial
5935 index.
5936
9698b078
SH
59372014-06-27 Sebastian Huber <sebastian.huber@embedded-brains.de>
5938
5939 * c-parser.c (c_parser_declaration_or_fndef): Discard all type
5940 qualifiers in __auto_type for atomic types.
5941 (c_parser_typeof_specifier): Discard all type qualifiers in
5942 __typeof__ for atomic types.
5943
6e07c515
MP
59442014-06-25 Marek Polacek <polacek@redhat.com>
5945
5946 PR c/61162
5947 * c-parser.c (c_parser_statement_after_labels): Pass the location of
5948 the return expression to c_finish_return.
5949
da6f124d
JJ
59502014-06-25 Jakub Jelinek <jakub@redhat.com>
5951
5952 * c-typeck.c (c_finish_omp_clauses): Make sure
5953 OMP_CLAUSE_LINEAR_STEP has correct type.
5954
c203e8a7
TS
59552014-06-24 Trevor Saunders <tsaunders@mozilla.com>
5956
5957 * c-decl.c: Adjust.
5958
56ad0e38
JJ
59592014-06-24 Jakub Jelinek <jakub@redhat.com>
5960
5961 * c-parser.c (c_parser_omp_for_loop): For
5962 #pragma omp parallel for simd move lastprivate clause from parallel
5963 to for rather than simd.
5964
47c2554f
MP
59652014-06-23 Marek Polacek <polacek@redhat.com>
5966
5967 * c-typeck.c (parser_build_binary_op): Don't call
5968 warn_logical_not_parentheses if the RHS is TRUTH_NOT_EXPR.
5969
56363ffd
JH
59702014-06-15 Jan Hubicka <hubicka@ucw.cz>
5971
5972 * c-parser.c (c_parser_omp_threadprivate): Likewise.
5973 * c-decl.c (merge_decls): Likewise.
5974
d7ff7ae5
MP
59752014-06-09 Marek Polacek <polacek@redhat.com>
5976
5977 PR c/36446
5978 * c-typeck.c (error_init): Call inform instead of error_at.
5979 (pedwarn_init): Call inform instead of pedwarn.
5980 (warning_init): Call inform instead of warning_at.
5981
24d047a3
JH
59822014-06-07 Jan Hubicka <hubicka@ucw.cz>
5983
5984 * c-decl.c (merge_decls): Use set_decl_section_name.
5985 (duplicate_decls): Remove node if it exists.
5986
9bac5cbb
G
59872014-06-05 S. Gilles <sgilles@terpmail.umd.edu>
5988
5989 PR c/53119
5990 * c-typeck.c (push_init_level, process_init_element,
5991 pop_init_level): Correct check for zero initialization, move
5992 missing brace warning to respect zero initialization.
5993
8ffcdea8
MP
59942014-06-05 Marek Polacek <polacek@redhat.com>
5995
5996 PR c/56724
5997 * c-typeck.c (convert_for_assignment): Use expr_loc for ic_argpass.
5998
742938c9
MP
59992014-06-05 Marek Polacek <polacek@redhat.com>
6000
6001 PR c/49706
6002 * c-typeck.c (parser_build_binary_op): Warn when logical not is used
ab20d992 6003 on the left hand side operand of a comparison.
742938c9 6004
6447c55d
MP
60052014-06-05 Marek Polacek <polacek@redhat.com>
6006
6007 PR c/48062
6008 * c-decl.c (warn_if_shadowing): Call inform instead of warning_at.
6009 Print note only if the warning was printed.
6010
9dc7743c
IZ
60112014-06-04 Igor Zamyatin <igor.zamyatin@intel.com>
6012
6013 PR c/58942
6014 * c-array-notation.c (fix_builtin_array_notation_fn): Handle the case
6015 with a pointer.
6016
fedfecef
MP
60172014-06-03 Marek Polacek <polacek@redhat.com>
6018
6019 PR c/60439
6020 * c-parser.c (c_parser_switch_statement): Pass explicit_cast_p to
6021 c_start_case.
6022 * c-tree.h (c_start_case): Update.
6023 * c-typeck.c (c_start_case): Add new boolean parameter. Warn if
6024 switch condition has boolean value.
6025
9b2b7279
AM
60262014-06-02 Andrew MacLeod <amacleod@redhat.com>
6027
6028 * c-decl.c: Include builtins.h.
6029 * c-parser.c: Likewise.
6030
5c1bc275
MP
60312014-05-27 Marek Polacek <polacek@redhat.com>
6032
6033 PR c/56724
6034 * c-typeck.c (convert_arguments): Get location of a parameter. Change
6035 error and warning calls to error_at and warning_at. Pass location of
6036 a parameter to it. Call warning_at with OPT_Wtraditional_conversion.
6037 (convert_for_assignment): Add parameter to WARN_FOR_ASSIGNMENT and
6038 WARN_FOR_QUALIFIERS. Pass expr_loc to those.
6039
97563bc8
IZ
60402014-05-26 Igor Zamyatin <igor.zamyatin@intel.com>
6041
6042 PR c/61191
6043 * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid
6044 function parameters.
6045
aede2c10
JH
60462014-05-23 Jan Hubicka <hubicka@ucw.cz>
6047
6048 * c-decl.c (merge_decls): Preserve symtab node pointers.
6049 (duplicate_decls): Free new decl.
6050
edbba2ce
TS
60512014-05-23 Thomas Schwinge <thomas@codesourcery.com>
6052
f3316c6d
TS
6053 * c-typeck.c (c_finish_omp_clauses): Remove duplicated variable
6054 initialization.
6055
edbba2ce
TS
6056 * c-parser.c (c_parser_omp_target): Return bool values.
6057
68c81f24
TS
60582014-05-22 Thomas Schwinge <thomas@codesourcery.com>
6059
6060 * c-parser.c (c_parser_omp_clause_thread_limit): Rename
6061 num_teams_loc variable to num_thread_limit_loc.
6062
632f2871
RS
60632014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
6064
6065 * c-array-notation.c (expand_array_notations): Use void_node
6066 instead of void_zero_node.
6067
766090c2
TS
60682014-05-17 Trevor Saunders <tsaunders@mozilla.com>
6069
6070 * c-decl.c (finish_struct): Adjust.
6071 (finish_enum): Likewise.
6072 (bind): Adjust.
6073 (record_inline_static): Likewise.
6074 (push_scope): Likewise.
6075 (make_label): Likewise.
6076 (lookup_label_for_goto): Likewise.
6077 (finish_struct): Likewise.
6078 (finish_enum): Likewise.
6079 (store_parm_decls): Likewise.
6080 (c_push_function_context): Likewise.
6081 * c-lang.h: Remove usage of variable_size gty attribute.
6082 * c-parser.c (c_parse_init): Adjust.
6083 (c_parse_file): Likewise.
6084
2b107f6b
MP
60852014-05-13 Marek Polacek <polacek@redhat.com>
6086
6087 PR c/61162
6088 * c-typeck.c (convert_for_assignment): Pass location to
6089 WARN_FOR_ASSIGNMENT instead of input_location.
6090
d033409e
MP
60912014-05-10 Marek Polacek <polacek@redhat.com>
6092
6093 * c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
6094 maybe_warn_string_init.
6095 (c_parser_postfix_expression_after_paren_type): Pass type_loc to
6096 maybe_warn_string_init.
6097 * c-tree.h (maybe_warn_string_init): Update declaration.
6098 * c-typeck.c (maybe_warn_string_init): Add location parameter.
6099 Call pedwarn_init with loc instead of with input_location.
6100 (digest_init): Pass init_loc to maybe_warn_string_init.
6101 (pop_init_level): Call pedwarn_init with loc instead of with
6102 input_location.
6103 (set_init_index): Likewise.
6104 (process_init_element): Likewise.
6105
ea58ef42
MP
61062014-05-09 Marek Polacek <polacek@redhat.com>
6107
6108 PR c/61096
6109 * c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level.
6110 (c_parser_initelt): Pass location to set_init_label. Pass array index
6111 location to set_init_index.
6112 * c-tree.h (push_init_level): Update declaration.
6113 (pop_init_level): Likewise.
6114 (set_init_index): Likewise.
6115 (set_init_label): Likewise.
6116 * c-typeck.c (error_init): Add location parameter. Call error_at
6117 instead of error.
6118 (digest_init): Pass init_loc to error_init.
6119 (really_start_incremental_init):
6120 (push_init_level): Add location parameter. Pass loc to pop_init_level
6121 and error_init.
6122 (pop_init_level): Likewise.
6123 (set_designator): Add location parameter. Pass loc to pop_init_level,
6124 push_init_level, and error_init.
6125 (set_init_index): Add location parameter. Pass loc to error_init and
6126 set_designator.
6127 (set_init_label): Likewise.
6128 (output_init_element): Pass loc to error_init.
6129 (process_init_element): Pass loc to error_init, pop_init_level,
6130 pedwarn_init, and push_init_level.
6131
661a0813
MP
61322014-05-09 Marek Polacek <polacek@redhat.com>
6133
6134 PR c/50459
6135 * c-parser.c (c_parser_attributes): Parse the arguments as an
6136 expression-list if the attribute takes identifier.
6137
2793eeab
MP
61382014-05-08 Marek Polacek <polacek@redhat.com>
6139
6140 PR c/61053
6141 * c-decl.c (grokdeclarator): Use min_align_of_type instead of
6142 TYPE_ALIGN_UNIT.
6143
f827930a
MP
61442014-05-08 Marek Polacek <polacek@redhat.com>
6145
6146 PR c/61077
6147 * c-decl.c (start_function): Warn for _Atomic-qualified return type
6148 of main.
6149
1d60af08
KZ
61502014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
6151 Mike Stump <mikestump@comcast.net>
6152 Richard Sandiford <rdsandiford@googlemail.com>
6153
6154 * c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN.
6155 (finish_enum): Use wide-int interfaces.
6156 * c-parser.c (c_parser_cilk_clause_vectorlength): Likewise.
6157 * c-typeck.c (build_c_cast): Likewise.
6158 (set_nonincremental_init_from_string): Likewise.
6159 (c_tree_equal): Likewise.
6160
a0e24419
MP
61612014-05-02 Marek Polacek <polacek@redhat.com>
6162
6163 PR c/25801
6164 * c-typeck.c (c_size_in_bytes): Update comment. Don't call error.
6165 Return size_one_node when the type is not complete.
6166 (pointer_diff): Remove comment.
6167 (build_unary_op): Improve error messages.
6168
19fc9faa
MP
61692014-05-02 Marek Polacek <polacek@redhat.com>
6170
6171 * c-typeck.c (c_finish_return): Separate warning_at calls.
6172
63bc4e87
MP
61732014-05-02 Marek Polacek <polacek@redhat.com>
6174
6175 * c-tree.h (error_init): Remove declaration.
6176 (pedwarn_init): Likewise.
6177 * c-typeck.c (error_init): Make static and move above.
6178 (pedwarn_init): Likewise.
6179 (warning_init): Move above.
6180 (maybe_warn_string_init): Likewise.
6181
4bd2511b
JL
61822014-05-01 Jeff Law <law@redhat.com>
6183
6184 Revert:
6185
6186 2014-04-24 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
6187 * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
6188 avoid goto.
6189
6a358dcb
MP
61902014-05-02 Marek Polacek <polacek@redhat.com>
6191
6192 PR c/60784
6193 * c-typeck.c (push_init_level): Set constructor_designated to
6194 p->designated for structures.
6195
ae5ebda4
MP
61962014-05-01 Marek Polacek <polacek@redhat.com>
6197
6198 PR c/60915
6199 * c-parser.c (c_parser_declaration_or_fndef): Give better error if
6200 function-definition has an attribute after the declarator.
6201
96b40f8d
MP
62022014-05-01 Marek Polacek <polacek@redhat.com>
6203
6204 PR c/60257
6205 * c-typeck.c (warning_init): Add location_t parameter. Call
6206 warning_at instead of warning.
6207 (push_init_level): Pass input_location to warning_init.
6208 (add_pending_init): Add location_t parameter. Pass loc to
6209 warning_init.
6210 (set_nonincremental_init): Pass input_location to add_pending_init.
6211 (set_nonincremental_init_from_string): Likewise.
6212 (output_init_element): Pass loc to warning_init and to
6213 add_pending_init.
6214
32e00768
MP
62152014-05-01 Marek Polacek <polacek@redhat.com>
6216
6217 PR c/43395
6218 * c-typeck.c (c_finish_return): Distinguish between label and variable
6219 when warning about returning local address.
6220
c9379ce2
MP
62212014-05-01 Marek Polacek <polacek@redhat.com>
6222
6223 PR c/29467
6224 * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
6225 in C89 mode.
6226
d00887e8
MP
62272014-05-01 Marek Polacek <polacek@redhat.com>
6228
6229 PR c/43245
6230 * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
6231 instead of 0 to WARN_FOR_QUALIFIERS.
6232
5436fa2e
MP
62332014-05-01 Marek Polacek <polacek@redhat.com>
6234
6235 PR c/56989
6236 * c-typeck.c (default_conversion): Use better location for
6237 error call.
6238
f8ed5150
MP
62392014-04-30 Marek Polacek <polacek@redhat.com>
6240
6241 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
6242 also when SANITIZE_FLOAT_DIVIDE is on.
6243
8337d1db
MP
62442014-04-30 Marek Polacek <polacek@redhat.com>
6245
6246 PR c/60139
6247 * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
6248 and pedwarn_init. Use loc insted of input_location.
6249
c4bdc42f
MP
62502014-04-30 Marek Polacek <polacek@redhat.com>
6251
6252 PR c/60351
6253 * c-typeck.c (build_binary_op): Use location when warning about
6254 shift count.
6255
45484dcf
MP
62562014-04-25 Marek Polacek <polacek@redhat.com>
6257
6258 PR c/18079
6259 * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
6260 always_inline/noinline and hot/cold attributes.
6261
34cf811f
MP
62622014-04-25 Marek Polacek <polacek@redhat.com>
6263
6264 PR c/60114
6265 * c-parser.c (c_parser_initelt): Pass input_location to
6266 process_init_element.
6267 (c_parser_initval): Pass loc to process_init_element.
6268 * c-tree.h (process_init_element): Adjust declaration.
6269 * c-typeck.c (push_init_level): Pass input_location to
6270 process_init_element.
6271 (pop_init_level): Likewise.
6272 (set_designator): Likewise.
6273 (output_init_element): Add location_t parameter. Pass loc to
6274 digest_init.
6275 (output_pending_init_elements): Pass input_location to
6276 output_init_element.
6277 (process_init_element): Add location_t parameter. Pass loc to
6278 output_init_element.
6279
42056eac
JJ
62802014-04-24 Jakub Jelinek <jakub@redhat.com>
6281
6282 * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
6283 atomic-clause, allow comma in between atomic-clause and
6284 seq_cst.
6285
e162a134
JJ
62862014-04-22 Jakub Jelinek <jakub@redhat.com>
6287
6288 PR c/59073
6289 * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
6290 fails, don't set OM_PARALLEL_COMBINED and return NULL.
6291
2f6babac
IZ
62922014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
6293
6294 PR middle-end/60469
6295 * c-array-notation.c (fix_builtin_array_notation_fn): Use
6296 create_tmp_var instead build_decl for creating temps.
6297 (build_array_notation_expr): Likewise.
6298 (fix_conditional_array_notations_1): Likewise.
6299 (fix_array_notation_expr): Likewise.
6300 (fix_array_notation_call_expr): Likewise.
6301
8edbfaa6
JJ
63022014-03-28 Jakub Jelinek <jakub@redhat.com>
6303
6304 PR c++/60689
6305 * c-tree.h (c_build_function_call_vec): New prototype.
6306 * c-typeck.c (build_function_call_vec): Don't call
6307 resolve_overloaded_builtin here.
6308 (c_build_function_call_vec): New wrapper function around
6309 build_function_call_vec. Call resolve_overloaded_builtin here.
6310 (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
6311 Call c_build_function_call_vec instead of build_function_call_vec.
6312 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
6313 * c-decl.c (finish_decl): Likewise.
6314
7485aeea
MLI
63152014-03-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
6316
6317 PR c/55383
6318 * c-typeck.c: Use correct format string in cast-qual warning
6319
b17a8b07
TS
63202014-03-07 Thomas Schwinge <thomas@codesourcery.com>
6321
6322 * c-decl.c (c_decl_attributes): Use
6323 lang_hooks.types.omp_mappable_type.
6324 * c-typeck.c (c_finish_omp_clauses): Likewise.
6325
3af9c5e9
MP
63262014-03-06 Marek Polacek <polacek@redhat.com>
6327
6328 PR c/60197
6329 * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
6330 of checking tree code.
6331
1c9f5f33
PK
63322014-02-19 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
6333
6334 * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
6335 (c_parser_parameter_declaration): Likewise.
6336
cc28fc7f
MP
63372014-02-19 Marek Polacek <polacek@redhat.com>
6338
6339 PR c/60195
6340 * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
6341 Call mark_exp_read on exp.value.
6342 (build_atomic_assign): Set TREE_NO_WARNING on val and old. Set
6343 TREE_ADDRESSABLE on old instead of val.
6344 (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
6345
b581c05c
PK
63462014-02-07 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
6347
6348 * c-parser.c (c_parser_get_builtin_args): Replace calls to
6349 C_EXPR_APPEND by vec_safe_push.
6350 * c-tree.h (C_EXPR_APPEND): Remove.
6351
81e5eca8
MP
63522014-01-31 Marek Polacek <polacek@redhat.com>
6353
6354 PR c/59963
6355 * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
6356 build_function_call_vec.
6357 (build_function_call): Likewise.
6358 (build_atomic_assign): Likewise.
6359 (build_function_call_vec): Add arg_loc parameter. Use it.
6360 (convert_arguments): Likewise.
6361 (convert_for_assignment): Rename rhs_loc to expr_loc.
6362 * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
6363 (c_parser_objc_keywordexpr): Likewise.
6364 (c_parser_postfix_expression_after_primary): Call
6365 build_function_call_vec with expr_loc rather than op_loc.
6366 Call c_parser_expr_list to fill arg_loc. Pass arg_loc to
6367 build_function_call_vec.
6368 (c_parser_expr_list): Add locations parameter. Fill it with locations
6369 of function arguments.
6370 * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
6371
68fca595
MP
63722014-01-30 Marek Polacek <polacek@redhat.com>
6373
6374 PR c/59940
6375 * c-typeck.c (build_function_call_vec): Use loc parameter.
6376 (convert_arguments): Add location parameter. Use it.
6377 (ep_convert_and_check): Likewise.
6378 (build_atomic_assign): Adjust convert_for_assignment call.
6379 (build_modify_expr): Likewise.
6380 (digest_init): Likewise.
6381 (c_finish_return): Likewise.
6382 (build_conditional_expr): Adjust ep_convert_and_check calls.
6383 (convert_for_assignment): Add rhs_loc parameter. Use it.
6384 (build_binary_op): Adjust convert_and_check and ep_convert_and_check
6385 calls.
6386
fa337f3a
RB
63872014-01-30 Richard Biener <rguenther@suse.de>
6388
6389 PR c/59905
6390 * c-typeck.c (build_function_call_vec): Do not replace calls
6391 to a function via an incompatible type with a runtime abort.
6392
b72271b9
BI
63932014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
6394
6395 * c-parser.c (c_parser_declaration_or_fndef): Replaced
6396 flag_enable_cilkplus with flag_cilkplus.
6397 (c_parser_direct_declarator_inner): Likewise.
6398 (c_parser_attribute_any_word): Likewise.
6399 (c_parser_attributes): Likewise.
6400 (c_parser_compound_statement): Likewise.
6401 (c_parser_statement_after_labels): Likewise.
6402 (c_parser_if_statement): Likewise.
6403 (c_parser_switch_statement): Likewise.
6404 (c_parser_do_statement): Likewise.
6405 (c_parser_for_statement): Likewise.
6406 (c_parser_unary_expression): Likewise.
6407 (c_parser_postfix_expression): Likewise.
6408 (c_parser_postfix_expression_after_primary): Likewise.
6409 (c_parser_postfix_expression_after_primary): Likewise.
6410 (c_parser_omp_clause_name): Likewise.
6411 (c_finish_omp_declare_simd): Likewise.
6412 (c_parser_cilk_verify_simd): Likewise.
6413 * c-typeck.c (build_array_ref): Likewise.
6414 (build_function_call_vec): Likewise.
6415 (convert_arguments): Likewise.
6416 (build_compound_expr): Likewise.
6417 (c_finish_return): Likewise.
6418 (c_finish_if_stmt): Likewise.
6419 (c_finish_loop): Likewise.
6420 (build_binary_op): Likewise.
6421
393e8e8b
MP
64222014-01-23 Marek Polacek <polacek@redhat.com>
6423
6424 PR c/59846
6425 * c-typeck.c (parser_build_binary_op): Use location instead of
6426 input_location.
6427 (build_binary_op): Pass location to shorten_compare.
6428
f04dda30
MP
64292014-01-23 Marek Polacek <polacek@redhat.com>
6430
6431 PR c/58346
6432 * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
6433 an empty aggregate.
6434
789eadcd
MP
64352014-01-23 Marek Polacek <polacek@redhat.com>
6436
6437 PR c/59871
6438 * c-typeck.c (build_compound_expr): Warn even for right-hand operand
6439 of a comma expression.
6440 (emit_side_effect_warnings): Likewise.
6441
40f14e9f
BI
64422014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
6443
6444 PR c/59825
6445 * c-array-notation.c (expand_array_notation_exprs): Rewrote this
6446 function to use walk_tree and moved a lot of its functionality to
6447 expand_array_notations.
6448 (expand_array_notations): New function.
6449
74558dd9
BI
64502014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
6451
6452 * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
6453 attribute an attribute without value.
6454
652fea39
JJ
64552014-01-23 Jakub Jelinek <jakub@redhat.com>
6456
6457 PR middle-end/58809
6458 * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
6459 BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
6460
f34f1c87
MP
64612014-01-22 Marek Polacek <polacek@redhat.com>
6462
6463 PR c/59891
6464 * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
6465 of remove_c_maybe_const_expr on op1 and op2.
6466
241f845a
JJ
64672014-01-15 Jakub Jelinek <jakub@redhat.com>
6468
6469 PR c/58943
6470 * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
6471 effects, preevaluate rhs using SAVE_EXPR first.
6472
9a74f20c
BI
64732014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
6474
6475 PR c++/59631
6476 * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
6477 statements with if-elseif statements.
6478
96066ce1
MP
64792014-01-06 Marek Polacek <polacek@redhat.com>
6480
6481 PR c/57773
6482 * c-decl.c (check_bitfield_type_and_width): Warn for implementation
6483 defined bit-field types only in ISO C.
6484
23a5b65a
RS
64852014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
6486
6487 Update copyright years
6488
f9030485
RS
64892014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
6490
6491 * c-array-notation.c: Use the standard form for the copyright notice.
6492
41958c28
BI
64932013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
6494
6495 * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
6496 (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
6497 field in parser is not empty. If not-empty, call the function
6498 c_parser_finish_omp_declare_simd.
6499 (c_parser_cilk_clause_vectorlength): Modified function to be shared
6500 between SIMD-enabled functions and #pragma simd. Added new parameter.
6501 (c_parser_cilk_all_clauses): Modified the usage of the function
6502 c_parser_cilk_clause_vectorlength as mentioned above.
6503 (c_parser_cilk_simd_fn_vector_attrs): New function.
6504 (c_finish_cilk_simd_fn_tokens): Likewise.
6505 (is_cilkplus_vector_p): Likewise.
6506 (c_parser_omp_clause_name): Added checking for "vectorlength,"
6507 "nomask," and "mask" strings in clause name.
6508 (c_parser_omp_all_clauses): Added 3 new case statements:
6509 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
6510 PRAGMA_CILK_CLAUSE_NOMASK.
6511 (c_parser_attributes): Added a cilk_simd_fn_tokens parameter. Added a
6512 check for vector attribute and if so call the function
6513 c_parser_cilk_simd_fn_vector_attrs. Also, when Cilk plus is enabled,
6514 called the function c_finish_cilk_simd_fn_tokens.
6515 (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
6516 parser field is non-empty. If so, parse them as you would parse
6517 the omp declare simd pragma.
6518 (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
6519 Added a check when step is a parameter and flag it as error.
6520 (CILK_SIMD_FN_CLAUSE_MASK): New #define.
6521 (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
6522 pragma_omp_clause.
6523
cef0fd0e
TS
65242013-12-17 Thomas Schwinge <thomas@codesourcery.com>
6525
6526 * c-parser.c (c_parser_omp_parallel): Fix description.
6527
12893402
BI
65282013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
6529
6530 * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
6531 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
6532 (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
6533 * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
6534
296674db
JM
65352013-12-04 Joseph Myers <joseph@codesourcery.com>
6536
6537 PR c/52023
6538 * c-parser.c (c_parser_alignas_specifier): Use
6539 c_sizeof_or_alignof_type instead of c_alignof.
6540 (c_parser_alignof_expression): Likewise, with min_alignof
6541 parameter depending on alignof spelling used.
6542
edd28054
MP
65432013-12-04 Marek Polacek <polacek@redhat.com>
6544
6545 PR c/54113
6546 * c-decl.c (start_function): Don't warn for missing prototype for
6547 inline functions.
6548
da0fc454
MP
65492013-12-03 Marek Polacek <polacek@redhat.com>
6550
6551 PR c/59351
6552 * c-decl.c (build_compound_literal): Allow compound literals with
6553 empty initial value.
6554
4c2ecab0
JM
65552013-12-02 Joseph Myers <joseph@codesourcery.com>
6556
6557 PR c/58235
6558 * c-typeck.c (build_modify_expr): Diagnose assignment to
6559 expression with array type.
6560
340baef7
JM
65612013-11-29 Joseph Myers <joseph@codesourcery.com>
6562
6563 PR c/42262
6564 * c-typeck.c (process_init_element): Do not treat a string as
6565 initializing a whole array when used with a designator for an
6566 individual element.
6567
6763b9f7
JM
65682013-11-29 Joseph Myers <joseph@codesourcery.com>
6569
6570 PR c/57574
6571 * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
6572 an inline function following a static declaration.
6573
e7bd1de1
JJ
65742013-11-28 Jakub Jelinek <jakub@redhat.com>
6575
6576 PR c/59310
6577 * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
6578 to p_name before calling c_parser_omp_teams instead of after.
6579 (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
6580 argument. Remove unused p_name variable.
6581
0136f8f0
AH
65822013-11-27 Aldy Hernandez <aldyh@redhat.com>
6583 Jakub Jelinek <jakub@redhat.com>
6584
6585 * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
6586 external_scope is NULL.
6587
241b71bb
TV
65882013-11-27 Tom de Vries <tom@codesourcery.com>
6589 Marc Glisse <marc.glisse@inria.fr>
6590
6591 PR c++/59032
6592 * c-typeck.c (build_unary_op): Allow vector increment and decrement.
6593
2fb9a547
AM
65942013-11-22 Andrew MacLeod <amacleod@redhat.com>
6595
6596 * c-typeck.c: Add required include files from gimple.h.
6597
8400e75e
DM
65982013-11-22 David Malcolm <dmalcolm@redhat.com>
6599
6600 * c-decl.c (define_label, shadow_tag_warned)
6601 (check_bitfield_type_and_width, grokdeclarator, grokparms,
6602 store_parm_decls_newstyle, store_parm_decls_oldstyle)
6603 (declspecs_add_type): Remove use of in_system_header macro.
6604 * c-parser.c (c_parser_unary_expression): Likewise.
6605 * c-typeck.c (store_init_value, process_init_element)
6606 (c_start_case): Likewise.
6607
6608 * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
6609 macro.
6610
6611 * c-parser.c (c_parser_set_source_position_from_token): Remove
6612 reference to in_system_header from comment.
6613
386b1f1f
RS
66142013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
6615
6616 * c-decl.c (grokdeclarator): Update comment to refer to
6617 tree_to_[su]hwi rather than tree_low_cst.
6618
ae7e9ddd
RS
66192013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
6620
6621 * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
6622 tree_to_uhwi throughout.
6623
9439e9a1
RS
66242013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
6625
6626 * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
6627 throughout.
6628
9541ffee
RS
66292013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
6630
6631 * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
6632 throughout.
6633
c02065fc
AH
66342013-11-15 Aldy Hernandez <aldyh@redhat.com>
6635
6636 * c-parser.c (c_parser_cilk_simd): New.
6637 (c_parser_cilk_verify_simd): New.
6638 (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
6639 (c_parser_omp_for_loop): Add case for NE_EXPR.
6640 Set c_break_label for CILK_SIMD.
6641 (c_parser_cilk_clause_vectorlength): New.
6642 (c_parser_cilk_clause_linear): New.
6643 (c_parser_cilk_clause_name): New.
6644 (c_parser_cilk_all_clauses): New.
6645 * c-typeck.c (build_unary_op): Pass location argument to
6646 readonly_error.
6647 (build_modify_expr): Same.
6648 (build_asm_expr): Same.
6649 (c_finish_bc_stmt): Error on break/continue in loops.
6650
18f429e2
AM
66512013-11-14 Andrew MacLeod <amacleod@redhat.com>
6652
6653 * c-typeck.c: Include only gimplify.h and gimple.h as needed.
6654
d8a2d370
DN
66552013-11-14 Diego Novillo <dnovillo@google.com>
6656
6657 * c-decl.c: Include print-tree.h.
6658 Include stor-layout.h.
6659 Include varasm.h.
6660 Include attribs.h.
6661 Include stringpool.h.
6662 * c-lang.c: Include fold-const.h.
6663 * c-parser.c: Include stringpool.h.
6664 Include attribs.h.
6665 Include stor-layout.h.
6666 Include varasm.h.
6667 Include trans-mem.h.
6668 * c-typeck.c: Include stor-layout.h.
6669 Include trans-mem.h.
6670 Include varasm.h.
6671 Include stmt.h.
6672
38b7bc7f
JM
66732013-11-13 Joseph Myers <joseph@codesourcery.com>
6674
6675 * c-tree.h (c_typespec_keyword): Add cts_auto_type.
6676 * c-decl.c (declspecs_add_type, finish_declspecs): Handle
6677 __auto_type.
6678 * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
6679 (c_parser_attribute_any_word, c_parser_objc_selector): Handle
6680 RID_AUTO_TYPE.
6681 (c_parser_declspecs): Take argument AUTO_TYPE_OK.
6682 (c_parser_declaration_or_fndef, c_parser_struct_declaration)
6683 (c_parser_declarator, c_parser_direct_declarator_inner)
6684 (c_parser_parameter_declaration, c_parser_type_name): All callers
6685 changed.
6686 (c_parser_declaration_or_fndef): Handle declarations with type
6687 determined from the initializer.
6688
45b0be94
AM
66892013-11-12 Andrew MacLeod <amacleod@redhat.com>
6690
18f429e2 6691 * c-typeck.c: Include gimplify.h.
45b0be94 6692
582d9b50
JM
66932013-11-12 Joseph Myers <joseph@codesourcery.com>
6694
6695 * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
6696 * c-parser.c (c_parser_declspecs): Mention _Thread_local in
6697 comment.
6698 * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
6699 or _Thread_local as appropriate in diagnostics.
6700 (build_null_declspecs): Initialize ret->thread_gnu_p.
6701 (declspecs_add_scspec): Handle either __thread or _Thread_local
6702 for RID_THREAD. Diagnose _Thread_local for pre-C11 standards if
6703 pedantic. Do not disallow _Thread_local extern and _Thread_local
6704 static.
6705
267bac10
JM
67062013-11-07 Joseph Myers <joseph@codesourcery.com>
6707 Andrew MacLeod <amacleod@redhat.com>
6708
6709 * c-aux-info.c (gen_type): Handle atomic qualifier.
6710 * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
6711 qualifiers when compating types.
6712 (shadow_tag_warned): Handle atomic_p in declspecs.
6713 (quals_from_declspecs): Likewise.
6714 (start_decl): Use c_type_promotes_to when promoting argument
6715 types.
6716 (grokdeclarator): Handle _Atomic.
6717 (get_parm_info): Diagnose any qualifier on "void" as only
6718 parameter.
6719 (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
6720 comparing types. Use c_type_promotes_to when promoting argument
6721 types.
6722 (finish_function): Use c_type_promotes_to when promoting argument
6723 types.
6724 (build_null_declspecs): Handle atomic_p in declspecs.
6725 (declspecs_add_qual): Handle RID_ATOMIC.
6726 * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
6727 (c_token_starts_declspecs): Handle RID_ATOMIC.
6728 (c_parser_declspecs): Handle atomic type specifiers and
6729 qualifiers.
6730 (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
6731 from types of expressions with atomic type.
6732 (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
6733 (c_parser_attribute_any_word): Handle RID_ATOMIC.
6734 (c_parser_initializer, c_parser_initelt, c_parser_initval)
6735 (c_parser_statement_after_labels, c_parser_switch_statement)
6736 (c_parser_for_statement, c_parser_expr_no_commas)
6737 (c_parser_conditional_expression, c_parser_binary_expression)
6738 (c_parser_cast_expression, c_parser_unary_expression)
6739 (c_parser_postfix_expression)
6740 (c_parser_postfix_expression_after_primary, c_parser_expression):
6741 Use convert_lvalue_to_rvalue.
6742 (c_parser_expression_conv, c_parser_expr_list): Document
6743 conversion of lvalues to rvalues. Use convert_lvalue_to_rvalue.
6744 (c_parser_objc_synchronized_statement): Use
6745 convert_lvalue_to_rvalue.
6746 (c_parser_objc_selector): Handle RID_ATOMIC.
6747 (c_parser_objc_receiver, c_parser_array_notation): Use
6748 convert_lvalue_to_rvalue.
6749 * c-tree.h (ctsk_typeof): Adjust comment to mention use for
6750 _Atomic (type-name).
6751 (struct c_declspecs): Add atomic_p field.
6752 (convert_lvalue_to_rvalue): Declare.
6753 * c-typeck.c (c_type_promotes_to): Promote atomic types to
6754 corresponding atomic types.
6755 (qualify_type): Don't add _Atomic qualifiers from second argument.
6756 (comp_target_types): Do not allow _Atomic mismatches.
6757 (type_lists_compatible_p): Do not remove atomic qualifiers when
6758 comparing types.
6759 (really_atomic_lvalue, convert_lvalue_to_rvalue)
6760 (build_atomic_assign): New functions.
6761 (build_unary_op): Use build_atomic_assign for atomic increment and
6762 decrement.
6763 (build_conditional_expr): Do not treat _Atomic void as a qualified
6764 version of void.
6765 (build_modify_expr): Use build_atomic_assign for atomic LHS.
6766 (find_anonymous_field_with_type, convert_to_anonymous_field)
6767 (convert_for_assignment): Do not remove atomic qualifiers when
6768 comparing types.
6769 (digest_init): Do not accept initialization of arrays of atomic
6770 elements by string constants.
6771 (build_asm_expr): Use convert_lvalue_to_rvalue.
6772 (build_binary_op): Do not treat _Atomic void as a qualified
6773 version of void.
6774
0c249d4b
DD
67752013-11-06 DJ Delorie <dj@redhat.com>
6776
6777 * c-decl.c (locate_old_decl): If a previous conflicting decl is
6778 both explicit and builtin, print the location of the explicit one.
6779
6d7f7e0a
TB
67802013-11-05 Tobias Burnus <burnus@net-b.de>
6781
6782 * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
6783 c_parser_omp_distribute, c_parser_omp_teams,
6784 c_parser_omp_target, c_parser_omp_declare): Handle
6785 -fopenmp-simd.
6786
b906f4ca
MP
67872013-11-03 Marek Polacek <polacek@redhat.com>
6788
6789 * c-decl.c (grokdeclarator): Add VLA instrumentation.
6790
ee1d5a02
JJ
67912013-11-01 Jakub Jelinek <jakub@redhat.com>
6792
6793 * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
6794 check_dup_generic at the end, unless remove is true.
6795 (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
6796 remove = true;.
6797 (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
6798
5a9785fb
JJ
67992013-10-31 Jakub Jelinek <jakub@redhat.com>
6800
6801 * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
6802 with decl that is not pointer nor array.
6803
939b37da
BI
68042013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
6805
6806 * c-decl.c (finish_function): Added a call for insert_cilk_frame when
6807 a spawning function is found.
6808 * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
6809 (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
6810 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
6811 * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
6812 case.
6813 (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
6814 * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
6815 expr.
6816 (c_finish_return): Added a check to reject _Cilk_spawn in return
6817 expression.
6818 (build_cilk_spawn): New function.
6819 (build_cilk_sync): Likewise.
6820 * Makefile.in (c-decl.o): Added cilk.h in dependency list.
ab20d992 6821
d4af74d4
TB
68222013-10-27 Tobias Burnus <burnus@net-b.de>
6823
6824 PR other/33426
6825 * c-parser.c (c_parser_while_statement, c_parser_while_statement,
6826 c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
6827 (c_parser_statement_after_labels): Update calls.
6828
d73749df 68292013-10-24 Tobias Burnus <burnus@net-b.de>
8170608b
TB
6830
6831 PR other/33426
6832 * c-parser.c (c_parser_pragma, c_parser_for_statement):
6833 Handle PRAGMA_IVDEP.
6834 (c_parser_statement_after_labels): Update call.
6835
f28aa681
MP
68362013-10-24 Marek Polacek <polacek@redhat.com>
6837
6838 * c-parser.c (c_parser_struct_declaration): Add a comment.
6839 (c_parser_declarator): Don't allow _Alignas here.
6840
0645c1a2
AM
68412013-10-17 Andrew MacLeod <amacleod@redhat.com>
6842
6843 * c-parser.c: Include omp-low.h.
6844 * c-typeck.c: Likewise.
6845
568a31f2
MP
68462013-10-17 Marek Polacek <polacek@redhat.com>
6847
6848 PR c/58267
6849 * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
6850 Document syntax of the array-declarator.
6851 (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
6852 are not permitted.
6853 (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
6854 (c_parser_struct_declaration): Likewise.
6855 (c_parser_declarator): Likewise.
6856 (c_parser_direct_declarator_inner): Likewise.
6857 (c_parser_parameter_declaration): Likewise.
6858 (c_parser_type_name): Likewise.
6859
acf0174b
JJ
68602013-10-11 Jakub Jelinek <jakub@redhat.com>
6861
6862 * c-lang.h (current_omp_declare_target_attribute): New extern
6863 decl.
6864 * c-parser.c: Include c-lang.h.
6865 (struct c_parser): Change tokens to c_token *.
6866 Add tokens_buf field. Change tokens_avail type to unsigned int.
6867 (c_parser_consume_token): If parser->tokens isn't
6868 &parser->tokens_buf[0], increment parser->tokens.
6869 (c_parser_consume_pragma): Likewise.
6870 (enum pragma_context): Add pragma_struct and pragma_param.
6871 (c_parser_external_declaration): Adjust
6872 c_parser_declaration_or_fndef caller.
6873 (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
6874 argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
6875 Adjust recursive call.
6876 (c_parser_struct_or_union_specifier): Use pragma_struct instead
6877 of pragma_external.
6878 (c_parser_parameter_declaration): Use pragma_param instead of
6879 pragma_external.
6880 (c_parser_compound_statement_nostart, c_parser_label,
6881 c_parser_for_statement): Adjust
6882 c_parser_declaration_or_fndef callers.
6883 (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
6884 it through to c_parser_conditional_expression.
6885 (c_parser_conditional_expression): Add omp_atomic_lhs argument,
6886 pass it through to c_parser_binary_expression. Adjust recursive
6887 call.
6888 (c_parser_binary_expression): Remove prec argument, add
6889 omp_atomic_lhs argument instead. Always start from PREC_NONE, if
6890 omp_atomic_lhs is non-NULL and one of the arguments of toplevel
6891 binop matches it, use build2 instead of parser_build_binary_op.
6892 (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
6893 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
6894 PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
6895 Handle pragma_struct and pragma_param the same as pragma_external.
6896 (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
6897 (c_parser_omp_variable_list): Parse array sections for
6898 OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
6899 (c_parser_omp_clause_collapse): Fully fold collapse expression.
6900 (c_parser_omp_clause_reduction): Handle user defined reductions.
6901 (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
6902 c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
6903 c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
6904 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
6905 c_parser_omp_clause_depend, c_parser_omp_clause_map,
6906 c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
6907 c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
6908 c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
6909 (c_parser_omp_all_clauses): Add finish_p argument. Don't call
6910 c_finish_omp_clauses if it is false. Handle new OpenMP 4.0 clauses.
6911 (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
6912 present to c_finish_omp_atomic. Handle OpenMP 4.0 atomic forms.
6913 (c_parser_omp_for_loop): Add CODE argument, pass it through
6914 to c_finish_omp_for. Change last argument to cclauses,
6915 and adjust uses to grab parallel clauses from the array of all
6916 the split clauses. Adjust c_parser_binary_expression,
6917 c_parser_declaration_or_fndef and c_finish_omp_for callers.
6918 (omp_split_clauses): New function.
6919 (c_parser_omp_simd): New function.
6920 (c_parser_omp_for): Add p_name, mask and cclauses arguments.
6921 Allow the function to be called also when parsing combined constructs,
6922 and call c_parser_omp_simd when parsing for simd.
6923 (c_parser_omp_sections_scope): If section-sequence doesn't start with
6924 #pragma omp section, require exactly one structured-block instead of
6925 sequence of statements.
6926 (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
6927 Allow the function to be called also when parsing combined constructs.
6928 (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
6929 Allow the function to be called also when parsing combined
6930 constructs.
6931 (c_parser_omp_taskgroup, c_parser_omp_cancel,
6932 c_parser_omp_cancellation_point, c_parser_omp_distribute,
6933 c_parser_omp_teams, c_parser_omp_target_data,
6934 c_parser_omp_target_update, c_parser_omp_target,
6935 c_parser_omp_declare_simd, c_finish_omp_declare_simd,
6936 c_parser_omp_declare_target, c_parser_omp_end_declare_target,
6937 c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
6938 (c_parser_omp_construct): Add p_name and mask vars. Handle
6939 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
6940 PRAGMA_OMP_TEAMS. Adjust c_parser_omp_for, c_parser_omp_parallel
6941 and c_parser_omp_sections callers.
6942 (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
6943 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
6944 OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
6945 (OMP_PARALLEL_CLAUSE_MASK): Likewise. Add OMP_CLAUSE_PROC_BIND.
6946 (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. Add
6947 OMP_CLAUSE_DEPEND.
6948 (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
6949 OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
6950 OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
6951 OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
6952 OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
6953 * c-typeck.c: Include tree-inline.h.
6954 (c_finish_omp_cancel, c_finish_omp_cancellation_point,
6955 handle_omp_array_sections_1, handle_omp_array_sections,
6956 c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
6957 (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
6958 user defined reductions.
6959 (c_tree_equal): New function.
6960 * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
6961 c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
6962 c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
6963 c_check_omp_declare_reduction_r): New prototypes.
6964 * c-decl.c (current_omp_declare_target_attribute): New variable.
6965 (c_decl_attributes): New function.
6966 (start_decl, start_function): Use it instead of decl_attributes.
6967 (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
6968 c_omp_reduction_decl, c_omp_reduction_lookup,
6969 c_check_omp_declare_reduction_r): New functions.
6970
0a6c2227
TT
69712013-09-25 Tom Tromey <tromey@redhat.com>
6972
6973 * Make-lang.in (c/gccspec.o): Remove.
6974 (CFLAGS-c/gccspec.o): New variable.
6975 (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
6976 (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
6977 (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
6978
f3bc55f0
TT
69792013-09-25 Tom Tromey <tromey@redhat.com>
6980
6981 * Make-lang.in (c/gccspec.o): Don't use subshell.
6982
a24d975c
MP
69832013-09-18 Marek Polacek <polacek@redhat.com>
6984
6985 PR sanitize/58443
6986 * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
6987 Remove unnecessary check.
6988
ce6923c5
MP
69892013-09-18 Marek Polacek <polacek@redhat.com>
6990
6991 PR sanitizer/58411
6992 * c-typeck.c (build_binary_op): Don't sanitize function if it has the
6993 no_sanitize_undefined attribute.
6994
a1e51df9
KT
69952013-09-13 Kai Tietz <ktietz@redhat.com>
6996
6997 PR target/57848
6998 * c-decl.c (c_builtin_function_ext_scope): Remove
6999 wrong assumption that it is never called on prexisting
7000 symbol.
7001
0af94e6f
JR
70022013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
7003
7004 * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
7005
20059c8b
GDR
70062013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
7007
7008 * c-objc-common.c (c_tree_printer): Tidy.
7009
de5a5fa1
MP
70102013-08-30 Marek Polacek <polacek@redhat.com>
7011
7012 * c-typeck.c (build_binary_op): Add division by zero and shift
7013 instrumentation.
7014
2531a1d9 70152013-08-26 Joern Rennecke <joern.rennecke@embecosm.com>
0fdd4508 7016 Joseph Myers <joseph@codesourcery.com>
2531a1d9 7017
6e2bcc98 7018 PR c/35649
2531a1d9
JR
7019 * c-typeck.c (c_common_type): Prefer double_type_node over
7020 other REAL_TYPE types with the same precision.
7021 (convert_arguments): Likewise.
7022
025311c4
GDR
70232013-08-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
7024
7025 * c-objc-common.c (c_tree_printer): Document the nature of the cast.
7026 (c_initialize_diagnostics): Call a destructor for the early printer.
7027
da6ca2b5
GDR
70282013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
7029
7030 * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
7031 printer initialization.
7032
318cda85 70332013-08-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
da6ca2b5 7034
318cda85
BI
7035 PR c/57490
7036 * c-array-notation.c (fix_conditional_array_notations_1): Added a
7037 check for truth values.
7038 (expand_array_notation_exprs): Added truth values case. Removed an
7039 unwanted else. Added for-loop to walk through subtrees in default
7040 case.
7041
b066401f
GDR
70422013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
7043
7044 * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
7045
fb48aadc
JM
70462013-07-23 Joseph Myers <joseph@codesourcery.com>
7047
7048 * c-parser.c (struct c_generic_association): Fix typo.
7049
433cc7b0
TT
70502013-07-23 Tom Tromey <tromey@redhat.com>
7051 Joseph Myers <joseph@codesourcery.com>
7052
7053 * c-parser.c (struct c_generic_association): New.
7054 (c_generic_association_d): New typedef.
7055 (c_parser_generic_selection): New function.
7056 (c_parser_postfix_expression): Handle RID_GENERIC.
7057
26d40c3d
JM
70582013-07-13 Jason Merrill <jason@redhat.com>
7059
7060 PR c++/57793
7061 * c-decl.c (finish_struct): Check for too-large class.
7062
ecdbd01a 70632013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
40d3d530
JR
7064
7065 PR c/57821
7066 * c-typeck.c (set_init_index): When folding, check for index overflow.
7067
1141ed3f
BI
70682013-06-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
7069
7070 * c-parser.c (c_parser_array_notation): Removed rejection of array
7071 notations in an array of function pointers.
7072
713b46fa
BI
70732013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
7074
7075 * c-array-notation.c (make_triplet_val_inv): New function.
7076 (create_cmp_incr): Likewise.
7077 (create_array_refs): Likewise.
7078 (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
7079 Also modularized common parts between functions and called the function.
7080 (build_array_notation_expr): Likewise.
7081 (fix_conditional_array_notations_1): Likewise.
7082 (fix_array_notation_expr): Likewise.
7083 (fix_array_notation_call_expr): Likewise.
7084
92f20202
MP
70852013-06-18 Marek Polacek <polacek@redhat.com>
7086
7087 PR c/57630
7088 * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
7089
73a23b06
BI
70902013-06-12 Balaji V. Iyer <balaji.v.iyer@intel.com>
7091
7092 * c-array-notation.c (build_array_notation_expr): Reject array notation
7093 mismatch between LHS and RHS even inside a call_expr. Also, removed
7094 a couple while statements that were dead code.
7095
00b8517d
BI
70962013-06-10 Balaji V. Iyer <balaji.v.iyer@intel.com>
7097
7098 * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
7099 excessive precision expressions in function parameters. Also removed
7100 couple unwanted while statements.
7101
1509bdda
BI
71022013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
7103
7104 * c-array-notation.c (expand_array_notation_exprs): Added
7105 ARRAY_NOTATION_REF case.
ab20d992 7106
d60f1706
BI
71072013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
7108
7109 * c-array-notation.c (length_mismatch_in_expr_p): Moved this
7110 function to c-family/array-notation-common.c.
7111 (is_cilkplus_reduce_builtin): Likewise.
7112 (find_rank): Likewise.
7113 (extract_array_notation_exprs): Likewise.
7114 (replace_array_notations): Likewise.
7115 (find_inv_trees): Likewise.
7116 (replace_inv_trees): Likewise.
7117 (contains_array_notation_expr): Likewise.
7118 (find_correct_array_notation_type): Likewise.
7119 (replace_invariant_exprs): Initialized additional_tcodes to NULL.
7120 (struct inv_list): Moved this to c-family/array-notation-common.c.
7121 * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
ab20d992 7122
6d6efbb3
BI
71232013-06-05 Balaji V. Iyer <balaji.v.iyer@intel.com>
7124
7125 * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
7126 reduction functions outside the for-loop. Added a check if the fundecl
7127 is non-NULL. Finally, removed an unwanted if-statement, and made the
7128 body unconditional.
7129
25c22937
BI
71302013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
7131
7132 * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
7133 condition of the if-statement matches the rank of else-block and then-
7134 block when array notations are used.
7135 * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
7136 expression after the entire function body is parsed.
7137 (c_parser_expr_no_commas): Delayed creating array notation expressions
7138 to the end of function parsing.
7139 * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
7140 whole if-statement instead of just the condition.
ab20d992 7141 (expand_array_notation_exprs): Added MODIFY_EXPR case.
25c22937 7142
edd25645
BI
71432013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
7144
7145 PR c/57474
7146 * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
7147 array to NULL_TREE if they are unused. Also added a check for the
7148 field to be NULL before its fields are used in future.
ab20d992 7149
065ce7f1
RO
71502013-05-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
7151
7152 PR bootstrap/57450
7153 * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
7154 (build_array_notation_expr): Likewise.
7155
36536d79
BI
71562013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
7157
7158 * c-typeck.c (build_array_ref): Added a check to see if array's
7159 index is greater than one. If true, then emit an error.
7160 (build_function_call_vec): Exclude error reporting and checking
7161 for builtin array-notation functions.
7162 (convert_arguments): Likewise.
7163 (c_finish_return): Added a check for array notations as a return
7164 expression. If true, then emit an error.
7165 (c_finish_loop): Added a check for array notations in a loop
7166 condition. If true then emit an error.
7167 (lvalue_p): Added a ARRAY_NOTATION_REF case.
7168 (build_binary_op): Added a check for array notation expr inside
7169 op1 and op0. If present, we call another function to find correct
7170 type.
7171 * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
7172 * c-parser.c (c_parser_compound_statement): Check if array
7173 notation code is used in tree, if so, then transform them into
7174 appropriate C code.
7175 (c_parser_expr_no_commas): Check if array notation is used in LHS
7176 or RHS, if so, then build array notation expression instead of
7177 regular modify.
7178 (c_parser_postfix_expression_after_primary): Added a check for
7179 colon(s) after square braces, if so then handle it like an array
7180 notation. Also, break up array notations in unary op if found.
7181 (c_parser_direct_declarator_inner): Added a check for array
7182 notation.
7183 (c_parser_compound_statement): Added a check for array notation in
7184 a stmt. If one is present, then expand array notation expr.
7185 (c_parser_if_statement): Likewise.
7186 (c_parser_switch_statement): Added a check for array notations in
7187 a switch statement's condition. If true, then output an error.
7188 (c_parser_while_statement): Similarly, but for a while.
7189 (c_parser_do_statement): Similarly, but for a do-while.
7190 (c_parser_for_statement): Similarly, but for a for-loop.
7191 (c_parser_unary_expression): Check if array notation is used in a
7192 pre-increment or pre-decrement expression. If true, then expand
7193 them.
7194 (c_parser_array_notation): New function.
7195 * c-array-notation.c: New file.
7196 * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
ab20d992 7197
cd192ccc
MS
71982013-05-23 Mike Stump <mikestump@comcast.net>
7199
7200 * c-typeck.c (convert_for_assignment): Handle references to memory
7201 spaces better.
7202
427b248d
JM
72032013-05-16 Jason Merrill <jason@redhat.com>
7204
7205 * Make-lang.in (cc1$(exeext)): Use link mutex.
7206
44d90fe1
PC
72072013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
7208
7209 * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
7210 to simply use OPT_Wpointer_arith.
7211 (build_unary_op): Likewise.
7212
4e7d7b3d
JJ
72132013-04-03 Jakub Jelinek <jakub@redhat.com>
7214
7215 PR c/19449
7216 * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
7217 argument. If set, or it temporarily for parsing of the first
7218 argument into force_folding_builtin_constant_p.
7219 (c_parser_postfix_expression): Adjust callers.
7220
839b422f
RB
72212013-03-21 Richard Biener <rguenther@suse.de>
7222
7223 * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
7224 instead of DECL_DEBUG_EXPR_IS_FROM. Guard properly.
7225
2ee028f1
MP
72262013-02-12 Marek Polacek <polacek@redhat.com>
7227
7228 PR c/44938
7229 * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
7230 origtypes to NULL.
7231
8824edff
JJ
72322013-01-24 Jakub Jelinek <jakub@redhat.com>
7233
7234 PR c/56078
7235 * c-typeck.c (set_nonincremental_init_from_string): If
7236 constructor_max_index is NULL, treat it as if tree_int_cst_lt
7237 returned false.
7238 (process_init_element): Likewise.
7239
eadd3d0d
JJ
72402012-12-20 Jakub Jelinek <jakub@redhat.com>
7241
7242 PR c++/55619
7243 * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
7244 argument, don't call default_function_array_conversion
7245 nor c_fully_fold here.
7246 (c_parser_asm_statement): Adjust callers.
7247 * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
7248 and outputs here, and call default_function_array_conversion
7249 on inputs that don't need to be addressable.
7250
f8a93a2e
JJ
72512012-12-18 Jakub Jelinek <jakub@redhat.com>
7252
7253 PR c/39464
7254 * c-typeck.c (convert_for_assignment): For -Wpointer-sign
7255 warning require that both c_common_unsigned_type as well as
7256 c_common_signed_type is the same for both mvl and mvr types.
7257
9771b263
DN
72582012-11-16 Diego Novillo <dnovillo@google.com>
7259
7260 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
7261
7262 * c-common.c: Use new vec API in vec.h.
7263 * c-common.h: Likewise.
7264 * c-gimplify.c: Likewise.
7265 * c-pragma.c: Likewise.
7266 * c-pretty-print.c: Likewise.
7267 * c-pretty-print.h: Likewise.
7268 * c-semantics.c: Likewise.
7269 * c-decl.c: Likewise.
7270 * c-parser.c: Likewise.
7271 * c-tree.h: Likewise.
7272 * c-typeck.c: Likewise.
7273
880661a4
JW
72742012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
7275
7276 PR c++/54930
7277 * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
7278
077d1abe
MLI
72792012-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
7280
7281 PR c/53066
7282 * c-decl.c (warn_if_shadowing): Do not warn if a variable
7283 shadows a function, unless the variable is a function or a
7284 pointer-to-function.
7285
3a785c97
JJ
72862012-10-12 Jakub Jelinek <jakub@redhat.com>
7287
7288 PR c/54381
7289 * c-parser.c (struct c_tree_loc_pair): Removed.
7290 (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
7291 add location_t * and tree * arguments, fill in array of 3
7292 sizeof_arg trees and corresponding locs.
7293 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
7294 c_parser_expr_list callers.
7295 (c_parser_postfix_expression_after_primary): Likewise. Pass
7296 array of 3 sizeof_arg trees and locs (corresponding to first
7297 3 arguments) to sizeof_pointer_memaccess_warning.
7298
703c8606
LC
72992012-10-09 Lawrence Crowl <crowl@google.com>
7300
7301 * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
7302 * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
7303 hash table.
7304
5d9de0d0
PC
73052012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
7306
7307 PR c++/54194
7308 * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
7309 call.
7310
a212e43f
MG
73112012-10-09 Marc Glisse <marc.glisse@inria.fr>
7312
7313 PR c++/54427
7314 * c-typeck.c: Include c-common.h.
7315 (enum stv_conv): Moved to c-common.h.
7316 (scalar_to_vector): Moved to c-common.c.
7317 (build_binary_op): Adapt to scalar_to_vector's new prototype.
7318 * Make-lang.in: c-typeck.c depends on c-common.h.
7319
3b78de56
AC
73202012-10-04 Arnaud Charlet <charlet@adacore.com>
7321
7322 * c-decl.c (c_write_global_declarations): Fix handling of
7323 -fdump-ada-spec*.
7324
78c60e3d
SS
73252012-09-30 Sharad Singhai <singhai@google.com>
7326
7327 * c-decl.c (c_write_global_declarations): Use a different method
7328 to determine if the dump has ben initialized.
7329
9f33203d
JM
73302012-09-14 Joseph Myers <joseph@codesourcery.com>
7331
7332 PR c/54552
7333 * c-typeck.c (c_cast_expr): When casting to a type requiring
7334 C_MAYBE_CONST_EXPR to be created, pass the inner expression to
7335 c_fully_fold first.
7336
a27d595d
JM
73372012-09-14 Joseph Myers <joseph@codesourcery.com>
7338
7339 PR c/54103
7340 * c-typeck.c (build_unary_op): Pass original argument of
7341 TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
7342 any C_MAYBE_CONST_EXPR, if it has integer operands.
7343 (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
7344 TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
7345 to c_objc_common_truthvalue_conversion, then remove any
7346 C_MAYBE_CONST_EXPR, if they have integer operands. Use
7347 c_objc_common_truthvalue_conversion not
7348 c_common_truthvalue_conversion.
7349 (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
7350 call note_integer_operands for arguments with integer operands
7351 that are not integer constants.
7352
9feb29df
JJ
73532012-09-13 Jakub Jelinek <jakub@redhat.com>
7354
7355 PR c/54559
7356 * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
7357 COMPLEX_TYPE with in_late_binary_op set temporarily to true.
7358
d409320c
JJ
73592012-08-31 Jakub Jelinek <jakub@redhat.com>
7360
7361 PR c/54428
7362 * c-convert.c (convert): Don't call fold_convert_loc if
7363 TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
7364 is a COMPLEX_EXPR. Remove TYPE_MAIN_VARIANT check from
7365 COMPLEX_TYPE -> COMPLEX_TYPE conversion.
7366
6265d07c
JJ
73672012-08-24 Jakub Jelinek <jakub@redhat.com>
7368
7369 PR c/54355
7370 * c-decl.c (c_parser_label): Pass true as nested and fix up comments
7371 for nested and empty_ok arguments in the call to
7372 c_parser_declaration_or_fndef.
7373
1a4049e7
JJ
73742012-08-17 Jakub Jelinek <jakub@redhat.com>
7375
7376 * c-tree.h (c_last_sizeof_arg): Declare.
7377 * c-parser.c (struct c_tree_loc_pair): New type.
7378 (c_parser_expr_list): Add sizeof_arg argument. Fill it in if
7379 non-NULL.
7380 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
7381 (c_parser_postfix_expression_after_primary): Likewise. Call
7382 sizeof_pointer_memaccess_warning if needed.
7383 (sizeof_ptr_memacc_comptypes): New function.
7384 * c-typeck.c (c_last_sizeof_arg): New global variable.
7385 (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
7386
0229aee9
UB
73872012-07-24 Uros Bizjak <ubizjak@gmail.com>
7388
7389 * c-lang.h (lang_decl): Add variable_size GTY option.
7390
7ee2468b
SB
73912012-07-16 Steven Bosscher <steven@gcc.gnu.org>
7392
7393 * c-decl.c: Include dumpfile.h instead of tree-dump.h.
7394 * Make-lang.in: Fix dependencies.
7395
d4a10d0a
SB
73962012-06-29 Steven Bosscher <steven@gcc.gnu.org>
7397
7398 * Make-lang.in: New file, rules migrated from gcc/Makefile.in
7399 and add language Makefile hooks.
7400 * config-lang.in: New file.
7401 * c-config-lang.in: Moved from gcc/config-lang.in to here, and
7402 add the required "normal" config-lang.in rules.
7403 * c-lang.h: Moved from gcc/ to here.
7404 * c-tree.h: Likewise.
7405 * c-objc-common.c: Likewise.
7406 * c-objc-common.h: Likewise.
7407 * c-typeck.c: Likewise.
7408 * c-convert.c: Likewise.
7409 * c-lang.c: Likewise.
7410 * c-aux-info.c: Likewise.
7411 * c-errors.c: Likewise.
7412 * gccspec.c: Likewise.
7413 * c-decl.c: Likewise. Include gt-c-c-decl.h, not gt-c-decl.h.
7414 * c-parser.c: Likewise. Include gt-c-c-parser.h, not gt-c-parser.h.
7415\f
8d9254fc 7416Copyright (C) 2012-2020 Free Software Foundation, Inc.
d4a10d0a
SB
7417
7418Copying and distribution of this file, with or without modification,
7419are permitted in any medium without royalty provided the copyright
7420notice and this notice are preserved.