]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/c/ChangeLog
Fix middle-end/85811: Introduce tree_expr_maybe_non_p et al.
[thirdparty/gcc.git] / gcc / c / ChangeLog
CommitLineData
77f67db2
GA
12020-11-13 Vladimir N. Makarov <vmakarov@redhat.com>
2
3 * c-parser.c (c_parser_asm_statement): Parse outputs for asm
4 goto too.
5 * c-typeck.c (build_asm_expr): Remove an assert checking output
6 absence for asm goto.
7
82020-11-13 Jakub Jelinek <jakub@redhat.com>
9
10 * c-typeck.c (c_finish_omp_clauses): Don't clear
11 OMP_CLAUSE_REDUCTION_INSCAN unless reduction_seen == -2.
12
132020-11-13 Iain Sandoe <iain@sandoe.co.uk>
14
15 PR objc/77404
16 * c-parser.c (c_parser_objc_class_definition): Pass the
17 location of the class name to the interface declaration.
18
bb622641
GA
192020-11-10 Strager Neds <strager.nds@gmail.com>
20
21 * c-decl.c (merge_decls): Use new overload of
22 set_decl_section_name.
23
242020-11-10 Chung-Lin Tang <cltang@codesourcery.com>
25
26 * c-parser.c (c_parser_omp_target_data): Add use of
27 new c_omp_adjust_map_clauses function. Add GOMP_MAP_ATTACH_DETACH as
28 handled map clause kind.
29 (c_parser_omp_target_enter_data): Likewise.
30 (c_parser_omp_target_exit_data): Likewise.
31 (c_parser_omp_target): Likewise.
32 * c-typeck.c (handle_omp_array_sections): Adjust COMPONENT_REF case to
33 use GOMP_MAP_ATTACH_DETACH map kind for C_ORT_OMP region type.
34 (c_finish_omp_clauses): Adjust bitmap checks to allow struct decl and
35 same struct field access to co-exist on OpenMP construct.
36
2da7ee05
GA
372020-11-07 Martin Uecker <muecker@gwdg.de>
38
39 * c-parser.c (c_parser_label): Implement mixing of labels and code.
40 (c_parser_all_labels): Likewise.
41
44cab2d8
GA
422020-11-06 Iain Sandoe <iain@sandoe.co.uk>
43
44 * c-parser.c (c_parser_objc_at_property_declaration):
45 Improve parsing fidelity. Associate better location info
46 with @property attributes. Clean up the interface to
47 objc_add_property_declaration ().
48
492020-11-06 Nathan Sidwell <nathan@acm.org>
50
51 * c-decl.c (diagnose_mismatched_decls): Rename
52 DECL_IS_BUILTIN->DECL_IS_UNDECLARED_BUILTIN.
53 (warn_if_shadowing, implicitly_declare, names_builtin_p)
54 (collect_source_refs): Likewise.
55 * c-typeck.c (inform_declaration, inform_for_arg)
56 (convert_for_assignment): Likewise.
57
582020-11-06 Tobias Burnus <tobias@codesourcery.com>
59
60 * c-parser.c (c_parser_omp_atomic): Add openacc parameter and update
61 OpenACC matching.
62 (c_parser_omp_construct): Update call.
63
35c125cb
GA
642020-11-04 Jakub Jelinek <jakub@redhat.com>
65
66 PR c++/97670
67 * c-typeck.c (c_finish_omp_clauses): Look through array reductions to
68 find underlying decl to clear in the aligned_head bitmap.
69
702020-11-04 Joseph Myers <joseph@codesourcery.com>
71
72 * c-decl.c (handle_nodiscard_attribute): New.
73 (std_attribute_table): Add nodiscard.
74 * c-parser.c (c_parser_std_attribute): Expect argument to
75 nodiscard attribute to be a string. Do not special-case ignoring
76 nodiscard.
77 * c-typeck.c (maybe_warn_nodiscard): New.
78 (build_compound_expr, emit_side_effect_warnings): Call
79 maybe_warn_nodiscard.
80 (c_process_expr_stmt, c_finish_stmt_expr): Also call
81 emit_side_effect_warnings if warn_unused_result.
82
4f0606fe
GA
832020-10-29 Asher Gordon <AsDaGo@posteo.net>
84
85 * c-typeck.c (free_all_tagged_tu_seen_up_to): Replace free
86 with XDELETE.
87 (finish_init): Likewise.
88 (pop_init_level): Likewise.
89
e93aae4a
GA
902020-10-28 Joseph Myers <joseph@codesourcery.com>
91
92 * c-decl.c (store_parm_decls_newstyle): Use pedwarn_c11 not
93 error_at for omitted parameter name.
94
952020-10-28 Jakub Jelinek <jakub@redhat.com>
96
97 * c-parser.c (c_parser_omp_clause_name): Handle allocate.
98 (c_parser_omp_clause_allocate): New function.
99 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_ALLOCATE.
100 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
101 OMP_PARALLEL_CLAUSE_MASK, OMP_SINGLE_CLAUSE_MASK,
102 OMP_TASK_CLAUSE_MASK, OMP_TASKGROUP_CLAUSE_MASK,
103 OMP_DISTRIBUTE_CLAUSE_MASK, OMP_TEAMS_CLAUSE_MASK,
104 OMP_TARGET_CLAUSE_MASK, OMP_TASKLOOP_CLAUSE_MASK): Add
105 PRAGMA_OMP_CLAUSE_ALLOCATE.
106 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_ALLOCATE.
107
89bb01e7
GA
1082020-10-27 Joseph Myers <joseph@codesourcery.com>
109
110 * c-parser.c (c_parser_std_attribute_specifier): Allow duplicate
111 standard attributes.
112
efe71fcc
GA
1132020-10-23 Marek Polacek <polacek@redhat.com>
114
115 PR c++/91741
116 * c-parser.c (c_parser_binary_expression): Implement -Wsizeof-array-div.
117 (c_parser_postfix_expression): Set PAREN_SIZEOF_EXPR.
118 (c_parser_expr_list): Handle PAREN_SIZEOF_EXPR like SIZEOF_EXPR.
119 * c-tree.h (char_type_p): Declare.
120 * c-typeck.c (char_type_p): No longer static.
121
1222020-10-23 Martin Sebor <msebor@redhat.com>
123
124 PR middle-end/97552
125 * c-decl.c (get_parm_array_spec): Handle static VLA parameters.
126
2fe5b7d1
GA
1272020-09-19 Martin Sebor <msebor@redhat.com>
128
129 PR c/50584
130 * c-decl.c (lookup_last_decl): Define new function.
131 (c_decl_attributes): Call it.
132 (start_decl): Add argument and use it.
133 (finish_decl): Call build_attr_access_from_parms and decl_attributes.
134 (get_parm_array_spec): Define new function.
135 (push_parm_decl): Call get_parm_array_spec.
136 (start_function): Call warn_parm_array_mismatch. Build attribute
137 access and add it to current function.
138 * c-parser.c (c_parser_declaration_or_fndef): Diagnose mismatches
139 in forms of array parameters.
140 * c-tree.h (start_decl): Add argument.
141
1422020-09-19 Sandra Loosemore <sandra@codesourcery.com>
143
144 * c-decl.c (c_break_label, c_cont_label): Delete, and replace
145 with...
146 (in_statement): New.
147 (start_function): Adjust for above change.
148 (c_push_function_context, c_pop_function_context): Likewise.
149 * c-lang.h (struct language_function): Likewise.
150 * c-objc-common.h (LANG_HOOKS_BLOCK_MAY_FALLTHRU): Define.
151 * c-parser.c (objc_foreach_break_label, objc_foreach_continue_label):
152 New.
153 (c_parser_statement_after_labels): Adjust calls to c_finish_bc_stmt.
154 (c_parser_switch_statement): Adjust break/switch context handling
155 and calls to renamed functions.
156 (c_parser_while_statement): Adjust break/switch context handling and
157 build a WHILE_STMT.
158 (c_parser_do_statement): Ditto, with DO_STMT respectively.
159 (c_parser_for_statement): Ditto, with FOR_STMT respectively.
160 (c_parser_omp_for_loop): Adjust break/switch context handling.
161 * c-tree.h (c_break_label, c_cont_label): Delete.
162 (IN_SWITCH_STMT, IN_ITERATION_STMT): Define.
163 (IN_OMP_BLOCK, IN_OMP_FOR, IN_OBJC_FOREACH): Define.
164 (in_statement, switch_statement_break_seen_p): Declare.
165 (c_start_case, c_finish_case): Renamed to...
166 (c_start_switch, c_finish_switch).
167 (c_finish_bc_stmt): Adjust arguments.
168 * c-typeck.c (build_function_call_vec): Don't try to print
169 statements with %qE format.
170 (struct c_switch): Rename switch_expr field to switch_stmt.
171 Add break_stmt_seen_p field.
172 (c_start_case): Rename to c_start_switch. Build a SWITCH_STMT
173 instead of a SWITCH_EXPR. Update for changes to struct c_switch.
174 (do_case): Update for changes to struct c_switch.
175 (c_finish_case): Rename to c_finish_switch. Update for changes to
176 struct c_switch and change of representation from SWITCH_EXPR to
177 SWITCH_STMT.
178 (c_finish_loop): Delete.
179 (c_finish_bc_stmt): Update to reflect changes to break/continue
180 state representation. Build a BREAK_STMT or CONTINUE_STMT instead
181 of a GOTO_EXPR except for objc foreach loops.
182
e1a4a8a0
GA
1832020-09-01 Jakub Jelinek <jakub@redhat.com>
184
185 PR c++/96867
186 * c-typeck.c (handle_omp_array_sections_1): Test C_ARRAY_PARAMETER
187 only on PARM_DECLs.
188
8f7ea26a
GA
1892020-08-28 Martin Sebor <msebor@redhat.com>
190
191 PR c/96596
192 * c-decl.c (match_builtin_function_types): Avoid dealing with erroneous
193 argument type.
194
8b394f01
GA
1952020-08-27 Martin Liska <mliska@suse.cz>
196
197 * gimple-parser.c (c_parser_gimple_compound_statement): Set exact argument of a vector
198 growth function to true.
199
db0f6efe
GA
2002020-08-25 Tobias Burnus <tobias@codesourcery.com>
201
202 PR c/96678
203 * c-typeck.c (handle_omp_array_sections_1): Talk about
204 array function parameter in the error message.
205
5c265693
GA
2062020-08-18 Jakub Jelinek <jakub@redhat.com>
207
208 PR c/96571
209 * c-parser.c (c_parser_generic_selection): Change match_found from bool
210 to int, holding index of the match. Call mark_exp_read on the selector
211 expression and on expressions other than the selected one.
212
4967ca2f
GA
2132020-08-01 Richard Sandiford <richard.sandiford@arm.com>
214
215 PR c/96377
216 * c-typeck.c (process_init_element): Split test for whether to
217 recurse into a record, union or array into...
218 (initialize_elementwise_p): ...this new function. Don't recurse
219 into a vector type if the initialization value is also a vector.
220
48cc2e46
GA
2212020-07-31 Richard Biener <rguenther@suse.de>
222
223 PR debug/96383
224 * c-objc-common.h (LANG_HOOKS_FINALIZE_EARLY_DEBUG):
225 Define to c_common_finalize_early_debug.
226
3ea9abca
GA
2272020-07-22 Tobias Burnus <tobias@codesourcery.com>
228
229 * c-parser.c (c_parser_omp_clause_hint): Require nonnegative hint clause.
230 (c_parser_omp_critical): Permit hint(0) clause without named critical.
231 (c_parser_omp_construct): Don't assert if error_mark_node is returned.
232
30430061
GA
2332020-07-21 Sunil K Pandey <skpgkp2@gmail.com>
234
235 PR target/95237
236 * c-decl.c (finish_decl): Call target hook
237 lower_local_decl_alignment to lower local decl alignment.
238
3f8ca9cb
GA
2392020-07-09 Julian Brown <julian@codesourcery.com>
240 Thomas Schwinge <thomas@codesourcery.com>
241
242 PR middle-end/95270
243 * c-typeck.c (c_finish_omp_clauses): Set OMP_CLAUSE_SIZE (bias) to zero
244 for standalone attach/detach clauses.
245
a82c4c4c 2462020-07-08 Eric Botcazou <ebotcazou@adacore.com>
50873cc5
GA
247
248 * c-typeck.c (convert_for_assignment): If -Wscalar-storage-order is
249 set, warn for conversion between pointers that point to incompatible
250 scalar storage orders.
251
f60ee68d
GA
2522020-07-07 Kaipeng Zhou <zhoukaipeng3@huawei.com>
253
254 * c-parser.c (c_parser_statement_after_labels): Pass correct
255 parameters to c_parser_do_statement.
256
56638b9b
GA
2572020-06-16 Jakub Jelinek <jakub@redhat.com>
258
259 * c-parser.c (c_parser_expr_no_commas): Save, clear and restore
260 c_in_omp_for.
261 (c_parser_omp_for_loop): Set c_in_omp_for around some calls to avoid
262 premature c_fully_fold. Defer explicit c_fully_fold calls to after
263 c_finish_omp_for.
264 * c-tree.h (c_in_omp_for): Declare.
265 * c-typeck.c (c_in_omp_for): Define.
266 (build_modify_expr): Avoid c_fully_fold if c_in_omp_for.
267 (digest_init): Likewise.
268 (build_binary_op): Likewise.
269
2702020-06-16 Jakub Jelinek <jakub@redhat.com>
271
272 * c-parser.c (c_parser_omp_clause_schedule): Reject modifier separated
273 from kind by comma rather than colon.
274
1a59f3db
GA
2752020-06-05 Mark Wielaard <mark@klomp.org>
276
277 * c-decl.c (implicit_decl_warning): When warned and olddecl is
278 an undeclared builtin, then add a fixit header hint, if found.
279 (implicitly_declare): Add OPT_Wbuiltin_declaration_mismatch to
280 warning_at about implicit builtin declaration type mismatch.
281
9a5b7438
GA
2822020-06-03 Mark Wielaard <mark@klomp.org>
283
284 * c-parser.c (struct c_parser): Add seen_string_literal
285 bitfield.
286 (c_parser_consume_token): Reset seen_string_literal.
287 (c_parser_error_richloc): Add name_hint if seen_string_literal
288 and next token is a CPP_NAME and we have a missing header
289 suggestion for the name.
290 (c_parser_string_literal): Set seen_string_literal.
291
2922020-06-03 Mark Wielaard <mark@klomp.org>
293
294 * c-parser.c (c_parser_postfix_expression_after_primary): Add
295 scope with matching_parens after CPP_OPEN_PAREN.
296
2972020-06-03 Tobias Burnus <tobias@codesourcery.com>
298
299 * c-objc-common.h (LANG_HOOKS_OMP_PREDETERMINED_MAPPING): Redefine.
300
53ffb43a
GA
3012020-05-28 Nicolas Bértolo <nicolasbertolo@gmail.com>
302
303 * Make-lang.in: Remove extra slash.
304
8f66f175
ML
3052020-05-19 Martin Liska <mliska@suse.cz>
306
307 * c-parser.c: Fix typo.
308
49ddde69
JJ
3092020-05-14 Jakub Jelinek <jakub@redhat.com>
310
311 * c-parser.c (c_parser_omp_target): Set cfun->has_omp_target.
312
eb72dc66
RB
3132020-05-07 Richard Biener <rguenther@suse.de>
314
315 PR middle-end/94703
316 * gimple-parser.c (c_parser_parse_ssa_name): Do not set
317 DECL_GIMPLE_REG_P.
318
bf915591
JJ
3192020-04-30 Jakub Jelinek <jakub@redhat.com>
320
321 PR c/94842
322 * c-decl.c (set_labels_context_r): In addition to context-less
323 LABEL_DECLs adjust also LABEL_DECLs with context equal to
324 parent function if any.
325 (store_parm_decls): Adjust comment.
326
e1113ffb
JJ
3272020-04-19 Jakub Jelinek <jakub@redhat.com>
328
329 PR objc/94637
330 * c-parser.c (c_parser_objc_selector_arg): Handle CPP_SCOPE like
331 two CPP_COLON tokens.
332
2e389749
JJ
3332020-04-17 Jakub Jelinek <jakub@redhat.com>
334
335 PR other/94629
336 * c-parser.c (c_parser_oacc_routine): Remove redundant assignment
337 to data.clauses.
338
2dc9294c
JJ
3392020-04-15 Jakub Jelinek <jakub@redhat.com>
340
341 PR c/94593
342 * c-parser.c (c_parser_pragma) <case PRAGMA_OMP_REQUIRES>: Reject
343 requires directive when not at file scope.
344
13e41d8b
TB
3452020-04-08 Tobias Burnus <tobias@codesourcery.com>
346
347 PR middle-end/94120
348 * c-decl.c (c_check_in_current_scope): New function.
349 * c-tree.h (c_check_in_current_scope): Declare it.
350 * c-parser.c (c_parser_oacc_declare): Add check that variables
351 are declared in the same scope as the directive. Fix handling
352 of namespace vars.
353
4df50a05
JJ
3542020-04-07 Jakub Jelinek <jakub@redhat.com>
355
356 PR c++/94512
357 * c-parser.c (c_parser_omp_parallel): Set OMP_PARALLEL_COMBINED
358 if c_parser_omp_master succeeded.
359
5db9e893
JJ
3602020-03-23 Jakub Jelinek <jakub@redhat.com>
361
362 PR gcov-profile/94029
363 PR c/94239
364 * c-parser.c (c_parser_declaration_or_fndef): Initialize endloc to
365 the function_start_locus location. Don't do that afterwards for the
366 __GIMPLE body parsing.
367
9def91e9
JJ
3682020-03-19 Jakub Jelinek <jakub@redhat.com>
369
370 PR gcov-profile/94029
371 * c-tree.h (finish_function): Add location_t argument defaulted to
372 input_location.
373 * c-parser.c (c_parser_compound_statement): Add endlocp argument and
374 set it to the locus of closing } if non-NULL.
375 (c_parser_compound_statement_nostart): Return locus of closing }.
376 (c_parser_parse_rtl_body): Likewise.
377 (c_parser_declaration_or_fndef): Propagate locus of closing } to
378 finish_function.
379 * c-decl.c (finish_function): Add end_loc argument, use it instead of
380 input_location to set function_end_locus.
381
046c5890
JJ
3822020-03-17 Jakub Jelinek <jakub@redhat.com>
383
384 PR c/94172
385 * c-tree.h (C_TYPE_INCOMPLETE_VARS): Define to TYPE_LANG_SLOT_1
386 instead of TYPE_VFIELD, and support it on {RECORD,UNION,ENUMERAL}_TYPE.
387 (TYPE_ACTUAL_ARG_TYPES): Check that it is only used on FUNCTION_TYPEs.
388 * c-decl.c (pushdecl): Push C_TYPE_INCOMPLETE_VARS also to
389 ENUMERAL_TYPEs.
390 (finish_incomplete_vars): New function, moved from finish_struct. Use
391 relayout_decl instead of layout_decl.
392 (finish_struct): Remove obsolete comment about C_TYPE_INCOMPLETE_VARS
393 being TYPE_VFIELD. Use finish_incomplete_vars.
394 (finish_enum): Clear C_TYPE_INCOMPLETE_VARS. Call
395 finish_incomplete_vars.
396 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
397 also on ENUMERAL_TYPEs.
398
c015ff8c
JJ
3992020-03-16 Jakub Jelinek <jakub@redhat.com>
400
401 PR c/94179
402 * c-fold.c (c_fully_fold_internal): Handle MEM_REF.
403
f2e9fe5f
MS
4042020-03-13 Martin Sebor <msebor@redhat.com>
405
406 PR c/94040
407 * c-decl.c (builtin_structptr_type_count): New constant.
408 (match_builtin_function_types): Reject decls that are incompatible
409 in types pointed to by pointers.
410 (diagnose_mismatched_decls): Adjust comments.
411
c9d70946
JM
4122020-03-05 Joseph Myers <joseph@codesourcery.com>
413
414 PR c/93577
415 * c-typeck.c (pop_init_level): Do not diagnose initializers as
416 empty when initialized type is error_mark_node.
417 (set_designator, process_init_element): Ignore initializers for
418 elements of a variable-size type or of error_mark_node.
419
726e292d
MS
4202020-03-01 Martin Sebor <msebor@redhat.com>
421
422 PR middle-end/93926
423 * c-decl.c (types_close_enough_to_match): New function.
424 (match_builtin_function_types):
425 (diagnose_mismatched_decls): Add missing inform call to a warning.
426
a499c2f8
MS
4272020-03-01 Martin Sebor <msebor@redhat.com>
428
429 PR c/93812
430 * c-typeck.c (build_functype_attribute_variant): New function.
431 (composite_type): Call it.
432
9c3da8cc
JJ
4332020-02-25 Jakub Jelinek <jakub@redhat.com>
434
435 PR other/93912
436 * gimple-parser.c (c_parser_gimple_parse_bb_spec_edge_probability):
437 Rename last argument from probablity to probability.
438
bacdd5e9
JJ
4392020-02-13 Jakub Jelinek <jakub@redhat.com>
440
441 PR c/93576
442 * c-decl.c (grokdeclarator): If this_size_varies, only push size into
443 *expr if it has side effects.
444
f9eb0973
JL
4452020-01-30 Jeff Law <law@redhat.com>
446
447 PR c/88660
448 * c-parser.c (c_parser_switch_statement): Make sure to request
449 marking the switch expr as used.
450
ac68e287
JM
4512020-01-22 Joseph Myers <joseph@codesourcery.com>
452
453 PR c/93348
454 * c-typeck.c (build_c_cast): Call remove_c_maybe_const_expr on
455 argument with integer operands.
456
852f0ae8
KK
4572020-01-16 Kerem Kat <keremkat@gmail.com>
458
459 PR c/92833
460 * c-parser.c (c_parser_consume_token): Fix peeked token stack pop
461 to support 4 available tokens.
462
e2346a33
JM
4632020-01-15 Joseph Myers <joseph@codesourcery.com>
464
465 PR c/93072
466 * c-decl.c (pushdecl): Use TREE_PUBLIC, not DECL_EXTERNAL, to
467 determine whether to set DECL_CONTEXT.
468
3d77686d
JM
4692020-01-13 Joseph Myers <joseph@codesourcery.com>
470
471 PR c/93241
472 * c-typeck.c (build_c_cast): Check for expressions with integer
473 operands that can occur in an unevaluated part of an integer
474 constant expression and call note_integer_operands as needed.
475
f74c4b2c
RB
4762019-01-08 Richard Biener <rguenther@suse.de>
477
478 PR middle-end/93199
479 * gimple-parser.c (c_parser_parse_gimple_body): Remove __PHI IFN
480 permanently.
481
8d9254fc
JJ
4822020-01-01 Jakub Jelinek <jakub@redhat.com>
483
484 Update copyright years.
485
39292e25
EB
4862019-12-20 Eric Botcazou <ebotcazou@adacore.com>
487
488 * c-decl.c (collect_source_ref_cb): Delete.
489 (for_each_global_decl): Rename into...
490 (collect_source_refs): ...this. Call collect_source_ref directly.
491 (c_parse_final_cleanups): Always call collect_source_ref on the main
492 input filename.
493
519d7496
JB
4942019-12-19 Julian Brown <julian@codesourcery.com>
495 Cesar Philippidis <cesar@codesourcery.com>
496
497 * c-parser.c (c_parser_omp_clause_name): Add parsing of attach and
498 detach clauses.
499 (c_parser_omp_variable_list): Add ALLOW_DEREF optional parameter.
500 Allow deref (->) in variable lists if true.
501 (c_parser_omp_var_list_parens): Add ALLOW_DEREF optional parameter.
502 Pass to c_parser_omp_variable_list.
503 (c_parser_oacc_data_clause): Support attach and detach clauses. Update
504 call to c_parser_omp_variable_list.
505 (c_parser_oacc_all_clauses): Support attach and detach clauses.
506 (OACC_DATA_CLAUSE_MASK, OACC_ENTER_DATA_CLAUSE_MASK,
507 OACC_KERNELS_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK,
508 OACC_SERIAL_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_ATTACH.
509 (OACC_EXIT_DATA_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_DETACH.
510 * c-typeck.c (handle_omp_array_sections_1): Reject subarrays for attach
511 and detach. Support deref.
512 (handle_omp_array_sections): Use GOMP_MAP_ATTACH_DETACH instead of
513 GOMP_MAP_ALWAYS_POINTER for OpenACC.
514 (c_oacc_check_attachments): New function.
515 (c_finish_omp_clauses): Check attach/detach arguments for being
516 pointers using above. Support deref.
517
a6163563
JB
5182019-12-19 Julian Brown <julian@codesourcery.com>
519 Maciej W. Rozycki <macro@codesourcery.com>
520 Tobias Burnus <tobias@codesourcery.com>
521 Thomas Schwinge <thomas@codesourcery.com>
522
523 * c-parser.c (c_parser_omp_clause_name): Support no_create.
524 (c_parser_oacc_data_clause): Likewise.
525 (c_parser_oacc_all_clauses): Likewise.
526 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
527 (OACC_PARALLEL_CLAUSE_MASK, OACC_SERIAL_CLAUSE_MASK): Add
528 PRAGMA_OACC_CLAUSE_NO_CREATE.
529 * c-typeck.c (handle_omp_array_sections): Support
530 GOMP_MAP_NO_ALLOC.
531
d68f5d45
DM
5322019-12-09 David Malcolm <dmalcolm@redhat.com>
533
534 * c-objc-common.c (range_label_for_type_mismatch::get_text):
535 Replace label_text ctor calls.
536
4691bf46
JM
5372019-12-04 Joseph Myers <joseph@codesourcery.com>
538
539 PR c/36941
540 PR c/88827
541 * c-typeck.c (convert_lvalue_to_rvalue): Call
542 require_complete_type for arguments not of void types.
543 (build_indirect_ref): Do not diagnose dereferencing pointers to
544 incomplete types.
545 * c-tree.h (C_TYPE_ERROR_REPORTED): Remove.
546
85d11957
JM
5472019-12-03 Joseph Myers <joseph@codesourcery.com>
548
549 PR c/88704
550 * c-decl.c (store_parm_decls_oldstyle): Diagnose use of [*] in
551 old-style parameter definitions.
552
4569f8b3
SL
5532019-12-01 Sandra Loosemore <sandra@codesourcery.com>
554
555 PR target/92499
556
557 * c-decl.c (flexible_array_type_p): Move to common code.
558
65ef05d0
RS
5592019-11-30 Richard Sandiford <richard.sandiford@arm.com>
560
561 * c-decl.c (start_decl): Allow initialization of variables whose
562 size is a POLY_INT_CST.
563 (finish_decl): Use verify_type_context to check whether the target
564 allows variables with a particular type to have static or thread-local
565 storage duration. Don't raise a second error if such variables do
566 not have a constant size.
567 (grokdeclarator): Use verify_type_context to check whether the
568 target allows fields or array elements to have a particular type.
569 * c-typeck.c (pointer_diff): Use verify_type_context to test whether
570 the target allows pointer difference for the types involved.
571 (build_unary_op): Likewise for pointer increment and decrement.
572
34b43828
JM
5732019-11-29 Joseph Myers <joseph@codesourcery.com>
574
575 * c-parser.c (struct c_parser): Add members raw_tokens and
576 raw_tokens_used.
577 (c_lex_one_token): Add argument raw. Handle lexing raw tokens and
578 using previously-lexed raw tokens.
579 (c_parser_peek_nth_token_raw)
580 (c_parser_check_balanced_raw_token_sequence): New functions.
581 (c_parser_nth_token_starts_std_attributes): Use
582 c_parser_check_balanced_raw_token_sequence for Objective-C.
583
5b8d9367
JM
5842019-11-25 Joseph Myers <joseph@codesourcery.com>
585
586 PR c/91985
587 * c-decl.c (finish_declspecs): Use int instead of decimal
588 floating-point types if decimal floating-point not supported.
589
1723e1be
JM
5902019-11-25 Joseph Myers <joseph@codesourcery.com>
591
592 * c-tree.h (struct c_declarator): Use a structure for id member.
593 * c-decl.c (grokdeclarator): Extract attributes from cdk_id
594 declarators at the start, not when handling individual declarators
595 later. Use u.id.id instead of u.id.
596 (grokfield): Use u.id.id instead of u.id.
597 (build_id_declarator): Set u.id.id and u.id.attrs.
598 (finish_declspecs): Handle postfix attributes in case of typedef
599 name or typeof used.
600 * c-parser.c (c_parser_direct_declarator)
601 (c_parser_direct_declarator_inner): Place declarator for
602 attributes inside that for function or array, not outside. Set
603 u.id.attrs for identifiers.
604 (c_parser_parameter_declaration): Use u.id.id instead of u.id.
605 * gimple-parser.c (c_parser_gimple_declaration): Use u.id.id
606 instead of u.id.
607
bdaf8be1
JJ
6082019-11-22 Jakub Jelinek <jakub@redhat.com>
609
610 PR c/90677
611 * c-decl.c (identifier_global_tag): Define.
612
3e00ba47
RB
6132019-11-20 Richard Biener <rguenther@suse.de>
614
615 PR c/92088
616 * c-decl.c (grokdeclarator): Prevent inlining of nested
617 function with VLA arguments.
618
8c5b727a
JM
6192019-11-20 Joseph Myers <joseph@codesourcery.com>
620
621 * c-decl.c (c_warn_type_attributes): New function.
622 (groktypename, grokdeclarator, finish_declspecs): Call
623 c_warn_type_attributes before applying attributes to types.
624 * c-tree.h (c_warn_type_attributes): Declare.
625
192961ff
JM
6262019-11-19 Joseph Myers <joseph@codesourcery.com>
627
628 * c-decl.c (c_warn_unused_attributes): Use pedwarn not warning for
629 standard attributes.
630 * c-parser.c (c_parser_std_attribute): Take argument for_tm. Use
631 pedwarn for unknown standard attributes and return error_mark_node
632 for them.
633
20a38017
MM
6342019-11-18 Matthew Malcomson <matthew.malcomson@arm.com>
635
636 * c-parser.c (c_parser_parse_rtl_body): Always call
637 run_rtl_passes, even if startwith pass is not provided.
638
d5fbe5e0
JM
6392019-11-15 Joseph Myers <joseph@codesourcery.com>
640
641 * c-parser.c (c_parser_std_attribute_specifier): Diagnose
642 duplicate standard attributes.
643
97cc1187
JM
6442019-11-15 Joseph Myers <joseph@codesourcery.com>
645
646 * c-decl.c (std_attribute_table): Add maybe_unused.
647
f8aea5e3
JM
6482019-11-15 Joseph Myers <joseph@codesourcery.com>
649
650 * c-decl.c (std_attribute_table): Add fallthrough.
651 * c-parser.c (c_parser_declaration_or_fndef): Diagnose fallthrough
652 attribute at top level.
653
2cc94aa8
JM
6542019-11-15 Joseph Myers <joseph@codesourcery.com>
655
656 * c-decl.c (std_attribute_table): New.
657 (c_init_decl_processing): Register attributes from
658 std_attribute_table.
659 * c-parser.c (c_parser_attribute_arguments): Add arguments
660 require_string and allow_empty_args. All callers changed.
661 (c_parser_std_attribute): Set require_string argument for
662 "deprecated" attribute.
663
7c5890cc
JM
6642019-11-14 Joseph Myers <joseph@codesourcery.com>
665
666 * c-parser.c (c_parser_postfix_expression)
667 (c_parser_check_literal_zero): Handle CPP_UTF8CHAR.
668 * gimple-parser.c (c_parser_gimple_postfix_expression): Likewise.
669
e8738f4e
RS
6702019-11-14 Richard Sandiford <richard.sandiford@arm.com>
671
672 * c-typeck.c (build_conditional_expr): Use truth_type_for instead
673 of build_same_sized_truth_vector_type.
674 (build_vec_cmp): Likewise.
675
b2417b59
JJ
6762019-11-14 Jakub Jelinek <jakub@redhat.com>
677
bedb7f04
JJ
678 * c-parser.c (c_parser_omp_context_selector): Don't require score
679 argument to fit into shwi, just to be INTEGER_CST. Diagnose
680 negative score.
681
b2417b59
JJ
682 * c-parser.c (c_parser_omp_context_selector): Rename
683 CTX_PROPERTY_IDLIST to CTX_PROPERTY_NAME_LIST, add CTX_PROPERTY_ID.
684 Use CTX_PROPERTY_ID for atomic_default_mem_order, only allow a single
685 identifier in that. For CTX_PROPERTY_NAME_LIST, allow identifiers
686 and string literals.
687
4e03c3a7
JM
6882019-11-14 Joseph Myers <joseph@codesourcery.com>
689
690 * c-tree.h (enum c_typespec_kind): Add ctsk_tagref_attrs and
691 ctsk_tagfirstref_attrs.
692 (struct c_declspecs): Update description of attrs. Add
693 postfix_attrs and non_std_attrs_seen_p. Increase size of
694 typespec_kind bit-field.
695 (c_warn_unused_attributes): New declaration.
696 (parser_xref_tag): Update prototype.
697 * c-decl.c (c_warn_unused_attributes): New function.
698 (shadow_tag_warned): Handle ctsk_tagfirstref_attrs and
699 ctsk_tagref_attrs. Handle attribute declarations.
700 (check_compound_literal_type): Handle ctsk_tagfirstref_attrs.
701 (grokdeclarator): Handle standard attributes.
702 (parser_xref_tag): Add arguments have_std_attrs and attrs. Apply
703 attributes to incomplete type reference.
704 (xref_tag): Update call to parser_xref_tag.
705 (declspecs_add_addrspace, declspecs_add_type)
706 (declspecs_add_scspec, declspecs_add_attrs): Set
707 non_std_attrs_seen_p.
708 (finish_declspecs): Apply postfix standard attributes to type.
709 * c-parser.c (c_token_starts_declspecs)
710 (c_token_starts_declaration, c_parser_next_token_starts_declspecs)
711 (c_parser_next_tokens_start_declaration): Update comments.
712 (c_parser_consume_token, c_parser_consume_pragma): Handle moving
713 parser->tokens[2] to parser->tokens[1].
714 (c_parser_nth_token_starts_std_attributes)
715 (c_parser_std_attribute_specifier_sequence): New functions.
716 (c_parser_declaration_or_fndef): Add arguments have_attrs and
717 attrs. All callers changed. Handle standard attributes.
718 (c_parser_parms_declarator, c_parser_parms_list_declarator)
719 (c_parser_parameter_declaration): Add argument have_gnu_attrs.
720 All callers changed.
721 (c_parser_declspecs): Add arguments start_std_attr_ok and
722 end_std_attr_ok. All callers changed. Handle standard
723 attributes.
724 (c_parser_enum_specifier, c_parser_struct_or_union_specifier)
725 (c_parser_direct_declarator, c_parser_direct_declarator_inner)
726 (c_parser_compound_statement_nostart, c_parser_all_labels)
727 (c_parser_label, c_parser_statement, c_parser_for_statement):
728 Handle standard attributes.
729 * c-parser.h (c_parser_declspecs): Update prototype.
730 * gimple-parser.c (c_parser_gimple_declaration): Update call to
731 c_parser_declspecs.
732
0c29cac4
ML
7332019-11-12 Martin Liska <mliska@suse.cz>
734
735 * gimple-parser.c: Do not include params.h.
736
028d4092
ML
7372019-11-12 Martin Liska <mliska@suse.cz>
738
739 * gimple-parser.c (c_parser_parse_gimple_body): Replace old parameter syntax
740 with the new one, include opts.h if needed. Use SET_OPTION_IF_UNSET
741 macro.
742
62aee289
MR
7432019-11-12 Maciej W. Rozycki <macro@codesourcery.com>
744 Frederik Harwath <frederik@codesourcery.com>
745
746 gcc/c/
747 * c-parser.c (OACC_SERIAL_CLAUSE_MASK): New macro.
748 (c_parser_oacc_kernels_parallel): Rename function to...
749 (c_parser_oacc_compute): ... this. Handle PRAGMA_OACC_SERIAL.
750 (c_parser_omp_construct): Update accordingly.
751
752
7cec9588
JJ
7532019-11-11 Jakub Jelinek <jakub@redhat.com>
754
755 * c-parser.c (c_parser_translation_unit): Diagnose declare target
756 without corresponding end declare target.
757
f486280c
RS
7582019-11-08 Richard Sandiford <richard.sandiford@arm.com>
759
760 * c-convert.c (convert): Only handle vector conversions if one of
761 the types satisfies gnu_vector_type_p or if -flax-vector-conversions
762 allows it.
763 * c-typeck.c (build_array_ref): Only allow vector indexing if the
764 vectors satisfy gnu_vector_type_p.
765 (build_unary_op): Only allow unary operators to be applied to
766 vectors if they satisfy gnu_vector_type_p.
767 (digest_init): Only allow by-element initialization of vectors
768 if they satisfy gnu_vector_type_p.
769 (really_start_incremental_init): Likewise.
770 (push_init_level): Likewise.
771 (pop_init_level): Likewise.
772 (process_init_element): Likewise.
773 (build_binary_op): Only allow binary operators to be applied to
774 vectors if they satisfy gnu_vector_type_p.
775
017c6491
JM
7762019-11-08 Joseph Myers <joseph@codesourcery.com>
777
778 * c-decl.c (grokparms): Convert () in a function definition to
779 (void) for C2x.
780 (store_parm_decls_oldstyle): Pedwarn for C2x.
781 (store_parm_decls): Update comment about () not generating a
782 prototype.
783
c01bd174
JM
7842019-11-07 Joseph Myers <joseph@codesourcery.com>
785
786 * c-parser.c (c_parser_attribute_arguments): New function.
787 Factored out of c_parser_gnu_attribute.
788 (c_parser_gnu_attribute): Use c_parser_attribute_arguments.
789 (c_parser_balanced_token_sequence, c_parser_std_attribute)
790 (c_parser_std_attribute_specifier): New functions.
791 (c_parser_transaction_attributes): Use
792 c_parser_std_attribute_specifier.
793
471c5330
JM
7942019-11-07 Joseph Myers <joseph@codesourcery.com>
795
796 * c-parser.c (c_parser): Remove lex_untranslated_string. Add
797 lex_joined_string and translate_strings_p.
798 (c_lex_one_token): Pass 0 or C_LEX_STRING_NO_JOIN to
799 c_lex_with_flags.
800 (c_parser_string_literal): New function.
801 (c_parser_static_assert_declaration_no_semi): Use
802 c_parser_string_literal. Do not set lex_untranslated_string.
803 (c_parser_asm_string_literal): Use c_parser_string_literal.
804 (c_parser_simple_asm_expr): Do not set lex_untranslated_string.
805 (c_parser_gnu_attributes): Set and restore translate_strings_p
806 instead of lex_untranslated_string.
807 (c_parser_asm_statement): Do not set lex_untranslated_string.
808 (c_parser_asm_operands): Likewise.
809 (c_parser_has_attribute_expression): Set and restore
810 translate_strings_p instead of lex_untranslated_string.
811 (c_parser_postfix_expression): Use c_parser_string_literal.
812 (pragma_lex): Likewise.
813 (c_parser_pragma_pch_preprocess): Set lex_joined_string.
814 (c_parse_file): Set translate_strings_p.
815 * gimple-parser.c (c_parser_gimple_postfix_expression)
816 (c_parser_gimple_or_rtl_pass_list): Use c_parser_string_literal.
817 * c-parser.c (c_parser_string_literal): Declare function.
818
d0c464d2
JJ
8192019-11-02 Jakub Jelinek <jakub@redhat.com>
820
821 * c-parser.c (c_finish_omp_declare_variant): Use
822 omp_get_context_selector instead of c_omp_get_context_selector.
823
ac2cfa6c
RS
8242019-10-29 Richard Sandiford <richard.sandiford@arm.com>
825
826 * c-tree.h (c_simulate_enum_decl): Declare.
827 * c-decl.c (c_simulate_enum_decl): New function.
828 * c-objc-common.h (LANG_HOOKS_SIMULATE_ENUM_DECL): Define to the above.
829
74078538
RS
8302019-10-29 Richard Sandiford <richard.sandiford@arm.com>
831
832 * c-tree.h (c_simulate_builtin_function_decl): Declare.
833 * c-decl.c (c_simulate_builtin_function_decl): New function.
834 * c-objc-common.h (LANG_HOOKS_SIMULATE_BUILTIN_FUNCTION_DECL): Define
835 to the above.
836
ad1539d5
MS
8372019-10-28 Martin Sebor <msebor@redhat.com>
838
839 PR c/66970
840 * c-decl.c (names_builtin_p): Define a new function.
841
cb73e4e7
RB
8422019-10-28 Richard Biener <rguenther@suse.de>
843
844 PR c/92249
845 * gimple-parser.c (c_parser_parse_gimple_body): Make
846 current_bb the entry block initially to easier recover
847 from errors.
848 (c_parser_gimple_compound_statement): Adjust.
849
135df52c
JJ
8502019-10-24 Jakub Jelinek <jakub@redhat.com>
851
852 * c-parser.c (c_finish_omp_declare_variant): Use
853 omp_context_selector_matches instead of
854 c_omp_context_selector_matches.
855 * c-decl.c (c_decl_attributes): Add "omp declare target block"
856 attribute in between declare target and end declare target
857 pragmas.
858
783bfe5e
JM
8592019-10-15 Joseph Myers <joseph@codesourcery.com>
860
861 * c-parser.c (c_parser_attribute_any_word): Rename to
862 c_parser_gnu_attribute_any_word. All callers changed.
863 (c_parser_attribute): Rename to c_parser_gnu_attribute. All
864 callers changed.
865 (c_parser_attributes): Rename to c_parser_gnu_attributes. All
866 callers changed.
867 (c_parser_declaration_or_fndef, c_parser_declspecs)
868 (c_parser_enum_specifier, c_parser_struct_or_union_specifier)
869 (c_parser_struct_declaration, c_parser_declarator)
870 (c_parser_gnu_attribute, c_parser_compound_statement)
871 (c_parser_label, c_parser_statement, c_parser_objc_method_decl)
872 (c_parser_transaction_attributes): Add "gnu-" prefix to names of
873 attribute-related syntax productions.
874
56898e43
RS
8752019-10-14 Richard Sandiford <richard.sandiford@arm.com>
876
877 * c-objc-common.c (useful_aka_type_p): Replace with...
878 (get_aka_type): ...this new function. Given the original type,
879 decide which aka type to print (if any). Only look through typedefs
880 if user_facing_original_type_p.
881 (print_type): Update accordingly.
882
b9424661
JJ
8832019-10-14 Jakub Jelinek <jakub@redhat.com>
884
885 * c-parser.c (c_parser_omp_all_clauses): Change bool NESTED_P argument
886 into int NESTED, if it is 2, diagnose missing commas in between
887 clauses.
888 (c_parser_omp_context_selector): Pass 2 as last argument to
889 c_parser_omp_all_clauses.
890
20de9568
JJ
8912019-10-12 Jakub Jelinek <jakub@redhat.com>
892
893 * c-parser.c (c_parser_omp_context_selector): Improve error recovery.
894 For simd properties, put them directly into TREE_VALUE.
895 (c_finish_omp_declare_variant): Call c_omp_mark_declare_variant.
896 If c_omp_context_selector_matches is 0, don't add attribute, otherwise
897 add "omp declare variant base" attribute rather than
898 "omp declare variant".
899
fe2bc27c
JM
9002019-10-11 Joseph Myers <joseph@codesourcery.com>
901
902 * c-decl.c (declspecs_add_type): Use pedwarn_c11 for DFP types.
903
94e7f906
JJ
9042019-10-10 Jakub Jelinek <jakub@redhat.com>
905
906 * c-parser.c (c_parser_omp_all_clauses): Add NESTED_P argument, if
907 true, terminate processing on closing paren and don't skip to end of
908 pragma line.
909 (c_parser_omp_declare_simd): Handle also declare variant.
910 (omp_construct_selectors, omp_device_selectors,
911 omp_implementation_selectors, omp_user_selectors): New variables.
912 (c_parser_omp_context_selector,
913 c_parser_omp_context_selector_specification,
914 c_finish_omp_declare_variant): New functions.
915 (c_finish_omp_declare_simd): Handle both declare simd and
916 declare variant.
917 (c_parser_omp_declare): Handle declare variant.
918
93313b94
JM
9192019-10-02 Joseph Myers <joseph@codesourcery.com>
920
921 * c-parser.c (c_parser_asm_statement): Handle CPP_SCOPE like two
922 CPP_COLON tokens.
923
55879815
RS
9242019-10-01 Richard Sandiford <richard.sandiford@arm.com>
925
926 * c-objc-common.c (useful_aka_type_p): New function.
927 (print_type): Use it to decide whether an aka type is worth printing.
928
59bc434a
JJ
9292019-09-27 Jakub Jelinek <jakub@redhat.com>
930
931 PR c++/88203
932 * c-parser.c (c_parser_predefined_identifier): New function.
933 (c_parser_postfix_expression): Use it.
934 (c_parser_omp_variable_list): Parse predefined identifiers.
935 * c-typeck.c (c_finish_omp_clauses): Allow predefined variables
936 in shared and firstprivate clauses, even when they are predetermined
937 shared.
938
c6447c20
RS
9392019-09-27 Richard Sandiford <richard.sandiford@arm.com>
940
941 * c-typeck.c (build_function_call_vec): Take the original function
942 decl as an optional final parameter. Pass all built-in calls to
943 check_builtin_function_arguments.
944
522da4c2
EB
9452019-09-20 Eric Botcazou <ebotcazou@adacore.com>
946
947 PR c/91815
948 * c-decl.c (pushdecl): In C detect duplicate declarations across scopes
949 of identifiers in the external scope only for variables and functions.
950
68e2c199
PK
9512019-09-04 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
952
953 PR c/78736
954 * c-typeck.c (convert_for_assignment): Handle Wenum-conversion.
955
22f8849d
IS
9562019-08-23 Iain Sandoe <iain@sandoe.co.uk>
957
958 PR pch/61250
959 * c-parser.c (c_parse_file): Call c_common_no_more_pch ()
960 after determining that the first token is not
961 PRAGMA_GCC_PCH_PREPROCESS.
962
db376f45
EB
9632019-08-22 Eric Botcazou <ebotcazou@adacore.com>
964
965 * c-parser.c (c_parser_declaration_or_fndef): Set DECL_ARGUMENTS of a
966 FUNCTION_DECL to the right value in the presence of nested declarators.
967
4d732405
RS
9682019-08-13 Richard Sandiford <richard.sandiford@arm.com>
969
970 PR middle-end/91421
971 * c-decl.c (merge_decls): Use copy_decl_built_in_function.
972
cb1180d5
RS
9732019-08-13 Richard Sandiford <richard.sandiford@arm.com>
974
975 PR middle-end/91421
976 * c-decl.c (header_for_builtin_fn): Take a FUNCTION_DECL instead
977 of a built_in_function.
978 (diagnose_mismatched_decls, implicitly_declare): Update accordingly.
979
77eb117f
JJ
9802019-08-10 Jakub Jelinek <jakub@redhat.com>
981
982 * c-parser.c (c_parser_omp_clause_name): Parse device_type.
983 (c_parser_omp_clause_device_type): New function.
984 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_DEVICE_TYPE.
985 (OMP_DECLARE_TARGET_CLAUSE_MASK): Add PRAGMA_OMP_CLAUSE_DEVICE_TYPE.
986 (c_parser_omp_declare_target): Handle device_type clauses. Remove
987 diagnostics for declare target with clauses nested in clause-less
988 declare target declaration-definition-seq.
989 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_DEVICE_TYPE.
990
2c3b8bad
JJ
9912019-08-09 Jakub Jelinek <jakub@redhat.com>
992
bb522e2e
JJ
993 * c-parser.c (check_no_duplicate_clause): Simplify using
994 omp_find_clause.
995 (c_parser_omp_clause_if): Fix up printing of target {enter,exit} data
996 directive name modifiers.
997 (c_parser_omp_clause_proc_bind): Check for duplicate proc_bind clause.
998
2c3b8bad
JJ
999 PR c/91401
1000 * c-parser.c (c_parser_omp_clause_dist_schedule): Fix up typos in the
1001 check_no_duplicate_clause call. Comment it out, instead emit a
1002 warning for duplicate dist_schedule clauses.
1003
99769e7f
RS
10042019-08-08 Richard Sandiford <richard.sandiford@arm.com>
1005
1006 * c-decl.c (finish_enum): Clear C_TYPE_BEING_DEFINED.
1007
8860d270
JJ
10082019-08-08 Jakub Jelinek <jakub@redhat.com>
1009
1010 * c-typeck.c (c_finish_omp_clauses): For C_ORT_OMP
1011 OMP_CLAUSE_USE_DEVICE_* clauses use oacc_reduction_head bitmap
1012 instead of generic_head to track duplicates.
1013
398e3feb
JJ
10142019-08-07 Jakub Jelinek <jakub@redhat.com>
1015
1016 * c-parser.c (c_parser_omp_clause_name): Parse use_device_addr clause.
1017 (c_parser_omp_clause_use_device_addr): New function.
1018 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR.
1019 (OMP_TARGET_DATA_CLAUSE_MASK): Add PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR.
1020 (c_parser_omp_target_data): Handle PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR
1021 like PRAGMA_OMP_CLAUSE_USE_DEVICE_PTR, adjust diagnostics about no
1022 map or use_device_* clauses.
1023 * c-typeck.c (c_finish_omp_clauses): For OMP_CLAUSE_USE_DEVICE_PTR
1024 in OpenMP, require pointer type rather than pointer or array type.
1025 Handle OMP_CLAUSE_USE_DEVICE_ADDR.
1026
a28351e7
JJ
10272019-07-31 Jakub Jelinek <jakub@redhat.com>
1028
1029 PR c/91192
1030 * c-parser.c (c_parser_sizeof_expression): Call set_c_expr_source_range
1031 even if finish is UNKNOWN_LOCATION, just use start as finish in that
1032 case.
1033
6343b6bf
ML
10342019-07-25 Martin Liska <mliska@suse.cz>
1035 Dominik Infuhr <dominik.infuehr@theobroma-systems.com>
1036
1037 PR c++/23383
1038 * c-decl.c (merge_decls): Merge OPERATOR_DELETE flag.
1039
cb50701e
ML
10402019-07-25 Martin Liska <mliska@suse.cz>
1041
1042 * c-decl.c (merge_decls): Use new macros
1043 (e.g. DECL_SET_LAMBDA_FUNCTION and DECL_LAMBDA_FUNCTION_P).
1044
62e3e66f
RB
10452019-07-23 Richard Biener <rguenther@suse.de>
1046
1047 PR tree-optimization/83518
1048 * gimple-parser.c (c_parser_parse_gimple_body): When we have
1049 a CFG also rebuild cgraph edges.
1050
554a530f
JJ
10512019-07-20 Jakub Jelinek <jakub@redhat.com>
1052
1053 * c-parser.c (c_parser_omp_clause_name): Handle bind clause.
1054 (c_parser_omp_clause_bind): New function.
1055 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_BIND.
1056 (OMP_LOOP_CLAUSE_MASK): Define.
1057 (c_parser_omp_loop): New function.
1058 (c_parser_omp_parallel, c_parser_omp_teams): Handle parsing of
1059 loop combined with parallel or teams.
1060 (c_parser_omp_construct): Handle PRAGMA_OMP_LOOP.
1061 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_BIND.
1062
d119bf79
RS
10632019-07-18 Richard Sandiford <richard.sandiford@arm.com>
1064
1065 PR c/53633
1066 * c-decl.c (finish_function): Check targetm.warn_func_return
1067 before issuing a -Wreturn-type warning.
1068
ab20d992 10692019-07-12 Alexandre Oliva <oliva@adacore.com>
fdc1f343
AO
1070
1071 * gimple-parser.c (c_parser_gimple_try_stmt): New.
1072 (c_parser_compound_statement): Call it.
1073
1fdd6f04
JJ
10742019-07-12 Jakub Jelinek <jakub@redhat.com>
1075
1076 * c-parser.c (c_parser_omp_clause_name): Handle order clause.
1077 (c_parser_omp_clause_order): New function.
1078 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_ORDER.
1079 (OMP_SIMD_CLAUSE_MASK, OMP_FOR_CLAUSE_MASK): Add
1080 PRAGMA_OMP_CLAUSE_ORDER.
1081 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_ORDER.
1082
8389386c
RB
10832019-07-10 Richard Biener <rguenther@suse.de>
1084
1085 * gimple-parser.c (c_parser_gimple_postfix_expression): Support
1086 _Literal (int *) &x for address literals.
1087
99b1c316
MS
10882019-07-09 Martin Sebor <msebor@redhat.com>
1089
1090 PR c++/61339
1091 * c-decl.c (xref_tag): Change class-key of PODs to struct and others
1092 to class.
1093 (field_decl_cmp): Same.
1094 * c-parser.c (c_parser_struct_or_union_specifier): Same.
1095 * c-tree.h: Same.
1096 * gimple-parser.c (c_parser_gimple_compound_statement): Same.
1097
6c1dae73
MS
10982019-07-09 Martin Sebor <msebor@redhat.com>
1099
1100 PR c++/61339
1101 * c-decl.c: Change class-key from class to struct and vice versa
1102 to match convention and avoid -Wclass-is-pod and -Wstruct-no-pod.
1103 * gimple-parser.c: Same.
1104
69b5279e
RB
11052019-07-01 Richard Biener <rguenther@suse.de>
1106
1107 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
1108 _Literal (char *) &"foo" for address literals pointing to
1109 STRING_CSTs.
1110
ab20d992
JJ
11112019-06-25 Jozef Lawrynowicz <jozef.l@mittosystems.com>
1112
1113 * c-parser.c (c_parse_init): Create keyword for "__intN__" type.
1114 * c-decl.c (declspecs_add_type): Don't pedwarn about "__intN" ISO
1115 C incompatibility if alternate "__intN__" form is used.
1116
1e3d475e
MS
11172019-06-24 Martin Sebor <msebor@redhat.com>
1118
1119 * c-typeck.c (build_binary_op): Hyphenate floating-point.
1120
bf38f7e9
JJ
11212019-06-10 Jakub Jelinek <jakub@redhat.com>
1122
1123 * c-parser.c (c_parser_pragma): Reject PRAGMA_OMP_SCAN.
1124 (c_parser_omp_clause_reduction): Don't sorry_at on inscan reductions.
1125 (c_parser_omp_scan_loop_body): New function.
1126 (c_parser_omp_for_loop): Call c_parser_omp_scan_loop_body if there are
1127 inscan reduction clauses.
1128 * c-typeck.c (c_finish_omp_clauses): Reject mixing inscan with
1129 non-inscan reductions on the same construct, or inscan reductions with
1130 ordered or schedule clauses, or inscan array reductions.
1131
65985d78
MS
11322019-06-05 Martin Sebor <msebor@redhat.com>
1133
1134 PR c/90737
1135 * c-typeck.c (c_finish_return): Only consider functions returning
1136 pointers as candidates for -Wreturn-local-addr.
1137
0ecf545c
MS
11382019-06-05 Martin Sebor <msebor@redhat.com>
1139
1140 * c-decl.c (start_decl): Adjust quoting and hyphenation
1141 in diagnostics.
1142 (finish_decl): Same.
1143 (finish_enum): Same.
1144 (start_function): Same.
1145 (declspecs_add_type): Same.
1146 * c-parser.c (warn_for_abs): Same.
1147 * c-typeck.c (build_binary_op): Same.
1148
e03436e7
TS
11492019-05-17 Thomas Schwinge <thomas@codesourcery.com>
1150
b48f44bf
TS
1151 PR c/89433
1152 * c-parser.c (c_finish_oacc_routine): Rework checking if already
1153 marked with an OpenACC 'routine' directive.
1154
5bf04509
TS
1155 PR c/89433
1156 * c-parser.c (c_parser_oacc_routine): Normalize order of clauses.
1157 (c_finish_oacc_routine): Call oacc_verify_routine_clauses.
1158
e03436e7
TS
1159 PR c/89433
1160 * c-parser.c (c_finish_oacc_routine): Refer to OpenACC 'routine'
1161 clauses from "omp declare target" attribute.
1162
a9c697b8
MS
11632019-05-16 Martin Sebor <msebor@redhat.com>
1164
ab20d992
JJ
1165 * c-decl.c (start_decl): Quote keywords, operators, and
1166 types in diagnostics.
1167 (finish_decl): Same.
1168 * c-parser.c (c_parser_asm_statement): Same.
1169 (c_parser_conditional_expression): Same.
1170 (c_parser_transaction_cancel): Same.
1171 * c-typeck.c (c_common_type): Same.
1172 (build_conditional_expr): Same.
1173 (digest_init): Same.
1174 (process_init_element): Same.
1175 (build_binary_op): Same.
a9c697b8 1176
c4499192
RB
11772019-05-17 Richard Biener <rguenther@suse.de>
1178
1179 * gimple-parser.c (c_parser_gimple_statement): Handle __VEC_PERM.
1180 (c_parser_gimple_unary_expression): Likewise.
1181 (c_parser_gimple_parentized_ternary_expression): New function.
1182
adfe6e4b
RB
11832019-05-16 Richard Biener <rguenther@suse.de>
1184
1185 * gimple-parser.c (c_parser_gimple_statement): Handle __BIT_INSERT.
1186 (c_parser_gimple_unary_expression): Likewise.
1187
186dabf2
RB
11882019-05-15 Richard Biener <rguenther@suse.de>
1189
1190 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
1191 __BIT_FIELD_REF.
1192
1158c5b4
RB
11932019-05-14 Richard Biener <rguenther@suse.de>
1194
1195 * gimple-parser.c (c_parser_gimple_statement): Remove
1196 questionable auto-promotion to VIEW_CONVERT_EXPR.
1197 (c_parser_gimple_typespec): Split out from __MEM parsing.
1198 (c_parser_gimple_postfix_expression): Handle __VIEW_CONVERT.
1199 * tree-pretty-print.c (dump_generic_node): Dump VIEW_CONVERT_EXPR
1200 as __VIEW_CONVERT with -gimple.
1201
fd4485aa
ML
12022019-05-09 Martin Liska <mliska@suse.cz>
1203
1204 * gimple-parser.c (c_parser_gimple_statement): Support __MIN and
1205 __MAX.
1206 (c_parser_gimple_unary_expression): Parse also binary expression
1207 __MIN and __MAX.
1208 (c_parser_gimple_parentized_binary_expression): New function.
1209
d276406a
ML
12102019-05-09 Martin Liska <mliska@suse.cz>
1211
1212 * gimple-parser.c (struct gimple_parser): Add probability.
1213 for gimple_parser_edge.
1214 (gimple_parser::push_edge): Add new argument probability.
1215 (c_parser_gimple_parse_bb_spec): Parse also probability
1216 if present.
1217 (c_parser_parse_gimple_body): Set edge probability.
1218 (c_parser_gimple_compound_statement): Consume token
1219 before calling c_parser_gimple_goto_stmt.
1220 Parse BB counts.
1221 (c_parser_gimple_statement): Pass new argument.
1222 (c_parser_gimple_goto_stmt): Likewise.
1223 (c_parser_gimple_if_stmt): Likewise.
1224 (c_parser_gimple_or_rtl_pass_list): Parse hot_bb_threshold.
1225 * c-parser.c (c_parser_declaration_or_fndef): Pass
1226 hot_bb_threshold argument.
1227 * c-tree.h (struct c_declspecs): Add hot_bb_threshold
1228 field.
1229 (c_parser_gimple_parse_bb_spec_edge_probability): New.
1230
f179b64e
JJ
12312019-04-26 Jakub Jelinek <jakub@redhat.com>
1232
1233 PR debug/90197
1234 * c-tree.h (c_finish_loop): Add 2 further location_t arguments.
1235 * c-parser.c (c_parser_while_statement): Adjust c_finish_loop caller.
1236 (c_parser_do_statement): Likewise.
1237 (c_parser_for_statement): Likewise. Formatting fixes.
1238 * c-typeck.c (c_finish_loop): Add COND_LOCUS and INCR_LOCUS arguments,
1239 emit DEBUG_BEGIN_STMTs if needed.
1240
e7178413
JJ
12412019-04-19 Jakub Jelinek <jakub@redhat.com>
1242
c280b7ee
JJ
1243 PR c/89888
1244 * c-typeck.c (struct c_switch): Remove outside_range_p member.
1245 (c_start_case): Don't clear it.
1246 (do_case): Adjust c_add_case_label caller.
1247 (c_finish_case): Adjust c_do_switch_warnings caller.
1248
e7178413
JJ
1249 PR c++/90108
1250 * c-decl.c (merge_decls): If remove is main variant and
1251 DECL_ORIGINAL_TYPE is some other type, remove a DECL_ORIGINAL_TYPE
1252 variant that has newdecl as TYPE_NAME if any.
1253
60a2c645
JJ
12542019-04-12 Jakub Jelinek <jakub@redhat.com>
1255
1256 PR c/89933
1257 * c-decl.c (merge_decls): When newdecl's type is its main variant,
1258 don't try to remove it from the variant list, but instead assert
1259 it has no variants.
1260
2a82beaa
RB
12612019-04-01 Richard Biener <rguenther@suse.de>
1262
1263 PR c/71598
1264 * c-tree.h (c_get_alias_set): Declare.
1265 * c-objc-common.h (LANG_HOOKS_GET_ALIAS_SET): Use c_get_alias_set.
1266 * c-objc-common.c (c_get_alias_set): Treat enumeral types
1267 as the underlying integer type.
1268
bec1da64
MS
12692019-03-19 Martin Sebor <msebor@redhat.com>
1270
1271 PR tree-optimization/89688
1272 * c-decl.c (finish_decl): Call braced_lists_to_string for more
1273 kinds of initializers.
1274
855cd9b1
JJ
12752019-03-19 Jakub Jelinek <jakub@redhat.com>
1276
1277 PR c/89734
1278 * c-decl.c (grokdeclarator): Call c_build_qualified_type on function
1279 return type even if quals_used is 0. Formatting fixes.
1280
baa09dc5
RB
12812019-03-14 Richard Biener <rguenther@suse.de>
1282
1283 * c-tree.h (enum c_declspec_il): New.
1284 (struct c_declspecs): Merge gimple_p and rtl_p into declspec_il
1285 enum bitfield.
1286 * c-parser.c (c_parser_declaration_or_fndef): Adjust accordingly.
1287 Pass start pass and declspec_il to c_parser_parse_gimple_body.
1288 (c_parser_declspecs): Adjust.
1289 * gimple-parser.c: Include cfg.h, cfghooks.h, cfganal.h, tree-cfg.h,
1290 gimple-iterator.h, cfgloop.h, tree-phinodes.h, tree-into-ssa.h
1291 and bitmap.h.
1292 (struct gimple_parser): New.
1293 (gimple_parser::push_edge): New method.
1294 (c_parser_gimple_parse_bb_spec): New helper.
1295 (c_parser_parse_gimple_body): Get start pass and IL specification.
1296 Initialize SSA and CFG.
1297 (c_parser_gimple_compound_statement): Handle CFG and SSA build.
1298 Build a gimple_parser parsing state and pass it along.
1299 (c_parser_gimple_statement): Change intermittend __PHI internal
1300 function argument for the edge.
1301 (c_parser_gimple_or_rtl_pass_list): Handle ssa, cfg flags.
1302 (c_parser_gimple_goto_stmt): Record edges to build.
1303 (c_parser_gimple_if_stmt): Likewise.
1304 * gimple-parser.h (c_parser_parse_gimple_body): Adjust.
1305 (c_parser_gimple_or_rtl_pass_list): Likewise.
1306
a3f9f006
ML
13072019-03-11 Martin Liska <mliska@suse.cz>
1308
1309 * c-decl.c (check_for_loop_decls): Wrap an option name
1310 in a string format message and fix GNU coding style.
1311 * c-parser.c (c_parser_declspecs): Likewise.
1312
1db01ff9
JJ
13132019-03-08 Jakub Jelinek <jakub@redhat.com>
1314
1315 PR tree-optimization/89550
1316 * c-decl.c (finish_function): Only set TREE_NO_WARNING if warning_at
1317 returned true.
1318 (c_write_global_declarations_1): Only set TREE_NO_WARNING if pedwarn
1319 or warning returned true.
1320
66dcb747
JJ
13212019-02-28 Jakub Jelinek <jakub@redhat.com>
1322
1323 PR c/89525
1324 * c-typeck.c (convert_arguments): Call inform_declaration only if
1325 the previous warning_at call returned true.
1326
2263c9f2
TS
13272019-02-22 Thomas Schwinge <thomas@codesourcery.com>
1328
1329 * c-parser.c (c_parser_oacc_shape_clause): Add loc formal
1330 parameter. Adjust all users.
1331 (c_parser_oacc_simple_clause): Replace parser with loc formal
1332 parameter. Adjust all users.
1333
ab20d992 13342019-02-19 Chung-Lin Tang <cltang@codesourcery.com>
19695f4d
CLT
1335
1336 PR c/87924
1337 * c-parser.c (c_parser_oacc_clause_wait): Add representation of wait
1338 clause without argument as 'wait (GOMP_ASYNC_NOVAL)', adjust comments.
1339
5f88ba10
JJ
13402019-02-15 Jakub Jelinek <jakub@redhat.com>
1341
1342 PR c/89340
1343 * c-decl.c (start_function): Clear TREE_PUBLIC on nested functions
1344 before c_decl_attributes rather than after it.
1345
cfc30fd1
JJ
13462019-02-06 Jakub Jelinek <jakub@redhat.com>
1347
1348 PR c/89211
1349 * c-parser.c (c_parser_declaration_or_fndef): Don't update
1350 DECL_ARGUMENTS of d if it has been defined already. Use a single if
1351 instead of 3 nested ifs.
1352
fbe83e6b
JM
13532019-02-06 Joseph Myers <joseph@codesourcery.com>
1354
1355 PR c/88584
1356 * c-decl.c (finish_decl): Do not complete array types for arrays
1357 with external linkage not at file scope.
1358
f461f938
RB
13592019-02-05 Richard Biener <rguenther@suse.de>
1360
1361 PR c/88606
1362 * c-decl.c (finish_struct): Reset TYPE_TRANSPARENT_AGGR on
1363 all type variants when not supported.
1364
fe509359
JJ
13652019-01-30 Jakub Jelinek <jakub@redhat.com>
1366
1367 PR c/89061
1368 * c-tree.h (C_DECL_COMPOUND_LITERAL_P): Define.
1369 * c-decl.c (decl_jump_unsafe): Return false for
1370 C_DECL_COMPOUND_LITERAL_P decls.
1371 (build_compound_literal): Set C_DECL_COMPOUND_LITERAL_P.
1372
6a335b96
JJ
13732019-01-29 Jakub Jelinek <jakub@redhat.com>
1374
f4b7e754
JJ
1375 PR c/89045
1376 * c-decl.c (build_compound_literal): Don't pushdecl if in parameter
1377 scope.
1378
6a335b96
JJ
1379 PR c/86125
1380 * c-decl.c (last_fileptr_type): Remove.
1381 (last_structptr_types): New variable.
1382 (match_builtin_function_types): Compare TYPE_MAIN_VARIANT of
1383 {old,new}rettype instead of the types themselves. Assert
1384 last_structptr_types array has the same number of elements
1385 as builtin_structptr_types array. Use TYPE_MAIN_VARIANT for
1386 argument oldtype and newtype. Instead of handling
1387 just fileptr_type_node specially, handle all builtin_structptr_types
1388 pointer nodes. Formatting fix.
1389
d8b5a1a0
MS
13902019-01-24 Martin Sebor <msebor@redhat.com>
1391
1392 PR c/86125
1393 PR c/88886
1394 PR middle-end/86308
1395 * c-decl.c (match_builtin_function_types): Add arguments.
1396 (diagnose_mismatched_decls): Diagnose mismatched declarations
1397 of built-ins more strictly.
1398
e21c4491
JJ
13992019-01-24 Jakub Jelinek <jakub@redhat.com>
1400
1401 PR c++/88976
1402 * c-typeck.c (c_finish_omp_cancel): Diagnose more than one if
1403 on #pragma omp cancel with different modifiers.
1404
420183d9
L
14052019-01-18 H.J. Lu <hongjiu.lu@intel.com>
1406
1407 PR c/51628
1408 PR c/88664
1409 * c-typeck.c (convert_for_assignment): Upate the
1410 warn_for_address_or_pointer_of_packed_member call.
1411
17ad43dd
TH
14122019-01-16 Tom Honermann <tom@honermann.net>
1413 Jason Merrill <jason@redhat.com>
1414
1415 * c-typeck.c (digest_init): Revised the error message produced for
1416 ill-formed cases of array initialization with a string literal.
1417 (error_init): Make variadic.
1418
5f07d78a
JJ
14192019-01-12 Jakub Jelinek <jakub@redhat.com>
1420
1421 * c-typeck.c (convert_for_assignment): Fix a comment typo.
1422
c4581bbf
JJ
14232019-01-07 Jakub Jelinek <jakub@redhat.com>
1424
1425 PR c/88701
1426 * c-decl.c (build_compound_literal): If not TREE_STATIC, only pushdecl
1427 if current_function_decl is non-NULL.
1428
65c5b1eb
JM
14292019-01-07 Joseph Myers <joseph@codesourcery.com>
1430
1431 PR c/88720
1432 PR c/88726
1433 * c-decl.c (pop_scope): Use TREE_PUBLIC and b->nested to determine
1434 whether a function is nested, not DECL_EXTERNAL. Diagnose inline
1435 functions declared but never defined only for external scope, not
1436 for other scopes.
1437
d8fcab68
JJ
14382019-01-07 Jakub Jelinek <jakub@redhat.com>
1439
1440 PR c++/85052
1441 * c-parser.c (c_parser_postfix_expression): Parse
1442 __builtin_convertvector.
1443
a5544970
JJ
14442019-01-01 Jakub Jelinek <jakub@redhat.com>
1445
1446 Update copyright years.
1447
da77eace
L
14482018-12-20 H.J. Lu <hongjiu.lu@intel.com>
1449
1450 PR c/51628
1451 * c-typeck.c (convert_for_assignment): Call
1452 warn_for_address_or_pointer_of_packed_member.
1453
1edf8866
SB
14542018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
1455
1456 * c-parser.c (c_parser_asm_statement) <RID_CONST, RID_RESTRICT>: Give
1457 a more specific error message (instead of just falling through).
1458
db4fd626
SB
14592018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
1460
1461 * c-parser.c (c_parser_asm_statement): Keep track of the location each
1462 asm qualifier is first seen; use that to give nicer "duplicate asm
1463 qualifier" messages. Delete 'quals" variable, instead pass the
1464 "is_volatile_ flag to build_asm_stmt directly.
1465 * c-tree.h (build_asm_stmt): Make the first arg bool instead of tree.
1466 * c-typeck.c (build_asm_stmt): Ditto; adjust.
1467
9c9cfcbb
SB
14682018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
1469
1470 * c-parser.c (c_parser_asm_statement): Rewrite the loop to work without
1471 "done" boolean variable.
1472
a14feb3c
DM
14732018-12-19 David Malcolm <dmalcolm@redhat.com>
1474
1475 PR c++/87504
1476 * c-typeck.c (class maybe_range_label_for_tree_type_mismatch):
1477 Move from here to gcc-rich-location.h and gcc-rich-location.c.
1478 (build_binary_op): Use struct op_location_t and
1479 class binary_op_rich_location.
1480
6d939173
JJ
14812018-12-11 Jakub Jelinek <jakub@redhat.com>
1482
1483 PR sanitizer/88426
1484 * c-convert.c (convert): Call c_fully_fold before calling
1485 ubsan_instrument_float_cast.
1486
b7055028
SB
14872018-12-08 Segher Boessenkool <segher@kernel.crashing.org>
1488
1489 * c-parser (c_parser_asm_statement) [RID_INLINE]: Delete stray line
1490 setting "quals".
1491
5b76e75f
SB
14922018-12-06 Segher Boessenkool <segher@kernel.crashing.org>
1493
1494 * c-parser.c (c_parser_asm_statement): Detect the inline keyword
1495 after asm. Pass a flag for it to build_asm_expr.
1496 * c-tree.h (build_asm_expr): Update declaration.
1497 * c-typeck.c (build_asm_stmt): Add is_inline parameter. Use it to
1498 set ASM_INLINE_P.
1499
30bd42b9
SB
15002018-12-06 Segher Boessenkool <segher@kernel.crashing.org>
1501
1502 PR inline-asm/55681
1503 * c-parser.c (c_parser_asm_statement): Update grammar. Allow any
1504 combination of volatile and goto, in any order, without repetitions.
1505
9df6c0e4
JB
15062018-12-04 James Norris <jnorris@codesourcery.com>
1507 Cesar Philippidis <cesar@codesourcery.com>
1508 Julian Brown <julian@codesourcery.com>
1509
1510 * c-parser.c (c_parser_oacc_wait_list): Remove dead diagnostic
1511 code.
1512
f44697b7
RB
15132018-11-30 Richard Biener <rguenther@suse.de>
1514
1515 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
1516 _Literal (type) { ... } as empty aggregate or vector constructor.
1517
550dfbdc
MS
15182018-11-29 Martin Sebor <msebor@redhat.com>
1519
1520 PR c/88091
1521 * c-typeck.c (convert_argument): Add a parameter. Adjust indentation.
1522 (convert_arguments): Add comments. Pass additional argument to
1523 the function above.
1524
673670da
MS
15252018-11-29 Martin Sebor <msebor@redhat.com>
1526
1527 PR c/88172
1528 PR testsuite/88208
1529 * c-decl.c (declspec_add_alignas): Adjust call to check_user_alignment.
1530
db1d09b0
MS
15312018-11-23 Martin Sebor <msebor@redhat.com>
1532
1533 PR testsuite/88098
1534 * c-typeck.c (convert_arguments): Call builtin_decl_explicit instead.
1535 (maybe_warn_builtin_no_proto_arg): Handle short enum to int promotion.
1536
98f08eb8
MS
15372018-11-20 Martin Sebor <msebor@redhat.com>
1538
1539 * c-parser.c (c_parser_has_attribute_expression): New function.
1540 (c_parser_attribute): New function.
1541 (c_parser_attributes): Move code into c_parser_attribute.
1542 (c_parser_unary_expression): Handle RID_HAS_ATTRIBUTE_EXPRESSION.
1543
cd5da983
MS
15442018-11-15 Martin Sebor <msebor@redhat.com>
1545
1546 PR c/83656
1547 * c-decl.c (header_for_builtin_fn): Declare.
1548 (diagnose_mismatched_decls): Diagnose declarations of built-in
1549 functions without a prototype.
1550 * c-typeck.c (maybe_warn_builtin_no_proto_arg): New function.
1551 (convert_argument): Same.
1552 (convert_arguments): Factor code out into convert_argument.
1553 Detect mismatches between built-in formal arguments in calls
1554 to built-in without prototype.
1555 (build_conditional_expr): Same.
1556 (type_or_builtin_type): New function.
1557 (convert_for_assignment): Add argument. Conditionally issue
1558 warnings instead of errors for mismatches.
1559
620e594b
DM
15602018-11-13 David Malcolm <dmalcolm@redhat.com>
1561
1562 * c-decl.c: Replace "source_location" with "location_t".
1563 * c-tree.h: Likewise.
1564 * c-typeck.c: Likewise.
1565 * gimple-parser.c: Likewise.
1566
3179ebae
JJ
15672018-11-09 Jakub Jelinek <jakub@redhat.com>
1568
81a227c6
JJ
1569 * c-parser.c (c_parser_omp_clause_final): Use
1570 c_parser_expr_no_commas, convert_lvalue_to_rvalue,
1571 c_objc_common_truthvalue_conversion, c_fully_fold and parentheses
1572 parsing instead of c_parser_paren_condition.
1573 (c_parser_omp_clause_if): Use c_parser_expr_no_commas,
1574 convert_lvalue_to_rvalue, c_objc_common_truthvalue_conversion and
1575 c_fully_fold instead of c_parser_condition.
1576 (c_parser_omp_clause_num_threads, c_parser_omp_clause_num_tasks,
1577 c_parser_omp_clause_grainsize, c_parser_omp_clause_priority,
1578 c_parser_omp_clause_hint, c_parser_omp_clause_num_teams,
1579 c_parser_omp_clause_thread_limit, c_parser_omp_clause_linear): Use
1580 c_parser_expr_no_commas instead of c_parser_expression.
1581
98c91c56
JJ
1582 * c-parser.c (c_parser_omp_clause_reduction): Call sorry_at on
1583 reduction clause with inscan modifier.
1584
3179ebae
JJ
1585 * c-parser.c (c_parser_omp_requires): Call sorry_at on requires
1586 clauses other than atomic_default_mem_order.
1587
28567c40
JJ
15882018-11-08 Jakub Jelinek <jakub@redhat.com>
1589
1590 * c-parser.c: Include memmode.h.
1591 (c_parser_omp_depobj, c_parser_omp_requires): New functions.
1592 (c_parser_pragma): Handle PRAGMA_OMP_DEPOBJ and PRAGMA_OMP_REQUIRES.
1593 (c_parser_omp_clause_name): Handle nontemporal, in_reduction and
1594 task_reduction clauses.
1595 (c_parser_omp_variable_list): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION.
1596 For OMP_CLAUSE_DEPEND, parse clause operands as either an array
1597 section, or lvalue assignment expression.
1598 (c_parser_omp_clause_if): Handle cancel and simd modifiers.
1599 (c_parser_omp_clause_lastprivate): Parse optional
1600 conditional: modifier.
1601 (c_parser_omp_clause_hint): Require constant integer expression rather
1602 than just integer expression.
1603 (c_parser_omp_clause_defaultmap): Parse new kinds of defaultmap
1604 clause.
1605 (c_parser_omp_clause_reduction): Add IS_OMP and KIND arguments.
1606 Parse reduction modifiers. Pass KIND to c_parser_omp_variable_list.
1607 (c_parser_omp_clause_nontemporal, c_parser_omp_iterators): New
1608 functions.
1609 (c_parser_omp_clause_depend): Parse iterator modifier and handle
1610 iterators. Parse mutexinoutset and depobj kinds.
1611 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_reduction
1612 callers.
1613 (c_parser_omp_all_clauses): Likewise. Handle
1614 PRAGMA_OMP_CLAUSE_NONTEMPORAL and
1615 PRAGMA_OMP_CLAUSE_{IN,TASK}_REDUCTION.
1616 (c_parser_omp_atomic): Parse hint and memory order clauses. Handle
1617 default memory order from requires directive if any. Adjust
1618 c_finish_omp_atomic caller.
1619 (c_parser_omp_critical): Allow comma in between (name) and hint clause.
1620 (c_parser_omp_flush): Parse flush with memory-order-clause.
1621 (c_parser_omp_for_loop): Allow NE_EXPR even in
1622 OpenMP loops, adjust c_finish_omp_for caller.
1623 (OMP_SIMD_CLAUSE_MASK): Add if and nontemporal clauses.
1624 (c_parser_omp_master): Add p_name, mask and cclauses arguments.
1625 Allow to be called while parsing combined parallel master.
1626 Parse combined master taskloop{, simd}.
1627 (c_parser_omp_parallel): Parse combined
1628 parallel master{, taskloop{, simd}} constructs.
1629 (OMP_TASK_CLAUSE_MASK): Add in_reduction clause.
1630 (OMP_TASKGROUP_CLAUSE_MASK): Define.
1631 (c_parser_omp_taskgroup): Add LOC argument. Parse taskgroup clauses.
1632 (OMP_TASKWAIT_CLAUSE_MASK): Define.
1633 (c_parser_omp_taskwait): Handle taskwait with depend clauses.
1634 (c_parser_omp_teams): Force a BIND_EXPR with BLOCK
1635 around teams body. Use SET_EXPR_LOCATION.
1636 (c_parser_omp_target_data): Allow target data
1637 with only use_device_ptr clauses.
1638 (c_parser_omp_target): Use SET_EXPR_LOCATION. Set
1639 OMP_REQUIRES_TARGET_USED bit in omp_requires_mask.
1640 (c_parser_omp_requires): New function.
1641 (c_finish_taskloop_clauses): New function.
1642 (OMP_TASKLOOP_CLAUSE_MASK): Add reduction and in_reduction clauses.
1643 (c_parser_omp_taskloop): Use c_finish_taskloop_clauses. Add forward
1644 declaration. Disallow in_reduction clause when combined with parallel
1645 master.
1646 (c_parser_omp_construct): Adjust c_parser_omp_master and
1647 c_parser_omp_taskgroup callers.
1648 * c-typeck.c (c_finish_omp_cancel): Diagnose if clause with modifier
1649 other than cancel.
1650 (handle_omp_array_sections_1): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION
1651 like OMP_CLAUSE_REDUCTION.
1652 (handle_omp_array_sections): Likewise. Call save_expr on array
1653 reductions before calling build_index_type. Handle depend clauses
1654 with iterators.
1655 (struct c_find_omp_var_s): New type.
1656 (c_find_omp_var_r, c_omp_finish_iterators): New functions.
1657 (c_finish_omp_clauses): Don't diagnose nonmonotonic clause
1658 with static, runtime or auto schedule kinds. Call save_expr for whole
1659 array reduction sizes. Diagnose reductions with zero sized elements
1660 or variable length structures. Diagnose nogroup clause used with
1661 reduction clause(s). Handle depend clause with
1662 OMP_CLAUSE_DEPEND_DEPOBJ. Diagnose bit-fields. Require
1663 omp_depend_t type for OMP_CLAUSE_DEPEND_DEPOBJ kinds and
1664 some different type for other kinds. Use build_unary_op with
1665 ADDR_EXPR and build_indirect_ref instead of c_mark_addressable.
1666 Handle depend clauses with iterators. Remove no longer needed special
1667 case that predetermined const qualified vars may be specified in
1668 firstprivate clause. Complain if const qualified vars are mentioned
1669 in data-sharing clauses other than firstprivate or shared. Use
1670 error_at with OMP_CLAUSE_LOCATION (c) as first argument instead of
1671 error. Formatting fix. Handle OMP_CLAUSE_NONTEMPORAL and
1672 OMP_CLAUSE_{IN,TASK}_REDUCTION. Allow any lvalue as
1673 OMP_CLAUSE_DEPEND operand (besides array section), adjust diagnostics.
1674
7e2de6df
DM
16752018-10-29 David Malcolm <dmalcolm@redhat.com>
1676
1677 * c-decl.c (implicit_decl_warning): Update "is there a suggestion"
1678 logic for change to name_hint::operator bool.
1679 (undeclared_variable): Likewise.
1680 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
1681 (c_parser_parameter_declaration): Likewise.
1682
9f936c86
JM
16832018-10-17 Joseph Myers <joseph@codesourcery.com>
1684
1685 * c-errors.c (pedwarn_c11): New function.
1686 * c-parser.c (disable_extension_diagnostics): Save
1687 warn_c11_c2x_compat and set it to 0.
1688 (restore_extension_diagnostics): Restore warn_c11_c2x_compat.
1689 (c_parser_static_assert_declaration_no_semi): Handle
1690 _Static_assert without string constant.
1691 * c-tree.h (pedwarn_c11): New prototype.
1692
033eb567
DM
16932018-10-17 David Malcolm <dmalcolm@redhat.com>
1694
1695 * Make-lang.in (selftest-c): New.
1696 (C_SELFTEST_FLAGS, C_SELFTEST_DEPS, s-selftest-c, selftest-c-gdb)
1697 (selftest-gdb, selftest-c-valgrind, selftest-valgrind): Move here
1698 from gcc/Makefile.in.
1699
0edf3afe
RB
17002018-10-02 Richard Biener <rguenther@suse.de>
1701
1702 * c-decl.c (warn_if_shadowing): Do not test DECL_FROM_INLINE.
1703
8313a764
JM
17042018-09-26 Joseph Myers <joseph@codesourcery.com>
1705
1706 PR c/87390
1707 * c-typeck.c (build_binary_op): Use excess precision for
1708 comparisons of integers and floating-point for C11 and later.
1709
ce6f0888
MJ
17102018-09-26 Martin Jambor <mjambor@suse.cz>
1711
1712 PR c/87347
1713 * c-parser.c (warn_for_abs): Bail out if TYPE_ARG_TYPES is NULL. Fix
ab20d992 1714 comment.
ce6f0888 1715
9c4a4b3c
DM
17162018-09-17 David Malcolm <dmalcolm@redhat.com>
1717
1718 * c-objc-common.c (range_label_for_type_mismatch::get_text):
1719 Update for new param.
1720 * c-typeck.c (maybe_range_label_for_tree_type_mismatch::get_text):
1721 Likewise.
1722
80c6d1f4
MJ
17232018-09-17 Martin Jambor <mjambor@suse.cz>
1724
1725 PR c/63886
1726 * c-parser.c: (warn_for_abs): New function.
1727 (c_parser_postfix_expression_after_primary): Call it.
1728
4a426e36
BE
17292018-09-13 Bernd Edlinger <bernd.edlinger@hotmail.de>
1730
1731 * c-typeck.c (digest_init): Shorten overlength strings.
1732
6d900107
BE
17332018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
1734
1735 * c-decl.c (finish_decl): Call complete_flexible_array_elts.
1736
b5764229
BE
17372018-09-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
1738
1739 * c-decl.c (finish_decl): Call braced_list_to_string here ...
1740 * c-parser.c (c_parser_declaration_or_fndef): ... instead of here.
1741
22eea6b2
AM
17422018-08-30 Alexander Monakov <amonakov@ispras.ru>
1743
1744 * gimple-parser.c (c_parser_gimple_binary_expression): Accept infix
1745 "__MULT_HIGHPART" for MULT_HIGHPART_EXPR.
1746
85204e23
DM
17472018-08-27 David Malcolm <dmalcolm@redhat.com>
1748
1749 PR 87091
1750 * c-decl.c (implicitly_declare): Update call to
1751 maybe_add_include_fixit to suggest overriding the location, as it
1752 is for a note.
1753 * c-objc-common.c (c_tree_printer): Update for conversion of
1754 show_caret_p to a tri-state.
1755
3d78e008
ML
17562018-08-27 Martin Liska <mliska@suse.cz>
1757
1758 * c-decl.c (locate_old_decl): Use new function
92a285c1
ML
1759 fndecl_built_in_p and remove check for FUNCTION_DECL if
1760 possible.
3d78e008
ML
1761 (diagnose_mismatched_decls): Likewise.
1762 (merge_decls): Likewise.
1763 (warn_if_shadowing): Likewise.
1764 (pushdecl): Likewise.
1765 (implicitly_declare): Likewise.
1766 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
1767 * c-tree.h (C_DECL_ISNT_PROTOTYPE): Likewise.
1768 * c-typeck.c (build_function_call_vec): Likewise.
1769 (convert_arguments): Likewise.
1770
097f82ec
DM
17712018-08-20 David Malcolm <dmalcolm@redhat.com>
1772
1773 PR other/84889
1774 * c-decl.c (pushtag): Add auto_diagnostic_group instance.
1775 (diagnose_mismatched_decls): Likewise, in various places.
1776 (warn_if_shadowing): Likewise.
1777 (implicit_decl_warning): Likewise.
1778 (implicitly_declare): Likewise.
1779 (undeclared_variable): Likewise.
1780 (declare_label): Likewise.
1781 (grokdeclarator): Likewise.
1782 (start_function): Likewise.
1783 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
1784 (c_parser_parameter_declaration): Likewise.
1785 (c_parser_binary_expression): Likewise.
1786 * c-typeck.c (c_expr_sizeof_expr): Likewise.
1787 (parser_build_binary_op): Likewise.
1788 (build_unary_op): Likewise.
1789 (error_init): Likewise.
1790 (pedwarn_init): Likewise.
1791 (warning_init): Likewise.
1792 (convert_for_assignment): Likewise.
1793
96e6ae57
DM
17942018-08-15 David Malcolm <dmalcolm@redhat.com>
1795
1796 * c-objc-common.c: Include "gcc-rich-location.h".
1797 (c_tree_printer): Move implemenation of '%T' to...
1798 (print_type): ...this new function.
1799 (range_label_for_type_mismatch::get_text): New function.
1800 * c-typeck.c (convert_for_assignment): Add type labels to the rhs
1801 range for the various ic_argpass cases.
1802 (class maybe_range_label_for_tree_type_mismatch): New class.
1803 (build_binary_op): Use it when calling binary_op_error.
1804
0cd020ae 18052018-08-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
ab20d992 1806
0cd020ae
PK
1807 * c-decl.c (start_decl): Do not warn if variables is named as main
1808 and is a local variable.
1809
72733314
IS
18102018-08-15 Iain Sandoe <iain@sandoe.co.uk>
1811
1812 PR c/19315
1813 * c-decl.c (finish_decl): Don't add the 'extern' storage class to
1814 objects of unknown size.
1815
23aa9f7c
MS
18162018-08-13 Martin Sebor <msebor@redhat.com>
1817
1818 PR tree-optimization/71625
1819 * c-parser.c (c_parser_declaration_or_fndef): Call
1820 braced_list_to_string.
1821
e5e7e50d
BH
18222018-08-03 Bogdan Harjoc <harjoc@gmail.com>
1823
1824 PR c/86690
1825 * c-typeck.c (lookup_field): Do not use TYPE_LANG_SPECIFIC after
1826 errors.
1827
8a45b051
MS
18282018-08-01 Martin Sebor <msebor@redhat.com>
1829
1830 PR tree-optimization/86650
1831 * c-objc-common.c (c_tree_printer): Move usage of EXPR_LOCATION (t)
1832 and TREE_BLOCK (t) from within percent_K_format to this callsite.
1833
5922dcb5
JJ
18342018-08-01 Jakub Jelinek <jakub@redhat.com>
1835
1836 PR c/85704
1837 * c-typeck.c (init_field_decl_cmp): New function.
1838 (output_pending_init_elements): Use it for field comparisons
1839 instead of pure bit_position comparisons.
1840
9b452033
JJ
18412018-07-12 Jakub Jelinek <jakub@redhat.com>
1842
1843 * c-decl.c (c_decl_attributes): Don't diagnose vars without mappable
1844 type here, instead add "omp declare target implicit" attribute.
1845 (finish_decl): Diagnose vars without mappable type here.
1846
ab20d992
JJ
18472018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
1848 Thomas Schwinge <thomas@codesourcery.com>
829c6349
CLT
1849 Cesar Philippidis <cesar@codesourcery.com>
1850
1851 * c-parser.c (c_parser_omp_clause_name): Add support for finalize
1852 and if_present. Make present_or_{copy,copyin,copyout,create} aliases
1853 to their non-present_or_* counterparts. Make 'self' an alias to
1854 PRAGMA_OACC_CLAUSE_HOST.
1855 (c_parser_oacc_data_clause): Update GOMP mappings for
1856 PRAGMA_OACC_CLAUSE_{COPY,COPYIN,COPYOUT,CREATE,DELETE}. Remove
1857 PRAGMA_OACC_CLAUSE_{SELF,PRESENT_OR_*}.
1858 (c_parser_oacc_all_clauses): Handle finalize and if_present clauses.
1859 Remove support for present_or_* clauses.
1860 (OACC_KERNELS_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
1861 (OACC_PARALLEL_CLAUSE_MASK): Likewise.
1862 (OACC_DECLARE_CLAUSE_MASK): Likewise.
1863 (OACC_DATA_CLAUSE_MASK): Likewise.
1864 (OACC_ENTER_DATA_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
1865 (OACC_EXIT_DATA_CLAUSE_MASK): Add FINALIZE clause.
1866 (OACC_UPDATE_CLAUSE_MASK): Remove SELF, add IF_PRESENT.
1867 (c_parser_oacc_declare): Remove PRESENT_OR_* clauses.
1868 * c-typeck.c (c_finish_omp_clauses): Handle IF_PRESENT and FINALIZE.
1869
e197e64e
KV
18702018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
1871
1872 * c-typeck.c (build_unary_op): Handle ABSU_EXPR;
1873 * gimple-parser.c (c_parser_gimple_statement): Likewise.
1874 (c_parser_gimple_unary_expression): Likewise.
1875
487f2f61
JJ
18762018-06-15 Jakub Jelinek <jakub@redhat.com>
1877
1878 PR c/86093
1879 * c-typeck.c (pointer_diff): Cast both pointers to unqualified types
1880 before doing POINTER_DIFF_EXPR.
1881
e4d44a37
MP
18822018-06-07 Marek Polacek <polacek@redhat.com>
1883
1884 PR c/85318
1885 * c-decl.c (check_for_loop_decls): Add -Wc90-c99-compat warning about
1886 for loop initial declarations.
1887
b67b9225
DP
18882018-05-30 David Pagan <dave.pagan@oracle.com>
1889
1890 PR c/55976
1891 * c-decl.c (grokdeclarator): Update check for return type warnings.
1892 (start_function): Likewise.
1893 (finish_function): Likewise.
1894 * c-typeck.c (c_finish_return): Update check for return type warnings.
1895 Pass OPT_Wreturn_type to pedwarn when appropriate.
1896
c566cc9f
RS
18972018-05-18 Richard Sandiford <richard.sandiford@linaro.org>
1898
1899 * gimple-parser.c (c_parser_gimple_postfix_expression): Remove
1900 __FMA_EXPR handlng.
1901
e4f81565
RS
19022018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
1903
1904 * gimple-parser.c: Include internal-fn.h.
1905 (c_parser_gimple_statement): Treat a leading CPP_DOT as a call.
1906 (c_parser_gimple_call_internal): New function.
1907 (c_parser_gimple_postfix_expression): Use it to handle CPP_DOT.
1908 Fix typos in comment.
1909
79e7b1fe
JJ
19102018-05-10 Jakub Jelinek <jakub@redhat.com>
1911
1912 PR c++/85662
1913 * c-fold.c (c_fully_fold_internal): Use fold_offsetof rather than
1914 fold_offsetof_1, pass TREE_TYPE (expr) as TYPE to it and drop the
1915 fold_convert_loc.
1916 * c-typeck.c (build_unary_op): Use fold_offsetof rather than
1917 fold_offsetof_1, pass argtype as TYPE to it and drop the
1918 fold_convert_loc.
1919
f7584c81
DP
19202018-05-02 David Pagan <dave.pagan@oracle.com>
1921
1922 PR c/30552
1923 * c-decl.c (old_style_parameter_scope): New function.
1924 * c-parser.c (c_parser_postfix_expression): Check for statement
1925 expressions in old-style function parameter list declarations.
1926 * c-parser.h (old_style_parameter_scope): New extern declaration.
1927
b33a0cb3
JJ
19282018-04-25 Jakub Jelinek <jakub@redhat.com>
1929
1930 PR sanitizer/84307
1931 * c-decl.c (build_compound_literal): Call pushdecl (decl) even when
1932 it is not TREE_STATIC.
1933 * c-typeck.c (c_mark_addressable) <case COMPOUND_LITERAL_EXPR>: Mark
1934 not just the COMPOUND_LITERAL_EXPR node itself addressable, but also
1935 its COMPOUND_LITERAL_EXPR_DECL.
1936
c5c5822a
JM
19372018-03-21 Joseph Myers <joseph@codesourcery.com>
1938
1939 * c-parser.c (c_parser_postfix_expression): For __builtin_tgmath
1940 where all functions return the same _FloatN or _FloatNx type,
1941 treat integer types as _Float64 instead of double.
1942
aa1c9429
JJ
19432018-03-21 Jakub Jelinek <jakub@redhat.com>
1944
1945 PR c/84999
1946 * c-typeck.c (build_binary_op): If c_common_type_for_size fails when
1947 building vector comparison, diagnose it and return error_mark_node.
1948
9bb45a95
JJ
19492018-03-15 Jakub Jelinek <jakub@redhat.com>
1950
1951 PR c/84853
1952 * c-typeck.c (build_binary_op) <case RSHIFT_EXPR, case LSHIFT_EXPR>:
1953 If code1 is INTEGER_TYPE, only allow code0 VECTOR_TYPE if it has
1954 INTEGER_TYPE element type.
1955
ada6bad9
DP
19562018-03-13 David Pagan <dave.pagan@oracle.com>
1957
1958 PR c/46921
1959 * c-typeck.c (output_init_element): Ensure field initializer
1960 expression is always evaluated if there are side effects.
1961
849bbdb9
JJ
19622018-03-06 Jakub Jelinek <jakub@redhat.com>
1963
1964 PR c/84721
1965 * c-parser.c (add_debug_begin_stmt): Don't add DEBUG_BEGIN_STMT if
1966 !building_stmt_list_p ().
1967
d74641bd
RS
19682018-02-13 Richard Sandiford <richard.sandiford@linaro.org>
1969
1970 PR c/84305
1971 * c-decl.c (grokdeclarator): Create an anonymous TYPE_DECL
1972 in PARM and TYPENAME contexts too, but attach it to a BIND_EXPR
1973 and include the BIND_EXPR in the list of things that need to be
1974 pre-evaluated.
1975
0444aa9c
NS
19762018-02-09 Nathan Sidwell <nathan@acm.org>
1977
1978 PR c/84293
1979 * c-typeck.c (build_indirect_ref, build_c_cast): Pass expr location
1980 to strict_aliasing_warning.
1981
7c30b12a
PC
19822018-02-02 Paolo Carlini <paolo.carlini@oracle.com>
1983
1984 * c-typeck.c (really_start_incremental_init, push_init_level,
1985 set_nonincremental_init, output_init_element, process_init_element):
1986 Use DECL_UNNAMED_BIT_FIELD.
1987
2be4dfcb
MP
19882018-01-31 Marek Polacek <polacek@redhat.com>
1989
1990 PR c/81779
1991 * c-parser.c (c_parser_compound_statement_nostart): Call
1992 expansion_point_location_if_in_system_header.
1993
bb9869d5
DM
19942018-01-17 David Malcolm <dmalcolm@redhat.com>
1995
1996 PR c++/83814
1997 * c-fold.c (fold_for_warn): Move from c-common.c, reducing to just
1998 the C part.
1999
b4923738
JJ
20002018-01-13 Jakub Jelinek <jakub@redhat.com>
2001
2002 PR c/83801
2003 * c-tree.h (decl_constant_value_1): Add a bool argument.
2004 * c-typeck.c (decl_constant_value_1): Add IN_INIT argument, allow
2005 returning a CONSTRUCTOR if it is true. Use error_operand_p.
2006 (decl_constant_value): Adjust caller.
2007 * c-fold.c (c_fully_fold_internal): If in_init, pass true to
2008 decl_constant_value_1 as IN_INIT. Otherwise, punt if
2009 decl_constant_value returns initializer that has BLKmode or
2010 array type.
2011 (c_fully_fold_internal) <case COMPONENT_REF>: Fold if !lval.
2012
928686b1
RS
20132018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
2014 Alan Hayward <alan.hayward@arm.com>
2015 David Sherwood <david.sherwood@arm.com>
2016
2017 * c-typeck.c (comptypes_internal, build_binary_op): Handle polynomial
2018 TYPE_VECTOR_SUBPARTS.
2019
85ec4feb
JJ
20202018-01-03 Jakub Jelinek <jakub@redhat.com>
2021
2022 Update copyright years.
2023
913884f7
JJ
20242018-01-01 Jakub Jelinek <jakub@redhat.com>
2025
2026 PR c/83595
2027 * c-parser.c (c_parser_braced_init, c_parser_initelt,
2028 c_parser_conditional_expression, c_parser_cast_expression,
2029 c_parser_sizeof_expression, c_parser_alignof_expression,
2030 c_parser_postfix_expression, c_parser_omp_declare_reduction,
2031 c_parser_transaction_expression): Use set_error () method instead
2032 of setting value member to error_mark_node.
2033
c6cfa2bf
MM
20342017-12-28 Michael Meissner <meissner@linux.vnet.ibm.com>
2035
2036 * c-decl.c (header_for_builtin_fn): Add integer rounding _Float<N>
2037 and _Float<N>X built-in functions.
2038
11d29d63
JJ
20392017-12-22 Jakub Jelinek <jakub@redhat.com>
2040
14ec014e
JJ
2041 PR debug/83550
2042 * c-decl.c (finish_struct): Set DECL_SOURCE_LOCATION on
2043 TYPE_STUB_DECL and call rest_of_type_compilation before processing
2044 incomplete vars rather than after it.
2045
11d29d63
JJ
2046 PR debug/83547
2047 * c-typeck.c (c_finish_stmt_expr): Ignore !TREE_SIDE_EFFECTS as
2048 indicator of ({ }), instead skip all trailing DEBUG_BEGIN_STMTs first,
2049 and consider empty ones if there are no other stmts. For
2050 -Wunused-value walk all statements before the one only followed by
2051 DEBUG_BEGIN_STMTs.
2052
170a8bd6 20532017-12-22 Mike Stump <mikestump@comcast.net>
92a285c1 2054 Eric Botcazou <ebotcazou@adacore.com>
170a8bd6
EB
2055
2056 * c-parser.c (c_parser_while_statement): Add unroll parameter and
2057 build ANNOTATE_EXPR if present. Add 3rd operand to ANNOTATE_EXPR.
2058 (c_parser_do_statement): Likewise.
2059 (c_parser_for_statement): Likewise.
2060 (c_parser_statement_after_labels): Adjust calls to above.
2061 (c_parse_pragma_ivdep): New static function.
2062 (c_parser_pragma_unroll): Likewise.
2063 (c_parser_pragma) <PRAGMA_IVDEP>: Add support for pragma Unroll.
2064 <PRAGMA_UNROLL>: New case.
2065
01512446
JJ
20662017-12-19 Jakub Jelinek <jakub@redhat.com>
2067
2068 * c-typeck.c (comptypes_internal, function_types_compatible_p,
2069 perform_integral_promotions, digest_init): Replace Yoda conditions
2070 with typical order conditions.
2071 * c-decl.c (check_bitfield_type_and_width): Likewise.
2072
c65e18d3
BE
20732017-12-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
2074
2075 * c-typeck.c (c_safe_arg_type_equiv_p,
2076 c_safe_function_type_cast_p): New function.
2077 (build_c_cast): Implement -Wcast-function-type.
2078
b7280579
RB
20792017-12-14 Richard Biener <rguenther@suse.de>
2080
2081 PR c/83415
2082 * c-fold.c (c_fully_fold_internal): Treat VIEW_CONVERT_EXPR
2083 like REALPART_EXPR for the behavior of whether its operand
2084 is an lvalue.
2085
49e6a6c0
MP
20862017-12-12 Marek Polacek <polacek@redhat.com>
2087
2088 PR c/82679
2089 * c-decl.c (grokdeclarator): Check declspecs insted of atomicp.
2090
ab20d992 20912017-12-12 Alexandre Oliva <aoliva@redhat.com>
96a95ac1
AO
2092
2093 * c-objc-common.h (LANG_HOOKS_EMITS_BEGIN_STMT): Redefine as true.
2094 * c-parser.c (add_debug_begin_stmt): New.
2095 (c_parser_declaration_or_fndef): Call it.
2096 (c_parser_compound_statement_nostart): Likewise.
2097 (c_parser_statement_after_labels): Likewise.
2098 * c-typeck (c_finish_stmt_expr): Skip begin stmts markers.
2099
4b2b493f
JM
21002017-12-07 Joseph Myers <joseph@codesourcery.com>
2101
2102 * c-decl.c (build_compound_literal): Add parameter alignas_align
2103 and set alignment of decl if nonzero.
2104 * c-parser.c (c_keyword_starts_typename): Allow RID_ALIGNAS.
2105 (c_parser_declspecs): Allow RID_ALIGNAS to follow a type, like a
2106 qualifier.
2107 (c_parser_struct_declaration): Update syntax comment.
2108 (c_parser_type_name): Add alignas_ok argument and pass it to
2109 c_parser_declspecs.
2110 (c_parser_cast_expression): Pass true to c_parser_type_name and
2111 give error if a cast used an _Alignas specifier.
2112 (c_parser_sizeof_expression): Pass true to c_parser_type_name and
2113 give error if sizeof (type-name) used an _Alignas specifier.
2114 (c_parser_alignof_expression): Pass true to c_parser_type_name and
2115 give error if _Alignof (type-name) used an _Alignas specifier.
2116 (c_parser_postfix_expression_after_paren_type): Check specified
2117 alignment for a compound literal and pass it to
2118 build_compound_literal.
2119 * c-parser.h (c_parser_type_name): Update prototype.
2120 * c-tree.h (build_compound_literal): Update prototype.
2121
5d9ae53d
MS
21222017-12-07 Martin Sebor <msebor@redhat.com>
2123
2124 PR c/81544
2125 * c-decl.c (c_decl_attributes): Look up existing declaration and
2126 pass it to decl_attributes.
2127
c79144f8
DM
21282017-12-06 David Malcolm <dmalcolm@redhat.com>
2129
2130 PR c/83236
2131 * c-decl.c (lookup_name_fuzzy): Don't suggest names that are
2132 reserved for use by the implementation.
2133
613bc14f
DM
21342017-12-06 David Malcolm <dmalcolm@redhat.com>
2135
2136 * c-decl.c: Include "c-family/c-spellcheck.h".
2137
05abad4c
ML
21382017-12-05 Martin Liska <mliska@suse.cz>
2139 Jakub Jelinek <jakub@redhat.com>
2140
2141 * c-typeck.c (pointer_diff): Add new argument and instrument
2142 pointer subtraction.
2143 (build_binary_op): Similar for pointer comparison.
2144
cc6534d4
JJ
21452017-12-01 Jakub Jelinek <jakub@redhat.com>
2146
65791f42
JJ
2147 PR c/79153
2148 * c-parser.c: Include tree-iterator.h.
2149 (c_parser_switch_statement): Emit LABEL_EXPR for the break label
2150 into SWITCH_BODY instead of after it and set SWITCH_BREAK_LABEL_P
2151 on it.
2152
cc6534d4
JJ
2153 PR c/83222
2154 * c-tree.h (decl_constant_value_1): Declare.
2155 * c-typeck.c (decl_constant_value_1): New function.
2156 (decl_constant_value): Use it.
2157 * c-fold.c (c_fully_fold_internal): If in_init, use
2158 decl_constant_value_1 instead of decl_constant_value.
2159
5de73c05
JJ
21602017-11-30 Jakub Jelinek <jakub@redhat.com>
2161
2162 * c-parser.c (c_parser_postfix_expression): Use ; instead of ;;.
2163
058f0b9e
JJ
21642017-11-28 Jakub Jelinek <jakub@redhat.com>
2165
2166 PR sanitizer/81275
2167 * c-typeck.c (c_finish_case): Set SWITCH_ALL_CASES_P if
2168 c_switch_covers_all_cases_p returns true.
2169
5e9d6aa4 21702017-11-28 Julia Koval <julia.koval@intel.com>
92a285c1 2171 Sebastian Peryt <sebastian.peryt@intel.com>
5e9d6aa4
JK
2172
2173 * Make-lang.in (c/c-array-notation.o): Remove.
2174 * c-array-notation.c: Delete.
2175 * c-decl.c: Remove cilkplus condition.
2176 * c-parser.c (c_parser_cilk_simd, c_parser_cilk_for,
2177 c_parser_cilk_verify_simd, c_parser_array_notation,
2178 c_parser_cilk_clause_vectorlength, c_parser_cilk_grainsize,
2179 c_parser_cilk_simd_fn_vector_attrs,
2180 c_finish_cilk_simd_fn_tokens): Delete.
2181 (c_parser_declaration_or_fndef): Remove cilkplus condition.
2182 (c_parser_direct_declarator_inner): Ditto.
2183 (CILK_SIMD_FN_CLAUSE_MASK): Delete.
2184 (c_parser_attributes, c_parser_compound_statement,
2185 c_parser_statement_after_labels, c_parser_if_statement,
2186 c_parser_switch_statement, c_parser_while_statement,
2187 c_parser_do_statement, c_parser_for_statement,
2188 c_parser_unary_expression, c_parser_postfix_expression,
2189 c_parser_postfix_expression_after_primary,
2190 c_parser_pragma, c_parser_omp_clause_name, c_parser_omp_all_clauses,
2191 c_parser_omp_for_loop, c_finish_omp_declare_simd): Remove cilkplus
2192 support.
2193 * c-typeck.c (build_array_ref, build_function_call_vec,
2194 convert_arguments,
2195 lvalue_p, build_compound_expr, c_finish_return, c_finish_if_stmt,
2196 c_finish_loop, build_binary_op): Remove cilkplus support.
2197
9e851845
JJ
21982017-11-28 Jakub Jelinek <jakub@redhat.com>
2199
2200 * c-typeck.c (c_start_case): Build SWITCH_EXPR using build2 instead
2201 of build3.
2202
ab20d992 22032017-11-14 Boris Kolpackov <boris@codesynthesis.com>
8c7dbea9
BK
2204
2205 * Make-lang.in (c.install-plugin): Install backend import library.
2206
41521dee
JJ
22072017-11-23 Jakub Jelinek <jakub@redhat.com>
2208
2209 * c-parser.c (c_parser_omp_declare_simd): Reject declare simd in
2210 pragma_stmt context.
2211
ac9effed
EB
22122017-11-23 Mike Stump <mikestump@comcast.net>
2213 Eric Botcazou <ebotcazou@adacore.com>
2214
2215 * c-parser.c (c_parser_while_statement): Pass 3rd operand to
2216 ANNOTATE_EXPR.
2217 (c_parser_do_statement): Likewise.
2218 (c_parser_for_statement): Likewise.
2219
ce95abc4
DM
22202017-11-22 David Malcolm <dmalcolm@redhat.com>
2221
2222 PR c++/62170
2223 * c-objc-common.c (c_tree_printer): Convert penultimate param from
2224 bool to bool *. Within '%T' handling, if showing an "aka", use
2225 "quoted" param to add appropriate quoting.
2226
974aedcc
MP
22272017-11-22 Marek Polacek <polacek@redhat.com>
2228
2229 PR c++/60336
2230 PR middle-end/67239
2231 PR target/68355
2232 * c-decl.c (grokdeclarator): Set DECL_PADDING_P on unnamed bit-fields.
2233
d4300cc6
DM
22342017-11-21 David Malcolm <dmalcolm@redhat.com>
2235
2236 PR c/83056
2237 * c-decl.c (lookup_name_fuzzy): Don't suggest names that came from
2238 earlier failed lookups.
2239
1af4ebf5
MG
22402017-11-21 Marc Glisse <marc.glisse@inria.fr>
2241
2242 * c-fold.c (c_fully_fold_internal): Handle POINTER_DIFF_EXPR.
2243 * c-typeck.c (pointer_diff): Use POINTER_DIFF_EXPR.
2244
26edace6
DM
22452017-11-20 David Malcolm <dmalcolm@redhat.com>
2246
2247 PR c/81404
2248 * c-decl.c: Include "c-family/known-headers.h".
2249 (get_c_name_hint): Rename to get_stdlib_header_for_name and move
2250 to known-headers.cc.
2251 (class suggest_missing_header): Move to known-header.h.
2252 (lookup_name_fuzzy): Call get_c_stdlib_header_for_name rather
2253 than get_c_name_hint.
2254
b1212255
DM
22552017-11-20 David Malcolm <dmalcolm@redhat.com>
2256
2257 * c-decl.c (get_c_name_hint): New function.
2258 (class suggest_missing_header): New class.
2259 (lookup_name_fuzzy): Call get_c_name_hint and use it to
2260 suggest missing headers to the user.
2261
6c7a259b
DM
22622017-11-20 David Malcolm <dmalcolm@redhat.com>
2263
2264 * c-decl.c: Define INCLUDE_UNIQUE_PTR before including system.h.
2265 Include "c-family/name-hint.h"
2266 (implicit_decl_warning): Convert "hint" from
2267 const char * to name_hint. Pass location to
2268 lookup_name_fuzzy. Suppress any deferred diagnostic if the
2269 warning was not printed.
2270 (undeclared_variable): Likewise for "guessed_id".
2271 (lookup_name_fuzzy): Convert return type from const char *
2272 to name_hint. Add location_t param.
2273 * c-parser.c: Define INCLUDE_UNIQUE_PTR before including system.h.
2274 Include "c-family/name-hint.h"
2275 (c_parser_declaration_or_fndef): Convert "hint" from
2276 const char * to name_hint. Pass location to lookup_name_fuzzy.
2277 (c_parser_parameter_declaration): Likewise.
2278
f9c59f7e
JJ
22792017-11-19 Jakub Jelinek <jakub@redhat.com>
2280
2281 PR c/66618
2282 PR c/69960
2283 * c-parser.c (c_parser_omp_atomic): Pass true as LVAL to c_fully_fold
2284 where needed.
2285 * c-typeck.c (build_unary_op, build_modify_expr, build_asm_expr,
2286 handle_omp_array_sections): Likewise.
2287 (digest_init): Don't call decl_constant_value_for_optimization.
2288 * c-tree.h (decl_constant_value_for_optimization): Removed.
2289 * c-fold.c (c_fold_array_ref): New function.
2290 (c_fully_fold_internal): Add LVAL argument, propagate it through
2291 recursive calls. For VAR_P call decl_constant_value and
2292 unshare if not LVAL and either optimizing or IN_INIT. Remove
2293 decl_constant_value_for_optimization calls. If IN_INIT and not LVAL,
2294 fold ARRAY_REF with STRING_CST and INTEGER_CST operands.
2295 (c_fully_fold): Add LVAL argument, pass it through to
2296 c_fully_fold_internal.
2297 (decl_constant_value_for_optimization): Removed.
2298
3ca0dc60
JM
22992017-11-15 Joseph Myers <joseph@codesourcery.com>
2300
2301 PR c/81156
2302 * c-parser.c (check_tgmath_function): New function.
2303 (enum tgmath_parm_kind): New enum.
2304 (c_parser_postfix_expression): Handle __builtin_tgmath.
2305
64a5912c
DM
23062017-10-31 David Malcolm <dmalcolm@redhat.com>
2307
2308 * c-decl.c (implicit_decl_warning): Update for renaming of
2309 pedwarn_at_rich_loc and warning_at_rich_loc.
2310 (implicitly_declare): Likewise for renaming of inform_at_rich_loc.
2311 (undeclared_variable): Likewise for renaming of error_at_rich_loc.
2312 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
2313 (c_parser_struct_or_union_specifier): Likewise for renaming of
2314 pedwarn_at_rich_loc.
2315 (c_parser_parameter_declaration): Likewise for renaming of
2316 error_at_rich_loc.
2317 * c-typeck.c (build_component_ref): Likewise.
2318 (build_unary_op): Likewise for renaming of inform_at_rich_loc.
2319 (pop_init_level): Likewise for renaming of warning_at_rich_loc.
2320 (set_init_label): Likewise for renaming of error_at_rich_loc.
2321
c1136864
RB
23222017-10-30 Richard Biener <rguenther@suse.de>
2323
2324 * gimple-parser.c (c_parser_gimple_statement): Parse conditional
2325 stmts.
2326
ee5fd23a
MM
23272017-10-27 Michael Meissner <meissner@linux.vnet.ibm.com>
2328
2329 * c-decl.c (header_for_builtin_fn): Add support for copysign, fma,
2330 fmax, fmin, and sqrt _Float<N> and _Float<N>X variants.
2331
1a59ccf2
DM
23322017-10-25 David Malcolm <dmalcolm@redhat.com>
2333
2334 PR c/7356
2335 * c-parser.c (c_parser_declaration_or_fndef): Detect missing
2336 semicolons.
2337
bc1a75dd
JJ
23382017-10-25 Jakub Jelinek <jakub@redhat.com>
2339
2340 PR libstdc++/81706
2341 * c-decl.c (merge_decls): Copy "omp declare simd" attributes from
2342 newdecl to corresponding __builtin_ if any.
2343
ff1ff960
PC
23442017-10-24 Paolo Carlini <paolo.carlini@oracle.com>
2345
2346 PR c++/82466
2347 * c-decl.c (diagnose_mismatched_decls): Use
2348 OPT_Wbuiltin_declaration_mismatch.
2349
62e1c678
DM
23502017-10-12 David Malcolm <dmalcolm@redhat.com>
2351
2352 * c-parser.c (c_parser_require): Add "type_is_unique" param and
2353 use it to guard calls to maybe_suggest_missing_token_insertion.
2354 (c_parser_parms_list_declarator): Override default value of new
2355 "type_is_unique" param to c_parser_require.
2356 (c_parser_asm_statement): Likewise.
2357 * c-parser.h (c_parser_require): Add "type_is_unique" param,
2358 defaulting to true.
2359
a92f6726
NS
23602017-10-11 Nathan Sidwell <nathan@acm.org>
2361
2362 * c-decl.c (grokdeclarator): Check HAS_DECL_ASSEMBLER_NAME_P too.
2363
8e6cdc90
RS
23642017-10-10 Richard Sandiford <richard.sandiford@linaro.org>
2365
2366 * c-parser.c (c_parser_cilk_clause_vectorlength): Use wi::to_wide when
2367 operating on trees as wide_ints.
2368 * c-typeck.c (build_c_cast, c_finish_omp_clauses): Likewise.
2369 (c_tree_equal): Likewise.
2370
8139a48e
DM
23712017-10-04 David Malcolm <dmalcolm@redhat.com>
2372
2373 * c-decl.c (push_parm_decl): Store c_parm's location into the
2374 PARAM_DECL.
2375 (build_c_parm): Add "loc" param and store it within the c_parm.
2376 * c-parser.c (struct c_parser): Add "last_token_location" field.
2377 (c_parser_consume_token): Store location of the token into the
2378 new field.
2379 (c_parser_declaration_or_fndef): Store params into DECL_ARGUMENTS
2380 when handling a FUNCTION_DECL, if it doesn't already have them.
2381 (c_parser_parameter_declaration): Generate a location for the
2382 parameter, and pass it to the call to build_c_parm.
2383 * c-tree.h (struct c_parm): Add field "loc".
2384 (build_c_parm): Add location_t param.
2385 * c-typeck.c (get_fndecl_argument_location): New function.
2386 (inform_for_arg): New function.
2387 (convert_for_assignment): Use inform_for_arg when dealing with
2388 ic_argpass.
2389
2a389958
JJ
23902017-09-29 Jakub Jelinek <jakub@redhat.com>
2391
7d386d45
JJ
2392 * c-decl.c (grokfield): Use SET_DECL_C_BIT_FIELD here if
2393 width is non-NULL.
2394 (finish_struct): Test DECL_C_BIT_FIELD instead of DECL_INITIAL,
2395 don't SET_DECL_C_BIT_FIELD here.
2396
2a389958
JJ
2397 PR c/82340
2398 * c-decl.c (build_compound_literal): Use c_apply_type_quals_to_decl
2399 instead of trying to set just TREE_READONLY manually.
2400
ebc6a85e
TV
24012017-09-16 Tom de Vries <tom@codesourcery.com>
2402
2403 PR c/81875
2404 * c-parser.c (c_parser_omp_for_loop): Fold only operands of cond, not
2405 cond itself.
2406
bb75facd
JM
24072017-09-15 Joseph Myers <joseph@codesourcery.com>
2408
2409 PR c/82071
2410 * c-typeck.c (ep_convert_and_check): Just call convert_and_check
2411 for C11.
2412 (build_conditional_expr): For C11, generate result with excess
2413 precision when one argument is an integer and the other is of a
2414 type using excess precision.
2415
1d933576
BE
24162017-09-15 Bernd Edlinger <bernd.edlinger@hotmail.de>
2417
2418 * c-typeck.c (build_c_cast): Implement -Wcast-align=strict.
2419
267bbb6f
MP
24202017-09-13 Marek Polacek <polacek@redhat.com>
2421
2422 PR c/82167
2423 * c-typeck.c (c_expr_sizeof_expr): Use the type of expr.value rather
2424 than expr.original_type.
2425
6836632e
NS
24262017-09-12 Nathan Sidwell <nathan@acm.org>
2427
2428 * c-decl.c (field_decl_cmp, resort_data, resort_field_decl_cmp,
2429 resort_sorted_fields): Moved from c-family/c-common.c.
2430 * c-lang.h (struct sorted_fields_type): Moved from c-family/c-common.h.
2431
e035be33
JM
24322017-09-01 Joseph Myers <joseph@codesourcery.com>
2433
2434 PR c/82071
2435 * c-typeck.c (build_atomic_assign): Handle argument with excess
2436 precision. Ensure any EXCESS_PRECISION_EXPR is present in
2437 argument passed to build_binary_op and convert_for_assignment but
2438 not for call to c_fully_fold.
2439 (build_modify_expr): Do not remove EXCESS_PRECISION_EXPR early.
2440 Ensure build_binary_op is called with argument with original
2441 semantic type. Avoid calling c_fully_fold with an
2442 EXCESS_PRECISION_EXPR from build_binary_op.
2443
d2e05fcb
JJ
24442017-09-01 Jakub Jelinek <jakub@redhat.com>
2445
2446 PR c/81887
2447 * c-parser.c (c_parser_omp_ordered): Handle -fopenmp-simd.
2448
b397965c
RS
24492017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
2450 Alan Hayward <alan.hayward@arm.com>
2451 David Sherwood <david.sherwood@arm.com>
2452
2453 * c-typeck.c (build_binary_op): Use SCALAR_TYPE_MODE.
2454 (c_common_type): Likewise. Use as_a <scalar_mode> when setting
2455 m1 and m2 to the signed equivalent of a fixed-point
2456 SCALAR_TYPE_MODE.
2457
14e18d71
DM
24582017-08-24 David Malcolm <dmalcolm@redhat.com>
2459
2460 * c-tree.h (c_expr::get_location) Use EXPR_HAS_LOCATION rather
2461 than CAN_HAVE_LOCATION_P when determining whether to use the
2462 location_t value within "value".
2463
7f204c0f
DM
24642017-08-21 David Malcolm <dmalcolm@redhat.com>
2465
2466 * c-parser.c (c_parser_expr_list): Use c_expr::get_location ()
2467 rather than peeking the location of the first token.
2468 * c-tree.h (c_expr::get_location): New method.
2469
2f687306
DM
24702017-08-21 David Malcolm <dmalcolm@redhat.com>
2471
2472 * c-typeck.c (build_function_call_vec): Pass arg_loc to call
2473 to check_function_arguments.
2474
3e7b80d7
MP
24752017-08-18 Marek Polacek <polacek@redhat.com>
2476
2477 * c-parser.c (c_parser_postfix_expression): Remove unused code. Update
2478 commentary.
2479
00aa1fa2
L
24802017-08-18 H.J. Lu <hongjiu.lu@intel.com>
2481
2482 PR c/53037
2483 * c-decl.c (merge_decls): Also merge DECL_WARN_IF_NOT_ALIGN.
2484 (check_bitfield_type_and_width): Don't allow bit-field with
2485 warn_if_not_aligned type.
2486
da67acb9
MS
24872017-08-14 Martin Sebor <msebor@redhat.com>
2488
2489 PR c/81117
2490 * c-objc-common.c (c_objc_common_init): Handle 'G'.
2491
bb85aa74
MP
24922017-08-11 Marek Polacek <polacek@redhat.com>
2493
2494 PR c/81795
2495 * c-decl.c (pushtag): Only print inform if the warning was printed.
2496 (grokdeclarator): Likewise.
2497
32129a17
DM
24982017-08-10 David Malcolm <dmalcolm@redhat.com>
2499
2500 * c-parser.c (c_parser_error): Rename to...
2501 (c_parser_error_richloc): ...this, making static, and adding
2502 "richloc" parameter, passing it to the c_parse_error call,
2503 rather than calling c_parser_set_source_position_from_token.
2504 (c_parser_error): Reintroduce, reimplementing in terms of the
2505 above, converting return type from void to bool.
2506 (class token_pair): New class.
2507 (struct matching_paren_traits): New struct.
2508 (matching_parens): New typedef.
2509 (struct matching_brace_traits): New struct.
2510 (matching_braces): New typedef.
2511 (get_matching_symbol): New function.
2512 (c_parser_require): Add param MATCHING_LOCATION, using it to
2513 highlight matching "opening" tokens for missing "closing" tokens.
2514 (c_parser_skip_until_found): Likewise.
2515 (c_parser_static_assert_declaration_no_semi): Convert explicit
2516 parsing of CPP_OPEN_PAREN and CPP_CLOSE_PAREN to use of
2517 class matching_parens, so that the pertinent open parenthesis is
2518 highlighted when there are problems locating the close
2519 parenthesis.
2520 (c_parser_struct_or_union_specifier): Likewise.
2521 (c_parser_typeof_specifier): Likewise.
2522 (c_parser_alignas_specifier): Likewise.
2523 (c_parser_simple_asm_expr): Likewise.
2524 (c_parser_braced_init): Likewise, for matching_braces.
2525 (c_parser_paren_condition): Likewise, for matching_parens.
2526 (c_parser_switch_statement): Likewise.
2527 (c_parser_for_statement): Likewise.
2528 (c_parser_asm_statement): Likewise.
2529 (c_parser_asm_operands): Likewise.
2530 (c_parser_cast_expression): Likewise.
2531 (c_parser_sizeof_expression): Likewise.
2532 (c_parser_alignof_expression): Likewise.
2533 (c_parser_generic_selection): Likewise.
2534 (c_parser_postfix_expression): Likewise for cases RID_VA_ARG,
2535 RID_OFFSETOF, RID_TYPES_COMPATIBLE_P, RID_AT_SELECTOR,
2536 RID_AT_PROTOCOL, RID_AT_ENCODE, reindenting as necessary.
2537 In case CPP_OPEN_PAREN, pass loc_open_paren to the
2538 c_parser_skip_until_found call.
2539 (c_parser_objc_class_definition): Use class matching_parens as
2540 above.
2541 (c_parser_objc_method_decl): Likewise.
2542 (c_parser_objc_try_catch_finally_statement): Likewise.
2543 (c_parser_objc_synchronized_statement): Likewise.
2544 (c_parser_objc_at_property_declaration): Likewise.
2545 (c_parser_oacc_wait_list): Likewise.
2546 (c_parser_omp_var_list_parens): Likewise.
2547 (c_parser_omp_clause_collapse): Likewise.
2548 (c_parser_omp_clause_default): Likewise.
2549 (c_parser_omp_clause_if): Likewise.
2550 (c_parser_omp_clause_num_threads): Likewise.
2551 (c_parser_omp_clause_num_tasks): Likewise.
2552 (c_parser_omp_clause_grainsize): Likewise.
2553 (c_parser_omp_clause_priority): Likewise.
2554 (c_parser_omp_clause_hint): Likewise.
2555 (c_parser_omp_clause_defaultmap): Likewise.
2556 (c_parser_oacc_single_int_clause): Likewise.
2557 (c_parser_omp_clause_ordered): Likewise.
2558 (c_parser_omp_clause_reduction): Likewise.
2559 (c_parser_omp_clause_schedule): Likewise.
2560 (c_parser_omp_clause_num_teams): Likewise.
2561 (c_parser_omp_clause_thread_limit): Likewise.
2562 (c_parser_omp_clause_aligned): Likewise.
2563 (c_parser_omp_clause_linear): Likewise.
2564 (c_parser_omp_clause_safelen): Likewise.
2565 (c_parser_omp_clause_simdlen): Likewise.
2566 (c_parser_omp_clause_depend): Likewise.
2567 (c_parser_omp_clause_map): Likewise.
2568 (c_parser_omp_clause_device): Likewise.
2569 (c_parser_omp_clause_dist_schedule): Likewise.
2570 (c_parser_omp_clause_proc_bind): Likewise.
2571 (c_parser_omp_clause_uniform): Likewise.
2572 (c_parser_omp_for_loop): Likewise.
2573 (c_parser_cilk_clause_vectorlength): Likewise.
2574 (c_parser_cilk_clause_linear): Likewise.
2575 (c_parser_transaction_expression): Likewise.
2576 * c-parser.h (c_parser_require): Add param matching_location with
2577 default UNKNOWN_LOCATION.
2578 (c_parser_error): Convert return type from void to bool.
2579 (c_parser_skip_until_found): Add param matching_location with
2580 default UNKNOWN_LOCATION.
2581
30af3a2b
MP
25822017-08-09 Marek Polacek <polacek@redhat.com>
2583
2584 * c-decl.c (build_enumerator): Use true/false instead of 1/0.
2585 * c-tree.h (build_external_ref): Update declaration.
2586 * c-typeck.c (build_array_ref): Use true/false instead of 1/0.
2587 (build_external_ref): Change the type of a parameter to bool.
2588 (parser_build_binary_op): Use true/false instead of 1/0.
2589 (pointer_diff): Likewise.
2590 (build_modify_expr): Likewise.
2591 (set_designator): Change the type of a parameter to bool.
2592 (set_init_index): Use true/false instead of 1/0.
2593 (set_init_label): Likewise.
2594 (output_init_element): Change the type of a parameter to bool.
2595 (output_pending_init_elements): Use true/false instead of 1/0.
2596 (process_init_element): Likewise.
2597 (build_binary_op): Change the type of a parameter to bool.
2598
296c53ac
MP
25992017-08-09 Marek Polacek <polacek@redhat.com>
2600
2601 PR c/81233
2602 * c-typeck.c (pedwarn_init): Make the function take a variable list.
2603 Call emit_diagnostic_valist instead of pedwarn.
2604 (convert_for_assignment): Unroll the PEDWARN_FOR_ASSIGNMENT macro.
2605 Print the relevant types in diagnostics.
2606
a32c8316
MP
26072017-08-09 Marek Polacek <polacek@redhat.com>
2608
2609 PR c/81417
2610 * c-array-notation.c (fix_builtin_array_notation_fn): Update calls to
ab20d992 2611 build_conditional_expr.
a32c8316
MP
2612 * c-parser.c (c_parser_conditional_expression): Create locations for
2613 EXP1 and EXP2 from their source ranges. Pass the locations down to
2614 build_conditional_expr.
2615 * c-tree.h (build_conditional_expr): Update declaration.
2616 * c-typeck.c (build_conditional_expr): Add location_t parameters.
2617 For -Wsign-compare, also print the types.
2618
314e6352
ML
26192017-08-08 Martin Liska <mliska@suse.cz>
2620
2621 * c-convert.c: Include header files.
2622 * c-typeck.c: Likewise.
2623
577eec56
ML
26242017-08-07 Martin Liska <mliska@suse.cz>
2625
2626 * c-parser.c (c_parser_attributes): Canonicalize name of an
2627 attribute.
2628
f7b6353a
MP
26292017-08-02 Marek Polacek <polacek@redhat.com>
2630
2631 PR c/81289
2632 * c-parser.c (c_parser_unary_expression): Use set_error.
2633
8a6eab34
MP
2634 PR c/81448
2635 PR c/81306
2636 * c-warn.c (warn_for_multistatement_macros): Prevent bogus
2637 warnings. Avoid walking MACRO_MAP_LOCATIONS.
2638
ab20d992 26392017-07-31 Jan Hubicka <hubicka@ucw.cz>
7fef86d3
JH
2640 Martin Liska <mliska@suse.cz>
2641
2642 * c-typeck.c (c_finish_goto_label): Build gimple predict
f7b6353a 2643 statement.
7fef86d3 2644
f34ebeb2
ML
26452017-07-31 Martin Liska <mliska@suse.cz>
2646
2647 PR sanitize/81530
2648 * c-convert.c (convert): Guard condition with flag_sanitize_p
2649 also with current_function_decl non-null equality.
2650 * c-decl.c (grokdeclarator): Likewise.
2651 * c-typeck.c (build_binary_op): Likewise.
2652
8595f67b
MP
26532017-07-25 Marek Polacek <polacek@redhat.com>
2654
2655 * c-decl.c (grokfield): Remove local variable.
2656
d49718d6
MP
26572017-07-25 Marek Polacek <polacek@redhat.com>
2658
2659 PR c/81364
2660 * c-parser.c (c_parser_else_body): Don't warn about multistatement
2661 macro expansion if the body is in { }.
2662 (c_parser_while_statement): Likewise.
2663 (c_parser_for_statement): Likewise.
2664
ff22eb12
NS
26652017-07-18 Nathan Sidwell <nathan@acm.org>
2666
2667 * c-parser.c (c_parser_array_notation): Use TYPE_{MIN,MAX}_VALUE.
2668
eea77d1f
DM
26692017-07-14 David Malcolm <dmalcolm@redhat.com>
2670
2671 * c-decl.c (implicitly_declare): When suggesting a missing
2672 #include, provide a fix-it hint.
2673
b6f43128
DM
26742017-07-06 David Malcolm <dmalcolm@redhat.com>
2675
2676 * c-lang.c (selftest::run_c_tests): Move body to c_family_tests,
2677 and call that instead.
2678 * c-tree.h (selftest::run_c_tests): New decl.
2679
3e2becc4
MP
26802017-06-26 Marek Polacek <polacek@redhat.com>
2681
2682 PR c/80116
2683 * c-parser.c (c_parser_if_body): Set the location of the
2684 body of the conditional after parsing all the labels. Call
2685 warn_for_multistatement_macros.
2686 (c_parser_else_body): Likewise.
2687 (c_parser_switch_statement): Likewise.
2688 (c_parser_while_statement): Likewise.
2689 (c_parser_for_statement): Likewise.
2690 (c_parser_statement): Add a default argument. Save the location
2691 after labels have been parsed.
2692 (c_parser_c99_block_statement): Likewise.
2693
343ae898
RB
26942017-06-19 Richard Biener <rguenther@suse.de>
2695
2696 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
2697 negated _Literals to parse _Literal (int) -1.
2698
45b2222a
ML
26992017-06-13 Martin Liska <mliska@suse.cz>
2700
2701 PR sanitize/78204
2702 * c-convert.c (convert): Use sanitize_flags_p.
2703 * c-decl.c (grokdeclarator): Likewise.
2704 * c-typeck.c (convert_for_assignment): Likewise.
2705 (c_finish_return): Likewise.
2706 (build_binary_op): Likewise.
2707
8ab7005b
JJ
27082017-06-08 Jakub Jelinek <jakub@redhat.com>
2709
2710 PR c/81006
2711 * c-typeck.c (handle_omp_array_sections_1): Convert TYPE_MAX_VALUE
2712 to sizetype before size_binop.
2713
363dc72c
JJ
27142017-06-07 Jakub Jelinek <jakub@redhat.com>
2715
2716 * gimple-parser.c (c_parser_parse_gimple_body): Use TDI_gimple instead
2717 of TDI_generic.
2718
dc949728
MP
27192017-06-06 Marek Polacek <polacek@redhat.com>
2720
2721 PR c/79983
2722 * c-decl.c (start_struct): Use the location of TYPE_STUB_DECL of
2723 ref.
2724 (start_enum): Use the location of TYPE_STUB_DECL of enumtype.
2725
40ffd95f
BE
27262017-06-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
2727
2728 * c-parser.c (c_parser_binary_expression): Implement the
2729 -Wsizeof_pointer_div warning.
2730 (c_parser_postfix_expression): Allow SIZEOF_EXPR as expr.original_code
2731 from a parenthesized expression.
2732 (c_parser_expr_list): Use c_last_sizeof_loc.
2733 * c-tree.h (c_last_sizeof_loc): New external.
2734 * c-typeck.c (c_last_sizeof_loc): New variable.
2735 (c_expr_sizeof_expr, c_expr_sizeof_type): Assign c_last_sizeof_loc.
2736
9fc5e7a4
MM
27372017-05-31 Mikhail Maltsev <maltsevm@gmail.com>
2738
2739 PR testsuite/80580
2740 * gimple-parser.c (c_parser_gimple_if_stmt): Check for empty labels.
2741
f012c8ef
DM
27422017-05-30 David Malcolm <dmalcolm@redhat.com>
2743
2744 * c-objc-common.c (c_tree_printer): Gain bool and const char **
2745 parameters.
2746
3cd211af
MS
27472017-05-24 Martin Sebor <msebor@redhat.com>
2748
2749 PR c/80731
2750 * c-fold.c (c_fully_fold_internal): Adjust.
2751 * c-typeck.c (parser_build_unary_op): Adjust.
2752
fd71a9a2
TS
27532017-05-23 Thomas Schwinge <thomas@codesourcery.com>
2754
2755 * c-parser.c (OACC_KERNELS_CLAUSE_MASK): Add
2756 "PRAGMA_OACC_CLAUSE_NUM_GANGS", "PRAGMA_OACC_CLAUSE_NUM_WORKERS",
2757 "VECTOR_LENGTH".
2758
92fa0f9e
MP
27592017-05-23 Marek Polacek <polacek@redhat.com>
2760
2761 * c-parser.c (c_parser_compound_statement_nostart): Remove redundant
2762 quotes.
2763
d11c168a
JJ
27642017-05-22 Jakub Jelinek <jakub@redhat.com>
2765
2766 * c-fold.c (c_fully_fold_internal): Save the c_fully_fold_internal
2767 result for SAVE_EXPR operand and set SAVE_EXPR_FOLDED_P even if
2768 it returned invariant. Call tree_invariant_p unconditionally
2769 afterwards to decide whether to return expr or op0.
2770
58aca9d9
NS
27712017-05-22 Nathan Sidwell <nathan@acm.org>
2772
2773 * c-decl.c (c_parse_final_cleanups): Drop TDI_tu handling.
2774
7fd549d2
TS
27752017-05-19 Thomas Schwinge <thomas@codesourcery.com>
2776
2777 * c-parser.c (c_parser_omp_clause_default): Handle
2778 "OMP_CLAUSE_DEFAULT_PRESENT".
2779
6ecd2339
BE
27802017-05-18 Bernd Edlinger <bernd.edlinger@hotmail.de>
2781
2782 * config-lang.in (gtfiles): Add c-family/c-format.c.
2783
8a57ecff
NS
27842017-05-18 Nathan Sidwell <nathan@acm.org>
2785
2786 * c-decl.c (pushdecl_top_level): Delete unused function.
2787
6574d78e
MP
27882017-05-18 Marek Polacek <polacek@redhat.com>
2789
2790 * c-decl.c (match_builtin_function_types): Use NULL_TREE instead of 0.
2791 (check_earlier_gotos): Likewise.
2792 (define_label): Likewise.
2793 (pending_xref_error): Likewise.
2794 (smallest_type_quals_location): Likewise.
2795 (grokdeclarator): Likewise.
2796 (grokparms): Likewise.
2797 (identifier_global_value): Likewise.
2798 * c-typeck.c (set_nonincremental_init_from_string): Likewise.
2799 (find_init_member): Likewise.
2800
e3455240
MP
28012017-05-18 Marek Polacek <polacek@redhat.com>
2802
2803 * c-decl.c (start_decl): Use false/true instead of 0/1.
2804 (grokdeclarator): Likewise.
2805 (finish_struct): Likewise.
2806 (start_function): Change the return type to bool. Use false/true
2807 instead of 0/1.
2808 (declspecs_add_qual): Use UNKNOWN_LOCATION instead of 0.
2809 * c-tree.h (start_function): Update.
2810 * c-typeck.c (same_translation_unit_p): Change the return type to bool.
2811 (set_designator): Change the return type to bool. Use false/true
2812 instead of 0/1.
2813
3fa8871b
MP
28142017-05-17 Marek Polacek <polacek@redhat.com>
2815
2816 * c-decl.c: Use NULL_TREE instead of 0 where appropriate.
2817 * c-typeck.c: Likewise.
2818
142473df
MP
28192017-05-17 Marek Polacek <polacek@redhat.com>
2820
2821 PR sanitizer/80659
2822 * c-decl.c (build_compound_literal): Set DECL_ARTIFICIAL and
2823 DECL_IGNORED_P even for non-static compound literals.
2824
1a817418
ML
28252017-05-17 Martin Liska <mliska@suse.cz>
2826
2827 * c-decl.c (c_parse_final_cleanups): Introduce dump_flags_t type and
2828 use it instead of int type.
2829
b2fa0a8b
MP
28302017-05-17 Marek Polacek <polacek@redhat.com>
2831
2832 * c-convert.c (convert): Replace c_save_expr with save_expr. Don't
2833 call c_fully_fold.
2834 (convert) <case COMPLEX_TYPE>: Remove special handling of COMPLEX_TYPEs.
ab20d992 2835 * c-decl.c (grokdeclarator): Replace c_save_expr with save_expr.
b2fa0a8b
MP
2836 * c-fold.c (c_fully_fold_internal): Handle SAVE_EXPR.
2837 * c-parser.c (c_parser_declaration_or_fndef): Replace c_save_expr with
2838 save_expr.
2839 (c_parser_conditional_expression): Likewise.
2840 * c-tree.h (SAVE_EXPR_FOLDED_P): Define.
2841 * c-typeck.c (build_modify_expr): Replace c_save_expr with save_expr.
2842 (process_init_element): Likewise.
2843 (build_binary_op): Likewise.
2844 (handle_omp_array_sections_1): Likewise.
2845
1e47f02b
TS
28462017-05-12 Thomas Schwinge <thomas@codesourcery.com>
2847
2848 * c-parser.c (c_parser_omp_clause_num_gangs)
2849 (c_parser_omp_clause_num_workers)
2850 (c_parser_omp_clause_vector_length): Merge functions into...
2851 (c_parser_oacc_single_int_clause): ... this new function. Adjust
2852 all users.
2853
c24e924f
NS
28542017-05-11 Nathan Sidwell <nathan@acm.org>
2855
2856 * gimple-parser.c: Don't #include tree-dump.h.
2857
c587104e
MM
28582017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
2859
2860 PR testsuite/80580
2861 * gimple-parser.c (c_parser_parse_ssa_name): Validate SSA name base.
2862
67ac9a9d
MM
28632017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
2864
2865 PR testsuite/80580
2866 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
2867 incorrect __MEM syntax.
2868
ac4eb40f
MM
28692017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
2870
2871 PR testsuite/80580
2872 * gimple-parser.c (c_parser_gimple_unary_expression): Check argument
2873 type of unary '*'.
2874
641da50a
NS
28752017-05-09 Nathan Sidwell <nathan@acm.org>
2876
2877 * c-tree.h (pushdecl): Declare.
2878
56d35585
DM
28792017-05-05 David Malcolm <dmalcolm@redhat.com>
2880
2881 * c-decl.c (warn_defaults_to): Replace report_diagnostic
2882 with diagnostic_report_diagnostic.
2883 * c-errors.c (pedwarn_c99): Likewise.
2884 (pedwarn_c90): Likewise.
2885
815d9cc6
XR
28862017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn>
2887
92a285c1 2888 PR c++/80038
815d9cc6
XR
2889 * c-gimplify.c (c_gimplify_expr): Remove calls to
2890 cilk_gimplifY_call_params_in_spawned_fn.
2891
1c4ea66f
DM
28922017-04-25 David Malcolm <dmalcolm@redhat.com>
2893
2894 * c-parser.c (c_parser_struct_or_union_specifier): Add fix-it
2895 hint for removing extra semicolon.
2896
666f7903
JJ
28972017-04-21 Jakub Jelinek <jakub@redhat.com>
2898
2899 PR c/80468
2900 * c-decl.c (finish_declspecs) <case cts_int_n>: If int_n_idx is not
2901 enabled, set specs->type to integer_type_node.
2902
5764ee3c
JW
29032017-04-03 Jonathan Wakely <jwakely@redhat.com>
2904
2905 * c-array-notation.c: Fix typo in comment.
2906
10fa8dfb
MP
29072017-03-29 Marek Polacek <polacek@redhat.com>
2908
2909 PR c/79730
2910 * c-decl.c (finish_decl): Check VAR_P.
2911
a9e4a1a5
JJ
29122017-03-27 Jakub Jelinek <jakub@redhat.com>
2913
2914 PR middle-end/80162
2915 * c-tree.h (c_mark_addressable): Add array_ref_p argument.
2916 * c-typeck.c (c_mark_addressable): Likewise. Look through
2917 VIEW_CONVERT_EXPR unless array_ref_p and VCE is from VECTOR_TYPE
2918 to ARRAY_TYPE.
2919 (build_array_ref): Pass true as array_ref_p to c_mark_addressable.
2920
ee3ff394
MP
29212017-03-23 Marek Polacek <polacek@redhat.com>
2922
2923 * c-tree.h: Remove a C_RID_YYCODE reference.
2924
4d1b8e70
JJ
29252017-03-21 Jakub Jelinek <jakub@redhat.com>
2926
2927 PR c/80097
2928 * c-typeck.c (build_binary_op): Add EXCESS_PRECISION_EXPR only around
2929 optional COMPOUND_EXPR with ubsan instrumentation.
2930
31dc71a8
MP
29312017-03-17 Marek Polacek <polacek@redhat.com>
2932
2933 * c-parser.c: Add C11 references.
2934
d579c385
MP
29352017-03-15 Marek Polacek <polacek@redhat.com>
2936
2937 * c-parser.c (c_parser_enum_specifier): Remove redundant line.
2938
85059a38
MP
29392017-03-11 Marek Polacek <polacek@redhat.com>
2940
2941 * c-decl.c (implicit_decl_warning): Add a comment. Fix formatting.
2942
2f6f187a
DM
29432017-03-10 David Malcolm <dmalcolm@redhat.com>
2944
2945 PR translation/79848
2946 * c-decl.c (declspecs_add_type): Simplify uses of "%<%s%>" to
2947 "%qs".
2948 * c-parser.c (c_parser_oacc_shape_clause): Likewise.
2949
36618428
MP
29502017-03-09 Marek Polacek <polacek@redhat.com>
2951
2952 PR sanitizer/79757
2953 * c-parser.c (c_parser_declaration_or_fndef): Don't sanitize old-style
2954 parameter declarations with initializers.
2955
01e5af5a
JJ
29562017-03-09 Jakub Jelinek <jakub@redhat.com>
2957
2958 PR c/79969
2959 * c-decl.c (start_enum): Adjust DECL_SOURCE_LOCATION of
2960 TYPE_STUB_DECL.
2961
a71dbc63
JJ
29622017-03-07 Jakub Jelinek <jakub@redhat.com>
2963
2964 PR c/79834
2965 * c-parser.c (c_parser_pragma): Use error_at instead of c_parser_error
2966 for "may only be used in compound statements" diagnostics, change it
2967 such that the same translatable string is used for all pragmas. For
2968 PRAGMA_OACC_WAIT use "acc wait" rather than "acc enter data" in the
2969 diagnostics.
2970 (c_parser_omp_cancellation_point, c_parser_omp_target_update,
2971 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Change
2972 "may only be used in compound statements" diagnostics, such that the
2973 same translatable string is used for all pragmas.
2974
1ff4bae6
MP
29752017-03-04 Marek Polacek <polacek@redhat.com>
2976
2977 PR c/79847
2978 * c-decl.c (implicit_decl_warning): Add missing space.
2979
7f5a7d78
MP
29802017-03-03 Marek Polacek <polacek@redhat.com>
2981
2982 PR c/79758
2983 * c-decl.c (store_parm_decls_oldstyle): Check if the element of
2984 current_function_prototype_arg_types is error_mark_node. Fix
2985 formatting. Use TREE_VALUE instead of TREE_TYPE.
2986
883c8f06
JJ
29872017-03-03 Jakub Jelinek <jakub@redhat.com>
2988
79c9b7a8
JJ
2989 PR c/79837
2990 * c-parser.c (c_parser_omp_clause_reduction): Don't mention
2991 %<min%> or %<max%> in the diagnostics, instead mention identifier.
2992 (c_parser_omp_declare_reduction): Don't mention %<min%> in the
2993 diagnostics.
2994
883c8f06
JJ
2995 PR c/79836
2996 * c-parser.c (c_parser_generic_selection): Use %<_Generic%>
2997 instead of %<_Generic>.
2998 (c_parser_omp_ordered): Use %<depend%> instead of %<depend>.
2999 (c_parser_omp_target_exit_data): Use %<release%> instead of
3000 %<release>.
3001
324ff1a0
JJ
30022017-02-28 Jakub Jelinek <jakub@redhat.com>
3003
3004 * c-parser.c (c_parser_asm_statement): Use cond ? G_("...") : G_("...")
3005 instead of just cond ? "..." : "...".
3006 (c_parser_oacc_enter_exit_data): Use %s and ternary operator only
3007 for "enter"/"exit" keyword.
3008 (c_finish_oacc_routine): Don't use %s to supply portions of the
3009 message.
3010
4227c9ad
JJ
30112017-02-24 Jakub Jelinek <jakub@redhat.com>
3012
3013 PR c++/79588
3014 * c-parser.c (c_parser_postfix_expression_after_primary): Don't
3015 handle -Wrestrict here.
3016 * c-typeck.c (build_function_call_vec): Adjust
3017 check_function_arguments caller.
3018
5d972e66
RB
30192017-02-23 Richard Biener <rguenther@suse.de>
3020
3021 PR c/79684
3022 * gimple-parser.c (c_parser_gimple_statement): Use set_error
3023 to initialize c_exprs to return.
3024 (c_parser_gimple_binary_expression): Likewise.
3025 (c_parser_gimple_unary_expression): Likewise.
3026 (c_parser_gimple_postfix_expression): Likewise.
3027
61ac5ebe
MP
30282017-02-22 Marek Polacek <polacek@redhat.com>
3029
3030 PR c/79662
3031 * c-typeck.c (convert_arguments): Handle error_mark_node.
3032
41d1b0b1
PK
30332017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3034
3035 * gimple-parser.c (c_parser_gimple_postfix_expression): Check return
3036 value of c_parser_parse_ssa_name against error_mark_node and emit
3037 error if ssa name is anonymous and written as default definition.
3038
eab1f169
PK
30392017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3040
3041 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
3042 FMA_EXPR.
3043
bcac0b4d
JJ
30442017-02-16 Jakub Jelinek <jakub@redhat.com>
3045
3046 PR c++/79512
3047 * c-parser.c (c_parser_omp_target): For -fopenmp-simd
3048 ignore #pragma omp target even when not followed by identifier.
3049
1be33173
PK
30502017-02-14 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3051
3052 * gimpler-parser.c (c_parser_gimple_statement): Handle ABS_EXPR.
3053 (c_parser_gimple_unary_expression): Likewise.
3054
aa326bfb
JJ
30552017-02-13 Jakub Jelinek <jakub@redhat.com>
3056
3057 * c-parser.c (c_parser_oacc_declare): Add missing space in
3058 diagnostics.
3059
8a398bc5
PK
30602017-02-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3061
3062 PR c/79478
3063 * gimple-parser.c (c_parser_gimple_postfix_expression): Call
3064 set_c_expr_source_range when parsing ssa-name.
3065
3dcde5ef 30662017-02-10 Prasad Ghangal <prasad.ghangal@gmail.com>
ab20d992 3067 Richard Biener <rguenther@suse.de>
3dcde5ef
PG
3068
3069 * gimple-parser.c (c_parser_gimple_binary_expression): Avoid
3070 building IL when arguments are error_mark_node.
3071 (c_parser_gimple_unary_expression): Likewise.
3072 (c_parser_gimple_if_stmt): Likewise.
3073 (c_parser_gimple_switch_stmt): Likewise.
3074 (c_parser_gimple_return_stmt): Likewise.
3075 (c_parser_parse_ssa_name): When name lookup fails do not build
3076 an SSA name. Use undeclared rather than not declared in error
3077 reporting.
3078
192b048b
MP
30792017-02-09 Marek Polacek <polacek@redhat.com>
3080
3081 PR c/79428
3082 * c-parser.c (c_parser_omp_ordered): Call c_parser_skip_to_pragma_eol
3083 instead of c_parser_skip_until_found.
3084
56f71478
JJ
30852017-02-09 Jakub Jelinek <jakub@redhat.com>
3086
3087 PR c/79431
3088 * c-parser.c (c_parser_omp_declare_target): Don't invoke
3089 symtab_node::get on automatic variables.
3090
02889d23
CLT
30912016-02-09 Nathan Sidwell <nathan@codesourcery.com>
3092 Chung-Lin Tang <cltang@codesourcery.com>
3093
3094 * c-parser.c (c_parser_omp_clause_collapse): Disallow tile.
3095 (c_parser_oacc_clause_tile): Disallow collapse. Fix parsing and
3096 semantic checking.
3097 * c-parser.c (c_parser_omp_for_loop): Accept tiling constructs.
3098
7af4b20d
RB
30992017-02-07 Richard Biener <rguenther@suse.de>
3100
3101 * gimple-parser.c (c_parser_gimple_expr_list): Simplify.
3102 (c_parser_gimple_postfix_expression_after_primary):
3103 Do not use c_build_function_call_vec to avoid folding and promotion.
3104 Simplify.
3105
e5e391d6
MO
31062017-01-25 Maxim Ostapenko <m.ostapenko@samsung.com>
3107
3108 PR lto/79061
3109 * c-decl.c (pop_scope): Pass main_input_filename to
3110 build_translation_unit_decl.
3111
c2e84327
DM
31122017-01-24 David Malcolm <dmalcolm@redhat.com>
3113
3114 * c-parser.c: Include "read-rtl-function.h" and
3115 "run-rtl-passes.h".
3116 (c_parser_declaration_or_fndef): Rename "gimple-pass-list" in
3117 grammar to gimple-or-rtl-pass-list. Add rtl-function-definition
3118 production. Update for renaming of field "gimple_pass" to
3119 "gimple_or_rtl_pass". If __RTL was seen, call
3120 c_parser_parse_rtl_body. Convert a timevar_push/pop pair
3121 to an auto_timevar, to cope with early exit.
3122 (c_parser_declspecs): Update RID_GIMPLE handling for renaming of
3123 field "gimple_pass" to "gimple_or_rtl_pass", and for renaming of
3124 c_parser_gimple_pass_list to c_parser_gimple_or_rtl_pass_list.
3125 Handle RID_RTL.
3126 (c_parser_parse_rtl_body): New function.
3127 * c-tree.h (enum c_declspec_word): Add cdw_rtl.
3128 (struct c_declspecs): Rename field "gimple_pass" to
3129 "gimple_or_rtl_pass". Add field "rtl_p".
3130 * gimple-parser.c (c_parser_gimple_pass_list): Rename to...
3131 (c_parser_gimple_or_rtl_pass_list): ...this, updating accordingly.
3132 * gimple-parser.h (c_parser_gimple_pass_list): Rename to...
3133 (c_parser_gimple_or_rtl_pass_list): ...this.
3134
2ebd93e1
MP
31352017-01-20 Marek Polacek <polacek@redhat.com>
3136
3137 PR c/64279
3138 * c-typeck.c (build_conditional_expr): Warn about duplicated branches.
3139
b1c95bb5
RB
31402017-01-13 Richard Biener <rguenther@suse.de>
3141
3142 * gimple-parser.c (c_parser_gimple_compound_statement): Handle
3143 nops.
3144
25329913
RB
31452017-01-13 Richard Biener <rguenther@suse.de>
3146
3147 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
3148 _Literal ( type-name ) number.
3149
6bb4ea5c
RB
31502017-01-12 Richard Biener <rguenther@suse.de>
3151
3152 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
3153 __MEM.
3154
6b5b4e9c
JJ
31552017-01-11 Jakub Jelinek <jakub@redhat.com>
3156
3157 PR c++/72813
3158 * c-decl.c (pop_file_scope): Set flag_syntax_only to 1 after writing
3159 PCH file.
3160
e3252775
RB
31612017-01-11 Richard Biener <rguenther@suse.de>
3162
3163 PR bootstrap/79052
3164 * gimple-parser.c (c_parser_gimple_switch_stmt): Add missing
3165 returns on parse errors.
3166
a9342885
MP
31672017-01-04 Marek Polacek <polacek@redhat.com>
3168
3169 PR c++/64767
3170 * c-parser.c (c_parser_postfix_expression): Mark zero character
3171 constants by setting original_type in c_expr.
3172 * c-typeck.c (parser_build_binary_op): Warn when a pointer is compared
3173 with a zero character constant.
3174 (char_type_p): New function.
3175
5dd9a9d0
DM
31762017-01-04 David Malcolm <dmalcolm@redhat.com>
3177
3178 * c-parser.c (c_parser_declaration_or_fndef): Create a
3179 rich_location at init_loc and parse it to start_init.
3180 (last_init_list_comma): New global.
3181 (c_parser_braced_init): Update last_init_list_comma when parsing
3182 commas. Pass it to pop_init_level. Pass location of closing
3183 brace to pop_init_level.
3184 (c_parser_postfix_expression_after_paren_type): Create a
3185 rich_location at type_loc and parse it to start_init.
3186 (c_parser_omp_declare_reduction): Likewise for loc.
3187 * c-tree.h (start_init): Add rich_location * param.
3188 (pop_init_level): Add location_t param.
3189 * c-typeck.c (struct initializer_stack): Add field
3190 "missing_brace_richloc".
3191 (start_init): Add richloc param, use it to initialize
3192 the stack node's missing_brace_richloc.
3193 (last_init_list_comma): New decl.
3194 (finish_implicit_inits): Pass last_init_list_comma to
3195 pop_init_level.
3196 (push_init_level): When finding missing open braces, add fix-it
3197 hints to the richloc.
3198 (pop_init_level): Add "insert_before" param and pass it
3199 when calling pop_init_level. Add fixits about missing
3200 close braces to any richloc. Use the richloc for the
3201 -Wmissing-braces warning.
3202 (set_designator): Pass last_init_list_comma to pop_init_level.
3203 (process_init_element): Likewise.
3204
cbe34bb5
JJ
32052017-01-01 Jakub Jelinek <jakub@redhat.com>
3206
3207 Update copyright years.
3208
d17680f3
JJ
32092016-12-21 Jakub Jelinek <jakub@redhat.com>
3210
0dba7960
JJ
3211 PR bootstrap/78817
3212 * c-typeck.c (build_function_call_vec): If check_function_arguments
3213 returns true, set TREE_NO_WARNING on CALL_EXPR.
3214
d17680f3
JJ
3215 PR c/77767
3216 * c-decl.c (grokdeclarator): If *expr is non-NULL, append expression
3217 to *expr instead of overwriting it.
3218
aa90531e
RB
32192016-12-20 Richard Biener <rguenther@suse.de>
3220
3221 * gimple-parser.c (c_parser_gimple_compound_statement): Improve
3222 error recovery.
3223 (c_parser_gimple_statement): Only build assigns for non-error
3224 stmts.
3225 (c_parser_gimple_postfix_expression_after): Improve error recovery.
3226
629b3d75
MJ
32272016-12-14 Martin Jambor <mjambor@suse.cz>
3228
3229 * c-parser.c: Include omp-general.h and omp-offload.h instead of
3230 omp-low.h.
3231 (c_finish_oacc_routine): Adjusted call to
3232 get_oacc_fn_attrib, build_oacc_routine_dims and replace_oacc_fn_attrib
3233 to use their new names.
3234 (c_parser_oacc_enter_exit_data): Adjusted call to find_omp_clause to
3235 use its new name.
3236 (c_parser_oacc_update): Likewise.
3237 (c_parser_omp_simd): Likewise.
3238 (c_parser_omp_target_update): Likewise.
3239 * c-typeck.c: Include omp-general.h instead of omp-low.h.
3240 (c_finish_omp_cancel): Adjusted call to find_omp_clause to use its new
3241 name.
3242 (c_finish_omp_cancellation_point): Likewise.
3243 * gimple-parser.c: Do not include omp-low.h
3244
c5af52eb
CP
32452016-12-02 Cesar Philippidis <cesar@codesourcery.com>
3246 James Norris <jnorris@codesourcery.com>
3247
3248 * c-parser.c (c_parser_pragma): Error when PRAGMA_OACC_{ENTER_DATA,
3249 EXIT_DATA,WAIT} are not used in compound statements.
3250 (c_parser_oacc_enter_exit_data): Update diagnostics.
3251
48330c93
BE
32522016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
3253
3254 PR c++/71973
3255 * c-decl.c (diagnose_mismatched_decls): Use
3256 OPT_Wbuiltin_declaration_mismatch here too.
3257
899ca90e 32582016-11-18 Richard Sandiford <richard.sandiford@arm.com>
48330c93
BE
3259 Alan Hayward <alan.hayward@arm.com>
3260 David Sherwood <david.sherwood@arm.com>
899ca90e
RS
3261
3262 * c-decl.c (merge_decls): Use SET_DECL_MODE.
3263 (make_label, finish_struct): Likewise.
3264
1ee62b92 32652016-11-14 Prasad Ghangal <prasad.ghangal@gmail.com>
8e745a17 3266 Richard Biener <rguenther@suse.de>
22b15758 3267
8e745a17
JJ
3268 * Make-lang.in (C_AND_OBJC_OBJS): Add gimple-parser.o.
3269 * config-lang.in (gtfiles): Add c/c-parser.h.
3270 * c-tree.h (enum c_declspec_word): Add cdw_gimple.
3271 (struct c_declspecs): Add gimple_pass member and gimple_p flag.
3272 * c-parser.c (enum c_id_kind, struct c_token,
3273 c_parser_next_token_is, c_parser_next_token_is_not,
3274 c_parser_next_token_is_keyword,
3275 enum c_lookahead_kind, enum c_dtr_syn, enum c_parser_prec):
3276 Split out to ...
3277 * c-parser.h: ... new header.
3278 * c-parser.c: Include c-parser.h and gimple-parser.h.
1ee62b92 3279 (c_parser_peek_token, c_parser_peek_2nd_token,
8e745a17
JJ
3280 c_token_starts_typename, c_parser_next_token_starts_declspecs,
3281 c_parser_next_tokens_start_declaration, c_parser_consume_token,
3282 c_parser_error, c_parser_require, c_parser_skip_until_found,
3283 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
3284 c_parser_type_name): Export.
3285 (c_parser_tokens_buf): New function.
3286 (c_parser_error): Likewise.
3287 (c_parser_set_error): Likewise.
3288 (c_parser_declspecs): Handle RID_GIMPLE.
1ee62b92
PG
3289 (c_parser_declaration_or_fndef): Parse __GIMPLE marked body
3290 via c_parser_parse_gimple_body.
8e745a17
JJ
3291 * c-parser.h (c_parser_peek_token, c_parser_peek_2nd_token,
3292 c_token_starts_typename, c_parser_next_token_starts_declspecs,
3293 c_parser_next_tokens_start_declaration, c_parser_consume_token,
3294 c_parser_error, c_parser_require, c_parser_skip_until_found,
3295 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
3296 c_parser_type_name): Declare.
1ee62b92
PG
3297 (struct c_parser): Declare forward.
3298 (c_parser_tokens_buf): Declare.
8e745a17
JJ
3299 (c_parser_error): Likewise.
3300 (c_parser_set_error): Likewise.
3301 * gimple-parser.c: New file.
3302 * gimple-parser.h: Likewise.
1ee62b92 3303
22b15758
UB
33042016-11-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3305
3306 PR c/35503
3307 * c-parser.c (c_parser_postfix_expression_after_primary): Call
3308 warn_for_restrict.
3309
84ff4775
LCW
33102016-09-11 Le-Chun Wu <lcwu@google.com>
3311 Mark Wielaard <mjw@redhat.com>
3312
3313 * c-decl.c (warn_if_shadowing): Use the warning code corresponding
3314 to the given -Wshadow= variant.
3315
4d0cdd0c
TP
33162016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
3317
3318 * c-typeck.c: Include memmodel.h.
3319
1202f33e
JJ
33202016-10-13 Jakub Jelinek <jakub@redhat.com>
3321
3322 PR target/77957
3323 * c-objc-common.h (LANG_HOOKS_GETDECLS): Use hook_tree_void_null
3324 instead of lhd_return_null_tree_v.
3325
8a14afd0
BS
33262016-10-07 Bernd Schmidt <bschmidt@redhat.com>
3327
3328 PR c++/69733
3329 * c-decl.c (smallest_type_quals_location): New static function.
3330 (grokdeclarator): Try to find the correct location for an ignored
3331 qualifier.
3332
81fea426
MP
33332016-09-26 Marek Polacek <polacek@redhat.com>
3334
3335 PR c/7652
3336 * c-decl.c (pop_scope): Add gcc_fallthrough.
3337
33382016-09-26 Marek Polacek <polacek@redhat.com>
3339
3340 PR c/7652
3341 * c-parser.c (struct c_token): Add flags field.
3342 (c_lex_one_token): Pass it to c_lex_with_flags.
3343 (c_parser_declaration_or_fndef): Turn __attribute__((fallthrough));
3344 into IFN_FALLTHROUGH.
3345 (c_parser_label): Set FALLTHROUGH_LABEL_P on labels. Handle
3346 attribute fallthrough after a case label or default label.
3347 (c_parser_statement_after_labels): Handle RID_ATTRIBUTE.
3348
9a2300e9
MP
33492016-09-24 Marek Polacek <polacek@redhat.com>
3350
3351 PR c/77490
3352 * c-typeck.c (build_unary_op): Warn about bit not on expressions that
3353 have boolean value. Warn about ++/-- on booleans.
3354
7de76362
JJ
33552016-09-23 Jakub Jelinek <jakub@redhat.com>
3356
3357 * c-parser.c (incomplete_record_decls): Remove unnecessary
3358 = vNULL initialization of file scope vec.
3359
5b73d2ab
MP
33602016-09-16 Marek Polacek <polacek@redhat.com>
3361
3362 * c-typeck.c (lvalue_p): Use true and false instead of 1 and 0.
3363
e51fbec3
MP
33642016-09-14 Marek Polacek <polacek@redhat.com>
3365
3366 * c-array-notation.c (create_cmp_incr): Use false instead of 0.
3367 (fix_array_notation_expr): Likewise.
3368 * c-decl.c (finish_decl): Likewise.
3369 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
3370 * c-typeck.c (array_to_pointer_conversion): Use true instead of 1.
3371 (function_to_pointer_conversion): Use false instead of 0.
3372 (convert_lvalue_to_rvalue): Likewise.
3373 (parser_build_unary_op): Likewise.
3374 (build_atomic_assign): Likewise.
3375 (build_unary_op): Change nonconvert parameter type to bool, use
3376 true/false instead of 1/0.
3377 (build_binary_op): Use true instead of 1.
3378
254830ba
DM
33792016-09-13 David Malcolm <dmalcolm@redhat.com>
3380
3381 * c-parser.c (c_parser_declaration_or_fndef): Update for renaming
3382 of add_fixit_insert to add_fixit_insert_before.
3383
4c13ba17
MP
33842016-09-13 Marek Polacek <polacek@redhat.com>
3385
3386 * c-typeck.c (build_unary_op): Rename FLAG parameter to NOCONVERT. Use
3387 it.
3388
54dcdb88
BE
33892016-09-12 Bernd Edlinger <bernd.edlinger@hotmail.de>
3390
3391 PR c++/77496
3392 * c-parser.c (c_parser_conditional_expression): Pass the rightmost
3393 COMPOUND_EXPR to warn_for_omitted_condop.
3394
e5106e27
DM
33952016-09-07 David Malcolm <dmalcolm@redhat.com>
3396
3397 * c-lang.c (LANG_HOOKS_GET_SUBSTRING_LOCATION): Use
3398 c_get_substring_location for this new langhook.
3399
9dc5773f
JJ
34002016-09-02 Jakub Jelinek <jakub@redhat.com>
3401
3402 PR c/65467
3403 * c-parser.c (c_parser_declspecs): Don't sorry about _Atomic if
3404 flag_openmp.
3405 (c_parser_omp_variable_list): Use convert_lvalue_to_rvalue
3406 instead of mark_exp_read on low_bound/length expression.
3407 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_threads,
3408 c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
3409 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
3410 c_parser_omp_clause_num_workers, c_parser_oacc_shape_clause,
3411 c_parser_oacc_clause_tile, c_parser_omp_clause_schedule,
3412 c_parser_omp_clause_vector_length, c_parser_omp_clause_num_teams,
3413 c_parser_omp_clause_thread_limit, c_parser_omp_clause_aligned,
3414 c_parser_omp_clause_linear, c_parser_omp_clause_safelen,
3415 c_parser_omp_clause_simdlen, c_parser_omp_clause_device,
3416 c_parser_omp_clause_dist_schedule): Use convert_lvalue_to_rvalue
3417 instead of mark_expr_read.
3418 (c_parser_omp_declare_reduction): Reject _Atomic qualified types.
3419 * c-objc-common.h (LANG_HOOKS_OMP_CLAUSE_COPY_CTOR,
3420 LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP): Redefine.
3421 * c-tree.h (c_omp_clause_copy_ctor): New prototype.
3422 * c-typeck.c (handle_omp_array_sections_1): Diagnose _Atomic qualified
3423 array section bases outside of depend clause, for depend clause
3424 use convert_lvalue_to_rvalue on the base.
3425 (c_finish_omp_clauses): Reject _Atomic qualified vars in reduction,
3426 linear, aligned, map, to and from clauses.
3427 (c_omp_clause_copy_ctor): New function.
3428
295844f6
MP
34292016-09-01 Marek Polacek <polacek@redhat.com>
3430
3431 PR c/7652
3432 * c-typeck.c (composite_type): Add FALLTHRU comment.
3433
089af25c
DM
34342016-08-31 David Malcolm <dmalcolm@redhat.com>
3435
3436 * c-parser.c (c_parser_declaration_or_fndef): Add trailing space
3437 to the insertion fixits for "struct", "union", and "enum".
3438
f9087798
DM
34392016-08-30 David Malcolm <dmalcolm@redhat.com>
3440
3441 * c-decl.c (implicit_decl_warning): Use add_fixit_replace
3442 rather than add_fixit_misspelled_id.
3443 (undeclared_variable): Likewise.
3444 * c-parser.c (c_parser_declaration_or_fndef): Likewise. Remove
3445 now-redundant "here" params from add_fixit_insert method calls.
3446 (c_parser_parameter_declaration): Likewise.
3447 * c-typeck.c (build_component_ref): Remove now-redundant range
3448 param from add_fixit_replace method calls.
3449
ebef225f
MP
34502016-08-25 Marek Polacek <polacek@redhat.com>
3451
3452 * c-typeck.c (parser_build_binary_op): Pass LHS to
3453 warn_logical_not_parentheses.
3454
fe377a48
MP
34552016-08-25 Marek Polacek <polacek@redhat.com>
3456
3457 PR c/77323
3458 * c-decl.c (declspecs_add_type): Set typespec_word even when __intN
3459 or _FloatN or _FloatNx is not supported.
3460 (finish_declspecs): Set type to integer_type_node when _FloatN or
3461 _FloatNx is not supported.
3462
c65699ef
JM
34632016-08-19 Joseph Myers <joseph@codesourcery.com>
3464
3465 PR c/32187
3466 * c-tree.h (cts_floatn_nx): New enum c_typespec_keyword value.
3467 (struct c_declspecs): Add field floatn_nx_idx.
3468 * c-decl.c (declspecs_add_type, finish_declspecs): Handle _FloatN
3469 and _FloatNx type specifiers.
3470 * c-parser.c (c_keyword_starts_typename, c_token_starts_declspecs)
3471 (c_parser_declspecs, c_parser_attribute_any_word)
3472 (c_parser_objc_selector): Use CASE_RID_FLOATN_NX.
3473 * c-typeck.c (c_common_type): Handle _FloatN and _FloatNx types.
3474 (convert_arguments): Avoid promoting _FloatN and _FloatNx types
3475 narrower than double.
3476
2f1364c2
JJ
34772016-08-12 Jakub Jelinek <jakub@redhat.com>
3478 Martin Liska <mliska@suse.cz>
3479
3480 PR c/67410
3481 * c-typeck.c (set_nonincremental_init_from_string): Use / instead of
3482 % to determine val element to change. Assert that
3483 wchar_bytes * charwidth fits into val array.
3484
191816a3
MP
34852016-08-12 Marek Polacek <polacek@redhat.com>
3486
3487 PR c/7652
3488 * c-parser.c (c_parser_external_declaration): Add FALLTHRU.
3489 (c_parser_postfix_expression): Likewise.
3490 * c-typeck.c (build_unary_op): Adjust fall through comment.
3491 (c_mark_addressable): Likewise.
3492
b95a64bb
JJ
34932016-08-11 Jakub Jelinek <jakub@redhat.com>
3494
3495 PR c/72816
3496 * c-decl.c (grokdeclarator): When adding TYPE_DOMAIN for flexible
3497 array member through typedef, for orig_qual_indirect == 0 clear
3498 orig_qual_type.
3499
895aa8e1
DM
35002016-08-08 David Malcolm <dmalcolm@redhat.com>
3501
3502 PR c/64955
3503 * c-lang.c (LANG_HOOKS_RUN_LANG_SELFTESTS): If CHECKING_P, wire
3504 this up to selftest::run_c_tests.
3505 (selftest::run_c_tests): New function.
3506
0b212d8c
TS
35072016-08-04 Thomas Schwinge <thomas@codesourcery.com>
3508
ae9281fc
TS
3509 * c-parser.c (struct oacc_routine_data): Add error_seen and
3510 fndecl_seen members.
3511 (c_finish_oacc_routine): Use these.
3512 (c_parser_declaration_or_fndef): Adjust.
3513 (c_parser_oacc_routine): Likewise. Support more C language
3514 constructs, and improve diagnostics. Move pragma context
3515 checking...
3516 (c_parser_pragma): ... here.
3517
0b212d8c
TS
3518 * c-parser.c (struct oacc_routine_data): New.
3519 (c_parser_declaration_or_fndef, c_parser_oacc_routine): Use it.
3520 Simplify code.
3521 (c_finish_oacc_routine): Likewise. Don't attach clauses to "omp
3522 declare target" attribute.
3523
76e2c821
JB
35242016-08-01 Jan Beulich <jbeulich@suse.com>
3525
3526 * c-fold.c (c_fully_fold_internal): Also emit shift count
3527 warnings for vector types.
3528 * c-typeck.c (build_binary_op): Likewise.
3529
f618a472
MP
35302016-07-29 Marek Polacek <polacek@redhat.com>
3531
3532 PR c/71742
3533 * c-decl.c (finish_struct): Rephrase an error message.
3534
efd0786f
MP
3535 PR c/71853
3536 * c-parser.c (c_parser_switch_statement): Initialize ce.original_type
3537 to error node for invalid code.
3538
e00dceaf
MP
3539 PR c/71573
3540 * c-decl.c (implicitly_declare): Return decl early not only for
3541 error_mark_nodes, but for anything that is not a FUNCTION_DECL.
3542
673a107a
JJ
35432016-07-29 Jakub Jelinek <jakub@redhat.com>
3544
3545 PR c/71969
3546 * c-decl.c (finish_function): Only set DECL_DISREGARD_INLINE_LIMITS
3547 on GNU extern inline functions.
3548
a5b5c8b6
MP
35492016-07-29 Marek Polacek <polacek@redhat.com>
3550
3551 PR c/71583
3552 * c-parser.c (c_parser_postfix_expression_after_paren_type): Also
3553 check expr.value.
3554
e3fe09c1
UB
35552016-07-22 Uros Bizjak <ubizjak@gmail.com>
3556
3557 * c-typeck.c: Use HOST_WIDE_INT_1 instead of (HOST_WIDE_INT) 1,
3558
7c8f7eaa
DM
35592016-07-20 David Malcolm <dmalcolm@redhat.com>
3560
3561 * c-decl.c (struct edit_distance_traits<cpp_hashnode *>): Move to
3562 spellcheck-tree.h
3563 (best_macro_match): Likewise, converting from a typedef to a
3564 subclass.
3565 (find_closest_macro_cpp_cb): Move to spellcheck-tree.c.
3566 (lookup_name_fuzzy): Update for change of best_macro_match to a
3567 subclass with a ctor that calls cpp_forall_identifiers.
3568
de6a69ee
DM
35692016-07-20 David Malcolm <dmalcolm@redhat.com>
3570
3571 * c-decl.c (implicit_decl_warning): Update for conversion of
3572 return type of lookup_name_fuzzy to const char *.
3573 (undeclared_variable): Likewise.
3574 (lookup_name_fuzzy): Convert return type from tree to
3575 const char *.
3576 * c-parser.c (c_parser_declaration_or_fndef): Update for
3577 conversion of return type of lookup_name_fuzzy to const char *.
3578 (c_parser_parameter_declaration): Likewise.
3579
b1c9c068
CP
35802016-07-15 Cesar Philippidis <cesar@codesourcery.com>
3581
3582 * c-parser.c (c_parser_oacc_declare): Don't scan for
3583 GOMP_MAP_POINTER.
3584 * c-typeck.c (handle_omp_array_sections): Mark data clauses with
3585 GOMP_MAP_FORCE_{PRESENT,TO,FROM,TOFROM} as potentially having
3586 zero-length subarrays.
3587
ddbbcb19
JJ
35882016-07-15 Jakub Jelinek <jakub@redhat.com>
3589
3590 PR c/71858
3591 * c-decl.c (implicit_decl_warning): Use FUZZY_LOOKUP_FUNCTION_NAME
3592 instead of FUZZY_LOOKUP_NAME.
3593 (lookup_name_fuzzy): For FUZZY_LOOKUP_FUNCTION_NAME consider
3594 FUNCTION_DECLs, {VAR,PARM}_DECLs function pointers and macros.
3595
dd36b877
JJ
35962016-07-14 Jakub Jelinek <jakub@redhat.com>
3597
3598 PR c/71858
3599 * c-decl.c (lookup_name_fuzzy): Ignore binding->invisible.
3600
8c681247
TS
36012016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
3602
3603 * c-parser.c (c_parser_generic_selection): Make type of variable
3604 auto_vec.
3605 (c_parser_omp_declare_simd): Likewise.
3606
bf4fa671
TS
36072016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
3608
3609 * c-decl.c (struct c_struct_parse_info): Change member types
3610 from vec to auto_vec.
3611 (start_struct): Adjust.
3612 (finish_struct): Likewise.
3613
557e8c49
JJ
36142016-07-02 Jakub Jelinek <jakub@redhat.com>
3615
3616 PR c/71719
3617 * c-typeck.c (mark_exp_read): Handle VIEW_CONVERT_EXPR.
3618
54d19c3b
TS
36192016-06-29 Thomas Schwinge <thomas@codesourcery.com>
3620
3621 * c-parser.c (c_parser_pragma) <PRAGMA_OMP_CANCELLATION_POINT>:
3622 Move pragma context checking into...
3623 (c_parser_omp_cancellation_point): ... here, and improve
3624 diagnostic messages.
3625 * c-typeck.c (c_finish_omp_cancel)
3626 (c_finish_omp_cancellation_point): Improve diagnostic messages.
3627
152ef731
JJ
36282016-06-29 Jakub Jelinek <jakub@redhat.com>
3629
3630 PR c/71685
3631 * c-typeck.c (c_build_qualified_type): Don't clear
3632 C_TYPE_INCOMPLETE_VARS for the main variant.
3633
36342016-06-28 Martin Sebor <msebor@redhat.com>
4378d117
MS
3635
3636 PR c/71552
3637 * c-typeck.c (output_init_element): Diagnose incompatible types
3638 before non-constant initializers.
3639
e9ac1f86
JJ
36402016-06-28 Jakub Jelinek <jakub@redhat.com>
3641
3642 * Make-lang.in: Don't cat ../stage_current if it does not exist.
3643
277d7ee0
AK
36442016-06-23 Andi Kleen <ak@linux.intel.com>
3645
3646 * Make-lang.in: Add support for autofdo.
3647
1a4f11c8
DM
36482016-06-22 David Malcolm <dmalcolm@redhat.com>
3649
3650 PR c/70339
3651 * c-decl.c: Include spellcheck-tree.h and gcc-rich-location.h.
3652 (implicit_decl_warning): When issuing warnings for implicit
3653 declarations, attempt to provide a suggestion via
3654 lookup_name_fuzzy.
3655 (undeclared_variable): Likewise when issuing errors.
3656 (lookup_name_in_scope): Likewise.
3657 (struct edit_distance_traits<cpp_hashnode *>): New struct.
3658 (best_macro_match): New typedef.
3659 (find_closest_macro_cpp_cb): New function.
3660 (lookup_name_fuzzy): New function.
3661 * c-parser.c: Include gcc-rich-location.h.
3662 (c_token_starts_typename): Split out case CPP_KEYWORD into...
3663 (c_keyword_starts_typename): ...this new function.
3664 (c_parser_declaration_or_fndef): When issuing errors about
3665 missing "struct" etc, add a fixit. For other kinds of errors,
3666 attempt to provide a suggestion via lookup_name_fuzzy.
3667 (c_parser_parms_declarator): When looking ahead to detect typos in
3668 type names, also reject CPP_KEYWORD.
3669 (c_parser_parameter_declaration): When issuing errors about
3670 unknown type names, attempt to provide a suggestion via
3671 lookup_name_fuzzy.
3672 * c-tree.h (c_keyword_starts_typename): New prototype.
3673
5a578671
JM
36742016-06-20 Joseph Myers <joseph@codesourcery.com>
3675
3676 PR c/71601
3677 * c-typeck.c (build_conditional_expr): Return error_mark_node if
3678 c_common_type returns error_mark_node.
3679
3f8257db 36802016-06-19 Martin Sebor <msebor@redhat.com>
aa0db437
MS
3681
3682 PR c/69507
3683 * c-parser.c (c_parser_alignof_expression): Avoid diagnosing
3684 __alignof__ (expression).
3685
6a3f203c
DM
36862016-06-14 David Malcolm <dmalcolm@redhat.com>
3687
3688 * c-typeck.c: Include spellcheck-tree.h rather than spellcheck.h.
3689
264757fb
DM
36902016-06-14 David Malcolm <dmalcolm@redhat.com>
3691
3692 * c-typeck.c (build_component_ref): Simplify fixit code by
3693 using gcc_rich_location::add_fixit_misspelled_id.
3694 (set_init_label): Likewise.
3695
f7e4f2e3
DM
36962016-06-13 David Malcolm <dmalcolm@redhat.com>
3697
3698 * c-parser.c (c_parser_initelt): Provide location of name for new
3699 location_t param of set_init_label.
3700 * c-tree.h (set_init_label): Add location_t param.
3701 * c-typeck.c (set_init_index): Add "fieldname_loc" location_t
3702 param and use it when issuing error messages about unrecognized
3703 field names. Attempt to provide a fixit hint if appropriate,
3704 otherwise update the error message to provide the type name.
3705
4b1ffdb1
TS
37062016-06-10 Thomas Schwinge <thomas@codesourcery.com>
3707
3708 PR c/71381
3709 * c-parser.c (c_parser_omp_variable_list) <OMP_CLAUSE__CACHE_>:
3710 Loosen checking.
3711
44a845ca
MS
37122016-06-08 Martin Sebor <msebor@redhat.com>
3713 Jakub Jelinek <jakub@redhat.com>
3714
3715 PR c++/70507
3716 PR c/68120
3717 * c-typeck.c (convert_arguments): Don't promote last argument
3718 of BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
3719
92a5f2ba
MP
37202016-06-08 Marek Polacek <polacek@redhat.com>
3721
3722 PR c/71418
3723 * c-decl.c (grokdeclarator): Check TYPE_P.
3724
08203f73
MP
3725 PR c/71426
3726 * c-decl.c (get_parm_info): Don't crash on an assert on invalid
3727 code.
3728
6ffd47b7
DM
37292016-06-07 David Malcolm <dmalcolm@redhat.com>
3730
3731 * c-parser.c (c_parser_postfix_expression): In __builtin_offsetof
3732 and structure element reference, capture the location of the
3733 element name token and pass it to build_component_ref.
3734 (c_parser_postfix_expression_after_primary): Likewise for
3735 structure element dereference.
3736 (c_parser_omp_variable_list): Likewise for
3737 OMP_CLAUSE_{_CACHE, MAP, FROM, TO},
3738 * c-tree.h (build_component_ref): Add location_t param.
3739 * c-typeck.c (build_component_ref): Add location_t param
3740 COMPONENT_LOC. Use it, if available, when issuing hints about
3741 mispelled member names to provide a fixit replacement hint.
3742
1f40cff3
MP
37432016-06-06 Marek Polacek <polacek@redhat.com>
3744
3745 PR c/71362
3746 * c-parser.c (c_parser_direct_declarator): Set location.
3747
5545a907
MP
37482016-06-06 Marek Polacek <polacek@redhat.com>
3749
3750 * c-typeck.c (comptypes_internal): Handle comparisons of
3751 INTEGER_TYPE, FIXED_POINT_TYPE, and REAL_TYPE nodes. Don't check
3752 TYPE_REF_CAN_ALIAS_ALL.
3753
b605f663
CLT
37542016-06-03 Chung-Lin Tang <cltang@codesourcery.com>
3755
3756 * c-typeck.c (c_finish_omp_clauses): Mark OpenACC reduction
3757 arguments as addressable when async clause exists.
3758
00631022
JJ
37592016-05-30 Jakub Jelinek <jakub@redhat.com>
3760
3761 PR c++/71349
3762 * c-parser.c (c_parser_omp_for): Don't disallow nowait clause
3763 when combined with target construct.
3764
7211a097
JJ
37652016-05-26 Jakub Jelinek <jakub@redhat.com>
3766
3767 * c-parser.c (c_parser_omp_clause_schedule): Warn if
3768 OMP_CLAUSE_SCHEDULE_CHUNK_EXPR is known not to be positive.
3769
95efe6b6
MP
37702016-05-25 Marek Polacek <polacek@redhat.com>
3771
3772 PR c/71265
3773 * c-decl.c (c_make_fname_decl): Don't check seen_error.
3774
a23faf7a
MP
3775 PR c/71266
3776 * c-decl.c (store_parm_decls_oldstyle): Skip non-PARM_DECLs.
3777
e46c7770
CP
37782016-05-24 Cesar Philippidis <cesar@codesourcery.com>
3779
3780 * c-parser.c (c_parser_oacc_declare): Add support for
3781 GOMP_MAP_FIRSTPRIVATE_POINTER.
3782 * c-typeck.c (handle_omp_array_sections_1): Replace bool is_omp
3783 argument with enum c_omp_region_type ort.
3784 (handle_omp_array_sections): Likewise. Update call to
3785 handle_omp_array_sections_1.
3786 (c_finish_omp_clauses): Add specific errors and warning messages for
3787 OpenACC. Use firsrtprivate pointers for OpenACC subarrays. Update
3788 call to handle_omp_array_sections.
3789
a04e69c0
TS
37902016-05-24 Thomas Schwinge <thomas@codesourcery.com>
3791
3792 * c-parser.c (c_parser_oacc_routine): Tighten syntax checks.
3793
f17a223d
RB
37942016-05-24 Richard Biener <rguenther@suse.de>
3795
3796 PR middle-end/70434
3797 PR c/69504
3798 * c-typeck.c (build_array_ref): Do not complain about indexing
3799 non-lvalue vectors. Adjust for function name change.
3800
79063edd
MS
38012016-05-20 Martin Sebor <msebor@redhat.com>
3802
3803 PR c/71115
3804 * c-typeck.c (error_init): Use
3805 expansion_point_location_if_in_system_header.
3806 (warning_init): Same.
3807
8a40fef3
DM
38082016-05-19 David Malcolm <dmalcolm@redhat.com>
3809
3810 PR c/71171
3811 * c-parser.c (c_parser_generic_selection): Use c_expr::set_error
3812 in error-handling.
3813 (c_parser_postfix_expression): Likewise.
3814 * c-tree.h (c_expr::set_error): New method.
3815 * c-typeck.c (parser_build_binary_op): In error-handling, ensure
3816 that result's range is initialized.
3817
e9892350
JG
38182016-05-17 James Greenhalgh <james.greenhalgh@arm.com>
3819
3820 * c-typeck.c (parser_build_unary_op): Fix formatting.
3821
8fad45f5
MW
38222016-05-16 Matthew Wahab <matthew.wahab@arm.com>
3823
3824 * c-decl.c (grokdeclarator): Remove errmsg and use of
3825 targetm.invalid_return_type.
3826 (grokparms): Remove errmsg and use of
3827 targetm.invalid_parameter_type.
3828
aa4b467b
JM
38292016-05-13 Joseph Myers <joseph@codesourcery.com>
3830
3831 * c-decl.c (grokdeclarator): For C11, discard qualifiers on
3832 function return type.
3833
4f2e1536
MP
38342016-05-12 Marek Polacek <polacek@redhat.com>
3835
3836 PR c/70756
3837 * c-decl.c (build_compound_literal): Pass LOC down to
3838 c_incomplete_type_error.
3839 * c-tree.h (require_complete_type): Adjust declaration.
3840 (c_incomplete_type_error): Likewise.
3841 * c-typeck.c (require_complete_type): Add location parameter, pass it
3842 down to c_incomplete_type_error.
3843 (c_incomplete_type_error): Add location parameter, pass it down to
3844 error_at.
3845 (build_component_ref): Pass location down to c_incomplete_type_error.
3846 (default_conversion): Pass location down to require_complete_type.
3847 (build_array_ref): Likewise.
3848 (build_function_call_vec): Likewise.
3849 (convert_arguments): Likewise.
3850 (build_unary_op): Likewise.
3851 (build_c_cast): Likewise.
3852 (build_modify_expr): Likewise.
3853 (convert_for_assignment): Likewise.
3854 (c_finish_omp_clauses): Likewise.
3855
d6e83a8d
MM
38562016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
3857
3858 PR c/43651
3859 * c-decl.c (declspecs_add_qual): Warn when -Wduplicate-decl-specifier
3860 is enabled.
3861 * c-errors.c (pedwarn_c90): Return true if warned.
3862 * c-tree.h (pedwarn_c90): Change return type to bool.
3863 (enum c_declspec_word): Add new enumerator cdw_atomic.
3864
5c3a10fb
MP
38652016-05-11 Marek Polacek <polacek@redhat.com>
3866
3867 PR c++/71024
3868 * c-decl.c (diagnose_mismatched_decls): Factor out code to
3869 diagnose_mismatched_attributes and call it.
3870
cf68d92c
MP
38712016-05-10 Marek Polacek <polacek@redhat.com>
3872
3873 PR c/70255
3874 * c-decl.c (diagnose_mismatched_decls): Warn for optimize attribute
3875 on a declaration following the definition.
3876
351f85c5
JJ
38772016-05-05 Jakub Jelinek <jakub@redhat.com>
3878
3879 * c-parser.c (c_parser_switch_statement): Add IF_P argument,
3880 parse it through to c_parser_c99_block_statement.
3881 (c_parser_statement_after_labels): Adjust c_parser_switch_statement
3882 caller.
3883
deef7113
MP
38842016-05-04 Marek Polacek <polacek@redhat.com>
3885
3886 * c-parser.c (c_parser_if_statement): Replace OPT_Wparentheses with
3887 OPT_Wdangling_else.
3888
de55efd5
MP
38892016-05-04 Marek Polacek <polacek@redhat.com>
3890
3891 PR c/48778
3892 * c-typeck.c (build_binary_op): Don't issue -Waddress warnings
3893 for macro expansions.
3894
79ce98bc
MP
38952016-05-03 Marek Polacek <polacek@redhat.com>
3896
3897 PR c/70859
3898 * c-typeck.c (build_function_call_vec): Pass LOC and ARG_LOC down to
3899 check_builtin_function_arguments.
3900
fb2647aa
RB
39012016-05-03 Richard Biener <rguenther@suse.de>
3902
3903 * Make-lang.in (cc1-checksum.c): For stage-final re-use
3904 the checksum from the previous stage.
3905
77886428
CP
39062016-05-02 Cesar Philippidis <cesar@codesourcery.com>
3907
3908 * c-parser.c (c_parser_oacc_all_clauses): Update call to
3909 c_finish_omp_clauses.
3910 (c_parser_omp_all_clauses): Likewise.
3911 (c_parser_oacc_cache): Likewise.
3912 (c_parser_oacc_loop): Likewise.
3913 (omp_split_clauses): Likewise.
3914 (c_parser_omp_declare_target): Likewise.
3915 (c_parser_cilk_all_clauses): Likewise.
3916 (c_parser_cilk_for): Likewise.
3917 * c-typeck.c (c_finish_omp_clauses): Replace bool arguments
3918 is_omp, declare_simd, and is_cilk with enum c_omp_region_type ort.
3919
7176a4a0
MP
39202016-05-02 Marek Polacek <polacek@redhat.com>
3921
3922 PR c/70851
3923 * c-decl.c (grokdeclarator): Diagnose when array's size has an
3924 incomplete type.
3925
e7ff0319
CP
39262016-04-29 Cesar Philippidis <cesar@codesourcery.com>
3927
3928 PR middle-end/70626
3929 * c-parser.c (c_parser_oacc_loop): Don't augment mask with
3930 OACC_LOOP_CLAUSE_MASK.
3931 (c_parser_oacc_kernels_parallel): Update call to
3932 c_oacc_split_loop_clauses.
3933
9f405ce1
AM
39342016-04-28 Andrew MacLeod <amacleod@redhat.com>
3935
3936 * c-array-notation.c (fix_builtin_array_notation_fn): Fix final
3937 argument to build_modify_expr in two cases.
3938
c1e1f433
BS
39392016-04-27 Bernd Schmidt <bschmidt@redhat.com>
3940
3941 * c-parser.c (c_parser_postfix_expression_after_primary): Call
3942 warn_for_memset instead of warning directly here.
3943
2448a956
MP
39442016-04-26 Marek Polacek <polacek@redhat.com>
3945
3946 PR c/67784
3947 * c-parser.c (c_parser_maybe_reclassify_token): New function factored
3948 out of ...
3949 (c_parser_for_statement): ... here.
3950 (c_parser_if_statement): Use it.
3951 (c_parser_switch_statement): Use it.
3952 (c_parser_while_statement): Use it.
3953
b02a5e26
MP
3954 PR c/70791
3955 * c-decl.c (pushdecl): Pass LOCUS down to warning.
3956
477d4906
IV
39572016-04-20 Ilya Verbin <ilya.verbin@intel.com>
3958
3959 PR c++/69363
3960 * c-parser.c (c_parser_cilk_all_clauses): Use c_finish_omp_clauses
3961 instead of c_finish_cilk_clauses.
3962 * c-tree.h (c_finish_omp_clauses): Add new default argument.
3963 * c-typeck.c (c_finish_omp_clauses): Add new argument. Allow
3964 floating-point variables in the linear clause for Cilk Plus.
3965
fe37c7af
MM
39662016-04-18 Michael Matz <matz@suse.de>
3967
3968 * c-decl.c (merge_decls): Use SET_DECL_ALIGN and SET_TYPE_ALIGN.
3969 (grokdeclarator, parser_xref_tag, finish_enum): Use SET_TYPE_ALIGN.
3970
949505a9
MP
39712016-04-15 Marek Polacek <polacek@redhat.com>
3972
3973 PR c/70671
3974 * c-typeck.c (build_unary_op): Pass location down to error and
3975 warning call.
3976
dda1bf61
JJ
39772016-04-15 Jakub Jelinek <jakub@redhat.com>
3978
3979 PR c/70436
3980 * c-parser.c (c_parser_pragma): Add IF_P argument, pass it down
3981 where needed.
3982 (c_parser_external_declaration, c_parser_struct_or_union_specifier,
3983 c_parser_parameter_declaration, c_parser_compound_statement_nostart,
3984 c_parser_objc_class_instance_variables, c_parser_objc_methodprotolist):
3985 Adjust c_parser_pragma callers.
3986 (c_parser_statement_after_labels): Likewise. Adjust c_parser_cilk_for
3987 caller.
3988 (c_parser_omp_structured_block): Add IF_P argument, pass it down to
3989 c_parser_statement.
3990 (c_parser_oacc_data, c_parser_oacc_host_data, c_parser_oacc_loop,
3991 c_parser_oacc_kernels_parallel, c_parser_omp_critical,
3992 c_parser_omp_simd, c_parser_omp_for, c_parser_omp_master,
3993 c_parser_omp_ordered, c_parser_omp_parallel, c_parser_omp_single,
3994 c_parser_omp_task, c_parser_omp_taskgroup, c_parser_omp_distribute,
3995 c_parser_omp_teams, c_parser_omp_target_data, c_parser_omp_target,
3996 c_parser_omp_taskloop, c_parser_omp_construct, c_parser_cilk_grainsize,
3997 c_parser_cilk_simd, c_parser_cilk_for): Add IF_P argument, pass it
3998 down where needed.
3999 (c_parser_omp_for_loop): Likewise. Clear IF_P if nbraces.
4000 (c_parser_omp_sections_scope): Adjust c_parser_omp_structured_block
4001 calls.
4002
99cd9857
MP
40032016-04-13 Marek Polacek <polacek@redhat.com>
4004
4005 PR c/70436
4006 * c-parser.c (c_parser_statement_after_labels): Add IF_P argument and
4007 adjust callers.
4008 (c_parser_statement): Likewise.
4009 (c_parser_c99_block_statement): Likewise.
4010 (c_parser_while_statement): Likewise.
4011 (c_parser_for_statement): Likewise.
4012 (c_parser_if_body): Don't set IF_P here.
4013 (c_parser_if_statement): Add IF_P argument. Set IF_P here. Warn
4014 about dangling else here.
4015 * c-tree.h (c_finish_if_stmt): Adjust declaration.
4016 * c-typeck.c (c_finish_if_stmt): Remove NESTED_IF parameter. Don't
4017 warn about dangling else here.
4018
f13355da
MP
40192016-04-04 Marek Polacek <polacek@redhat.com>
4020
4021 PR c/70307
4022 * c-fold.c (c_fully_fold_internal): Handle VEC_COND_EXPR.
4023
5fde6a45
MP
40242016-03-31 Marek Polacek <polacek@redhat.com>
4025
4026 PR c/70297
4027 * c-decl.c (merge_decls): Also set TYPE_ALIGN and TYPE_USER_ALIGN.
4028
4bbf545b
DM
40292016-03-18 David Malcolm <dmalcolm@redhat.com>
4030
4031 PR c/70281
4032 * c-parser.c (c_parser_postfix_expression): Set the source range
4033 for uses of "__builtin_types_compatible_p".
4034
fcc2b74f
JJ
40352016-03-17 Jakub Jelinek <jakub@redhat.com>
4036
4037 PR c/70280
4038 * c-typeck.c (composite_type): Don't count void_list_node
4039 into len, if the list is terminated by void_list_node, start
4040 with void_list_node instead of NULL for newargs. Stop
4041 at void_list_node.
4042
ab4c578f
MP
40432016-03-16 Marek Polacek <polacek@redhat.com>
4044
4045 PR c/70093
4046 * c-typeck.c (build_function_call_vec): Create a TARGET_EXPR for
4047 nested functions returning VM types.
4048
96b3c82d
CP
40492016-03-09 Cesar Philippidis <cesar@codesourcery.com>
4050
4051 * c-parser.c (c_parser_oacc_loop): Update cclauses and clauses
4052 when calling c_finish_omp_clauses.
4053
29b9828f
BS
40542016-03-04 Bernd Schmidt <bschmidt@redhat.com>
4055
4056 PR c/69824
4057 * c-decl.c (get_parm_info): Don't queue implicit function declarations
4058 for later.
4059
7ff6ca38
MP
40602016-03-04 Marek Polacek <polacek@redhat.com>
4061
4062 PR c/69798
4063 * c-parser.c (c_parser_postfix_expression): Call
4064 c_parser_cast_expression rather than c_parser_postfix_expression.
4065
686e2237
JJ
40662016-03-01 Jakub Jelinek <jakub@redhat.com>
4067
4068 PR c/69796
4069 PR c/69974
4070 * c-parser.c (c_parser_translation_unit): Don't change TREE_TYPE
4071 of incomplete decls to error_mark_node.
4072
0b05329b
MP
40732016-02-24 Marek Polacek <polacek@redhat.com>
4074
4075 PR c/69819
4076 * c-decl.c (finish_decl): Don't update the copy of the type of a
4077 different decl type.
4078
067fbd8b
JJ
40792016-02-23 Jakub Jelinek <jakub@redhat.com>
4080
4081 PR objc/69844
4082 * c-parser.c (c_parser_for_statement): Properly handle ObjC classes
4083 in id_kind reclassification.
4084
bf14eba2
JJ
40852016-02-16 Jakub Jelinek <jakub@redhat.com>
4086
4087 PR c/69835
4088 * c-typeck.c (build_binary_op): Revert 2015-09-09 change.
4089
ba539195
JN
40902016-02-16 James Norris <jnorris@codesourcery.com>
4091
4092 PR c/64748
4093 * c-parser.c (c_parser_oacc_data_clause_deviceptr): Allow parms.
4094
16595a1f
BS
40952016-02-12 Bernd Schmidt <bschmidt@redhat.com>
4096
f48dfe98
BS
4097 * c-decl.c (build_null_declspecs): Zero the entire struct.
4098
16595a1f
BS
4099 PR c/69522
4100 * c-parser.c (c_parser_braced_init): New arg outer_obstack. All
4101 callers changed. If nested_p is true, use it to call
4102 finish_implicit_inits.
4103 * c-tree.h (finish_implicit_inits): Declare.
4104 * c-typeck.c (finish_implicit_inits): New function. Move code
4105 from ...
4106 (push_init_level): ... here.
4107 (set_designator, process_init_element): Call finish_implicit_inits.
4108
66756373
JJ
41092016-02-11 Jakub Jelinek <jakub@redhat.com>
4110
4111 PR c/69768
4112 * c-typeck.c (parser_build_binary_op): Strip nops from integer_zerop
4113 arguments for -Waddress warning.
4114
1066e9b5
JJ
41152016-02-04 Jakub Jelinek <jakub@redhat.com>
4116
4117 PR c/69669
4118 * c-decl.c (finish_enum): When honoring mode attribute,
4119 make sure to use proper TYPE_MIN_VALUE and TYPE_MAX_VALUE.
4120
3a5d2ba4
JJ
41212016-01-29 Jakub Jelinek <jakub@redhat.com>
4122
4123 PR debug/69518
4124 * c-decl.c (finish_struct): Clear C_TYPE_INCOMPLETE_VARS in
4125 all type variants, not just TYPE_MAIN_VARIANT.
4126
cbdd8ae0
JJ
41272016-01-27 Jakub Jelinek <jakub@redhat.com>
4128
4129 PR debug/66869
4130 * c-decl.c (c_write_global_declarations_1): Warn with
4131 warn_unused_function if static prototype without definition
4132 is not C_DECL_USED.
4133
fa74a4bc
MP
41342016-01-27 Marek Polacek <polacek@redhat.com>
4135
4136 PR c/68062
4137 * c-typeck.c (build_binary_op) [EQ_EXPR, GE_EXPR]: Promote operand
4138 to unsigned, if needed. Add -Wsign-compare warning.
4139
13f92e8d
JJ
41402016-01-26 Jakub Jelinek <jakub@redhat.com>
4141
4142 PR tree-optimization/69483
4143 * c-parser.c (c_parser_translation_unit): Use FOR_EACH_VEC_ELT.
4144
cd8e73dc 41452016-01-20 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
d25c7690
PK
4146
4147 PR c/24293
4148 * c-tree.h (incomplete_record_decls): Declare.
4149 * c-parser.c (incomplete_record_decls): Define.
4150 (c_parser_translation_unit): Iterate through incomplete_record_decls and
4151 report error if any decl has zero size.
4152 * c-decl.c (finish_decl): Append static decl with incomplete struct/union
4153 or enum type to incomplete_record_decls.
4154
e6d6ec9e
TV
41552016-01-14 Tom de Vries <tom@codesourcery.com>
4156
4157 PR tree-optimization/68773
4158 * c-parser.c (c_parser_oacc_declare, c_parser_omp_declare_target): Don't
4159 set force_output.
4160
00083992
MP
41612016-01-14 Marek Polacek <polacek@redhat.com>
4162
4163 PR c/69262
4164 * c-decl.c (grokdeclarator): Provide more information for invalid
4165 array declarations.
4166
7443cf13
DM
41672016-01-06 David Malcolm <dmalcolm@redhat.com>
4168
4169 * c-parser.c (c_parser_unary_expression): For dereferences, build
4170 a combined location before calling build_indirect_ref, so that
4171 error reports cover the full range, manually updating the c_expr
4172 src_range.
4173
6b131d5b
MP
41742016-01-06 Marek Polacek <polacek@redhat.com>
4175
4176 PR sanitizer/69099
4177 * c-convert.c (convert) [INTEGER_TYPE]: Drop ARG. Don't pass ARG to
4178 ubsan_instrument_float_cast. Fold EXPR. Use NULL_TREE instead of
4179 NULL.
4180
818ab71a
JJ
41812016-01-04 Jakub Jelinek <jakub@redhat.com>
4182
4183 Update copyright years.
4184
2fe0a208
MP
41852016-01-04 Marek Polacek <polacek@redhat.com>
4186
4187 PR c/68908
4188 * c-typeck.c (build_atomic_assign): Improve commentary. Add
4189 optimization to use __atomic_fetch_* built-in if possible.
4190
c7b48c8a
TS
41912015-12-23 Thomas Schwinge <thomas@codesourcery.com>
4192
4193 * c-parser.c (c_parser_oacc_clause_use_device): Merge function
4194 into...
4195 (c_parser_omp_clause_use_device_ptr): ... this function. Adjust
4196 all users.
4197
fda5652f
MP
41982015-12-22 Marek Polacek <polacek@redhat.com>
4199
4200 PR c/69002
4201 * c-typeck.c (build_component_ref): Warn when acessing elements of
4202 atomic structures or unions.
4203
745e411d
DM
42042015-12-21 David Malcolm <dmalcolm@redhat.com>
4205
4206 * c-typeck.c: Include "gcc-rich-location.h".
4207 (build_binary_op): In the two places that call binary_op_error,
4208 create a gcc_rich_location and populate it with the location of
4209 the binary op and its two operands.
4210
94c40e19
DM
42112015-12-16 David Malcolm <dmalcolm@redhat.com>
4212
4213 * c-parser.c (c_parser_statement_after_labels): When calling
4214 c_finish_return, Use the return expression's location if it has
4215 one, falling back to the location of the first token within it.
4216 * c-typeck.c (c_finish_return): When issuing warnings about
4217 the incorrect presence/absence of a return value, issue a note
4218 showing the declaration of the function.
4219
de67c4c3
DM
42202015-12-16 David Malcolm <dmalcolm@redhat.com>
4221
4222 * c-parser.c (struct c_parser): Expand array "tokens_buf" from 2
4223 to 4.
4224 (c_parser_peek_nth_token): New function.
4225 (c_parser_peek_conflict_marker): New function.
4226 (c_parser_error): Detect conflict markers and report them as such.
4227
a10704e1
DM
42282015-12-16 David Malcolm <dmalcolm@redhat.com>
4229
4230 * c-parser.c (c_parser_postfix_expression): Use EXPR_LOC_OR_LOC
4231 to preserve range information for the primary expression
4232 in the call to c_parser_postfix_expression_after_primary.
4233
8062bca6
DM
42342015-12-16 David Malcolm <dmalcolm@redhat.com>
4235
4236 * c-parser.c (c_parser_static_assert_declaration_no_semi): Use the
4237 expression location, falling back on the first token location,
4238 rather than always using the latter.
4239
d06f8b75
MP
42402015-12-16 Marek Polacek <polacek@redhat.com>
4241
4242 PR c/64637
4243 * c-typeck.c (c_process_expr_stmt): Use location of the expression if
4244 available.
4245
2994fb91
MP
42462015-12-15 Marek Polacek <polacek@redhat.com>
4247
4248 PR c/68907
4249 * c-typeck.c (build_atomic_assign): Set TREE_NO_WARNING on an
4250 artificial decl.
4251
a1b93f8d
DM
42522015-12-08 David Malcolm <dmalcolm@redhat.com>
4253
4254 * c-parser.c (c_parser_alignof_expression): Capture location of
4255 closing parenthesis (if any), or of end of unary expression, and
4256 use it to build a src_range for the expression.
4257
46c6e1e2
DM
42582015-12-08 David Malcolm <dmalcolm@redhat.com>
4259
4260 PR c/68757
4261 * c-parser.c (c_parser_get_builtin_args): Add
4262 "out_close_paren_loc" param, and write back to it.
4263 (c_parser_postfix_expression): Capture the closing
4264 parenthesis location for RID_CHOOSE_EXPR,
4265 RID_BUILTIN_CALL_WITH_STATIC_CHAIN, RID_BUILTIN_COMPLEX,
4266 RID_BUILTIN_SHUFFLE and use it to set the source range
4267 for such expressions; within RID_BUILTIN_COMPLEX set
4268 the underlying location.
4269
66189108
MP
42702015-12-07 Marek Polacek <polacek@redhat.com>
4271
4272 PR c/68668
4273 * c-decl.c (grokdeclarator): If ORIG_QUAL_INDIRECT is indirect, use
4274 TREE_TYPE of ORIG_QUAL_TYPE, otherwise decrement ORIG_QUAL_INDIRECT.
4275
f187980b
EB
42762015-12-04 Eric Botcazou <ebotcazou@adacore.com>
4277
4278 * c-tree.h (c_build_va_arg): Adjust prototype.
4279 * c-parser.c (c_parser_postfix_expression): Adjust call to above.
4280 * c-typeck.c (c_build_va_arg): Rename LOC parameter to LOC2, add LOC1
4281 parameter, adjust throughout and issue an error if EXPR is a component
4282 with reverse storage order.
4283
4250754e
JM
42842015-12-02 Jason Merrill <jason@redhat.com>
4285
4286 * c-fold.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
4287 (c_fully_fold_internal, decl_constant_value_for_optimization):
4288 Move from c-common.c.
4289 * c-tree.h: Declare decl_constant_value_for_optimization.
4290 * Make-lang.in (C_AND_OBJC_OBJS): Add c-fold.o.
4291
e9e32ee6
JM
42922015-12-02 Joseph Myers <joseph@codesourcery.com>
4293
4294 PR c/68162
4295 * c-decl.c (grokdeclarator): Set first_non_attr_kind before
4296 following link from declarator to next declarator. Track original
4297 qualified type and pass it to c_build_qualified_type.
4298 * c-typeck.c (c_build_qualified_type): Add arguments
4299 orig_qual_type and orig_qual_indirect.
4300
ff7a55bf
TS
43012015-12-02 Thomas Schwinge <thomas@codesourcery.com>
4302
4303 * c-parser.c (c_parser_omp_clause_name)
4304 (c_parser_oacc_all_clauses): Alphabetical sorting.
4305
657e4e47
JJ
43062015-12-02 Jakub Jelinek <jakub@redhat.com>
4307
4308 PR c/68533
4309 * c-decl.c (get_parm_info): Use b->locus instead of input_location
4310 for diagnostics.
4311
37d5ad46
JB
43122015-12-01 Julian Brown <julian@codesourcery.com>
4313 Cesar Philippidis <cesar@codesourcery.com>
4314 James Norris <James_Norris@mentor.com>
4315
4316 * c-parser.c (c_parser_omp_clause_name): Add use_device support.
4317 (c_parser_oacc_clause_use_device): New function.
4318 (c_parser_oacc_all_clauses): Add use_device support.
4319 (OACC_HOST_DATA_CLAUSE_MASK): New macro.
4320 (c_parser_oacc_host_data): New function.
4321 (c_parser_omp_construct): Add host_data support.
4322 * c-tree.h (c_finish_oacc_host_data): Add prototype.
4323 * c-typeck.c (c_finish_oacc_host_data): New function.
4324 (c_finish_omp_clauses): Add use_device support.
4325
a4850ce9
JH
43262015-11-29 Jan Hubicka <hubicka@ucw.cz>
4327
4328 PR c/67106
4329 * c-decl.c: Set TYPE_PACKED in variants.
4330
b58d3df2
ML
43312015-11-27 Martin Liska <mliska@suse.cz>
4332
4333 PR c++/68312
4334 * c-array-notation.c (fix_builtin_array_notation_fn):
4335 Use release_vec_vec instead of vec::release.
4336 (build_array_notation_expr): Likewise.
4337 (fix_conditional_array_notations_1): Likewise.
4338 (fix_array_notation_expr): Likewise.
4339 (fix_array_notation_call_expr): Likewise.
4340
aec17bfe
JJ
43412015-11-27 Jakub Jelinek <jakub@redhat.com>
4342
4343 PR c/63326
4344 * c-parser.c (c_parser_compound_statement_nostart): If
4345 last_label is true, use pragma_stmt instead of pragma_compound
4346 as second c_parser_pragma argument.
4347 (c_parser_omp_ordered, c_parser_omp_target_update,
4348 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Pass
4349 false as second argument to c_parser_skip_to_pragma_eol after
4350 diagnosing standalone directives used in pragma_stmt context.
4351
688c4de0
IV
43522015-11-24 Ilya Verbin <ilya.verbin@intel.com>
4353
4354 * c-parser.c (c_parser_oacc_declare): Replace "ifdef ENABLE_OFFLOADING"
4355 with "if (ENABLE_OFFLOADING)".
4356
cbd03aee
DM
43572015-11-23 David Malcolm <dmalcolm@redhat.com>
4358
4359 PR objc/68438
4360 * c-parser.c (c_parser_postfix_expression): Set up source ranges
4361 for various Objective-C constructs: Class.name syntax,
4362 @selector(), @protocol(), @encode(), and [] message syntax.
4363
a87a86e1
DM
43642015-11-20 David Malcolm <dmalcolm@redhat.com>
4365
4366 PR 62314
4367 * c-typeck.c (should_suggest_deref_p): New function.
4368 (build_component_ref): Special-case POINTER_TYPE when
4369 generating a "not a structure of union" error message, and
4370 suggest a "->" rather than a ".", providing a fix-it hint.
4371
8ece8dfb
DM
43722015-11-19 David Malcolm <dmalcolm@redhat.com>
4373
4374 * c-typeck.c (lookup_field_fuzzy): Move determination of closest
4375 candidate into a new function, find_closest_identifier.
4376
433068cc
MP
43772015-11-19 Marek Polacek <polacek@redhat.com>
4378
4379 PR c/68412
4380 * c-typeck.c (parser_build_binary_op): Properly handle
4381 C_MAYBE_CONST_EXPR before calling warn_tautological_cmp.
4382
bef08b71
DM
43832015-11-17 David Malcolm <dmalcolm@redhat.com>
4384
4385 * c-parser.c (set_c_expr_source_range): Bulletproof both
4386 overloaded implementations against NULL expr->value.
4387 (c_parser_braced_init): Set src_range for "ret" to a sane pair of
4388 values.
4389 (c_parser_unary_expression): Likewise when handling addresses of
4390 labels.
4391 (c_parser_postfix_expression): Likewise for statement expressions,
4392 for __FUNCTION__, __PRETTY_FUNCTION_ and __func__ keywords, for
4393 __builtin_va_arg, and for __builtin_offset_of.
4394 (c_parser_postfix_expression_after_paren_type): Initialize expr's
4395 src_range using the range of the braced initializer.
4396 (c_parser_transaction_expression): Set src_range for "ret" to a
4397 sane pair of values.
4398
fff77217
KY
43992015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
4400
4401 * c-parser.c (c_finish_omp_declare_simd): Look for
4402 "simd" attribute as well. Update error message.
4403
1d899da2
TS
44042015-11-14 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
4405
4406 * c-parser.c (c_parser_omp_declare_target): Adjust.
4407
e4606348
JJ
44082015-11-14 Jakub Jelinek <jakub@redhat.com>
4409
4410 * c-typeck.c (c_finish_omp_clauses): Don't mark
4411 GOMP_MAP_FIRSTPRIVATE_POINTER decls addressable.
4412
3e636daf
MP
44132015-11-14 Marek Polacek <polacek@redhat.com>
4414
4415 * c-decl.c: Use RECORD_OR_UNION_TYPE_P throughout.
4416 * c-typeck.c: Likewise.
4417
ebedc9a3
DM
44182015-11-13 David Malcolm <dmalcolm@redhat.com>
4419
4420 * c-decl.c (warn_defaults_to): Pass line_table to
4421 rich_location ctor.
4422 * c-errors.c (pedwarn_c99): Likewise.
4423 (pedwarn_c90): Likewise.
4424 * c-parser.c (set_c_expr_source_range): New functions.
4425 (c_token::get_range): New method.
4426 (c_token::get_finish): New method.
4427 (c_parser_expr_no_commas): Call set_c_expr_source_range on the ret
4428 based on the range from the start of the LHS to the end of the
4429 RHS.
4430 (c_parser_conditional_expression): Likewise, based on the range
4431 from the start of the cond.value to the end of exp2.value.
4432 (c_parser_binary_expression): Call set_c_expr_source_range on
4433 the stack values for TRUTH_ANDIF_EXPR and TRUTH_ORIF_EXPR.
4434 (c_parser_cast_expression): Call set_c_expr_source_range on ret
4435 based on the cast_loc through to the end of the expr.
4436 (c_parser_unary_expression): Likewise, based on the
4437 op_loc through to the end of op.
4438 (c_parser_sizeof_expression) Likewise, based on the start of the
4439 sizeof token through to either the closing paren or the end of
4440 expr.
4441 (c_parser_postfix_expression): Likewise, using the token range,
4442 or from the open paren through to the close paren for
4443 parenthesized expressions.
4444 (c_parser_postfix_expression_after_primary): Likewise, for
4445 various kinds of expression.
4446 * c-tree.h (struct c_expr): Add field "src_range".
4447 (c_expr::get_start): New method.
4448 (c_expr::get_finish): New method.
4449 (set_c_expr_source_range): New decls.
4450 * c-typeck.c (parser_build_unary_op): Call set_c_expr_source_range
4451 on ret for prefix unary ops.
4452 (parser_build_binary_op): Likewise, running from the start of
4453 arg1.value through to the end of arg2.value.
4454
ec8b536f
MP
44552015-11-13 Marek Polacek <polacek@redhat.com>
4456
4457 PR c/68320
4458 * c-parser.c (c_parser_for_statement): Treat unknown tokens as IDs.
4459
277fe616
DM
44602015-11-13 David Malcolm <dmalcolm@redhat.com>
4461
4462 * c-typeck.c: Include spellcheck.h.
4463 (lookup_field_fuzzy_find_candidates): New function.
4464 (lookup_field_fuzzy): New function.
4465 (build_component_ref): If the field was not found, try using
4466 lookup_field_fuzzy and potentially offer a suggestion.
4467
6e232ba4
JN
44682015-11-12 James Norris <jnorris@codesourcery.com>
4469 Joseph Myers <joseph@codesourcery.com>
4470
4471 * c-parser.c (c_parser_pragma): Handle PRAGMA_OACC_DECLARE.
4472 (c_parser_omp_clause_name): Handle 'device_resident' clause.
4473 (c_parser_oacc_data_clause): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
4474 and PRAGMA_OMP_CLAUSE_LINK.
4475 (c_parser_oacc_all_clauses): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
4476 and PRAGMA_OACC_CLAUSE_LINK.
4477 (OACC_DECLARE_CLAUSE_MASK): New definition.
4478 (c_parser_oacc_declare): New function.
4479
9be4f715
MP
44802015-11-12 Marek Polacek <polacek@redhat.com>
4481
4482 PR c/67784
4483 * c-parser.c (c_parser_for_statement): Reclassify the token in
4484 a correct scope.
4485
e78bede6
MP
44862015-11-11 Marek Polacek <polacek@redhat.com>
4487
4488 PR c/68107
4489 PR c++/68266
4490 * c-decl.c (grokdeclarator): Call valid_array_size_p. Remove code
4491 checking the size of an array.
4492
69f293c9
AM
44932015-11-11 Andrew MacLeod <amacleod@redhat.com>
4494
4495 * c-array-notation.c: Remove unused header files.
4496 * c-aux-info.c: Likewise.
4497 * c-convert.c: Likewise.
4498 * c-decl.c: Likewise.
4499 * c-errors.c: Likewise.
4500 * c-lang.c: Likewise.
4501 * c-objc-common.c: Likewise.
4502 * c-parser.c: Likewise.
4503 * c-typeck.c: Likewise.
4504 * gccspec.c: Likewise.
4505
3a40d81d
NS
45062015-11-09 Thomas Schwinge <thomas@codesourcery.com>
4507 Cesar Philippidis <cesar@codesourcery.com>
4508 James Norris <jnorris@codesourcery.com>
4509 Julian Brown <julian@codesourcery.com>
4510 Nathan Sidwell <nathan@codesourcery.com>
4511
3a40d81d
NS
4512 * c-parser.c (c_parser_declaration_or_fndef): Add OpenACC
4513 routine arg.
4514 (c_parser_declaration_or_fndef): Call c_finish_oacc_routine.
4515 (c_parser_pragma): Parse 'acc routine'.
4516 (OACC_ROUTINE_CLAUSE_MARK): Define.
4517 (c_parser_oacc_routine, (c_finish_oacc_routine): New.
4518
fc402eec
AA
45192015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
4520
4521 PR debug/67192
4522 * c-typeck.c (c_finish_loop): For unconditional loops, set the
4523 location of the backward-goto to the start of the loop body.
4524
f6b0b3db
AA
45252015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
4526
4527 PR debug/67192
4528 * c-parser.c (c_parser_while_statement): Finish the loop before
4529 parsing ahead for misleading indentation.
4530 (c_parser_for_statement): Likewise.
4531
ee45a32d
EB
45322015-11-08 Eric Botcazou <ebotcazou@adacore.com>
4533
4534 * c-decl.c (finish_struct): If the structure has reverse storage
4535 order, rewrite the type of array fields with scalar component. Call
4536 maybe_apply_pragma_scalar_storage_order on entry.
4537 * c-typeck.c (build_unary_op) <ADDR_EXPR>: Remove left-overs. Issue
4538 errors on bit-fields and reverse SSO here and not...
4539 (c_mark_addressable): ...here.
4540 (output_init_element): Adjust call to initializer_constant_valid_p.
4541 (c_build_qualified_type): Propagate TYPE_REVERSE_STORAGE_ORDER.
4542
8a645150
DM
45432015-11-06 David Malcolm <dmalcolm@redhat.com>
4544
4545 * c-decl.c (warn_defaults_to): Update for change in signature
4546 of diagnostic_set_info.
4547 * c-errors.c (pedwarn_c99): Likewise.
4548 (pedwarn_c90): Likewise.
4549 * c-objc-common.c (c_tree_printer): Update for new "caret_p" param
4550 for textinfo::set_location.
4551
7a5e4956
CP
45522015-11-05 Cesar Philippidis <cesar@codesourcery.com>
4553 Thomas Schwinge <thomas@codesourcery.com>
4554 James Norris <jnorris@codesourcery.com>
4555
4556 * c-parser.c (c_parser_omp_clause_name): Add support for
4557 PRAGMA_OACC_CLAUSE_INDEPENDENT and PRAGMA_OACC_CLAUSE_TILE.
4558 (c_parser_omp_clause_default): Add is_oacc argument. Handle
4559 default(none) in OpenACC.
4560 (c_parser_oacc_shape_clause): Allow pointer variables as gang static
4561 arguments.
4562 (c_parser_oacc_clause_tile): New function.
4563 (c_parser_oacc_all_clauses): Add support for OMP_CLAUSE_DEFAULT,
4564 OMP_CLAUSE_INDEPENDENT and OMP_CLAUSE_TILE.
4565 (OACC_LOOP_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_{PRIVATE,INDEPENDENT,
4566 TILE}.
4567 (OACC_KERNELS_MASK): Add PRAGMA_OACC_CLAUSE_DEFAULT.
4568 (OACC_PARALLEL_MASK): Add PRAGMA_OACC_CLAUSE_{DEFAULT,PRIVATE,
4569 FIRSTPRIVATE}.
4570 (c_parser_omp_all_clauses): Update call to c_parser_omp_clause_default.
4571 (c_parser_oacc_update): Update the error message for missing clauses.
4572 * c-typeck.c (c_finish_omp_clauses): Add support for OMP_CLAUSE_TILE
4573 and OMP_CLAUSE_INDEPENDENT.
4574
bfcfbfa0
MP
45752015-11-05 Marek Polacek <polacek@redhat.com>
4576
4577 PR c/68090
4578 * c-parser.c (c_parser_postfix_expression_after_paren_type): Don't
4579 deal with pre-evaluation on invalid types.
4580
e01d41e5
JJ
45812015-11-05 Jakub Jelinek <jakub@redhat.com>
4582 Ilya Verbin <ilya.verbin@intel.com>
4583
4584 * c-parser.c: Include context.h and gimple-expr.h.
4585 (c_parser_omp_clause_schedule): Parse schedule modifiers, diagnose
4586 monotonic together with nonmonotonic.
4587 (c_parser_omp_for_loop): Call c_omp_check_loop_iv. Call add_stmt here.
4588 (OMP_DISTRIBUTE_CLAUSE_MASK): Add lastprivate clause.
4589 (c_parser_omp_target_data, c_parser_omp_target_enter_data,
4590 c_parser_omp_target_exit_data): Allow GOMP_MAP_ALWAYS_POINTER.
4591 (c_parser_omp_target): Likewise. Evaluate num_teams and thread_limit
4592 expressions on combined target teams before the target.
4593 (c_parser_omp_declare_target): If decl has "omp declare target" or
4594 "omp declare target link" attribute, and cgraph or varpool node already
4595 exists, then set corresponding flags. Call c_finish_omp_clauses
4596 in the parenthesized extended-list syntax case.
4597 * c-decl.c (c_decl_attributes): Don't diagnose block scope vars inside
4598 declare target.
4599 * c-typeck.c (handle_omp_array_sections_1): Allow non-zero low-bound
4600 on OMP_CLAUSE_REDUCTION array sections.
4601 (handle_omp_array_sections): Encode low-bound into the MEM_REF, either
4602 into the constant offset, or for variable low-bound using
4603 POINTER_PLUS_EXPR. For structure element based array sections use
4604 GOMP_MAP_ALWAYS_POINTER instead of GOMP_MAP_FIRSTPRIVATE_POINTER.
4605 (c_finish_omp_clauses): Drop generic_field_head, structure
4606 elements are now always mapped even as array section bases,
4607 diagnose same var in data sharing and mapping clauses. Diagnose if
4608 linear step on declare simd is neither a constant nor a uniform
4609 parameter. Look through POINTER_PLUS_EXPR for array section
4610 reductions. Diagnose the same var or function appearing multiple
4611 times on the same directive. Fix up wording for the to clause if t
4612 is neither a FUNCTION_DECL nor a VAR_DECL. Diagnose nonmonotonic
4613 modifier on kinds other than dynamic or guided or nonmonotonic
4614 modifier together with ordered clause.
4615
4bf9e5a8
TS
46162015-11-03 Thomas Schwinge <thomas@codesourcery.com>
4617 Chung-Lin Tang <cltang@codesourcery.com>
4618
4619 * c-parser.c (c_parser_omp_construct): Handle PRAGMA_OACC_ATOMIC.
4620
2adfab87
AM
46212015-10-29 Andrew MacLeod <amacleod@redhat.com>
4622
4623 * c-array-notation.c: Reorder #include's and remove duplicates.
4624 * c-aux-info.c: Likewise.
4625 * c-convert.c: Likewise.
4626 * c-decl.c: Likewise.
4627 * c-errors.c: Likewise.
4628 * c-lang.c: Likewise.
4629 * c-objc-common.c: Likewise.
4630 * c-parser.c: Likewise.
4631 * c-typeck.c: Likewise.
4632
e922069e
JW
46332015-10-26 Jim Wilson <jim.wilson@linaro.org>
4634
4635 PR debug/66068
4636 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
4637 after calling build_qualified_type.
4638
765dd391
CP
46392015-10-27 Cesar Philippidis <cesar@codesourcery.com>
4640 Thomas Schwinge <thomas@codesourcery.com>
4641 James Norris <jnorris@codesourcery.com>
4642 Joseph Myers <joseph@codesourcery.com>
4643 Julian Brown <julian@codesourcery.com>
4644 Bernd Schmidt <bschmidt@redhat.com>
4645
4646 * c-parser.c (c_parser_oacc_shape_clause): New.
4647 (c_parser_oacc_simple_clause): New.
4648 (c_parser_oacc_all_clauses): Add auto, gang, seq, vector, worker.
4649 (OACC_LOOP_CLAUSE_MASK): Add gang, worker, vector, auto, seq.
4650
88bae6f4
TS
46512015-10-27 Thomas Schwinge <thomas@codesourcery.com>
4652 James Norris <jnorris@codesourcery.com>
4653 Cesar Philippidis <cesar@codesourcery.com>
4654
4655 PR c/64765
4656 PR c/64880
4657 * c-parser.c (c_parser_oacc_loop): Add mask, cclauses formal
4658 parameters, and handle these. Adjust all users.
4659 (c_parser_oacc_kernels, c_parser_oacc_parallel): Merge functions
4660 into...
4661 (c_parser_oacc_kernels_parallel): ... this new function. Adjust
4662 all users.
4663 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels): Don't
4664 declare functions.
4665 (c_finish_omp_construct): Declare function.
4666 * c-typeck.c (c_finish_oacc_parallel, c_finish_oacc_kernels):
4667 Merge functions into...
4668 (c_finish_omp_construct): ... this new function.
4669
a8fc2579
RB
46702015-10-22 Richard Biener <rguenther@suse.de>
4671
4672 * c-typeck.c (c_finish_omp_clauses): Properly convert operands
4673 before folding a MINUS_EXPR.
4674
e9122ef6
MP
46752015-10-21 Marek Polacek <polacek@redhat.com>
4676
4677 PR c/68024
4678 * c-decl.c (start_function): Warn about vararg functions without
4679 a prototype.
4680
9f47c7e5
IE
46812015-10-21 Ilya Enkovich <enkovich.gnu@gmail.com>
4682
4683 * c-typeck.c (build_conditional_expr): Use boolean vector
4684 type for vector comparison.
4685 (build_vec_cmp): New.
4686 (build_binary_op): Use build_vec_cmp for comparison.
4687
fa60eeb9
MP
46882015-10-20 Marek Polacek <polacek@redhat.com>
4689
4690 * c-parser.c (is_cilkplus_vector_p): Don't define here.
4691
2c7020eb
MP
46922015-10-20 Marek Polacek <polacek@redhat.com>
4693
4694 PR c/67964
4695 * c-parser.c (c_parser_attributes): Break out of the loop if the
4696 token after an attribute isn't a comma.
4697
d9a6bd32
JJ
46982015-10-13 Jakub Jelinek <jakub@redhat.com>
4699 Aldy Hernandez <aldyh@redhat.com>
4700
4701 * c-parser.c (c_parser_pragma): Handle PRAGMA_OMP_ORDERED here.
4702 (c_parser_omp_clause_name): Handle OpenMP 4.5 clauses.
4703 (c_parser_omp_variable_list): Handle structure elements for
4704 map, to and from clauses. Handle array sections in reduction
4705 clause. Formatting fixes.
4706 (c_parser_omp_clause_if): Add IS_OMP argument, handle parsing of
4707 if clause modifiers.
4708 (c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
4709 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
4710 c_parser_omp_clause_defaultmap, c_parser_omp_clause_use_device_ptr,
4711 c_parser_omp_clause_is_device_ptr): New functions.
4712 (c_parser_omp_clause_ordered): Parse optional parameter.
4713 (c_parser_omp_clause_reduction): Handle array reductions.
4714 (c_parser_omp_clause_schedule): Parse optional simd modifier.
4715 (c_parser_omp_clause_nogroup, c_parser_omp_clause_orderedkind): New
4716 functions.
4717 (c_parser_omp_clause_linear): Parse linear clause modifiers.
4718 (c_parser_omp_clause_depend_sink): New function.
4719 (c_parser_omp_clause_depend): Parse source/sink depend kinds.
4720 (c_parser_omp_clause_map): Parse release/delete map kinds and
4721 optional always modifier.
4722 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_if
4723 and c_finish_omp_clauses callers.
4724 (c_parser_omp_all_clauses): Likewise. Parse OpenMP 4.5 clauses.
4725 Parse "to" as OMP_CLAUSE_TO_DECLARE if on declare target directive.
4726 (c_parser_oacc_cache): Adjust c_finish_omp_clauses caller.
4727 (OMP_CRITICAL_CLAUSE_MASK): Define.
4728 (c_parser_omp_critical): Parse critical clauses.
4729 (c_parser_omp_for_loop): Handle doacross loops, adjust
4730 c_finish_omp_for and c_finish_omp_clauses callers.
4731 (OMP_SIMD_CLAUSE_MASK): Add simdlen clause.
4732 (c_parser_omp_simd): Allow ordered clause if it has no parameter.
4733 (OMP_FOR_CLAUSE_MASK): Add linear clause.
4734 (c_parser_omp_for): Disallow ordered clause when combined with
4735 distribute. Disallow linear clause when combined with distribute
4736 and not combined with simd.
4737 (OMP_ORDERED_CLAUSE_MASK, OMP_ORDERED_DEPEND_CLAUSE_MASK): Define.
4738 (c_parser_omp_ordered): Add CONTEXT argument, remove LOC argument,
4739 parse clauses and if depend clause is found, don't parse a body.
4740 (c_parser_omp_parallel): Disallow copyin clause on target parallel.
4741 Allow target parallel without for after it.
4742 (OMP_TASK_CLAUSE_MASK): Add priority clause.
4743 (OMP_TARGET_DATA_CLAUSE_MASK): Add use_device_ptr clause.
4744 (c_parser_omp_target_data): Diagnose no map clauses or clauses with
4745 invalid kinds.
4746 (OMP_TARGET_UPDATE_CLAUSE_MASK): Add depend and nowait clauses.
4747 (OMP_TARGET_ENTER_DATA_CLAUSE_MASK,
4748 OMP_TARGET_EXIT_DATA_CLAUSE_MASK): Define.
4749 (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): New
4750 functions.
4751 (OMP_TARGET_CLAUSE_MASK): Add depend, nowait, private, firstprivate,
4752 defaultmap and is_device_ptr clauses.
4753 (c_parser_omp_target): Parse target parallel and target simd. Set
4754 OMP_TARGET_COMBINED on combined constructs. Parse target enter data
4755 and target exit data. Diagnose invalid map kinds.
4756 (OMP_DECLARE_TARGET_CLAUSE_MASK): Define.
4757 (c_parser_omp_declare_target): Parse OpenMP 4.5 forms of this
4758 construct.
4759 (c_parser_omp_declare_reduction): Use STRIP_NOPS when checking for
4760 &omp_priv.
4761 (OMP_TASKLOOP_CLAUSE_MASK): Define.
4762 (c_parser_omp_taskloop): New function.
4763 (c_parser_omp_construct): Don't handle PRAGMA_OMP_ORDERED here,
4764 handle PRAGMA_OMP_TASKLOOP.
4765 (c_parser_cilk_for): Adjust c_finish_omp_clauses callers.
4766 * c-tree.h (c_finish_omp_clauses): Add two new arguments.
4767 * c-typeck.c (handle_omp_array_sections_1): Fix comment typo.
4768 Add IS_OMP argument, handle structure element bases, diagnose
4769 bitfields, pass IS_OMP recursively, diagnose known zero length
4770 array sections in depend clauses, handle array sections in reduction
4771 clause, diagnose negative length even for pointers.
4772 (handle_omp_array_sections): Add IS_OMP argument, use auto_vec for
4773 types, pass IS_OMP down to handle_omp_array_sections_1, handle
4774 array sections in reduction clause, set
4775 OMP_CLAUSE_MAP_MAYBE_ZERO_LENGTH_ARRAY_SECTION if map could be zero
4776 length array section, use GOMP_MAP_FIRSTPRIVATE_POINTER for IS_OMP.
4777 (c_finish_omp_clauses): Add IS_OMP and DECLARE_SIMD arguments.
4778 Handle new OpenMP 4.5 clauses and new restrictions for the old ones.
4779
21ba0cea
MP
47802015-10-06 Marek Polacek <polacek@redhat.com>
4781
4782 * c-parser.c (c_parser_statement_after_labels): Use
4783 protected_set_expr_location.
4784 (c_parser_omp_clause_num_gangs): Likewise.
4785 (c_parser_omp_clause_num_threads): Likewise.
4786 (c_parser_omp_clause_num_workers): Likewise.
4787 (c_parser_omp_clause_vector_length): Likewise.
4788 (c_parser_omp_clause_num_teams): Likewise.
4789 (c_parser_omp_clause_thread_limit): Likewise.
4790 * c-typeck.c (build_c_cast): Likewise.
4791 (c_cast_expr): Likewise.
4792
624d31fe
RS
47932015-10-05 Richard Sandiford <richard.sandiford@arm.com>
4794
4795 * c-typeck.c (c_tree_equal): Use real_equal instead of
4796 REAL_VALUES_EQUAL.
4797
b8fd7909
JM
47982015-10-04 Jason Merrill <jason@redhat.com>
4799
4800 * c-parser.c (c_lex_one_token): Handle @synchronized.
4801 * c-decl.c (match_builtin_function_types): A declaration of a built-in
4802 can change whether the function is transaction_safe.
4803
1c7485af
MP
48042015-10-02 Marek Polacek <polacek@redhat.com>
4805
4806 PR c/67730
4807 * c-typeck.c (convert_for_assignment): Use the expansion point
4808 location throughout.
4809
3e3b8d63
MP
48102015-10-02 Marek Polacek <polacek@redhat.com>
4811
4812 PR c/64249
4813 * c-parser.c (c_parser_statement_after_labels): Add CHAIN parameter
4814 and pass it down to c_parser_if_statement.
4815 (c_parser_else_body): Add CHAIN parameter and pass it down to
4816 c_parser_statement_after_labels.
4817 (c_parser_if_statement): Add CHAIN parameter. Add code to warn about
4818 duplicated if-else-if conditions.
4819
aabef2de
MP
48202015-10-01 Marek Polacek <polacek@redhat.com>
4821
4822 * c-typeck.c (convert_for_assignment): Improve commentary.
4823
de8ddd5f
MP
48242015-09-30 Marek Polacek <polacek@redhat.com>
4825
4826 PR c/67730
4827 * c-typeck.c (c_finish_return): Use the expansion point location for
4828 certain "return with value" warnings.
4829
c4914de6
MLI
48302015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
4831
4832 * c-parser.c (pragma_lex): Add loc argument.
4833
0e36f5c7
MP
48342015-09-15 Marek Polacek <polacek@redhat.com>
4835
4836 PR c/67580
4837 * c-decl.c (tag_exists_p): New function.
4838 * c-parser.c (c_parser_declaration_or_fndef): Give a hint when
4839 struct/union/enum keywords are missing.
4840 * c-tree.h (tag_exists_p): Declare.
4841
2f3bb934
MP
48422015-09-15 Marek Polacek <polacek@redhat.com>
4843
4844 * c-decl.c (lookup_label): Return NULL_TREE instead of 0.
4845 (lookup_tag): Change the type of THISLEVEL_ONLY to bool.
4846 Return NULL_TREE instead of 0.
4847 (lookup_name): Return NULL_TREE instead of 0.
4848 (lookup_name_in_scope): Likewise.
4849 (shadow_tag_warned): Use true instead of 1 and NULL_TREE instead of 0.
4850 (parser_xref_tag): Use false instead of 0.
4851 (start_struct): Use true instead of 1.
4852 (start_enum): Use true instead of 1 and NULL_TREE instead of 0.
4853
aa256c4a
MP
48542015-09-14 Marek Polacek <polacek@redhat.com>
4855
4856 * c-typeck.c (set_nonincremental_init_from_string): Use
4857 HOST_WIDE_INT_M1U when shifting a negative value.
4858
dbb68221
MW
48592015-09-09 Mark Wielaard <mjw@redhat.com>
4860
4861 * c-typeck.c (build_binary_op): Check and warn when nonnull arg
4862 parm against NULL.
4863
a8a098ac
JJ
48642015-09-10 Jakub Jelinek <jakub@redhat.com>
4865
4866 PR c/67502
4867 * c-parser.c (c_parser_omp_for_loop): Emit DECL_EXPR stmts
4868 into OMP_FOR_PRE_BODY rather than before the loop.
4869
f4b189d5
JJ
48702015-09-09 Jakub Jelinek <jakub@redhat.com>
4871
0bb99c11
JJ
4872 PR c/67501
4873 * c-parser.c (c_parser_oacc_all_clauses,
4874 c_parser_omp_all_clauses): Remove invalid clause from
4875 list of clauses even if parser->error is set.
4876
fce5e5e3
JJ
4877 PR c/67500
4878 * c-parser.c (c_parser_omp_clause_aligned,
4879 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen): Fix up
4880 test for errors.
4881 * c-decl.c (temp_pop_parm_decls): Allow b->decl equal to
4882 error_mark_node.
4883
f4b189d5
JJ
4884 PR c/67495
4885 * c-parser.c (c_parser_omp_atomic): Use c_parser_cast_expression
4886 instead of c_parser_unary_expression. If the result is !lvalue_p,
4887 wrap the result of c_fully_fold into NON_LVALUE_EXPR.
4888
b2aaf235
MP
48892015-09-04 Marek Polacek <polacek@redhat.com>
4890
4891 PR sanitizer/67279
4892 * c-typeck.c (build_binary_op): Don't instrument static initializers.
4893
1807ffc1
MS
48942015-09-03 Martin Sebor <msebor@redhat.com>
4895
4896 PR c/66516
8b652e65
JJ
4897 * c-typeck.c (convert_arguments, parser_build_unary_op,
4898 build_conditional_expr, c_cast_expr, convert_for_assignment,
4899 build_binary_op, _objc_common_truthvalue_conversion): Call
1807ffc1
MS
4900 reject_gcc_builtin.
4901 (c_decl_implicit): Define.
4902
d04ff417
MP
49032015-09-02 Marek Polacek <polacek@redhat.com>
4904
4905 PR c/67432
4906 * c-parser.c (c_parser_enum_specifier): Give a better error for
4907 an empty enum.
4908
a79683d5
TS
49092015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
4910
4911 * c-aux-info.c, c-parser.c, c-tree.h: Remove useless typedefs.
4912
191a6b94
MP
49132015-08-12 Marek Polacek <polacek@redhat.com>
4914
4915 * c-decl.c (grokdeclarator): Call error_at instead of error and pass
4916 LOC to it.
4917
420a9d9b
MP
49182015-08-03 Marek Polacek <polacek@redhat.com>
4919
4920 PR c/67088
4921 * c-decl.c (check_bitfield_type_and_width): Add location parameter.
4922 Use it.
4923 (grokdeclarator): Pass LOC down to check_bitfield_type_and_width.
4924
992118a1
PP
49252015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
4926
4927 * c-parser.c (c_parser_if_body): Take token_indent_info
4928 argument. Call warn_for_misleading_indentation even when the
4929 body is a semicolon. Extract token_indent_infos corresponding
4930 to the guard, body and next tokens. Adjust call to
4931 warn_for_misleading_indentation accordingly.
4932 (c_parser_else_body): Likewise.
4933 (c_parser_if_statement): Likewise.
4934 (c_parser_while_statement): Likewise.
4935 (c_parser_for_statement): Likewise.
4936
46308474
LFSM
49372015-07-28 Luis Felipe Strano Moraes <luis.strano@gmail.com>
4938 Manuel López-Ibáñez <manu@gcc.gnu.org>
4939
4940 * c-decl.c (get_parm_info): Remove static var. Update warning
4941 message.
4942
05b28fd6
MP
49432015-07-27 Marek Polacek <polacek@redhat.com>
4944
4945 PR c++/66555
4946 PR c/54979
4947 * c-typeck.c (parser_build_binary_op): Call warn_tautological_cmp.
4948
451b5e48
MP
49492015-07-20 Marek Polacek <polacek@redhat.com>
4950
4951 PR c++/55095
4952 * c-typeck.c (digest_init): Pass OPT_Wpedantic to pedwarn_init.
4953 (build_binary_op): Warn about left shift overflows.
4954
1916bcb5
AM
49552015-07-09 Andrew MacLeod <amacleod@redhat.com>
4956
4957 * c-array-notation.c: Adjust includes for flags.h changes.
4958 * c-objc-common.c: Likewise.
4959
c7131fb2
AM
49602015-07-07 Andrew MacLeod <amacleod@redhat.com>
4961
4962 * c-array-notation.c: Adjust includes.
4963 * c-aux-info.c: Likewise.
4964 * c-convert.c: Likewise.
4965 * c-decl.c: Likewise.
4966 * c-errors.c: Likewise.
4967 * c-lang.c: Likewise.
4968 * c-objc-common.c: Likewise.
4969 * c-parser.c: Likewise.
4970 * c-typeck.c: Likewise.
4971
da2e71c9
MLI
49722015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
4973
4974 PR fortran/66605
4975 * c-decl.c (finish_function): Call do_warn_unused_parameter.
4976
b155cfd9
MP
49772015-06-29 Marek Polacek <polacek@redhat.com>
4978
4979 PR c/66322
4980 * c-typeck.c (struct c_switch): Add BOOL_COND_P and OUTSIDE_RANGE_P.
4981 (c_start_case): Set BOOL_COND_P and OUTSIDE_RANGE_P. Don't warn
4982 about -Wswitch-bool here.
4983 (do_case): Update c_add_case_label call.
4984 (c_finish_case): Update c_do_switch_warnings call.
4985
31521951
MP
49862015-06-27 Marek Polacek <polacek@redhat.com>
4987
4988 * c-typeck.c: Use VECTOR_TYPE_P throughout.
4989
22d03525
MP
49902015-06-26 Marek Polacek <polacek@redhat.com>
4991
4992 * c-array-notation.c (fix_builtin_array_notation_fn): Use
4993 INDIRECT_REF_P.
4994 * c-typeck.c (array_to_pointer_conversion): Likewise.
4995 (build_unary_op): Likewise.
4996 (c_finish_return): Likewise.
4997
f0889939
AM
49982015-06-25 Andrew MacLeod <amacleod@redhat.com>
4999
5000 * c-decl.c: Remove ipa-ref.h and plugin-api.h from include list.
5001 * c-parser.c: Likewise.
5002
8d67ee55
RS
50032015-06-25 Richard Sandiford <richard.sandiford@arm.com>
5004
5005 * c-decl.c (detect_field_duplicates_hash): Use nofree_ptr_hash
5006 instead of pointer_hash.
5007 (detect_field_duplicates): Likewise.
5008
0ae9bd27
MP
50092015-06-25 Marek Polacek <polacek@redhat.com>
5010
5011 * c-array-notation.c: Use VAR_P throughout.
5012 * c-decl.c: Likewise.
5013 * c-objc-common.c: Likewise.
5014 * c-parser.c: Likewise.
5015 * c-typeck.c: Likewise.
5016
62f9079a
MP
50172015-06-25 Marek Polacek <polacek@redhat.com>
5018
5019 * c-decl.c: Use is_global_var throughout.
5020 * c-parser.c: Likewise.
5021 * c-typeck.c: Likewise.
5022
abb226c9
AM
50232015-06-17 Andrew MacLeod <amacleod@redhat.com>
5024
5025 * c-array-notation.c: Do not include input.h, line-map.h or is-a.h.
5026 * c-aux-info.c: Likewise.
5027 * c-convert.c: Likewise.
5028 * c-decl.c: Likewise.
5029 * c-errors.c: Likewise.
5030 * c-lang.c: Likewise.
5031 * c-objc-common.c: Likewise.
5032 * c-parser.c: Likewise.
5033 * c-typeck.c: Likewise.
5034
8cbababc
JH
50352015-06-11 Jan Hubicka <hubicka@ucw.cz>
5036
5037 PR middle-end/66325
5038 * c-decl.c (start_enum): Set TYPE_PACKED consistently among type
5039 variants.
5040
a0349665
PMR
50412015-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
5042
5043 * c-decl.c (pop_scope): Register the main translation unit
5044 through the new debug hook.
5045
13fdf2e2
AM
50462015-06-08 Andrew MacLeod <amacleod@redhat.com>
5047
5048 * c-array-notation.c : Adjust include files.
5049 * c-aux-info.c : Likewise.
5050 * c-convert.c : Likewise.
5051 * c-decl.c : Likewise.
5052 * c-errors.c : Likewise.
5053 * c-lang.c : Likewise.
5054 * c-lang.h : Likewise.
5055 * c-objc-common.c : Likewise.
5056 * c-parser.c : Likewise.
5057 * c-typeck.c : Likewise.
5058
d7438551
AH
50592015-06-05 Aldy Hernandez <aldyh@redhat.com>
5060
5061 * c-decl.c (finish_struct): Save C_TYPE_INCOMPLETE_VARS and
5062 immediately clobber it.
5063 (c_write_global_declarations_1): Remove call to
5064 check_global_declaration_1.
5065 (c_write_global_declarations_2): Remove.
5066 (c_write_final_cleanups): Rename from c_write_global_declarations.
5067 Remove call to finalize_compilation_unit.
5068 Remove calls to debugging hooks.
5069 * c-objc-common.c: Adjust comment for c_warn_unused_global_decl.
5070 * c-objc-common.h: Remove LANG_HOOKS_WRITE_GLOBALS.
5071 * c-tree.h: Remove c_write_global_declarations.
5072
ecb9f223
AM
50732015-06-04 Andrew MacLeod <amacleod@redhat.com>
5074
5075 * c-array-notation.c: Adjust includes for restructured coretypes.h.
5076 * c-aux-info.c: Likewise.
5077 * c-convert.c: Likewise.
5078 * c-decl.c: Likewise.
5079 * c-errors.c: Likewise.
5080 * c-lang.c: Likewise.
5081 * c-objc-common.c: Likewise.
5082 * c-parser.c: Likewise.
5083 * c-typeck.c: Likewise.
5084
9482b620
MP
50852015-06-04 Marek Polacek <polacek@redhat.com>
5086
5087 PR c/66341
5088 * c-typeck.c (build_c_cast): Wrap VALUE into NON_LVALUE_EXPR if
5089 it is a lvalue.
5090
bc51ace3
PK
50912015-06-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
5092
5093 * c-decl.c (warn_cxx_compat_finish_struct): New parameters code, record_loc.
5094 Warn for empty struct.
5095 (finish_struct): Pass TREE_CODE(t) and loc to warn_cxx_compat_finish_struct.
5096
ea5b45b6
AT
50972015-06-02 Andres Tiraboschi <andres.tiraboschi@tallertechnologies.com>
5098
5099 * c-decl.c (start_function): Call plugin before parsing.
5100 (finish_function): Call plugin after parsing.
5101
c2d47482
PK
51022015-06-02 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
5103
5104 PR c/49551
5105 * c-decl.c (merge_decls): Merge DECL_COMMON.
5106
a95492ab
JW
51072015-05-22 Jim Wilson <jim.wilson@linaro.org>
5108
5109 * Make-lang.in (check_gcc_pallelize): Define.
5110
fd5c817a
MP
51112015-05-22 Marek Polacek <polacek@redhat.com>
5112
5113 PR c/47043
5114 * c-parser.c (c_parser_enum_specifier): Parse and apply enumerator
5115 attributes.
5116
c7b70a3c
MP
51172015-05-21 Marek Polacek <polacek@redhat.com>
5118
5119 * c-typeck.c (inform_declaration): Use DECL_IS_BUILTIN instead of
5120 DECL_BUILT_IN.
5121
21b634ae
MP
51222015-05-20 Marek Polacek <polacek@redhat.com>
5123
5124 * c-decl.c: Use VAR_OR_FUNCTION_DECL_P throughout.
5125 * c-typeck.c: Likewise.
5126
296a8c2f
MP
51272015-05-19 Marek Polacek <polacek@redhat.com>
5128
5129 * c-typeck.c (start_init): Use AGGREGATE_TYPE_P.
5130
41b37d5e
JJ
51312015-05-19 Jakub Jelinek <jakub@redhat.com>
5132
5133 PR middle-end/66199
5134 * c-parser.c (c_parser_omp_for_loop): Don't add
5135 OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
5136 OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
5137 (c_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
5138 constructs.
5139
fab27f52
MM
51402015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
5141
5142 * c-typeck.c (build_array_ref): Use std::swap instead of explicit
296a8c2f 5143 swaps.
fab27f52 5144
40de31cf
MLI
51452015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
5146
5147 PR fortran/44054
5148 * c-objc-common.c (c_tree_printer): Replace locus pointer with
5149 accessor function.
5150
3aa3c9fc
MP
51512015-05-14 Marek Polacek <polacek@redhat.com>
5152
5153 PR c/66066
5154 PR c/66127
5155 * c-typeck.c (digest_init): Call pedwarn_init with OPT_Wpedantic
5156 rather than with 0.
5157
c3388e62
DM
51582015-05-12 David Malcolm <dmalcolm@redhat.com>
5159
5160 * c-parser.c (c_parser_if_body): Add param "if_loc", use it
5161 to add a call to warn_for_misleading_indentation.
5162 (c_parser_else_body): Likewise, adding param "else_loc".
5163 (c_parser_if_statement): Check for misleading indentation.
5164 (c_parser_while_statement): Likewise.
5165 (c_parser_for_statement): Likewise.
5166
755e528f
MP
51672015-05-08 Marek Polacek <polacek@redhat.com>
5168
5169 PR c/64918
5170 * c-typeck.c (add_pending_init): Use OPT_Woverride_init_side_effects.
5171 (output_init_element): Likewise.
5172
0173bd2a
MP
51732015-05-07 Marek Polacek <polacek@redhat.com>
5174
5175 PR c/65179
5176 * c-typeck.c (build_binary_op): Warn when left shifting a negative
5177 value.
5178
9babc352
MP
51792015-04-30 Marek Polacek <polacek@redhat.com>
5180
5181 * c-typeck.c (set_init_label): Call error_at instead of error and
5182 pass LOC to it.
5183
ac9f18db
MP
5184 * c-typeck.c (c_incomplete_type_error): Refactor to use %qT. Print
5185 the type of a decl.
5186
ec3fba51
MP
5187 * c-typeck.c (c_build_va_arg): Clarify the error message.
5188
b811915d
TS
51892015-04-29 Thomas Schwinge <thomas@codesourcery.com>
5190
5191 * c-parser.c (c_parser_oacc_enter_exit_data): Use
5192 OMP_STANDALONE_CLAUSES.
5193
f3075008
MP
51942015-04-28 Marek Polacek <polacek@redhat.com>
5195
5196 * c-parser.c (c_parser_binary_expression): Remove duplicate line.
5197
4e81b788
MP
51982015-04-28 Marek Polacek <polacek@redhat.com>
5199
5200 PR c/65901
5201 * c-typeck.c (c_build_va_arg): Require TYPE be a complete type.
5202
6c1db78e
MP
52032015-04-25 Marek Polacek <polacek@redhat.com>
5204
5205 PR c/52085
5206 * c-decl.c (finish_enum): Copy over TYPE_ALIGN. Also check for "mode"
5207 attribute.
5208
5c4abbb8
MP
52092015-04-23 Marek Polacek <polacek@redhat.com>
5210
5211 PR c/65345
5212 * c-decl.c (set_labels_context_r): New function.
5213 (store_parm_decls): Call it via walk_tree_without_duplicates.
5214 * c-typeck.c (convert_lvalue_to_rvalue): Use create_tmp_var_raw
5215 instead of create_tmp_var. Build TARGET_EXPR instead of
5216 COMPOUND_EXPR.
5217 (build_atomic_assign): Use create_tmp_var_raw instead of
5218 create_tmp_var. Build TARGET_EXPRs instead of MODIFY_EXPR.
5219
06aca1d5
IV
52202015-04-20 Ilya Verbin <ilya.verbin@intel.com>
5221
5222 * c-parser.c (c_parser_oacc_enter_exit_data): Remove excess semicolon.
5223 (c_parser_omp_target_update): Add missed %> to error_at ().
5224
8fba1830
BRF
52252015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
5226
5227 PR target/55143
5228 * c-decl.c (c_default_pointer_mode): Remove definition.
5229 * c-tree.h (c_default_pointer_mode): Remove declaration.
5230
62021f64
TB
52312015-03-27 Tobias Burnus <burnus@net-b.de>
5232
5233 PR c/65586
5234 * c-parser.c (c_parser_skip_to_pragma_eol): Optionally, don't
5235 error out.
5236 (c_parser_omp_for, c_parser_omp_parallel, c_parser_omp_distribute,
5237 c_parser_omp_teams, c_parser_omp_target, c_parser_omp_declare):
5238 Update calls to not error for skipped omp pragmas with -fopenmp-simd.
5239
9b65e171
JJ
52402015-03-19 Jakub Jelinek <jakub@redhat.com>
5241
5242 * c-decl.c (c_decl_attributes): Also add "omp declare target"
5243 attribute for DECL_EXTERNAL VAR_DECLs.
5244
17958621
JJ
52452015-03-11 Jakub Jelinek <jakub@redhat.com>
5246
5247 * c-parser.c (c_parse_init): Don't call xstrdup on get_identifier
5248 argument.
5249
7ccb1a11
JJ
52502015-03-10 Jakub Jelinek <jakub@redhat.com>
5251
5252 PR c/65120
5253 * c-typeck.c (parser_build_binary_op): Check for tcc_comparison
5254 before preparing arguments to warn_logical_not_parentheses.
5255
01177669
JJ
52562015-03-09 Jakub Jelinek <jakub@redhat.com>
5257
5258 PR c/65120
5259 * c-typeck.c (parser_build_binary_op): Don't warn for
5260 !!x == y or !b == y where b is _Bool.
5261
802ac282
MP
52622015-03-09 Marek Polacek <polacek@redhat.com>
5263
5264 * c-convert.c (convert): Make use of do_ubsan_in_current_function.
5265 * c-decl.c (grokdeclarator): Likewise.
5266 * c-typeck.c (build_binary_op): Likewise.
5267
e5165b60
MP
52682015-02-27 Marek Polacek <polacek@redhat.com>
5269
5270 PR c/65228
5271 * c-decl.c (start_decl): Return NULL_TREE if decl is an error node.
5272
065d214c
MP
52732015-02-14 Marek Polacek <polacek@redhat.com>
5274
5275 PR c/64768
5276 * c-decl.c (grokdeclarator): Set the range of a flexible array member
5277 declared through a typedef name.
5278
e5d9235b
MP
52792015-02-13 Marek Polacek <polacek@redhat.com>
5280
5281 PR c/65050
5282 * c-decl.c (grokdeclarator): Print also the type when giving
5283 the error message about array's incomplete element type.
5284
fa01ffcc
JJ
52852015-02-11 Jakub Jelinek <jakub@redhat.com>
5286
5287 PR c/64824
5288 * c-parser.c (c_parser_binary_expression): Fix OpenMP stack[sp].prec
5289 check in the POP macro.
5290
c3e38a03
MP
52912015-02-09 Marek Polacek <polacek@redhat.com>
5292
5293 PR c/64856
5294 * c-typeck.c (process_init_element): Don't always wrap
5295 COMPOUND_LITERAL_EXPR in a SAVE_EXPR in C99 mode when
5296 initializing a range of elements.
5297
4886ec8e
JJ
52982015-02-04 Jakub Jelinek <jakub@redhat.com>
5299
5300 PR c/64824
5301 PR c/64868
5302 * c-parser.c (c_parser_omp_atomic): Handle RDIV_EXPR.
5303
c3e38a03 53042015-02-02 Bruno Loff <bruno.loff@gmail.com>
a4bb6959
BL
5305
5306 * c-parser.c (c_parser_declspecs): Call invoke_plugin_callbacks after
5307 processing enum declaration.
5308
7b33f0c8
MP
53092015-01-29 Marek Polacek <polacek@redhat.com>
5310
5311 PR c/64709
5312 * c-typeck.c (pop_init_level): If constructor_elements has
5313 exactly one element with integer_zerop value, set constructor_zeroinit
5314 to 1. Remove braces around warning_init call.
5315
dea63e49
JJ
53162015-01-27 Jakub Jelinek <jakub@redhat.com>
5317
5318 PR c/64766
5319 * c-typeck.c (store_init_value): Don't overwrite DECL_INITIAL
5320 of FUNCTION_DECLs with error_mark_node.
5321
d38f7dce
JJ
53222015-01-26 Jakub Jelinek <jakub@redhat.com>
5323
5324 PR c/64778
5325 * c-typeck.c (convert_arguments): Return -1 if there are
5326 error_args, even if we've diagnosed too many arguments.
5327
cbf5d0e7
RB
53282015-01-21 Richard Biener <rguenther@suse.de>
5329
5330 PR middle-end/64313
5331 * c-decl.c (merge_decls): Call set_builtin_decl_declared_p
5332 for builtins the user declared correctly.
5333
41dbbb37
TS
53342015-01-15 Thomas Schwinge <thomas@codesourcery.com>
5335 Bernd Schmidt <bernds@codesourcery.com>
5336 Cesar Philippidis <cesar@codesourcery.com>
5337 James Norris <jnorris@codesourcery.com>
5338 Jakub Jelinek <jakub@redhat.com>
5339 Ilmir Usmanov <i.usmanov@samsung.com>
5340
5341 * c-parser.c: Include "gomp-constants.h".
5342 (c_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
5343 omp_clause_map_kind. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
5344 Use OMP_CLAUSE_SET_MAP_KIND.
5345 (c_parser_pragma): Handle PRAGMA_OACC_ENTER_DATA,
5346 PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_UPDATE.
5347 (c_parser_omp_construct): Handle PRAGMA_OACC_CACHE,
5348 PRAGMA_OACC_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP,
5349 PRAGMA_OACC_PARALLEL, PRAGMA_OACC_WAIT.
5350 (c_parser_omp_clause_name): Handle "auto", "async", "copy",
5351 "copyout", "create", "delete", "deviceptr", "gang", "host",
5352 "num_gangs", "num_workers", "present", "present_or_copy", "pcopy",
5353 "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
5354 "present_or_create", "pcreate", "seq", "self", "vector",
5355 "vector_length", "wait", "worker".
5356 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
5357 (OACC_ENTER_DATA_CLAUSE_MASK, OACC_EXIT_DATA_CLAUSE_MASK)
5358 (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
5359 (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
5360 (c_parser_omp_variable_list): Handle OMP_CLAUSE__CACHE_.
5361 (c_parser_oacc_wait_list, c_parser_oacc_data_clause)
5362 (c_parser_oacc_data_clause_deviceptr)
5363 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_workers)
5364 (c_parser_oacc_clause_async, c_parser_oacc_clause_wait)
5365 (c_parser_omp_clause_vector_length, c_parser_oacc_all_clauses)
5366 (c_parser_oacc_cache, c_parser_oacc_data, c_parser_oacc_kernels)
5367 (c_parser_oacc_enter_exit_data, c_parser_oacc_loop)
5368 (c_parser_oacc_parallel, c_parser_oacc_update)
5369 (c_parser_oacc_wait): New functions.
5370 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels)
5371 (c_finish_oacc_data): New prototypes.
5372 * c-typeck.c: Include "gomp-constants.h".
5373 (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR. Use
5374 GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use
5375 OMP_CLAUSE_SET_MAP_KIND.
5376 (c_finish_oacc_parallel, c_finish_oacc_kernels)
5377 (c_finish_oacc_data): New functions.
5378 (c_finish_omp_clauses): Handle OMP_CLAUSE__CACHE_,
5379 OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS,
5380 OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_ASYNC, OMP_CLAUSE_WAIT,
5381 OMP_CLAUSE_AUTO, OMP_CLAUSE_SEQ, OMP_CLAUSE_GANG,
5382 OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR, and OMP_CLAUSE_MAP's
5383 GOMP_MAP_FORCE_DEVICEPTR.
5384
adfac8df
JJ
53852015-01-09 Michael Collison <michael.collison@linaro.org>
5386
5387 * c-array-notation.c: Include hash-set.h, machmode.h,
5388 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
5389 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
5390 * c-aux-info.c: Ditto.
5391 * c-convert.c: Ditto.
5392 * c-decl.c: Ditto.
5393 * c-errors.c: Ditto.
5394 * c-lang.c: Dittoxs.
5395 * c-objc-common.c: Ditto.
5396 * c-parser.c: Ditto.
5397 * c-typeck.c: Include hash-set.h, machmode.h,
5398 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
5399 fold-const.h, wide-int.h, inchash.h, real.h and
5400 fixed-value.h due to flattening of tree.h.
5401
2cc901dc
MP
54022015-01-07 Marek Polacek <polacek@redhat.com>
5403
5404 PR c/64417
5405 * c-typeck.c (process_init_element): Disallow initialization of
5406 a flexible array member with a string constant if the structure
5407 is in an array.
5408
5624e564
JJ
54092015-01-05 Jakub Jelinek <jakub@redhat.com>
5410
e5341100
JJ
5411 PR sanitizer/64344
5412 * c-typeck.c (convert_for_assignment, c_finish_return): For
5413 -fsanitize=float-cast-overflow casts from REAL_TYPE to integer/enum
5414 types also set in_late_binary_op around convert call.
5415 * c-convert.c (convert): For -fsanitize=float-cast-overflow REAL_TYPE
5416 to integral type casts, if not in_late_binary_op, pass c_fully_fold
5417 result on expr as last argument to ubsan_instrument_float_cast,
5418 if in_late_binary_op, don't use c_save_expr but save_expr.
5419
5624e564
JJ
5420 Update copyright years.
5421
5bd012f8
MP
54222015-01-05 Marek Polacek <polacek@redhat.com>
5423
5424 PR c/64423
5425 * c-typeck.c (build_array_ref): Pass loc down to
5426 warn_array_subscript_with_type_char.
5427
3f8257db 54282014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
768952be
MU
5429
5430 * c-typeck.c: New behavious for pointers to arrays with qualifiers
8e745a17 5431 (common-pointer-type): For pointers to arrays take qualifiers from
768952be 5432 element type.
8e745a17 5433 (build_conditional_expr): Add warnings for lost qualifiers.
768952be 5434 (comp-target-types): Allow pointers to arrays with different qualifiers.
8e745a17 5435 (convert-for-assignment): Adapt warnings for discarded qualifiers. Add
768952be 5436 WARNING_FOR_QUALIFIERS macro and rename WARN_FOR_QUALIFIERS
8e745a17 5437 to PEDWARN_FOR_QUALIFIERS.
768952be 5438
8f94a8c4
JJ
54392014-12-17 Jakub Jelinek <jakub@redhat.com>
5440
5441 PR sanitizer/64289
5442 * c-convert.c: Include ubsan.h.
5443 (convert): For real -> integral casts and
5444 -fsanitize=float-cast-overflow don't call convert_to_integer, but
5445 instead instrument the float cast directly.
5446
b731b390
JJ
54472014-11-29 Jakub Jelinek <jakub@redhat.com>
5448
5449 * c-typeck.c (convert_lvalue_to_rvalue, build_atomic_assign,
5450 c_finish_stmt_expr): Remove NULL last argument from
5451 create_tmp_var_raw and create_tmp_var calls.
5452 * c-array-notation.c (fix_builtin_array_notation_fn,
5453 build_array_notation_expr, fix_conditional_array_notations_1,
5454 fix_array_notation_expr, fix_array_notation_call_expr): Likewise.
5455
541e35a6
MP
54562014-11-28 Marek Polacek <polacek@redhat.com>
5457
5458 PR c/63862
5459 * c-typeck.c (build_binary_op) <RSHIFT_EXPR, LSHIFT_EXPR>: Don't
5460 convert the right operand to integer type.
5461
b286be94
MP
54622014-11-25 Marek Polacek <polacek@redhat.com>
5463
5464 PR c/63877
5465 * c-decl.c (start_function): Disable -Wmissing-declarations warning
5466 for inline functions.
5467
aa7da51a
JJ
54682014-11-21 Jakub Jelinek <jakub@redhat.com>
5469
5470 PR target/63764
5471 * c-typeck.c (build_array_ref): Adjust
5472 convert_vector_to_pointer_for_subscript caller. If it returns true,
5473 call non_lvalue_loc on the result.
5474
d876207f
RB
54752014-11-11 Richard Biener <rguenther@suse.de>
5476
5477 * c-decl.c (c_init_decl_processing): Do not set pedantic_lvalues
5478 to true.
5479
e5e44252
AK
54802014-11-10 Andi Kleen <ak@linux.intel.com>
5481
5482 PR c/60804
5483 * c-parser.c (c_parser_statement_after_labels): Call
5484 check_no_cilk.
5485 (c_parser_if_statement): Dito.
5486 (c_parser_switch_statement): Dito.
5487 (c_parser_while_statement): Dito.
5488 (c_parser_do_statement): Dito.
5489 (c_parser_for_statement): Dito.
5490 * c-typeck.c (c_finish_loop): Dito.
5491
13c21655
PC
54922014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
5493
5494 * c-typeck.c (build_binary_op): Use OPT_Wshift_count_negative and
5495 OPT_Wshift_count_overflow in the warnings.
5496
2d51fcef
MP
54972014-10-30 Marek Polacek <polacek@redhat.com>
5498
5499 * c-objc-common.c (c_tree_printer) <case 'T'>: For a typedef name,
5500 print the stripped version as well, if they're not the same.
5501
ef4bddc2
RS
55022014-10-29 Richard Sandiford <richard.sandiford@arm.com>
5503
5504 * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from
5505 machine_mode.
5506
c582198b
AM
55072014-10-28 Andrew MacLeod <amacleod@redhat.com>
5508
5509 * c-decl.c: Adjust include files.
5510 * c-parser.c: Ditto.
5511
ddc8de03
PM
55122014-10-27 Phil Muldoon <pmuldoon@redhat.com>
5513 Tom Tromey <tromey@redhat.com>
5514
5515 * c-tree.h (enum c_oracle_request): New.
5516 (c_binding_oracle_function): New typedef.
5517 (c_binding_oracle, c_pushtag, c_bind): Declare.
5518 * c-decl.c (c_binding_oracle): New global.
5519 (I_SYMBOL_CHECKED): New macro.
5520 (i_symbol_binding): New function.
5521 (I_SYMBOL_BINDING, I_SYMBOL_DECL): Redefine.
5522 (I_TAG_CHECKED): New macro.
5523 (i_tag_binding): New function.
5524 (I_TAG_BINDING, I_TAG_DECL): Redefine.
5525 (I_LABEL_CHECKED): New macro.
5526 (i_label_binding): New function.
5527 (I_LABEL_BINDING, I_LABEL_DECL): Redefine.
5528 (c_print_identifier): Save and restore c_binding_oracle.
5529 (c_pushtag, c_bind): New functions.
5530
60393bbc
AM
55312014-10-27 Andrew MacLeod <amacleod@redhat.com>
5532
5533 * c-typeck.c: Adjust include files.
5534
d723bb7c
MLI
55352014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
5536
5537 PR c++/53061
5538 * c-objc-common.c (c_objc_common_init): Do not do diagnostics
5539 initialization here...
5540 (c_initialize_diagnostics): ... but here. Set defaults after
5541 building pretty-printer.
5542
1bc5a451
MP
55432014-10-23 Marek Polacek <polacek@redhat.com>
5544
5545 PR c/63626
5546 * c-decl.c (pop_scope): Don't print warning in external_scope.
5547
4435bb92
MP
55482014-10-19 Marek Polacek <polacek@redhat.com>
5549
5550 PR c/63567
5551 * c-typeck.c (output_init_element): Allow initializing objects with
5552 static storage duration with compound literals even in C99 and add
5553 pedwarn for it.
5554
7278465e
MP
55552014-10-17 Marek Polacek <polacek@redhat.com>
5556
5557 PR c/63567
5558 * c-typeck.c (digest_init): Allow initializing objects with static
5559 storage duration with compound literals even in C99 and add pedwarn
5560 for it.
5561
d9b7be2e
MP
55622014-10-17 Marek Polacek <polacek@redhat.com>
5563
5564 PR c/63543
5565 * c-tree.h (C_TYPE_ERROR_REPORTED): Define.
5566 * c-typeck.c (build_indirect_ref): Don't print the "dereferencing..."
5567 error multiple times. Print the type.
5568
f406ae1f
MP
55692014-10-17 Marek Polacek <polacek@redhat.com>
5570
5571 PR c/63549
5572 * c-typeck.c (build_array_ref): Bail if the index in an incomplete
5573 type.
5574
92574c7c
MP
55752014-10-17 Marek Polacek <polacek@redhat.com>
5576
5577 * c-decl.c (grokdeclarator): Use OPT_Wimplicit_int unconditionally.
5578 (start_function): Use OPT_Wimplicit_int instead of 0.
5579 (store_parm_decls_oldstyle): Likewise.
5580
1bc4a978
MT
55812014-10-17 Alan Modra <amodra@gmail.com>
5582
5583 PR middle-end/61848
5584 * c-decl.c (merge_decls): Don't merge section name or tls model
5585 to newdecl symtab node, instead merge to olddecl. Override
5586 existing olddecl section name. Set tls_model for all thread-local
5587 vars, not just OMP thread-private ones. Remove incorrect comment.
5588
83685514
AM
55892014-10-16 Andrew MacLeod <amacleod@redhat.com>
5590
5591 * c-decl.c: Adjust include files.
5592
78a7c317
DD
55932014-10-14 DJ Delorie <dj@redhat.com>
5594
5595 * c-parser.c (c_parse_init): Add RID entries for each __intN.
5596 (c_token_starts_typename): Check all __intN, not just __int128.
5597 (c_token_starts_declspecs): Likewise.
5598 (c_parser_declspecs): Likewise.
5599 (c_parser_attribute_any_word): Likewise.
5600 (c_parser_objc_selector): Likewise.
5601 * c-tree.h (c_typespec_keyword): cts_int128 -> cts_int_n.
5602 (struct c_declspecs): Add int_n_idx field to record *which* __intN
5603 is specified.
5604 * c-decl.c (declspecs_add_type): Check for all __intN, not just
5605 __int128.
5606 (finish_declspecs): Likewise.
5607
74d98c1e
AB
56082014-10-13 Anthony Brandon <anthony.brandon@gmail.com>
5609
8e745a17 5610 * c-parser.c (c_parser_all_labels): New function to replace
74d98c1e 5611 the duplicate code.
8e745a17 5612 (c_parser_statement): Call the new function.
74d98c1e 5613
84937de2
MP
56142014-10-09 Marek Polacek <polacek@redhat.com>
5615
5616 PR c/63480
5617 * c-typeck.c (pop_init_level): Don't warn about initializing
5618 with { }.
5619
0382aaa0
MP
56202014-10-07 Marek Polacek <polacek@redhat.com>
5621
5622 PR c/59717
5623 * c-decl.c (header_for_builtin_fn): New function.
5624 (implicitly_declare): Suggest which header to include.
5625
7a0ca710
MP
56262014-10-07 Marek Polacek <polacek@redhat.com>
5627
5628 * c-convert.c (convert): Use error_operand_p.
5629 * c-typeck.c (require_complete_type): Likewise.
5630 (really_atomic_lvalue): Likewise.
5631 (digest_init): Likewise.
5632 (handle_omp_array_sections_1): Likewise.
5633
6bc8a126
MP
56342014-10-03 Marek Polacek <polacek@redhat.com>
5635
5636 PR c/63453
5637 * c-decl.c (pop_scope): Don't warn about "inline function declared
5638 but never defined" for functions marked with gnu_inline attribute.
5639
d90c0a59
JJ
56402014-09-25 Jakub Jelinek <jakub@redhat.com>
5641
5642 PR c++/63249
5643 * c-parser.c (c_parser_omp_variable_list): Call mark_exp_read
5644 on low_bound and length.
5645
083e891e
MP
56462014-09-24 Marek Polacek <polacek@redhat.com>
5647
5648 PR c/61405
5649 PR c/53874
5650 * c-parser.c: Don't define CPP_KEYWORD.
5651 (c_parser_switch_statement): Pass original type to c_finish_case.
5652 * c-tree.h (c_finish_case): Update declaration.
5653 * c-typeck.c (c_finish_case): Add TYPE parameter. Pass it
5654 conditionally to c_do_switch_warnings.
5655
8d95fe25
MP
56562014-09-03 Marek Polacek <polacek@redhat.com>
5657
5658 PR c/62024
5659 * c-parser.c (c_parser_static_assert_declaration_no_semi): Strip no-op
5660 conversions.
5661
9a771876
JJ
56622014-09-02 Jakub Jelinek <jakub@redhat.com>
5663 Balaji V. Iyer <balaji.v.iyer@intel.com>
5664 Igor Zamyatin <igor.zamyatin@intel.com>
5665
5666 * c-parser.c (c_parser_cilk_for): New function.
5667 (c_parser_cilk_grainsize): Likewise.
5668 (c_get_temp_regvar): Likewise.
5669 (c_parser_statement_after_labels): Added RID_CILK_FOR case.
5670 (c_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
5671 (c_parser_omp_for_loop): Added CILK_FOR and CILK_SIMD checks.
5672 * c-typeck.c (c_finish_omp_clauses): Added OMP_CLAUSE__CILK_FOR_COUNT_
5673 case.
5674
b7679d96
CG
56752014-08-27 Chen Gang <gang.chen.5i5j@gmail.com>
5676
5677 * c-aux-info.c (gen_type): Resize 'buff' from 10 to 23 bytes,
5678 with using HOST_WIDE_INT without truncation to 'int'
5679
59ea0364
MP
56802014-08-22 Marek Polacek <polacek@redhat.com>
5681
5682 PR c++/62199
5683 * c-typeck.c (parser_build_binary_op): Adjust call to
5684 warn_logical_not_parentheses.
5685
671a475e
IZ
56862014-08-22 Igor Zamyatin <igor.zamyatin@intel.com>
5687
5688 PR other/62008
5689 * c-parser.c (c_parser_array_notation): Check for correct
5690 type of an array added.
5691
04159acf
MP
56922014-08-19 Marek Polacek <polacek@redhat.com>
5693
5694 PR c++/62153
5695 * c-typeck.c (build_binary_op): If either operand of a comparison
5696 is a boolean expression, call maybe_warn_bool_compare.
5697
c77935ee
PP
56982014-08-19 Patrick Palka <ppalka@gcc.gnu.org>
5699
5700 PR c/45584
5701 * c-typeck.c (build_c_cast): Do a conversion even when the
5702 TYPE_MAIN_VARIANTs are the same.
5703
35aff4fb
MP
57042014-08-19 Marek Polacek <polacek@redhat.com>
5705
5706 * c-decl.c (diagnose_mismatched_decls): Unconditionally call
5707 pedwarn_c99 instead of pedwarn.
5708 (grokfield): Likewise.
5709 (warn_defaults_to): New function.
5710 (grokdeclarator): Call warn_defaults_to instead of pedwarn_c99.
5711 Unconditionally call pedwarn_c99 instead of pedwarn.
5712 (start_function): Call warn_defaults_to instead of pedwarn_c99.
5713 (declspecs_add_scspec): Call pedwarn_c99 instead of pedwarn, don't
5714 check flag_isoc11 before.
5715 * c-errors.c (pedwarn_c99): Change the return type to bool.
5716 Handle -Wc99-c11-compat.
5717 * c-parser.c (disable_extension_diagnostics): Handle
5718 warn_c99_c11_compat.
5719 (restore_extension_diagnostics): Likewise.
5720 (c_parser_static_assert_declaration_no_semi): Call pedwarn_c99
5721 instead of pedwarn, don't check flag_isoc11 before.
5722 (c_parser_declspecs): Likewise.
5723 (c_parser_alignas_specifier): Likewise.
5724 (c_parser_alignof_expression): Likewise.
5725 (c_parser_generic_selection): Likewise.
5726 * c-tree.h (pedwarn_c99): Update declaration.
5727 * c-typeck.c (c_finish_return): Call pedwarn or warning_at instead
5728 of pedwarn_c99.
5729
177cce46
MP
57302014-08-19 Marek Polacek <polacek@redhat.com>
5731
5732 * c-decl.c (warn_variable_length_array): Pass OPT_Wvla unconditionally
5733 to pedwarn_c90.
5734 * c-errors.c: Include "opts.h".
5735 (pedwarn_c90): Rewrite to handle -Wno-c90-c99-compat better.
5736 * c-parser.c (disable_extension_diagnostics): Handle negative value
5737 of warn_c90_c99_compat, too.
5738 (restore_extension_diagnostics): Likewise.
5739 (c_parser_compound_statement_nostart): Pass
5740 OPT_Wdeclaration_after_statement unconditionally to pedwarn_c90.
5741
6dc99c33
MP
57422014-08-12 Marek Polacek <polacek@redhat.com>
5743
5744 * c-parser.c (c_parser_postfix_expression) <case RID_FUNCTION_NAME>:
5745 Add pedwarn.
5746 (c_parser_postfix_expression) <case RID_PRETTY_FUNCTION_NAME>:
5747 Likewise.
5748 (c_parser_postfix_expression) <case RID_C99_FUNCTION_NAME>: Likewise.
5749
3f8257db 57502014-08-10 Marek Polacek <polacek@redhat.com>
f3bede71
MP
5751
5752 PR c/51849
5753 * c-decl.c (build_array_declarator): Remove check for !flag_isoc99.
5754 Call pedwarn_c90 instead of pedwarn.
5755 (check_bitfield_type_and_width): Likewise.
5756 (declspecs_add_qual): Likewise.
5757 (declspecs_add_type): Likewise.
5758 (warn_variable_length_array): Unify function for -pedantic and -Wvla.
5759 Adjust to only call pedwarn_c90.
5760 (grokdeclarator): Remove pedantic && !flag_isoc99 check. Call
5761 pedwarn_c90 instead of pedwarn.
5762 * c-errors.c (pedwarn_c90): Handle -Wc90-c99-compat.
5763 * c-parser.c (disable_extension_diagnostics): Handle
5764 warn_c90_c99_compat.
5765 (restore_extension_diagnostics): Likewise.
5766 (c_parser_enum_specifier): Remove check for !flag_isoc99. Call
5767 pedwarn_c90 instead of pedwarn.
5768 (c_parser_initelt): Likewise.
5769 (c_parser_postfix_expression): Likewise.
5770 (c_parser_postfix_expression_after_paren_type): Likewise.
5771 (c_parser_compound_statement_nostart): Remove check for !flag_isoc99.
5772 * c-tree.h: Fix formatting.
5773 * c-typeck.c (build_array_ref): Remove check for !flag_isoc99. Call
5774 pedwarn_c90 instead of pedwarn.
5775
9f25a338
TS
57762014-08-07 Trevor Saunders <tsaunders@mozilla.com>
5777
5778 * c-typeck.c: Remove include of pointer-set.h.
5779
044331a8
MP
57802014-08-07 Marek Polacek <polacek@redhat.com>
5781
5782 * c-typeck.c (pointer_diff): Remove P - (P + CST) optimization.
5783
b787e7a2
TS
57842014-08-02 Trevor Saunders <tsaunders@mozilla.com>
5785
5786 * c-typeck.c: Use hash_map instead of pointer_map.
5787
6e2830c3
TS
57882014-08-02 Trevor Saunders <tsaunders@mozilla.com>
5789
5790 * c-decl.c: Use hash_set instead of pointer_set.
5791
a7ee52fb
IZ
57922014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
5793
5794 PR middle-end/61455
5795 * c-array-notation.c (expand_array_notations): Handling
5796 of DECL_EXPR added.
5797
b4dfdc11
MG
57982014-07-31 Marc Glisse <marc.glisse@inria.fr>
5799
5800 PR c++/60517
5801 * c-typeck.c (c_finish_return): Return 0 instead of the address of
5802 a local variable.
5803
976d5a22
TT
58042014-07-30 Tom Tromey <tromey@redhat.com>
5805
5806 * c-typeck.c (struct constructor_stack) <designator_depth>: New
5807 field.
5808 (really_start_incremental_init, push_init_level): Initialize
5809 designator_depth.
5810 (pop_init_level): Set global designator_depth.
5811 (process_init_element): Check for designated_init attribute.
5812
30281de2
MP
58132014-07-20 Marek Polacek <polacek@redhat.com>
5814
5815 PR c/61852
5816 * c-decl.c (implicit_decl_warning): Add location_t parameter. Use it.
5817 (implicitly_declare): Pass location to implicit_decl_warning.
5818
b108f48f
JJ
58192014-07-14 Jakub Jelinek <jakub@redhat.com>
5820
5821 PR middle-end/61294
5822 * c-parser.c (c_parser_expr_list): Add new argument literal_zero_mask.
5823 If non-NULL, call c_parser_check_literal_zero.
5824 (c_parser_check_literal_zero): New function.
5825 (c_parser_postfix_expression_after_primary): Adjust
5826 c_parser_expr_list caller, handle -Wmemset-transposed-args.
5827
773ec47f
MP
58282014-07-06 Marek Polacek <polacek@redhat.com>
5829
5830 PR c/6940
5831 * c-decl.c (grokdeclarator): Set C_ARRAY_PARAMETER.
5832 * c-tree.h (C_ARRAY_PARAMETER): Define.
5833 * c-typeck.c (c_expr_sizeof_expr): Warn when using sizeof on an array
5834 function parameter.
5835
22e1cf1c 58362014-07-02 Jan Hubicka <hubicka@ucw.cz>
3f8257db 5837 Chen Gang <gang.chen.5i5j@gmail.com>
22e1cf1c
JH
5838
5839 * c-decl.c (duplicate_decls): CLear DECL_STRUCT_FUNCTION before
5840 releasing symbol.
5841
52ec0ea3
MP
58422014-07-01 Marek Polacek <polacek@redhat.com>
5843
5844 * c-typeck.c (convert_for_assignment): Pass OPT_Wint_conversion
5845 instead of 0 to WARN_FOR_ASSIGNMENT.
5846
d5c3d343
MP
58472014-07-01 Marek Polacek <polacek@redhat.com>
5848
5849 PR c/58286
5850 * c-typeck.c (convert_for_assignment): Pass
5851 OPT_Wincompatible_pointer_types instead of 0 to WARN_FOR_ASSIGNMENT.
5852
6a7253a4
MP
58532014-06-30 Marek Polacek <polacek@redhat.com>
5854
5855 * c-decl.c (grokdeclarator): Don't instrument VLAs if the function
5856 has no_sanitize_undefined attribute.
5857
5e88a8f4
IZ
58582014-06-30 Igor Zamyatin <igor.zamyatin@intel.com>
5859
5860 PR middle-end/57541
5861 * c-array-notation.c (fix_builtin_array_notation_fn):
5862 Check for 0 arguments in builtin call. Check that bultin argument is
5863 correct.
5864 * c-parser.c (c_parser_array_notation): Check for incorrect initial
5865 index.
5866
9698b078
SH
58672014-06-27 Sebastian Huber <sebastian.huber@embedded-brains.de>
5868
5869 * c-parser.c (c_parser_declaration_or_fndef): Discard all type
5870 qualifiers in __auto_type for atomic types.
5871 (c_parser_typeof_specifier): Discard all type qualifiers in
5872 __typeof__ for atomic types.
5873
6e07c515
MP
58742014-06-25 Marek Polacek <polacek@redhat.com>
5875
5876 PR c/61162
5877 * c-parser.c (c_parser_statement_after_labels): Pass the location of
5878 the return expression to c_finish_return.
5879
da6f124d
JJ
58802014-06-25 Jakub Jelinek <jakub@redhat.com>
5881
5882 * c-typeck.c (c_finish_omp_clauses): Make sure
5883 OMP_CLAUSE_LINEAR_STEP has correct type.
5884
c203e8a7
TS
58852014-06-24 Trevor Saunders <tsaunders@mozilla.com>
5886
5887 * c-decl.c: Adjust.
5888
56ad0e38
JJ
58892014-06-24 Jakub Jelinek <jakub@redhat.com>
5890
5891 * c-parser.c (c_parser_omp_for_loop): For
5892 #pragma omp parallel for simd move lastprivate clause from parallel
5893 to for rather than simd.
5894
47c2554f
MP
58952014-06-23 Marek Polacek <polacek@redhat.com>
5896
5897 * c-typeck.c (parser_build_binary_op): Don't call
5898 warn_logical_not_parentheses if the RHS is TRUTH_NOT_EXPR.
5899
56363ffd
JH
59002014-06-15 Jan Hubicka <hubicka@ucw.cz>
5901
5902 * c-parser.c (c_parser_omp_threadprivate): Likewise.
5903 * c-decl.c (merge_decls): Likewise.
5904
d7ff7ae5
MP
59052014-06-09 Marek Polacek <polacek@redhat.com>
5906
5907 PR c/36446
5908 * c-typeck.c (error_init): Call inform instead of error_at.
5909 (pedwarn_init): Call inform instead of pedwarn.
5910 (warning_init): Call inform instead of warning_at.
5911
24d047a3
JH
59122014-06-07 Jan Hubicka <hubicka@ucw.cz>
5913
5914 * c-decl.c (merge_decls): Use set_decl_section_name.
5915 (duplicate_decls): Remove node if it exists.
5916
9bac5cbb
G
59172014-06-05 S. Gilles <sgilles@terpmail.umd.edu>
5918
5919 PR c/53119
5920 * c-typeck.c (push_init_level, process_init_element,
5921 pop_init_level): Correct check for zero initialization, move
5922 missing brace warning to respect zero initialization.
5923
8ffcdea8
MP
59242014-06-05 Marek Polacek <polacek@redhat.com>
5925
5926 PR c/56724
5927 * c-typeck.c (convert_for_assignment): Use expr_loc for ic_argpass.
5928
742938c9
MP
59292014-06-05 Marek Polacek <polacek@redhat.com>
5930
5931 PR c/49706
5932 * c-typeck.c (parser_build_binary_op): Warn when logical not is used
ab20d992 5933 on the left hand side operand of a comparison.
742938c9 5934
6447c55d
MP
59352014-06-05 Marek Polacek <polacek@redhat.com>
5936
5937 PR c/48062
5938 * c-decl.c (warn_if_shadowing): Call inform instead of warning_at.
5939 Print note only if the warning was printed.
5940
9dc7743c
IZ
59412014-06-04 Igor Zamyatin <igor.zamyatin@intel.com>
5942
5943 PR c/58942
5944 * c-array-notation.c (fix_builtin_array_notation_fn): Handle the case
5945 with a pointer.
5946
fedfecef
MP
59472014-06-03 Marek Polacek <polacek@redhat.com>
5948
5949 PR c/60439
5950 * c-parser.c (c_parser_switch_statement): Pass explicit_cast_p to
5951 c_start_case.
5952 * c-tree.h (c_start_case): Update.
5953 * c-typeck.c (c_start_case): Add new boolean parameter. Warn if
5954 switch condition has boolean value.
5955
9b2b7279
AM
59562014-06-02 Andrew MacLeod <amacleod@redhat.com>
5957
5958 * c-decl.c: Include builtins.h.
5959 * c-parser.c: Likewise.
5960
5c1bc275
MP
59612014-05-27 Marek Polacek <polacek@redhat.com>
5962
5963 PR c/56724
5964 * c-typeck.c (convert_arguments): Get location of a parameter. Change
5965 error and warning calls to error_at and warning_at. Pass location of
5966 a parameter to it. Call warning_at with OPT_Wtraditional_conversion.
5967 (convert_for_assignment): Add parameter to WARN_FOR_ASSIGNMENT and
5968 WARN_FOR_QUALIFIERS. Pass expr_loc to those.
5969
97563bc8
IZ
59702014-05-26 Igor Zamyatin <igor.zamyatin@intel.com>
5971
5972 PR c/61191
5973 * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid
5974 function parameters.
5975
aede2c10
JH
59762014-05-23 Jan Hubicka <hubicka@ucw.cz>
5977
5978 * c-decl.c (merge_decls): Preserve symtab node pointers.
5979 (duplicate_decls): Free new decl.
5980
edbba2ce
TS
59812014-05-23 Thomas Schwinge <thomas@codesourcery.com>
5982
f3316c6d
TS
5983 * c-typeck.c (c_finish_omp_clauses): Remove duplicated variable
5984 initialization.
5985
edbba2ce
TS
5986 * c-parser.c (c_parser_omp_target): Return bool values.
5987
68c81f24
TS
59882014-05-22 Thomas Schwinge <thomas@codesourcery.com>
5989
5990 * c-parser.c (c_parser_omp_clause_thread_limit): Rename
5991 num_teams_loc variable to num_thread_limit_loc.
5992
632f2871
RS
59932014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
5994
5995 * c-array-notation.c (expand_array_notations): Use void_node
5996 instead of void_zero_node.
5997
766090c2
TS
59982014-05-17 Trevor Saunders <tsaunders@mozilla.com>
5999
6000 * c-decl.c (finish_struct): Adjust.
6001 (finish_enum): Likewise.
6002 (bind): Adjust.
6003 (record_inline_static): Likewise.
6004 (push_scope): Likewise.
6005 (make_label): Likewise.
6006 (lookup_label_for_goto): Likewise.
6007 (finish_struct): Likewise.
6008 (finish_enum): Likewise.
6009 (store_parm_decls): Likewise.
6010 (c_push_function_context): Likewise.
6011 * c-lang.h: Remove usage of variable_size gty attribute.
6012 * c-parser.c (c_parse_init): Adjust.
6013 (c_parse_file): Likewise.
6014
2b107f6b
MP
60152014-05-13 Marek Polacek <polacek@redhat.com>
6016
6017 PR c/61162
6018 * c-typeck.c (convert_for_assignment): Pass location to
6019 WARN_FOR_ASSIGNMENT instead of input_location.
6020
d033409e
MP
60212014-05-10 Marek Polacek <polacek@redhat.com>
6022
6023 * c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
6024 maybe_warn_string_init.
6025 (c_parser_postfix_expression_after_paren_type): Pass type_loc to
6026 maybe_warn_string_init.
6027 * c-tree.h (maybe_warn_string_init): Update declaration.
6028 * c-typeck.c (maybe_warn_string_init): Add location parameter.
6029 Call pedwarn_init with loc instead of with input_location.
6030 (digest_init): Pass init_loc to maybe_warn_string_init.
6031 (pop_init_level): Call pedwarn_init with loc instead of with
6032 input_location.
6033 (set_init_index): Likewise.
6034 (process_init_element): Likewise.
6035
ea58ef42
MP
60362014-05-09 Marek Polacek <polacek@redhat.com>
6037
6038 PR c/61096
6039 * c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level.
6040 (c_parser_initelt): Pass location to set_init_label. Pass array index
6041 location to set_init_index.
6042 * c-tree.h (push_init_level): Update declaration.
6043 (pop_init_level): Likewise.
6044 (set_init_index): Likewise.
6045 (set_init_label): Likewise.
6046 * c-typeck.c (error_init): Add location parameter. Call error_at
6047 instead of error.
6048 (digest_init): Pass init_loc to error_init.
6049 (really_start_incremental_init):
6050 (push_init_level): Add location parameter. Pass loc to pop_init_level
6051 and error_init.
6052 (pop_init_level): Likewise.
6053 (set_designator): Add location parameter. Pass loc to pop_init_level,
6054 push_init_level, and error_init.
6055 (set_init_index): Add location parameter. Pass loc to error_init and
6056 set_designator.
6057 (set_init_label): Likewise.
6058 (output_init_element): Pass loc to error_init.
6059 (process_init_element): Pass loc to error_init, pop_init_level,
6060 pedwarn_init, and push_init_level.
6061
661a0813
MP
60622014-05-09 Marek Polacek <polacek@redhat.com>
6063
6064 PR c/50459
6065 * c-parser.c (c_parser_attributes): Parse the arguments as an
6066 expression-list if the attribute takes identifier.
6067
2793eeab
MP
60682014-05-08 Marek Polacek <polacek@redhat.com>
6069
6070 PR c/61053
6071 * c-decl.c (grokdeclarator): Use min_align_of_type instead of
6072 TYPE_ALIGN_UNIT.
6073
f827930a
MP
60742014-05-08 Marek Polacek <polacek@redhat.com>
6075
6076 PR c/61077
6077 * c-decl.c (start_function): Warn for _Atomic-qualified return type
6078 of main.
6079
1d60af08
KZ
60802014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
6081 Mike Stump <mikestump@comcast.net>
6082 Richard Sandiford <rdsandiford@googlemail.com>
6083
6084 * c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN.
6085 (finish_enum): Use wide-int interfaces.
6086 * c-parser.c (c_parser_cilk_clause_vectorlength): Likewise.
6087 * c-typeck.c (build_c_cast): Likewise.
6088 (set_nonincremental_init_from_string): Likewise.
6089 (c_tree_equal): Likewise.
6090
a0e24419
MP
60912014-05-02 Marek Polacek <polacek@redhat.com>
6092
6093 PR c/25801
6094 * c-typeck.c (c_size_in_bytes): Update comment. Don't call error.
6095 Return size_one_node when the type is not complete.
6096 (pointer_diff): Remove comment.
6097 (build_unary_op): Improve error messages.
6098
19fc9faa
MP
60992014-05-02 Marek Polacek <polacek@redhat.com>
6100
6101 * c-typeck.c (c_finish_return): Separate warning_at calls.
6102
63bc4e87
MP
61032014-05-02 Marek Polacek <polacek@redhat.com>
6104
6105 * c-tree.h (error_init): Remove declaration.
6106 (pedwarn_init): Likewise.
6107 * c-typeck.c (error_init): Make static and move above.
6108 (pedwarn_init): Likewise.
6109 (warning_init): Move above.
6110 (maybe_warn_string_init): Likewise.
6111
4bd2511b
JL
61122014-05-01 Jeff Law <law@redhat.com>
6113
6114 Revert:
6115
6116 2014-04-24 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
6117 * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
6118 avoid goto.
6119
6a358dcb
MP
61202014-05-02 Marek Polacek <polacek@redhat.com>
6121
6122 PR c/60784
6123 * c-typeck.c (push_init_level): Set constructor_designated to
6124 p->designated for structures.
6125
ae5ebda4
MP
61262014-05-01 Marek Polacek <polacek@redhat.com>
6127
6128 PR c/60915
6129 * c-parser.c (c_parser_declaration_or_fndef): Give better error if
6130 function-definition has an attribute after the declarator.
6131
96b40f8d
MP
61322014-05-01 Marek Polacek <polacek@redhat.com>
6133
6134 PR c/60257
6135 * c-typeck.c (warning_init): Add location_t parameter. Call
6136 warning_at instead of warning.
6137 (push_init_level): Pass input_location to warning_init.
6138 (add_pending_init): Add location_t parameter. Pass loc to
6139 warning_init.
6140 (set_nonincremental_init): Pass input_location to add_pending_init.
6141 (set_nonincremental_init_from_string): Likewise.
6142 (output_init_element): Pass loc to warning_init and to
6143 add_pending_init.
6144
32e00768
MP
61452014-05-01 Marek Polacek <polacek@redhat.com>
6146
6147 PR c/43395
6148 * c-typeck.c (c_finish_return): Distinguish between label and variable
6149 when warning about returning local address.
6150
c9379ce2
MP
61512014-05-01 Marek Polacek <polacek@redhat.com>
6152
6153 PR c/29467
6154 * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
6155 in C89 mode.
6156
d00887e8
MP
61572014-05-01 Marek Polacek <polacek@redhat.com>
6158
6159 PR c/43245
6160 * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
6161 instead of 0 to WARN_FOR_QUALIFIERS.
6162
5436fa2e
MP
61632014-05-01 Marek Polacek <polacek@redhat.com>
6164
6165 PR c/56989
6166 * c-typeck.c (default_conversion): Use better location for
6167 error call.
6168
f8ed5150
MP
61692014-04-30 Marek Polacek <polacek@redhat.com>
6170
6171 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
6172 also when SANITIZE_FLOAT_DIVIDE is on.
6173
8337d1db
MP
61742014-04-30 Marek Polacek <polacek@redhat.com>
6175
6176 PR c/60139
6177 * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
6178 and pedwarn_init. Use loc insted of input_location.
6179
c4bdc42f
MP
61802014-04-30 Marek Polacek <polacek@redhat.com>
6181
6182 PR c/60351
6183 * c-typeck.c (build_binary_op): Use location when warning about
6184 shift count.
6185
45484dcf
MP
61862014-04-25 Marek Polacek <polacek@redhat.com>
6187
6188 PR c/18079
6189 * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
6190 always_inline/noinline and hot/cold attributes.
6191
34cf811f
MP
61922014-04-25 Marek Polacek <polacek@redhat.com>
6193
6194 PR c/60114
6195 * c-parser.c (c_parser_initelt): Pass input_location to
6196 process_init_element.
6197 (c_parser_initval): Pass loc to process_init_element.
6198 * c-tree.h (process_init_element): Adjust declaration.
6199 * c-typeck.c (push_init_level): Pass input_location to
6200 process_init_element.
6201 (pop_init_level): Likewise.
6202 (set_designator): Likewise.
6203 (output_init_element): Add location_t parameter. Pass loc to
6204 digest_init.
6205 (output_pending_init_elements): Pass input_location to
6206 output_init_element.
6207 (process_init_element): Add location_t parameter. Pass loc to
6208 output_init_element.
6209
42056eac
JJ
62102014-04-24 Jakub Jelinek <jakub@redhat.com>
6211
6212 * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
6213 atomic-clause, allow comma in between atomic-clause and
6214 seq_cst.
6215
e162a134
JJ
62162014-04-22 Jakub Jelinek <jakub@redhat.com>
6217
6218 PR c/59073
6219 * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
6220 fails, don't set OM_PARALLEL_COMBINED and return NULL.
6221
2f6babac
IZ
62222014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
6223
6224 PR middle-end/60469
6225 * c-array-notation.c (fix_builtin_array_notation_fn): Use
6226 create_tmp_var instead build_decl for creating temps.
6227 (build_array_notation_expr): Likewise.
6228 (fix_conditional_array_notations_1): Likewise.
6229 (fix_array_notation_expr): Likewise.
6230 (fix_array_notation_call_expr): Likewise.
6231
8edbfaa6
JJ
62322014-03-28 Jakub Jelinek <jakub@redhat.com>
6233
6234 PR c++/60689
6235 * c-tree.h (c_build_function_call_vec): New prototype.
6236 * c-typeck.c (build_function_call_vec): Don't call
6237 resolve_overloaded_builtin here.
6238 (c_build_function_call_vec): New wrapper function around
6239 build_function_call_vec. Call resolve_overloaded_builtin here.
6240 (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
6241 Call c_build_function_call_vec instead of build_function_call_vec.
6242 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
6243 * c-decl.c (finish_decl): Likewise.
6244
7485aeea
MLI
62452014-03-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
6246
6247 PR c/55383
6248 * c-typeck.c: Use correct format string in cast-qual warning
6249
b17a8b07
TS
62502014-03-07 Thomas Schwinge <thomas@codesourcery.com>
6251
6252 * c-decl.c (c_decl_attributes): Use
6253 lang_hooks.types.omp_mappable_type.
6254 * c-typeck.c (c_finish_omp_clauses): Likewise.
6255
3af9c5e9
MP
62562014-03-06 Marek Polacek <polacek@redhat.com>
6257
6258 PR c/60197
6259 * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
6260 of checking tree code.
6261
1c9f5f33
PK
62622014-02-19 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
6263
6264 * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
6265 (c_parser_parameter_declaration): Likewise.
6266
cc28fc7f
MP
62672014-02-19 Marek Polacek <polacek@redhat.com>
6268
6269 PR c/60195
6270 * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
6271 Call mark_exp_read on exp.value.
6272 (build_atomic_assign): Set TREE_NO_WARNING on val and old. Set
6273 TREE_ADDRESSABLE on old instead of val.
6274 (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
6275
b581c05c
PK
62762014-02-07 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
6277
6278 * c-parser.c (c_parser_get_builtin_args): Replace calls to
6279 C_EXPR_APPEND by vec_safe_push.
6280 * c-tree.h (C_EXPR_APPEND): Remove.
6281
81e5eca8
MP
62822014-01-31 Marek Polacek <polacek@redhat.com>
6283
6284 PR c/59963
6285 * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
6286 build_function_call_vec.
6287 (build_function_call): Likewise.
6288 (build_atomic_assign): Likewise.
6289 (build_function_call_vec): Add arg_loc parameter. Use it.
6290 (convert_arguments): Likewise.
6291 (convert_for_assignment): Rename rhs_loc to expr_loc.
6292 * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
6293 (c_parser_objc_keywordexpr): Likewise.
6294 (c_parser_postfix_expression_after_primary): Call
6295 build_function_call_vec with expr_loc rather than op_loc.
6296 Call c_parser_expr_list to fill arg_loc. Pass arg_loc to
6297 build_function_call_vec.
6298 (c_parser_expr_list): Add locations parameter. Fill it with locations
6299 of function arguments.
6300 * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
6301
68fca595
MP
63022014-01-30 Marek Polacek <polacek@redhat.com>
6303
6304 PR c/59940
6305 * c-typeck.c (build_function_call_vec): Use loc parameter.
6306 (convert_arguments): Add location parameter. Use it.
6307 (ep_convert_and_check): Likewise.
6308 (build_atomic_assign): Adjust convert_for_assignment call.
6309 (build_modify_expr): Likewise.
6310 (digest_init): Likewise.
6311 (c_finish_return): Likewise.
6312 (build_conditional_expr): Adjust ep_convert_and_check calls.
6313 (convert_for_assignment): Add rhs_loc parameter. Use it.
6314 (build_binary_op): Adjust convert_and_check and ep_convert_and_check
6315 calls.
6316
fa337f3a
RB
63172014-01-30 Richard Biener <rguenther@suse.de>
6318
6319 PR c/59905
6320 * c-typeck.c (build_function_call_vec): Do not replace calls
6321 to a function via an incompatible type with a runtime abort.
6322
b72271b9
BI
63232014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
6324
6325 * c-parser.c (c_parser_declaration_or_fndef): Replaced
6326 flag_enable_cilkplus with flag_cilkplus.
6327 (c_parser_direct_declarator_inner): Likewise.
6328 (c_parser_attribute_any_word): Likewise.
6329 (c_parser_attributes): Likewise.
6330 (c_parser_compound_statement): Likewise.
6331 (c_parser_statement_after_labels): Likewise.
6332 (c_parser_if_statement): Likewise.
6333 (c_parser_switch_statement): Likewise.
6334 (c_parser_do_statement): Likewise.
6335 (c_parser_for_statement): Likewise.
6336 (c_parser_unary_expression): Likewise.
6337 (c_parser_postfix_expression): Likewise.
6338 (c_parser_postfix_expression_after_primary): Likewise.
6339 (c_parser_postfix_expression_after_primary): Likewise.
6340 (c_parser_omp_clause_name): Likewise.
6341 (c_finish_omp_declare_simd): Likewise.
6342 (c_parser_cilk_verify_simd): Likewise.
6343 * c-typeck.c (build_array_ref): Likewise.
6344 (build_function_call_vec): Likewise.
6345 (convert_arguments): Likewise.
6346 (build_compound_expr): Likewise.
6347 (c_finish_return): Likewise.
6348 (c_finish_if_stmt): Likewise.
6349 (c_finish_loop): Likewise.
6350 (build_binary_op): Likewise.
6351
393e8e8b
MP
63522014-01-23 Marek Polacek <polacek@redhat.com>
6353
6354 PR c/59846
6355 * c-typeck.c (parser_build_binary_op): Use location instead of
6356 input_location.
6357 (build_binary_op): Pass location to shorten_compare.
6358
f04dda30
MP
63592014-01-23 Marek Polacek <polacek@redhat.com>
6360
6361 PR c/58346
6362 * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
6363 an empty aggregate.
6364
789eadcd
MP
63652014-01-23 Marek Polacek <polacek@redhat.com>
6366
6367 PR c/59871
6368 * c-typeck.c (build_compound_expr): Warn even for right-hand operand
6369 of a comma expression.
6370 (emit_side_effect_warnings): Likewise.
6371
40f14e9f
BI
63722014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
6373
6374 PR c/59825
6375 * c-array-notation.c (expand_array_notation_exprs): Rewrote this
6376 function to use walk_tree and moved a lot of its functionality to
6377 expand_array_notations.
6378 (expand_array_notations): New function.
6379
74558dd9
BI
63802014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
6381
6382 * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
6383 attribute an attribute without value.
6384
652fea39
JJ
63852014-01-23 Jakub Jelinek <jakub@redhat.com>
6386
6387 PR middle-end/58809
6388 * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
6389 BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
6390
f34f1c87
MP
63912014-01-22 Marek Polacek <polacek@redhat.com>
6392
6393 PR c/59891
6394 * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
6395 of remove_c_maybe_const_expr on op1 and op2.
6396
241f845a
JJ
63972014-01-15 Jakub Jelinek <jakub@redhat.com>
6398
6399 PR c/58943
6400 * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
6401 effects, preevaluate rhs using SAVE_EXPR first.
6402
9a74f20c
BI
64032014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
6404
6405 PR c++/59631
6406 * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
6407 statements with if-elseif statements.
6408
96066ce1
MP
64092014-01-06 Marek Polacek <polacek@redhat.com>
6410
6411 PR c/57773
6412 * c-decl.c (check_bitfield_type_and_width): Warn for implementation
6413 defined bit-field types only in ISO C.
6414
23a5b65a
RS
64152014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
6416
6417 Update copyright years
6418
f9030485
RS
64192014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
6420
6421 * c-array-notation.c: Use the standard form for the copyright notice.
6422
41958c28
BI
64232013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
6424
6425 * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
6426 (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
6427 field in parser is not empty. If not-empty, call the function
6428 c_parser_finish_omp_declare_simd.
6429 (c_parser_cilk_clause_vectorlength): Modified function to be shared
6430 between SIMD-enabled functions and #pragma simd. Added new parameter.
6431 (c_parser_cilk_all_clauses): Modified the usage of the function
6432 c_parser_cilk_clause_vectorlength as mentioned above.
6433 (c_parser_cilk_simd_fn_vector_attrs): New function.
6434 (c_finish_cilk_simd_fn_tokens): Likewise.
6435 (is_cilkplus_vector_p): Likewise.
6436 (c_parser_omp_clause_name): Added checking for "vectorlength,"
6437 "nomask," and "mask" strings in clause name.
6438 (c_parser_omp_all_clauses): Added 3 new case statements:
6439 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
6440 PRAGMA_CILK_CLAUSE_NOMASK.
6441 (c_parser_attributes): Added a cilk_simd_fn_tokens parameter. Added a
6442 check for vector attribute and if so call the function
6443 c_parser_cilk_simd_fn_vector_attrs. Also, when Cilk plus is enabled,
6444 called the function c_finish_cilk_simd_fn_tokens.
6445 (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
6446 parser field is non-empty. If so, parse them as you would parse
6447 the omp declare simd pragma.
6448 (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
6449 Added a check when step is a parameter and flag it as error.
6450 (CILK_SIMD_FN_CLAUSE_MASK): New #define.
6451 (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
6452 pragma_omp_clause.
6453
cef0fd0e
TS
64542013-12-17 Thomas Schwinge <thomas@codesourcery.com>
6455
6456 * c-parser.c (c_parser_omp_parallel): Fix description.
6457
12893402
BI
64582013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
6459
6460 * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
6461 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
6462 (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
6463 * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
6464
296674db
JM
64652013-12-04 Joseph Myers <joseph@codesourcery.com>
6466
6467 PR c/52023
6468 * c-parser.c (c_parser_alignas_specifier): Use
6469 c_sizeof_or_alignof_type instead of c_alignof.
6470 (c_parser_alignof_expression): Likewise, with min_alignof
6471 parameter depending on alignof spelling used.
6472
edd28054
MP
64732013-12-04 Marek Polacek <polacek@redhat.com>
6474
6475 PR c/54113
6476 * c-decl.c (start_function): Don't warn for missing prototype for
6477 inline functions.
6478
da0fc454
MP
64792013-12-03 Marek Polacek <polacek@redhat.com>
6480
6481 PR c/59351
6482 * c-decl.c (build_compound_literal): Allow compound literals with
6483 empty initial value.
6484
4c2ecab0
JM
64852013-12-02 Joseph Myers <joseph@codesourcery.com>
6486
6487 PR c/58235
6488 * c-typeck.c (build_modify_expr): Diagnose assignment to
6489 expression with array type.
6490
340baef7
JM
64912013-11-29 Joseph Myers <joseph@codesourcery.com>
6492
6493 PR c/42262
6494 * c-typeck.c (process_init_element): Do not treat a string as
6495 initializing a whole array when used with a designator for an
6496 individual element.
6497
6763b9f7
JM
64982013-11-29 Joseph Myers <joseph@codesourcery.com>
6499
6500 PR c/57574
6501 * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
6502 an inline function following a static declaration.
6503
e7bd1de1
JJ
65042013-11-28 Jakub Jelinek <jakub@redhat.com>
6505
6506 PR c/59310
6507 * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
6508 to p_name before calling c_parser_omp_teams instead of after.
6509 (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
6510 argument. Remove unused p_name variable.
6511
0136f8f0
AH
65122013-11-27 Aldy Hernandez <aldyh@redhat.com>
6513 Jakub Jelinek <jakub@redhat.com>
6514
6515 * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
6516 external_scope is NULL.
6517
241b71bb
TV
65182013-11-27 Tom de Vries <tom@codesourcery.com>
6519 Marc Glisse <marc.glisse@inria.fr>
6520
6521 PR c++/59032
6522 * c-typeck.c (build_unary_op): Allow vector increment and decrement.
6523
2fb9a547
AM
65242013-11-22 Andrew MacLeod <amacleod@redhat.com>
6525
6526 * c-typeck.c: Add required include files from gimple.h.
6527
8400e75e
DM
65282013-11-22 David Malcolm <dmalcolm@redhat.com>
6529
6530 * c-decl.c (define_label, shadow_tag_warned)
6531 (check_bitfield_type_and_width, grokdeclarator, grokparms,
6532 store_parm_decls_newstyle, store_parm_decls_oldstyle)
6533 (declspecs_add_type): Remove use of in_system_header macro.
6534 * c-parser.c (c_parser_unary_expression): Likewise.
6535 * c-typeck.c (store_init_value, process_init_element)
6536 (c_start_case): Likewise.
6537
6538 * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
6539 macro.
6540
6541 * c-parser.c (c_parser_set_source_position_from_token): Remove
6542 reference to in_system_header from comment.
6543
386b1f1f
RS
65442013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
6545
6546 * c-decl.c (grokdeclarator): Update comment to refer to
6547 tree_to_[su]hwi rather than tree_low_cst.
6548
ae7e9ddd
RS
65492013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
6550
6551 * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
6552 tree_to_uhwi throughout.
6553
9439e9a1
RS
65542013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
6555
6556 * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
6557 throughout.
6558
9541ffee
RS
65592013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
6560
6561 * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
6562 throughout.
6563
c02065fc
AH
65642013-11-15 Aldy Hernandez <aldyh@redhat.com>
6565
6566 * c-parser.c (c_parser_cilk_simd): New.
6567 (c_parser_cilk_verify_simd): New.
6568 (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
6569 (c_parser_omp_for_loop): Add case for NE_EXPR.
6570 Set c_break_label for CILK_SIMD.
6571 (c_parser_cilk_clause_vectorlength): New.
6572 (c_parser_cilk_clause_linear): New.
6573 (c_parser_cilk_clause_name): New.
6574 (c_parser_cilk_all_clauses): New.
6575 * c-typeck.c (build_unary_op): Pass location argument to
6576 readonly_error.
6577 (build_modify_expr): Same.
6578 (build_asm_expr): Same.
6579 (c_finish_bc_stmt): Error on break/continue in loops.
6580
18f429e2
AM
65812013-11-14 Andrew MacLeod <amacleod@redhat.com>
6582
6583 * c-typeck.c: Include only gimplify.h and gimple.h as needed.
6584
d8a2d370
DN
65852013-11-14 Diego Novillo <dnovillo@google.com>
6586
6587 * c-decl.c: Include print-tree.h.
6588 Include stor-layout.h.
6589 Include varasm.h.
6590 Include attribs.h.
6591 Include stringpool.h.
6592 * c-lang.c: Include fold-const.h.
6593 * c-parser.c: Include stringpool.h.
6594 Include attribs.h.
6595 Include stor-layout.h.
6596 Include varasm.h.
6597 Include trans-mem.h.
6598 * c-typeck.c: Include stor-layout.h.
6599 Include trans-mem.h.
6600 Include varasm.h.
6601 Include stmt.h.
6602
38b7bc7f
JM
66032013-11-13 Joseph Myers <joseph@codesourcery.com>
6604
6605 * c-tree.h (c_typespec_keyword): Add cts_auto_type.
6606 * c-decl.c (declspecs_add_type, finish_declspecs): Handle
6607 __auto_type.
6608 * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
6609 (c_parser_attribute_any_word, c_parser_objc_selector): Handle
6610 RID_AUTO_TYPE.
6611 (c_parser_declspecs): Take argument AUTO_TYPE_OK.
6612 (c_parser_declaration_or_fndef, c_parser_struct_declaration)
6613 (c_parser_declarator, c_parser_direct_declarator_inner)
6614 (c_parser_parameter_declaration, c_parser_type_name): All callers
6615 changed.
6616 (c_parser_declaration_or_fndef): Handle declarations with type
6617 determined from the initializer.
6618
45b0be94
AM
66192013-11-12 Andrew MacLeod <amacleod@redhat.com>
6620
18f429e2 6621 * c-typeck.c: Include gimplify.h.
45b0be94 6622
582d9b50
JM
66232013-11-12 Joseph Myers <joseph@codesourcery.com>
6624
6625 * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
6626 * c-parser.c (c_parser_declspecs): Mention _Thread_local in
6627 comment.
6628 * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
6629 or _Thread_local as appropriate in diagnostics.
6630 (build_null_declspecs): Initialize ret->thread_gnu_p.
6631 (declspecs_add_scspec): Handle either __thread or _Thread_local
6632 for RID_THREAD. Diagnose _Thread_local for pre-C11 standards if
6633 pedantic. Do not disallow _Thread_local extern and _Thread_local
6634 static.
6635
267bac10
JM
66362013-11-07 Joseph Myers <joseph@codesourcery.com>
6637 Andrew MacLeod <amacleod@redhat.com>
6638
6639 * c-aux-info.c (gen_type): Handle atomic qualifier.
6640 * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
6641 qualifiers when compating types.
6642 (shadow_tag_warned): Handle atomic_p in declspecs.
6643 (quals_from_declspecs): Likewise.
6644 (start_decl): Use c_type_promotes_to when promoting argument
6645 types.
6646 (grokdeclarator): Handle _Atomic.
6647 (get_parm_info): Diagnose any qualifier on "void" as only
6648 parameter.
6649 (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
6650 comparing types. Use c_type_promotes_to when promoting argument
6651 types.
6652 (finish_function): Use c_type_promotes_to when promoting argument
6653 types.
6654 (build_null_declspecs): Handle atomic_p in declspecs.
6655 (declspecs_add_qual): Handle RID_ATOMIC.
6656 * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
6657 (c_token_starts_declspecs): Handle RID_ATOMIC.
6658 (c_parser_declspecs): Handle atomic type specifiers and
6659 qualifiers.
6660 (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
6661 from types of expressions with atomic type.
6662 (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
6663 (c_parser_attribute_any_word): Handle RID_ATOMIC.
6664 (c_parser_initializer, c_parser_initelt, c_parser_initval)
6665 (c_parser_statement_after_labels, c_parser_switch_statement)
6666 (c_parser_for_statement, c_parser_expr_no_commas)
6667 (c_parser_conditional_expression, c_parser_binary_expression)
6668 (c_parser_cast_expression, c_parser_unary_expression)
6669 (c_parser_postfix_expression)
6670 (c_parser_postfix_expression_after_primary, c_parser_expression):
6671 Use convert_lvalue_to_rvalue.
6672 (c_parser_expression_conv, c_parser_expr_list): Document
6673 conversion of lvalues to rvalues. Use convert_lvalue_to_rvalue.
6674 (c_parser_objc_synchronized_statement): Use
6675 convert_lvalue_to_rvalue.
6676 (c_parser_objc_selector): Handle RID_ATOMIC.
6677 (c_parser_objc_receiver, c_parser_array_notation): Use
6678 convert_lvalue_to_rvalue.
6679 * c-tree.h (ctsk_typeof): Adjust comment to mention use for
6680 _Atomic (type-name).
6681 (struct c_declspecs): Add atomic_p field.
6682 (convert_lvalue_to_rvalue): Declare.
6683 * c-typeck.c (c_type_promotes_to): Promote atomic types to
6684 corresponding atomic types.
6685 (qualify_type): Don't add _Atomic qualifiers from second argument.
6686 (comp_target_types): Do not allow _Atomic mismatches.
6687 (type_lists_compatible_p): Do not remove atomic qualifiers when
6688 comparing types.
6689 (really_atomic_lvalue, convert_lvalue_to_rvalue)
6690 (build_atomic_assign): New functions.
6691 (build_unary_op): Use build_atomic_assign for atomic increment and
6692 decrement.
6693 (build_conditional_expr): Do not treat _Atomic void as a qualified
6694 version of void.
6695 (build_modify_expr): Use build_atomic_assign for atomic LHS.
6696 (find_anonymous_field_with_type, convert_to_anonymous_field)
6697 (convert_for_assignment): Do not remove atomic qualifiers when
6698 comparing types.
6699 (digest_init): Do not accept initialization of arrays of atomic
6700 elements by string constants.
6701 (build_asm_expr): Use convert_lvalue_to_rvalue.
6702 (build_binary_op): Do not treat _Atomic void as a qualified
6703 version of void.
6704
0c249d4b
DD
67052013-11-06 DJ Delorie <dj@redhat.com>
6706
6707 * c-decl.c (locate_old_decl): If a previous conflicting decl is
6708 both explicit and builtin, print the location of the explicit one.
6709
6d7f7e0a
TB
67102013-11-05 Tobias Burnus <burnus@net-b.de>
6711
6712 * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
6713 c_parser_omp_distribute, c_parser_omp_teams,
6714 c_parser_omp_target, c_parser_omp_declare): Handle
6715 -fopenmp-simd.
6716
b906f4ca
MP
67172013-11-03 Marek Polacek <polacek@redhat.com>
6718
6719 * c-decl.c (grokdeclarator): Add VLA instrumentation.
6720
ee1d5a02
JJ
67212013-11-01 Jakub Jelinek <jakub@redhat.com>
6722
6723 * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
6724 check_dup_generic at the end, unless remove is true.
6725 (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
6726 remove = true;.
6727 (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
6728
5a9785fb
JJ
67292013-10-31 Jakub Jelinek <jakub@redhat.com>
6730
6731 * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
6732 with decl that is not pointer nor array.
6733
939b37da
BI
67342013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
6735
6736 * c-decl.c (finish_function): Added a call for insert_cilk_frame when
6737 a spawning function is found.
6738 * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
6739 (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
6740 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
6741 * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
6742 case.
6743 (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
6744 * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
6745 expr.
6746 (c_finish_return): Added a check to reject _Cilk_spawn in return
6747 expression.
6748 (build_cilk_spawn): New function.
6749 (build_cilk_sync): Likewise.
6750 * Makefile.in (c-decl.o): Added cilk.h in dependency list.
ab20d992 6751
d4af74d4
TB
67522013-10-27 Tobias Burnus <burnus@net-b.de>
6753
6754 PR other/33426
6755 * c-parser.c (c_parser_while_statement, c_parser_while_statement,
6756 c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
6757 (c_parser_statement_after_labels): Update calls.
6758
d73749df 67592013-10-24 Tobias Burnus <burnus@net-b.de>
8170608b
TB
6760
6761 PR other/33426
6762 * c-parser.c (c_parser_pragma, c_parser_for_statement):
6763 Handle PRAGMA_IVDEP.
6764 (c_parser_statement_after_labels): Update call.
6765
f28aa681
MP
67662013-10-24 Marek Polacek <polacek@redhat.com>
6767
6768 * c-parser.c (c_parser_struct_declaration): Add a comment.
6769 (c_parser_declarator): Don't allow _Alignas here.
6770
0645c1a2
AM
67712013-10-17 Andrew MacLeod <amacleod@redhat.com>
6772
6773 * c-parser.c: Include omp-low.h.
6774 * c-typeck.c: Likewise.
6775
568a31f2
MP
67762013-10-17 Marek Polacek <polacek@redhat.com>
6777
6778 PR c/58267
6779 * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
6780 Document syntax of the array-declarator.
6781 (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
6782 are not permitted.
6783 (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
6784 (c_parser_struct_declaration): Likewise.
6785 (c_parser_declarator): Likewise.
6786 (c_parser_direct_declarator_inner): Likewise.
6787 (c_parser_parameter_declaration): Likewise.
6788 (c_parser_type_name): Likewise.
6789
acf0174b
JJ
67902013-10-11 Jakub Jelinek <jakub@redhat.com>
6791
6792 * c-lang.h (current_omp_declare_target_attribute): New extern
6793 decl.
6794 * c-parser.c: Include c-lang.h.
6795 (struct c_parser): Change tokens to c_token *.
6796 Add tokens_buf field. Change tokens_avail type to unsigned int.
6797 (c_parser_consume_token): If parser->tokens isn't
6798 &parser->tokens_buf[0], increment parser->tokens.
6799 (c_parser_consume_pragma): Likewise.
6800 (enum pragma_context): Add pragma_struct and pragma_param.
6801 (c_parser_external_declaration): Adjust
6802 c_parser_declaration_or_fndef caller.
6803 (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
6804 argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
6805 Adjust recursive call.
6806 (c_parser_struct_or_union_specifier): Use pragma_struct instead
6807 of pragma_external.
6808 (c_parser_parameter_declaration): Use pragma_param instead of
6809 pragma_external.
6810 (c_parser_compound_statement_nostart, c_parser_label,
6811 c_parser_for_statement): Adjust
6812 c_parser_declaration_or_fndef callers.
6813 (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
6814 it through to c_parser_conditional_expression.
6815 (c_parser_conditional_expression): Add omp_atomic_lhs argument,
6816 pass it through to c_parser_binary_expression. Adjust recursive
6817 call.
6818 (c_parser_binary_expression): Remove prec argument, add
6819 omp_atomic_lhs argument instead. Always start from PREC_NONE, if
6820 omp_atomic_lhs is non-NULL and one of the arguments of toplevel
6821 binop matches it, use build2 instead of parser_build_binary_op.
6822 (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
6823 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
6824 PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
6825 Handle pragma_struct and pragma_param the same as pragma_external.
6826 (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
6827 (c_parser_omp_variable_list): Parse array sections for
6828 OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
6829 (c_parser_omp_clause_collapse): Fully fold collapse expression.
6830 (c_parser_omp_clause_reduction): Handle user defined reductions.
6831 (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
6832 c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
6833 c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
6834 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
6835 c_parser_omp_clause_depend, c_parser_omp_clause_map,
6836 c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
6837 c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
6838 c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
6839 (c_parser_omp_all_clauses): Add finish_p argument. Don't call
6840 c_finish_omp_clauses if it is false. Handle new OpenMP 4.0 clauses.
6841 (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
6842 present to c_finish_omp_atomic. Handle OpenMP 4.0 atomic forms.
6843 (c_parser_omp_for_loop): Add CODE argument, pass it through
6844 to c_finish_omp_for. Change last argument to cclauses,
6845 and adjust uses to grab parallel clauses from the array of all
6846 the split clauses. Adjust c_parser_binary_expression,
6847 c_parser_declaration_or_fndef and c_finish_omp_for callers.
6848 (omp_split_clauses): New function.
6849 (c_parser_omp_simd): New function.
6850 (c_parser_omp_for): Add p_name, mask and cclauses arguments.
6851 Allow the function to be called also when parsing combined constructs,
6852 and call c_parser_omp_simd when parsing for simd.
6853 (c_parser_omp_sections_scope): If section-sequence doesn't start with
6854 #pragma omp section, require exactly one structured-block instead of
6855 sequence of statements.
6856 (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
6857 Allow the function to be called also when parsing combined constructs.
6858 (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
6859 Allow the function to be called also when parsing combined
6860 constructs.
6861 (c_parser_omp_taskgroup, c_parser_omp_cancel,
6862 c_parser_omp_cancellation_point, c_parser_omp_distribute,
6863 c_parser_omp_teams, c_parser_omp_target_data,
6864 c_parser_omp_target_update, c_parser_omp_target,
6865 c_parser_omp_declare_simd, c_finish_omp_declare_simd,
6866 c_parser_omp_declare_target, c_parser_omp_end_declare_target,
6867 c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
6868 (c_parser_omp_construct): Add p_name and mask vars. Handle
6869 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
6870 PRAGMA_OMP_TEAMS. Adjust c_parser_omp_for, c_parser_omp_parallel
6871 and c_parser_omp_sections callers.
6872 (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
6873 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
6874 OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
6875 (OMP_PARALLEL_CLAUSE_MASK): Likewise. Add OMP_CLAUSE_PROC_BIND.
6876 (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. Add
6877 OMP_CLAUSE_DEPEND.
6878 (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
6879 OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
6880 OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
6881 OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
6882 OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
6883 * c-typeck.c: Include tree-inline.h.
6884 (c_finish_omp_cancel, c_finish_omp_cancellation_point,
6885 handle_omp_array_sections_1, handle_omp_array_sections,
6886 c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
6887 (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
6888 user defined reductions.
6889 (c_tree_equal): New function.
6890 * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
6891 c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
6892 c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
6893 c_check_omp_declare_reduction_r): New prototypes.
6894 * c-decl.c (current_omp_declare_target_attribute): New variable.
6895 (c_decl_attributes): New function.
6896 (start_decl, start_function): Use it instead of decl_attributes.
6897 (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
6898 c_omp_reduction_decl, c_omp_reduction_lookup,
6899 c_check_omp_declare_reduction_r): New functions.
6900
0a6c2227
TT
69012013-09-25 Tom Tromey <tromey@redhat.com>
6902
6903 * Make-lang.in (c/gccspec.o): Remove.
6904 (CFLAGS-c/gccspec.o): New variable.
6905 (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
6906 (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
6907 (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
6908
f3bc55f0
TT
69092013-09-25 Tom Tromey <tromey@redhat.com>
6910
6911 * Make-lang.in (c/gccspec.o): Don't use subshell.
6912
a24d975c
MP
69132013-09-18 Marek Polacek <polacek@redhat.com>
6914
6915 PR sanitize/58443
6916 * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
6917 Remove unnecessary check.
6918
ce6923c5
MP
69192013-09-18 Marek Polacek <polacek@redhat.com>
6920
6921 PR sanitizer/58411
6922 * c-typeck.c (build_binary_op): Don't sanitize function if it has the
6923 no_sanitize_undefined attribute.
6924
a1e51df9
KT
69252013-09-13 Kai Tietz <ktietz@redhat.com>
6926
6927 PR target/57848
6928 * c-decl.c (c_builtin_function_ext_scope): Remove
6929 wrong assumption that it is never called on prexisting
6930 symbol.
6931
0af94e6f
JR
69322013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
6933
6934 * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
6935
20059c8b
GDR
69362013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
6937
6938 * c-objc-common.c (c_tree_printer): Tidy.
6939
de5a5fa1
MP
69402013-08-30 Marek Polacek <polacek@redhat.com>
6941
6942 * c-typeck.c (build_binary_op): Add division by zero and shift
6943 instrumentation.
6944
2531a1d9 69452013-08-26 Joern Rennecke <joern.rennecke@embecosm.com>
0fdd4508 6946 Joseph Myers <joseph@codesourcery.com>
2531a1d9 6947
6e2bcc98 6948 PR c/35649
2531a1d9
JR
6949 * c-typeck.c (c_common_type): Prefer double_type_node over
6950 other REAL_TYPE types with the same precision.
6951 (convert_arguments): Likewise.
6952
025311c4
GDR
69532013-08-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
6954
6955 * c-objc-common.c (c_tree_printer): Document the nature of the cast.
6956 (c_initialize_diagnostics): Call a destructor for the early printer.
6957
da6ca2b5
GDR
69582013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
6959
6960 * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
6961 printer initialization.
6962
318cda85 69632013-08-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
da6ca2b5 6964
318cda85
BI
6965 PR c/57490
6966 * c-array-notation.c (fix_conditional_array_notations_1): Added a
6967 check for truth values.
6968 (expand_array_notation_exprs): Added truth values case. Removed an
6969 unwanted else. Added for-loop to walk through subtrees in default
6970 case.
6971
b066401f
GDR
69722013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
6973
6974 * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
6975
fb48aadc
JM
69762013-07-23 Joseph Myers <joseph@codesourcery.com>
6977
6978 * c-parser.c (struct c_generic_association): Fix typo.
6979
433cc7b0
TT
69802013-07-23 Tom Tromey <tromey@redhat.com>
6981 Joseph Myers <joseph@codesourcery.com>
6982
6983 * c-parser.c (struct c_generic_association): New.
6984 (c_generic_association_d): New typedef.
6985 (c_parser_generic_selection): New function.
6986 (c_parser_postfix_expression): Handle RID_GENERIC.
6987
26d40c3d
JM
69882013-07-13 Jason Merrill <jason@redhat.com>
6989
6990 PR c++/57793
6991 * c-decl.c (finish_struct): Check for too-large class.
6992
ecdbd01a 69932013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
40d3d530
JR
6994
6995 PR c/57821
6996 * c-typeck.c (set_init_index): When folding, check for index overflow.
6997
1141ed3f
BI
69982013-06-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
6999
7000 * c-parser.c (c_parser_array_notation): Removed rejection of array
7001 notations in an array of function pointers.
7002
713b46fa
BI
70032013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
7004
7005 * c-array-notation.c (make_triplet_val_inv): New function.
7006 (create_cmp_incr): Likewise.
7007 (create_array_refs): Likewise.
7008 (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
7009 Also modularized common parts between functions and called the function.
7010 (build_array_notation_expr): Likewise.
7011 (fix_conditional_array_notations_1): Likewise.
7012 (fix_array_notation_expr): Likewise.
7013 (fix_array_notation_call_expr): Likewise.
7014
92f20202
MP
70152013-06-18 Marek Polacek <polacek@redhat.com>
7016
7017 PR c/57630
7018 * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
7019
73a23b06
BI
70202013-06-12 Balaji V. Iyer <balaji.v.iyer@intel.com>
7021
7022 * c-array-notation.c (build_array_notation_expr): Reject array notation
7023 mismatch between LHS and RHS even inside a call_expr. Also, removed
7024 a couple while statements that were dead code.
7025
00b8517d
BI
70262013-06-10 Balaji V. Iyer <balaji.v.iyer@intel.com>
7027
7028 * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
7029 excessive precision expressions in function parameters. Also removed
7030 couple unwanted while statements.
7031
1509bdda
BI
70322013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
7033
7034 * c-array-notation.c (expand_array_notation_exprs): Added
7035 ARRAY_NOTATION_REF case.
ab20d992 7036
d60f1706
BI
70372013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
7038
7039 * c-array-notation.c (length_mismatch_in_expr_p): Moved this
7040 function to c-family/array-notation-common.c.
7041 (is_cilkplus_reduce_builtin): Likewise.
7042 (find_rank): Likewise.
7043 (extract_array_notation_exprs): Likewise.
7044 (replace_array_notations): Likewise.
7045 (find_inv_trees): Likewise.
7046 (replace_inv_trees): Likewise.
7047 (contains_array_notation_expr): Likewise.
7048 (find_correct_array_notation_type): Likewise.
7049 (replace_invariant_exprs): Initialized additional_tcodes to NULL.
7050 (struct inv_list): Moved this to c-family/array-notation-common.c.
7051 * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
ab20d992 7052
6d6efbb3
BI
70532013-06-05 Balaji V. Iyer <balaji.v.iyer@intel.com>
7054
7055 * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
7056 reduction functions outside the for-loop. Added a check if the fundecl
7057 is non-NULL. Finally, removed an unwanted if-statement, and made the
7058 body unconditional.
7059
25c22937
BI
70602013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
7061
7062 * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
7063 condition of the if-statement matches the rank of else-block and then-
7064 block when array notations are used.
7065 * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
7066 expression after the entire function body is parsed.
7067 (c_parser_expr_no_commas): Delayed creating array notation expressions
7068 to the end of function parsing.
7069 * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
7070 whole if-statement instead of just the condition.
ab20d992 7071 (expand_array_notation_exprs): Added MODIFY_EXPR case.
25c22937 7072
edd25645
BI
70732013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
7074
7075 PR c/57474
7076 * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
7077 array to NULL_TREE if they are unused. Also added a check for the
7078 field to be NULL before its fields are used in future.
ab20d992 7079
065ce7f1
RO
70802013-05-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
7081
7082 PR bootstrap/57450
7083 * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
7084 (build_array_notation_expr): Likewise.
7085
36536d79
BI
70862013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
7087
7088 * c-typeck.c (build_array_ref): Added a check to see if array's
7089 index is greater than one. If true, then emit an error.
7090 (build_function_call_vec): Exclude error reporting and checking
7091 for builtin array-notation functions.
7092 (convert_arguments): Likewise.
7093 (c_finish_return): Added a check for array notations as a return
7094 expression. If true, then emit an error.
7095 (c_finish_loop): Added a check for array notations in a loop
7096 condition. If true then emit an error.
7097 (lvalue_p): Added a ARRAY_NOTATION_REF case.
7098 (build_binary_op): Added a check for array notation expr inside
7099 op1 and op0. If present, we call another function to find correct
7100 type.
7101 * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
7102 * c-parser.c (c_parser_compound_statement): Check if array
7103 notation code is used in tree, if so, then transform them into
7104 appropriate C code.
7105 (c_parser_expr_no_commas): Check if array notation is used in LHS
7106 or RHS, if so, then build array notation expression instead of
7107 regular modify.
7108 (c_parser_postfix_expression_after_primary): Added a check for
7109 colon(s) after square braces, if so then handle it like an array
7110 notation. Also, break up array notations in unary op if found.
7111 (c_parser_direct_declarator_inner): Added a check for array
7112 notation.
7113 (c_parser_compound_statement): Added a check for array notation in
7114 a stmt. If one is present, then expand array notation expr.
7115 (c_parser_if_statement): Likewise.
7116 (c_parser_switch_statement): Added a check for array notations in
7117 a switch statement's condition. If true, then output an error.
7118 (c_parser_while_statement): Similarly, but for a while.
7119 (c_parser_do_statement): Similarly, but for a do-while.
7120 (c_parser_for_statement): Similarly, but for a for-loop.
7121 (c_parser_unary_expression): Check if array notation is used in a
7122 pre-increment or pre-decrement expression. If true, then expand
7123 them.
7124 (c_parser_array_notation): New function.
7125 * c-array-notation.c: New file.
7126 * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
ab20d992 7127
cd192ccc
MS
71282013-05-23 Mike Stump <mikestump@comcast.net>
7129
7130 * c-typeck.c (convert_for_assignment): Handle references to memory
7131 spaces better.
7132
427b248d
JM
71332013-05-16 Jason Merrill <jason@redhat.com>
7134
7135 * Make-lang.in (cc1$(exeext)): Use link mutex.
7136
44d90fe1
PC
71372013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
7138
7139 * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
7140 to simply use OPT_Wpointer_arith.
7141 (build_unary_op): Likewise.
7142
4e7d7b3d
JJ
71432013-04-03 Jakub Jelinek <jakub@redhat.com>
7144
7145 PR c/19449
7146 * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
7147 argument. If set, or it temporarily for parsing of the first
7148 argument into force_folding_builtin_constant_p.
7149 (c_parser_postfix_expression): Adjust callers.
7150
839b422f
RB
71512013-03-21 Richard Biener <rguenther@suse.de>
7152
7153 * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
7154 instead of DECL_DEBUG_EXPR_IS_FROM. Guard properly.
7155
2ee028f1
MP
71562013-02-12 Marek Polacek <polacek@redhat.com>
7157
7158 PR c/44938
7159 * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
7160 origtypes to NULL.
7161
8824edff
JJ
71622013-01-24 Jakub Jelinek <jakub@redhat.com>
7163
7164 PR c/56078
7165 * c-typeck.c (set_nonincremental_init_from_string): If
7166 constructor_max_index is NULL, treat it as if tree_int_cst_lt
7167 returned false.
7168 (process_init_element): Likewise.
7169
eadd3d0d
JJ
71702012-12-20 Jakub Jelinek <jakub@redhat.com>
7171
7172 PR c++/55619
7173 * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
7174 argument, don't call default_function_array_conversion
7175 nor c_fully_fold here.
7176 (c_parser_asm_statement): Adjust callers.
7177 * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
7178 and outputs here, and call default_function_array_conversion
7179 on inputs that don't need to be addressable.
7180
f8a93a2e
JJ
71812012-12-18 Jakub Jelinek <jakub@redhat.com>
7182
7183 PR c/39464
7184 * c-typeck.c (convert_for_assignment): For -Wpointer-sign
7185 warning require that both c_common_unsigned_type as well as
7186 c_common_signed_type is the same for both mvl and mvr types.
7187
9771b263
DN
71882012-11-16 Diego Novillo <dnovillo@google.com>
7189
7190 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
7191
7192 * c-common.c: Use new vec API in vec.h.
7193 * c-common.h: Likewise.
7194 * c-gimplify.c: Likewise.
7195 * c-pragma.c: Likewise.
7196 * c-pretty-print.c: Likewise.
7197 * c-pretty-print.h: Likewise.
7198 * c-semantics.c: Likewise.
7199 * c-decl.c: Likewise.
7200 * c-parser.c: Likewise.
7201 * c-tree.h: Likewise.
7202 * c-typeck.c: Likewise.
7203
880661a4
JW
72042012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
7205
7206 PR c++/54930
7207 * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
7208
077d1abe
MLI
72092012-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
7210
7211 PR c/53066
7212 * c-decl.c (warn_if_shadowing): Do not warn if a variable
7213 shadows a function, unless the variable is a function or a
7214 pointer-to-function.
7215
3a785c97
JJ
72162012-10-12 Jakub Jelinek <jakub@redhat.com>
7217
7218 PR c/54381
7219 * c-parser.c (struct c_tree_loc_pair): Removed.
7220 (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
7221 add location_t * and tree * arguments, fill in array of 3
7222 sizeof_arg trees and corresponding locs.
7223 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
7224 c_parser_expr_list callers.
7225 (c_parser_postfix_expression_after_primary): Likewise. Pass
7226 array of 3 sizeof_arg trees and locs (corresponding to first
7227 3 arguments) to sizeof_pointer_memaccess_warning.
7228
703c8606
LC
72292012-10-09 Lawrence Crowl <crowl@google.com>
7230
7231 * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
7232 * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
7233 hash table.
7234
5d9de0d0
PC
72352012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
7236
7237 PR c++/54194
7238 * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
7239 call.
7240
a212e43f
MG
72412012-10-09 Marc Glisse <marc.glisse@inria.fr>
7242
7243 PR c++/54427
7244 * c-typeck.c: Include c-common.h.
7245 (enum stv_conv): Moved to c-common.h.
7246 (scalar_to_vector): Moved to c-common.c.
7247 (build_binary_op): Adapt to scalar_to_vector's new prototype.
7248 * Make-lang.in: c-typeck.c depends on c-common.h.
7249
3b78de56
AC
72502012-10-04 Arnaud Charlet <charlet@adacore.com>
7251
7252 * c-decl.c (c_write_global_declarations): Fix handling of
7253 -fdump-ada-spec*.
7254
78c60e3d
SS
72552012-09-30 Sharad Singhai <singhai@google.com>
7256
7257 * c-decl.c (c_write_global_declarations): Use a different method
7258 to determine if the dump has ben initialized.
7259
9f33203d
JM
72602012-09-14 Joseph Myers <joseph@codesourcery.com>
7261
7262 PR c/54552
7263 * c-typeck.c (c_cast_expr): When casting to a type requiring
7264 C_MAYBE_CONST_EXPR to be created, pass the inner expression to
7265 c_fully_fold first.
7266
a27d595d
JM
72672012-09-14 Joseph Myers <joseph@codesourcery.com>
7268
7269 PR c/54103
7270 * c-typeck.c (build_unary_op): Pass original argument of
7271 TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
7272 any C_MAYBE_CONST_EXPR, if it has integer operands.
7273 (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
7274 TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
7275 to c_objc_common_truthvalue_conversion, then remove any
7276 C_MAYBE_CONST_EXPR, if they have integer operands. Use
7277 c_objc_common_truthvalue_conversion not
7278 c_common_truthvalue_conversion.
7279 (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
7280 call note_integer_operands for arguments with integer operands
7281 that are not integer constants.
7282
9feb29df
JJ
72832012-09-13 Jakub Jelinek <jakub@redhat.com>
7284
7285 PR c/54559
7286 * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
7287 COMPLEX_TYPE with in_late_binary_op set temporarily to true.
7288
d409320c
JJ
72892012-08-31 Jakub Jelinek <jakub@redhat.com>
7290
7291 PR c/54428
7292 * c-convert.c (convert): Don't call fold_convert_loc if
7293 TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
7294 is a COMPLEX_EXPR. Remove TYPE_MAIN_VARIANT check from
7295 COMPLEX_TYPE -> COMPLEX_TYPE conversion.
7296
6265d07c
JJ
72972012-08-24 Jakub Jelinek <jakub@redhat.com>
7298
7299 PR c/54355
7300 * c-decl.c (c_parser_label): Pass true as nested and fix up comments
7301 for nested and empty_ok arguments in the call to
7302 c_parser_declaration_or_fndef.
7303
1a4049e7
JJ
73042012-08-17 Jakub Jelinek <jakub@redhat.com>
7305
7306 * c-tree.h (c_last_sizeof_arg): Declare.
7307 * c-parser.c (struct c_tree_loc_pair): New type.
7308 (c_parser_expr_list): Add sizeof_arg argument. Fill it in if
7309 non-NULL.
7310 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
7311 (c_parser_postfix_expression_after_primary): Likewise. Call
7312 sizeof_pointer_memaccess_warning if needed.
7313 (sizeof_ptr_memacc_comptypes): New function.
7314 * c-typeck.c (c_last_sizeof_arg): New global variable.
7315 (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
7316
0229aee9
UB
73172012-07-24 Uros Bizjak <ubizjak@gmail.com>
7318
7319 * c-lang.h (lang_decl): Add variable_size GTY option.
7320
7ee2468b
SB
73212012-07-16 Steven Bosscher <steven@gcc.gnu.org>
7322
7323 * c-decl.c: Include dumpfile.h instead of tree-dump.h.
7324 * Make-lang.in: Fix dependencies.
7325
d4a10d0a
SB
73262012-06-29 Steven Bosscher <steven@gcc.gnu.org>
7327
7328 * Make-lang.in: New file, rules migrated from gcc/Makefile.in
7329 and add language Makefile hooks.
7330 * config-lang.in: New file.
7331 * c-config-lang.in: Moved from gcc/config-lang.in to here, and
7332 add the required "normal" config-lang.in rules.
7333 * c-lang.h: Moved from gcc/ to here.
7334 * c-tree.h: Likewise.
7335 * c-objc-common.c: Likewise.
7336 * c-objc-common.h: Likewise.
7337 * c-typeck.c: Likewise.
7338 * c-convert.c: Likewise.
7339 * c-lang.c: Likewise.
7340 * c-aux-info.c: Likewise.
7341 * c-errors.c: Likewise.
7342 * gccspec.c: Likewise.
7343 * c-decl.c: Likewise. Include gt-c-c-decl.h, not gt-c-decl.h.
7344 * c-parser.c: Likewise. Include gt-c-c-parser.h, not gt-c-parser.h.
7345\f
8d9254fc 7346Copyright (C) 2012-2020 Free Software Foundation, Inc.
d4a10d0a
SB
7347
7348Copying and distribution of this file, with or without modification,
7349are permitted in any medium without royalty provided the copyright
7350notice and this notice are preserved.