]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/c/ChangeLog
c: Allow comparison of pointers to complete and incomplete types for C11 [PR95630]
[thirdparty/gcc.git] / gcc / c / ChangeLog
CommitLineData
7a97e2fc
GA
12020-11-21 Aaron Sawdey <acsawdey@linux.ibm.com>
2
3 * c-aux-info.c (gen_type): Support opaque types.
4
82e5048e
GA
52020-11-20 Martin Sebor <msebor@redhat.com>
6
7 PR middle-end/97879
8 * c-decl.c (start_function): Set ATTR_FLAG_INTERNAL in flags.
9
102020-11-20 Jakub Jelinek <jakub@redhat.com>
11
12 PR other/97911
13 * Make-lang.in (c.serial): Change from goal to a variable.
14 (.PHONY): Drop c.serial.
15
162020-11-20 Martin Uecker <muecker@gwdg.de>
17
18 * c-typeck.c (convert_lvalue_to_rvalue): Drop qualifiers.
19
d62586ee
GA
202020-11-19 Jakub Jelinek <jakub@redhat.com>
21
22 PR c/97860
23 * c-decl.c (get_parm_array_spec): Bail out of nelts is
24 error_operand_p.
25
25bb75f8
GA
262020-11-18 Jakub Jelinek <jakub@redhat.com>
27
28 * Make-lang.in (c.serial): New goal.
29 (.PHONY): Add c.serial c.prev.
30 (cc1$(exeext)): Call LINK_PROGRESS.
31
77f67db2
GA
322020-11-13 Vladimir N. Makarov <vmakarov@redhat.com>
33
34 * c-parser.c (c_parser_asm_statement): Parse outputs for asm
35 goto too.
36 * c-typeck.c (build_asm_expr): Remove an assert checking output
37 absence for asm goto.
38
392020-11-13 Jakub Jelinek <jakub@redhat.com>
40
41 * c-typeck.c (c_finish_omp_clauses): Don't clear
42 OMP_CLAUSE_REDUCTION_INSCAN unless reduction_seen == -2.
43
442020-11-13 Iain Sandoe <iain@sandoe.co.uk>
45
46 PR objc/77404
47 * c-parser.c (c_parser_objc_class_definition): Pass the
48 location of the class name to the interface declaration.
49
bb622641
GA
502020-11-10 Strager Neds <strager.nds@gmail.com>
51
52 * c-decl.c (merge_decls): Use new overload of
53 set_decl_section_name.
54
552020-11-10 Chung-Lin Tang <cltang@codesourcery.com>
56
57 * c-parser.c (c_parser_omp_target_data): Add use of
58 new c_omp_adjust_map_clauses function. Add GOMP_MAP_ATTACH_DETACH as
59 handled map clause kind.
60 (c_parser_omp_target_enter_data): Likewise.
61 (c_parser_omp_target_exit_data): Likewise.
62 (c_parser_omp_target): Likewise.
63 * c-typeck.c (handle_omp_array_sections): Adjust COMPONENT_REF case to
64 use GOMP_MAP_ATTACH_DETACH map kind for C_ORT_OMP region type.
65 (c_finish_omp_clauses): Adjust bitmap checks to allow struct decl and
66 same struct field access to co-exist on OpenMP construct.
67
2da7ee05
GA
682020-11-07 Martin Uecker <muecker@gwdg.de>
69
70 * c-parser.c (c_parser_label): Implement mixing of labels and code.
71 (c_parser_all_labels): Likewise.
72
44cab2d8
GA
732020-11-06 Iain Sandoe <iain@sandoe.co.uk>
74
75 * c-parser.c (c_parser_objc_at_property_declaration):
76 Improve parsing fidelity. Associate better location info
77 with @property attributes. Clean up the interface to
78 objc_add_property_declaration ().
79
802020-11-06 Nathan Sidwell <nathan@acm.org>
81
82 * c-decl.c (diagnose_mismatched_decls): Rename
83 DECL_IS_BUILTIN->DECL_IS_UNDECLARED_BUILTIN.
84 (warn_if_shadowing, implicitly_declare, names_builtin_p)
85 (collect_source_refs): Likewise.
86 * c-typeck.c (inform_declaration, inform_for_arg)
87 (convert_for_assignment): Likewise.
88
892020-11-06 Tobias Burnus <tobias@codesourcery.com>
90
91 * c-parser.c (c_parser_omp_atomic): Add openacc parameter and update
92 OpenACC matching.
93 (c_parser_omp_construct): Update call.
94
35c125cb
GA
952020-11-04 Jakub Jelinek <jakub@redhat.com>
96
97 PR c++/97670
98 * c-typeck.c (c_finish_omp_clauses): Look through array reductions to
99 find underlying decl to clear in the aligned_head bitmap.
100
1012020-11-04 Joseph Myers <joseph@codesourcery.com>
102
103 * c-decl.c (handle_nodiscard_attribute): New.
104 (std_attribute_table): Add nodiscard.
105 * c-parser.c (c_parser_std_attribute): Expect argument to
106 nodiscard attribute to be a string. Do not special-case ignoring
107 nodiscard.
108 * c-typeck.c (maybe_warn_nodiscard): New.
109 (build_compound_expr, emit_side_effect_warnings): Call
110 maybe_warn_nodiscard.
111 (c_process_expr_stmt, c_finish_stmt_expr): Also call
112 emit_side_effect_warnings if warn_unused_result.
113
4f0606fe
GA
1142020-10-29 Asher Gordon <AsDaGo@posteo.net>
115
116 * c-typeck.c (free_all_tagged_tu_seen_up_to): Replace free
117 with XDELETE.
118 (finish_init): Likewise.
119 (pop_init_level): Likewise.
120
e93aae4a
GA
1212020-10-28 Joseph Myers <joseph@codesourcery.com>
122
123 * c-decl.c (store_parm_decls_newstyle): Use pedwarn_c11 not
124 error_at for omitted parameter name.
125
1262020-10-28 Jakub Jelinek <jakub@redhat.com>
127
128 * c-parser.c (c_parser_omp_clause_name): Handle allocate.
129 (c_parser_omp_clause_allocate): New function.
130 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_ALLOCATE.
131 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
132 OMP_PARALLEL_CLAUSE_MASK, OMP_SINGLE_CLAUSE_MASK,
133 OMP_TASK_CLAUSE_MASK, OMP_TASKGROUP_CLAUSE_MASK,
134 OMP_DISTRIBUTE_CLAUSE_MASK, OMP_TEAMS_CLAUSE_MASK,
135 OMP_TARGET_CLAUSE_MASK, OMP_TASKLOOP_CLAUSE_MASK): Add
136 PRAGMA_OMP_CLAUSE_ALLOCATE.
137 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_ALLOCATE.
138
89bb01e7
GA
1392020-10-27 Joseph Myers <joseph@codesourcery.com>
140
141 * c-parser.c (c_parser_std_attribute_specifier): Allow duplicate
142 standard attributes.
143
efe71fcc
GA
1442020-10-23 Marek Polacek <polacek@redhat.com>
145
146 PR c++/91741
147 * c-parser.c (c_parser_binary_expression): Implement -Wsizeof-array-div.
148 (c_parser_postfix_expression): Set PAREN_SIZEOF_EXPR.
149 (c_parser_expr_list): Handle PAREN_SIZEOF_EXPR like SIZEOF_EXPR.
150 * c-tree.h (char_type_p): Declare.
151 * c-typeck.c (char_type_p): No longer static.
152
1532020-10-23 Martin Sebor <msebor@redhat.com>
154
155 PR middle-end/97552
156 * c-decl.c (get_parm_array_spec): Handle static VLA parameters.
157
2fe5b7d1
GA
1582020-09-19 Martin Sebor <msebor@redhat.com>
159
160 PR c/50584
161 * c-decl.c (lookup_last_decl): Define new function.
162 (c_decl_attributes): Call it.
163 (start_decl): Add argument and use it.
164 (finish_decl): Call build_attr_access_from_parms and decl_attributes.
165 (get_parm_array_spec): Define new function.
166 (push_parm_decl): Call get_parm_array_spec.
167 (start_function): Call warn_parm_array_mismatch. Build attribute
168 access and add it to current function.
169 * c-parser.c (c_parser_declaration_or_fndef): Diagnose mismatches
170 in forms of array parameters.
171 * c-tree.h (start_decl): Add argument.
172
1732020-09-19 Sandra Loosemore <sandra@codesourcery.com>
174
175 * c-decl.c (c_break_label, c_cont_label): Delete, and replace
176 with...
177 (in_statement): New.
178 (start_function): Adjust for above change.
179 (c_push_function_context, c_pop_function_context): Likewise.
180 * c-lang.h (struct language_function): Likewise.
181 * c-objc-common.h (LANG_HOOKS_BLOCK_MAY_FALLTHRU): Define.
182 * c-parser.c (objc_foreach_break_label, objc_foreach_continue_label):
183 New.
184 (c_parser_statement_after_labels): Adjust calls to c_finish_bc_stmt.
185 (c_parser_switch_statement): Adjust break/switch context handling
186 and calls to renamed functions.
187 (c_parser_while_statement): Adjust break/switch context handling and
188 build a WHILE_STMT.
189 (c_parser_do_statement): Ditto, with DO_STMT respectively.
190 (c_parser_for_statement): Ditto, with FOR_STMT respectively.
191 (c_parser_omp_for_loop): Adjust break/switch context handling.
192 * c-tree.h (c_break_label, c_cont_label): Delete.
193 (IN_SWITCH_STMT, IN_ITERATION_STMT): Define.
194 (IN_OMP_BLOCK, IN_OMP_FOR, IN_OBJC_FOREACH): Define.
195 (in_statement, switch_statement_break_seen_p): Declare.
196 (c_start_case, c_finish_case): Renamed to...
197 (c_start_switch, c_finish_switch).
198 (c_finish_bc_stmt): Adjust arguments.
199 * c-typeck.c (build_function_call_vec): Don't try to print
200 statements with %qE format.
201 (struct c_switch): Rename switch_expr field to switch_stmt.
202 Add break_stmt_seen_p field.
203 (c_start_case): Rename to c_start_switch. Build a SWITCH_STMT
204 instead of a SWITCH_EXPR. Update for changes to struct c_switch.
205 (do_case): Update for changes to struct c_switch.
206 (c_finish_case): Rename to c_finish_switch. Update for changes to
207 struct c_switch and change of representation from SWITCH_EXPR to
208 SWITCH_STMT.
209 (c_finish_loop): Delete.
210 (c_finish_bc_stmt): Update to reflect changes to break/continue
211 state representation. Build a BREAK_STMT or CONTINUE_STMT instead
212 of a GOTO_EXPR except for objc foreach loops.
213
e1a4a8a0
GA
2142020-09-01 Jakub Jelinek <jakub@redhat.com>
215
216 PR c++/96867
217 * c-typeck.c (handle_omp_array_sections_1): Test C_ARRAY_PARAMETER
218 only on PARM_DECLs.
219
8f7ea26a
GA
2202020-08-28 Martin Sebor <msebor@redhat.com>
221
222 PR c/96596
223 * c-decl.c (match_builtin_function_types): Avoid dealing with erroneous
224 argument type.
225
8b394f01
GA
2262020-08-27 Martin Liska <mliska@suse.cz>
227
228 * gimple-parser.c (c_parser_gimple_compound_statement): Set exact argument of a vector
229 growth function to true.
230
db0f6efe
GA
2312020-08-25 Tobias Burnus <tobias@codesourcery.com>
232
233 PR c/96678
234 * c-typeck.c (handle_omp_array_sections_1): Talk about
235 array function parameter in the error message.
236
5c265693
GA
2372020-08-18 Jakub Jelinek <jakub@redhat.com>
238
239 PR c/96571
240 * c-parser.c (c_parser_generic_selection): Change match_found from bool
241 to int, holding index of the match. Call mark_exp_read on the selector
242 expression and on expressions other than the selected one.
243
4967ca2f
GA
2442020-08-01 Richard Sandiford <richard.sandiford@arm.com>
245
246 PR c/96377
247 * c-typeck.c (process_init_element): Split test for whether to
248 recurse into a record, union or array into...
249 (initialize_elementwise_p): ...this new function. Don't recurse
250 into a vector type if the initialization value is also a vector.
251
48cc2e46
GA
2522020-07-31 Richard Biener <rguenther@suse.de>
253
254 PR debug/96383
255 * c-objc-common.h (LANG_HOOKS_FINALIZE_EARLY_DEBUG):
256 Define to c_common_finalize_early_debug.
257
3ea9abca
GA
2582020-07-22 Tobias Burnus <tobias@codesourcery.com>
259
260 * c-parser.c (c_parser_omp_clause_hint): Require nonnegative hint clause.
261 (c_parser_omp_critical): Permit hint(0) clause without named critical.
262 (c_parser_omp_construct): Don't assert if error_mark_node is returned.
263
30430061
GA
2642020-07-21 Sunil K Pandey <skpgkp2@gmail.com>
265
266 PR target/95237
267 * c-decl.c (finish_decl): Call target hook
268 lower_local_decl_alignment to lower local decl alignment.
269
3f8ca9cb
GA
2702020-07-09 Julian Brown <julian@codesourcery.com>
271 Thomas Schwinge <thomas@codesourcery.com>
272
273 PR middle-end/95270
274 * c-typeck.c (c_finish_omp_clauses): Set OMP_CLAUSE_SIZE (bias) to zero
275 for standalone attach/detach clauses.
276
a82c4c4c 2772020-07-08 Eric Botcazou <ebotcazou@adacore.com>
50873cc5
GA
278
279 * c-typeck.c (convert_for_assignment): If -Wscalar-storage-order is
280 set, warn for conversion between pointers that point to incompatible
281 scalar storage orders.
282
f60ee68d
GA
2832020-07-07 Kaipeng Zhou <zhoukaipeng3@huawei.com>
284
285 * c-parser.c (c_parser_statement_after_labels): Pass correct
286 parameters to c_parser_do_statement.
287
56638b9b
GA
2882020-06-16 Jakub Jelinek <jakub@redhat.com>
289
290 * c-parser.c (c_parser_expr_no_commas): Save, clear and restore
291 c_in_omp_for.
292 (c_parser_omp_for_loop): Set c_in_omp_for around some calls to avoid
293 premature c_fully_fold. Defer explicit c_fully_fold calls to after
294 c_finish_omp_for.
295 * c-tree.h (c_in_omp_for): Declare.
296 * c-typeck.c (c_in_omp_for): Define.
297 (build_modify_expr): Avoid c_fully_fold if c_in_omp_for.
298 (digest_init): Likewise.
299 (build_binary_op): Likewise.
300
3012020-06-16 Jakub Jelinek <jakub@redhat.com>
302
303 * c-parser.c (c_parser_omp_clause_schedule): Reject modifier separated
304 from kind by comma rather than colon.
305
1a59f3db
GA
3062020-06-05 Mark Wielaard <mark@klomp.org>
307
308 * c-decl.c (implicit_decl_warning): When warned and olddecl is
309 an undeclared builtin, then add a fixit header hint, if found.
310 (implicitly_declare): Add OPT_Wbuiltin_declaration_mismatch to
311 warning_at about implicit builtin declaration type mismatch.
312
9a5b7438
GA
3132020-06-03 Mark Wielaard <mark@klomp.org>
314
315 * c-parser.c (struct c_parser): Add seen_string_literal
316 bitfield.
317 (c_parser_consume_token): Reset seen_string_literal.
318 (c_parser_error_richloc): Add name_hint if seen_string_literal
319 and next token is a CPP_NAME and we have a missing header
320 suggestion for the name.
321 (c_parser_string_literal): Set seen_string_literal.
322
3232020-06-03 Mark Wielaard <mark@klomp.org>
324
325 * c-parser.c (c_parser_postfix_expression_after_primary): Add
326 scope with matching_parens after CPP_OPEN_PAREN.
327
3282020-06-03 Tobias Burnus <tobias@codesourcery.com>
329
330 * c-objc-common.h (LANG_HOOKS_OMP_PREDETERMINED_MAPPING): Redefine.
331
53ffb43a
GA
3322020-05-28 Nicolas Bértolo <nicolasbertolo@gmail.com>
333
334 * Make-lang.in: Remove extra slash.
335
8f66f175
ML
3362020-05-19 Martin Liska <mliska@suse.cz>
337
338 * c-parser.c: Fix typo.
339
49ddde69
JJ
3402020-05-14 Jakub Jelinek <jakub@redhat.com>
341
342 * c-parser.c (c_parser_omp_target): Set cfun->has_omp_target.
343
eb72dc66
RB
3442020-05-07 Richard Biener <rguenther@suse.de>
345
346 PR middle-end/94703
347 * gimple-parser.c (c_parser_parse_ssa_name): Do not set
348 DECL_GIMPLE_REG_P.
349
bf915591
JJ
3502020-04-30 Jakub Jelinek <jakub@redhat.com>
351
352 PR c/94842
353 * c-decl.c (set_labels_context_r): In addition to context-less
354 LABEL_DECLs adjust also LABEL_DECLs with context equal to
355 parent function if any.
356 (store_parm_decls): Adjust comment.
357
e1113ffb
JJ
3582020-04-19 Jakub Jelinek <jakub@redhat.com>
359
360 PR objc/94637
361 * c-parser.c (c_parser_objc_selector_arg): Handle CPP_SCOPE like
362 two CPP_COLON tokens.
363
2e389749
JJ
3642020-04-17 Jakub Jelinek <jakub@redhat.com>
365
366 PR other/94629
367 * c-parser.c (c_parser_oacc_routine): Remove redundant assignment
368 to data.clauses.
369
2dc9294c
JJ
3702020-04-15 Jakub Jelinek <jakub@redhat.com>
371
372 PR c/94593
373 * c-parser.c (c_parser_pragma) <case PRAGMA_OMP_REQUIRES>: Reject
374 requires directive when not at file scope.
375
13e41d8b
TB
3762020-04-08 Tobias Burnus <tobias@codesourcery.com>
377
378 PR middle-end/94120
379 * c-decl.c (c_check_in_current_scope): New function.
380 * c-tree.h (c_check_in_current_scope): Declare it.
381 * c-parser.c (c_parser_oacc_declare): Add check that variables
382 are declared in the same scope as the directive. Fix handling
383 of namespace vars.
384
4df50a05
JJ
3852020-04-07 Jakub Jelinek <jakub@redhat.com>
386
387 PR c++/94512
388 * c-parser.c (c_parser_omp_parallel): Set OMP_PARALLEL_COMBINED
389 if c_parser_omp_master succeeded.
390
5db9e893
JJ
3912020-03-23 Jakub Jelinek <jakub@redhat.com>
392
393 PR gcov-profile/94029
394 PR c/94239
395 * c-parser.c (c_parser_declaration_or_fndef): Initialize endloc to
396 the function_start_locus location. Don't do that afterwards for the
397 __GIMPLE body parsing.
398
9def91e9
JJ
3992020-03-19 Jakub Jelinek <jakub@redhat.com>
400
401 PR gcov-profile/94029
402 * c-tree.h (finish_function): Add location_t argument defaulted to
403 input_location.
404 * c-parser.c (c_parser_compound_statement): Add endlocp argument and
405 set it to the locus of closing } if non-NULL.
406 (c_parser_compound_statement_nostart): Return locus of closing }.
407 (c_parser_parse_rtl_body): Likewise.
408 (c_parser_declaration_or_fndef): Propagate locus of closing } to
409 finish_function.
410 * c-decl.c (finish_function): Add end_loc argument, use it instead of
411 input_location to set function_end_locus.
412
046c5890
JJ
4132020-03-17 Jakub Jelinek <jakub@redhat.com>
414
415 PR c/94172
416 * c-tree.h (C_TYPE_INCOMPLETE_VARS): Define to TYPE_LANG_SLOT_1
417 instead of TYPE_VFIELD, and support it on {RECORD,UNION,ENUMERAL}_TYPE.
418 (TYPE_ACTUAL_ARG_TYPES): Check that it is only used on FUNCTION_TYPEs.
419 * c-decl.c (pushdecl): Push C_TYPE_INCOMPLETE_VARS also to
420 ENUMERAL_TYPEs.
421 (finish_incomplete_vars): New function, moved from finish_struct. Use
422 relayout_decl instead of layout_decl.
423 (finish_struct): Remove obsolete comment about C_TYPE_INCOMPLETE_VARS
424 being TYPE_VFIELD. Use finish_incomplete_vars.
425 (finish_enum): Clear C_TYPE_INCOMPLETE_VARS. Call
426 finish_incomplete_vars.
427 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
428 also on ENUMERAL_TYPEs.
429
c015ff8c
JJ
4302020-03-16 Jakub Jelinek <jakub@redhat.com>
431
432 PR c/94179
433 * c-fold.c (c_fully_fold_internal): Handle MEM_REF.
434
f2e9fe5f
MS
4352020-03-13 Martin Sebor <msebor@redhat.com>
436
437 PR c/94040
438 * c-decl.c (builtin_structptr_type_count): New constant.
439 (match_builtin_function_types): Reject decls that are incompatible
440 in types pointed to by pointers.
441 (diagnose_mismatched_decls): Adjust comments.
442
c9d70946
JM
4432020-03-05 Joseph Myers <joseph@codesourcery.com>
444
445 PR c/93577
446 * c-typeck.c (pop_init_level): Do not diagnose initializers as
447 empty when initialized type is error_mark_node.
448 (set_designator, process_init_element): Ignore initializers for
449 elements of a variable-size type or of error_mark_node.
450
726e292d
MS
4512020-03-01 Martin Sebor <msebor@redhat.com>
452
453 PR middle-end/93926
454 * c-decl.c (types_close_enough_to_match): New function.
455 (match_builtin_function_types):
456 (diagnose_mismatched_decls): Add missing inform call to a warning.
457
a499c2f8
MS
4582020-03-01 Martin Sebor <msebor@redhat.com>
459
460 PR c/93812
461 * c-typeck.c (build_functype_attribute_variant): New function.
462 (composite_type): Call it.
463
9c3da8cc
JJ
4642020-02-25 Jakub Jelinek <jakub@redhat.com>
465
466 PR other/93912
467 * gimple-parser.c (c_parser_gimple_parse_bb_spec_edge_probability):
468 Rename last argument from probablity to probability.
469
bacdd5e9
JJ
4702020-02-13 Jakub Jelinek <jakub@redhat.com>
471
472 PR c/93576
473 * c-decl.c (grokdeclarator): If this_size_varies, only push size into
474 *expr if it has side effects.
475
f9eb0973
JL
4762020-01-30 Jeff Law <law@redhat.com>
477
478 PR c/88660
479 * c-parser.c (c_parser_switch_statement): Make sure to request
480 marking the switch expr as used.
481
ac68e287
JM
4822020-01-22 Joseph Myers <joseph@codesourcery.com>
483
484 PR c/93348
485 * c-typeck.c (build_c_cast): Call remove_c_maybe_const_expr on
486 argument with integer operands.
487
852f0ae8
KK
4882020-01-16 Kerem Kat <keremkat@gmail.com>
489
490 PR c/92833
491 * c-parser.c (c_parser_consume_token): Fix peeked token stack pop
492 to support 4 available tokens.
493
e2346a33
JM
4942020-01-15 Joseph Myers <joseph@codesourcery.com>
495
496 PR c/93072
497 * c-decl.c (pushdecl): Use TREE_PUBLIC, not DECL_EXTERNAL, to
498 determine whether to set DECL_CONTEXT.
499
3d77686d
JM
5002020-01-13 Joseph Myers <joseph@codesourcery.com>
501
502 PR c/93241
503 * c-typeck.c (build_c_cast): Check for expressions with integer
504 operands that can occur in an unevaluated part of an integer
505 constant expression and call note_integer_operands as needed.
506
f74c4b2c
RB
5072019-01-08 Richard Biener <rguenther@suse.de>
508
509 PR middle-end/93199
510 * gimple-parser.c (c_parser_parse_gimple_body): Remove __PHI IFN
511 permanently.
512
8d9254fc
JJ
5132020-01-01 Jakub Jelinek <jakub@redhat.com>
514
515 Update copyright years.
516
39292e25
EB
5172019-12-20 Eric Botcazou <ebotcazou@adacore.com>
518
519 * c-decl.c (collect_source_ref_cb): Delete.
520 (for_each_global_decl): Rename into...
521 (collect_source_refs): ...this. Call collect_source_ref directly.
522 (c_parse_final_cleanups): Always call collect_source_ref on the main
523 input filename.
524
519d7496
JB
5252019-12-19 Julian Brown <julian@codesourcery.com>
526 Cesar Philippidis <cesar@codesourcery.com>
527
528 * c-parser.c (c_parser_omp_clause_name): Add parsing of attach and
529 detach clauses.
530 (c_parser_omp_variable_list): Add ALLOW_DEREF optional parameter.
531 Allow deref (->) in variable lists if true.
532 (c_parser_omp_var_list_parens): Add ALLOW_DEREF optional parameter.
533 Pass to c_parser_omp_variable_list.
534 (c_parser_oacc_data_clause): Support attach and detach clauses. Update
535 call to c_parser_omp_variable_list.
536 (c_parser_oacc_all_clauses): Support attach and detach clauses.
537 (OACC_DATA_CLAUSE_MASK, OACC_ENTER_DATA_CLAUSE_MASK,
538 OACC_KERNELS_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK,
539 OACC_SERIAL_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_ATTACH.
540 (OACC_EXIT_DATA_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_DETACH.
541 * c-typeck.c (handle_omp_array_sections_1): Reject subarrays for attach
542 and detach. Support deref.
543 (handle_omp_array_sections): Use GOMP_MAP_ATTACH_DETACH instead of
544 GOMP_MAP_ALWAYS_POINTER for OpenACC.
545 (c_oacc_check_attachments): New function.
546 (c_finish_omp_clauses): Check attach/detach arguments for being
547 pointers using above. Support deref.
548
a6163563
JB
5492019-12-19 Julian Brown <julian@codesourcery.com>
550 Maciej W. Rozycki <macro@codesourcery.com>
551 Tobias Burnus <tobias@codesourcery.com>
552 Thomas Schwinge <thomas@codesourcery.com>
553
554 * c-parser.c (c_parser_omp_clause_name): Support no_create.
555 (c_parser_oacc_data_clause): Likewise.
556 (c_parser_oacc_all_clauses): Likewise.
557 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
558 (OACC_PARALLEL_CLAUSE_MASK, OACC_SERIAL_CLAUSE_MASK): Add
559 PRAGMA_OACC_CLAUSE_NO_CREATE.
560 * c-typeck.c (handle_omp_array_sections): Support
561 GOMP_MAP_NO_ALLOC.
562
d68f5d45
DM
5632019-12-09 David Malcolm <dmalcolm@redhat.com>
564
565 * c-objc-common.c (range_label_for_type_mismatch::get_text):
566 Replace label_text ctor calls.
567
4691bf46
JM
5682019-12-04 Joseph Myers <joseph@codesourcery.com>
569
570 PR c/36941
571 PR c/88827
572 * c-typeck.c (convert_lvalue_to_rvalue): Call
573 require_complete_type for arguments not of void types.
574 (build_indirect_ref): Do not diagnose dereferencing pointers to
575 incomplete types.
576 * c-tree.h (C_TYPE_ERROR_REPORTED): Remove.
577
85d11957
JM
5782019-12-03 Joseph Myers <joseph@codesourcery.com>
579
580 PR c/88704
581 * c-decl.c (store_parm_decls_oldstyle): Diagnose use of [*] in
582 old-style parameter definitions.
583
4569f8b3
SL
5842019-12-01 Sandra Loosemore <sandra@codesourcery.com>
585
586 PR target/92499
587
588 * c-decl.c (flexible_array_type_p): Move to common code.
589
65ef05d0
RS
5902019-11-30 Richard Sandiford <richard.sandiford@arm.com>
591
592 * c-decl.c (start_decl): Allow initialization of variables whose
593 size is a POLY_INT_CST.
594 (finish_decl): Use verify_type_context to check whether the target
595 allows variables with a particular type to have static or thread-local
596 storage duration. Don't raise a second error if such variables do
597 not have a constant size.
598 (grokdeclarator): Use verify_type_context to check whether the
599 target allows fields or array elements to have a particular type.
600 * c-typeck.c (pointer_diff): Use verify_type_context to test whether
601 the target allows pointer difference for the types involved.
602 (build_unary_op): Likewise for pointer increment and decrement.
603
34b43828
JM
6042019-11-29 Joseph Myers <joseph@codesourcery.com>
605
606 * c-parser.c (struct c_parser): Add members raw_tokens and
607 raw_tokens_used.
608 (c_lex_one_token): Add argument raw. Handle lexing raw tokens and
609 using previously-lexed raw tokens.
610 (c_parser_peek_nth_token_raw)
611 (c_parser_check_balanced_raw_token_sequence): New functions.
612 (c_parser_nth_token_starts_std_attributes): Use
613 c_parser_check_balanced_raw_token_sequence for Objective-C.
614
5b8d9367
JM
6152019-11-25 Joseph Myers <joseph@codesourcery.com>
616
617 PR c/91985
618 * c-decl.c (finish_declspecs): Use int instead of decimal
619 floating-point types if decimal floating-point not supported.
620
1723e1be
JM
6212019-11-25 Joseph Myers <joseph@codesourcery.com>
622
623 * c-tree.h (struct c_declarator): Use a structure for id member.
624 * c-decl.c (grokdeclarator): Extract attributes from cdk_id
625 declarators at the start, not when handling individual declarators
626 later. Use u.id.id instead of u.id.
627 (grokfield): Use u.id.id instead of u.id.
628 (build_id_declarator): Set u.id.id and u.id.attrs.
629 (finish_declspecs): Handle postfix attributes in case of typedef
630 name or typeof used.
631 * c-parser.c (c_parser_direct_declarator)
632 (c_parser_direct_declarator_inner): Place declarator for
633 attributes inside that for function or array, not outside. Set
634 u.id.attrs for identifiers.
635 (c_parser_parameter_declaration): Use u.id.id instead of u.id.
636 * gimple-parser.c (c_parser_gimple_declaration): Use u.id.id
637 instead of u.id.
638
bdaf8be1
JJ
6392019-11-22 Jakub Jelinek <jakub@redhat.com>
640
641 PR c/90677
642 * c-decl.c (identifier_global_tag): Define.
643
3e00ba47
RB
6442019-11-20 Richard Biener <rguenther@suse.de>
645
646 PR c/92088
647 * c-decl.c (grokdeclarator): Prevent inlining of nested
648 function with VLA arguments.
649
8c5b727a
JM
6502019-11-20 Joseph Myers <joseph@codesourcery.com>
651
652 * c-decl.c (c_warn_type_attributes): New function.
653 (groktypename, grokdeclarator, finish_declspecs): Call
654 c_warn_type_attributes before applying attributes to types.
655 * c-tree.h (c_warn_type_attributes): Declare.
656
192961ff
JM
6572019-11-19 Joseph Myers <joseph@codesourcery.com>
658
659 * c-decl.c (c_warn_unused_attributes): Use pedwarn not warning for
660 standard attributes.
661 * c-parser.c (c_parser_std_attribute): Take argument for_tm. Use
662 pedwarn for unknown standard attributes and return error_mark_node
663 for them.
664
20a38017
MM
6652019-11-18 Matthew Malcomson <matthew.malcomson@arm.com>
666
667 * c-parser.c (c_parser_parse_rtl_body): Always call
668 run_rtl_passes, even if startwith pass is not provided.
669
d5fbe5e0
JM
6702019-11-15 Joseph Myers <joseph@codesourcery.com>
671
672 * c-parser.c (c_parser_std_attribute_specifier): Diagnose
673 duplicate standard attributes.
674
97cc1187
JM
6752019-11-15 Joseph Myers <joseph@codesourcery.com>
676
677 * c-decl.c (std_attribute_table): Add maybe_unused.
678
f8aea5e3
JM
6792019-11-15 Joseph Myers <joseph@codesourcery.com>
680
681 * c-decl.c (std_attribute_table): Add fallthrough.
682 * c-parser.c (c_parser_declaration_or_fndef): Diagnose fallthrough
683 attribute at top level.
684
2cc94aa8
JM
6852019-11-15 Joseph Myers <joseph@codesourcery.com>
686
687 * c-decl.c (std_attribute_table): New.
688 (c_init_decl_processing): Register attributes from
689 std_attribute_table.
690 * c-parser.c (c_parser_attribute_arguments): Add arguments
691 require_string and allow_empty_args. All callers changed.
692 (c_parser_std_attribute): Set require_string argument for
693 "deprecated" attribute.
694
7c5890cc
JM
6952019-11-14 Joseph Myers <joseph@codesourcery.com>
696
697 * c-parser.c (c_parser_postfix_expression)
698 (c_parser_check_literal_zero): Handle CPP_UTF8CHAR.
699 * gimple-parser.c (c_parser_gimple_postfix_expression): Likewise.
700
e8738f4e
RS
7012019-11-14 Richard Sandiford <richard.sandiford@arm.com>
702
703 * c-typeck.c (build_conditional_expr): Use truth_type_for instead
704 of build_same_sized_truth_vector_type.
705 (build_vec_cmp): Likewise.
706
b2417b59
JJ
7072019-11-14 Jakub Jelinek <jakub@redhat.com>
708
bedb7f04
JJ
709 * c-parser.c (c_parser_omp_context_selector): Don't require score
710 argument to fit into shwi, just to be INTEGER_CST. Diagnose
711 negative score.
712
b2417b59
JJ
713 * c-parser.c (c_parser_omp_context_selector): Rename
714 CTX_PROPERTY_IDLIST to CTX_PROPERTY_NAME_LIST, add CTX_PROPERTY_ID.
715 Use CTX_PROPERTY_ID for atomic_default_mem_order, only allow a single
716 identifier in that. For CTX_PROPERTY_NAME_LIST, allow identifiers
717 and string literals.
718
4e03c3a7
JM
7192019-11-14 Joseph Myers <joseph@codesourcery.com>
720
721 * c-tree.h (enum c_typespec_kind): Add ctsk_tagref_attrs and
722 ctsk_tagfirstref_attrs.
723 (struct c_declspecs): Update description of attrs. Add
724 postfix_attrs and non_std_attrs_seen_p. Increase size of
725 typespec_kind bit-field.
726 (c_warn_unused_attributes): New declaration.
727 (parser_xref_tag): Update prototype.
728 * c-decl.c (c_warn_unused_attributes): New function.
729 (shadow_tag_warned): Handle ctsk_tagfirstref_attrs and
730 ctsk_tagref_attrs. Handle attribute declarations.
731 (check_compound_literal_type): Handle ctsk_tagfirstref_attrs.
732 (grokdeclarator): Handle standard attributes.
733 (parser_xref_tag): Add arguments have_std_attrs and attrs. Apply
734 attributes to incomplete type reference.
735 (xref_tag): Update call to parser_xref_tag.
736 (declspecs_add_addrspace, declspecs_add_type)
737 (declspecs_add_scspec, declspecs_add_attrs): Set
738 non_std_attrs_seen_p.
739 (finish_declspecs): Apply postfix standard attributes to type.
740 * c-parser.c (c_token_starts_declspecs)
741 (c_token_starts_declaration, c_parser_next_token_starts_declspecs)
742 (c_parser_next_tokens_start_declaration): Update comments.
743 (c_parser_consume_token, c_parser_consume_pragma): Handle moving
744 parser->tokens[2] to parser->tokens[1].
745 (c_parser_nth_token_starts_std_attributes)
746 (c_parser_std_attribute_specifier_sequence): New functions.
747 (c_parser_declaration_or_fndef): Add arguments have_attrs and
748 attrs. All callers changed. Handle standard attributes.
749 (c_parser_parms_declarator, c_parser_parms_list_declarator)
750 (c_parser_parameter_declaration): Add argument have_gnu_attrs.
751 All callers changed.
752 (c_parser_declspecs): Add arguments start_std_attr_ok and
753 end_std_attr_ok. All callers changed. Handle standard
754 attributes.
755 (c_parser_enum_specifier, c_parser_struct_or_union_specifier)
756 (c_parser_direct_declarator, c_parser_direct_declarator_inner)
757 (c_parser_compound_statement_nostart, c_parser_all_labels)
758 (c_parser_label, c_parser_statement, c_parser_for_statement):
759 Handle standard attributes.
760 * c-parser.h (c_parser_declspecs): Update prototype.
761 * gimple-parser.c (c_parser_gimple_declaration): Update call to
762 c_parser_declspecs.
763
0c29cac4
ML
7642019-11-12 Martin Liska <mliska@suse.cz>
765
766 * gimple-parser.c: Do not include params.h.
767
028d4092
ML
7682019-11-12 Martin Liska <mliska@suse.cz>
769
770 * gimple-parser.c (c_parser_parse_gimple_body): Replace old parameter syntax
771 with the new one, include opts.h if needed. Use SET_OPTION_IF_UNSET
772 macro.
773
62aee289
MR
7742019-11-12 Maciej W. Rozycki <macro@codesourcery.com>
775 Frederik Harwath <frederik@codesourcery.com>
776
777 gcc/c/
778 * c-parser.c (OACC_SERIAL_CLAUSE_MASK): New macro.
779 (c_parser_oacc_kernels_parallel): Rename function to...
780 (c_parser_oacc_compute): ... this. Handle PRAGMA_OACC_SERIAL.
781 (c_parser_omp_construct): Update accordingly.
782
783
7cec9588
JJ
7842019-11-11 Jakub Jelinek <jakub@redhat.com>
785
786 * c-parser.c (c_parser_translation_unit): Diagnose declare target
787 without corresponding end declare target.
788
f486280c
RS
7892019-11-08 Richard Sandiford <richard.sandiford@arm.com>
790
791 * c-convert.c (convert): Only handle vector conversions if one of
792 the types satisfies gnu_vector_type_p or if -flax-vector-conversions
793 allows it.
794 * c-typeck.c (build_array_ref): Only allow vector indexing if the
795 vectors satisfy gnu_vector_type_p.
796 (build_unary_op): Only allow unary operators to be applied to
797 vectors if they satisfy gnu_vector_type_p.
798 (digest_init): Only allow by-element initialization of vectors
799 if they satisfy gnu_vector_type_p.
800 (really_start_incremental_init): Likewise.
801 (push_init_level): Likewise.
802 (pop_init_level): Likewise.
803 (process_init_element): Likewise.
804 (build_binary_op): Only allow binary operators to be applied to
805 vectors if they satisfy gnu_vector_type_p.
806
017c6491
JM
8072019-11-08 Joseph Myers <joseph@codesourcery.com>
808
809 * c-decl.c (grokparms): Convert () in a function definition to
810 (void) for C2x.
811 (store_parm_decls_oldstyle): Pedwarn for C2x.
812 (store_parm_decls): Update comment about () not generating a
813 prototype.
814
c01bd174
JM
8152019-11-07 Joseph Myers <joseph@codesourcery.com>
816
817 * c-parser.c (c_parser_attribute_arguments): New function.
818 Factored out of c_parser_gnu_attribute.
819 (c_parser_gnu_attribute): Use c_parser_attribute_arguments.
820 (c_parser_balanced_token_sequence, c_parser_std_attribute)
821 (c_parser_std_attribute_specifier): New functions.
822 (c_parser_transaction_attributes): Use
823 c_parser_std_attribute_specifier.
824
471c5330
JM
8252019-11-07 Joseph Myers <joseph@codesourcery.com>
826
827 * c-parser.c (c_parser): Remove lex_untranslated_string. Add
828 lex_joined_string and translate_strings_p.
829 (c_lex_one_token): Pass 0 or C_LEX_STRING_NO_JOIN to
830 c_lex_with_flags.
831 (c_parser_string_literal): New function.
832 (c_parser_static_assert_declaration_no_semi): Use
833 c_parser_string_literal. Do not set lex_untranslated_string.
834 (c_parser_asm_string_literal): Use c_parser_string_literal.
835 (c_parser_simple_asm_expr): Do not set lex_untranslated_string.
836 (c_parser_gnu_attributes): Set and restore translate_strings_p
837 instead of lex_untranslated_string.
838 (c_parser_asm_statement): Do not set lex_untranslated_string.
839 (c_parser_asm_operands): Likewise.
840 (c_parser_has_attribute_expression): Set and restore
841 translate_strings_p instead of lex_untranslated_string.
842 (c_parser_postfix_expression): Use c_parser_string_literal.
843 (pragma_lex): Likewise.
844 (c_parser_pragma_pch_preprocess): Set lex_joined_string.
845 (c_parse_file): Set translate_strings_p.
846 * gimple-parser.c (c_parser_gimple_postfix_expression)
847 (c_parser_gimple_or_rtl_pass_list): Use c_parser_string_literal.
848 * c-parser.c (c_parser_string_literal): Declare function.
849
d0c464d2
JJ
8502019-11-02 Jakub Jelinek <jakub@redhat.com>
851
852 * c-parser.c (c_finish_omp_declare_variant): Use
853 omp_get_context_selector instead of c_omp_get_context_selector.
854
ac2cfa6c
RS
8552019-10-29 Richard Sandiford <richard.sandiford@arm.com>
856
857 * c-tree.h (c_simulate_enum_decl): Declare.
858 * c-decl.c (c_simulate_enum_decl): New function.
859 * c-objc-common.h (LANG_HOOKS_SIMULATE_ENUM_DECL): Define to the above.
860
74078538
RS
8612019-10-29 Richard Sandiford <richard.sandiford@arm.com>
862
863 * c-tree.h (c_simulate_builtin_function_decl): Declare.
864 * c-decl.c (c_simulate_builtin_function_decl): New function.
865 * c-objc-common.h (LANG_HOOKS_SIMULATE_BUILTIN_FUNCTION_DECL): Define
866 to the above.
867
ad1539d5
MS
8682019-10-28 Martin Sebor <msebor@redhat.com>
869
870 PR c/66970
871 * c-decl.c (names_builtin_p): Define a new function.
872
cb73e4e7
RB
8732019-10-28 Richard Biener <rguenther@suse.de>
874
875 PR c/92249
876 * gimple-parser.c (c_parser_parse_gimple_body): Make
877 current_bb the entry block initially to easier recover
878 from errors.
879 (c_parser_gimple_compound_statement): Adjust.
880
135df52c
JJ
8812019-10-24 Jakub Jelinek <jakub@redhat.com>
882
883 * c-parser.c (c_finish_omp_declare_variant): Use
884 omp_context_selector_matches instead of
885 c_omp_context_selector_matches.
886 * c-decl.c (c_decl_attributes): Add "omp declare target block"
887 attribute in between declare target and end declare target
888 pragmas.
889
783bfe5e
JM
8902019-10-15 Joseph Myers <joseph@codesourcery.com>
891
892 * c-parser.c (c_parser_attribute_any_word): Rename to
893 c_parser_gnu_attribute_any_word. All callers changed.
894 (c_parser_attribute): Rename to c_parser_gnu_attribute. All
895 callers changed.
896 (c_parser_attributes): Rename to c_parser_gnu_attributes. All
897 callers changed.
898 (c_parser_declaration_or_fndef, c_parser_declspecs)
899 (c_parser_enum_specifier, c_parser_struct_or_union_specifier)
900 (c_parser_struct_declaration, c_parser_declarator)
901 (c_parser_gnu_attribute, c_parser_compound_statement)
902 (c_parser_label, c_parser_statement, c_parser_objc_method_decl)
903 (c_parser_transaction_attributes): Add "gnu-" prefix to names of
904 attribute-related syntax productions.
905
56898e43
RS
9062019-10-14 Richard Sandiford <richard.sandiford@arm.com>
907
908 * c-objc-common.c (useful_aka_type_p): Replace with...
909 (get_aka_type): ...this new function. Given the original type,
910 decide which aka type to print (if any). Only look through typedefs
911 if user_facing_original_type_p.
912 (print_type): Update accordingly.
913
b9424661
JJ
9142019-10-14 Jakub Jelinek <jakub@redhat.com>
915
916 * c-parser.c (c_parser_omp_all_clauses): Change bool NESTED_P argument
917 into int NESTED, if it is 2, diagnose missing commas in between
918 clauses.
919 (c_parser_omp_context_selector): Pass 2 as last argument to
920 c_parser_omp_all_clauses.
921
20de9568
JJ
9222019-10-12 Jakub Jelinek <jakub@redhat.com>
923
924 * c-parser.c (c_parser_omp_context_selector): Improve error recovery.
925 For simd properties, put them directly into TREE_VALUE.
926 (c_finish_omp_declare_variant): Call c_omp_mark_declare_variant.
927 If c_omp_context_selector_matches is 0, don't add attribute, otherwise
928 add "omp declare variant base" attribute rather than
929 "omp declare variant".
930
fe2bc27c
JM
9312019-10-11 Joseph Myers <joseph@codesourcery.com>
932
933 * c-decl.c (declspecs_add_type): Use pedwarn_c11 for DFP types.
934
94e7f906
JJ
9352019-10-10 Jakub Jelinek <jakub@redhat.com>
936
937 * c-parser.c (c_parser_omp_all_clauses): Add NESTED_P argument, if
938 true, terminate processing on closing paren and don't skip to end of
939 pragma line.
940 (c_parser_omp_declare_simd): Handle also declare variant.
941 (omp_construct_selectors, omp_device_selectors,
942 omp_implementation_selectors, omp_user_selectors): New variables.
943 (c_parser_omp_context_selector,
944 c_parser_omp_context_selector_specification,
945 c_finish_omp_declare_variant): New functions.
946 (c_finish_omp_declare_simd): Handle both declare simd and
947 declare variant.
948 (c_parser_omp_declare): Handle declare variant.
949
93313b94
JM
9502019-10-02 Joseph Myers <joseph@codesourcery.com>
951
952 * c-parser.c (c_parser_asm_statement): Handle CPP_SCOPE like two
953 CPP_COLON tokens.
954
55879815
RS
9552019-10-01 Richard Sandiford <richard.sandiford@arm.com>
956
957 * c-objc-common.c (useful_aka_type_p): New function.
958 (print_type): Use it to decide whether an aka type is worth printing.
959
59bc434a
JJ
9602019-09-27 Jakub Jelinek <jakub@redhat.com>
961
962 PR c++/88203
963 * c-parser.c (c_parser_predefined_identifier): New function.
964 (c_parser_postfix_expression): Use it.
965 (c_parser_omp_variable_list): Parse predefined identifiers.
966 * c-typeck.c (c_finish_omp_clauses): Allow predefined variables
967 in shared and firstprivate clauses, even when they are predetermined
968 shared.
969
c6447c20
RS
9702019-09-27 Richard Sandiford <richard.sandiford@arm.com>
971
972 * c-typeck.c (build_function_call_vec): Take the original function
973 decl as an optional final parameter. Pass all built-in calls to
974 check_builtin_function_arguments.
975
522da4c2
EB
9762019-09-20 Eric Botcazou <ebotcazou@adacore.com>
977
978 PR c/91815
979 * c-decl.c (pushdecl): In C detect duplicate declarations across scopes
980 of identifiers in the external scope only for variables and functions.
981
68e2c199
PK
9822019-09-04 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
983
984 PR c/78736
985 * c-typeck.c (convert_for_assignment): Handle Wenum-conversion.
986
22f8849d
IS
9872019-08-23 Iain Sandoe <iain@sandoe.co.uk>
988
989 PR pch/61250
990 * c-parser.c (c_parse_file): Call c_common_no_more_pch ()
991 after determining that the first token is not
992 PRAGMA_GCC_PCH_PREPROCESS.
993
db376f45
EB
9942019-08-22 Eric Botcazou <ebotcazou@adacore.com>
995
996 * c-parser.c (c_parser_declaration_or_fndef): Set DECL_ARGUMENTS of a
997 FUNCTION_DECL to the right value in the presence of nested declarators.
998
4d732405
RS
9992019-08-13 Richard Sandiford <richard.sandiford@arm.com>
1000
1001 PR middle-end/91421
1002 * c-decl.c (merge_decls): Use copy_decl_built_in_function.
1003
cb1180d5
RS
10042019-08-13 Richard Sandiford <richard.sandiford@arm.com>
1005
1006 PR middle-end/91421
1007 * c-decl.c (header_for_builtin_fn): Take a FUNCTION_DECL instead
1008 of a built_in_function.
1009 (diagnose_mismatched_decls, implicitly_declare): Update accordingly.
1010
77eb117f
JJ
10112019-08-10 Jakub Jelinek <jakub@redhat.com>
1012
1013 * c-parser.c (c_parser_omp_clause_name): Parse device_type.
1014 (c_parser_omp_clause_device_type): New function.
1015 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_DEVICE_TYPE.
1016 (OMP_DECLARE_TARGET_CLAUSE_MASK): Add PRAGMA_OMP_CLAUSE_DEVICE_TYPE.
1017 (c_parser_omp_declare_target): Handle device_type clauses. Remove
1018 diagnostics for declare target with clauses nested in clause-less
1019 declare target declaration-definition-seq.
1020 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_DEVICE_TYPE.
1021
2c3b8bad
JJ
10222019-08-09 Jakub Jelinek <jakub@redhat.com>
1023
bb522e2e
JJ
1024 * c-parser.c (check_no_duplicate_clause): Simplify using
1025 omp_find_clause.
1026 (c_parser_omp_clause_if): Fix up printing of target {enter,exit} data
1027 directive name modifiers.
1028 (c_parser_omp_clause_proc_bind): Check for duplicate proc_bind clause.
1029
2c3b8bad
JJ
1030 PR c/91401
1031 * c-parser.c (c_parser_omp_clause_dist_schedule): Fix up typos in the
1032 check_no_duplicate_clause call. Comment it out, instead emit a
1033 warning for duplicate dist_schedule clauses.
1034
99769e7f
RS
10352019-08-08 Richard Sandiford <richard.sandiford@arm.com>
1036
1037 * c-decl.c (finish_enum): Clear C_TYPE_BEING_DEFINED.
1038
8860d270
JJ
10392019-08-08 Jakub Jelinek <jakub@redhat.com>
1040
1041 * c-typeck.c (c_finish_omp_clauses): For C_ORT_OMP
1042 OMP_CLAUSE_USE_DEVICE_* clauses use oacc_reduction_head bitmap
1043 instead of generic_head to track duplicates.
1044
398e3feb
JJ
10452019-08-07 Jakub Jelinek <jakub@redhat.com>
1046
1047 * c-parser.c (c_parser_omp_clause_name): Parse use_device_addr clause.
1048 (c_parser_omp_clause_use_device_addr): New function.
1049 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR.
1050 (OMP_TARGET_DATA_CLAUSE_MASK): Add PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR.
1051 (c_parser_omp_target_data): Handle PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR
1052 like PRAGMA_OMP_CLAUSE_USE_DEVICE_PTR, adjust diagnostics about no
1053 map or use_device_* clauses.
1054 * c-typeck.c (c_finish_omp_clauses): For OMP_CLAUSE_USE_DEVICE_PTR
1055 in OpenMP, require pointer type rather than pointer or array type.
1056 Handle OMP_CLAUSE_USE_DEVICE_ADDR.
1057
a28351e7
JJ
10582019-07-31 Jakub Jelinek <jakub@redhat.com>
1059
1060 PR c/91192
1061 * c-parser.c (c_parser_sizeof_expression): Call set_c_expr_source_range
1062 even if finish is UNKNOWN_LOCATION, just use start as finish in that
1063 case.
1064
6343b6bf
ML
10652019-07-25 Martin Liska <mliska@suse.cz>
1066 Dominik Infuhr <dominik.infuehr@theobroma-systems.com>
1067
1068 PR c++/23383
1069 * c-decl.c (merge_decls): Merge OPERATOR_DELETE flag.
1070
cb50701e
ML
10712019-07-25 Martin Liska <mliska@suse.cz>
1072
1073 * c-decl.c (merge_decls): Use new macros
1074 (e.g. DECL_SET_LAMBDA_FUNCTION and DECL_LAMBDA_FUNCTION_P).
1075
62e3e66f
RB
10762019-07-23 Richard Biener <rguenther@suse.de>
1077
1078 PR tree-optimization/83518
1079 * gimple-parser.c (c_parser_parse_gimple_body): When we have
1080 a CFG also rebuild cgraph edges.
1081
554a530f
JJ
10822019-07-20 Jakub Jelinek <jakub@redhat.com>
1083
1084 * c-parser.c (c_parser_omp_clause_name): Handle bind clause.
1085 (c_parser_omp_clause_bind): New function.
1086 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_BIND.
1087 (OMP_LOOP_CLAUSE_MASK): Define.
1088 (c_parser_omp_loop): New function.
1089 (c_parser_omp_parallel, c_parser_omp_teams): Handle parsing of
1090 loop combined with parallel or teams.
1091 (c_parser_omp_construct): Handle PRAGMA_OMP_LOOP.
1092 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_BIND.
1093
d119bf79
RS
10942019-07-18 Richard Sandiford <richard.sandiford@arm.com>
1095
1096 PR c/53633
1097 * c-decl.c (finish_function): Check targetm.warn_func_return
1098 before issuing a -Wreturn-type warning.
1099
ab20d992 11002019-07-12 Alexandre Oliva <oliva@adacore.com>
fdc1f343
AO
1101
1102 * gimple-parser.c (c_parser_gimple_try_stmt): New.
1103 (c_parser_compound_statement): Call it.
1104
1fdd6f04
JJ
11052019-07-12 Jakub Jelinek <jakub@redhat.com>
1106
1107 * c-parser.c (c_parser_omp_clause_name): Handle order clause.
1108 (c_parser_omp_clause_order): New function.
1109 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_ORDER.
1110 (OMP_SIMD_CLAUSE_MASK, OMP_FOR_CLAUSE_MASK): Add
1111 PRAGMA_OMP_CLAUSE_ORDER.
1112 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_ORDER.
1113
8389386c
RB
11142019-07-10 Richard Biener <rguenther@suse.de>
1115
1116 * gimple-parser.c (c_parser_gimple_postfix_expression): Support
1117 _Literal (int *) &x for address literals.
1118
99b1c316
MS
11192019-07-09 Martin Sebor <msebor@redhat.com>
1120
1121 PR c++/61339
1122 * c-decl.c (xref_tag): Change class-key of PODs to struct and others
1123 to class.
1124 (field_decl_cmp): Same.
1125 * c-parser.c (c_parser_struct_or_union_specifier): Same.
1126 * c-tree.h: Same.
1127 * gimple-parser.c (c_parser_gimple_compound_statement): Same.
1128
6c1dae73
MS
11292019-07-09 Martin Sebor <msebor@redhat.com>
1130
1131 PR c++/61339
1132 * c-decl.c: Change class-key from class to struct and vice versa
1133 to match convention and avoid -Wclass-is-pod and -Wstruct-no-pod.
1134 * gimple-parser.c: Same.
1135
69b5279e
RB
11362019-07-01 Richard Biener <rguenther@suse.de>
1137
1138 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
1139 _Literal (char *) &"foo" for address literals pointing to
1140 STRING_CSTs.
1141
ab20d992
JJ
11422019-06-25 Jozef Lawrynowicz <jozef.l@mittosystems.com>
1143
1144 * c-parser.c (c_parse_init): Create keyword for "__intN__" type.
1145 * c-decl.c (declspecs_add_type): Don't pedwarn about "__intN" ISO
1146 C incompatibility if alternate "__intN__" form is used.
1147
1e3d475e
MS
11482019-06-24 Martin Sebor <msebor@redhat.com>
1149
1150 * c-typeck.c (build_binary_op): Hyphenate floating-point.
1151
bf38f7e9
JJ
11522019-06-10 Jakub Jelinek <jakub@redhat.com>
1153
1154 * c-parser.c (c_parser_pragma): Reject PRAGMA_OMP_SCAN.
1155 (c_parser_omp_clause_reduction): Don't sorry_at on inscan reductions.
1156 (c_parser_omp_scan_loop_body): New function.
1157 (c_parser_omp_for_loop): Call c_parser_omp_scan_loop_body if there are
1158 inscan reduction clauses.
1159 * c-typeck.c (c_finish_omp_clauses): Reject mixing inscan with
1160 non-inscan reductions on the same construct, or inscan reductions with
1161 ordered or schedule clauses, or inscan array reductions.
1162
65985d78
MS
11632019-06-05 Martin Sebor <msebor@redhat.com>
1164
1165 PR c/90737
1166 * c-typeck.c (c_finish_return): Only consider functions returning
1167 pointers as candidates for -Wreturn-local-addr.
1168
0ecf545c
MS
11692019-06-05 Martin Sebor <msebor@redhat.com>
1170
1171 * c-decl.c (start_decl): Adjust quoting and hyphenation
1172 in diagnostics.
1173 (finish_decl): Same.
1174 (finish_enum): Same.
1175 (start_function): Same.
1176 (declspecs_add_type): Same.
1177 * c-parser.c (warn_for_abs): Same.
1178 * c-typeck.c (build_binary_op): Same.
1179
e03436e7
TS
11802019-05-17 Thomas Schwinge <thomas@codesourcery.com>
1181
b48f44bf
TS
1182 PR c/89433
1183 * c-parser.c (c_finish_oacc_routine): Rework checking if already
1184 marked with an OpenACC 'routine' directive.
1185
5bf04509
TS
1186 PR c/89433
1187 * c-parser.c (c_parser_oacc_routine): Normalize order of clauses.
1188 (c_finish_oacc_routine): Call oacc_verify_routine_clauses.
1189
e03436e7
TS
1190 PR c/89433
1191 * c-parser.c (c_finish_oacc_routine): Refer to OpenACC 'routine'
1192 clauses from "omp declare target" attribute.
1193
a9c697b8
MS
11942019-05-16 Martin Sebor <msebor@redhat.com>
1195
ab20d992
JJ
1196 * c-decl.c (start_decl): Quote keywords, operators, and
1197 types in diagnostics.
1198 (finish_decl): Same.
1199 * c-parser.c (c_parser_asm_statement): Same.
1200 (c_parser_conditional_expression): Same.
1201 (c_parser_transaction_cancel): Same.
1202 * c-typeck.c (c_common_type): Same.
1203 (build_conditional_expr): Same.
1204 (digest_init): Same.
1205 (process_init_element): Same.
1206 (build_binary_op): Same.
a9c697b8 1207
c4499192
RB
12082019-05-17 Richard Biener <rguenther@suse.de>
1209
1210 * gimple-parser.c (c_parser_gimple_statement): Handle __VEC_PERM.
1211 (c_parser_gimple_unary_expression): Likewise.
1212 (c_parser_gimple_parentized_ternary_expression): New function.
1213
adfe6e4b
RB
12142019-05-16 Richard Biener <rguenther@suse.de>
1215
1216 * gimple-parser.c (c_parser_gimple_statement): Handle __BIT_INSERT.
1217 (c_parser_gimple_unary_expression): Likewise.
1218
186dabf2
RB
12192019-05-15 Richard Biener <rguenther@suse.de>
1220
1221 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
1222 __BIT_FIELD_REF.
1223
1158c5b4
RB
12242019-05-14 Richard Biener <rguenther@suse.de>
1225
1226 * gimple-parser.c (c_parser_gimple_statement): Remove
1227 questionable auto-promotion to VIEW_CONVERT_EXPR.
1228 (c_parser_gimple_typespec): Split out from __MEM parsing.
1229 (c_parser_gimple_postfix_expression): Handle __VIEW_CONVERT.
1230 * tree-pretty-print.c (dump_generic_node): Dump VIEW_CONVERT_EXPR
1231 as __VIEW_CONVERT with -gimple.
1232
fd4485aa
ML
12332019-05-09 Martin Liska <mliska@suse.cz>
1234
1235 * gimple-parser.c (c_parser_gimple_statement): Support __MIN and
1236 __MAX.
1237 (c_parser_gimple_unary_expression): Parse also binary expression
1238 __MIN and __MAX.
1239 (c_parser_gimple_parentized_binary_expression): New function.
1240
d276406a
ML
12412019-05-09 Martin Liska <mliska@suse.cz>
1242
1243 * gimple-parser.c (struct gimple_parser): Add probability.
1244 for gimple_parser_edge.
1245 (gimple_parser::push_edge): Add new argument probability.
1246 (c_parser_gimple_parse_bb_spec): Parse also probability
1247 if present.
1248 (c_parser_parse_gimple_body): Set edge probability.
1249 (c_parser_gimple_compound_statement): Consume token
1250 before calling c_parser_gimple_goto_stmt.
1251 Parse BB counts.
1252 (c_parser_gimple_statement): Pass new argument.
1253 (c_parser_gimple_goto_stmt): Likewise.
1254 (c_parser_gimple_if_stmt): Likewise.
1255 (c_parser_gimple_or_rtl_pass_list): Parse hot_bb_threshold.
1256 * c-parser.c (c_parser_declaration_or_fndef): Pass
1257 hot_bb_threshold argument.
1258 * c-tree.h (struct c_declspecs): Add hot_bb_threshold
1259 field.
1260 (c_parser_gimple_parse_bb_spec_edge_probability): New.
1261
f179b64e
JJ
12622019-04-26 Jakub Jelinek <jakub@redhat.com>
1263
1264 PR debug/90197
1265 * c-tree.h (c_finish_loop): Add 2 further location_t arguments.
1266 * c-parser.c (c_parser_while_statement): Adjust c_finish_loop caller.
1267 (c_parser_do_statement): Likewise.
1268 (c_parser_for_statement): Likewise. Formatting fixes.
1269 * c-typeck.c (c_finish_loop): Add COND_LOCUS and INCR_LOCUS arguments,
1270 emit DEBUG_BEGIN_STMTs if needed.
1271
e7178413
JJ
12722019-04-19 Jakub Jelinek <jakub@redhat.com>
1273
c280b7ee
JJ
1274 PR c/89888
1275 * c-typeck.c (struct c_switch): Remove outside_range_p member.
1276 (c_start_case): Don't clear it.
1277 (do_case): Adjust c_add_case_label caller.
1278 (c_finish_case): Adjust c_do_switch_warnings caller.
1279
e7178413
JJ
1280 PR c++/90108
1281 * c-decl.c (merge_decls): If remove is main variant and
1282 DECL_ORIGINAL_TYPE is some other type, remove a DECL_ORIGINAL_TYPE
1283 variant that has newdecl as TYPE_NAME if any.
1284
60a2c645
JJ
12852019-04-12 Jakub Jelinek <jakub@redhat.com>
1286
1287 PR c/89933
1288 * c-decl.c (merge_decls): When newdecl's type is its main variant,
1289 don't try to remove it from the variant list, but instead assert
1290 it has no variants.
1291
2a82beaa
RB
12922019-04-01 Richard Biener <rguenther@suse.de>
1293
1294 PR c/71598
1295 * c-tree.h (c_get_alias_set): Declare.
1296 * c-objc-common.h (LANG_HOOKS_GET_ALIAS_SET): Use c_get_alias_set.
1297 * c-objc-common.c (c_get_alias_set): Treat enumeral types
1298 as the underlying integer type.
1299
bec1da64
MS
13002019-03-19 Martin Sebor <msebor@redhat.com>
1301
1302 PR tree-optimization/89688
1303 * c-decl.c (finish_decl): Call braced_lists_to_string for more
1304 kinds of initializers.
1305
855cd9b1
JJ
13062019-03-19 Jakub Jelinek <jakub@redhat.com>
1307
1308 PR c/89734
1309 * c-decl.c (grokdeclarator): Call c_build_qualified_type on function
1310 return type even if quals_used is 0. Formatting fixes.
1311
baa09dc5
RB
13122019-03-14 Richard Biener <rguenther@suse.de>
1313
1314 * c-tree.h (enum c_declspec_il): New.
1315 (struct c_declspecs): Merge gimple_p and rtl_p into declspec_il
1316 enum bitfield.
1317 * c-parser.c (c_parser_declaration_or_fndef): Adjust accordingly.
1318 Pass start pass and declspec_il to c_parser_parse_gimple_body.
1319 (c_parser_declspecs): Adjust.
1320 * gimple-parser.c: Include cfg.h, cfghooks.h, cfganal.h, tree-cfg.h,
1321 gimple-iterator.h, cfgloop.h, tree-phinodes.h, tree-into-ssa.h
1322 and bitmap.h.
1323 (struct gimple_parser): New.
1324 (gimple_parser::push_edge): New method.
1325 (c_parser_gimple_parse_bb_spec): New helper.
1326 (c_parser_parse_gimple_body): Get start pass and IL specification.
1327 Initialize SSA and CFG.
1328 (c_parser_gimple_compound_statement): Handle CFG and SSA build.
1329 Build a gimple_parser parsing state and pass it along.
1330 (c_parser_gimple_statement): Change intermittend __PHI internal
1331 function argument for the edge.
1332 (c_parser_gimple_or_rtl_pass_list): Handle ssa, cfg flags.
1333 (c_parser_gimple_goto_stmt): Record edges to build.
1334 (c_parser_gimple_if_stmt): Likewise.
1335 * gimple-parser.h (c_parser_parse_gimple_body): Adjust.
1336 (c_parser_gimple_or_rtl_pass_list): Likewise.
1337
a3f9f006
ML
13382019-03-11 Martin Liska <mliska@suse.cz>
1339
1340 * c-decl.c (check_for_loop_decls): Wrap an option name
1341 in a string format message and fix GNU coding style.
1342 * c-parser.c (c_parser_declspecs): Likewise.
1343
1db01ff9
JJ
13442019-03-08 Jakub Jelinek <jakub@redhat.com>
1345
1346 PR tree-optimization/89550
1347 * c-decl.c (finish_function): Only set TREE_NO_WARNING if warning_at
1348 returned true.
1349 (c_write_global_declarations_1): Only set TREE_NO_WARNING if pedwarn
1350 or warning returned true.
1351
66dcb747
JJ
13522019-02-28 Jakub Jelinek <jakub@redhat.com>
1353
1354 PR c/89525
1355 * c-typeck.c (convert_arguments): Call inform_declaration only if
1356 the previous warning_at call returned true.
1357
2263c9f2
TS
13582019-02-22 Thomas Schwinge <thomas@codesourcery.com>
1359
1360 * c-parser.c (c_parser_oacc_shape_clause): Add loc formal
1361 parameter. Adjust all users.
1362 (c_parser_oacc_simple_clause): Replace parser with loc formal
1363 parameter. Adjust all users.
1364
ab20d992 13652019-02-19 Chung-Lin Tang <cltang@codesourcery.com>
19695f4d
CLT
1366
1367 PR c/87924
1368 * c-parser.c (c_parser_oacc_clause_wait): Add representation of wait
1369 clause without argument as 'wait (GOMP_ASYNC_NOVAL)', adjust comments.
1370
5f88ba10
JJ
13712019-02-15 Jakub Jelinek <jakub@redhat.com>
1372
1373 PR c/89340
1374 * c-decl.c (start_function): Clear TREE_PUBLIC on nested functions
1375 before c_decl_attributes rather than after it.
1376
cfc30fd1
JJ
13772019-02-06 Jakub Jelinek <jakub@redhat.com>
1378
1379 PR c/89211
1380 * c-parser.c (c_parser_declaration_or_fndef): Don't update
1381 DECL_ARGUMENTS of d if it has been defined already. Use a single if
1382 instead of 3 nested ifs.
1383
fbe83e6b
JM
13842019-02-06 Joseph Myers <joseph@codesourcery.com>
1385
1386 PR c/88584
1387 * c-decl.c (finish_decl): Do not complete array types for arrays
1388 with external linkage not at file scope.
1389
f461f938
RB
13902019-02-05 Richard Biener <rguenther@suse.de>
1391
1392 PR c/88606
1393 * c-decl.c (finish_struct): Reset TYPE_TRANSPARENT_AGGR on
1394 all type variants when not supported.
1395
fe509359
JJ
13962019-01-30 Jakub Jelinek <jakub@redhat.com>
1397
1398 PR c/89061
1399 * c-tree.h (C_DECL_COMPOUND_LITERAL_P): Define.
1400 * c-decl.c (decl_jump_unsafe): Return false for
1401 C_DECL_COMPOUND_LITERAL_P decls.
1402 (build_compound_literal): Set C_DECL_COMPOUND_LITERAL_P.
1403
6a335b96
JJ
14042019-01-29 Jakub Jelinek <jakub@redhat.com>
1405
f4b7e754
JJ
1406 PR c/89045
1407 * c-decl.c (build_compound_literal): Don't pushdecl if in parameter
1408 scope.
1409
6a335b96
JJ
1410 PR c/86125
1411 * c-decl.c (last_fileptr_type): Remove.
1412 (last_structptr_types): New variable.
1413 (match_builtin_function_types): Compare TYPE_MAIN_VARIANT of
1414 {old,new}rettype instead of the types themselves. Assert
1415 last_structptr_types array has the same number of elements
1416 as builtin_structptr_types array. Use TYPE_MAIN_VARIANT for
1417 argument oldtype and newtype. Instead of handling
1418 just fileptr_type_node specially, handle all builtin_structptr_types
1419 pointer nodes. Formatting fix.
1420
d8b5a1a0
MS
14212019-01-24 Martin Sebor <msebor@redhat.com>
1422
1423 PR c/86125
1424 PR c/88886
1425 PR middle-end/86308
1426 * c-decl.c (match_builtin_function_types): Add arguments.
1427 (diagnose_mismatched_decls): Diagnose mismatched declarations
1428 of built-ins more strictly.
1429
e21c4491
JJ
14302019-01-24 Jakub Jelinek <jakub@redhat.com>
1431
1432 PR c++/88976
1433 * c-typeck.c (c_finish_omp_cancel): Diagnose more than one if
1434 on #pragma omp cancel with different modifiers.
1435
420183d9
L
14362019-01-18 H.J. Lu <hongjiu.lu@intel.com>
1437
1438 PR c/51628
1439 PR c/88664
1440 * c-typeck.c (convert_for_assignment): Upate the
1441 warn_for_address_or_pointer_of_packed_member call.
1442
17ad43dd
TH
14432019-01-16 Tom Honermann <tom@honermann.net>
1444 Jason Merrill <jason@redhat.com>
1445
1446 * c-typeck.c (digest_init): Revised the error message produced for
1447 ill-formed cases of array initialization with a string literal.
1448 (error_init): Make variadic.
1449
5f07d78a
JJ
14502019-01-12 Jakub Jelinek <jakub@redhat.com>
1451
1452 * c-typeck.c (convert_for_assignment): Fix a comment typo.
1453
c4581bbf
JJ
14542019-01-07 Jakub Jelinek <jakub@redhat.com>
1455
1456 PR c/88701
1457 * c-decl.c (build_compound_literal): If not TREE_STATIC, only pushdecl
1458 if current_function_decl is non-NULL.
1459
65c5b1eb
JM
14602019-01-07 Joseph Myers <joseph@codesourcery.com>
1461
1462 PR c/88720
1463 PR c/88726
1464 * c-decl.c (pop_scope): Use TREE_PUBLIC and b->nested to determine
1465 whether a function is nested, not DECL_EXTERNAL. Diagnose inline
1466 functions declared but never defined only for external scope, not
1467 for other scopes.
1468
d8fcab68
JJ
14692019-01-07 Jakub Jelinek <jakub@redhat.com>
1470
1471 PR c++/85052
1472 * c-parser.c (c_parser_postfix_expression): Parse
1473 __builtin_convertvector.
1474
a5544970
JJ
14752019-01-01 Jakub Jelinek <jakub@redhat.com>
1476
1477 Update copyright years.
1478
da77eace
L
14792018-12-20 H.J. Lu <hongjiu.lu@intel.com>
1480
1481 PR c/51628
1482 * c-typeck.c (convert_for_assignment): Call
1483 warn_for_address_or_pointer_of_packed_member.
1484
1edf8866
SB
14852018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
1486
1487 * c-parser.c (c_parser_asm_statement) <RID_CONST, RID_RESTRICT>: Give
1488 a more specific error message (instead of just falling through).
1489
db4fd626
SB
14902018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
1491
1492 * c-parser.c (c_parser_asm_statement): Keep track of the location each
1493 asm qualifier is first seen; use that to give nicer "duplicate asm
1494 qualifier" messages. Delete 'quals" variable, instead pass the
1495 "is_volatile_ flag to build_asm_stmt directly.
1496 * c-tree.h (build_asm_stmt): Make the first arg bool instead of tree.
1497 * c-typeck.c (build_asm_stmt): Ditto; adjust.
1498
9c9cfcbb
SB
14992018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
1500
1501 * c-parser.c (c_parser_asm_statement): Rewrite the loop to work without
1502 "done" boolean variable.
1503
a14feb3c
DM
15042018-12-19 David Malcolm <dmalcolm@redhat.com>
1505
1506 PR c++/87504
1507 * c-typeck.c (class maybe_range_label_for_tree_type_mismatch):
1508 Move from here to gcc-rich-location.h and gcc-rich-location.c.
1509 (build_binary_op): Use struct op_location_t and
1510 class binary_op_rich_location.
1511
6d939173
JJ
15122018-12-11 Jakub Jelinek <jakub@redhat.com>
1513
1514 PR sanitizer/88426
1515 * c-convert.c (convert): Call c_fully_fold before calling
1516 ubsan_instrument_float_cast.
1517
b7055028
SB
15182018-12-08 Segher Boessenkool <segher@kernel.crashing.org>
1519
1520 * c-parser (c_parser_asm_statement) [RID_INLINE]: Delete stray line
1521 setting "quals".
1522
5b76e75f
SB
15232018-12-06 Segher Boessenkool <segher@kernel.crashing.org>
1524
1525 * c-parser.c (c_parser_asm_statement): Detect the inline keyword
1526 after asm. Pass a flag for it to build_asm_expr.
1527 * c-tree.h (build_asm_expr): Update declaration.
1528 * c-typeck.c (build_asm_stmt): Add is_inline parameter. Use it to
1529 set ASM_INLINE_P.
1530
30bd42b9
SB
15312018-12-06 Segher Boessenkool <segher@kernel.crashing.org>
1532
1533 PR inline-asm/55681
1534 * c-parser.c (c_parser_asm_statement): Update grammar. Allow any
1535 combination of volatile and goto, in any order, without repetitions.
1536
9df6c0e4
JB
15372018-12-04 James Norris <jnorris@codesourcery.com>
1538 Cesar Philippidis <cesar@codesourcery.com>
1539 Julian Brown <julian@codesourcery.com>
1540
1541 * c-parser.c (c_parser_oacc_wait_list): Remove dead diagnostic
1542 code.
1543
f44697b7
RB
15442018-11-30 Richard Biener <rguenther@suse.de>
1545
1546 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
1547 _Literal (type) { ... } as empty aggregate or vector constructor.
1548
550dfbdc
MS
15492018-11-29 Martin Sebor <msebor@redhat.com>
1550
1551 PR c/88091
1552 * c-typeck.c (convert_argument): Add a parameter. Adjust indentation.
1553 (convert_arguments): Add comments. Pass additional argument to
1554 the function above.
1555
673670da
MS
15562018-11-29 Martin Sebor <msebor@redhat.com>
1557
1558 PR c/88172
1559 PR testsuite/88208
1560 * c-decl.c (declspec_add_alignas): Adjust call to check_user_alignment.
1561
db1d09b0
MS
15622018-11-23 Martin Sebor <msebor@redhat.com>
1563
1564 PR testsuite/88098
1565 * c-typeck.c (convert_arguments): Call builtin_decl_explicit instead.
1566 (maybe_warn_builtin_no_proto_arg): Handle short enum to int promotion.
1567
98f08eb8
MS
15682018-11-20 Martin Sebor <msebor@redhat.com>
1569
1570 * c-parser.c (c_parser_has_attribute_expression): New function.
1571 (c_parser_attribute): New function.
1572 (c_parser_attributes): Move code into c_parser_attribute.
1573 (c_parser_unary_expression): Handle RID_HAS_ATTRIBUTE_EXPRESSION.
1574
cd5da983
MS
15752018-11-15 Martin Sebor <msebor@redhat.com>
1576
1577 PR c/83656
1578 * c-decl.c (header_for_builtin_fn): Declare.
1579 (diagnose_mismatched_decls): Diagnose declarations of built-in
1580 functions without a prototype.
1581 * c-typeck.c (maybe_warn_builtin_no_proto_arg): New function.
1582 (convert_argument): Same.
1583 (convert_arguments): Factor code out into convert_argument.
1584 Detect mismatches between built-in formal arguments in calls
1585 to built-in without prototype.
1586 (build_conditional_expr): Same.
1587 (type_or_builtin_type): New function.
1588 (convert_for_assignment): Add argument. Conditionally issue
1589 warnings instead of errors for mismatches.
1590
620e594b
DM
15912018-11-13 David Malcolm <dmalcolm@redhat.com>
1592
1593 * c-decl.c: Replace "source_location" with "location_t".
1594 * c-tree.h: Likewise.
1595 * c-typeck.c: Likewise.
1596 * gimple-parser.c: Likewise.
1597
3179ebae
JJ
15982018-11-09 Jakub Jelinek <jakub@redhat.com>
1599
81a227c6
JJ
1600 * c-parser.c (c_parser_omp_clause_final): Use
1601 c_parser_expr_no_commas, convert_lvalue_to_rvalue,
1602 c_objc_common_truthvalue_conversion, c_fully_fold and parentheses
1603 parsing instead of c_parser_paren_condition.
1604 (c_parser_omp_clause_if): Use c_parser_expr_no_commas,
1605 convert_lvalue_to_rvalue, c_objc_common_truthvalue_conversion and
1606 c_fully_fold instead of c_parser_condition.
1607 (c_parser_omp_clause_num_threads, c_parser_omp_clause_num_tasks,
1608 c_parser_omp_clause_grainsize, c_parser_omp_clause_priority,
1609 c_parser_omp_clause_hint, c_parser_omp_clause_num_teams,
1610 c_parser_omp_clause_thread_limit, c_parser_omp_clause_linear): Use
1611 c_parser_expr_no_commas instead of c_parser_expression.
1612
98c91c56
JJ
1613 * c-parser.c (c_parser_omp_clause_reduction): Call sorry_at on
1614 reduction clause with inscan modifier.
1615
3179ebae
JJ
1616 * c-parser.c (c_parser_omp_requires): Call sorry_at on requires
1617 clauses other than atomic_default_mem_order.
1618
28567c40
JJ
16192018-11-08 Jakub Jelinek <jakub@redhat.com>
1620
1621 * c-parser.c: Include memmode.h.
1622 (c_parser_omp_depobj, c_parser_omp_requires): New functions.
1623 (c_parser_pragma): Handle PRAGMA_OMP_DEPOBJ and PRAGMA_OMP_REQUIRES.
1624 (c_parser_omp_clause_name): Handle nontemporal, in_reduction and
1625 task_reduction clauses.
1626 (c_parser_omp_variable_list): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION.
1627 For OMP_CLAUSE_DEPEND, parse clause operands as either an array
1628 section, or lvalue assignment expression.
1629 (c_parser_omp_clause_if): Handle cancel and simd modifiers.
1630 (c_parser_omp_clause_lastprivate): Parse optional
1631 conditional: modifier.
1632 (c_parser_omp_clause_hint): Require constant integer expression rather
1633 than just integer expression.
1634 (c_parser_omp_clause_defaultmap): Parse new kinds of defaultmap
1635 clause.
1636 (c_parser_omp_clause_reduction): Add IS_OMP and KIND arguments.
1637 Parse reduction modifiers. Pass KIND to c_parser_omp_variable_list.
1638 (c_parser_omp_clause_nontemporal, c_parser_omp_iterators): New
1639 functions.
1640 (c_parser_omp_clause_depend): Parse iterator modifier and handle
1641 iterators. Parse mutexinoutset and depobj kinds.
1642 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_reduction
1643 callers.
1644 (c_parser_omp_all_clauses): Likewise. Handle
1645 PRAGMA_OMP_CLAUSE_NONTEMPORAL and
1646 PRAGMA_OMP_CLAUSE_{IN,TASK}_REDUCTION.
1647 (c_parser_omp_atomic): Parse hint and memory order clauses. Handle
1648 default memory order from requires directive if any. Adjust
1649 c_finish_omp_atomic caller.
1650 (c_parser_omp_critical): Allow comma in between (name) and hint clause.
1651 (c_parser_omp_flush): Parse flush with memory-order-clause.
1652 (c_parser_omp_for_loop): Allow NE_EXPR even in
1653 OpenMP loops, adjust c_finish_omp_for caller.
1654 (OMP_SIMD_CLAUSE_MASK): Add if and nontemporal clauses.
1655 (c_parser_omp_master): Add p_name, mask and cclauses arguments.
1656 Allow to be called while parsing combined parallel master.
1657 Parse combined master taskloop{, simd}.
1658 (c_parser_omp_parallel): Parse combined
1659 parallel master{, taskloop{, simd}} constructs.
1660 (OMP_TASK_CLAUSE_MASK): Add in_reduction clause.
1661 (OMP_TASKGROUP_CLAUSE_MASK): Define.
1662 (c_parser_omp_taskgroup): Add LOC argument. Parse taskgroup clauses.
1663 (OMP_TASKWAIT_CLAUSE_MASK): Define.
1664 (c_parser_omp_taskwait): Handle taskwait with depend clauses.
1665 (c_parser_omp_teams): Force a BIND_EXPR with BLOCK
1666 around teams body. Use SET_EXPR_LOCATION.
1667 (c_parser_omp_target_data): Allow target data
1668 with only use_device_ptr clauses.
1669 (c_parser_omp_target): Use SET_EXPR_LOCATION. Set
1670 OMP_REQUIRES_TARGET_USED bit in omp_requires_mask.
1671 (c_parser_omp_requires): New function.
1672 (c_finish_taskloop_clauses): New function.
1673 (OMP_TASKLOOP_CLAUSE_MASK): Add reduction and in_reduction clauses.
1674 (c_parser_omp_taskloop): Use c_finish_taskloop_clauses. Add forward
1675 declaration. Disallow in_reduction clause when combined with parallel
1676 master.
1677 (c_parser_omp_construct): Adjust c_parser_omp_master and
1678 c_parser_omp_taskgroup callers.
1679 * c-typeck.c (c_finish_omp_cancel): Diagnose if clause with modifier
1680 other than cancel.
1681 (handle_omp_array_sections_1): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION
1682 like OMP_CLAUSE_REDUCTION.
1683 (handle_omp_array_sections): Likewise. Call save_expr on array
1684 reductions before calling build_index_type. Handle depend clauses
1685 with iterators.
1686 (struct c_find_omp_var_s): New type.
1687 (c_find_omp_var_r, c_omp_finish_iterators): New functions.
1688 (c_finish_omp_clauses): Don't diagnose nonmonotonic clause
1689 with static, runtime or auto schedule kinds. Call save_expr for whole
1690 array reduction sizes. Diagnose reductions with zero sized elements
1691 or variable length structures. Diagnose nogroup clause used with
1692 reduction clause(s). Handle depend clause with
1693 OMP_CLAUSE_DEPEND_DEPOBJ. Diagnose bit-fields. Require
1694 omp_depend_t type for OMP_CLAUSE_DEPEND_DEPOBJ kinds and
1695 some different type for other kinds. Use build_unary_op with
1696 ADDR_EXPR and build_indirect_ref instead of c_mark_addressable.
1697 Handle depend clauses with iterators. Remove no longer needed special
1698 case that predetermined const qualified vars may be specified in
1699 firstprivate clause. Complain if const qualified vars are mentioned
1700 in data-sharing clauses other than firstprivate or shared. Use
1701 error_at with OMP_CLAUSE_LOCATION (c) as first argument instead of
1702 error. Formatting fix. Handle OMP_CLAUSE_NONTEMPORAL and
1703 OMP_CLAUSE_{IN,TASK}_REDUCTION. Allow any lvalue as
1704 OMP_CLAUSE_DEPEND operand (besides array section), adjust diagnostics.
1705
7e2de6df
DM
17062018-10-29 David Malcolm <dmalcolm@redhat.com>
1707
1708 * c-decl.c (implicit_decl_warning): Update "is there a suggestion"
1709 logic for change to name_hint::operator bool.
1710 (undeclared_variable): Likewise.
1711 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
1712 (c_parser_parameter_declaration): Likewise.
1713
9f936c86
JM
17142018-10-17 Joseph Myers <joseph@codesourcery.com>
1715
1716 * c-errors.c (pedwarn_c11): New function.
1717 * c-parser.c (disable_extension_diagnostics): Save
1718 warn_c11_c2x_compat and set it to 0.
1719 (restore_extension_diagnostics): Restore warn_c11_c2x_compat.
1720 (c_parser_static_assert_declaration_no_semi): Handle
1721 _Static_assert without string constant.
1722 * c-tree.h (pedwarn_c11): New prototype.
1723
033eb567
DM
17242018-10-17 David Malcolm <dmalcolm@redhat.com>
1725
1726 * Make-lang.in (selftest-c): New.
1727 (C_SELFTEST_FLAGS, C_SELFTEST_DEPS, s-selftest-c, selftest-c-gdb)
1728 (selftest-gdb, selftest-c-valgrind, selftest-valgrind): Move here
1729 from gcc/Makefile.in.
1730
0edf3afe
RB
17312018-10-02 Richard Biener <rguenther@suse.de>
1732
1733 * c-decl.c (warn_if_shadowing): Do not test DECL_FROM_INLINE.
1734
8313a764
JM
17352018-09-26 Joseph Myers <joseph@codesourcery.com>
1736
1737 PR c/87390
1738 * c-typeck.c (build_binary_op): Use excess precision for
1739 comparisons of integers and floating-point for C11 and later.
1740
ce6f0888
MJ
17412018-09-26 Martin Jambor <mjambor@suse.cz>
1742
1743 PR c/87347
1744 * c-parser.c (warn_for_abs): Bail out if TYPE_ARG_TYPES is NULL. Fix
ab20d992 1745 comment.
ce6f0888 1746
9c4a4b3c
DM
17472018-09-17 David Malcolm <dmalcolm@redhat.com>
1748
1749 * c-objc-common.c (range_label_for_type_mismatch::get_text):
1750 Update for new param.
1751 * c-typeck.c (maybe_range_label_for_tree_type_mismatch::get_text):
1752 Likewise.
1753
80c6d1f4
MJ
17542018-09-17 Martin Jambor <mjambor@suse.cz>
1755
1756 PR c/63886
1757 * c-parser.c: (warn_for_abs): New function.
1758 (c_parser_postfix_expression_after_primary): Call it.
1759
4a426e36
BE
17602018-09-13 Bernd Edlinger <bernd.edlinger@hotmail.de>
1761
1762 * c-typeck.c (digest_init): Shorten overlength strings.
1763
6d900107
BE
17642018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
1765
1766 * c-decl.c (finish_decl): Call complete_flexible_array_elts.
1767
b5764229
BE
17682018-09-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
1769
1770 * c-decl.c (finish_decl): Call braced_list_to_string here ...
1771 * c-parser.c (c_parser_declaration_or_fndef): ... instead of here.
1772
22eea6b2
AM
17732018-08-30 Alexander Monakov <amonakov@ispras.ru>
1774
1775 * gimple-parser.c (c_parser_gimple_binary_expression): Accept infix
1776 "__MULT_HIGHPART" for MULT_HIGHPART_EXPR.
1777
85204e23
DM
17782018-08-27 David Malcolm <dmalcolm@redhat.com>
1779
1780 PR 87091
1781 * c-decl.c (implicitly_declare): Update call to
1782 maybe_add_include_fixit to suggest overriding the location, as it
1783 is for a note.
1784 * c-objc-common.c (c_tree_printer): Update for conversion of
1785 show_caret_p to a tri-state.
1786
3d78e008
ML
17872018-08-27 Martin Liska <mliska@suse.cz>
1788
1789 * c-decl.c (locate_old_decl): Use new function
92a285c1
ML
1790 fndecl_built_in_p and remove check for FUNCTION_DECL if
1791 possible.
3d78e008
ML
1792 (diagnose_mismatched_decls): Likewise.
1793 (merge_decls): Likewise.
1794 (warn_if_shadowing): Likewise.
1795 (pushdecl): Likewise.
1796 (implicitly_declare): Likewise.
1797 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
1798 * c-tree.h (C_DECL_ISNT_PROTOTYPE): Likewise.
1799 * c-typeck.c (build_function_call_vec): Likewise.
1800 (convert_arguments): Likewise.
1801
097f82ec
DM
18022018-08-20 David Malcolm <dmalcolm@redhat.com>
1803
1804 PR other/84889
1805 * c-decl.c (pushtag): Add auto_diagnostic_group instance.
1806 (diagnose_mismatched_decls): Likewise, in various places.
1807 (warn_if_shadowing): Likewise.
1808 (implicit_decl_warning): Likewise.
1809 (implicitly_declare): Likewise.
1810 (undeclared_variable): Likewise.
1811 (declare_label): Likewise.
1812 (grokdeclarator): Likewise.
1813 (start_function): Likewise.
1814 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
1815 (c_parser_parameter_declaration): Likewise.
1816 (c_parser_binary_expression): Likewise.
1817 * c-typeck.c (c_expr_sizeof_expr): Likewise.
1818 (parser_build_binary_op): Likewise.
1819 (build_unary_op): Likewise.
1820 (error_init): Likewise.
1821 (pedwarn_init): Likewise.
1822 (warning_init): Likewise.
1823 (convert_for_assignment): Likewise.
1824
96e6ae57
DM
18252018-08-15 David Malcolm <dmalcolm@redhat.com>
1826
1827 * c-objc-common.c: Include "gcc-rich-location.h".
1828 (c_tree_printer): Move implemenation of '%T' to...
1829 (print_type): ...this new function.
1830 (range_label_for_type_mismatch::get_text): New function.
1831 * c-typeck.c (convert_for_assignment): Add type labels to the rhs
1832 range for the various ic_argpass cases.
1833 (class maybe_range_label_for_tree_type_mismatch): New class.
1834 (build_binary_op): Use it when calling binary_op_error.
1835
0cd020ae 18362018-08-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
ab20d992 1837
0cd020ae
PK
1838 * c-decl.c (start_decl): Do not warn if variables is named as main
1839 and is a local variable.
1840
72733314
IS
18412018-08-15 Iain Sandoe <iain@sandoe.co.uk>
1842
1843 PR c/19315
1844 * c-decl.c (finish_decl): Don't add the 'extern' storage class to
1845 objects of unknown size.
1846
23aa9f7c
MS
18472018-08-13 Martin Sebor <msebor@redhat.com>
1848
1849 PR tree-optimization/71625
1850 * c-parser.c (c_parser_declaration_or_fndef): Call
1851 braced_list_to_string.
1852
e5e7e50d
BH
18532018-08-03 Bogdan Harjoc <harjoc@gmail.com>
1854
1855 PR c/86690
1856 * c-typeck.c (lookup_field): Do not use TYPE_LANG_SPECIFIC after
1857 errors.
1858
8a45b051
MS
18592018-08-01 Martin Sebor <msebor@redhat.com>
1860
1861 PR tree-optimization/86650
1862 * c-objc-common.c (c_tree_printer): Move usage of EXPR_LOCATION (t)
1863 and TREE_BLOCK (t) from within percent_K_format to this callsite.
1864
5922dcb5
JJ
18652018-08-01 Jakub Jelinek <jakub@redhat.com>
1866
1867 PR c/85704
1868 * c-typeck.c (init_field_decl_cmp): New function.
1869 (output_pending_init_elements): Use it for field comparisons
1870 instead of pure bit_position comparisons.
1871
9b452033
JJ
18722018-07-12 Jakub Jelinek <jakub@redhat.com>
1873
1874 * c-decl.c (c_decl_attributes): Don't diagnose vars without mappable
1875 type here, instead add "omp declare target implicit" attribute.
1876 (finish_decl): Diagnose vars without mappable type here.
1877
ab20d992
JJ
18782018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
1879 Thomas Schwinge <thomas@codesourcery.com>
829c6349
CLT
1880 Cesar Philippidis <cesar@codesourcery.com>
1881
1882 * c-parser.c (c_parser_omp_clause_name): Add support for finalize
1883 and if_present. Make present_or_{copy,copyin,copyout,create} aliases
1884 to their non-present_or_* counterparts. Make 'self' an alias to
1885 PRAGMA_OACC_CLAUSE_HOST.
1886 (c_parser_oacc_data_clause): Update GOMP mappings for
1887 PRAGMA_OACC_CLAUSE_{COPY,COPYIN,COPYOUT,CREATE,DELETE}. Remove
1888 PRAGMA_OACC_CLAUSE_{SELF,PRESENT_OR_*}.
1889 (c_parser_oacc_all_clauses): Handle finalize and if_present clauses.
1890 Remove support for present_or_* clauses.
1891 (OACC_KERNELS_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
1892 (OACC_PARALLEL_CLAUSE_MASK): Likewise.
1893 (OACC_DECLARE_CLAUSE_MASK): Likewise.
1894 (OACC_DATA_CLAUSE_MASK): Likewise.
1895 (OACC_ENTER_DATA_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
1896 (OACC_EXIT_DATA_CLAUSE_MASK): Add FINALIZE clause.
1897 (OACC_UPDATE_CLAUSE_MASK): Remove SELF, add IF_PRESENT.
1898 (c_parser_oacc_declare): Remove PRESENT_OR_* clauses.
1899 * c-typeck.c (c_finish_omp_clauses): Handle IF_PRESENT and FINALIZE.
1900
e197e64e
KV
19012018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
1902
1903 * c-typeck.c (build_unary_op): Handle ABSU_EXPR;
1904 * gimple-parser.c (c_parser_gimple_statement): Likewise.
1905 (c_parser_gimple_unary_expression): Likewise.
1906
487f2f61
JJ
19072018-06-15 Jakub Jelinek <jakub@redhat.com>
1908
1909 PR c/86093
1910 * c-typeck.c (pointer_diff): Cast both pointers to unqualified types
1911 before doing POINTER_DIFF_EXPR.
1912
e4d44a37
MP
19132018-06-07 Marek Polacek <polacek@redhat.com>
1914
1915 PR c/85318
1916 * c-decl.c (check_for_loop_decls): Add -Wc90-c99-compat warning about
1917 for loop initial declarations.
1918
b67b9225
DP
19192018-05-30 David Pagan <dave.pagan@oracle.com>
1920
1921 PR c/55976
1922 * c-decl.c (grokdeclarator): Update check for return type warnings.
1923 (start_function): Likewise.
1924 (finish_function): Likewise.
1925 * c-typeck.c (c_finish_return): Update check for return type warnings.
1926 Pass OPT_Wreturn_type to pedwarn when appropriate.
1927
c566cc9f
RS
19282018-05-18 Richard Sandiford <richard.sandiford@linaro.org>
1929
1930 * gimple-parser.c (c_parser_gimple_postfix_expression): Remove
1931 __FMA_EXPR handlng.
1932
e4f81565
RS
19332018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
1934
1935 * gimple-parser.c: Include internal-fn.h.
1936 (c_parser_gimple_statement): Treat a leading CPP_DOT as a call.
1937 (c_parser_gimple_call_internal): New function.
1938 (c_parser_gimple_postfix_expression): Use it to handle CPP_DOT.
1939 Fix typos in comment.
1940
79e7b1fe
JJ
19412018-05-10 Jakub Jelinek <jakub@redhat.com>
1942
1943 PR c++/85662
1944 * c-fold.c (c_fully_fold_internal): Use fold_offsetof rather than
1945 fold_offsetof_1, pass TREE_TYPE (expr) as TYPE to it and drop the
1946 fold_convert_loc.
1947 * c-typeck.c (build_unary_op): Use fold_offsetof rather than
1948 fold_offsetof_1, pass argtype as TYPE to it and drop the
1949 fold_convert_loc.
1950
f7584c81
DP
19512018-05-02 David Pagan <dave.pagan@oracle.com>
1952
1953 PR c/30552
1954 * c-decl.c (old_style_parameter_scope): New function.
1955 * c-parser.c (c_parser_postfix_expression): Check for statement
1956 expressions in old-style function parameter list declarations.
1957 * c-parser.h (old_style_parameter_scope): New extern declaration.
1958
b33a0cb3
JJ
19592018-04-25 Jakub Jelinek <jakub@redhat.com>
1960
1961 PR sanitizer/84307
1962 * c-decl.c (build_compound_literal): Call pushdecl (decl) even when
1963 it is not TREE_STATIC.
1964 * c-typeck.c (c_mark_addressable) <case COMPOUND_LITERAL_EXPR>: Mark
1965 not just the COMPOUND_LITERAL_EXPR node itself addressable, but also
1966 its COMPOUND_LITERAL_EXPR_DECL.
1967
c5c5822a
JM
19682018-03-21 Joseph Myers <joseph@codesourcery.com>
1969
1970 * c-parser.c (c_parser_postfix_expression): For __builtin_tgmath
1971 where all functions return the same _FloatN or _FloatNx type,
1972 treat integer types as _Float64 instead of double.
1973
aa1c9429
JJ
19742018-03-21 Jakub Jelinek <jakub@redhat.com>
1975
1976 PR c/84999
1977 * c-typeck.c (build_binary_op): If c_common_type_for_size fails when
1978 building vector comparison, diagnose it and return error_mark_node.
1979
9bb45a95
JJ
19802018-03-15 Jakub Jelinek <jakub@redhat.com>
1981
1982 PR c/84853
1983 * c-typeck.c (build_binary_op) <case RSHIFT_EXPR, case LSHIFT_EXPR>:
1984 If code1 is INTEGER_TYPE, only allow code0 VECTOR_TYPE if it has
1985 INTEGER_TYPE element type.
1986
ada6bad9
DP
19872018-03-13 David Pagan <dave.pagan@oracle.com>
1988
1989 PR c/46921
1990 * c-typeck.c (output_init_element): Ensure field initializer
1991 expression is always evaluated if there are side effects.
1992
849bbdb9
JJ
19932018-03-06 Jakub Jelinek <jakub@redhat.com>
1994
1995 PR c/84721
1996 * c-parser.c (add_debug_begin_stmt): Don't add DEBUG_BEGIN_STMT if
1997 !building_stmt_list_p ().
1998
d74641bd
RS
19992018-02-13 Richard Sandiford <richard.sandiford@linaro.org>
2000
2001 PR c/84305
2002 * c-decl.c (grokdeclarator): Create an anonymous TYPE_DECL
2003 in PARM and TYPENAME contexts too, but attach it to a BIND_EXPR
2004 and include the BIND_EXPR in the list of things that need to be
2005 pre-evaluated.
2006
0444aa9c
NS
20072018-02-09 Nathan Sidwell <nathan@acm.org>
2008
2009 PR c/84293
2010 * c-typeck.c (build_indirect_ref, build_c_cast): Pass expr location
2011 to strict_aliasing_warning.
2012
7c30b12a
PC
20132018-02-02 Paolo Carlini <paolo.carlini@oracle.com>
2014
2015 * c-typeck.c (really_start_incremental_init, push_init_level,
2016 set_nonincremental_init, output_init_element, process_init_element):
2017 Use DECL_UNNAMED_BIT_FIELD.
2018
2be4dfcb
MP
20192018-01-31 Marek Polacek <polacek@redhat.com>
2020
2021 PR c/81779
2022 * c-parser.c (c_parser_compound_statement_nostart): Call
2023 expansion_point_location_if_in_system_header.
2024
bb9869d5
DM
20252018-01-17 David Malcolm <dmalcolm@redhat.com>
2026
2027 PR c++/83814
2028 * c-fold.c (fold_for_warn): Move from c-common.c, reducing to just
2029 the C part.
2030
b4923738
JJ
20312018-01-13 Jakub Jelinek <jakub@redhat.com>
2032
2033 PR c/83801
2034 * c-tree.h (decl_constant_value_1): Add a bool argument.
2035 * c-typeck.c (decl_constant_value_1): Add IN_INIT argument, allow
2036 returning a CONSTRUCTOR if it is true. Use error_operand_p.
2037 (decl_constant_value): Adjust caller.
2038 * c-fold.c (c_fully_fold_internal): If in_init, pass true to
2039 decl_constant_value_1 as IN_INIT. Otherwise, punt if
2040 decl_constant_value returns initializer that has BLKmode or
2041 array type.
2042 (c_fully_fold_internal) <case COMPONENT_REF>: Fold if !lval.
2043
928686b1
RS
20442018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
2045 Alan Hayward <alan.hayward@arm.com>
2046 David Sherwood <david.sherwood@arm.com>
2047
2048 * c-typeck.c (comptypes_internal, build_binary_op): Handle polynomial
2049 TYPE_VECTOR_SUBPARTS.
2050
85ec4feb
JJ
20512018-01-03 Jakub Jelinek <jakub@redhat.com>
2052
2053 Update copyright years.
2054
913884f7
JJ
20552018-01-01 Jakub Jelinek <jakub@redhat.com>
2056
2057 PR c/83595
2058 * c-parser.c (c_parser_braced_init, c_parser_initelt,
2059 c_parser_conditional_expression, c_parser_cast_expression,
2060 c_parser_sizeof_expression, c_parser_alignof_expression,
2061 c_parser_postfix_expression, c_parser_omp_declare_reduction,
2062 c_parser_transaction_expression): Use set_error () method instead
2063 of setting value member to error_mark_node.
2064
c6cfa2bf
MM
20652017-12-28 Michael Meissner <meissner@linux.vnet.ibm.com>
2066
2067 * c-decl.c (header_for_builtin_fn): Add integer rounding _Float<N>
2068 and _Float<N>X built-in functions.
2069
11d29d63
JJ
20702017-12-22 Jakub Jelinek <jakub@redhat.com>
2071
14ec014e
JJ
2072 PR debug/83550
2073 * c-decl.c (finish_struct): Set DECL_SOURCE_LOCATION on
2074 TYPE_STUB_DECL and call rest_of_type_compilation before processing
2075 incomplete vars rather than after it.
2076
11d29d63
JJ
2077 PR debug/83547
2078 * c-typeck.c (c_finish_stmt_expr): Ignore !TREE_SIDE_EFFECTS as
2079 indicator of ({ }), instead skip all trailing DEBUG_BEGIN_STMTs first,
2080 and consider empty ones if there are no other stmts. For
2081 -Wunused-value walk all statements before the one only followed by
2082 DEBUG_BEGIN_STMTs.
2083
170a8bd6 20842017-12-22 Mike Stump <mikestump@comcast.net>
92a285c1 2085 Eric Botcazou <ebotcazou@adacore.com>
170a8bd6
EB
2086
2087 * c-parser.c (c_parser_while_statement): Add unroll parameter and
2088 build ANNOTATE_EXPR if present. Add 3rd operand to ANNOTATE_EXPR.
2089 (c_parser_do_statement): Likewise.
2090 (c_parser_for_statement): Likewise.
2091 (c_parser_statement_after_labels): Adjust calls to above.
2092 (c_parse_pragma_ivdep): New static function.
2093 (c_parser_pragma_unroll): Likewise.
2094 (c_parser_pragma) <PRAGMA_IVDEP>: Add support for pragma Unroll.
2095 <PRAGMA_UNROLL>: New case.
2096
01512446
JJ
20972017-12-19 Jakub Jelinek <jakub@redhat.com>
2098
2099 * c-typeck.c (comptypes_internal, function_types_compatible_p,
2100 perform_integral_promotions, digest_init): Replace Yoda conditions
2101 with typical order conditions.
2102 * c-decl.c (check_bitfield_type_and_width): Likewise.
2103
c65e18d3
BE
21042017-12-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
2105
2106 * c-typeck.c (c_safe_arg_type_equiv_p,
2107 c_safe_function_type_cast_p): New function.
2108 (build_c_cast): Implement -Wcast-function-type.
2109
b7280579
RB
21102017-12-14 Richard Biener <rguenther@suse.de>
2111
2112 PR c/83415
2113 * c-fold.c (c_fully_fold_internal): Treat VIEW_CONVERT_EXPR
2114 like REALPART_EXPR for the behavior of whether its operand
2115 is an lvalue.
2116
49e6a6c0
MP
21172017-12-12 Marek Polacek <polacek@redhat.com>
2118
2119 PR c/82679
2120 * c-decl.c (grokdeclarator): Check declspecs insted of atomicp.
2121
ab20d992 21222017-12-12 Alexandre Oliva <aoliva@redhat.com>
96a95ac1
AO
2123
2124 * c-objc-common.h (LANG_HOOKS_EMITS_BEGIN_STMT): Redefine as true.
2125 * c-parser.c (add_debug_begin_stmt): New.
2126 (c_parser_declaration_or_fndef): Call it.
2127 (c_parser_compound_statement_nostart): Likewise.
2128 (c_parser_statement_after_labels): Likewise.
2129 * c-typeck (c_finish_stmt_expr): Skip begin stmts markers.
2130
4b2b493f
JM
21312017-12-07 Joseph Myers <joseph@codesourcery.com>
2132
2133 * c-decl.c (build_compound_literal): Add parameter alignas_align
2134 and set alignment of decl if nonzero.
2135 * c-parser.c (c_keyword_starts_typename): Allow RID_ALIGNAS.
2136 (c_parser_declspecs): Allow RID_ALIGNAS to follow a type, like a
2137 qualifier.
2138 (c_parser_struct_declaration): Update syntax comment.
2139 (c_parser_type_name): Add alignas_ok argument and pass it to
2140 c_parser_declspecs.
2141 (c_parser_cast_expression): Pass true to c_parser_type_name and
2142 give error if a cast used an _Alignas specifier.
2143 (c_parser_sizeof_expression): Pass true to c_parser_type_name and
2144 give error if sizeof (type-name) used an _Alignas specifier.
2145 (c_parser_alignof_expression): Pass true to c_parser_type_name and
2146 give error if _Alignof (type-name) used an _Alignas specifier.
2147 (c_parser_postfix_expression_after_paren_type): Check specified
2148 alignment for a compound literal and pass it to
2149 build_compound_literal.
2150 * c-parser.h (c_parser_type_name): Update prototype.
2151 * c-tree.h (build_compound_literal): Update prototype.
2152
5d9ae53d
MS
21532017-12-07 Martin Sebor <msebor@redhat.com>
2154
2155 PR c/81544
2156 * c-decl.c (c_decl_attributes): Look up existing declaration and
2157 pass it to decl_attributes.
2158
c79144f8
DM
21592017-12-06 David Malcolm <dmalcolm@redhat.com>
2160
2161 PR c/83236
2162 * c-decl.c (lookup_name_fuzzy): Don't suggest names that are
2163 reserved for use by the implementation.
2164
613bc14f
DM
21652017-12-06 David Malcolm <dmalcolm@redhat.com>
2166
2167 * c-decl.c: Include "c-family/c-spellcheck.h".
2168
05abad4c
ML
21692017-12-05 Martin Liska <mliska@suse.cz>
2170 Jakub Jelinek <jakub@redhat.com>
2171
2172 * c-typeck.c (pointer_diff): Add new argument and instrument
2173 pointer subtraction.
2174 (build_binary_op): Similar for pointer comparison.
2175
cc6534d4
JJ
21762017-12-01 Jakub Jelinek <jakub@redhat.com>
2177
65791f42
JJ
2178 PR c/79153
2179 * c-parser.c: Include tree-iterator.h.
2180 (c_parser_switch_statement): Emit LABEL_EXPR for the break label
2181 into SWITCH_BODY instead of after it and set SWITCH_BREAK_LABEL_P
2182 on it.
2183
cc6534d4
JJ
2184 PR c/83222
2185 * c-tree.h (decl_constant_value_1): Declare.
2186 * c-typeck.c (decl_constant_value_1): New function.
2187 (decl_constant_value): Use it.
2188 * c-fold.c (c_fully_fold_internal): If in_init, use
2189 decl_constant_value_1 instead of decl_constant_value.
2190
5de73c05
JJ
21912017-11-30 Jakub Jelinek <jakub@redhat.com>
2192
2193 * c-parser.c (c_parser_postfix_expression): Use ; instead of ;;.
2194
058f0b9e
JJ
21952017-11-28 Jakub Jelinek <jakub@redhat.com>
2196
2197 PR sanitizer/81275
2198 * c-typeck.c (c_finish_case): Set SWITCH_ALL_CASES_P if
2199 c_switch_covers_all_cases_p returns true.
2200
5e9d6aa4 22012017-11-28 Julia Koval <julia.koval@intel.com>
92a285c1 2202 Sebastian Peryt <sebastian.peryt@intel.com>
5e9d6aa4
JK
2203
2204 * Make-lang.in (c/c-array-notation.o): Remove.
2205 * c-array-notation.c: Delete.
2206 * c-decl.c: Remove cilkplus condition.
2207 * c-parser.c (c_parser_cilk_simd, c_parser_cilk_for,
2208 c_parser_cilk_verify_simd, c_parser_array_notation,
2209 c_parser_cilk_clause_vectorlength, c_parser_cilk_grainsize,
2210 c_parser_cilk_simd_fn_vector_attrs,
2211 c_finish_cilk_simd_fn_tokens): Delete.
2212 (c_parser_declaration_or_fndef): Remove cilkplus condition.
2213 (c_parser_direct_declarator_inner): Ditto.
2214 (CILK_SIMD_FN_CLAUSE_MASK): Delete.
2215 (c_parser_attributes, c_parser_compound_statement,
2216 c_parser_statement_after_labels, c_parser_if_statement,
2217 c_parser_switch_statement, c_parser_while_statement,
2218 c_parser_do_statement, c_parser_for_statement,
2219 c_parser_unary_expression, c_parser_postfix_expression,
2220 c_parser_postfix_expression_after_primary,
2221 c_parser_pragma, c_parser_omp_clause_name, c_parser_omp_all_clauses,
2222 c_parser_omp_for_loop, c_finish_omp_declare_simd): Remove cilkplus
2223 support.
2224 * c-typeck.c (build_array_ref, build_function_call_vec,
2225 convert_arguments,
2226 lvalue_p, build_compound_expr, c_finish_return, c_finish_if_stmt,
2227 c_finish_loop, build_binary_op): Remove cilkplus support.
2228
9e851845
JJ
22292017-11-28 Jakub Jelinek <jakub@redhat.com>
2230
2231 * c-typeck.c (c_start_case): Build SWITCH_EXPR using build2 instead
2232 of build3.
2233
ab20d992 22342017-11-14 Boris Kolpackov <boris@codesynthesis.com>
8c7dbea9
BK
2235
2236 * Make-lang.in (c.install-plugin): Install backend import library.
2237
41521dee
JJ
22382017-11-23 Jakub Jelinek <jakub@redhat.com>
2239
2240 * c-parser.c (c_parser_omp_declare_simd): Reject declare simd in
2241 pragma_stmt context.
2242
ac9effed
EB
22432017-11-23 Mike Stump <mikestump@comcast.net>
2244 Eric Botcazou <ebotcazou@adacore.com>
2245
2246 * c-parser.c (c_parser_while_statement): Pass 3rd operand to
2247 ANNOTATE_EXPR.
2248 (c_parser_do_statement): Likewise.
2249 (c_parser_for_statement): Likewise.
2250
ce95abc4
DM
22512017-11-22 David Malcolm <dmalcolm@redhat.com>
2252
2253 PR c++/62170
2254 * c-objc-common.c (c_tree_printer): Convert penultimate param from
2255 bool to bool *. Within '%T' handling, if showing an "aka", use
2256 "quoted" param to add appropriate quoting.
2257
974aedcc
MP
22582017-11-22 Marek Polacek <polacek@redhat.com>
2259
2260 PR c++/60336
2261 PR middle-end/67239
2262 PR target/68355
2263 * c-decl.c (grokdeclarator): Set DECL_PADDING_P on unnamed bit-fields.
2264
d4300cc6
DM
22652017-11-21 David Malcolm <dmalcolm@redhat.com>
2266
2267 PR c/83056
2268 * c-decl.c (lookup_name_fuzzy): Don't suggest names that came from
2269 earlier failed lookups.
2270
1af4ebf5
MG
22712017-11-21 Marc Glisse <marc.glisse@inria.fr>
2272
2273 * c-fold.c (c_fully_fold_internal): Handle POINTER_DIFF_EXPR.
2274 * c-typeck.c (pointer_diff): Use POINTER_DIFF_EXPR.
2275
26edace6
DM
22762017-11-20 David Malcolm <dmalcolm@redhat.com>
2277
2278 PR c/81404
2279 * c-decl.c: Include "c-family/known-headers.h".
2280 (get_c_name_hint): Rename to get_stdlib_header_for_name and move
2281 to known-headers.cc.
2282 (class suggest_missing_header): Move to known-header.h.
2283 (lookup_name_fuzzy): Call get_c_stdlib_header_for_name rather
2284 than get_c_name_hint.
2285
b1212255
DM
22862017-11-20 David Malcolm <dmalcolm@redhat.com>
2287
2288 * c-decl.c (get_c_name_hint): New function.
2289 (class suggest_missing_header): New class.
2290 (lookup_name_fuzzy): Call get_c_name_hint and use it to
2291 suggest missing headers to the user.
2292
6c7a259b
DM
22932017-11-20 David Malcolm <dmalcolm@redhat.com>
2294
2295 * c-decl.c: Define INCLUDE_UNIQUE_PTR before including system.h.
2296 Include "c-family/name-hint.h"
2297 (implicit_decl_warning): Convert "hint" from
2298 const char * to name_hint. Pass location to
2299 lookup_name_fuzzy. Suppress any deferred diagnostic if the
2300 warning was not printed.
2301 (undeclared_variable): Likewise for "guessed_id".
2302 (lookup_name_fuzzy): Convert return type from const char *
2303 to name_hint. Add location_t param.
2304 * c-parser.c: Define INCLUDE_UNIQUE_PTR before including system.h.
2305 Include "c-family/name-hint.h"
2306 (c_parser_declaration_or_fndef): Convert "hint" from
2307 const char * to name_hint. Pass location to lookup_name_fuzzy.
2308 (c_parser_parameter_declaration): Likewise.
2309
f9c59f7e
JJ
23102017-11-19 Jakub Jelinek <jakub@redhat.com>
2311
2312 PR c/66618
2313 PR c/69960
2314 * c-parser.c (c_parser_omp_atomic): Pass true as LVAL to c_fully_fold
2315 where needed.
2316 * c-typeck.c (build_unary_op, build_modify_expr, build_asm_expr,
2317 handle_omp_array_sections): Likewise.
2318 (digest_init): Don't call decl_constant_value_for_optimization.
2319 * c-tree.h (decl_constant_value_for_optimization): Removed.
2320 * c-fold.c (c_fold_array_ref): New function.
2321 (c_fully_fold_internal): Add LVAL argument, propagate it through
2322 recursive calls. For VAR_P call decl_constant_value and
2323 unshare if not LVAL and either optimizing or IN_INIT. Remove
2324 decl_constant_value_for_optimization calls. If IN_INIT and not LVAL,
2325 fold ARRAY_REF with STRING_CST and INTEGER_CST operands.
2326 (c_fully_fold): Add LVAL argument, pass it through to
2327 c_fully_fold_internal.
2328 (decl_constant_value_for_optimization): Removed.
2329
3ca0dc60
JM
23302017-11-15 Joseph Myers <joseph@codesourcery.com>
2331
2332 PR c/81156
2333 * c-parser.c (check_tgmath_function): New function.
2334 (enum tgmath_parm_kind): New enum.
2335 (c_parser_postfix_expression): Handle __builtin_tgmath.
2336
64a5912c
DM
23372017-10-31 David Malcolm <dmalcolm@redhat.com>
2338
2339 * c-decl.c (implicit_decl_warning): Update for renaming of
2340 pedwarn_at_rich_loc and warning_at_rich_loc.
2341 (implicitly_declare): Likewise for renaming of inform_at_rich_loc.
2342 (undeclared_variable): Likewise for renaming of error_at_rich_loc.
2343 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
2344 (c_parser_struct_or_union_specifier): Likewise for renaming of
2345 pedwarn_at_rich_loc.
2346 (c_parser_parameter_declaration): Likewise for renaming of
2347 error_at_rich_loc.
2348 * c-typeck.c (build_component_ref): Likewise.
2349 (build_unary_op): Likewise for renaming of inform_at_rich_loc.
2350 (pop_init_level): Likewise for renaming of warning_at_rich_loc.
2351 (set_init_label): Likewise for renaming of error_at_rich_loc.
2352
c1136864
RB
23532017-10-30 Richard Biener <rguenther@suse.de>
2354
2355 * gimple-parser.c (c_parser_gimple_statement): Parse conditional
2356 stmts.
2357
ee5fd23a
MM
23582017-10-27 Michael Meissner <meissner@linux.vnet.ibm.com>
2359
2360 * c-decl.c (header_for_builtin_fn): Add support for copysign, fma,
2361 fmax, fmin, and sqrt _Float<N> and _Float<N>X variants.
2362
1a59ccf2
DM
23632017-10-25 David Malcolm <dmalcolm@redhat.com>
2364
2365 PR c/7356
2366 * c-parser.c (c_parser_declaration_or_fndef): Detect missing
2367 semicolons.
2368
bc1a75dd
JJ
23692017-10-25 Jakub Jelinek <jakub@redhat.com>
2370
2371 PR libstdc++/81706
2372 * c-decl.c (merge_decls): Copy "omp declare simd" attributes from
2373 newdecl to corresponding __builtin_ if any.
2374
ff1ff960
PC
23752017-10-24 Paolo Carlini <paolo.carlini@oracle.com>
2376
2377 PR c++/82466
2378 * c-decl.c (diagnose_mismatched_decls): Use
2379 OPT_Wbuiltin_declaration_mismatch.
2380
62e1c678
DM
23812017-10-12 David Malcolm <dmalcolm@redhat.com>
2382
2383 * c-parser.c (c_parser_require): Add "type_is_unique" param and
2384 use it to guard calls to maybe_suggest_missing_token_insertion.
2385 (c_parser_parms_list_declarator): Override default value of new
2386 "type_is_unique" param to c_parser_require.
2387 (c_parser_asm_statement): Likewise.
2388 * c-parser.h (c_parser_require): Add "type_is_unique" param,
2389 defaulting to true.
2390
a92f6726
NS
23912017-10-11 Nathan Sidwell <nathan@acm.org>
2392
2393 * c-decl.c (grokdeclarator): Check HAS_DECL_ASSEMBLER_NAME_P too.
2394
8e6cdc90
RS
23952017-10-10 Richard Sandiford <richard.sandiford@linaro.org>
2396
2397 * c-parser.c (c_parser_cilk_clause_vectorlength): Use wi::to_wide when
2398 operating on trees as wide_ints.
2399 * c-typeck.c (build_c_cast, c_finish_omp_clauses): Likewise.
2400 (c_tree_equal): Likewise.
2401
8139a48e
DM
24022017-10-04 David Malcolm <dmalcolm@redhat.com>
2403
2404 * c-decl.c (push_parm_decl): Store c_parm's location into the
2405 PARAM_DECL.
2406 (build_c_parm): Add "loc" param and store it within the c_parm.
2407 * c-parser.c (struct c_parser): Add "last_token_location" field.
2408 (c_parser_consume_token): Store location of the token into the
2409 new field.
2410 (c_parser_declaration_or_fndef): Store params into DECL_ARGUMENTS
2411 when handling a FUNCTION_DECL, if it doesn't already have them.
2412 (c_parser_parameter_declaration): Generate a location for the
2413 parameter, and pass it to the call to build_c_parm.
2414 * c-tree.h (struct c_parm): Add field "loc".
2415 (build_c_parm): Add location_t param.
2416 * c-typeck.c (get_fndecl_argument_location): New function.
2417 (inform_for_arg): New function.
2418 (convert_for_assignment): Use inform_for_arg when dealing with
2419 ic_argpass.
2420
2a389958
JJ
24212017-09-29 Jakub Jelinek <jakub@redhat.com>
2422
7d386d45
JJ
2423 * c-decl.c (grokfield): Use SET_DECL_C_BIT_FIELD here if
2424 width is non-NULL.
2425 (finish_struct): Test DECL_C_BIT_FIELD instead of DECL_INITIAL,
2426 don't SET_DECL_C_BIT_FIELD here.
2427
2a389958
JJ
2428 PR c/82340
2429 * c-decl.c (build_compound_literal): Use c_apply_type_quals_to_decl
2430 instead of trying to set just TREE_READONLY manually.
2431
ebc6a85e
TV
24322017-09-16 Tom de Vries <tom@codesourcery.com>
2433
2434 PR c/81875
2435 * c-parser.c (c_parser_omp_for_loop): Fold only operands of cond, not
2436 cond itself.
2437
bb75facd
JM
24382017-09-15 Joseph Myers <joseph@codesourcery.com>
2439
2440 PR c/82071
2441 * c-typeck.c (ep_convert_and_check): Just call convert_and_check
2442 for C11.
2443 (build_conditional_expr): For C11, generate result with excess
2444 precision when one argument is an integer and the other is of a
2445 type using excess precision.
2446
1d933576
BE
24472017-09-15 Bernd Edlinger <bernd.edlinger@hotmail.de>
2448
2449 * c-typeck.c (build_c_cast): Implement -Wcast-align=strict.
2450
267bbb6f
MP
24512017-09-13 Marek Polacek <polacek@redhat.com>
2452
2453 PR c/82167
2454 * c-typeck.c (c_expr_sizeof_expr): Use the type of expr.value rather
2455 than expr.original_type.
2456
6836632e
NS
24572017-09-12 Nathan Sidwell <nathan@acm.org>
2458
2459 * c-decl.c (field_decl_cmp, resort_data, resort_field_decl_cmp,
2460 resort_sorted_fields): Moved from c-family/c-common.c.
2461 * c-lang.h (struct sorted_fields_type): Moved from c-family/c-common.h.
2462
e035be33
JM
24632017-09-01 Joseph Myers <joseph@codesourcery.com>
2464
2465 PR c/82071
2466 * c-typeck.c (build_atomic_assign): Handle argument with excess
2467 precision. Ensure any EXCESS_PRECISION_EXPR is present in
2468 argument passed to build_binary_op and convert_for_assignment but
2469 not for call to c_fully_fold.
2470 (build_modify_expr): Do not remove EXCESS_PRECISION_EXPR early.
2471 Ensure build_binary_op is called with argument with original
2472 semantic type. Avoid calling c_fully_fold with an
2473 EXCESS_PRECISION_EXPR from build_binary_op.
2474
d2e05fcb
JJ
24752017-09-01 Jakub Jelinek <jakub@redhat.com>
2476
2477 PR c/81887
2478 * c-parser.c (c_parser_omp_ordered): Handle -fopenmp-simd.
2479
b397965c
RS
24802017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
2481 Alan Hayward <alan.hayward@arm.com>
2482 David Sherwood <david.sherwood@arm.com>
2483
2484 * c-typeck.c (build_binary_op): Use SCALAR_TYPE_MODE.
2485 (c_common_type): Likewise. Use as_a <scalar_mode> when setting
2486 m1 and m2 to the signed equivalent of a fixed-point
2487 SCALAR_TYPE_MODE.
2488
14e18d71
DM
24892017-08-24 David Malcolm <dmalcolm@redhat.com>
2490
2491 * c-tree.h (c_expr::get_location) Use EXPR_HAS_LOCATION rather
2492 than CAN_HAVE_LOCATION_P when determining whether to use the
2493 location_t value within "value".
2494
7f204c0f
DM
24952017-08-21 David Malcolm <dmalcolm@redhat.com>
2496
2497 * c-parser.c (c_parser_expr_list): Use c_expr::get_location ()
2498 rather than peeking the location of the first token.
2499 * c-tree.h (c_expr::get_location): New method.
2500
2f687306
DM
25012017-08-21 David Malcolm <dmalcolm@redhat.com>
2502
2503 * c-typeck.c (build_function_call_vec): Pass arg_loc to call
2504 to check_function_arguments.
2505
3e7b80d7
MP
25062017-08-18 Marek Polacek <polacek@redhat.com>
2507
2508 * c-parser.c (c_parser_postfix_expression): Remove unused code. Update
2509 commentary.
2510
00aa1fa2
L
25112017-08-18 H.J. Lu <hongjiu.lu@intel.com>
2512
2513 PR c/53037
2514 * c-decl.c (merge_decls): Also merge DECL_WARN_IF_NOT_ALIGN.
2515 (check_bitfield_type_and_width): Don't allow bit-field with
2516 warn_if_not_aligned type.
2517
da67acb9
MS
25182017-08-14 Martin Sebor <msebor@redhat.com>
2519
2520 PR c/81117
2521 * c-objc-common.c (c_objc_common_init): Handle 'G'.
2522
bb85aa74
MP
25232017-08-11 Marek Polacek <polacek@redhat.com>
2524
2525 PR c/81795
2526 * c-decl.c (pushtag): Only print inform if the warning was printed.
2527 (grokdeclarator): Likewise.
2528
32129a17
DM
25292017-08-10 David Malcolm <dmalcolm@redhat.com>
2530
2531 * c-parser.c (c_parser_error): Rename to...
2532 (c_parser_error_richloc): ...this, making static, and adding
2533 "richloc" parameter, passing it to the c_parse_error call,
2534 rather than calling c_parser_set_source_position_from_token.
2535 (c_parser_error): Reintroduce, reimplementing in terms of the
2536 above, converting return type from void to bool.
2537 (class token_pair): New class.
2538 (struct matching_paren_traits): New struct.
2539 (matching_parens): New typedef.
2540 (struct matching_brace_traits): New struct.
2541 (matching_braces): New typedef.
2542 (get_matching_symbol): New function.
2543 (c_parser_require): Add param MATCHING_LOCATION, using it to
2544 highlight matching "opening" tokens for missing "closing" tokens.
2545 (c_parser_skip_until_found): Likewise.
2546 (c_parser_static_assert_declaration_no_semi): Convert explicit
2547 parsing of CPP_OPEN_PAREN and CPP_CLOSE_PAREN to use of
2548 class matching_parens, so that the pertinent open parenthesis is
2549 highlighted when there are problems locating the close
2550 parenthesis.
2551 (c_parser_struct_or_union_specifier): Likewise.
2552 (c_parser_typeof_specifier): Likewise.
2553 (c_parser_alignas_specifier): Likewise.
2554 (c_parser_simple_asm_expr): Likewise.
2555 (c_parser_braced_init): Likewise, for matching_braces.
2556 (c_parser_paren_condition): Likewise, for matching_parens.
2557 (c_parser_switch_statement): Likewise.
2558 (c_parser_for_statement): Likewise.
2559 (c_parser_asm_statement): Likewise.
2560 (c_parser_asm_operands): Likewise.
2561 (c_parser_cast_expression): Likewise.
2562 (c_parser_sizeof_expression): Likewise.
2563 (c_parser_alignof_expression): Likewise.
2564 (c_parser_generic_selection): Likewise.
2565 (c_parser_postfix_expression): Likewise for cases RID_VA_ARG,
2566 RID_OFFSETOF, RID_TYPES_COMPATIBLE_P, RID_AT_SELECTOR,
2567 RID_AT_PROTOCOL, RID_AT_ENCODE, reindenting as necessary.
2568 In case CPP_OPEN_PAREN, pass loc_open_paren to the
2569 c_parser_skip_until_found call.
2570 (c_parser_objc_class_definition): Use class matching_parens as
2571 above.
2572 (c_parser_objc_method_decl): Likewise.
2573 (c_parser_objc_try_catch_finally_statement): Likewise.
2574 (c_parser_objc_synchronized_statement): Likewise.
2575 (c_parser_objc_at_property_declaration): Likewise.
2576 (c_parser_oacc_wait_list): Likewise.
2577 (c_parser_omp_var_list_parens): Likewise.
2578 (c_parser_omp_clause_collapse): Likewise.
2579 (c_parser_omp_clause_default): Likewise.
2580 (c_parser_omp_clause_if): Likewise.
2581 (c_parser_omp_clause_num_threads): Likewise.
2582 (c_parser_omp_clause_num_tasks): Likewise.
2583 (c_parser_omp_clause_grainsize): Likewise.
2584 (c_parser_omp_clause_priority): Likewise.
2585 (c_parser_omp_clause_hint): Likewise.
2586 (c_parser_omp_clause_defaultmap): Likewise.
2587 (c_parser_oacc_single_int_clause): Likewise.
2588 (c_parser_omp_clause_ordered): Likewise.
2589 (c_parser_omp_clause_reduction): Likewise.
2590 (c_parser_omp_clause_schedule): Likewise.
2591 (c_parser_omp_clause_num_teams): Likewise.
2592 (c_parser_omp_clause_thread_limit): Likewise.
2593 (c_parser_omp_clause_aligned): Likewise.
2594 (c_parser_omp_clause_linear): Likewise.
2595 (c_parser_omp_clause_safelen): Likewise.
2596 (c_parser_omp_clause_simdlen): Likewise.
2597 (c_parser_omp_clause_depend): Likewise.
2598 (c_parser_omp_clause_map): Likewise.
2599 (c_parser_omp_clause_device): Likewise.
2600 (c_parser_omp_clause_dist_schedule): Likewise.
2601 (c_parser_omp_clause_proc_bind): Likewise.
2602 (c_parser_omp_clause_uniform): Likewise.
2603 (c_parser_omp_for_loop): Likewise.
2604 (c_parser_cilk_clause_vectorlength): Likewise.
2605 (c_parser_cilk_clause_linear): Likewise.
2606 (c_parser_transaction_expression): Likewise.
2607 * c-parser.h (c_parser_require): Add param matching_location with
2608 default UNKNOWN_LOCATION.
2609 (c_parser_error): Convert return type from void to bool.
2610 (c_parser_skip_until_found): Add param matching_location with
2611 default UNKNOWN_LOCATION.
2612
30af3a2b
MP
26132017-08-09 Marek Polacek <polacek@redhat.com>
2614
2615 * c-decl.c (build_enumerator): Use true/false instead of 1/0.
2616 * c-tree.h (build_external_ref): Update declaration.
2617 * c-typeck.c (build_array_ref): Use true/false instead of 1/0.
2618 (build_external_ref): Change the type of a parameter to bool.
2619 (parser_build_binary_op): Use true/false instead of 1/0.
2620 (pointer_diff): Likewise.
2621 (build_modify_expr): Likewise.
2622 (set_designator): Change the type of a parameter to bool.
2623 (set_init_index): Use true/false instead of 1/0.
2624 (set_init_label): Likewise.
2625 (output_init_element): Change the type of a parameter to bool.
2626 (output_pending_init_elements): Use true/false instead of 1/0.
2627 (process_init_element): Likewise.
2628 (build_binary_op): Change the type of a parameter to bool.
2629
296c53ac
MP
26302017-08-09 Marek Polacek <polacek@redhat.com>
2631
2632 PR c/81233
2633 * c-typeck.c (pedwarn_init): Make the function take a variable list.
2634 Call emit_diagnostic_valist instead of pedwarn.
2635 (convert_for_assignment): Unroll the PEDWARN_FOR_ASSIGNMENT macro.
2636 Print the relevant types in diagnostics.
2637
a32c8316
MP
26382017-08-09 Marek Polacek <polacek@redhat.com>
2639
2640 PR c/81417
2641 * c-array-notation.c (fix_builtin_array_notation_fn): Update calls to
ab20d992 2642 build_conditional_expr.
a32c8316
MP
2643 * c-parser.c (c_parser_conditional_expression): Create locations for
2644 EXP1 and EXP2 from their source ranges. Pass the locations down to
2645 build_conditional_expr.
2646 * c-tree.h (build_conditional_expr): Update declaration.
2647 * c-typeck.c (build_conditional_expr): Add location_t parameters.
2648 For -Wsign-compare, also print the types.
2649
314e6352
ML
26502017-08-08 Martin Liska <mliska@suse.cz>
2651
2652 * c-convert.c: Include header files.
2653 * c-typeck.c: Likewise.
2654
577eec56
ML
26552017-08-07 Martin Liska <mliska@suse.cz>
2656
2657 * c-parser.c (c_parser_attributes): Canonicalize name of an
2658 attribute.
2659
f7b6353a
MP
26602017-08-02 Marek Polacek <polacek@redhat.com>
2661
2662 PR c/81289
2663 * c-parser.c (c_parser_unary_expression): Use set_error.
2664
8a6eab34
MP
2665 PR c/81448
2666 PR c/81306
2667 * c-warn.c (warn_for_multistatement_macros): Prevent bogus
2668 warnings. Avoid walking MACRO_MAP_LOCATIONS.
2669
ab20d992 26702017-07-31 Jan Hubicka <hubicka@ucw.cz>
7fef86d3
JH
2671 Martin Liska <mliska@suse.cz>
2672
2673 * c-typeck.c (c_finish_goto_label): Build gimple predict
f7b6353a 2674 statement.
7fef86d3 2675
f34ebeb2
ML
26762017-07-31 Martin Liska <mliska@suse.cz>
2677
2678 PR sanitize/81530
2679 * c-convert.c (convert): Guard condition with flag_sanitize_p
2680 also with current_function_decl non-null equality.
2681 * c-decl.c (grokdeclarator): Likewise.
2682 * c-typeck.c (build_binary_op): Likewise.
2683
8595f67b
MP
26842017-07-25 Marek Polacek <polacek@redhat.com>
2685
2686 * c-decl.c (grokfield): Remove local variable.
2687
d49718d6
MP
26882017-07-25 Marek Polacek <polacek@redhat.com>
2689
2690 PR c/81364
2691 * c-parser.c (c_parser_else_body): Don't warn about multistatement
2692 macro expansion if the body is in { }.
2693 (c_parser_while_statement): Likewise.
2694 (c_parser_for_statement): Likewise.
2695
ff22eb12
NS
26962017-07-18 Nathan Sidwell <nathan@acm.org>
2697
2698 * c-parser.c (c_parser_array_notation): Use TYPE_{MIN,MAX}_VALUE.
2699
eea77d1f
DM
27002017-07-14 David Malcolm <dmalcolm@redhat.com>
2701
2702 * c-decl.c (implicitly_declare): When suggesting a missing
2703 #include, provide a fix-it hint.
2704
b6f43128
DM
27052017-07-06 David Malcolm <dmalcolm@redhat.com>
2706
2707 * c-lang.c (selftest::run_c_tests): Move body to c_family_tests,
2708 and call that instead.
2709 * c-tree.h (selftest::run_c_tests): New decl.
2710
3e2becc4
MP
27112017-06-26 Marek Polacek <polacek@redhat.com>
2712
2713 PR c/80116
2714 * c-parser.c (c_parser_if_body): Set the location of the
2715 body of the conditional after parsing all the labels. Call
2716 warn_for_multistatement_macros.
2717 (c_parser_else_body): Likewise.
2718 (c_parser_switch_statement): Likewise.
2719 (c_parser_while_statement): Likewise.
2720 (c_parser_for_statement): Likewise.
2721 (c_parser_statement): Add a default argument. Save the location
2722 after labels have been parsed.
2723 (c_parser_c99_block_statement): Likewise.
2724
343ae898
RB
27252017-06-19 Richard Biener <rguenther@suse.de>
2726
2727 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
2728 negated _Literals to parse _Literal (int) -1.
2729
45b2222a
ML
27302017-06-13 Martin Liska <mliska@suse.cz>
2731
2732 PR sanitize/78204
2733 * c-convert.c (convert): Use sanitize_flags_p.
2734 * c-decl.c (grokdeclarator): Likewise.
2735 * c-typeck.c (convert_for_assignment): Likewise.
2736 (c_finish_return): Likewise.
2737 (build_binary_op): Likewise.
2738
8ab7005b
JJ
27392017-06-08 Jakub Jelinek <jakub@redhat.com>
2740
2741 PR c/81006
2742 * c-typeck.c (handle_omp_array_sections_1): Convert TYPE_MAX_VALUE
2743 to sizetype before size_binop.
2744
363dc72c
JJ
27452017-06-07 Jakub Jelinek <jakub@redhat.com>
2746
2747 * gimple-parser.c (c_parser_parse_gimple_body): Use TDI_gimple instead
2748 of TDI_generic.
2749
dc949728
MP
27502017-06-06 Marek Polacek <polacek@redhat.com>
2751
2752 PR c/79983
2753 * c-decl.c (start_struct): Use the location of TYPE_STUB_DECL of
2754 ref.
2755 (start_enum): Use the location of TYPE_STUB_DECL of enumtype.
2756
40ffd95f
BE
27572017-06-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
2758
2759 * c-parser.c (c_parser_binary_expression): Implement the
2760 -Wsizeof_pointer_div warning.
2761 (c_parser_postfix_expression): Allow SIZEOF_EXPR as expr.original_code
2762 from a parenthesized expression.
2763 (c_parser_expr_list): Use c_last_sizeof_loc.
2764 * c-tree.h (c_last_sizeof_loc): New external.
2765 * c-typeck.c (c_last_sizeof_loc): New variable.
2766 (c_expr_sizeof_expr, c_expr_sizeof_type): Assign c_last_sizeof_loc.
2767
9fc5e7a4
MM
27682017-05-31 Mikhail Maltsev <maltsevm@gmail.com>
2769
2770 PR testsuite/80580
2771 * gimple-parser.c (c_parser_gimple_if_stmt): Check for empty labels.
2772
f012c8ef
DM
27732017-05-30 David Malcolm <dmalcolm@redhat.com>
2774
2775 * c-objc-common.c (c_tree_printer): Gain bool and const char **
2776 parameters.
2777
3cd211af
MS
27782017-05-24 Martin Sebor <msebor@redhat.com>
2779
2780 PR c/80731
2781 * c-fold.c (c_fully_fold_internal): Adjust.
2782 * c-typeck.c (parser_build_unary_op): Adjust.
2783
fd71a9a2
TS
27842017-05-23 Thomas Schwinge <thomas@codesourcery.com>
2785
2786 * c-parser.c (OACC_KERNELS_CLAUSE_MASK): Add
2787 "PRAGMA_OACC_CLAUSE_NUM_GANGS", "PRAGMA_OACC_CLAUSE_NUM_WORKERS",
2788 "VECTOR_LENGTH".
2789
92fa0f9e
MP
27902017-05-23 Marek Polacek <polacek@redhat.com>
2791
2792 * c-parser.c (c_parser_compound_statement_nostart): Remove redundant
2793 quotes.
2794
d11c168a
JJ
27952017-05-22 Jakub Jelinek <jakub@redhat.com>
2796
2797 * c-fold.c (c_fully_fold_internal): Save the c_fully_fold_internal
2798 result for SAVE_EXPR operand and set SAVE_EXPR_FOLDED_P even if
2799 it returned invariant. Call tree_invariant_p unconditionally
2800 afterwards to decide whether to return expr or op0.
2801
58aca9d9
NS
28022017-05-22 Nathan Sidwell <nathan@acm.org>
2803
2804 * c-decl.c (c_parse_final_cleanups): Drop TDI_tu handling.
2805
7fd549d2
TS
28062017-05-19 Thomas Schwinge <thomas@codesourcery.com>
2807
2808 * c-parser.c (c_parser_omp_clause_default): Handle
2809 "OMP_CLAUSE_DEFAULT_PRESENT".
2810
6ecd2339
BE
28112017-05-18 Bernd Edlinger <bernd.edlinger@hotmail.de>
2812
2813 * config-lang.in (gtfiles): Add c-family/c-format.c.
2814
8a57ecff
NS
28152017-05-18 Nathan Sidwell <nathan@acm.org>
2816
2817 * c-decl.c (pushdecl_top_level): Delete unused function.
2818
6574d78e
MP
28192017-05-18 Marek Polacek <polacek@redhat.com>
2820
2821 * c-decl.c (match_builtin_function_types): Use NULL_TREE instead of 0.
2822 (check_earlier_gotos): Likewise.
2823 (define_label): Likewise.
2824 (pending_xref_error): Likewise.
2825 (smallest_type_quals_location): Likewise.
2826 (grokdeclarator): Likewise.
2827 (grokparms): Likewise.
2828 (identifier_global_value): Likewise.
2829 * c-typeck.c (set_nonincremental_init_from_string): Likewise.
2830 (find_init_member): Likewise.
2831
e3455240
MP
28322017-05-18 Marek Polacek <polacek@redhat.com>
2833
2834 * c-decl.c (start_decl): Use false/true instead of 0/1.
2835 (grokdeclarator): Likewise.
2836 (finish_struct): Likewise.
2837 (start_function): Change the return type to bool. Use false/true
2838 instead of 0/1.
2839 (declspecs_add_qual): Use UNKNOWN_LOCATION instead of 0.
2840 * c-tree.h (start_function): Update.
2841 * c-typeck.c (same_translation_unit_p): Change the return type to bool.
2842 (set_designator): Change the return type to bool. Use false/true
2843 instead of 0/1.
2844
3fa8871b
MP
28452017-05-17 Marek Polacek <polacek@redhat.com>
2846
2847 * c-decl.c: Use NULL_TREE instead of 0 where appropriate.
2848 * c-typeck.c: Likewise.
2849
142473df
MP
28502017-05-17 Marek Polacek <polacek@redhat.com>
2851
2852 PR sanitizer/80659
2853 * c-decl.c (build_compound_literal): Set DECL_ARTIFICIAL and
2854 DECL_IGNORED_P even for non-static compound literals.
2855
1a817418
ML
28562017-05-17 Martin Liska <mliska@suse.cz>
2857
2858 * c-decl.c (c_parse_final_cleanups): Introduce dump_flags_t type and
2859 use it instead of int type.
2860
b2fa0a8b
MP
28612017-05-17 Marek Polacek <polacek@redhat.com>
2862
2863 * c-convert.c (convert): Replace c_save_expr with save_expr. Don't
2864 call c_fully_fold.
2865 (convert) <case COMPLEX_TYPE>: Remove special handling of COMPLEX_TYPEs.
ab20d992 2866 * c-decl.c (grokdeclarator): Replace c_save_expr with save_expr.
b2fa0a8b
MP
2867 * c-fold.c (c_fully_fold_internal): Handle SAVE_EXPR.
2868 * c-parser.c (c_parser_declaration_or_fndef): Replace c_save_expr with
2869 save_expr.
2870 (c_parser_conditional_expression): Likewise.
2871 * c-tree.h (SAVE_EXPR_FOLDED_P): Define.
2872 * c-typeck.c (build_modify_expr): Replace c_save_expr with save_expr.
2873 (process_init_element): Likewise.
2874 (build_binary_op): Likewise.
2875 (handle_omp_array_sections_1): Likewise.
2876
1e47f02b
TS
28772017-05-12 Thomas Schwinge <thomas@codesourcery.com>
2878
2879 * c-parser.c (c_parser_omp_clause_num_gangs)
2880 (c_parser_omp_clause_num_workers)
2881 (c_parser_omp_clause_vector_length): Merge functions into...
2882 (c_parser_oacc_single_int_clause): ... this new function. Adjust
2883 all users.
2884
c24e924f
NS
28852017-05-11 Nathan Sidwell <nathan@acm.org>
2886
2887 * gimple-parser.c: Don't #include tree-dump.h.
2888
c587104e
MM
28892017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
2890
2891 PR testsuite/80580
2892 * gimple-parser.c (c_parser_parse_ssa_name): Validate SSA name base.
2893
67ac9a9d
MM
28942017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
2895
2896 PR testsuite/80580
2897 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
2898 incorrect __MEM syntax.
2899
ac4eb40f
MM
29002017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
2901
2902 PR testsuite/80580
2903 * gimple-parser.c (c_parser_gimple_unary_expression): Check argument
2904 type of unary '*'.
2905
641da50a
NS
29062017-05-09 Nathan Sidwell <nathan@acm.org>
2907
2908 * c-tree.h (pushdecl): Declare.
2909
56d35585
DM
29102017-05-05 David Malcolm <dmalcolm@redhat.com>
2911
2912 * c-decl.c (warn_defaults_to): Replace report_diagnostic
2913 with diagnostic_report_diagnostic.
2914 * c-errors.c (pedwarn_c99): Likewise.
2915 (pedwarn_c90): Likewise.
2916
815d9cc6
XR
29172017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn>
2918
92a285c1 2919 PR c++/80038
815d9cc6
XR
2920 * c-gimplify.c (c_gimplify_expr): Remove calls to
2921 cilk_gimplifY_call_params_in_spawned_fn.
2922
1c4ea66f
DM
29232017-04-25 David Malcolm <dmalcolm@redhat.com>
2924
2925 * c-parser.c (c_parser_struct_or_union_specifier): Add fix-it
2926 hint for removing extra semicolon.
2927
666f7903
JJ
29282017-04-21 Jakub Jelinek <jakub@redhat.com>
2929
2930 PR c/80468
2931 * c-decl.c (finish_declspecs) <case cts_int_n>: If int_n_idx is not
2932 enabled, set specs->type to integer_type_node.
2933
5764ee3c
JW
29342017-04-03 Jonathan Wakely <jwakely@redhat.com>
2935
2936 * c-array-notation.c: Fix typo in comment.
2937
10fa8dfb
MP
29382017-03-29 Marek Polacek <polacek@redhat.com>
2939
2940 PR c/79730
2941 * c-decl.c (finish_decl): Check VAR_P.
2942
a9e4a1a5
JJ
29432017-03-27 Jakub Jelinek <jakub@redhat.com>
2944
2945 PR middle-end/80162
2946 * c-tree.h (c_mark_addressable): Add array_ref_p argument.
2947 * c-typeck.c (c_mark_addressable): Likewise. Look through
2948 VIEW_CONVERT_EXPR unless array_ref_p and VCE is from VECTOR_TYPE
2949 to ARRAY_TYPE.
2950 (build_array_ref): Pass true as array_ref_p to c_mark_addressable.
2951
ee3ff394
MP
29522017-03-23 Marek Polacek <polacek@redhat.com>
2953
2954 * c-tree.h: Remove a C_RID_YYCODE reference.
2955
4d1b8e70
JJ
29562017-03-21 Jakub Jelinek <jakub@redhat.com>
2957
2958 PR c/80097
2959 * c-typeck.c (build_binary_op): Add EXCESS_PRECISION_EXPR only around
2960 optional COMPOUND_EXPR with ubsan instrumentation.
2961
31dc71a8
MP
29622017-03-17 Marek Polacek <polacek@redhat.com>
2963
2964 * c-parser.c: Add C11 references.
2965
d579c385
MP
29662017-03-15 Marek Polacek <polacek@redhat.com>
2967
2968 * c-parser.c (c_parser_enum_specifier): Remove redundant line.
2969
85059a38
MP
29702017-03-11 Marek Polacek <polacek@redhat.com>
2971
2972 * c-decl.c (implicit_decl_warning): Add a comment. Fix formatting.
2973
2f6f187a
DM
29742017-03-10 David Malcolm <dmalcolm@redhat.com>
2975
2976 PR translation/79848
2977 * c-decl.c (declspecs_add_type): Simplify uses of "%<%s%>" to
2978 "%qs".
2979 * c-parser.c (c_parser_oacc_shape_clause): Likewise.
2980
36618428
MP
29812017-03-09 Marek Polacek <polacek@redhat.com>
2982
2983 PR sanitizer/79757
2984 * c-parser.c (c_parser_declaration_or_fndef): Don't sanitize old-style
2985 parameter declarations with initializers.
2986
01e5af5a
JJ
29872017-03-09 Jakub Jelinek <jakub@redhat.com>
2988
2989 PR c/79969
2990 * c-decl.c (start_enum): Adjust DECL_SOURCE_LOCATION of
2991 TYPE_STUB_DECL.
2992
a71dbc63
JJ
29932017-03-07 Jakub Jelinek <jakub@redhat.com>
2994
2995 PR c/79834
2996 * c-parser.c (c_parser_pragma): Use error_at instead of c_parser_error
2997 for "may only be used in compound statements" diagnostics, change it
2998 such that the same translatable string is used for all pragmas. For
2999 PRAGMA_OACC_WAIT use "acc wait" rather than "acc enter data" in the
3000 diagnostics.
3001 (c_parser_omp_cancellation_point, c_parser_omp_target_update,
3002 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Change
3003 "may only be used in compound statements" diagnostics, such that the
3004 same translatable string is used for all pragmas.
3005
1ff4bae6
MP
30062017-03-04 Marek Polacek <polacek@redhat.com>
3007
3008 PR c/79847
3009 * c-decl.c (implicit_decl_warning): Add missing space.
3010
7f5a7d78
MP
30112017-03-03 Marek Polacek <polacek@redhat.com>
3012
3013 PR c/79758
3014 * c-decl.c (store_parm_decls_oldstyle): Check if the element of
3015 current_function_prototype_arg_types is error_mark_node. Fix
3016 formatting. Use TREE_VALUE instead of TREE_TYPE.
3017
883c8f06
JJ
30182017-03-03 Jakub Jelinek <jakub@redhat.com>
3019
79c9b7a8
JJ
3020 PR c/79837
3021 * c-parser.c (c_parser_omp_clause_reduction): Don't mention
3022 %<min%> or %<max%> in the diagnostics, instead mention identifier.
3023 (c_parser_omp_declare_reduction): Don't mention %<min%> in the
3024 diagnostics.
3025
883c8f06
JJ
3026 PR c/79836
3027 * c-parser.c (c_parser_generic_selection): Use %<_Generic%>
3028 instead of %<_Generic>.
3029 (c_parser_omp_ordered): Use %<depend%> instead of %<depend>.
3030 (c_parser_omp_target_exit_data): Use %<release%> instead of
3031 %<release>.
3032
324ff1a0
JJ
30332017-02-28 Jakub Jelinek <jakub@redhat.com>
3034
3035 * c-parser.c (c_parser_asm_statement): Use cond ? G_("...") : G_("...")
3036 instead of just cond ? "..." : "...".
3037 (c_parser_oacc_enter_exit_data): Use %s and ternary operator only
3038 for "enter"/"exit" keyword.
3039 (c_finish_oacc_routine): Don't use %s to supply portions of the
3040 message.
3041
4227c9ad
JJ
30422017-02-24 Jakub Jelinek <jakub@redhat.com>
3043
3044 PR c++/79588
3045 * c-parser.c (c_parser_postfix_expression_after_primary): Don't
3046 handle -Wrestrict here.
3047 * c-typeck.c (build_function_call_vec): Adjust
3048 check_function_arguments caller.
3049
5d972e66
RB
30502017-02-23 Richard Biener <rguenther@suse.de>
3051
3052 PR c/79684
3053 * gimple-parser.c (c_parser_gimple_statement): Use set_error
3054 to initialize c_exprs to return.
3055 (c_parser_gimple_binary_expression): Likewise.
3056 (c_parser_gimple_unary_expression): Likewise.
3057 (c_parser_gimple_postfix_expression): Likewise.
3058
61ac5ebe
MP
30592017-02-22 Marek Polacek <polacek@redhat.com>
3060
3061 PR c/79662
3062 * c-typeck.c (convert_arguments): Handle error_mark_node.
3063
41d1b0b1
PK
30642017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3065
3066 * gimple-parser.c (c_parser_gimple_postfix_expression): Check return
3067 value of c_parser_parse_ssa_name against error_mark_node and emit
3068 error if ssa name is anonymous and written as default definition.
3069
eab1f169
PK
30702017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3071
3072 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
3073 FMA_EXPR.
3074
bcac0b4d
JJ
30752017-02-16 Jakub Jelinek <jakub@redhat.com>
3076
3077 PR c++/79512
3078 * c-parser.c (c_parser_omp_target): For -fopenmp-simd
3079 ignore #pragma omp target even when not followed by identifier.
3080
1be33173
PK
30812017-02-14 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3082
3083 * gimpler-parser.c (c_parser_gimple_statement): Handle ABS_EXPR.
3084 (c_parser_gimple_unary_expression): Likewise.
3085
aa326bfb
JJ
30862017-02-13 Jakub Jelinek <jakub@redhat.com>
3087
3088 * c-parser.c (c_parser_oacc_declare): Add missing space in
3089 diagnostics.
3090
8a398bc5
PK
30912017-02-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3092
3093 PR c/79478
3094 * gimple-parser.c (c_parser_gimple_postfix_expression): Call
3095 set_c_expr_source_range when parsing ssa-name.
3096
3dcde5ef 30972017-02-10 Prasad Ghangal <prasad.ghangal@gmail.com>
ab20d992 3098 Richard Biener <rguenther@suse.de>
3dcde5ef
PG
3099
3100 * gimple-parser.c (c_parser_gimple_binary_expression): Avoid
3101 building IL when arguments are error_mark_node.
3102 (c_parser_gimple_unary_expression): Likewise.
3103 (c_parser_gimple_if_stmt): Likewise.
3104 (c_parser_gimple_switch_stmt): Likewise.
3105 (c_parser_gimple_return_stmt): Likewise.
3106 (c_parser_parse_ssa_name): When name lookup fails do not build
3107 an SSA name. Use undeclared rather than not declared in error
3108 reporting.
3109
192b048b
MP
31102017-02-09 Marek Polacek <polacek@redhat.com>
3111
3112 PR c/79428
3113 * c-parser.c (c_parser_omp_ordered): Call c_parser_skip_to_pragma_eol
3114 instead of c_parser_skip_until_found.
3115
56f71478
JJ
31162017-02-09 Jakub Jelinek <jakub@redhat.com>
3117
3118 PR c/79431
3119 * c-parser.c (c_parser_omp_declare_target): Don't invoke
3120 symtab_node::get on automatic variables.
3121
02889d23
CLT
31222016-02-09 Nathan Sidwell <nathan@codesourcery.com>
3123 Chung-Lin Tang <cltang@codesourcery.com>
3124
3125 * c-parser.c (c_parser_omp_clause_collapse): Disallow tile.
3126 (c_parser_oacc_clause_tile): Disallow collapse. Fix parsing and
3127 semantic checking.
3128 * c-parser.c (c_parser_omp_for_loop): Accept tiling constructs.
3129
7af4b20d
RB
31302017-02-07 Richard Biener <rguenther@suse.de>
3131
3132 * gimple-parser.c (c_parser_gimple_expr_list): Simplify.
3133 (c_parser_gimple_postfix_expression_after_primary):
3134 Do not use c_build_function_call_vec to avoid folding and promotion.
3135 Simplify.
3136
e5e391d6
MO
31372017-01-25 Maxim Ostapenko <m.ostapenko@samsung.com>
3138
3139 PR lto/79061
3140 * c-decl.c (pop_scope): Pass main_input_filename to
3141 build_translation_unit_decl.
3142
c2e84327
DM
31432017-01-24 David Malcolm <dmalcolm@redhat.com>
3144
3145 * c-parser.c: Include "read-rtl-function.h" and
3146 "run-rtl-passes.h".
3147 (c_parser_declaration_or_fndef): Rename "gimple-pass-list" in
3148 grammar to gimple-or-rtl-pass-list. Add rtl-function-definition
3149 production. Update for renaming of field "gimple_pass" to
3150 "gimple_or_rtl_pass". If __RTL was seen, call
3151 c_parser_parse_rtl_body. Convert a timevar_push/pop pair
3152 to an auto_timevar, to cope with early exit.
3153 (c_parser_declspecs): Update RID_GIMPLE handling for renaming of
3154 field "gimple_pass" to "gimple_or_rtl_pass", and for renaming of
3155 c_parser_gimple_pass_list to c_parser_gimple_or_rtl_pass_list.
3156 Handle RID_RTL.
3157 (c_parser_parse_rtl_body): New function.
3158 * c-tree.h (enum c_declspec_word): Add cdw_rtl.
3159 (struct c_declspecs): Rename field "gimple_pass" to
3160 "gimple_or_rtl_pass". Add field "rtl_p".
3161 * gimple-parser.c (c_parser_gimple_pass_list): Rename to...
3162 (c_parser_gimple_or_rtl_pass_list): ...this, updating accordingly.
3163 * gimple-parser.h (c_parser_gimple_pass_list): Rename to...
3164 (c_parser_gimple_or_rtl_pass_list): ...this.
3165
2ebd93e1
MP
31662017-01-20 Marek Polacek <polacek@redhat.com>
3167
3168 PR c/64279
3169 * c-typeck.c (build_conditional_expr): Warn about duplicated branches.
3170
b1c95bb5
RB
31712017-01-13 Richard Biener <rguenther@suse.de>
3172
3173 * gimple-parser.c (c_parser_gimple_compound_statement): Handle
3174 nops.
3175
25329913
RB
31762017-01-13 Richard Biener <rguenther@suse.de>
3177
3178 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
3179 _Literal ( type-name ) number.
3180
6bb4ea5c
RB
31812017-01-12 Richard Biener <rguenther@suse.de>
3182
3183 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
3184 __MEM.
3185
6b5b4e9c
JJ
31862017-01-11 Jakub Jelinek <jakub@redhat.com>
3187
3188 PR c++/72813
3189 * c-decl.c (pop_file_scope): Set flag_syntax_only to 1 after writing
3190 PCH file.
3191
e3252775
RB
31922017-01-11 Richard Biener <rguenther@suse.de>
3193
3194 PR bootstrap/79052
3195 * gimple-parser.c (c_parser_gimple_switch_stmt): Add missing
3196 returns on parse errors.
3197
a9342885
MP
31982017-01-04 Marek Polacek <polacek@redhat.com>
3199
3200 PR c++/64767
3201 * c-parser.c (c_parser_postfix_expression): Mark zero character
3202 constants by setting original_type in c_expr.
3203 * c-typeck.c (parser_build_binary_op): Warn when a pointer is compared
3204 with a zero character constant.
3205 (char_type_p): New function.
3206
5dd9a9d0
DM
32072017-01-04 David Malcolm <dmalcolm@redhat.com>
3208
3209 * c-parser.c (c_parser_declaration_or_fndef): Create a
3210 rich_location at init_loc and parse it to start_init.
3211 (last_init_list_comma): New global.
3212 (c_parser_braced_init): Update last_init_list_comma when parsing
3213 commas. Pass it to pop_init_level. Pass location of closing
3214 brace to pop_init_level.
3215 (c_parser_postfix_expression_after_paren_type): Create a
3216 rich_location at type_loc and parse it to start_init.
3217 (c_parser_omp_declare_reduction): Likewise for loc.
3218 * c-tree.h (start_init): Add rich_location * param.
3219 (pop_init_level): Add location_t param.
3220 * c-typeck.c (struct initializer_stack): Add field
3221 "missing_brace_richloc".
3222 (start_init): Add richloc param, use it to initialize
3223 the stack node's missing_brace_richloc.
3224 (last_init_list_comma): New decl.
3225 (finish_implicit_inits): Pass last_init_list_comma to
3226 pop_init_level.
3227 (push_init_level): When finding missing open braces, add fix-it
3228 hints to the richloc.
3229 (pop_init_level): Add "insert_before" param and pass it
3230 when calling pop_init_level. Add fixits about missing
3231 close braces to any richloc. Use the richloc for the
3232 -Wmissing-braces warning.
3233 (set_designator): Pass last_init_list_comma to pop_init_level.
3234 (process_init_element): Likewise.
3235
cbe34bb5
JJ
32362017-01-01 Jakub Jelinek <jakub@redhat.com>
3237
3238 Update copyright years.
3239
d17680f3
JJ
32402016-12-21 Jakub Jelinek <jakub@redhat.com>
3241
0dba7960
JJ
3242 PR bootstrap/78817
3243 * c-typeck.c (build_function_call_vec): If check_function_arguments
3244 returns true, set TREE_NO_WARNING on CALL_EXPR.
3245
d17680f3
JJ
3246 PR c/77767
3247 * c-decl.c (grokdeclarator): If *expr is non-NULL, append expression
3248 to *expr instead of overwriting it.
3249
aa90531e
RB
32502016-12-20 Richard Biener <rguenther@suse.de>
3251
3252 * gimple-parser.c (c_parser_gimple_compound_statement): Improve
3253 error recovery.
3254 (c_parser_gimple_statement): Only build assigns for non-error
3255 stmts.
3256 (c_parser_gimple_postfix_expression_after): Improve error recovery.
3257
629b3d75
MJ
32582016-12-14 Martin Jambor <mjambor@suse.cz>
3259
3260 * c-parser.c: Include omp-general.h and omp-offload.h instead of
3261 omp-low.h.
3262 (c_finish_oacc_routine): Adjusted call to
3263 get_oacc_fn_attrib, build_oacc_routine_dims and replace_oacc_fn_attrib
3264 to use their new names.
3265 (c_parser_oacc_enter_exit_data): Adjusted call to find_omp_clause to
3266 use its new name.
3267 (c_parser_oacc_update): Likewise.
3268 (c_parser_omp_simd): Likewise.
3269 (c_parser_omp_target_update): Likewise.
3270 * c-typeck.c: Include omp-general.h instead of omp-low.h.
3271 (c_finish_omp_cancel): Adjusted call to find_omp_clause to use its new
3272 name.
3273 (c_finish_omp_cancellation_point): Likewise.
3274 * gimple-parser.c: Do not include omp-low.h
3275
c5af52eb
CP
32762016-12-02 Cesar Philippidis <cesar@codesourcery.com>
3277 James Norris <jnorris@codesourcery.com>
3278
3279 * c-parser.c (c_parser_pragma): Error when PRAGMA_OACC_{ENTER_DATA,
3280 EXIT_DATA,WAIT} are not used in compound statements.
3281 (c_parser_oacc_enter_exit_data): Update diagnostics.
3282
48330c93
BE
32832016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
3284
3285 PR c++/71973
3286 * c-decl.c (diagnose_mismatched_decls): Use
3287 OPT_Wbuiltin_declaration_mismatch here too.
3288
899ca90e 32892016-11-18 Richard Sandiford <richard.sandiford@arm.com>
48330c93
BE
3290 Alan Hayward <alan.hayward@arm.com>
3291 David Sherwood <david.sherwood@arm.com>
899ca90e
RS
3292
3293 * c-decl.c (merge_decls): Use SET_DECL_MODE.
3294 (make_label, finish_struct): Likewise.
3295
1ee62b92 32962016-11-14 Prasad Ghangal <prasad.ghangal@gmail.com>
8e745a17 3297 Richard Biener <rguenther@suse.de>
22b15758 3298
8e745a17
JJ
3299 * Make-lang.in (C_AND_OBJC_OBJS): Add gimple-parser.o.
3300 * config-lang.in (gtfiles): Add c/c-parser.h.
3301 * c-tree.h (enum c_declspec_word): Add cdw_gimple.
3302 (struct c_declspecs): Add gimple_pass member and gimple_p flag.
3303 * c-parser.c (enum c_id_kind, struct c_token,
3304 c_parser_next_token_is, c_parser_next_token_is_not,
3305 c_parser_next_token_is_keyword,
3306 enum c_lookahead_kind, enum c_dtr_syn, enum c_parser_prec):
3307 Split out to ...
3308 * c-parser.h: ... new header.
3309 * c-parser.c: Include c-parser.h and gimple-parser.h.
1ee62b92 3310 (c_parser_peek_token, c_parser_peek_2nd_token,
8e745a17
JJ
3311 c_token_starts_typename, c_parser_next_token_starts_declspecs,
3312 c_parser_next_tokens_start_declaration, c_parser_consume_token,
3313 c_parser_error, c_parser_require, c_parser_skip_until_found,
3314 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
3315 c_parser_type_name): Export.
3316 (c_parser_tokens_buf): New function.
3317 (c_parser_error): Likewise.
3318 (c_parser_set_error): Likewise.
3319 (c_parser_declspecs): Handle RID_GIMPLE.
1ee62b92
PG
3320 (c_parser_declaration_or_fndef): Parse __GIMPLE marked body
3321 via c_parser_parse_gimple_body.
8e745a17
JJ
3322 * c-parser.h (c_parser_peek_token, c_parser_peek_2nd_token,
3323 c_token_starts_typename, c_parser_next_token_starts_declspecs,
3324 c_parser_next_tokens_start_declaration, c_parser_consume_token,
3325 c_parser_error, c_parser_require, c_parser_skip_until_found,
3326 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
3327 c_parser_type_name): Declare.
1ee62b92
PG
3328 (struct c_parser): Declare forward.
3329 (c_parser_tokens_buf): Declare.
8e745a17
JJ
3330 (c_parser_error): Likewise.
3331 (c_parser_set_error): Likewise.
3332 * gimple-parser.c: New file.
3333 * gimple-parser.h: Likewise.
1ee62b92 3334
22b15758
UB
33352016-11-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3336
3337 PR c/35503
3338 * c-parser.c (c_parser_postfix_expression_after_primary): Call
3339 warn_for_restrict.
3340
84ff4775
LCW
33412016-09-11 Le-Chun Wu <lcwu@google.com>
3342 Mark Wielaard <mjw@redhat.com>
3343
3344 * c-decl.c (warn_if_shadowing): Use the warning code corresponding
3345 to the given -Wshadow= variant.
3346
4d0cdd0c
TP
33472016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
3348
3349 * c-typeck.c: Include memmodel.h.
3350
1202f33e
JJ
33512016-10-13 Jakub Jelinek <jakub@redhat.com>
3352
3353 PR target/77957
3354 * c-objc-common.h (LANG_HOOKS_GETDECLS): Use hook_tree_void_null
3355 instead of lhd_return_null_tree_v.
3356
8a14afd0
BS
33572016-10-07 Bernd Schmidt <bschmidt@redhat.com>
3358
3359 PR c++/69733
3360 * c-decl.c (smallest_type_quals_location): New static function.
3361 (grokdeclarator): Try to find the correct location for an ignored
3362 qualifier.
3363
81fea426
MP
33642016-09-26 Marek Polacek <polacek@redhat.com>
3365
3366 PR c/7652
3367 * c-decl.c (pop_scope): Add gcc_fallthrough.
3368
33692016-09-26 Marek Polacek <polacek@redhat.com>
3370
3371 PR c/7652
3372 * c-parser.c (struct c_token): Add flags field.
3373 (c_lex_one_token): Pass it to c_lex_with_flags.
3374 (c_parser_declaration_or_fndef): Turn __attribute__((fallthrough));
3375 into IFN_FALLTHROUGH.
3376 (c_parser_label): Set FALLTHROUGH_LABEL_P on labels. Handle
3377 attribute fallthrough after a case label or default label.
3378 (c_parser_statement_after_labels): Handle RID_ATTRIBUTE.
3379
9a2300e9
MP
33802016-09-24 Marek Polacek <polacek@redhat.com>
3381
3382 PR c/77490
3383 * c-typeck.c (build_unary_op): Warn about bit not on expressions that
3384 have boolean value. Warn about ++/-- on booleans.
3385
7de76362
JJ
33862016-09-23 Jakub Jelinek <jakub@redhat.com>
3387
3388 * c-parser.c (incomplete_record_decls): Remove unnecessary
3389 = vNULL initialization of file scope vec.
3390
5b73d2ab
MP
33912016-09-16 Marek Polacek <polacek@redhat.com>
3392
3393 * c-typeck.c (lvalue_p): Use true and false instead of 1 and 0.
3394
e51fbec3
MP
33952016-09-14 Marek Polacek <polacek@redhat.com>
3396
3397 * c-array-notation.c (create_cmp_incr): Use false instead of 0.
3398 (fix_array_notation_expr): Likewise.
3399 * c-decl.c (finish_decl): Likewise.
3400 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
3401 * c-typeck.c (array_to_pointer_conversion): Use true instead of 1.
3402 (function_to_pointer_conversion): Use false instead of 0.
3403 (convert_lvalue_to_rvalue): Likewise.
3404 (parser_build_unary_op): Likewise.
3405 (build_atomic_assign): Likewise.
3406 (build_unary_op): Change nonconvert parameter type to bool, use
3407 true/false instead of 1/0.
3408 (build_binary_op): Use true instead of 1.
3409
254830ba
DM
34102016-09-13 David Malcolm <dmalcolm@redhat.com>
3411
3412 * c-parser.c (c_parser_declaration_or_fndef): Update for renaming
3413 of add_fixit_insert to add_fixit_insert_before.
3414
4c13ba17
MP
34152016-09-13 Marek Polacek <polacek@redhat.com>
3416
3417 * c-typeck.c (build_unary_op): Rename FLAG parameter to NOCONVERT. Use
3418 it.
3419
54dcdb88
BE
34202016-09-12 Bernd Edlinger <bernd.edlinger@hotmail.de>
3421
3422 PR c++/77496
3423 * c-parser.c (c_parser_conditional_expression): Pass the rightmost
3424 COMPOUND_EXPR to warn_for_omitted_condop.
3425
e5106e27
DM
34262016-09-07 David Malcolm <dmalcolm@redhat.com>
3427
3428 * c-lang.c (LANG_HOOKS_GET_SUBSTRING_LOCATION): Use
3429 c_get_substring_location for this new langhook.
3430
9dc5773f
JJ
34312016-09-02 Jakub Jelinek <jakub@redhat.com>
3432
3433 PR c/65467
3434 * c-parser.c (c_parser_declspecs): Don't sorry about _Atomic if
3435 flag_openmp.
3436 (c_parser_omp_variable_list): Use convert_lvalue_to_rvalue
3437 instead of mark_exp_read on low_bound/length expression.
3438 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_threads,
3439 c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
3440 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
3441 c_parser_omp_clause_num_workers, c_parser_oacc_shape_clause,
3442 c_parser_oacc_clause_tile, c_parser_omp_clause_schedule,
3443 c_parser_omp_clause_vector_length, c_parser_omp_clause_num_teams,
3444 c_parser_omp_clause_thread_limit, c_parser_omp_clause_aligned,
3445 c_parser_omp_clause_linear, c_parser_omp_clause_safelen,
3446 c_parser_omp_clause_simdlen, c_parser_omp_clause_device,
3447 c_parser_omp_clause_dist_schedule): Use convert_lvalue_to_rvalue
3448 instead of mark_expr_read.
3449 (c_parser_omp_declare_reduction): Reject _Atomic qualified types.
3450 * c-objc-common.h (LANG_HOOKS_OMP_CLAUSE_COPY_CTOR,
3451 LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP): Redefine.
3452 * c-tree.h (c_omp_clause_copy_ctor): New prototype.
3453 * c-typeck.c (handle_omp_array_sections_1): Diagnose _Atomic qualified
3454 array section bases outside of depend clause, for depend clause
3455 use convert_lvalue_to_rvalue on the base.
3456 (c_finish_omp_clauses): Reject _Atomic qualified vars in reduction,
3457 linear, aligned, map, to and from clauses.
3458 (c_omp_clause_copy_ctor): New function.
3459
295844f6
MP
34602016-09-01 Marek Polacek <polacek@redhat.com>
3461
3462 PR c/7652
3463 * c-typeck.c (composite_type): Add FALLTHRU comment.
3464
089af25c
DM
34652016-08-31 David Malcolm <dmalcolm@redhat.com>
3466
3467 * c-parser.c (c_parser_declaration_or_fndef): Add trailing space
3468 to the insertion fixits for "struct", "union", and "enum".
3469
f9087798
DM
34702016-08-30 David Malcolm <dmalcolm@redhat.com>
3471
3472 * c-decl.c (implicit_decl_warning): Use add_fixit_replace
3473 rather than add_fixit_misspelled_id.
3474 (undeclared_variable): Likewise.
3475 * c-parser.c (c_parser_declaration_or_fndef): Likewise. Remove
3476 now-redundant "here" params from add_fixit_insert method calls.
3477 (c_parser_parameter_declaration): Likewise.
3478 * c-typeck.c (build_component_ref): Remove now-redundant range
3479 param from add_fixit_replace method calls.
3480
ebef225f
MP
34812016-08-25 Marek Polacek <polacek@redhat.com>
3482
3483 * c-typeck.c (parser_build_binary_op): Pass LHS to
3484 warn_logical_not_parentheses.
3485
fe377a48
MP
34862016-08-25 Marek Polacek <polacek@redhat.com>
3487
3488 PR c/77323
3489 * c-decl.c (declspecs_add_type): Set typespec_word even when __intN
3490 or _FloatN or _FloatNx is not supported.
3491 (finish_declspecs): Set type to integer_type_node when _FloatN or
3492 _FloatNx is not supported.
3493
c65699ef
JM
34942016-08-19 Joseph Myers <joseph@codesourcery.com>
3495
3496 PR c/32187
3497 * c-tree.h (cts_floatn_nx): New enum c_typespec_keyword value.
3498 (struct c_declspecs): Add field floatn_nx_idx.
3499 * c-decl.c (declspecs_add_type, finish_declspecs): Handle _FloatN
3500 and _FloatNx type specifiers.
3501 * c-parser.c (c_keyword_starts_typename, c_token_starts_declspecs)
3502 (c_parser_declspecs, c_parser_attribute_any_word)
3503 (c_parser_objc_selector): Use CASE_RID_FLOATN_NX.
3504 * c-typeck.c (c_common_type): Handle _FloatN and _FloatNx types.
3505 (convert_arguments): Avoid promoting _FloatN and _FloatNx types
3506 narrower than double.
3507
2f1364c2
JJ
35082016-08-12 Jakub Jelinek <jakub@redhat.com>
3509 Martin Liska <mliska@suse.cz>
3510
3511 PR c/67410
3512 * c-typeck.c (set_nonincremental_init_from_string): Use / instead of
3513 % to determine val element to change. Assert that
3514 wchar_bytes * charwidth fits into val array.
3515
191816a3
MP
35162016-08-12 Marek Polacek <polacek@redhat.com>
3517
3518 PR c/7652
3519 * c-parser.c (c_parser_external_declaration): Add FALLTHRU.
3520 (c_parser_postfix_expression): Likewise.
3521 * c-typeck.c (build_unary_op): Adjust fall through comment.
3522 (c_mark_addressable): Likewise.
3523
b95a64bb
JJ
35242016-08-11 Jakub Jelinek <jakub@redhat.com>
3525
3526 PR c/72816
3527 * c-decl.c (grokdeclarator): When adding TYPE_DOMAIN for flexible
3528 array member through typedef, for orig_qual_indirect == 0 clear
3529 orig_qual_type.
3530
895aa8e1
DM
35312016-08-08 David Malcolm <dmalcolm@redhat.com>
3532
3533 PR c/64955
3534 * c-lang.c (LANG_HOOKS_RUN_LANG_SELFTESTS): If CHECKING_P, wire
3535 this up to selftest::run_c_tests.
3536 (selftest::run_c_tests): New function.
3537
0b212d8c
TS
35382016-08-04 Thomas Schwinge <thomas@codesourcery.com>
3539
ae9281fc
TS
3540 * c-parser.c (struct oacc_routine_data): Add error_seen and
3541 fndecl_seen members.
3542 (c_finish_oacc_routine): Use these.
3543 (c_parser_declaration_or_fndef): Adjust.
3544 (c_parser_oacc_routine): Likewise. Support more C language
3545 constructs, and improve diagnostics. Move pragma context
3546 checking...
3547 (c_parser_pragma): ... here.
3548
0b212d8c
TS
3549 * c-parser.c (struct oacc_routine_data): New.
3550 (c_parser_declaration_or_fndef, c_parser_oacc_routine): Use it.
3551 Simplify code.
3552 (c_finish_oacc_routine): Likewise. Don't attach clauses to "omp
3553 declare target" attribute.
3554
76e2c821
JB
35552016-08-01 Jan Beulich <jbeulich@suse.com>
3556
3557 * c-fold.c (c_fully_fold_internal): Also emit shift count
3558 warnings for vector types.
3559 * c-typeck.c (build_binary_op): Likewise.
3560
f618a472
MP
35612016-07-29 Marek Polacek <polacek@redhat.com>
3562
3563 PR c/71742
3564 * c-decl.c (finish_struct): Rephrase an error message.
3565
efd0786f
MP
3566 PR c/71853
3567 * c-parser.c (c_parser_switch_statement): Initialize ce.original_type
3568 to error node for invalid code.
3569
e00dceaf
MP
3570 PR c/71573
3571 * c-decl.c (implicitly_declare): Return decl early not only for
3572 error_mark_nodes, but for anything that is not a FUNCTION_DECL.
3573
673a107a
JJ
35742016-07-29 Jakub Jelinek <jakub@redhat.com>
3575
3576 PR c/71969
3577 * c-decl.c (finish_function): Only set DECL_DISREGARD_INLINE_LIMITS
3578 on GNU extern inline functions.
3579
a5b5c8b6
MP
35802016-07-29 Marek Polacek <polacek@redhat.com>
3581
3582 PR c/71583
3583 * c-parser.c (c_parser_postfix_expression_after_paren_type): Also
3584 check expr.value.
3585
e3fe09c1
UB
35862016-07-22 Uros Bizjak <ubizjak@gmail.com>
3587
3588 * c-typeck.c: Use HOST_WIDE_INT_1 instead of (HOST_WIDE_INT) 1,
3589
7c8f7eaa
DM
35902016-07-20 David Malcolm <dmalcolm@redhat.com>
3591
3592 * c-decl.c (struct edit_distance_traits<cpp_hashnode *>): Move to
3593 spellcheck-tree.h
3594 (best_macro_match): Likewise, converting from a typedef to a
3595 subclass.
3596 (find_closest_macro_cpp_cb): Move to spellcheck-tree.c.
3597 (lookup_name_fuzzy): Update for change of best_macro_match to a
3598 subclass with a ctor that calls cpp_forall_identifiers.
3599
de6a69ee
DM
36002016-07-20 David Malcolm <dmalcolm@redhat.com>
3601
3602 * c-decl.c (implicit_decl_warning): Update for conversion of
3603 return type of lookup_name_fuzzy to const char *.
3604 (undeclared_variable): Likewise.
3605 (lookup_name_fuzzy): Convert return type from tree to
3606 const char *.
3607 * c-parser.c (c_parser_declaration_or_fndef): Update for
3608 conversion of return type of lookup_name_fuzzy to const char *.
3609 (c_parser_parameter_declaration): Likewise.
3610
b1c9c068
CP
36112016-07-15 Cesar Philippidis <cesar@codesourcery.com>
3612
3613 * c-parser.c (c_parser_oacc_declare): Don't scan for
3614 GOMP_MAP_POINTER.
3615 * c-typeck.c (handle_omp_array_sections): Mark data clauses with
3616 GOMP_MAP_FORCE_{PRESENT,TO,FROM,TOFROM} as potentially having
3617 zero-length subarrays.
3618
ddbbcb19
JJ
36192016-07-15 Jakub Jelinek <jakub@redhat.com>
3620
3621 PR c/71858
3622 * c-decl.c (implicit_decl_warning): Use FUZZY_LOOKUP_FUNCTION_NAME
3623 instead of FUZZY_LOOKUP_NAME.
3624 (lookup_name_fuzzy): For FUZZY_LOOKUP_FUNCTION_NAME consider
3625 FUNCTION_DECLs, {VAR,PARM}_DECLs function pointers and macros.
3626
dd36b877
JJ
36272016-07-14 Jakub Jelinek <jakub@redhat.com>
3628
3629 PR c/71858
3630 * c-decl.c (lookup_name_fuzzy): Ignore binding->invisible.
3631
8c681247
TS
36322016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
3633
3634 * c-parser.c (c_parser_generic_selection): Make type of variable
3635 auto_vec.
3636 (c_parser_omp_declare_simd): Likewise.
3637
bf4fa671
TS
36382016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
3639
3640 * c-decl.c (struct c_struct_parse_info): Change member types
3641 from vec to auto_vec.
3642 (start_struct): Adjust.
3643 (finish_struct): Likewise.
3644
557e8c49
JJ
36452016-07-02 Jakub Jelinek <jakub@redhat.com>
3646
3647 PR c/71719
3648 * c-typeck.c (mark_exp_read): Handle VIEW_CONVERT_EXPR.
3649
54d19c3b
TS
36502016-06-29 Thomas Schwinge <thomas@codesourcery.com>
3651
3652 * c-parser.c (c_parser_pragma) <PRAGMA_OMP_CANCELLATION_POINT>:
3653 Move pragma context checking into...
3654 (c_parser_omp_cancellation_point): ... here, and improve
3655 diagnostic messages.
3656 * c-typeck.c (c_finish_omp_cancel)
3657 (c_finish_omp_cancellation_point): Improve diagnostic messages.
3658
152ef731
JJ
36592016-06-29 Jakub Jelinek <jakub@redhat.com>
3660
3661 PR c/71685
3662 * c-typeck.c (c_build_qualified_type): Don't clear
3663 C_TYPE_INCOMPLETE_VARS for the main variant.
3664
36652016-06-28 Martin Sebor <msebor@redhat.com>
4378d117
MS
3666
3667 PR c/71552
3668 * c-typeck.c (output_init_element): Diagnose incompatible types
3669 before non-constant initializers.
3670
e9ac1f86
JJ
36712016-06-28 Jakub Jelinek <jakub@redhat.com>
3672
3673 * Make-lang.in: Don't cat ../stage_current if it does not exist.
3674
277d7ee0
AK
36752016-06-23 Andi Kleen <ak@linux.intel.com>
3676
3677 * Make-lang.in: Add support for autofdo.
3678
1a4f11c8
DM
36792016-06-22 David Malcolm <dmalcolm@redhat.com>
3680
3681 PR c/70339
3682 * c-decl.c: Include spellcheck-tree.h and gcc-rich-location.h.
3683 (implicit_decl_warning): When issuing warnings for implicit
3684 declarations, attempt to provide a suggestion via
3685 lookup_name_fuzzy.
3686 (undeclared_variable): Likewise when issuing errors.
3687 (lookup_name_in_scope): Likewise.
3688 (struct edit_distance_traits<cpp_hashnode *>): New struct.
3689 (best_macro_match): New typedef.
3690 (find_closest_macro_cpp_cb): New function.
3691 (lookup_name_fuzzy): New function.
3692 * c-parser.c: Include gcc-rich-location.h.
3693 (c_token_starts_typename): Split out case CPP_KEYWORD into...
3694 (c_keyword_starts_typename): ...this new function.
3695 (c_parser_declaration_or_fndef): When issuing errors about
3696 missing "struct" etc, add a fixit. For other kinds of errors,
3697 attempt to provide a suggestion via lookup_name_fuzzy.
3698 (c_parser_parms_declarator): When looking ahead to detect typos in
3699 type names, also reject CPP_KEYWORD.
3700 (c_parser_parameter_declaration): When issuing errors about
3701 unknown type names, attempt to provide a suggestion via
3702 lookup_name_fuzzy.
3703 * c-tree.h (c_keyword_starts_typename): New prototype.
3704
5a578671
JM
37052016-06-20 Joseph Myers <joseph@codesourcery.com>
3706
3707 PR c/71601
3708 * c-typeck.c (build_conditional_expr): Return error_mark_node if
3709 c_common_type returns error_mark_node.
3710
3f8257db 37112016-06-19 Martin Sebor <msebor@redhat.com>
aa0db437
MS
3712
3713 PR c/69507
3714 * c-parser.c (c_parser_alignof_expression): Avoid diagnosing
3715 __alignof__ (expression).
3716
6a3f203c
DM
37172016-06-14 David Malcolm <dmalcolm@redhat.com>
3718
3719 * c-typeck.c: Include spellcheck-tree.h rather than spellcheck.h.
3720
264757fb
DM
37212016-06-14 David Malcolm <dmalcolm@redhat.com>
3722
3723 * c-typeck.c (build_component_ref): Simplify fixit code by
3724 using gcc_rich_location::add_fixit_misspelled_id.
3725 (set_init_label): Likewise.
3726
f7e4f2e3
DM
37272016-06-13 David Malcolm <dmalcolm@redhat.com>
3728
3729 * c-parser.c (c_parser_initelt): Provide location of name for new
3730 location_t param of set_init_label.
3731 * c-tree.h (set_init_label): Add location_t param.
3732 * c-typeck.c (set_init_index): Add "fieldname_loc" location_t
3733 param and use it when issuing error messages about unrecognized
3734 field names. Attempt to provide a fixit hint if appropriate,
3735 otherwise update the error message to provide the type name.
3736
4b1ffdb1
TS
37372016-06-10 Thomas Schwinge <thomas@codesourcery.com>
3738
3739 PR c/71381
3740 * c-parser.c (c_parser_omp_variable_list) <OMP_CLAUSE__CACHE_>:
3741 Loosen checking.
3742
44a845ca
MS
37432016-06-08 Martin Sebor <msebor@redhat.com>
3744 Jakub Jelinek <jakub@redhat.com>
3745
3746 PR c++/70507
3747 PR c/68120
3748 * c-typeck.c (convert_arguments): Don't promote last argument
3749 of BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
3750
92a5f2ba
MP
37512016-06-08 Marek Polacek <polacek@redhat.com>
3752
3753 PR c/71418
3754 * c-decl.c (grokdeclarator): Check TYPE_P.
3755
08203f73
MP
3756 PR c/71426
3757 * c-decl.c (get_parm_info): Don't crash on an assert on invalid
3758 code.
3759
6ffd47b7
DM
37602016-06-07 David Malcolm <dmalcolm@redhat.com>
3761
3762 * c-parser.c (c_parser_postfix_expression): In __builtin_offsetof
3763 and structure element reference, capture the location of the
3764 element name token and pass it to build_component_ref.
3765 (c_parser_postfix_expression_after_primary): Likewise for
3766 structure element dereference.
3767 (c_parser_omp_variable_list): Likewise for
3768 OMP_CLAUSE_{_CACHE, MAP, FROM, TO},
3769 * c-tree.h (build_component_ref): Add location_t param.
3770 * c-typeck.c (build_component_ref): Add location_t param
3771 COMPONENT_LOC. Use it, if available, when issuing hints about
3772 mispelled member names to provide a fixit replacement hint.
3773
1f40cff3
MP
37742016-06-06 Marek Polacek <polacek@redhat.com>
3775
3776 PR c/71362
3777 * c-parser.c (c_parser_direct_declarator): Set location.
3778
5545a907
MP
37792016-06-06 Marek Polacek <polacek@redhat.com>
3780
3781 * c-typeck.c (comptypes_internal): Handle comparisons of
3782 INTEGER_TYPE, FIXED_POINT_TYPE, and REAL_TYPE nodes. Don't check
3783 TYPE_REF_CAN_ALIAS_ALL.
3784
b605f663
CLT
37852016-06-03 Chung-Lin Tang <cltang@codesourcery.com>
3786
3787 * c-typeck.c (c_finish_omp_clauses): Mark OpenACC reduction
3788 arguments as addressable when async clause exists.
3789
00631022
JJ
37902016-05-30 Jakub Jelinek <jakub@redhat.com>
3791
3792 PR c++/71349
3793 * c-parser.c (c_parser_omp_for): Don't disallow nowait clause
3794 when combined with target construct.
3795
7211a097
JJ
37962016-05-26 Jakub Jelinek <jakub@redhat.com>
3797
3798 * c-parser.c (c_parser_omp_clause_schedule): Warn if
3799 OMP_CLAUSE_SCHEDULE_CHUNK_EXPR is known not to be positive.
3800
95efe6b6
MP
38012016-05-25 Marek Polacek <polacek@redhat.com>
3802
3803 PR c/71265
3804 * c-decl.c (c_make_fname_decl): Don't check seen_error.
3805
a23faf7a
MP
3806 PR c/71266
3807 * c-decl.c (store_parm_decls_oldstyle): Skip non-PARM_DECLs.
3808
e46c7770
CP
38092016-05-24 Cesar Philippidis <cesar@codesourcery.com>
3810
3811 * c-parser.c (c_parser_oacc_declare): Add support for
3812 GOMP_MAP_FIRSTPRIVATE_POINTER.
3813 * c-typeck.c (handle_omp_array_sections_1): Replace bool is_omp
3814 argument with enum c_omp_region_type ort.
3815 (handle_omp_array_sections): Likewise. Update call to
3816 handle_omp_array_sections_1.
3817 (c_finish_omp_clauses): Add specific errors and warning messages for
3818 OpenACC. Use firsrtprivate pointers for OpenACC subarrays. Update
3819 call to handle_omp_array_sections.
3820
a04e69c0
TS
38212016-05-24 Thomas Schwinge <thomas@codesourcery.com>
3822
3823 * c-parser.c (c_parser_oacc_routine): Tighten syntax checks.
3824
f17a223d
RB
38252016-05-24 Richard Biener <rguenther@suse.de>
3826
3827 PR middle-end/70434
3828 PR c/69504
3829 * c-typeck.c (build_array_ref): Do not complain about indexing
3830 non-lvalue vectors. Adjust for function name change.
3831
79063edd
MS
38322016-05-20 Martin Sebor <msebor@redhat.com>
3833
3834 PR c/71115
3835 * c-typeck.c (error_init): Use
3836 expansion_point_location_if_in_system_header.
3837 (warning_init): Same.
3838
8a40fef3
DM
38392016-05-19 David Malcolm <dmalcolm@redhat.com>
3840
3841 PR c/71171
3842 * c-parser.c (c_parser_generic_selection): Use c_expr::set_error
3843 in error-handling.
3844 (c_parser_postfix_expression): Likewise.
3845 * c-tree.h (c_expr::set_error): New method.
3846 * c-typeck.c (parser_build_binary_op): In error-handling, ensure
3847 that result's range is initialized.
3848
e9892350
JG
38492016-05-17 James Greenhalgh <james.greenhalgh@arm.com>
3850
3851 * c-typeck.c (parser_build_unary_op): Fix formatting.
3852
8fad45f5
MW
38532016-05-16 Matthew Wahab <matthew.wahab@arm.com>
3854
3855 * c-decl.c (grokdeclarator): Remove errmsg and use of
3856 targetm.invalid_return_type.
3857 (grokparms): Remove errmsg and use of
3858 targetm.invalid_parameter_type.
3859
aa4b467b
JM
38602016-05-13 Joseph Myers <joseph@codesourcery.com>
3861
3862 * c-decl.c (grokdeclarator): For C11, discard qualifiers on
3863 function return type.
3864
4f2e1536
MP
38652016-05-12 Marek Polacek <polacek@redhat.com>
3866
3867 PR c/70756
3868 * c-decl.c (build_compound_literal): Pass LOC down to
3869 c_incomplete_type_error.
3870 * c-tree.h (require_complete_type): Adjust declaration.
3871 (c_incomplete_type_error): Likewise.
3872 * c-typeck.c (require_complete_type): Add location parameter, pass it
3873 down to c_incomplete_type_error.
3874 (c_incomplete_type_error): Add location parameter, pass it down to
3875 error_at.
3876 (build_component_ref): Pass location down to c_incomplete_type_error.
3877 (default_conversion): Pass location down to require_complete_type.
3878 (build_array_ref): Likewise.
3879 (build_function_call_vec): Likewise.
3880 (convert_arguments): Likewise.
3881 (build_unary_op): Likewise.
3882 (build_c_cast): Likewise.
3883 (build_modify_expr): Likewise.
3884 (convert_for_assignment): Likewise.
3885 (c_finish_omp_clauses): Likewise.
3886
d6e83a8d
MM
38872016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
3888
3889 PR c/43651
3890 * c-decl.c (declspecs_add_qual): Warn when -Wduplicate-decl-specifier
3891 is enabled.
3892 * c-errors.c (pedwarn_c90): Return true if warned.
3893 * c-tree.h (pedwarn_c90): Change return type to bool.
3894 (enum c_declspec_word): Add new enumerator cdw_atomic.
3895
5c3a10fb
MP
38962016-05-11 Marek Polacek <polacek@redhat.com>
3897
3898 PR c++/71024
3899 * c-decl.c (diagnose_mismatched_decls): Factor out code to
3900 diagnose_mismatched_attributes and call it.
3901
cf68d92c
MP
39022016-05-10 Marek Polacek <polacek@redhat.com>
3903
3904 PR c/70255
3905 * c-decl.c (diagnose_mismatched_decls): Warn for optimize attribute
3906 on a declaration following the definition.
3907
351f85c5
JJ
39082016-05-05 Jakub Jelinek <jakub@redhat.com>
3909
3910 * c-parser.c (c_parser_switch_statement): Add IF_P argument,
3911 parse it through to c_parser_c99_block_statement.
3912 (c_parser_statement_after_labels): Adjust c_parser_switch_statement
3913 caller.
3914
deef7113
MP
39152016-05-04 Marek Polacek <polacek@redhat.com>
3916
3917 * c-parser.c (c_parser_if_statement): Replace OPT_Wparentheses with
3918 OPT_Wdangling_else.
3919
de55efd5
MP
39202016-05-04 Marek Polacek <polacek@redhat.com>
3921
3922 PR c/48778
3923 * c-typeck.c (build_binary_op): Don't issue -Waddress warnings
3924 for macro expansions.
3925
79ce98bc
MP
39262016-05-03 Marek Polacek <polacek@redhat.com>
3927
3928 PR c/70859
3929 * c-typeck.c (build_function_call_vec): Pass LOC and ARG_LOC down to
3930 check_builtin_function_arguments.
3931
fb2647aa
RB
39322016-05-03 Richard Biener <rguenther@suse.de>
3933
3934 * Make-lang.in (cc1-checksum.c): For stage-final re-use
3935 the checksum from the previous stage.
3936
77886428
CP
39372016-05-02 Cesar Philippidis <cesar@codesourcery.com>
3938
3939 * c-parser.c (c_parser_oacc_all_clauses): Update call to
3940 c_finish_omp_clauses.
3941 (c_parser_omp_all_clauses): Likewise.
3942 (c_parser_oacc_cache): Likewise.
3943 (c_parser_oacc_loop): Likewise.
3944 (omp_split_clauses): Likewise.
3945 (c_parser_omp_declare_target): Likewise.
3946 (c_parser_cilk_all_clauses): Likewise.
3947 (c_parser_cilk_for): Likewise.
3948 * c-typeck.c (c_finish_omp_clauses): Replace bool arguments
3949 is_omp, declare_simd, and is_cilk with enum c_omp_region_type ort.
3950
7176a4a0
MP
39512016-05-02 Marek Polacek <polacek@redhat.com>
3952
3953 PR c/70851
3954 * c-decl.c (grokdeclarator): Diagnose when array's size has an
3955 incomplete type.
3956
e7ff0319
CP
39572016-04-29 Cesar Philippidis <cesar@codesourcery.com>
3958
3959 PR middle-end/70626
3960 * c-parser.c (c_parser_oacc_loop): Don't augment mask with
3961 OACC_LOOP_CLAUSE_MASK.
3962 (c_parser_oacc_kernels_parallel): Update call to
3963 c_oacc_split_loop_clauses.
3964
9f405ce1
AM
39652016-04-28 Andrew MacLeod <amacleod@redhat.com>
3966
3967 * c-array-notation.c (fix_builtin_array_notation_fn): Fix final
3968 argument to build_modify_expr in two cases.
3969
c1e1f433
BS
39702016-04-27 Bernd Schmidt <bschmidt@redhat.com>
3971
3972 * c-parser.c (c_parser_postfix_expression_after_primary): Call
3973 warn_for_memset instead of warning directly here.
3974
2448a956
MP
39752016-04-26 Marek Polacek <polacek@redhat.com>
3976
3977 PR c/67784
3978 * c-parser.c (c_parser_maybe_reclassify_token): New function factored
3979 out of ...
3980 (c_parser_for_statement): ... here.
3981 (c_parser_if_statement): Use it.
3982 (c_parser_switch_statement): Use it.
3983 (c_parser_while_statement): Use it.
3984
b02a5e26
MP
3985 PR c/70791
3986 * c-decl.c (pushdecl): Pass LOCUS down to warning.
3987
477d4906
IV
39882016-04-20 Ilya Verbin <ilya.verbin@intel.com>
3989
3990 PR c++/69363
3991 * c-parser.c (c_parser_cilk_all_clauses): Use c_finish_omp_clauses
3992 instead of c_finish_cilk_clauses.
3993 * c-tree.h (c_finish_omp_clauses): Add new default argument.
3994 * c-typeck.c (c_finish_omp_clauses): Add new argument. Allow
3995 floating-point variables in the linear clause for Cilk Plus.
3996
fe37c7af
MM
39972016-04-18 Michael Matz <matz@suse.de>
3998
3999 * c-decl.c (merge_decls): Use SET_DECL_ALIGN and SET_TYPE_ALIGN.
4000 (grokdeclarator, parser_xref_tag, finish_enum): Use SET_TYPE_ALIGN.
4001
949505a9
MP
40022016-04-15 Marek Polacek <polacek@redhat.com>
4003
4004 PR c/70671
4005 * c-typeck.c (build_unary_op): Pass location down to error and
4006 warning call.
4007
dda1bf61
JJ
40082016-04-15 Jakub Jelinek <jakub@redhat.com>
4009
4010 PR c/70436
4011 * c-parser.c (c_parser_pragma): Add IF_P argument, pass it down
4012 where needed.
4013 (c_parser_external_declaration, c_parser_struct_or_union_specifier,
4014 c_parser_parameter_declaration, c_parser_compound_statement_nostart,
4015 c_parser_objc_class_instance_variables, c_parser_objc_methodprotolist):
4016 Adjust c_parser_pragma callers.
4017 (c_parser_statement_after_labels): Likewise. Adjust c_parser_cilk_for
4018 caller.
4019 (c_parser_omp_structured_block): Add IF_P argument, pass it down to
4020 c_parser_statement.
4021 (c_parser_oacc_data, c_parser_oacc_host_data, c_parser_oacc_loop,
4022 c_parser_oacc_kernels_parallel, c_parser_omp_critical,
4023 c_parser_omp_simd, c_parser_omp_for, c_parser_omp_master,
4024 c_parser_omp_ordered, c_parser_omp_parallel, c_parser_omp_single,
4025 c_parser_omp_task, c_parser_omp_taskgroup, c_parser_omp_distribute,
4026 c_parser_omp_teams, c_parser_omp_target_data, c_parser_omp_target,
4027 c_parser_omp_taskloop, c_parser_omp_construct, c_parser_cilk_grainsize,
4028 c_parser_cilk_simd, c_parser_cilk_for): Add IF_P argument, pass it
4029 down where needed.
4030 (c_parser_omp_for_loop): Likewise. Clear IF_P if nbraces.
4031 (c_parser_omp_sections_scope): Adjust c_parser_omp_structured_block
4032 calls.
4033
99cd9857
MP
40342016-04-13 Marek Polacek <polacek@redhat.com>
4035
4036 PR c/70436
4037 * c-parser.c (c_parser_statement_after_labels): Add IF_P argument and
4038 adjust callers.
4039 (c_parser_statement): Likewise.
4040 (c_parser_c99_block_statement): Likewise.
4041 (c_parser_while_statement): Likewise.
4042 (c_parser_for_statement): Likewise.
4043 (c_parser_if_body): Don't set IF_P here.
4044 (c_parser_if_statement): Add IF_P argument. Set IF_P here. Warn
4045 about dangling else here.
4046 * c-tree.h (c_finish_if_stmt): Adjust declaration.
4047 * c-typeck.c (c_finish_if_stmt): Remove NESTED_IF parameter. Don't
4048 warn about dangling else here.
4049
f13355da
MP
40502016-04-04 Marek Polacek <polacek@redhat.com>
4051
4052 PR c/70307
4053 * c-fold.c (c_fully_fold_internal): Handle VEC_COND_EXPR.
4054
5fde6a45
MP
40552016-03-31 Marek Polacek <polacek@redhat.com>
4056
4057 PR c/70297
4058 * c-decl.c (merge_decls): Also set TYPE_ALIGN and TYPE_USER_ALIGN.
4059
4bbf545b
DM
40602016-03-18 David Malcolm <dmalcolm@redhat.com>
4061
4062 PR c/70281
4063 * c-parser.c (c_parser_postfix_expression): Set the source range
4064 for uses of "__builtin_types_compatible_p".
4065
fcc2b74f
JJ
40662016-03-17 Jakub Jelinek <jakub@redhat.com>
4067
4068 PR c/70280
4069 * c-typeck.c (composite_type): Don't count void_list_node
4070 into len, if the list is terminated by void_list_node, start
4071 with void_list_node instead of NULL for newargs. Stop
4072 at void_list_node.
4073
ab4c578f
MP
40742016-03-16 Marek Polacek <polacek@redhat.com>
4075
4076 PR c/70093
4077 * c-typeck.c (build_function_call_vec): Create a TARGET_EXPR for
4078 nested functions returning VM types.
4079
96b3c82d
CP
40802016-03-09 Cesar Philippidis <cesar@codesourcery.com>
4081
4082 * c-parser.c (c_parser_oacc_loop): Update cclauses and clauses
4083 when calling c_finish_omp_clauses.
4084
29b9828f
BS
40852016-03-04 Bernd Schmidt <bschmidt@redhat.com>
4086
4087 PR c/69824
4088 * c-decl.c (get_parm_info): Don't queue implicit function declarations
4089 for later.
4090
7ff6ca38
MP
40912016-03-04 Marek Polacek <polacek@redhat.com>
4092
4093 PR c/69798
4094 * c-parser.c (c_parser_postfix_expression): Call
4095 c_parser_cast_expression rather than c_parser_postfix_expression.
4096
686e2237
JJ
40972016-03-01 Jakub Jelinek <jakub@redhat.com>
4098
4099 PR c/69796
4100 PR c/69974
4101 * c-parser.c (c_parser_translation_unit): Don't change TREE_TYPE
4102 of incomplete decls to error_mark_node.
4103
0b05329b
MP
41042016-02-24 Marek Polacek <polacek@redhat.com>
4105
4106 PR c/69819
4107 * c-decl.c (finish_decl): Don't update the copy of the type of a
4108 different decl type.
4109
067fbd8b
JJ
41102016-02-23 Jakub Jelinek <jakub@redhat.com>
4111
4112 PR objc/69844
4113 * c-parser.c (c_parser_for_statement): Properly handle ObjC classes
4114 in id_kind reclassification.
4115
bf14eba2
JJ
41162016-02-16 Jakub Jelinek <jakub@redhat.com>
4117
4118 PR c/69835
4119 * c-typeck.c (build_binary_op): Revert 2015-09-09 change.
4120
ba539195
JN
41212016-02-16 James Norris <jnorris@codesourcery.com>
4122
4123 PR c/64748
4124 * c-parser.c (c_parser_oacc_data_clause_deviceptr): Allow parms.
4125
16595a1f
BS
41262016-02-12 Bernd Schmidt <bschmidt@redhat.com>
4127
f48dfe98
BS
4128 * c-decl.c (build_null_declspecs): Zero the entire struct.
4129
16595a1f
BS
4130 PR c/69522
4131 * c-parser.c (c_parser_braced_init): New arg outer_obstack. All
4132 callers changed. If nested_p is true, use it to call
4133 finish_implicit_inits.
4134 * c-tree.h (finish_implicit_inits): Declare.
4135 * c-typeck.c (finish_implicit_inits): New function. Move code
4136 from ...
4137 (push_init_level): ... here.
4138 (set_designator, process_init_element): Call finish_implicit_inits.
4139
66756373
JJ
41402016-02-11 Jakub Jelinek <jakub@redhat.com>
4141
4142 PR c/69768
4143 * c-typeck.c (parser_build_binary_op): Strip nops from integer_zerop
4144 arguments for -Waddress warning.
4145
1066e9b5
JJ
41462016-02-04 Jakub Jelinek <jakub@redhat.com>
4147
4148 PR c/69669
4149 * c-decl.c (finish_enum): When honoring mode attribute,
4150 make sure to use proper TYPE_MIN_VALUE and TYPE_MAX_VALUE.
4151
3a5d2ba4
JJ
41522016-01-29 Jakub Jelinek <jakub@redhat.com>
4153
4154 PR debug/69518
4155 * c-decl.c (finish_struct): Clear C_TYPE_INCOMPLETE_VARS in
4156 all type variants, not just TYPE_MAIN_VARIANT.
4157
cbdd8ae0
JJ
41582016-01-27 Jakub Jelinek <jakub@redhat.com>
4159
4160 PR debug/66869
4161 * c-decl.c (c_write_global_declarations_1): Warn with
4162 warn_unused_function if static prototype without definition
4163 is not C_DECL_USED.
4164
fa74a4bc
MP
41652016-01-27 Marek Polacek <polacek@redhat.com>
4166
4167 PR c/68062
4168 * c-typeck.c (build_binary_op) [EQ_EXPR, GE_EXPR]: Promote operand
4169 to unsigned, if needed. Add -Wsign-compare warning.
4170
13f92e8d
JJ
41712016-01-26 Jakub Jelinek <jakub@redhat.com>
4172
4173 PR tree-optimization/69483
4174 * c-parser.c (c_parser_translation_unit): Use FOR_EACH_VEC_ELT.
4175
cd8e73dc 41762016-01-20 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
d25c7690
PK
4177
4178 PR c/24293
4179 * c-tree.h (incomplete_record_decls): Declare.
4180 * c-parser.c (incomplete_record_decls): Define.
4181 (c_parser_translation_unit): Iterate through incomplete_record_decls and
4182 report error if any decl has zero size.
4183 * c-decl.c (finish_decl): Append static decl with incomplete struct/union
4184 or enum type to incomplete_record_decls.
4185
e6d6ec9e
TV
41862016-01-14 Tom de Vries <tom@codesourcery.com>
4187
4188 PR tree-optimization/68773
4189 * c-parser.c (c_parser_oacc_declare, c_parser_omp_declare_target): Don't
4190 set force_output.
4191
00083992
MP
41922016-01-14 Marek Polacek <polacek@redhat.com>
4193
4194 PR c/69262
4195 * c-decl.c (grokdeclarator): Provide more information for invalid
4196 array declarations.
4197
7443cf13
DM
41982016-01-06 David Malcolm <dmalcolm@redhat.com>
4199
4200 * c-parser.c (c_parser_unary_expression): For dereferences, build
4201 a combined location before calling build_indirect_ref, so that
4202 error reports cover the full range, manually updating the c_expr
4203 src_range.
4204
6b131d5b
MP
42052016-01-06 Marek Polacek <polacek@redhat.com>
4206
4207 PR sanitizer/69099
4208 * c-convert.c (convert) [INTEGER_TYPE]: Drop ARG. Don't pass ARG to
4209 ubsan_instrument_float_cast. Fold EXPR. Use NULL_TREE instead of
4210 NULL.
4211
818ab71a
JJ
42122016-01-04 Jakub Jelinek <jakub@redhat.com>
4213
4214 Update copyright years.
4215
2fe0a208
MP
42162016-01-04 Marek Polacek <polacek@redhat.com>
4217
4218 PR c/68908
4219 * c-typeck.c (build_atomic_assign): Improve commentary. Add
4220 optimization to use __atomic_fetch_* built-in if possible.
4221
c7b48c8a
TS
42222015-12-23 Thomas Schwinge <thomas@codesourcery.com>
4223
4224 * c-parser.c (c_parser_oacc_clause_use_device): Merge function
4225 into...
4226 (c_parser_omp_clause_use_device_ptr): ... this function. Adjust
4227 all users.
4228
fda5652f
MP
42292015-12-22 Marek Polacek <polacek@redhat.com>
4230
4231 PR c/69002
4232 * c-typeck.c (build_component_ref): Warn when acessing elements of
4233 atomic structures or unions.
4234
745e411d
DM
42352015-12-21 David Malcolm <dmalcolm@redhat.com>
4236
4237 * c-typeck.c: Include "gcc-rich-location.h".
4238 (build_binary_op): In the two places that call binary_op_error,
4239 create a gcc_rich_location and populate it with the location of
4240 the binary op and its two operands.
4241
94c40e19
DM
42422015-12-16 David Malcolm <dmalcolm@redhat.com>
4243
4244 * c-parser.c (c_parser_statement_after_labels): When calling
4245 c_finish_return, Use the return expression's location if it has
4246 one, falling back to the location of the first token within it.
4247 * c-typeck.c (c_finish_return): When issuing warnings about
4248 the incorrect presence/absence of a return value, issue a note
4249 showing the declaration of the function.
4250
de67c4c3
DM
42512015-12-16 David Malcolm <dmalcolm@redhat.com>
4252
4253 * c-parser.c (struct c_parser): Expand array "tokens_buf" from 2
4254 to 4.
4255 (c_parser_peek_nth_token): New function.
4256 (c_parser_peek_conflict_marker): New function.
4257 (c_parser_error): Detect conflict markers and report them as such.
4258
a10704e1
DM
42592015-12-16 David Malcolm <dmalcolm@redhat.com>
4260
4261 * c-parser.c (c_parser_postfix_expression): Use EXPR_LOC_OR_LOC
4262 to preserve range information for the primary expression
4263 in the call to c_parser_postfix_expression_after_primary.
4264
8062bca6
DM
42652015-12-16 David Malcolm <dmalcolm@redhat.com>
4266
4267 * c-parser.c (c_parser_static_assert_declaration_no_semi): Use the
4268 expression location, falling back on the first token location,
4269 rather than always using the latter.
4270
d06f8b75
MP
42712015-12-16 Marek Polacek <polacek@redhat.com>
4272
4273 PR c/64637
4274 * c-typeck.c (c_process_expr_stmt): Use location of the expression if
4275 available.
4276
2994fb91
MP
42772015-12-15 Marek Polacek <polacek@redhat.com>
4278
4279 PR c/68907
4280 * c-typeck.c (build_atomic_assign): Set TREE_NO_WARNING on an
4281 artificial decl.
4282
a1b93f8d
DM
42832015-12-08 David Malcolm <dmalcolm@redhat.com>
4284
4285 * c-parser.c (c_parser_alignof_expression): Capture location of
4286 closing parenthesis (if any), or of end of unary expression, and
4287 use it to build a src_range for the expression.
4288
46c6e1e2
DM
42892015-12-08 David Malcolm <dmalcolm@redhat.com>
4290
4291 PR c/68757
4292 * c-parser.c (c_parser_get_builtin_args): Add
4293 "out_close_paren_loc" param, and write back to it.
4294 (c_parser_postfix_expression): Capture the closing
4295 parenthesis location for RID_CHOOSE_EXPR,
4296 RID_BUILTIN_CALL_WITH_STATIC_CHAIN, RID_BUILTIN_COMPLEX,
4297 RID_BUILTIN_SHUFFLE and use it to set the source range
4298 for such expressions; within RID_BUILTIN_COMPLEX set
4299 the underlying location.
4300
66189108
MP
43012015-12-07 Marek Polacek <polacek@redhat.com>
4302
4303 PR c/68668
4304 * c-decl.c (grokdeclarator): If ORIG_QUAL_INDIRECT is indirect, use
4305 TREE_TYPE of ORIG_QUAL_TYPE, otherwise decrement ORIG_QUAL_INDIRECT.
4306
f187980b
EB
43072015-12-04 Eric Botcazou <ebotcazou@adacore.com>
4308
4309 * c-tree.h (c_build_va_arg): Adjust prototype.
4310 * c-parser.c (c_parser_postfix_expression): Adjust call to above.
4311 * c-typeck.c (c_build_va_arg): Rename LOC parameter to LOC2, add LOC1
4312 parameter, adjust throughout and issue an error if EXPR is a component
4313 with reverse storage order.
4314
4250754e
JM
43152015-12-02 Jason Merrill <jason@redhat.com>
4316
4317 * c-fold.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
4318 (c_fully_fold_internal, decl_constant_value_for_optimization):
4319 Move from c-common.c.
4320 * c-tree.h: Declare decl_constant_value_for_optimization.
4321 * Make-lang.in (C_AND_OBJC_OBJS): Add c-fold.o.
4322
e9e32ee6
JM
43232015-12-02 Joseph Myers <joseph@codesourcery.com>
4324
4325 PR c/68162
4326 * c-decl.c (grokdeclarator): Set first_non_attr_kind before
4327 following link from declarator to next declarator. Track original
4328 qualified type and pass it to c_build_qualified_type.
4329 * c-typeck.c (c_build_qualified_type): Add arguments
4330 orig_qual_type and orig_qual_indirect.
4331
ff7a55bf
TS
43322015-12-02 Thomas Schwinge <thomas@codesourcery.com>
4333
4334 * c-parser.c (c_parser_omp_clause_name)
4335 (c_parser_oacc_all_clauses): Alphabetical sorting.
4336
657e4e47
JJ
43372015-12-02 Jakub Jelinek <jakub@redhat.com>
4338
4339 PR c/68533
4340 * c-decl.c (get_parm_info): Use b->locus instead of input_location
4341 for diagnostics.
4342
37d5ad46
JB
43432015-12-01 Julian Brown <julian@codesourcery.com>
4344 Cesar Philippidis <cesar@codesourcery.com>
4345 James Norris <James_Norris@mentor.com>
4346
4347 * c-parser.c (c_parser_omp_clause_name): Add use_device support.
4348 (c_parser_oacc_clause_use_device): New function.
4349 (c_parser_oacc_all_clauses): Add use_device support.
4350 (OACC_HOST_DATA_CLAUSE_MASK): New macro.
4351 (c_parser_oacc_host_data): New function.
4352 (c_parser_omp_construct): Add host_data support.
4353 * c-tree.h (c_finish_oacc_host_data): Add prototype.
4354 * c-typeck.c (c_finish_oacc_host_data): New function.
4355 (c_finish_omp_clauses): Add use_device support.
4356
a4850ce9
JH
43572015-11-29 Jan Hubicka <hubicka@ucw.cz>
4358
4359 PR c/67106
4360 * c-decl.c: Set TYPE_PACKED in variants.
4361
b58d3df2
ML
43622015-11-27 Martin Liska <mliska@suse.cz>
4363
4364 PR c++/68312
4365 * c-array-notation.c (fix_builtin_array_notation_fn):
4366 Use release_vec_vec instead of vec::release.
4367 (build_array_notation_expr): Likewise.
4368 (fix_conditional_array_notations_1): Likewise.
4369 (fix_array_notation_expr): Likewise.
4370 (fix_array_notation_call_expr): Likewise.
4371
aec17bfe
JJ
43722015-11-27 Jakub Jelinek <jakub@redhat.com>
4373
4374 PR c/63326
4375 * c-parser.c (c_parser_compound_statement_nostart): If
4376 last_label is true, use pragma_stmt instead of pragma_compound
4377 as second c_parser_pragma argument.
4378 (c_parser_omp_ordered, c_parser_omp_target_update,
4379 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Pass
4380 false as second argument to c_parser_skip_to_pragma_eol after
4381 diagnosing standalone directives used in pragma_stmt context.
4382
688c4de0
IV
43832015-11-24 Ilya Verbin <ilya.verbin@intel.com>
4384
4385 * c-parser.c (c_parser_oacc_declare): Replace "ifdef ENABLE_OFFLOADING"
4386 with "if (ENABLE_OFFLOADING)".
4387
cbd03aee
DM
43882015-11-23 David Malcolm <dmalcolm@redhat.com>
4389
4390 PR objc/68438
4391 * c-parser.c (c_parser_postfix_expression): Set up source ranges
4392 for various Objective-C constructs: Class.name syntax,
4393 @selector(), @protocol(), @encode(), and [] message syntax.
4394
a87a86e1
DM
43952015-11-20 David Malcolm <dmalcolm@redhat.com>
4396
4397 PR 62314
4398 * c-typeck.c (should_suggest_deref_p): New function.
4399 (build_component_ref): Special-case POINTER_TYPE when
4400 generating a "not a structure of union" error message, and
4401 suggest a "->" rather than a ".", providing a fix-it hint.
4402
8ece8dfb
DM
44032015-11-19 David Malcolm <dmalcolm@redhat.com>
4404
4405 * c-typeck.c (lookup_field_fuzzy): Move determination of closest
4406 candidate into a new function, find_closest_identifier.
4407
433068cc
MP
44082015-11-19 Marek Polacek <polacek@redhat.com>
4409
4410 PR c/68412
4411 * c-typeck.c (parser_build_binary_op): Properly handle
4412 C_MAYBE_CONST_EXPR before calling warn_tautological_cmp.
4413
bef08b71
DM
44142015-11-17 David Malcolm <dmalcolm@redhat.com>
4415
4416 * c-parser.c (set_c_expr_source_range): Bulletproof both
4417 overloaded implementations against NULL expr->value.
4418 (c_parser_braced_init): Set src_range for "ret" to a sane pair of
4419 values.
4420 (c_parser_unary_expression): Likewise when handling addresses of
4421 labels.
4422 (c_parser_postfix_expression): Likewise for statement expressions,
4423 for __FUNCTION__, __PRETTY_FUNCTION_ and __func__ keywords, for
4424 __builtin_va_arg, and for __builtin_offset_of.
4425 (c_parser_postfix_expression_after_paren_type): Initialize expr's
4426 src_range using the range of the braced initializer.
4427 (c_parser_transaction_expression): Set src_range for "ret" to a
4428 sane pair of values.
4429
fff77217
KY
44302015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
4431
4432 * c-parser.c (c_finish_omp_declare_simd): Look for
4433 "simd" attribute as well. Update error message.
4434
1d899da2
TS
44352015-11-14 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
4436
4437 * c-parser.c (c_parser_omp_declare_target): Adjust.
4438
e4606348
JJ
44392015-11-14 Jakub Jelinek <jakub@redhat.com>
4440
4441 * c-typeck.c (c_finish_omp_clauses): Don't mark
4442 GOMP_MAP_FIRSTPRIVATE_POINTER decls addressable.
4443
3e636daf
MP
44442015-11-14 Marek Polacek <polacek@redhat.com>
4445
4446 * c-decl.c: Use RECORD_OR_UNION_TYPE_P throughout.
4447 * c-typeck.c: Likewise.
4448
ebedc9a3
DM
44492015-11-13 David Malcolm <dmalcolm@redhat.com>
4450
4451 * c-decl.c (warn_defaults_to): Pass line_table to
4452 rich_location ctor.
4453 * c-errors.c (pedwarn_c99): Likewise.
4454 (pedwarn_c90): Likewise.
4455 * c-parser.c (set_c_expr_source_range): New functions.
4456 (c_token::get_range): New method.
4457 (c_token::get_finish): New method.
4458 (c_parser_expr_no_commas): Call set_c_expr_source_range on the ret
4459 based on the range from the start of the LHS to the end of the
4460 RHS.
4461 (c_parser_conditional_expression): Likewise, based on the range
4462 from the start of the cond.value to the end of exp2.value.
4463 (c_parser_binary_expression): Call set_c_expr_source_range on
4464 the stack values for TRUTH_ANDIF_EXPR and TRUTH_ORIF_EXPR.
4465 (c_parser_cast_expression): Call set_c_expr_source_range on ret
4466 based on the cast_loc through to the end of the expr.
4467 (c_parser_unary_expression): Likewise, based on the
4468 op_loc through to the end of op.
4469 (c_parser_sizeof_expression) Likewise, based on the start of the
4470 sizeof token through to either the closing paren or the end of
4471 expr.
4472 (c_parser_postfix_expression): Likewise, using the token range,
4473 or from the open paren through to the close paren for
4474 parenthesized expressions.
4475 (c_parser_postfix_expression_after_primary): Likewise, for
4476 various kinds of expression.
4477 * c-tree.h (struct c_expr): Add field "src_range".
4478 (c_expr::get_start): New method.
4479 (c_expr::get_finish): New method.
4480 (set_c_expr_source_range): New decls.
4481 * c-typeck.c (parser_build_unary_op): Call set_c_expr_source_range
4482 on ret for prefix unary ops.
4483 (parser_build_binary_op): Likewise, running from the start of
4484 arg1.value through to the end of arg2.value.
4485
ec8b536f
MP
44862015-11-13 Marek Polacek <polacek@redhat.com>
4487
4488 PR c/68320
4489 * c-parser.c (c_parser_for_statement): Treat unknown tokens as IDs.
4490
277fe616
DM
44912015-11-13 David Malcolm <dmalcolm@redhat.com>
4492
4493 * c-typeck.c: Include spellcheck.h.
4494 (lookup_field_fuzzy_find_candidates): New function.
4495 (lookup_field_fuzzy): New function.
4496 (build_component_ref): If the field was not found, try using
4497 lookup_field_fuzzy and potentially offer a suggestion.
4498
6e232ba4
JN
44992015-11-12 James Norris <jnorris@codesourcery.com>
4500 Joseph Myers <joseph@codesourcery.com>
4501
4502 * c-parser.c (c_parser_pragma): Handle PRAGMA_OACC_DECLARE.
4503 (c_parser_omp_clause_name): Handle 'device_resident' clause.
4504 (c_parser_oacc_data_clause): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
4505 and PRAGMA_OMP_CLAUSE_LINK.
4506 (c_parser_oacc_all_clauses): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
4507 and PRAGMA_OACC_CLAUSE_LINK.
4508 (OACC_DECLARE_CLAUSE_MASK): New definition.
4509 (c_parser_oacc_declare): New function.
4510
9be4f715
MP
45112015-11-12 Marek Polacek <polacek@redhat.com>
4512
4513 PR c/67784
4514 * c-parser.c (c_parser_for_statement): Reclassify the token in
4515 a correct scope.
4516
e78bede6
MP
45172015-11-11 Marek Polacek <polacek@redhat.com>
4518
4519 PR c/68107
4520 PR c++/68266
4521 * c-decl.c (grokdeclarator): Call valid_array_size_p. Remove code
4522 checking the size of an array.
4523
69f293c9
AM
45242015-11-11 Andrew MacLeod <amacleod@redhat.com>
4525
4526 * c-array-notation.c: Remove unused header files.
4527 * c-aux-info.c: Likewise.
4528 * c-convert.c: Likewise.
4529 * c-decl.c: Likewise.
4530 * c-errors.c: Likewise.
4531 * c-lang.c: Likewise.
4532 * c-objc-common.c: Likewise.
4533 * c-parser.c: Likewise.
4534 * c-typeck.c: Likewise.
4535 * gccspec.c: Likewise.
4536
3a40d81d
NS
45372015-11-09 Thomas Schwinge <thomas@codesourcery.com>
4538 Cesar Philippidis <cesar@codesourcery.com>
4539 James Norris <jnorris@codesourcery.com>
4540 Julian Brown <julian@codesourcery.com>
4541 Nathan Sidwell <nathan@codesourcery.com>
4542
3a40d81d
NS
4543 * c-parser.c (c_parser_declaration_or_fndef): Add OpenACC
4544 routine arg.
4545 (c_parser_declaration_or_fndef): Call c_finish_oacc_routine.
4546 (c_parser_pragma): Parse 'acc routine'.
4547 (OACC_ROUTINE_CLAUSE_MARK): Define.
4548 (c_parser_oacc_routine, (c_finish_oacc_routine): New.
4549
fc402eec
AA
45502015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
4551
4552 PR debug/67192
4553 * c-typeck.c (c_finish_loop): For unconditional loops, set the
4554 location of the backward-goto to the start of the loop body.
4555
f6b0b3db
AA
45562015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
4557
4558 PR debug/67192
4559 * c-parser.c (c_parser_while_statement): Finish the loop before
4560 parsing ahead for misleading indentation.
4561 (c_parser_for_statement): Likewise.
4562
ee45a32d
EB
45632015-11-08 Eric Botcazou <ebotcazou@adacore.com>
4564
4565 * c-decl.c (finish_struct): If the structure has reverse storage
4566 order, rewrite the type of array fields with scalar component. Call
4567 maybe_apply_pragma_scalar_storage_order on entry.
4568 * c-typeck.c (build_unary_op) <ADDR_EXPR>: Remove left-overs. Issue
4569 errors on bit-fields and reverse SSO here and not...
4570 (c_mark_addressable): ...here.
4571 (output_init_element): Adjust call to initializer_constant_valid_p.
4572 (c_build_qualified_type): Propagate TYPE_REVERSE_STORAGE_ORDER.
4573
8a645150
DM
45742015-11-06 David Malcolm <dmalcolm@redhat.com>
4575
4576 * c-decl.c (warn_defaults_to): Update for change in signature
4577 of diagnostic_set_info.
4578 * c-errors.c (pedwarn_c99): Likewise.
4579 (pedwarn_c90): Likewise.
4580 * c-objc-common.c (c_tree_printer): Update for new "caret_p" param
4581 for textinfo::set_location.
4582
7a5e4956
CP
45832015-11-05 Cesar Philippidis <cesar@codesourcery.com>
4584 Thomas Schwinge <thomas@codesourcery.com>
4585 James Norris <jnorris@codesourcery.com>
4586
4587 * c-parser.c (c_parser_omp_clause_name): Add support for
4588 PRAGMA_OACC_CLAUSE_INDEPENDENT and PRAGMA_OACC_CLAUSE_TILE.
4589 (c_parser_omp_clause_default): Add is_oacc argument. Handle
4590 default(none) in OpenACC.
4591 (c_parser_oacc_shape_clause): Allow pointer variables as gang static
4592 arguments.
4593 (c_parser_oacc_clause_tile): New function.
4594 (c_parser_oacc_all_clauses): Add support for OMP_CLAUSE_DEFAULT,
4595 OMP_CLAUSE_INDEPENDENT and OMP_CLAUSE_TILE.
4596 (OACC_LOOP_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_{PRIVATE,INDEPENDENT,
4597 TILE}.
4598 (OACC_KERNELS_MASK): Add PRAGMA_OACC_CLAUSE_DEFAULT.
4599 (OACC_PARALLEL_MASK): Add PRAGMA_OACC_CLAUSE_{DEFAULT,PRIVATE,
4600 FIRSTPRIVATE}.
4601 (c_parser_omp_all_clauses): Update call to c_parser_omp_clause_default.
4602 (c_parser_oacc_update): Update the error message for missing clauses.
4603 * c-typeck.c (c_finish_omp_clauses): Add support for OMP_CLAUSE_TILE
4604 and OMP_CLAUSE_INDEPENDENT.
4605
bfcfbfa0
MP
46062015-11-05 Marek Polacek <polacek@redhat.com>
4607
4608 PR c/68090
4609 * c-parser.c (c_parser_postfix_expression_after_paren_type): Don't
4610 deal with pre-evaluation on invalid types.
4611
e01d41e5
JJ
46122015-11-05 Jakub Jelinek <jakub@redhat.com>
4613 Ilya Verbin <ilya.verbin@intel.com>
4614
4615 * c-parser.c: Include context.h and gimple-expr.h.
4616 (c_parser_omp_clause_schedule): Parse schedule modifiers, diagnose
4617 monotonic together with nonmonotonic.
4618 (c_parser_omp_for_loop): Call c_omp_check_loop_iv. Call add_stmt here.
4619 (OMP_DISTRIBUTE_CLAUSE_MASK): Add lastprivate clause.
4620 (c_parser_omp_target_data, c_parser_omp_target_enter_data,
4621 c_parser_omp_target_exit_data): Allow GOMP_MAP_ALWAYS_POINTER.
4622 (c_parser_omp_target): Likewise. Evaluate num_teams and thread_limit
4623 expressions on combined target teams before the target.
4624 (c_parser_omp_declare_target): If decl has "omp declare target" or
4625 "omp declare target link" attribute, and cgraph or varpool node already
4626 exists, then set corresponding flags. Call c_finish_omp_clauses
4627 in the parenthesized extended-list syntax case.
4628 * c-decl.c (c_decl_attributes): Don't diagnose block scope vars inside
4629 declare target.
4630 * c-typeck.c (handle_omp_array_sections_1): Allow non-zero low-bound
4631 on OMP_CLAUSE_REDUCTION array sections.
4632 (handle_omp_array_sections): Encode low-bound into the MEM_REF, either
4633 into the constant offset, or for variable low-bound using
4634 POINTER_PLUS_EXPR. For structure element based array sections use
4635 GOMP_MAP_ALWAYS_POINTER instead of GOMP_MAP_FIRSTPRIVATE_POINTER.
4636 (c_finish_omp_clauses): Drop generic_field_head, structure
4637 elements are now always mapped even as array section bases,
4638 diagnose same var in data sharing and mapping clauses. Diagnose if
4639 linear step on declare simd is neither a constant nor a uniform
4640 parameter. Look through POINTER_PLUS_EXPR for array section
4641 reductions. Diagnose the same var or function appearing multiple
4642 times on the same directive. Fix up wording for the to clause if t
4643 is neither a FUNCTION_DECL nor a VAR_DECL. Diagnose nonmonotonic
4644 modifier on kinds other than dynamic or guided or nonmonotonic
4645 modifier together with ordered clause.
4646
4bf9e5a8
TS
46472015-11-03 Thomas Schwinge <thomas@codesourcery.com>
4648 Chung-Lin Tang <cltang@codesourcery.com>
4649
4650 * c-parser.c (c_parser_omp_construct): Handle PRAGMA_OACC_ATOMIC.
4651
2adfab87
AM
46522015-10-29 Andrew MacLeod <amacleod@redhat.com>
4653
4654 * c-array-notation.c: Reorder #include's and remove duplicates.
4655 * c-aux-info.c: Likewise.
4656 * c-convert.c: Likewise.
4657 * c-decl.c: Likewise.
4658 * c-errors.c: Likewise.
4659 * c-lang.c: Likewise.
4660 * c-objc-common.c: Likewise.
4661 * c-parser.c: Likewise.
4662 * c-typeck.c: Likewise.
4663
e922069e
JW
46642015-10-26 Jim Wilson <jim.wilson@linaro.org>
4665
4666 PR debug/66068
4667 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
4668 after calling build_qualified_type.
4669
765dd391
CP
46702015-10-27 Cesar Philippidis <cesar@codesourcery.com>
4671 Thomas Schwinge <thomas@codesourcery.com>
4672 James Norris <jnorris@codesourcery.com>
4673 Joseph Myers <joseph@codesourcery.com>
4674 Julian Brown <julian@codesourcery.com>
4675 Bernd Schmidt <bschmidt@redhat.com>
4676
4677 * c-parser.c (c_parser_oacc_shape_clause): New.
4678 (c_parser_oacc_simple_clause): New.
4679 (c_parser_oacc_all_clauses): Add auto, gang, seq, vector, worker.
4680 (OACC_LOOP_CLAUSE_MASK): Add gang, worker, vector, auto, seq.
4681
88bae6f4
TS
46822015-10-27 Thomas Schwinge <thomas@codesourcery.com>
4683 James Norris <jnorris@codesourcery.com>
4684 Cesar Philippidis <cesar@codesourcery.com>
4685
4686 PR c/64765
4687 PR c/64880
4688 * c-parser.c (c_parser_oacc_loop): Add mask, cclauses formal
4689 parameters, and handle these. Adjust all users.
4690 (c_parser_oacc_kernels, c_parser_oacc_parallel): Merge functions
4691 into...
4692 (c_parser_oacc_kernels_parallel): ... this new function. Adjust
4693 all users.
4694 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels): Don't
4695 declare functions.
4696 (c_finish_omp_construct): Declare function.
4697 * c-typeck.c (c_finish_oacc_parallel, c_finish_oacc_kernels):
4698 Merge functions into...
4699 (c_finish_omp_construct): ... this new function.
4700
a8fc2579
RB
47012015-10-22 Richard Biener <rguenther@suse.de>
4702
4703 * c-typeck.c (c_finish_omp_clauses): Properly convert operands
4704 before folding a MINUS_EXPR.
4705
e9122ef6
MP
47062015-10-21 Marek Polacek <polacek@redhat.com>
4707
4708 PR c/68024
4709 * c-decl.c (start_function): Warn about vararg functions without
4710 a prototype.
4711
9f47c7e5
IE
47122015-10-21 Ilya Enkovich <enkovich.gnu@gmail.com>
4713
4714 * c-typeck.c (build_conditional_expr): Use boolean vector
4715 type for vector comparison.
4716 (build_vec_cmp): New.
4717 (build_binary_op): Use build_vec_cmp for comparison.
4718
fa60eeb9
MP
47192015-10-20 Marek Polacek <polacek@redhat.com>
4720
4721 * c-parser.c (is_cilkplus_vector_p): Don't define here.
4722
2c7020eb
MP
47232015-10-20 Marek Polacek <polacek@redhat.com>
4724
4725 PR c/67964
4726 * c-parser.c (c_parser_attributes): Break out of the loop if the
4727 token after an attribute isn't a comma.
4728
d9a6bd32
JJ
47292015-10-13 Jakub Jelinek <jakub@redhat.com>
4730 Aldy Hernandez <aldyh@redhat.com>
4731
4732 * c-parser.c (c_parser_pragma): Handle PRAGMA_OMP_ORDERED here.
4733 (c_parser_omp_clause_name): Handle OpenMP 4.5 clauses.
4734 (c_parser_omp_variable_list): Handle structure elements for
4735 map, to and from clauses. Handle array sections in reduction
4736 clause. Formatting fixes.
4737 (c_parser_omp_clause_if): Add IS_OMP argument, handle parsing of
4738 if clause modifiers.
4739 (c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
4740 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
4741 c_parser_omp_clause_defaultmap, c_parser_omp_clause_use_device_ptr,
4742 c_parser_omp_clause_is_device_ptr): New functions.
4743 (c_parser_omp_clause_ordered): Parse optional parameter.
4744 (c_parser_omp_clause_reduction): Handle array reductions.
4745 (c_parser_omp_clause_schedule): Parse optional simd modifier.
4746 (c_parser_omp_clause_nogroup, c_parser_omp_clause_orderedkind): New
4747 functions.
4748 (c_parser_omp_clause_linear): Parse linear clause modifiers.
4749 (c_parser_omp_clause_depend_sink): New function.
4750 (c_parser_omp_clause_depend): Parse source/sink depend kinds.
4751 (c_parser_omp_clause_map): Parse release/delete map kinds and
4752 optional always modifier.
4753 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_if
4754 and c_finish_omp_clauses callers.
4755 (c_parser_omp_all_clauses): Likewise. Parse OpenMP 4.5 clauses.
4756 Parse "to" as OMP_CLAUSE_TO_DECLARE if on declare target directive.
4757 (c_parser_oacc_cache): Adjust c_finish_omp_clauses caller.
4758 (OMP_CRITICAL_CLAUSE_MASK): Define.
4759 (c_parser_omp_critical): Parse critical clauses.
4760 (c_parser_omp_for_loop): Handle doacross loops, adjust
4761 c_finish_omp_for and c_finish_omp_clauses callers.
4762 (OMP_SIMD_CLAUSE_MASK): Add simdlen clause.
4763 (c_parser_omp_simd): Allow ordered clause if it has no parameter.
4764 (OMP_FOR_CLAUSE_MASK): Add linear clause.
4765 (c_parser_omp_for): Disallow ordered clause when combined with
4766 distribute. Disallow linear clause when combined with distribute
4767 and not combined with simd.
4768 (OMP_ORDERED_CLAUSE_MASK, OMP_ORDERED_DEPEND_CLAUSE_MASK): Define.
4769 (c_parser_omp_ordered): Add CONTEXT argument, remove LOC argument,
4770 parse clauses and if depend clause is found, don't parse a body.
4771 (c_parser_omp_parallel): Disallow copyin clause on target parallel.
4772 Allow target parallel without for after it.
4773 (OMP_TASK_CLAUSE_MASK): Add priority clause.
4774 (OMP_TARGET_DATA_CLAUSE_MASK): Add use_device_ptr clause.
4775 (c_parser_omp_target_data): Diagnose no map clauses or clauses with
4776 invalid kinds.
4777 (OMP_TARGET_UPDATE_CLAUSE_MASK): Add depend and nowait clauses.
4778 (OMP_TARGET_ENTER_DATA_CLAUSE_MASK,
4779 OMP_TARGET_EXIT_DATA_CLAUSE_MASK): Define.
4780 (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): New
4781 functions.
4782 (OMP_TARGET_CLAUSE_MASK): Add depend, nowait, private, firstprivate,
4783 defaultmap and is_device_ptr clauses.
4784 (c_parser_omp_target): Parse target parallel and target simd. Set
4785 OMP_TARGET_COMBINED on combined constructs. Parse target enter data
4786 and target exit data. Diagnose invalid map kinds.
4787 (OMP_DECLARE_TARGET_CLAUSE_MASK): Define.
4788 (c_parser_omp_declare_target): Parse OpenMP 4.5 forms of this
4789 construct.
4790 (c_parser_omp_declare_reduction): Use STRIP_NOPS when checking for
4791 &omp_priv.
4792 (OMP_TASKLOOP_CLAUSE_MASK): Define.
4793 (c_parser_omp_taskloop): New function.
4794 (c_parser_omp_construct): Don't handle PRAGMA_OMP_ORDERED here,
4795 handle PRAGMA_OMP_TASKLOOP.
4796 (c_parser_cilk_for): Adjust c_finish_omp_clauses callers.
4797 * c-tree.h (c_finish_omp_clauses): Add two new arguments.
4798 * c-typeck.c (handle_omp_array_sections_1): Fix comment typo.
4799 Add IS_OMP argument, handle structure element bases, diagnose
4800 bitfields, pass IS_OMP recursively, diagnose known zero length
4801 array sections in depend clauses, handle array sections in reduction
4802 clause, diagnose negative length even for pointers.
4803 (handle_omp_array_sections): Add IS_OMP argument, use auto_vec for
4804 types, pass IS_OMP down to handle_omp_array_sections_1, handle
4805 array sections in reduction clause, set
4806 OMP_CLAUSE_MAP_MAYBE_ZERO_LENGTH_ARRAY_SECTION if map could be zero
4807 length array section, use GOMP_MAP_FIRSTPRIVATE_POINTER for IS_OMP.
4808 (c_finish_omp_clauses): Add IS_OMP and DECLARE_SIMD arguments.
4809 Handle new OpenMP 4.5 clauses and new restrictions for the old ones.
4810
21ba0cea
MP
48112015-10-06 Marek Polacek <polacek@redhat.com>
4812
4813 * c-parser.c (c_parser_statement_after_labels): Use
4814 protected_set_expr_location.
4815 (c_parser_omp_clause_num_gangs): Likewise.
4816 (c_parser_omp_clause_num_threads): Likewise.
4817 (c_parser_omp_clause_num_workers): Likewise.
4818 (c_parser_omp_clause_vector_length): Likewise.
4819 (c_parser_omp_clause_num_teams): Likewise.
4820 (c_parser_omp_clause_thread_limit): Likewise.
4821 * c-typeck.c (build_c_cast): Likewise.
4822 (c_cast_expr): Likewise.
4823
624d31fe
RS
48242015-10-05 Richard Sandiford <richard.sandiford@arm.com>
4825
4826 * c-typeck.c (c_tree_equal): Use real_equal instead of
4827 REAL_VALUES_EQUAL.
4828
b8fd7909
JM
48292015-10-04 Jason Merrill <jason@redhat.com>
4830
4831 * c-parser.c (c_lex_one_token): Handle @synchronized.
4832 * c-decl.c (match_builtin_function_types): A declaration of a built-in
4833 can change whether the function is transaction_safe.
4834
1c7485af
MP
48352015-10-02 Marek Polacek <polacek@redhat.com>
4836
4837 PR c/67730
4838 * c-typeck.c (convert_for_assignment): Use the expansion point
4839 location throughout.
4840
3e3b8d63
MP
48412015-10-02 Marek Polacek <polacek@redhat.com>
4842
4843 PR c/64249
4844 * c-parser.c (c_parser_statement_after_labels): Add CHAIN parameter
4845 and pass it down to c_parser_if_statement.
4846 (c_parser_else_body): Add CHAIN parameter and pass it down to
4847 c_parser_statement_after_labels.
4848 (c_parser_if_statement): Add CHAIN parameter. Add code to warn about
4849 duplicated if-else-if conditions.
4850
aabef2de
MP
48512015-10-01 Marek Polacek <polacek@redhat.com>
4852
4853 * c-typeck.c (convert_for_assignment): Improve commentary.
4854
de8ddd5f
MP
48552015-09-30 Marek Polacek <polacek@redhat.com>
4856
4857 PR c/67730
4858 * c-typeck.c (c_finish_return): Use the expansion point location for
4859 certain "return with value" warnings.
4860
c4914de6
MLI
48612015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
4862
4863 * c-parser.c (pragma_lex): Add loc argument.
4864
0e36f5c7
MP
48652015-09-15 Marek Polacek <polacek@redhat.com>
4866
4867 PR c/67580
4868 * c-decl.c (tag_exists_p): New function.
4869 * c-parser.c (c_parser_declaration_or_fndef): Give a hint when
4870 struct/union/enum keywords are missing.
4871 * c-tree.h (tag_exists_p): Declare.
4872
2f3bb934
MP
48732015-09-15 Marek Polacek <polacek@redhat.com>
4874
4875 * c-decl.c (lookup_label): Return NULL_TREE instead of 0.
4876 (lookup_tag): Change the type of THISLEVEL_ONLY to bool.
4877 Return NULL_TREE instead of 0.
4878 (lookup_name): Return NULL_TREE instead of 0.
4879 (lookup_name_in_scope): Likewise.
4880 (shadow_tag_warned): Use true instead of 1 and NULL_TREE instead of 0.
4881 (parser_xref_tag): Use false instead of 0.
4882 (start_struct): Use true instead of 1.
4883 (start_enum): Use true instead of 1 and NULL_TREE instead of 0.
4884
aa256c4a
MP
48852015-09-14 Marek Polacek <polacek@redhat.com>
4886
4887 * c-typeck.c (set_nonincremental_init_from_string): Use
4888 HOST_WIDE_INT_M1U when shifting a negative value.
4889
dbb68221
MW
48902015-09-09 Mark Wielaard <mjw@redhat.com>
4891
4892 * c-typeck.c (build_binary_op): Check and warn when nonnull arg
4893 parm against NULL.
4894
a8a098ac
JJ
48952015-09-10 Jakub Jelinek <jakub@redhat.com>
4896
4897 PR c/67502
4898 * c-parser.c (c_parser_omp_for_loop): Emit DECL_EXPR stmts
4899 into OMP_FOR_PRE_BODY rather than before the loop.
4900
f4b189d5
JJ
49012015-09-09 Jakub Jelinek <jakub@redhat.com>
4902
0bb99c11
JJ
4903 PR c/67501
4904 * c-parser.c (c_parser_oacc_all_clauses,
4905 c_parser_omp_all_clauses): Remove invalid clause from
4906 list of clauses even if parser->error is set.
4907
fce5e5e3
JJ
4908 PR c/67500
4909 * c-parser.c (c_parser_omp_clause_aligned,
4910 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen): Fix up
4911 test for errors.
4912 * c-decl.c (temp_pop_parm_decls): Allow b->decl equal to
4913 error_mark_node.
4914
f4b189d5
JJ
4915 PR c/67495
4916 * c-parser.c (c_parser_omp_atomic): Use c_parser_cast_expression
4917 instead of c_parser_unary_expression. If the result is !lvalue_p,
4918 wrap the result of c_fully_fold into NON_LVALUE_EXPR.
4919
b2aaf235
MP
49202015-09-04 Marek Polacek <polacek@redhat.com>
4921
4922 PR sanitizer/67279
4923 * c-typeck.c (build_binary_op): Don't instrument static initializers.
4924
1807ffc1
MS
49252015-09-03 Martin Sebor <msebor@redhat.com>
4926
4927 PR c/66516
8b652e65
JJ
4928 * c-typeck.c (convert_arguments, parser_build_unary_op,
4929 build_conditional_expr, c_cast_expr, convert_for_assignment,
4930 build_binary_op, _objc_common_truthvalue_conversion): Call
1807ffc1
MS
4931 reject_gcc_builtin.
4932 (c_decl_implicit): Define.
4933
d04ff417
MP
49342015-09-02 Marek Polacek <polacek@redhat.com>
4935
4936 PR c/67432
4937 * c-parser.c (c_parser_enum_specifier): Give a better error for
4938 an empty enum.
4939
a79683d5
TS
49402015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
4941
4942 * c-aux-info.c, c-parser.c, c-tree.h: Remove useless typedefs.
4943
191a6b94
MP
49442015-08-12 Marek Polacek <polacek@redhat.com>
4945
4946 * c-decl.c (grokdeclarator): Call error_at instead of error and pass
4947 LOC to it.
4948
420a9d9b
MP
49492015-08-03 Marek Polacek <polacek@redhat.com>
4950
4951 PR c/67088
4952 * c-decl.c (check_bitfield_type_and_width): Add location parameter.
4953 Use it.
4954 (grokdeclarator): Pass LOC down to check_bitfield_type_and_width.
4955
992118a1
PP
49562015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
4957
4958 * c-parser.c (c_parser_if_body): Take token_indent_info
4959 argument. Call warn_for_misleading_indentation even when the
4960 body is a semicolon. Extract token_indent_infos corresponding
4961 to the guard, body and next tokens. Adjust call to
4962 warn_for_misleading_indentation accordingly.
4963 (c_parser_else_body): Likewise.
4964 (c_parser_if_statement): Likewise.
4965 (c_parser_while_statement): Likewise.
4966 (c_parser_for_statement): Likewise.
4967
46308474
LFSM
49682015-07-28 Luis Felipe Strano Moraes <luis.strano@gmail.com>
4969 Manuel López-Ibáñez <manu@gcc.gnu.org>
4970
4971 * c-decl.c (get_parm_info): Remove static var. Update warning
4972 message.
4973
05b28fd6
MP
49742015-07-27 Marek Polacek <polacek@redhat.com>
4975
4976 PR c++/66555
4977 PR c/54979
4978 * c-typeck.c (parser_build_binary_op): Call warn_tautological_cmp.
4979
451b5e48
MP
49802015-07-20 Marek Polacek <polacek@redhat.com>
4981
4982 PR c++/55095
4983 * c-typeck.c (digest_init): Pass OPT_Wpedantic to pedwarn_init.
4984 (build_binary_op): Warn about left shift overflows.
4985
1916bcb5
AM
49862015-07-09 Andrew MacLeod <amacleod@redhat.com>
4987
4988 * c-array-notation.c: Adjust includes for flags.h changes.
4989 * c-objc-common.c: Likewise.
4990
c7131fb2
AM
49912015-07-07 Andrew MacLeod <amacleod@redhat.com>
4992
4993 * c-array-notation.c: Adjust includes.
4994 * c-aux-info.c: Likewise.
4995 * c-convert.c: Likewise.
4996 * c-decl.c: Likewise.
4997 * c-errors.c: Likewise.
4998 * c-lang.c: Likewise.
4999 * c-objc-common.c: Likewise.
5000 * c-parser.c: Likewise.
5001 * c-typeck.c: Likewise.
5002
da2e71c9
MLI
50032015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
5004
5005 PR fortran/66605
5006 * c-decl.c (finish_function): Call do_warn_unused_parameter.
5007
b155cfd9
MP
50082015-06-29 Marek Polacek <polacek@redhat.com>
5009
5010 PR c/66322
5011 * c-typeck.c (struct c_switch): Add BOOL_COND_P and OUTSIDE_RANGE_P.
5012 (c_start_case): Set BOOL_COND_P and OUTSIDE_RANGE_P. Don't warn
5013 about -Wswitch-bool here.
5014 (do_case): Update c_add_case_label call.
5015 (c_finish_case): Update c_do_switch_warnings call.
5016
31521951
MP
50172015-06-27 Marek Polacek <polacek@redhat.com>
5018
5019 * c-typeck.c: Use VECTOR_TYPE_P throughout.
5020
22d03525
MP
50212015-06-26 Marek Polacek <polacek@redhat.com>
5022
5023 * c-array-notation.c (fix_builtin_array_notation_fn): Use
5024 INDIRECT_REF_P.
5025 * c-typeck.c (array_to_pointer_conversion): Likewise.
5026 (build_unary_op): Likewise.
5027 (c_finish_return): Likewise.
5028
f0889939
AM
50292015-06-25 Andrew MacLeod <amacleod@redhat.com>
5030
5031 * c-decl.c: Remove ipa-ref.h and plugin-api.h from include list.
5032 * c-parser.c: Likewise.
5033
8d67ee55
RS
50342015-06-25 Richard Sandiford <richard.sandiford@arm.com>
5035
5036 * c-decl.c (detect_field_duplicates_hash): Use nofree_ptr_hash
5037 instead of pointer_hash.
5038 (detect_field_duplicates): Likewise.
5039
0ae9bd27
MP
50402015-06-25 Marek Polacek <polacek@redhat.com>
5041
5042 * c-array-notation.c: Use VAR_P throughout.
5043 * c-decl.c: Likewise.
5044 * c-objc-common.c: Likewise.
5045 * c-parser.c: Likewise.
5046 * c-typeck.c: Likewise.
5047
62f9079a
MP
50482015-06-25 Marek Polacek <polacek@redhat.com>
5049
5050 * c-decl.c: Use is_global_var throughout.
5051 * c-parser.c: Likewise.
5052 * c-typeck.c: Likewise.
5053
abb226c9
AM
50542015-06-17 Andrew MacLeod <amacleod@redhat.com>
5055
5056 * c-array-notation.c: Do not include input.h, line-map.h or is-a.h.
5057 * c-aux-info.c: Likewise.
5058 * c-convert.c: Likewise.
5059 * c-decl.c: Likewise.
5060 * c-errors.c: Likewise.
5061 * c-lang.c: Likewise.
5062 * c-objc-common.c: Likewise.
5063 * c-parser.c: Likewise.
5064 * c-typeck.c: Likewise.
5065
8cbababc
JH
50662015-06-11 Jan Hubicka <hubicka@ucw.cz>
5067
5068 PR middle-end/66325
5069 * c-decl.c (start_enum): Set TYPE_PACKED consistently among type
5070 variants.
5071
a0349665
PMR
50722015-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
5073
5074 * c-decl.c (pop_scope): Register the main translation unit
5075 through the new debug hook.
5076
13fdf2e2
AM
50772015-06-08 Andrew MacLeod <amacleod@redhat.com>
5078
5079 * c-array-notation.c : Adjust include files.
5080 * c-aux-info.c : Likewise.
5081 * c-convert.c : Likewise.
5082 * c-decl.c : Likewise.
5083 * c-errors.c : Likewise.
5084 * c-lang.c : Likewise.
5085 * c-lang.h : Likewise.
5086 * c-objc-common.c : Likewise.
5087 * c-parser.c : Likewise.
5088 * c-typeck.c : Likewise.
5089
d7438551
AH
50902015-06-05 Aldy Hernandez <aldyh@redhat.com>
5091
5092 * c-decl.c (finish_struct): Save C_TYPE_INCOMPLETE_VARS and
5093 immediately clobber it.
5094 (c_write_global_declarations_1): Remove call to
5095 check_global_declaration_1.
5096 (c_write_global_declarations_2): Remove.
5097 (c_write_final_cleanups): Rename from c_write_global_declarations.
5098 Remove call to finalize_compilation_unit.
5099 Remove calls to debugging hooks.
5100 * c-objc-common.c: Adjust comment for c_warn_unused_global_decl.
5101 * c-objc-common.h: Remove LANG_HOOKS_WRITE_GLOBALS.
5102 * c-tree.h: Remove c_write_global_declarations.
5103
ecb9f223
AM
51042015-06-04 Andrew MacLeod <amacleod@redhat.com>
5105
5106 * c-array-notation.c: Adjust includes for restructured coretypes.h.
5107 * c-aux-info.c: Likewise.
5108 * c-convert.c: Likewise.
5109 * c-decl.c: Likewise.
5110 * c-errors.c: Likewise.
5111 * c-lang.c: Likewise.
5112 * c-objc-common.c: Likewise.
5113 * c-parser.c: Likewise.
5114 * c-typeck.c: Likewise.
5115
9482b620
MP
51162015-06-04 Marek Polacek <polacek@redhat.com>
5117
5118 PR c/66341
5119 * c-typeck.c (build_c_cast): Wrap VALUE into NON_LVALUE_EXPR if
5120 it is a lvalue.
5121
bc51ace3
PK
51222015-06-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
5123
5124 * c-decl.c (warn_cxx_compat_finish_struct): New parameters code, record_loc.
5125 Warn for empty struct.
5126 (finish_struct): Pass TREE_CODE(t) and loc to warn_cxx_compat_finish_struct.
5127
ea5b45b6
AT
51282015-06-02 Andres Tiraboschi <andres.tiraboschi@tallertechnologies.com>
5129
5130 * c-decl.c (start_function): Call plugin before parsing.
5131 (finish_function): Call plugin after parsing.
5132
c2d47482
PK
51332015-06-02 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
5134
5135 PR c/49551
5136 * c-decl.c (merge_decls): Merge DECL_COMMON.
5137
a95492ab
JW
51382015-05-22 Jim Wilson <jim.wilson@linaro.org>
5139
5140 * Make-lang.in (check_gcc_pallelize): Define.
5141
fd5c817a
MP
51422015-05-22 Marek Polacek <polacek@redhat.com>
5143
5144 PR c/47043
5145 * c-parser.c (c_parser_enum_specifier): Parse and apply enumerator
5146 attributes.
5147
c7b70a3c
MP
51482015-05-21 Marek Polacek <polacek@redhat.com>
5149
5150 * c-typeck.c (inform_declaration): Use DECL_IS_BUILTIN instead of
5151 DECL_BUILT_IN.
5152
21b634ae
MP
51532015-05-20 Marek Polacek <polacek@redhat.com>
5154
5155 * c-decl.c: Use VAR_OR_FUNCTION_DECL_P throughout.
5156 * c-typeck.c: Likewise.
5157
296a8c2f
MP
51582015-05-19 Marek Polacek <polacek@redhat.com>
5159
5160 * c-typeck.c (start_init): Use AGGREGATE_TYPE_P.
5161
41b37d5e
JJ
51622015-05-19 Jakub Jelinek <jakub@redhat.com>
5163
5164 PR middle-end/66199
5165 * c-parser.c (c_parser_omp_for_loop): Don't add
5166 OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
5167 OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
5168 (c_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
5169 constructs.
5170
fab27f52
MM
51712015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
5172
5173 * c-typeck.c (build_array_ref): Use std::swap instead of explicit
296a8c2f 5174 swaps.
fab27f52 5175
40de31cf
MLI
51762015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
5177
5178 PR fortran/44054
5179 * c-objc-common.c (c_tree_printer): Replace locus pointer with
5180 accessor function.
5181
3aa3c9fc
MP
51822015-05-14 Marek Polacek <polacek@redhat.com>
5183
5184 PR c/66066
5185 PR c/66127
5186 * c-typeck.c (digest_init): Call pedwarn_init with OPT_Wpedantic
5187 rather than with 0.
5188
c3388e62
DM
51892015-05-12 David Malcolm <dmalcolm@redhat.com>
5190
5191 * c-parser.c (c_parser_if_body): Add param "if_loc", use it
5192 to add a call to warn_for_misleading_indentation.
5193 (c_parser_else_body): Likewise, adding param "else_loc".
5194 (c_parser_if_statement): Check for misleading indentation.
5195 (c_parser_while_statement): Likewise.
5196 (c_parser_for_statement): Likewise.
5197
755e528f
MP
51982015-05-08 Marek Polacek <polacek@redhat.com>
5199
5200 PR c/64918
5201 * c-typeck.c (add_pending_init): Use OPT_Woverride_init_side_effects.
5202 (output_init_element): Likewise.
5203
0173bd2a
MP
52042015-05-07 Marek Polacek <polacek@redhat.com>
5205
5206 PR c/65179
5207 * c-typeck.c (build_binary_op): Warn when left shifting a negative
5208 value.
5209
9babc352
MP
52102015-04-30 Marek Polacek <polacek@redhat.com>
5211
5212 * c-typeck.c (set_init_label): Call error_at instead of error and
5213 pass LOC to it.
5214
ac9f18db
MP
5215 * c-typeck.c (c_incomplete_type_error): Refactor to use %qT. Print
5216 the type of a decl.
5217
ec3fba51
MP
5218 * c-typeck.c (c_build_va_arg): Clarify the error message.
5219
b811915d
TS
52202015-04-29 Thomas Schwinge <thomas@codesourcery.com>
5221
5222 * c-parser.c (c_parser_oacc_enter_exit_data): Use
5223 OMP_STANDALONE_CLAUSES.
5224
f3075008
MP
52252015-04-28 Marek Polacek <polacek@redhat.com>
5226
5227 * c-parser.c (c_parser_binary_expression): Remove duplicate line.
5228
4e81b788
MP
52292015-04-28 Marek Polacek <polacek@redhat.com>
5230
5231 PR c/65901
5232 * c-typeck.c (c_build_va_arg): Require TYPE be a complete type.
5233
6c1db78e
MP
52342015-04-25 Marek Polacek <polacek@redhat.com>
5235
5236 PR c/52085
5237 * c-decl.c (finish_enum): Copy over TYPE_ALIGN. Also check for "mode"
5238 attribute.
5239
5c4abbb8
MP
52402015-04-23 Marek Polacek <polacek@redhat.com>
5241
5242 PR c/65345
5243 * c-decl.c (set_labels_context_r): New function.
5244 (store_parm_decls): Call it via walk_tree_without_duplicates.
5245 * c-typeck.c (convert_lvalue_to_rvalue): Use create_tmp_var_raw
5246 instead of create_tmp_var. Build TARGET_EXPR instead of
5247 COMPOUND_EXPR.
5248 (build_atomic_assign): Use create_tmp_var_raw instead of
5249 create_tmp_var. Build TARGET_EXPRs instead of MODIFY_EXPR.
5250
06aca1d5
IV
52512015-04-20 Ilya Verbin <ilya.verbin@intel.com>
5252
5253 * c-parser.c (c_parser_oacc_enter_exit_data): Remove excess semicolon.
5254 (c_parser_omp_target_update): Add missed %> to error_at ().
5255
8fba1830
BRF
52562015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
5257
5258 PR target/55143
5259 * c-decl.c (c_default_pointer_mode): Remove definition.
5260 * c-tree.h (c_default_pointer_mode): Remove declaration.
5261
62021f64
TB
52622015-03-27 Tobias Burnus <burnus@net-b.de>
5263
5264 PR c/65586
5265 * c-parser.c (c_parser_skip_to_pragma_eol): Optionally, don't
5266 error out.
5267 (c_parser_omp_for, c_parser_omp_parallel, c_parser_omp_distribute,
5268 c_parser_omp_teams, c_parser_omp_target, c_parser_omp_declare):
5269 Update calls to not error for skipped omp pragmas with -fopenmp-simd.
5270
9b65e171
JJ
52712015-03-19 Jakub Jelinek <jakub@redhat.com>
5272
5273 * c-decl.c (c_decl_attributes): Also add "omp declare target"
5274 attribute for DECL_EXTERNAL VAR_DECLs.
5275
17958621
JJ
52762015-03-11 Jakub Jelinek <jakub@redhat.com>
5277
5278 * c-parser.c (c_parse_init): Don't call xstrdup on get_identifier
5279 argument.
5280
7ccb1a11
JJ
52812015-03-10 Jakub Jelinek <jakub@redhat.com>
5282
5283 PR c/65120
5284 * c-typeck.c (parser_build_binary_op): Check for tcc_comparison
5285 before preparing arguments to warn_logical_not_parentheses.
5286
01177669
JJ
52872015-03-09 Jakub Jelinek <jakub@redhat.com>
5288
5289 PR c/65120
5290 * c-typeck.c (parser_build_binary_op): Don't warn for
5291 !!x == y or !b == y where b is _Bool.
5292
802ac282
MP
52932015-03-09 Marek Polacek <polacek@redhat.com>
5294
5295 * c-convert.c (convert): Make use of do_ubsan_in_current_function.
5296 * c-decl.c (grokdeclarator): Likewise.
5297 * c-typeck.c (build_binary_op): Likewise.
5298
e5165b60
MP
52992015-02-27 Marek Polacek <polacek@redhat.com>
5300
5301 PR c/65228
5302 * c-decl.c (start_decl): Return NULL_TREE if decl is an error node.
5303
065d214c
MP
53042015-02-14 Marek Polacek <polacek@redhat.com>
5305
5306 PR c/64768
5307 * c-decl.c (grokdeclarator): Set the range of a flexible array member
5308 declared through a typedef name.
5309
e5d9235b
MP
53102015-02-13 Marek Polacek <polacek@redhat.com>
5311
5312 PR c/65050
5313 * c-decl.c (grokdeclarator): Print also the type when giving
5314 the error message about array's incomplete element type.
5315
fa01ffcc
JJ
53162015-02-11 Jakub Jelinek <jakub@redhat.com>
5317
5318 PR c/64824
5319 * c-parser.c (c_parser_binary_expression): Fix OpenMP stack[sp].prec
5320 check in the POP macro.
5321
c3e38a03
MP
53222015-02-09 Marek Polacek <polacek@redhat.com>
5323
5324 PR c/64856
5325 * c-typeck.c (process_init_element): Don't always wrap
5326 COMPOUND_LITERAL_EXPR in a SAVE_EXPR in C99 mode when
5327 initializing a range of elements.
5328
4886ec8e
JJ
53292015-02-04 Jakub Jelinek <jakub@redhat.com>
5330
5331 PR c/64824
5332 PR c/64868
5333 * c-parser.c (c_parser_omp_atomic): Handle RDIV_EXPR.
5334
c3e38a03 53352015-02-02 Bruno Loff <bruno.loff@gmail.com>
a4bb6959
BL
5336
5337 * c-parser.c (c_parser_declspecs): Call invoke_plugin_callbacks after
5338 processing enum declaration.
5339
7b33f0c8
MP
53402015-01-29 Marek Polacek <polacek@redhat.com>
5341
5342 PR c/64709
5343 * c-typeck.c (pop_init_level): If constructor_elements has
5344 exactly one element with integer_zerop value, set constructor_zeroinit
5345 to 1. Remove braces around warning_init call.
5346
dea63e49
JJ
53472015-01-27 Jakub Jelinek <jakub@redhat.com>
5348
5349 PR c/64766
5350 * c-typeck.c (store_init_value): Don't overwrite DECL_INITIAL
5351 of FUNCTION_DECLs with error_mark_node.
5352
d38f7dce
JJ
53532015-01-26 Jakub Jelinek <jakub@redhat.com>
5354
5355 PR c/64778
5356 * c-typeck.c (convert_arguments): Return -1 if there are
5357 error_args, even if we've diagnosed too many arguments.
5358
cbf5d0e7
RB
53592015-01-21 Richard Biener <rguenther@suse.de>
5360
5361 PR middle-end/64313
5362 * c-decl.c (merge_decls): Call set_builtin_decl_declared_p
5363 for builtins the user declared correctly.
5364
41dbbb37
TS
53652015-01-15 Thomas Schwinge <thomas@codesourcery.com>
5366 Bernd Schmidt <bernds@codesourcery.com>
5367 Cesar Philippidis <cesar@codesourcery.com>
5368 James Norris <jnorris@codesourcery.com>
5369 Jakub Jelinek <jakub@redhat.com>
5370 Ilmir Usmanov <i.usmanov@samsung.com>
5371
5372 * c-parser.c: Include "gomp-constants.h".
5373 (c_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
5374 omp_clause_map_kind. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
5375 Use OMP_CLAUSE_SET_MAP_KIND.
5376 (c_parser_pragma): Handle PRAGMA_OACC_ENTER_DATA,
5377 PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_UPDATE.
5378 (c_parser_omp_construct): Handle PRAGMA_OACC_CACHE,
5379 PRAGMA_OACC_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP,
5380 PRAGMA_OACC_PARALLEL, PRAGMA_OACC_WAIT.
5381 (c_parser_omp_clause_name): Handle "auto", "async", "copy",
5382 "copyout", "create", "delete", "deviceptr", "gang", "host",
5383 "num_gangs", "num_workers", "present", "present_or_copy", "pcopy",
5384 "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
5385 "present_or_create", "pcreate", "seq", "self", "vector",
5386 "vector_length", "wait", "worker".
5387 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
5388 (OACC_ENTER_DATA_CLAUSE_MASK, OACC_EXIT_DATA_CLAUSE_MASK)
5389 (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
5390 (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
5391 (c_parser_omp_variable_list): Handle OMP_CLAUSE__CACHE_.
5392 (c_parser_oacc_wait_list, c_parser_oacc_data_clause)
5393 (c_parser_oacc_data_clause_deviceptr)
5394 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_workers)
5395 (c_parser_oacc_clause_async, c_parser_oacc_clause_wait)
5396 (c_parser_omp_clause_vector_length, c_parser_oacc_all_clauses)
5397 (c_parser_oacc_cache, c_parser_oacc_data, c_parser_oacc_kernels)
5398 (c_parser_oacc_enter_exit_data, c_parser_oacc_loop)
5399 (c_parser_oacc_parallel, c_parser_oacc_update)
5400 (c_parser_oacc_wait): New functions.
5401 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels)
5402 (c_finish_oacc_data): New prototypes.
5403 * c-typeck.c: Include "gomp-constants.h".
5404 (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR. Use
5405 GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use
5406 OMP_CLAUSE_SET_MAP_KIND.
5407 (c_finish_oacc_parallel, c_finish_oacc_kernels)
5408 (c_finish_oacc_data): New functions.
5409 (c_finish_omp_clauses): Handle OMP_CLAUSE__CACHE_,
5410 OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS,
5411 OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_ASYNC, OMP_CLAUSE_WAIT,
5412 OMP_CLAUSE_AUTO, OMP_CLAUSE_SEQ, OMP_CLAUSE_GANG,
5413 OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR, and OMP_CLAUSE_MAP's
5414 GOMP_MAP_FORCE_DEVICEPTR.
5415
adfac8df
JJ
54162015-01-09 Michael Collison <michael.collison@linaro.org>
5417
5418 * c-array-notation.c: Include hash-set.h, machmode.h,
5419 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
5420 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
5421 * c-aux-info.c: Ditto.
5422 * c-convert.c: Ditto.
5423 * c-decl.c: Ditto.
5424 * c-errors.c: Ditto.
5425 * c-lang.c: Dittoxs.
5426 * c-objc-common.c: Ditto.
5427 * c-parser.c: Ditto.
5428 * c-typeck.c: Include hash-set.h, machmode.h,
5429 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
5430 fold-const.h, wide-int.h, inchash.h, real.h and
5431 fixed-value.h due to flattening of tree.h.
5432
2cc901dc
MP
54332015-01-07 Marek Polacek <polacek@redhat.com>
5434
5435 PR c/64417
5436 * c-typeck.c (process_init_element): Disallow initialization of
5437 a flexible array member with a string constant if the structure
5438 is in an array.
5439
5624e564
JJ
54402015-01-05 Jakub Jelinek <jakub@redhat.com>
5441
e5341100
JJ
5442 PR sanitizer/64344
5443 * c-typeck.c (convert_for_assignment, c_finish_return): For
5444 -fsanitize=float-cast-overflow casts from REAL_TYPE to integer/enum
5445 types also set in_late_binary_op around convert call.
5446 * c-convert.c (convert): For -fsanitize=float-cast-overflow REAL_TYPE
5447 to integral type casts, if not in_late_binary_op, pass c_fully_fold
5448 result on expr as last argument to ubsan_instrument_float_cast,
5449 if in_late_binary_op, don't use c_save_expr but save_expr.
5450
5624e564
JJ
5451 Update copyright years.
5452
5bd012f8
MP
54532015-01-05 Marek Polacek <polacek@redhat.com>
5454
5455 PR c/64423
5456 * c-typeck.c (build_array_ref): Pass loc down to
5457 warn_array_subscript_with_type_char.
5458
3f8257db 54592014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
768952be
MU
5460
5461 * c-typeck.c: New behavious for pointers to arrays with qualifiers
8e745a17 5462 (common-pointer-type): For pointers to arrays take qualifiers from
768952be 5463 element type.
8e745a17 5464 (build_conditional_expr): Add warnings for lost qualifiers.
768952be 5465 (comp-target-types): Allow pointers to arrays with different qualifiers.
8e745a17 5466 (convert-for-assignment): Adapt warnings for discarded qualifiers. Add
768952be 5467 WARNING_FOR_QUALIFIERS macro and rename WARN_FOR_QUALIFIERS
8e745a17 5468 to PEDWARN_FOR_QUALIFIERS.
768952be 5469
8f94a8c4
JJ
54702014-12-17 Jakub Jelinek <jakub@redhat.com>
5471
5472 PR sanitizer/64289
5473 * c-convert.c: Include ubsan.h.
5474 (convert): For real -> integral casts and
5475 -fsanitize=float-cast-overflow don't call convert_to_integer, but
5476 instead instrument the float cast directly.
5477
b731b390
JJ
54782014-11-29 Jakub Jelinek <jakub@redhat.com>
5479
5480 * c-typeck.c (convert_lvalue_to_rvalue, build_atomic_assign,
5481 c_finish_stmt_expr): Remove NULL last argument from
5482 create_tmp_var_raw and create_tmp_var calls.
5483 * c-array-notation.c (fix_builtin_array_notation_fn,
5484 build_array_notation_expr, fix_conditional_array_notations_1,
5485 fix_array_notation_expr, fix_array_notation_call_expr): Likewise.
5486
541e35a6
MP
54872014-11-28 Marek Polacek <polacek@redhat.com>
5488
5489 PR c/63862
5490 * c-typeck.c (build_binary_op) <RSHIFT_EXPR, LSHIFT_EXPR>: Don't
5491 convert the right operand to integer type.
5492
b286be94
MP
54932014-11-25 Marek Polacek <polacek@redhat.com>
5494
5495 PR c/63877
5496 * c-decl.c (start_function): Disable -Wmissing-declarations warning
5497 for inline functions.
5498
aa7da51a
JJ
54992014-11-21 Jakub Jelinek <jakub@redhat.com>
5500
5501 PR target/63764
5502 * c-typeck.c (build_array_ref): Adjust
5503 convert_vector_to_pointer_for_subscript caller. If it returns true,
5504 call non_lvalue_loc on the result.
5505
d876207f
RB
55062014-11-11 Richard Biener <rguenther@suse.de>
5507
5508 * c-decl.c (c_init_decl_processing): Do not set pedantic_lvalues
5509 to true.
5510
e5e44252
AK
55112014-11-10 Andi Kleen <ak@linux.intel.com>
5512
5513 PR c/60804
5514 * c-parser.c (c_parser_statement_after_labels): Call
5515 check_no_cilk.
5516 (c_parser_if_statement): Dito.
5517 (c_parser_switch_statement): Dito.
5518 (c_parser_while_statement): Dito.
5519 (c_parser_do_statement): Dito.
5520 (c_parser_for_statement): Dito.
5521 * c-typeck.c (c_finish_loop): Dito.
5522
13c21655
PC
55232014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
5524
5525 * c-typeck.c (build_binary_op): Use OPT_Wshift_count_negative and
5526 OPT_Wshift_count_overflow in the warnings.
5527
2d51fcef
MP
55282014-10-30 Marek Polacek <polacek@redhat.com>
5529
5530 * c-objc-common.c (c_tree_printer) <case 'T'>: For a typedef name,
5531 print the stripped version as well, if they're not the same.
5532
ef4bddc2
RS
55332014-10-29 Richard Sandiford <richard.sandiford@arm.com>
5534
5535 * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from
5536 machine_mode.
5537
c582198b
AM
55382014-10-28 Andrew MacLeod <amacleod@redhat.com>
5539
5540 * c-decl.c: Adjust include files.
5541 * c-parser.c: Ditto.
5542
ddc8de03
PM
55432014-10-27 Phil Muldoon <pmuldoon@redhat.com>
5544 Tom Tromey <tromey@redhat.com>
5545
5546 * c-tree.h (enum c_oracle_request): New.
5547 (c_binding_oracle_function): New typedef.
5548 (c_binding_oracle, c_pushtag, c_bind): Declare.
5549 * c-decl.c (c_binding_oracle): New global.
5550 (I_SYMBOL_CHECKED): New macro.
5551 (i_symbol_binding): New function.
5552 (I_SYMBOL_BINDING, I_SYMBOL_DECL): Redefine.
5553 (I_TAG_CHECKED): New macro.
5554 (i_tag_binding): New function.
5555 (I_TAG_BINDING, I_TAG_DECL): Redefine.
5556 (I_LABEL_CHECKED): New macro.
5557 (i_label_binding): New function.
5558 (I_LABEL_BINDING, I_LABEL_DECL): Redefine.
5559 (c_print_identifier): Save and restore c_binding_oracle.
5560 (c_pushtag, c_bind): New functions.
5561
60393bbc
AM
55622014-10-27 Andrew MacLeod <amacleod@redhat.com>
5563
5564 * c-typeck.c: Adjust include files.
5565
d723bb7c
MLI
55662014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
5567
5568 PR c++/53061
5569 * c-objc-common.c (c_objc_common_init): Do not do diagnostics
5570 initialization here...
5571 (c_initialize_diagnostics): ... but here. Set defaults after
5572 building pretty-printer.
5573
1bc5a451
MP
55742014-10-23 Marek Polacek <polacek@redhat.com>
5575
5576 PR c/63626
5577 * c-decl.c (pop_scope): Don't print warning in external_scope.
5578
4435bb92
MP
55792014-10-19 Marek Polacek <polacek@redhat.com>
5580
5581 PR c/63567
5582 * c-typeck.c (output_init_element): Allow initializing objects with
5583 static storage duration with compound literals even in C99 and add
5584 pedwarn for it.
5585
7278465e
MP
55862014-10-17 Marek Polacek <polacek@redhat.com>
5587
5588 PR c/63567
5589 * c-typeck.c (digest_init): Allow initializing objects with static
5590 storage duration with compound literals even in C99 and add pedwarn
5591 for it.
5592
d9b7be2e
MP
55932014-10-17 Marek Polacek <polacek@redhat.com>
5594
5595 PR c/63543
5596 * c-tree.h (C_TYPE_ERROR_REPORTED): Define.
5597 * c-typeck.c (build_indirect_ref): Don't print the "dereferencing..."
5598 error multiple times. Print the type.
5599
f406ae1f
MP
56002014-10-17 Marek Polacek <polacek@redhat.com>
5601
5602 PR c/63549
5603 * c-typeck.c (build_array_ref): Bail if the index in an incomplete
5604 type.
5605
92574c7c
MP
56062014-10-17 Marek Polacek <polacek@redhat.com>
5607
5608 * c-decl.c (grokdeclarator): Use OPT_Wimplicit_int unconditionally.
5609 (start_function): Use OPT_Wimplicit_int instead of 0.
5610 (store_parm_decls_oldstyle): Likewise.
5611
1bc4a978
MT
56122014-10-17 Alan Modra <amodra@gmail.com>
5613
5614 PR middle-end/61848
5615 * c-decl.c (merge_decls): Don't merge section name or tls model
5616 to newdecl symtab node, instead merge to olddecl. Override
5617 existing olddecl section name. Set tls_model for all thread-local
5618 vars, not just OMP thread-private ones. Remove incorrect comment.
5619
83685514
AM
56202014-10-16 Andrew MacLeod <amacleod@redhat.com>
5621
5622 * c-decl.c: Adjust include files.
5623
78a7c317
DD
56242014-10-14 DJ Delorie <dj@redhat.com>
5625
5626 * c-parser.c (c_parse_init): Add RID entries for each __intN.
5627 (c_token_starts_typename): Check all __intN, not just __int128.
5628 (c_token_starts_declspecs): Likewise.
5629 (c_parser_declspecs): Likewise.
5630 (c_parser_attribute_any_word): Likewise.
5631 (c_parser_objc_selector): Likewise.
5632 * c-tree.h (c_typespec_keyword): cts_int128 -> cts_int_n.
5633 (struct c_declspecs): Add int_n_idx field to record *which* __intN
5634 is specified.
5635 * c-decl.c (declspecs_add_type): Check for all __intN, not just
5636 __int128.
5637 (finish_declspecs): Likewise.
5638
74d98c1e
AB
56392014-10-13 Anthony Brandon <anthony.brandon@gmail.com>
5640
8e745a17 5641 * c-parser.c (c_parser_all_labels): New function to replace
74d98c1e 5642 the duplicate code.
8e745a17 5643 (c_parser_statement): Call the new function.
74d98c1e 5644
84937de2
MP
56452014-10-09 Marek Polacek <polacek@redhat.com>
5646
5647 PR c/63480
5648 * c-typeck.c (pop_init_level): Don't warn about initializing
5649 with { }.
5650
0382aaa0
MP
56512014-10-07 Marek Polacek <polacek@redhat.com>
5652
5653 PR c/59717
5654 * c-decl.c (header_for_builtin_fn): New function.
5655 (implicitly_declare): Suggest which header to include.
5656
7a0ca710
MP
56572014-10-07 Marek Polacek <polacek@redhat.com>
5658
5659 * c-convert.c (convert): Use error_operand_p.
5660 * c-typeck.c (require_complete_type): Likewise.
5661 (really_atomic_lvalue): Likewise.
5662 (digest_init): Likewise.
5663 (handle_omp_array_sections_1): Likewise.
5664
6bc8a126
MP
56652014-10-03 Marek Polacek <polacek@redhat.com>
5666
5667 PR c/63453
5668 * c-decl.c (pop_scope): Don't warn about "inline function declared
5669 but never defined" for functions marked with gnu_inline attribute.
5670
d90c0a59
JJ
56712014-09-25 Jakub Jelinek <jakub@redhat.com>
5672
5673 PR c++/63249
5674 * c-parser.c (c_parser_omp_variable_list): Call mark_exp_read
5675 on low_bound and length.
5676
083e891e
MP
56772014-09-24 Marek Polacek <polacek@redhat.com>
5678
5679 PR c/61405
5680 PR c/53874
5681 * c-parser.c: Don't define CPP_KEYWORD.
5682 (c_parser_switch_statement): Pass original type to c_finish_case.
5683 * c-tree.h (c_finish_case): Update declaration.
5684 * c-typeck.c (c_finish_case): Add TYPE parameter. Pass it
5685 conditionally to c_do_switch_warnings.
5686
8d95fe25
MP
56872014-09-03 Marek Polacek <polacek@redhat.com>
5688
5689 PR c/62024
5690 * c-parser.c (c_parser_static_assert_declaration_no_semi): Strip no-op
5691 conversions.
5692
9a771876
JJ
56932014-09-02 Jakub Jelinek <jakub@redhat.com>
5694 Balaji V. Iyer <balaji.v.iyer@intel.com>
5695 Igor Zamyatin <igor.zamyatin@intel.com>
5696
5697 * c-parser.c (c_parser_cilk_for): New function.
5698 (c_parser_cilk_grainsize): Likewise.
5699 (c_get_temp_regvar): Likewise.
5700 (c_parser_statement_after_labels): Added RID_CILK_FOR case.
5701 (c_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
5702 (c_parser_omp_for_loop): Added CILK_FOR and CILK_SIMD checks.
5703 * c-typeck.c (c_finish_omp_clauses): Added OMP_CLAUSE__CILK_FOR_COUNT_
5704 case.
5705
b7679d96
CG
57062014-08-27 Chen Gang <gang.chen.5i5j@gmail.com>
5707
5708 * c-aux-info.c (gen_type): Resize 'buff' from 10 to 23 bytes,
5709 with using HOST_WIDE_INT without truncation to 'int'
5710
59ea0364
MP
57112014-08-22 Marek Polacek <polacek@redhat.com>
5712
5713 PR c++/62199
5714 * c-typeck.c (parser_build_binary_op): Adjust call to
5715 warn_logical_not_parentheses.
5716
671a475e
IZ
57172014-08-22 Igor Zamyatin <igor.zamyatin@intel.com>
5718
5719 PR other/62008
5720 * c-parser.c (c_parser_array_notation): Check for correct
5721 type of an array added.
5722
04159acf
MP
57232014-08-19 Marek Polacek <polacek@redhat.com>
5724
5725 PR c++/62153
5726 * c-typeck.c (build_binary_op): If either operand of a comparison
5727 is a boolean expression, call maybe_warn_bool_compare.
5728
c77935ee
PP
57292014-08-19 Patrick Palka <ppalka@gcc.gnu.org>
5730
5731 PR c/45584
5732 * c-typeck.c (build_c_cast): Do a conversion even when the
5733 TYPE_MAIN_VARIANTs are the same.
5734
35aff4fb
MP
57352014-08-19 Marek Polacek <polacek@redhat.com>
5736
5737 * c-decl.c (diagnose_mismatched_decls): Unconditionally call
5738 pedwarn_c99 instead of pedwarn.
5739 (grokfield): Likewise.
5740 (warn_defaults_to): New function.
5741 (grokdeclarator): Call warn_defaults_to instead of pedwarn_c99.
5742 Unconditionally call pedwarn_c99 instead of pedwarn.
5743 (start_function): Call warn_defaults_to instead of pedwarn_c99.
5744 (declspecs_add_scspec): Call pedwarn_c99 instead of pedwarn, don't
5745 check flag_isoc11 before.
5746 * c-errors.c (pedwarn_c99): Change the return type to bool.
5747 Handle -Wc99-c11-compat.
5748 * c-parser.c (disable_extension_diagnostics): Handle
5749 warn_c99_c11_compat.
5750 (restore_extension_diagnostics): Likewise.
5751 (c_parser_static_assert_declaration_no_semi): Call pedwarn_c99
5752 instead of pedwarn, don't check flag_isoc11 before.
5753 (c_parser_declspecs): Likewise.
5754 (c_parser_alignas_specifier): Likewise.
5755 (c_parser_alignof_expression): Likewise.
5756 (c_parser_generic_selection): Likewise.
5757 * c-tree.h (pedwarn_c99): Update declaration.
5758 * c-typeck.c (c_finish_return): Call pedwarn or warning_at instead
5759 of pedwarn_c99.
5760
177cce46
MP
57612014-08-19 Marek Polacek <polacek@redhat.com>
5762
5763 * c-decl.c (warn_variable_length_array): Pass OPT_Wvla unconditionally
5764 to pedwarn_c90.
5765 * c-errors.c: Include "opts.h".
5766 (pedwarn_c90): Rewrite to handle -Wno-c90-c99-compat better.
5767 * c-parser.c (disable_extension_diagnostics): Handle negative value
5768 of warn_c90_c99_compat, too.
5769 (restore_extension_diagnostics): Likewise.
5770 (c_parser_compound_statement_nostart): Pass
5771 OPT_Wdeclaration_after_statement unconditionally to pedwarn_c90.
5772
6dc99c33
MP
57732014-08-12 Marek Polacek <polacek@redhat.com>
5774
5775 * c-parser.c (c_parser_postfix_expression) <case RID_FUNCTION_NAME>:
5776 Add pedwarn.
5777 (c_parser_postfix_expression) <case RID_PRETTY_FUNCTION_NAME>:
5778 Likewise.
5779 (c_parser_postfix_expression) <case RID_C99_FUNCTION_NAME>: Likewise.
5780
3f8257db 57812014-08-10 Marek Polacek <polacek@redhat.com>
f3bede71
MP
5782
5783 PR c/51849
5784 * c-decl.c (build_array_declarator): Remove check for !flag_isoc99.
5785 Call pedwarn_c90 instead of pedwarn.
5786 (check_bitfield_type_and_width): Likewise.
5787 (declspecs_add_qual): Likewise.
5788 (declspecs_add_type): Likewise.
5789 (warn_variable_length_array): Unify function for -pedantic and -Wvla.
5790 Adjust to only call pedwarn_c90.
5791 (grokdeclarator): Remove pedantic && !flag_isoc99 check. Call
5792 pedwarn_c90 instead of pedwarn.
5793 * c-errors.c (pedwarn_c90): Handle -Wc90-c99-compat.
5794 * c-parser.c (disable_extension_diagnostics): Handle
5795 warn_c90_c99_compat.
5796 (restore_extension_diagnostics): Likewise.
5797 (c_parser_enum_specifier): Remove check for !flag_isoc99. Call
5798 pedwarn_c90 instead of pedwarn.
5799 (c_parser_initelt): Likewise.
5800 (c_parser_postfix_expression): Likewise.
5801 (c_parser_postfix_expression_after_paren_type): Likewise.
5802 (c_parser_compound_statement_nostart): Remove check for !flag_isoc99.
5803 * c-tree.h: Fix formatting.
5804 * c-typeck.c (build_array_ref): Remove check for !flag_isoc99. Call
5805 pedwarn_c90 instead of pedwarn.
5806
9f25a338
TS
58072014-08-07 Trevor Saunders <tsaunders@mozilla.com>
5808
5809 * c-typeck.c: Remove include of pointer-set.h.
5810
044331a8
MP
58112014-08-07 Marek Polacek <polacek@redhat.com>
5812
5813 * c-typeck.c (pointer_diff): Remove P - (P + CST) optimization.
5814
b787e7a2
TS
58152014-08-02 Trevor Saunders <tsaunders@mozilla.com>
5816
5817 * c-typeck.c: Use hash_map instead of pointer_map.
5818
6e2830c3
TS
58192014-08-02 Trevor Saunders <tsaunders@mozilla.com>
5820
5821 * c-decl.c: Use hash_set instead of pointer_set.
5822
a7ee52fb
IZ
58232014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
5824
5825 PR middle-end/61455
5826 * c-array-notation.c (expand_array_notations): Handling
5827 of DECL_EXPR added.
5828
b4dfdc11
MG
58292014-07-31 Marc Glisse <marc.glisse@inria.fr>
5830
5831 PR c++/60517
5832 * c-typeck.c (c_finish_return): Return 0 instead of the address of
5833 a local variable.
5834
976d5a22
TT
58352014-07-30 Tom Tromey <tromey@redhat.com>
5836
5837 * c-typeck.c (struct constructor_stack) <designator_depth>: New
5838 field.
5839 (really_start_incremental_init, push_init_level): Initialize
5840 designator_depth.
5841 (pop_init_level): Set global designator_depth.
5842 (process_init_element): Check for designated_init attribute.
5843
30281de2
MP
58442014-07-20 Marek Polacek <polacek@redhat.com>
5845
5846 PR c/61852
5847 * c-decl.c (implicit_decl_warning): Add location_t parameter. Use it.
5848 (implicitly_declare): Pass location to implicit_decl_warning.
5849
b108f48f
JJ
58502014-07-14 Jakub Jelinek <jakub@redhat.com>
5851
5852 PR middle-end/61294
5853 * c-parser.c (c_parser_expr_list): Add new argument literal_zero_mask.
5854 If non-NULL, call c_parser_check_literal_zero.
5855 (c_parser_check_literal_zero): New function.
5856 (c_parser_postfix_expression_after_primary): Adjust
5857 c_parser_expr_list caller, handle -Wmemset-transposed-args.
5858
773ec47f
MP
58592014-07-06 Marek Polacek <polacek@redhat.com>
5860
5861 PR c/6940
5862 * c-decl.c (grokdeclarator): Set C_ARRAY_PARAMETER.
5863 * c-tree.h (C_ARRAY_PARAMETER): Define.
5864 * c-typeck.c (c_expr_sizeof_expr): Warn when using sizeof on an array
5865 function parameter.
5866
22e1cf1c 58672014-07-02 Jan Hubicka <hubicka@ucw.cz>
3f8257db 5868 Chen Gang <gang.chen.5i5j@gmail.com>
22e1cf1c
JH
5869
5870 * c-decl.c (duplicate_decls): CLear DECL_STRUCT_FUNCTION before
5871 releasing symbol.
5872
52ec0ea3
MP
58732014-07-01 Marek Polacek <polacek@redhat.com>
5874
5875 * c-typeck.c (convert_for_assignment): Pass OPT_Wint_conversion
5876 instead of 0 to WARN_FOR_ASSIGNMENT.
5877
d5c3d343
MP
58782014-07-01 Marek Polacek <polacek@redhat.com>
5879
5880 PR c/58286
5881 * c-typeck.c (convert_for_assignment): Pass
5882 OPT_Wincompatible_pointer_types instead of 0 to WARN_FOR_ASSIGNMENT.
5883
6a7253a4
MP
58842014-06-30 Marek Polacek <polacek@redhat.com>
5885
5886 * c-decl.c (grokdeclarator): Don't instrument VLAs if the function
5887 has no_sanitize_undefined attribute.
5888
5e88a8f4
IZ
58892014-06-30 Igor Zamyatin <igor.zamyatin@intel.com>
5890
5891 PR middle-end/57541
5892 * c-array-notation.c (fix_builtin_array_notation_fn):
5893 Check for 0 arguments in builtin call. Check that bultin argument is
5894 correct.
5895 * c-parser.c (c_parser_array_notation): Check for incorrect initial
5896 index.
5897
9698b078
SH
58982014-06-27 Sebastian Huber <sebastian.huber@embedded-brains.de>
5899
5900 * c-parser.c (c_parser_declaration_or_fndef): Discard all type
5901 qualifiers in __auto_type for atomic types.
5902 (c_parser_typeof_specifier): Discard all type qualifiers in
5903 __typeof__ for atomic types.
5904
6e07c515
MP
59052014-06-25 Marek Polacek <polacek@redhat.com>
5906
5907 PR c/61162
5908 * c-parser.c (c_parser_statement_after_labels): Pass the location of
5909 the return expression to c_finish_return.
5910
da6f124d
JJ
59112014-06-25 Jakub Jelinek <jakub@redhat.com>
5912
5913 * c-typeck.c (c_finish_omp_clauses): Make sure
5914 OMP_CLAUSE_LINEAR_STEP has correct type.
5915
c203e8a7
TS
59162014-06-24 Trevor Saunders <tsaunders@mozilla.com>
5917
5918 * c-decl.c: Adjust.
5919
56ad0e38
JJ
59202014-06-24 Jakub Jelinek <jakub@redhat.com>
5921
5922 * c-parser.c (c_parser_omp_for_loop): For
5923 #pragma omp parallel for simd move lastprivate clause from parallel
5924 to for rather than simd.
5925
47c2554f
MP
59262014-06-23 Marek Polacek <polacek@redhat.com>
5927
5928 * c-typeck.c (parser_build_binary_op): Don't call
5929 warn_logical_not_parentheses if the RHS is TRUTH_NOT_EXPR.
5930
56363ffd
JH
59312014-06-15 Jan Hubicka <hubicka@ucw.cz>
5932
5933 * c-parser.c (c_parser_omp_threadprivate): Likewise.
5934 * c-decl.c (merge_decls): Likewise.
5935
d7ff7ae5
MP
59362014-06-09 Marek Polacek <polacek@redhat.com>
5937
5938 PR c/36446
5939 * c-typeck.c (error_init): Call inform instead of error_at.
5940 (pedwarn_init): Call inform instead of pedwarn.
5941 (warning_init): Call inform instead of warning_at.
5942
24d047a3
JH
59432014-06-07 Jan Hubicka <hubicka@ucw.cz>
5944
5945 * c-decl.c (merge_decls): Use set_decl_section_name.
5946 (duplicate_decls): Remove node if it exists.
5947
9bac5cbb
G
59482014-06-05 S. Gilles <sgilles@terpmail.umd.edu>
5949
5950 PR c/53119
5951 * c-typeck.c (push_init_level, process_init_element,
5952 pop_init_level): Correct check for zero initialization, move
5953 missing brace warning to respect zero initialization.
5954
8ffcdea8
MP
59552014-06-05 Marek Polacek <polacek@redhat.com>
5956
5957 PR c/56724
5958 * c-typeck.c (convert_for_assignment): Use expr_loc for ic_argpass.
5959
742938c9
MP
59602014-06-05 Marek Polacek <polacek@redhat.com>
5961
5962 PR c/49706
5963 * c-typeck.c (parser_build_binary_op): Warn when logical not is used
ab20d992 5964 on the left hand side operand of a comparison.
742938c9 5965
6447c55d
MP
59662014-06-05 Marek Polacek <polacek@redhat.com>
5967
5968 PR c/48062
5969 * c-decl.c (warn_if_shadowing): Call inform instead of warning_at.
5970 Print note only if the warning was printed.
5971
9dc7743c
IZ
59722014-06-04 Igor Zamyatin <igor.zamyatin@intel.com>
5973
5974 PR c/58942
5975 * c-array-notation.c (fix_builtin_array_notation_fn): Handle the case
5976 with a pointer.
5977
fedfecef
MP
59782014-06-03 Marek Polacek <polacek@redhat.com>
5979
5980 PR c/60439
5981 * c-parser.c (c_parser_switch_statement): Pass explicit_cast_p to
5982 c_start_case.
5983 * c-tree.h (c_start_case): Update.
5984 * c-typeck.c (c_start_case): Add new boolean parameter. Warn if
5985 switch condition has boolean value.
5986
9b2b7279
AM
59872014-06-02 Andrew MacLeod <amacleod@redhat.com>
5988
5989 * c-decl.c: Include builtins.h.
5990 * c-parser.c: Likewise.
5991
5c1bc275
MP
59922014-05-27 Marek Polacek <polacek@redhat.com>
5993
5994 PR c/56724
5995 * c-typeck.c (convert_arguments): Get location of a parameter. Change
5996 error and warning calls to error_at and warning_at. Pass location of
5997 a parameter to it. Call warning_at with OPT_Wtraditional_conversion.
5998 (convert_for_assignment): Add parameter to WARN_FOR_ASSIGNMENT and
5999 WARN_FOR_QUALIFIERS. Pass expr_loc to those.
6000
97563bc8
IZ
60012014-05-26 Igor Zamyatin <igor.zamyatin@intel.com>
6002
6003 PR c/61191
6004 * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid
6005 function parameters.
6006
aede2c10
JH
60072014-05-23 Jan Hubicka <hubicka@ucw.cz>
6008
6009 * c-decl.c (merge_decls): Preserve symtab node pointers.
6010 (duplicate_decls): Free new decl.
6011
edbba2ce
TS
60122014-05-23 Thomas Schwinge <thomas@codesourcery.com>
6013
f3316c6d
TS
6014 * c-typeck.c (c_finish_omp_clauses): Remove duplicated variable
6015 initialization.
6016
edbba2ce
TS
6017 * c-parser.c (c_parser_omp_target): Return bool values.
6018
68c81f24
TS
60192014-05-22 Thomas Schwinge <thomas@codesourcery.com>
6020
6021 * c-parser.c (c_parser_omp_clause_thread_limit): Rename
6022 num_teams_loc variable to num_thread_limit_loc.
6023
632f2871
RS
60242014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
6025
6026 * c-array-notation.c (expand_array_notations): Use void_node
6027 instead of void_zero_node.
6028
766090c2
TS
60292014-05-17 Trevor Saunders <tsaunders@mozilla.com>
6030
6031 * c-decl.c (finish_struct): Adjust.
6032 (finish_enum): Likewise.
6033 (bind): Adjust.
6034 (record_inline_static): Likewise.
6035 (push_scope): Likewise.
6036 (make_label): Likewise.
6037 (lookup_label_for_goto): Likewise.
6038 (finish_struct): Likewise.
6039 (finish_enum): Likewise.
6040 (store_parm_decls): Likewise.
6041 (c_push_function_context): Likewise.
6042 * c-lang.h: Remove usage of variable_size gty attribute.
6043 * c-parser.c (c_parse_init): Adjust.
6044 (c_parse_file): Likewise.
6045
2b107f6b
MP
60462014-05-13 Marek Polacek <polacek@redhat.com>
6047
6048 PR c/61162
6049 * c-typeck.c (convert_for_assignment): Pass location to
6050 WARN_FOR_ASSIGNMENT instead of input_location.
6051
d033409e
MP
60522014-05-10 Marek Polacek <polacek@redhat.com>
6053
6054 * c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
6055 maybe_warn_string_init.
6056 (c_parser_postfix_expression_after_paren_type): Pass type_loc to
6057 maybe_warn_string_init.
6058 * c-tree.h (maybe_warn_string_init): Update declaration.
6059 * c-typeck.c (maybe_warn_string_init): Add location parameter.
6060 Call pedwarn_init with loc instead of with input_location.
6061 (digest_init): Pass init_loc to maybe_warn_string_init.
6062 (pop_init_level): Call pedwarn_init with loc instead of with
6063 input_location.
6064 (set_init_index): Likewise.
6065 (process_init_element): Likewise.
6066
ea58ef42
MP
60672014-05-09 Marek Polacek <polacek@redhat.com>
6068
6069 PR c/61096
6070 * c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level.
6071 (c_parser_initelt): Pass location to set_init_label. Pass array index
6072 location to set_init_index.
6073 * c-tree.h (push_init_level): Update declaration.
6074 (pop_init_level): Likewise.
6075 (set_init_index): Likewise.
6076 (set_init_label): Likewise.
6077 * c-typeck.c (error_init): Add location parameter. Call error_at
6078 instead of error.
6079 (digest_init): Pass init_loc to error_init.
6080 (really_start_incremental_init):
6081 (push_init_level): Add location parameter. Pass loc to pop_init_level
6082 and error_init.
6083 (pop_init_level): Likewise.
6084 (set_designator): Add location parameter. Pass loc to pop_init_level,
6085 push_init_level, and error_init.
6086 (set_init_index): Add location parameter. Pass loc to error_init and
6087 set_designator.
6088 (set_init_label): Likewise.
6089 (output_init_element): Pass loc to error_init.
6090 (process_init_element): Pass loc to error_init, pop_init_level,
6091 pedwarn_init, and push_init_level.
6092
661a0813
MP
60932014-05-09 Marek Polacek <polacek@redhat.com>
6094
6095 PR c/50459
6096 * c-parser.c (c_parser_attributes): Parse the arguments as an
6097 expression-list if the attribute takes identifier.
6098
2793eeab
MP
60992014-05-08 Marek Polacek <polacek@redhat.com>
6100
6101 PR c/61053
6102 * c-decl.c (grokdeclarator): Use min_align_of_type instead of
6103 TYPE_ALIGN_UNIT.
6104
f827930a
MP
61052014-05-08 Marek Polacek <polacek@redhat.com>
6106
6107 PR c/61077
6108 * c-decl.c (start_function): Warn for _Atomic-qualified return type
6109 of main.
6110
1d60af08
KZ
61112014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
6112 Mike Stump <mikestump@comcast.net>
6113 Richard Sandiford <rdsandiford@googlemail.com>
6114
6115 * c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN.
6116 (finish_enum): Use wide-int interfaces.
6117 * c-parser.c (c_parser_cilk_clause_vectorlength): Likewise.
6118 * c-typeck.c (build_c_cast): Likewise.
6119 (set_nonincremental_init_from_string): Likewise.
6120 (c_tree_equal): Likewise.
6121
a0e24419
MP
61222014-05-02 Marek Polacek <polacek@redhat.com>
6123
6124 PR c/25801
6125 * c-typeck.c (c_size_in_bytes): Update comment. Don't call error.
6126 Return size_one_node when the type is not complete.
6127 (pointer_diff): Remove comment.
6128 (build_unary_op): Improve error messages.
6129
19fc9faa
MP
61302014-05-02 Marek Polacek <polacek@redhat.com>
6131
6132 * c-typeck.c (c_finish_return): Separate warning_at calls.
6133
63bc4e87
MP
61342014-05-02 Marek Polacek <polacek@redhat.com>
6135
6136 * c-tree.h (error_init): Remove declaration.
6137 (pedwarn_init): Likewise.
6138 * c-typeck.c (error_init): Make static and move above.
6139 (pedwarn_init): Likewise.
6140 (warning_init): Move above.
6141 (maybe_warn_string_init): Likewise.
6142
4bd2511b
JL
61432014-05-01 Jeff Law <law@redhat.com>
6144
6145 Revert:
6146
6147 2014-04-24 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
6148 * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
6149 avoid goto.
6150
6a358dcb
MP
61512014-05-02 Marek Polacek <polacek@redhat.com>
6152
6153 PR c/60784
6154 * c-typeck.c (push_init_level): Set constructor_designated to
6155 p->designated for structures.
6156
ae5ebda4
MP
61572014-05-01 Marek Polacek <polacek@redhat.com>
6158
6159 PR c/60915
6160 * c-parser.c (c_parser_declaration_or_fndef): Give better error if
6161 function-definition has an attribute after the declarator.
6162
96b40f8d
MP
61632014-05-01 Marek Polacek <polacek@redhat.com>
6164
6165 PR c/60257
6166 * c-typeck.c (warning_init): Add location_t parameter. Call
6167 warning_at instead of warning.
6168 (push_init_level): Pass input_location to warning_init.
6169 (add_pending_init): Add location_t parameter. Pass loc to
6170 warning_init.
6171 (set_nonincremental_init): Pass input_location to add_pending_init.
6172 (set_nonincremental_init_from_string): Likewise.
6173 (output_init_element): Pass loc to warning_init and to
6174 add_pending_init.
6175
32e00768
MP
61762014-05-01 Marek Polacek <polacek@redhat.com>
6177
6178 PR c/43395
6179 * c-typeck.c (c_finish_return): Distinguish between label and variable
6180 when warning about returning local address.
6181
c9379ce2
MP
61822014-05-01 Marek Polacek <polacek@redhat.com>
6183
6184 PR c/29467
6185 * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
6186 in C89 mode.
6187
d00887e8
MP
61882014-05-01 Marek Polacek <polacek@redhat.com>
6189
6190 PR c/43245
6191 * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
6192 instead of 0 to WARN_FOR_QUALIFIERS.
6193
5436fa2e
MP
61942014-05-01 Marek Polacek <polacek@redhat.com>
6195
6196 PR c/56989
6197 * c-typeck.c (default_conversion): Use better location for
6198 error call.
6199
f8ed5150
MP
62002014-04-30 Marek Polacek <polacek@redhat.com>
6201
6202 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
6203 also when SANITIZE_FLOAT_DIVIDE is on.
6204
8337d1db
MP
62052014-04-30 Marek Polacek <polacek@redhat.com>
6206
6207 PR c/60139
6208 * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
6209 and pedwarn_init. Use loc insted of input_location.
6210
c4bdc42f
MP
62112014-04-30 Marek Polacek <polacek@redhat.com>
6212
6213 PR c/60351
6214 * c-typeck.c (build_binary_op): Use location when warning about
6215 shift count.
6216
45484dcf
MP
62172014-04-25 Marek Polacek <polacek@redhat.com>
6218
6219 PR c/18079
6220 * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
6221 always_inline/noinline and hot/cold attributes.
6222
34cf811f
MP
62232014-04-25 Marek Polacek <polacek@redhat.com>
6224
6225 PR c/60114
6226 * c-parser.c (c_parser_initelt): Pass input_location to
6227 process_init_element.
6228 (c_parser_initval): Pass loc to process_init_element.
6229 * c-tree.h (process_init_element): Adjust declaration.
6230 * c-typeck.c (push_init_level): Pass input_location to
6231 process_init_element.
6232 (pop_init_level): Likewise.
6233 (set_designator): Likewise.
6234 (output_init_element): Add location_t parameter. Pass loc to
6235 digest_init.
6236 (output_pending_init_elements): Pass input_location to
6237 output_init_element.
6238 (process_init_element): Add location_t parameter. Pass loc to
6239 output_init_element.
6240
42056eac
JJ
62412014-04-24 Jakub Jelinek <jakub@redhat.com>
6242
6243 * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
6244 atomic-clause, allow comma in between atomic-clause and
6245 seq_cst.
6246
e162a134
JJ
62472014-04-22 Jakub Jelinek <jakub@redhat.com>
6248
6249 PR c/59073
6250 * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
6251 fails, don't set OM_PARALLEL_COMBINED and return NULL.
6252
2f6babac
IZ
62532014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
6254
6255 PR middle-end/60469
6256 * c-array-notation.c (fix_builtin_array_notation_fn): Use
6257 create_tmp_var instead build_decl for creating temps.
6258 (build_array_notation_expr): Likewise.
6259 (fix_conditional_array_notations_1): Likewise.
6260 (fix_array_notation_expr): Likewise.
6261 (fix_array_notation_call_expr): Likewise.
6262
8edbfaa6
JJ
62632014-03-28 Jakub Jelinek <jakub@redhat.com>
6264
6265 PR c++/60689
6266 * c-tree.h (c_build_function_call_vec): New prototype.
6267 * c-typeck.c (build_function_call_vec): Don't call
6268 resolve_overloaded_builtin here.
6269 (c_build_function_call_vec): New wrapper function around
6270 build_function_call_vec. Call resolve_overloaded_builtin here.
6271 (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
6272 Call c_build_function_call_vec instead of build_function_call_vec.
6273 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
6274 * c-decl.c (finish_decl): Likewise.
6275
7485aeea
MLI
62762014-03-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
6277
6278 PR c/55383
6279 * c-typeck.c: Use correct format string in cast-qual warning
6280
b17a8b07
TS
62812014-03-07 Thomas Schwinge <thomas@codesourcery.com>
6282
6283 * c-decl.c (c_decl_attributes): Use
6284 lang_hooks.types.omp_mappable_type.
6285 * c-typeck.c (c_finish_omp_clauses): Likewise.
6286
3af9c5e9
MP
62872014-03-06 Marek Polacek <polacek@redhat.com>
6288
6289 PR c/60197
6290 * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
6291 of checking tree code.
6292
1c9f5f33
PK
62932014-02-19 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
6294
6295 * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
6296 (c_parser_parameter_declaration): Likewise.
6297
cc28fc7f
MP
62982014-02-19 Marek Polacek <polacek@redhat.com>
6299
6300 PR c/60195
6301 * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
6302 Call mark_exp_read on exp.value.
6303 (build_atomic_assign): Set TREE_NO_WARNING on val and old. Set
6304 TREE_ADDRESSABLE on old instead of val.
6305 (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
6306
b581c05c
PK
63072014-02-07 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
6308
6309 * c-parser.c (c_parser_get_builtin_args): Replace calls to
6310 C_EXPR_APPEND by vec_safe_push.
6311 * c-tree.h (C_EXPR_APPEND): Remove.
6312
81e5eca8
MP
63132014-01-31 Marek Polacek <polacek@redhat.com>
6314
6315 PR c/59963
6316 * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
6317 build_function_call_vec.
6318 (build_function_call): Likewise.
6319 (build_atomic_assign): Likewise.
6320 (build_function_call_vec): Add arg_loc parameter. Use it.
6321 (convert_arguments): Likewise.
6322 (convert_for_assignment): Rename rhs_loc to expr_loc.
6323 * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
6324 (c_parser_objc_keywordexpr): Likewise.
6325 (c_parser_postfix_expression_after_primary): Call
6326 build_function_call_vec with expr_loc rather than op_loc.
6327 Call c_parser_expr_list to fill arg_loc. Pass arg_loc to
6328 build_function_call_vec.
6329 (c_parser_expr_list): Add locations parameter. Fill it with locations
6330 of function arguments.
6331 * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
6332
68fca595
MP
63332014-01-30 Marek Polacek <polacek@redhat.com>
6334
6335 PR c/59940
6336 * c-typeck.c (build_function_call_vec): Use loc parameter.
6337 (convert_arguments): Add location parameter. Use it.
6338 (ep_convert_and_check): Likewise.
6339 (build_atomic_assign): Adjust convert_for_assignment call.
6340 (build_modify_expr): Likewise.
6341 (digest_init): Likewise.
6342 (c_finish_return): Likewise.
6343 (build_conditional_expr): Adjust ep_convert_and_check calls.
6344 (convert_for_assignment): Add rhs_loc parameter. Use it.
6345 (build_binary_op): Adjust convert_and_check and ep_convert_and_check
6346 calls.
6347
fa337f3a
RB
63482014-01-30 Richard Biener <rguenther@suse.de>
6349
6350 PR c/59905
6351 * c-typeck.c (build_function_call_vec): Do not replace calls
6352 to a function via an incompatible type with a runtime abort.
6353
b72271b9
BI
63542014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
6355
6356 * c-parser.c (c_parser_declaration_or_fndef): Replaced
6357 flag_enable_cilkplus with flag_cilkplus.
6358 (c_parser_direct_declarator_inner): Likewise.
6359 (c_parser_attribute_any_word): Likewise.
6360 (c_parser_attributes): Likewise.
6361 (c_parser_compound_statement): Likewise.
6362 (c_parser_statement_after_labels): Likewise.
6363 (c_parser_if_statement): Likewise.
6364 (c_parser_switch_statement): Likewise.
6365 (c_parser_do_statement): Likewise.
6366 (c_parser_for_statement): Likewise.
6367 (c_parser_unary_expression): Likewise.
6368 (c_parser_postfix_expression): Likewise.
6369 (c_parser_postfix_expression_after_primary): Likewise.
6370 (c_parser_postfix_expression_after_primary): Likewise.
6371 (c_parser_omp_clause_name): Likewise.
6372 (c_finish_omp_declare_simd): Likewise.
6373 (c_parser_cilk_verify_simd): Likewise.
6374 * c-typeck.c (build_array_ref): Likewise.
6375 (build_function_call_vec): Likewise.
6376 (convert_arguments): Likewise.
6377 (build_compound_expr): Likewise.
6378 (c_finish_return): Likewise.
6379 (c_finish_if_stmt): Likewise.
6380 (c_finish_loop): Likewise.
6381 (build_binary_op): Likewise.
6382
393e8e8b
MP
63832014-01-23 Marek Polacek <polacek@redhat.com>
6384
6385 PR c/59846
6386 * c-typeck.c (parser_build_binary_op): Use location instead of
6387 input_location.
6388 (build_binary_op): Pass location to shorten_compare.
6389
f04dda30
MP
63902014-01-23 Marek Polacek <polacek@redhat.com>
6391
6392 PR c/58346
6393 * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
6394 an empty aggregate.
6395
789eadcd
MP
63962014-01-23 Marek Polacek <polacek@redhat.com>
6397
6398 PR c/59871
6399 * c-typeck.c (build_compound_expr): Warn even for right-hand operand
6400 of a comma expression.
6401 (emit_side_effect_warnings): Likewise.
6402
40f14e9f
BI
64032014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
6404
6405 PR c/59825
6406 * c-array-notation.c (expand_array_notation_exprs): Rewrote this
6407 function to use walk_tree and moved a lot of its functionality to
6408 expand_array_notations.
6409 (expand_array_notations): New function.
6410
74558dd9
BI
64112014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
6412
6413 * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
6414 attribute an attribute without value.
6415
652fea39
JJ
64162014-01-23 Jakub Jelinek <jakub@redhat.com>
6417
6418 PR middle-end/58809
6419 * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
6420 BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
6421
f34f1c87
MP
64222014-01-22 Marek Polacek <polacek@redhat.com>
6423
6424 PR c/59891
6425 * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
6426 of remove_c_maybe_const_expr on op1 and op2.
6427
241f845a
JJ
64282014-01-15 Jakub Jelinek <jakub@redhat.com>
6429
6430 PR c/58943
6431 * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
6432 effects, preevaluate rhs using SAVE_EXPR first.
6433
9a74f20c
BI
64342014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
6435
6436 PR c++/59631
6437 * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
6438 statements with if-elseif statements.
6439
96066ce1
MP
64402014-01-06 Marek Polacek <polacek@redhat.com>
6441
6442 PR c/57773
6443 * c-decl.c (check_bitfield_type_and_width): Warn for implementation
6444 defined bit-field types only in ISO C.
6445
23a5b65a
RS
64462014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
6447
6448 Update copyright years
6449
f9030485
RS
64502014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
6451
6452 * c-array-notation.c: Use the standard form for the copyright notice.
6453
41958c28
BI
64542013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
6455
6456 * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
6457 (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
6458 field in parser is not empty. If not-empty, call the function
6459 c_parser_finish_omp_declare_simd.
6460 (c_parser_cilk_clause_vectorlength): Modified function to be shared
6461 between SIMD-enabled functions and #pragma simd. Added new parameter.
6462 (c_parser_cilk_all_clauses): Modified the usage of the function
6463 c_parser_cilk_clause_vectorlength as mentioned above.
6464 (c_parser_cilk_simd_fn_vector_attrs): New function.
6465 (c_finish_cilk_simd_fn_tokens): Likewise.
6466 (is_cilkplus_vector_p): Likewise.
6467 (c_parser_omp_clause_name): Added checking for "vectorlength,"
6468 "nomask," and "mask" strings in clause name.
6469 (c_parser_omp_all_clauses): Added 3 new case statements:
6470 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
6471 PRAGMA_CILK_CLAUSE_NOMASK.
6472 (c_parser_attributes): Added a cilk_simd_fn_tokens parameter. Added a
6473 check for vector attribute and if so call the function
6474 c_parser_cilk_simd_fn_vector_attrs. Also, when Cilk plus is enabled,
6475 called the function c_finish_cilk_simd_fn_tokens.
6476 (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
6477 parser field is non-empty. If so, parse them as you would parse
6478 the omp declare simd pragma.
6479 (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
6480 Added a check when step is a parameter and flag it as error.
6481 (CILK_SIMD_FN_CLAUSE_MASK): New #define.
6482 (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
6483 pragma_omp_clause.
6484
cef0fd0e
TS
64852013-12-17 Thomas Schwinge <thomas@codesourcery.com>
6486
6487 * c-parser.c (c_parser_omp_parallel): Fix description.
6488
12893402
BI
64892013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
6490
6491 * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
6492 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
6493 (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
6494 * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
6495
296674db
JM
64962013-12-04 Joseph Myers <joseph@codesourcery.com>
6497
6498 PR c/52023
6499 * c-parser.c (c_parser_alignas_specifier): Use
6500 c_sizeof_or_alignof_type instead of c_alignof.
6501 (c_parser_alignof_expression): Likewise, with min_alignof
6502 parameter depending on alignof spelling used.
6503
edd28054
MP
65042013-12-04 Marek Polacek <polacek@redhat.com>
6505
6506 PR c/54113
6507 * c-decl.c (start_function): Don't warn for missing prototype for
6508 inline functions.
6509
da0fc454
MP
65102013-12-03 Marek Polacek <polacek@redhat.com>
6511
6512 PR c/59351
6513 * c-decl.c (build_compound_literal): Allow compound literals with
6514 empty initial value.
6515
4c2ecab0
JM
65162013-12-02 Joseph Myers <joseph@codesourcery.com>
6517
6518 PR c/58235
6519 * c-typeck.c (build_modify_expr): Diagnose assignment to
6520 expression with array type.
6521
340baef7
JM
65222013-11-29 Joseph Myers <joseph@codesourcery.com>
6523
6524 PR c/42262
6525 * c-typeck.c (process_init_element): Do not treat a string as
6526 initializing a whole array when used with a designator for an
6527 individual element.
6528
6763b9f7
JM
65292013-11-29 Joseph Myers <joseph@codesourcery.com>
6530
6531 PR c/57574
6532 * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
6533 an inline function following a static declaration.
6534
e7bd1de1
JJ
65352013-11-28 Jakub Jelinek <jakub@redhat.com>
6536
6537 PR c/59310
6538 * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
6539 to p_name before calling c_parser_omp_teams instead of after.
6540 (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
6541 argument. Remove unused p_name variable.
6542
0136f8f0
AH
65432013-11-27 Aldy Hernandez <aldyh@redhat.com>
6544 Jakub Jelinek <jakub@redhat.com>
6545
6546 * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
6547 external_scope is NULL.
6548
241b71bb
TV
65492013-11-27 Tom de Vries <tom@codesourcery.com>
6550 Marc Glisse <marc.glisse@inria.fr>
6551
6552 PR c++/59032
6553 * c-typeck.c (build_unary_op): Allow vector increment and decrement.
6554
2fb9a547
AM
65552013-11-22 Andrew MacLeod <amacleod@redhat.com>
6556
6557 * c-typeck.c: Add required include files from gimple.h.
6558
8400e75e
DM
65592013-11-22 David Malcolm <dmalcolm@redhat.com>
6560
6561 * c-decl.c (define_label, shadow_tag_warned)
6562 (check_bitfield_type_and_width, grokdeclarator, grokparms,
6563 store_parm_decls_newstyle, store_parm_decls_oldstyle)
6564 (declspecs_add_type): Remove use of in_system_header macro.
6565 * c-parser.c (c_parser_unary_expression): Likewise.
6566 * c-typeck.c (store_init_value, process_init_element)
6567 (c_start_case): Likewise.
6568
6569 * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
6570 macro.
6571
6572 * c-parser.c (c_parser_set_source_position_from_token): Remove
6573 reference to in_system_header from comment.
6574
386b1f1f
RS
65752013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
6576
6577 * c-decl.c (grokdeclarator): Update comment to refer to
6578 tree_to_[su]hwi rather than tree_low_cst.
6579
ae7e9ddd
RS
65802013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
6581
6582 * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
6583 tree_to_uhwi throughout.
6584
9439e9a1
RS
65852013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
6586
6587 * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
6588 throughout.
6589
9541ffee
RS
65902013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
6591
6592 * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
6593 throughout.
6594
c02065fc
AH
65952013-11-15 Aldy Hernandez <aldyh@redhat.com>
6596
6597 * c-parser.c (c_parser_cilk_simd): New.
6598 (c_parser_cilk_verify_simd): New.
6599 (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
6600 (c_parser_omp_for_loop): Add case for NE_EXPR.
6601 Set c_break_label for CILK_SIMD.
6602 (c_parser_cilk_clause_vectorlength): New.
6603 (c_parser_cilk_clause_linear): New.
6604 (c_parser_cilk_clause_name): New.
6605 (c_parser_cilk_all_clauses): New.
6606 * c-typeck.c (build_unary_op): Pass location argument to
6607 readonly_error.
6608 (build_modify_expr): Same.
6609 (build_asm_expr): Same.
6610 (c_finish_bc_stmt): Error on break/continue in loops.
6611
18f429e2
AM
66122013-11-14 Andrew MacLeod <amacleod@redhat.com>
6613
6614 * c-typeck.c: Include only gimplify.h and gimple.h as needed.
6615
d8a2d370
DN
66162013-11-14 Diego Novillo <dnovillo@google.com>
6617
6618 * c-decl.c: Include print-tree.h.
6619 Include stor-layout.h.
6620 Include varasm.h.
6621 Include attribs.h.
6622 Include stringpool.h.
6623 * c-lang.c: Include fold-const.h.
6624 * c-parser.c: Include stringpool.h.
6625 Include attribs.h.
6626 Include stor-layout.h.
6627 Include varasm.h.
6628 Include trans-mem.h.
6629 * c-typeck.c: Include stor-layout.h.
6630 Include trans-mem.h.
6631 Include varasm.h.
6632 Include stmt.h.
6633
38b7bc7f
JM
66342013-11-13 Joseph Myers <joseph@codesourcery.com>
6635
6636 * c-tree.h (c_typespec_keyword): Add cts_auto_type.
6637 * c-decl.c (declspecs_add_type, finish_declspecs): Handle
6638 __auto_type.
6639 * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
6640 (c_parser_attribute_any_word, c_parser_objc_selector): Handle
6641 RID_AUTO_TYPE.
6642 (c_parser_declspecs): Take argument AUTO_TYPE_OK.
6643 (c_parser_declaration_or_fndef, c_parser_struct_declaration)
6644 (c_parser_declarator, c_parser_direct_declarator_inner)
6645 (c_parser_parameter_declaration, c_parser_type_name): All callers
6646 changed.
6647 (c_parser_declaration_or_fndef): Handle declarations with type
6648 determined from the initializer.
6649
45b0be94
AM
66502013-11-12 Andrew MacLeod <amacleod@redhat.com>
6651
18f429e2 6652 * c-typeck.c: Include gimplify.h.
45b0be94 6653
582d9b50
JM
66542013-11-12 Joseph Myers <joseph@codesourcery.com>
6655
6656 * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
6657 * c-parser.c (c_parser_declspecs): Mention _Thread_local in
6658 comment.
6659 * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
6660 or _Thread_local as appropriate in diagnostics.
6661 (build_null_declspecs): Initialize ret->thread_gnu_p.
6662 (declspecs_add_scspec): Handle either __thread or _Thread_local
6663 for RID_THREAD. Diagnose _Thread_local for pre-C11 standards if
6664 pedantic. Do not disallow _Thread_local extern and _Thread_local
6665 static.
6666
267bac10
JM
66672013-11-07 Joseph Myers <joseph@codesourcery.com>
6668 Andrew MacLeod <amacleod@redhat.com>
6669
6670 * c-aux-info.c (gen_type): Handle atomic qualifier.
6671 * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
6672 qualifiers when compating types.
6673 (shadow_tag_warned): Handle atomic_p in declspecs.
6674 (quals_from_declspecs): Likewise.
6675 (start_decl): Use c_type_promotes_to when promoting argument
6676 types.
6677 (grokdeclarator): Handle _Atomic.
6678 (get_parm_info): Diagnose any qualifier on "void" as only
6679 parameter.
6680 (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
6681 comparing types. Use c_type_promotes_to when promoting argument
6682 types.
6683 (finish_function): Use c_type_promotes_to when promoting argument
6684 types.
6685 (build_null_declspecs): Handle atomic_p in declspecs.
6686 (declspecs_add_qual): Handle RID_ATOMIC.
6687 * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
6688 (c_token_starts_declspecs): Handle RID_ATOMIC.
6689 (c_parser_declspecs): Handle atomic type specifiers and
6690 qualifiers.
6691 (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
6692 from types of expressions with atomic type.
6693 (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
6694 (c_parser_attribute_any_word): Handle RID_ATOMIC.
6695 (c_parser_initializer, c_parser_initelt, c_parser_initval)
6696 (c_parser_statement_after_labels, c_parser_switch_statement)
6697 (c_parser_for_statement, c_parser_expr_no_commas)
6698 (c_parser_conditional_expression, c_parser_binary_expression)
6699 (c_parser_cast_expression, c_parser_unary_expression)
6700 (c_parser_postfix_expression)
6701 (c_parser_postfix_expression_after_primary, c_parser_expression):
6702 Use convert_lvalue_to_rvalue.
6703 (c_parser_expression_conv, c_parser_expr_list): Document
6704 conversion of lvalues to rvalues. Use convert_lvalue_to_rvalue.
6705 (c_parser_objc_synchronized_statement): Use
6706 convert_lvalue_to_rvalue.
6707 (c_parser_objc_selector): Handle RID_ATOMIC.
6708 (c_parser_objc_receiver, c_parser_array_notation): Use
6709 convert_lvalue_to_rvalue.
6710 * c-tree.h (ctsk_typeof): Adjust comment to mention use for
6711 _Atomic (type-name).
6712 (struct c_declspecs): Add atomic_p field.
6713 (convert_lvalue_to_rvalue): Declare.
6714 * c-typeck.c (c_type_promotes_to): Promote atomic types to
6715 corresponding atomic types.
6716 (qualify_type): Don't add _Atomic qualifiers from second argument.
6717 (comp_target_types): Do not allow _Atomic mismatches.
6718 (type_lists_compatible_p): Do not remove atomic qualifiers when
6719 comparing types.
6720 (really_atomic_lvalue, convert_lvalue_to_rvalue)
6721 (build_atomic_assign): New functions.
6722 (build_unary_op): Use build_atomic_assign for atomic increment and
6723 decrement.
6724 (build_conditional_expr): Do not treat _Atomic void as a qualified
6725 version of void.
6726 (build_modify_expr): Use build_atomic_assign for atomic LHS.
6727 (find_anonymous_field_with_type, convert_to_anonymous_field)
6728 (convert_for_assignment): Do not remove atomic qualifiers when
6729 comparing types.
6730 (digest_init): Do not accept initialization of arrays of atomic
6731 elements by string constants.
6732 (build_asm_expr): Use convert_lvalue_to_rvalue.
6733 (build_binary_op): Do not treat _Atomic void as a qualified
6734 version of void.
6735
0c249d4b
DD
67362013-11-06 DJ Delorie <dj@redhat.com>
6737
6738 * c-decl.c (locate_old_decl): If a previous conflicting decl is
6739 both explicit and builtin, print the location of the explicit one.
6740
6d7f7e0a
TB
67412013-11-05 Tobias Burnus <burnus@net-b.de>
6742
6743 * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
6744 c_parser_omp_distribute, c_parser_omp_teams,
6745 c_parser_omp_target, c_parser_omp_declare): Handle
6746 -fopenmp-simd.
6747
b906f4ca
MP
67482013-11-03 Marek Polacek <polacek@redhat.com>
6749
6750 * c-decl.c (grokdeclarator): Add VLA instrumentation.
6751
ee1d5a02
JJ
67522013-11-01 Jakub Jelinek <jakub@redhat.com>
6753
6754 * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
6755 check_dup_generic at the end, unless remove is true.
6756 (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
6757 remove = true;.
6758 (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
6759
5a9785fb
JJ
67602013-10-31 Jakub Jelinek <jakub@redhat.com>
6761
6762 * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
6763 with decl that is not pointer nor array.
6764
939b37da
BI
67652013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
6766
6767 * c-decl.c (finish_function): Added a call for insert_cilk_frame when
6768 a spawning function is found.
6769 * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
6770 (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
6771 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
6772 * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
6773 case.
6774 (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
6775 * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
6776 expr.
6777 (c_finish_return): Added a check to reject _Cilk_spawn in return
6778 expression.
6779 (build_cilk_spawn): New function.
6780 (build_cilk_sync): Likewise.
6781 * Makefile.in (c-decl.o): Added cilk.h in dependency list.
ab20d992 6782
d4af74d4
TB
67832013-10-27 Tobias Burnus <burnus@net-b.de>
6784
6785 PR other/33426
6786 * c-parser.c (c_parser_while_statement, c_parser_while_statement,
6787 c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
6788 (c_parser_statement_after_labels): Update calls.
6789
d73749df 67902013-10-24 Tobias Burnus <burnus@net-b.de>
8170608b
TB
6791
6792 PR other/33426
6793 * c-parser.c (c_parser_pragma, c_parser_for_statement):
6794 Handle PRAGMA_IVDEP.
6795 (c_parser_statement_after_labels): Update call.
6796
f28aa681
MP
67972013-10-24 Marek Polacek <polacek@redhat.com>
6798
6799 * c-parser.c (c_parser_struct_declaration): Add a comment.
6800 (c_parser_declarator): Don't allow _Alignas here.
6801
0645c1a2
AM
68022013-10-17 Andrew MacLeod <amacleod@redhat.com>
6803
6804 * c-parser.c: Include omp-low.h.
6805 * c-typeck.c: Likewise.
6806
568a31f2
MP
68072013-10-17 Marek Polacek <polacek@redhat.com>
6808
6809 PR c/58267
6810 * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
6811 Document syntax of the array-declarator.
6812 (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
6813 are not permitted.
6814 (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
6815 (c_parser_struct_declaration): Likewise.
6816 (c_parser_declarator): Likewise.
6817 (c_parser_direct_declarator_inner): Likewise.
6818 (c_parser_parameter_declaration): Likewise.
6819 (c_parser_type_name): Likewise.
6820
acf0174b
JJ
68212013-10-11 Jakub Jelinek <jakub@redhat.com>
6822
6823 * c-lang.h (current_omp_declare_target_attribute): New extern
6824 decl.
6825 * c-parser.c: Include c-lang.h.
6826 (struct c_parser): Change tokens to c_token *.
6827 Add tokens_buf field. Change tokens_avail type to unsigned int.
6828 (c_parser_consume_token): If parser->tokens isn't
6829 &parser->tokens_buf[0], increment parser->tokens.
6830 (c_parser_consume_pragma): Likewise.
6831 (enum pragma_context): Add pragma_struct and pragma_param.
6832 (c_parser_external_declaration): Adjust
6833 c_parser_declaration_or_fndef caller.
6834 (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
6835 argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
6836 Adjust recursive call.
6837 (c_parser_struct_or_union_specifier): Use pragma_struct instead
6838 of pragma_external.
6839 (c_parser_parameter_declaration): Use pragma_param instead of
6840 pragma_external.
6841 (c_parser_compound_statement_nostart, c_parser_label,
6842 c_parser_for_statement): Adjust
6843 c_parser_declaration_or_fndef callers.
6844 (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
6845 it through to c_parser_conditional_expression.
6846 (c_parser_conditional_expression): Add omp_atomic_lhs argument,
6847 pass it through to c_parser_binary_expression. Adjust recursive
6848 call.
6849 (c_parser_binary_expression): Remove prec argument, add
6850 omp_atomic_lhs argument instead. Always start from PREC_NONE, if
6851 omp_atomic_lhs is non-NULL and one of the arguments of toplevel
6852 binop matches it, use build2 instead of parser_build_binary_op.
6853 (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
6854 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
6855 PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
6856 Handle pragma_struct and pragma_param the same as pragma_external.
6857 (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
6858 (c_parser_omp_variable_list): Parse array sections for
6859 OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
6860 (c_parser_omp_clause_collapse): Fully fold collapse expression.
6861 (c_parser_omp_clause_reduction): Handle user defined reductions.
6862 (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
6863 c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
6864 c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
6865 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
6866 c_parser_omp_clause_depend, c_parser_omp_clause_map,
6867 c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
6868 c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
6869 c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
6870 (c_parser_omp_all_clauses): Add finish_p argument. Don't call
6871 c_finish_omp_clauses if it is false. Handle new OpenMP 4.0 clauses.
6872 (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
6873 present to c_finish_omp_atomic. Handle OpenMP 4.0 atomic forms.
6874 (c_parser_omp_for_loop): Add CODE argument, pass it through
6875 to c_finish_omp_for. Change last argument to cclauses,
6876 and adjust uses to grab parallel clauses from the array of all
6877 the split clauses. Adjust c_parser_binary_expression,
6878 c_parser_declaration_or_fndef and c_finish_omp_for callers.
6879 (omp_split_clauses): New function.
6880 (c_parser_omp_simd): New function.
6881 (c_parser_omp_for): Add p_name, mask and cclauses arguments.
6882 Allow the function to be called also when parsing combined constructs,
6883 and call c_parser_omp_simd when parsing for simd.
6884 (c_parser_omp_sections_scope): If section-sequence doesn't start with
6885 #pragma omp section, require exactly one structured-block instead of
6886 sequence of statements.
6887 (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
6888 Allow the function to be called also when parsing combined constructs.
6889 (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
6890 Allow the function to be called also when parsing combined
6891 constructs.
6892 (c_parser_omp_taskgroup, c_parser_omp_cancel,
6893 c_parser_omp_cancellation_point, c_parser_omp_distribute,
6894 c_parser_omp_teams, c_parser_omp_target_data,
6895 c_parser_omp_target_update, c_parser_omp_target,
6896 c_parser_omp_declare_simd, c_finish_omp_declare_simd,
6897 c_parser_omp_declare_target, c_parser_omp_end_declare_target,
6898 c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
6899 (c_parser_omp_construct): Add p_name and mask vars. Handle
6900 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
6901 PRAGMA_OMP_TEAMS. Adjust c_parser_omp_for, c_parser_omp_parallel
6902 and c_parser_omp_sections callers.
6903 (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
6904 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
6905 OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
6906 (OMP_PARALLEL_CLAUSE_MASK): Likewise. Add OMP_CLAUSE_PROC_BIND.
6907 (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. Add
6908 OMP_CLAUSE_DEPEND.
6909 (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
6910 OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
6911 OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
6912 OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
6913 OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
6914 * c-typeck.c: Include tree-inline.h.
6915 (c_finish_omp_cancel, c_finish_omp_cancellation_point,
6916 handle_omp_array_sections_1, handle_omp_array_sections,
6917 c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
6918 (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
6919 user defined reductions.
6920 (c_tree_equal): New function.
6921 * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
6922 c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
6923 c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
6924 c_check_omp_declare_reduction_r): New prototypes.
6925 * c-decl.c (current_omp_declare_target_attribute): New variable.
6926 (c_decl_attributes): New function.
6927 (start_decl, start_function): Use it instead of decl_attributes.
6928 (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
6929 c_omp_reduction_decl, c_omp_reduction_lookup,
6930 c_check_omp_declare_reduction_r): New functions.
6931
0a6c2227
TT
69322013-09-25 Tom Tromey <tromey@redhat.com>
6933
6934 * Make-lang.in (c/gccspec.o): Remove.
6935 (CFLAGS-c/gccspec.o): New variable.
6936 (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
6937 (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
6938 (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
6939
f3bc55f0
TT
69402013-09-25 Tom Tromey <tromey@redhat.com>
6941
6942 * Make-lang.in (c/gccspec.o): Don't use subshell.
6943
a24d975c
MP
69442013-09-18 Marek Polacek <polacek@redhat.com>
6945
6946 PR sanitize/58443
6947 * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
6948 Remove unnecessary check.
6949
ce6923c5
MP
69502013-09-18 Marek Polacek <polacek@redhat.com>
6951
6952 PR sanitizer/58411
6953 * c-typeck.c (build_binary_op): Don't sanitize function if it has the
6954 no_sanitize_undefined attribute.
6955
a1e51df9
KT
69562013-09-13 Kai Tietz <ktietz@redhat.com>
6957
6958 PR target/57848
6959 * c-decl.c (c_builtin_function_ext_scope): Remove
6960 wrong assumption that it is never called on prexisting
6961 symbol.
6962
0af94e6f
JR
69632013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
6964
6965 * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
6966
20059c8b
GDR
69672013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
6968
6969 * c-objc-common.c (c_tree_printer): Tidy.
6970
de5a5fa1
MP
69712013-08-30 Marek Polacek <polacek@redhat.com>
6972
6973 * c-typeck.c (build_binary_op): Add division by zero and shift
6974 instrumentation.
6975
2531a1d9 69762013-08-26 Joern Rennecke <joern.rennecke@embecosm.com>
0fdd4508 6977 Joseph Myers <joseph@codesourcery.com>
2531a1d9 6978
6e2bcc98 6979 PR c/35649
2531a1d9
JR
6980 * c-typeck.c (c_common_type): Prefer double_type_node over
6981 other REAL_TYPE types with the same precision.
6982 (convert_arguments): Likewise.
6983
025311c4
GDR
69842013-08-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
6985
6986 * c-objc-common.c (c_tree_printer): Document the nature of the cast.
6987 (c_initialize_diagnostics): Call a destructor for the early printer.
6988
da6ca2b5
GDR
69892013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
6990
6991 * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
6992 printer initialization.
6993
318cda85 69942013-08-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
da6ca2b5 6995
318cda85
BI
6996 PR c/57490
6997 * c-array-notation.c (fix_conditional_array_notations_1): Added a
6998 check for truth values.
6999 (expand_array_notation_exprs): Added truth values case. Removed an
7000 unwanted else. Added for-loop to walk through subtrees in default
7001 case.
7002
b066401f
GDR
70032013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
7004
7005 * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
7006
fb48aadc
JM
70072013-07-23 Joseph Myers <joseph@codesourcery.com>
7008
7009 * c-parser.c (struct c_generic_association): Fix typo.
7010
433cc7b0
TT
70112013-07-23 Tom Tromey <tromey@redhat.com>
7012 Joseph Myers <joseph@codesourcery.com>
7013
7014 * c-parser.c (struct c_generic_association): New.
7015 (c_generic_association_d): New typedef.
7016 (c_parser_generic_selection): New function.
7017 (c_parser_postfix_expression): Handle RID_GENERIC.
7018
26d40c3d
JM
70192013-07-13 Jason Merrill <jason@redhat.com>
7020
7021 PR c++/57793
7022 * c-decl.c (finish_struct): Check for too-large class.
7023
ecdbd01a 70242013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
40d3d530
JR
7025
7026 PR c/57821
7027 * c-typeck.c (set_init_index): When folding, check for index overflow.
7028
1141ed3f
BI
70292013-06-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
7030
7031 * c-parser.c (c_parser_array_notation): Removed rejection of array
7032 notations in an array of function pointers.
7033
713b46fa
BI
70342013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
7035
7036 * c-array-notation.c (make_triplet_val_inv): New function.
7037 (create_cmp_incr): Likewise.
7038 (create_array_refs): Likewise.
7039 (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
7040 Also modularized common parts between functions and called the function.
7041 (build_array_notation_expr): Likewise.
7042 (fix_conditional_array_notations_1): Likewise.
7043 (fix_array_notation_expr): Likewise.
7044 (fix_array_notation_call_expr): Likewise.
7045
92f20202
MP
70462013-06-18 Marek Polacek <polacek@redhat.com>
7047
7048 PR c/57630
7049 * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
7050
73a23b06
BI
70512013-06-12 Balaji V. Iyer <balaji.v.iyer@intel.com>
7052
7053 * c-array-notation.c (build_array_notation_expr): Reject array notation
7054 mismatch between LHS and RHS even inside a call_expr. Also, removed
7055 a couple while statements that were dead code.
7056
00b8517d
BI
70572013-06-10 Balaji V. Iyer <balaji.v.iyer@intel.com>
7058
7059 * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
7060 excessive precision expressions in function parameters. Also removed
7061 couple unwanted while statements.
7062
1509bdda
BI
70632013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
7064
7065 * c-array-notation.c (expand_array_notation_exprs): Added
7066 ARRAY_NOTATION_REF case.
ab20d992 7067
d60f1706
BI
70682013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
7069
7070 * c-array-notation.c (length_mismatch_in_expr_p): Moved this
7071 function to c-family/array-notation-common.c.
7072 (is_cilkplus_reduce_builtin): Likewise.
7073 (find_rank): Likewise.
7074 (extract_array_notation_exprs): Likewise.
7075 (replace_array_notations): Likewise.
7076 (find_inv_trees): Likewise.
7077 (replace_inv_trees): Likewise.
7078 (contains_array_notation_expr): Likewise.
7079 (find_correct_array_notation_type): Likewise.
7080 (replace_invariant_exprs): Initialized additional_tcodes to NULL.
7081 (struct inv_list): Moved this to c-family/array-notation-common.c.
7082 * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
ab20d992 7083
6d6efbb3
BI
70842013-06-05 Balaji V. Iyer <balaji.v.iyer@intel.com>
7085
7086 * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
7087 reduction functions outside the for-loop. Added a check if the fundecl
7088 is non-NULL. Finally, removed an unwanted if-statement, and made the
7089 body unconditional.
7090
25c22937
BI
70912013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
7092
7093 * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
7094 condition of the if-statement matches the rank of else-block and then-
7095 block when array notations are used.
7096 * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
7097 expression after the entire function body is parsed.
7098 (c_parser_expr_no_commas): Delayed creating array notation expressions
7099 to the end of function parsing.
7100 * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
7101 whole if-statement instead of just the condition.
ab20d992 7102 (expand_array_notation_exprs): Added MODIFY_EXPR case.
25c22937 7103
edd25645
BI
71042013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
7105
7106 PR c/57474
7107 * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
7108 array to NULL_TREE if they are unused. Also added a check for the
7109 field to be NULL before its fields are used in future.
ab20d992 7110
065ce7f1
RO
71112013-05-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
7112
7113 PR bootstrap/57450
7114 * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
7115 (build_array_notation_expr): Likewise.
7116
36536d79
BI
71172013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
7118
7119 * c-typeck.c (build_array_ref): Added a check to see if array's
7120 index is greater than one. If true, then emit an error.
7121 (build_function_call_vec): Exclude error reporting and checking
7122 for builtin array-notation functions.
7123 (convert_arguments): Likewise.
7124 (c_finish_return): Added a check for array notations as a return
7125 expression. If true, then emit an error.
7126 (c_finish_loop): Added a check for array notations in a loop
7127 condition. If true then emit an error.
7128 (lvalue_p): Added a ARRAY_NOTATION_REF case.
7129 (build_binary_op): Added a check for array notation expr inside
7130 op1 and op0. If present, we call another function to find correct
7131 type.
7132 * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
7133 * c-parser.c (c_parser_compound_statement): Check if array
7134 notation code is used in tree, if so, then transform them into
7135 appropriate C code.
7136 (c_parser_expr_no_commas): Check if array notation is used in LHS
7137 or RHS, if so, then build array notation expression instead of
7138 regular modify.
7139 (c_parser_postfix_expression_after_primary): Added a check for
7140 colon(s) after square braces, if so then handle it like an array
7141 notation. Also, break up array notations in unary op if found.
7142 (c_parser_direct_declarator_inner): Added a check for array
7143 notation.
7144 (c_parser_compound_statement): Added a check for array notation in
7145 a stmt. If one is present, then expand array notation expr.
7146 (c_parser_if_statement): Likewise.
7147 (c_parser_switch_statement): Added a check for array notations in
7148 a switch statement's condition. If true, then output an error.
7149 (c_parser_while_statement): Similarly, but for a while.
7150 (c_parser_do_statement): Similarly, but for a do-while.
7151 (c_parser_for_statement): Similarly, but for a for-loop.
7152 (c_parser_unary_expression): Check if array notation is used in a
7153 pre-increment or pre-decrement expression. If true, then expand
7154 them.
7155 (c_parser_array_notation): New function.
7156 * c-array-notation.c: New file.
7157 * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
ab20d992 7158
cd192ccc
MS
71592013-05-23 Mike Stump <mikestump@comcast.net>
7160
7161 * c-typeck.c (convert_for_assignment): Handle references to memory
7162 spaces better.
7163
427b248d
JM
71642013-05-16 Jason Merrill <jason@redhat.com>
7165
7166 * Make-lang.in (cc1$(exeext)): Use link mutex.
7167
44d90fe1
PC
71682013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
7169
7170 * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
7171 to simply use OPT_Wpointer_arith.
7172 (build_unary_op): Likewise.
7173
4e7d7b3d
JJ
71742013-04-03 Jakub Jelinek <jakub@redhat.com>
7175
7176 PR c/19449
7177 * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
7178 argument. If set, or it temporarily for parsing of the first
7179 argument into force_folding_builtin_constant_p.
7180 (c_parser_postfix_expression): Adjust callers.
7181
839b422f
RB
71822013-03-21 Richard Biener <rguenther@suse.de>
7183
7184 * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
7185 instead of DECL_DEBUG_EXPR_IS_FROM. Guard properly.
7186
2ee028f1
MP
71872013-02-12 Marek Polacek <polacek@redhat.com>
7188
7189 PR c/44938
7190 * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
7191 origtypes to NULL.
7192
8824edff
JJ
71932013-01-24 Jakub Jelinek <jakub@redhat.com>
7194
7195 PR c/56078
7196 * c-typeck.c (set_nonincremental_init_from_string): If
7197 constructor_max_index is NULL, treat it as if tree_int_cst_lt
7198 returned false.
7199 (process_init_element): Likewise.
7200
eadd3d0d
JJ
72012012-12-20 Jakub Jelinek <jakub@redhat.com>
7202
7203 PR c++/55619
7204 * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
7205 argument, don't call default_function_array_conversion
7206 nor c_fully_fold here.
7207 (c_parser_asm_statement): Adjust callers.
7208 * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
7209 and outputs here, and call default_function_array_conversion
7210 on inputs that don't need to be addressable.
7211
f8a93a2e
JJ
72122012-12-18 Jakub Jelinek <jakub@redhat.com>
7213
7214 PR c/39464
7215 * c-typeck.c (convert_for_assignment): For -Wpointer-sign
7216 warning require that both c_common_unsigned_type as well as
7217 c_common_signed_type is the same for both mvl and mvr types.
7218
9771b263
DN
72192012-11-16 Diego Novillo <dnovillo@google.com>
7220
7221 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
7222
7223 * c-common.c: Use new vec API in vec.h.
7224 * c-common.h: Likewise.
7225 * c-gimplify.c: Likewise.
7226 * c-pragma.c: Likewise.
7227 * c-pretty-print.c: Likewise.
7228 * c-pretty-print.h: Likewise.
7229 * c-semantics.c: Likewise.
7230 * c-decl.c: Likewise.
7231 * c-parser.c: Likewise.
7232 * c-tree.h: Likewise.
7233 * c-typeck.c: Likewise.
7234
880661a4
JW
72352012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
7236
7237 PR c++/54930
7238 * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
7239
077d1abe
MLI
72402012-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
7241
7242 PR c/53066
7243 * c-decl.c (warn_if_shadowing): Do not warn if a variable
7244 shadows a function, unless the variable is a function or a
7245 pointer-to-function.
7246
3a785c97
JJ
72472012-10-12 Jakub Jelinek <jakub@redhat.com>
7248
7249 PR c/54381
7250 * c-parser.c (struct c_tree_loc_pair): Removed.
7251 (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
7252 add location_t * and tree * arguments, fill in array of 3
7253 sizeof_arg trees and corresponding locs.
7254 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
7255 c_parser_expr_list callers.
7256 (c_parser_postfix_expression_after_primary): Likewise. Pass
7257 array of 3 sizeof_arg trees and locs (corresponding to first
7258 3 arguments) to sizeof_pointer_memaccess_warning.
7259
703c8606
LC
72602012-10-09 Lawrence Crowl <crowl@google.com>
7261
7262 * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
7263 * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
7264 hash table.
7265
5d9de0d0
PC
72662012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
7267
7268 PR c++/54194
7269 * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
7270 call.
7271
a212e43f
MG
72722012-10-09 Marc Glisse <marc.glisse@inria.fr>
7273
7274 PR c++/54427
7275 * c-typeck.c: Include c-common.h.
7276 (enum stv_conv): Moved to c-common.h.
7277 (scalar_to_vector): Moved to c-common.c.
7278 (build_binary_op): Adapt to scalar_to_vector's new prototype.
7279 * Make-lang.in: c-typeck.c depends on c-common.h.
7280
3b78de56
AC
72812012-10-04 Arnaud Charlet <charlet@adacore.com>
7282
7283 * c-decl.c (c_write_global_declarations): Fix handling of
7284 -fdump-ada-spec*.
7285
78c60e3d
SS
72862012-09-30 Sharad Singhai <singhai@google.com>
7287
7288 * c-decl.c (c_write_global_declarations): Use a different method
7289 to determine if the dump has ben initialized.
7290
9f33203d
JM
72912012-09-14 Joseph Myers <joseph@codesourcery.com>
7292
7293 PR c/54552
7294 * c-typeck.c (c_cast_expr): When casting to a type requiring
7295 C_MAYBE_CONST_EXPR to be created, pass the inner expression to
7296 c_fully_fold first.
7297
a27d595d
JM
72982012-09-14 Joseph Myers <joseph@codesourcery.com>
7299
7300 PR c/54103
7301 * c-typeck.c (build_unary_op): Pass original argument of
7302 TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
7303 any C_MAYBE_CONST_EXPR, if it has integer operands.
7304 (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
7305 TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
7306 to c_objc_common_truthvalue_conversion, then remove any
7307 C_MAYBE_CONST_EXPR, if they have integer operands. Use
7308 c_objc_common_truthvalue_conversion not
7309 c_common_truthvalue_conversion.
7310 (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
7311 call note_integer_operands for arguments with integer operands
7312 that are not integer constants.
7313
9feb29df
JJ
73142012-09-13 Jakub Jelinek <jakub@redhat.com>
7315
7316 PR c/54559
7317 * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
7318 COMPLEX_TYPE with in_late_binary_op set temporarily to true.
7319
d409320c
JJ
73202012-08-31 Jakub Jelinek <jakub@redhat.com>
7321
7322 PR c/54428
7323 * c-convert.c (convert): Don't call fold_convert_loc if
7324 TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
7325 is a COMPLEX_EXPR. Remove TYPE_MAIN_VARIANT check from
7326 COMPLEX_TYPE -> COMPLEX_TYPE conversion.
7327
6265d07c
JJ
73282012-08-24 Jakub Jelinek <jakub@redhat.com>
7329
7330 PR c/54355
7331 * c-decl.c (c_parser_label): Pass true as nested and fix up comments
7332 for nested and empty_ok arguments in the call to
7333 c_parser_declaration_or_fndef.
7334
1a4049e7
JJ
73352012-08-17 Jakub Jelinek <jakub@redhat.com>
7336
7337 * c-tree.h (c_last_sizeof_arg): Declare.
7338 * c-parser.c (struct c_tree_loc_pair): New type.
7339 (c_parser_expr_list): Add sizeof_arg argument. Fill it in if
7340 non-NULL.
7341 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
7342 (c_parser_postfix_expression_after_primary): Likewise. Call
7343 sizeof_pointer_memaccess_warning if needed.
7344 (sizeof_ptr_memacc_comptypes): New function.
7345 * c-typeck.c (c_last_sizeof_arg): New global variable.
7346 (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
7347
0229aee9
UB
73482012-07-24 Uros Bizjak <ubizjak@gmail.com>
7349
7350 * c-lang.h (lang_decl): Add variable_size GTY option.
7351
7ee2468b
SB
73522012-07-16 Steven Bosscher <steven@gcc.gnu.org>
7353
7354 * c-decl.c: Include dumpfile.h instead of tree-dump.h.
7355 * Make-lang.in: Fix dependencies.
7356
d4a10d0a
SB
73572012-06-29 Steven Bosscher <steven@gcc.gnu.org>
7358
7359 * Make-lang.in: New file, rules migrated from gcc/Makefile.in
7360 and add language Makefile hooks.
7361 * config-lang.in: New file.
7362 * c-config-lang.in: Moved from gcc/config-lang.in to here, and
7363 add the required "normal" config-lang.in rules.
7364 * c-lang.h: Moved from gcc/ to here.
7365 * c-tree.h: Likewise.
7366 * c-objc-common.c: Likewise.
7367 * c-objc-common.h: Likewise.
7368 * c-typeck.c: Likewise.
7369 * c-convert.c: Likewise.
7370 * c-lang.c: Likewise.
7371 * c-aux-info.c: Likewise.
7372 * c-errors.c: Likewise.
7373 * gccspec.c: Likewise.
7374 * c-decl.c: Likewise. Include gt-c-c-decl.h, not gt-c-decl.h.
7375 * c-parser.c: Likewise. Include gt-c-c-parser.h, not gt-c-parser.h.
7376\f
8d9254fc 7377Copyright (C) 2012-2020 Free Software Foundation, Inc.
d4a10d0a
SB
7378
7379Copying and distribution of this file, with or without modification,
7380are permitted in any medium without royalty provided the copyright
7381notice and this notice are preserved.